Changeset 13164 for trunk/src/bp-core/classes/class-bp-admin.php
- Timestamp:
- 12/10/2021 01:29:52 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/classes/class-bp-admin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-admin.php
r13163 r13164 1296 1296 'footer' => true, 1297 1297 ), 1298 1299 // 10.0 1300 'bp-dismissible-admin-notices' => array( 1301 'file' => "{$url}dismissible-admin-notices.js", 1302 'dependencies' => array(), 1303 'footer' => true, 1304 'extra' => array( 1305 'name' => 'bpDismissibleAdminNoticesSettings', 1306 'data' => array( 1307 'url' => bp_core_ajax_url(), 1308 'nonce' => wp_create_nonce( 'bp_dismiss_admin_notice' ), 1309 ), 1310 ), 1311 ), 1298 1312 ) ); 1299 1313 … … 1302 1316 foreach ( $scripts as $id => $script ) { 1303 1317 wp_register_script( $id, $script['file'], $script['dependencies'], $version, $script['footer'] ); 1318 1319 if ( isset( $script['extra'] ) ) { 1320 // List the block specific props. 1321 wp_add_inline_script( 1322 $id, 1323 sprintf( 'var %1$s = %2$s;', $script['extra']['name'], wp_json_encode( $script['extra']['data'] ) ), 1324 'before' 1325 ); 1326 } 1304 1327 } 1305 1328 } … … 1415 1438 * Displays the list of "BuddyPress Add-ons". 1416 1439 * 1417 * @todo we should have a page on the BuddyPress codex to explain feature plugins like this one:1418 * https://make.wordpress.org/core/features/1419 *1420 1440 * @since 10.0.0 1421 1441 */ 1422 1442 public function display_addons_table() { 1423 ?> 1424 <div id="welcome-panel" class="welcome-panel"> 1425 <a class="welcome-panel-close" href="#" aria-label="Dismiss the welcome panel"><?php esc_html_e( 'Dismiss', 'buddypress' ); ?></a> 1426 <div class="welcome-panel-content"> 1427 <h2><span class="bp-badge"></span> <?php esc_html_e( 'Hello BuddyPress Add-ons!', 'buddypress' ); ?></h2> 1428 <p class="about-description"> 1429 <?php esc_html_e( 'Add-ons are features as Plugins or Blocks maintained by the BuddyPress development team & hosted on the WordPress.org plugins directory.', 'buddypress' ); ?> 1430 <?php esc_html_e( 'Thanks to this new tab inside your Dashboard screen to add plugins, you’ll be able to find them faster and eventually contribute to beta features early to give the BuddyPress development team your feedbacks.', 'buddypress' ); ?> 1431 </p> 1443 $notice_id = 'bp100-welcome-addons'; 1444 $dismissed = bp_get_option( "bp-dismissed-notice-{$notice_id}", false ); 1445 1446 if ( ! $dismissed ) { 1447 // Enqueue the Script to Ajax Dismiss an Admin notice. 1448 wp_enqueue_script( 'bp-dismissible-admin-notices' ); 1449 1450 ?> 1451 <div id="welcome-panel" class="welcome-panel bp-notice-container"> 1452 <a class="welcome-panel-close bp-is-dismissible" href="#" data-notice_id="<?php echo esc_attr( $notice_id ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the welcome panel', 'buddypress' ); ?>"><?php esc_html_e( 'Dismiss', 'buddypress' ); ?></a> 1453 <div class="welcome-panel-content"> 1454 <h2><span class="bp-badge"></span> <?php esc_html_e( 'Hello BuddyPress Add-ons!', 'buddypress' ); ?></h2> 1455 <p class="about-description"> 1456 <?php esc_html_e( 'Add-ons are features as Plugins or Blocks maintained by the BuddyPress development team & hosted on the WordPress.org plugins directory.', 'buddypress' ); ?> 1457 <?php esc_html_e( 'Thanks to this new tab inside your Dashboard screen to add plugins, you’ll be able to find them faster and eventually contribute to beta features early to give the BuddyPress development team your feedbacks.', 'buddypress' ); ?> 1458 </p> 1459 </div> 1432 1460 </div> 1433 </div> 1434 <?php 1435 // Display the "buddypress" favorites ;) 1461 <?php 1462 } 1463 1464 // Display the "buddypress" favorites. 1436 1465 display_plugins_table(); 1437 1466 }
Note: See TracChangeset
for help on using the changeset viewer.