Ticket #6827: 6827.patch
File 6827.patch, 18.8 KB (added by , 9 years ago) |
---|
-
src/bp-core/admin/css/common-rtl.css
169 169 content: "\f108"; 170 170 } 171 171 172 #adminmenu li.toplevel_page_bp-components .wp-menu-image, 173 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image { 172 #adminmenu #toplevel_page_buddypress-menu .wp-menu-image:before, 173 #adminmenu #toplevel_page_buddypress-menu_user .wp-menu-image:before, 174 #adminmenu #toplevel_page_buddypress-menu_network .wp-menu-image:before { 174 175 content: "\f448"; 175 176 } 176 177 177 178 /* Settings - Dashicons (WP 3.8+) */ 179 .toplevel_page_buddypress-menu td.plugin-title span, 178 180 .settings_page_bp-components td.plugin-title span { 179 181 float: right; 180 182 width: 18px; … … 182 184 margin-left: 5px; 183 185 } 184 186 187 .toplevel_page_buddypress-menu td.plugin-title span:before, 185 188 .settings_page_bp-components td.plugin-title span:before { 186 189 font-family: 'dashicons'; 187 190 font-size: 18px; 188 191 } 189 192 193 .toplevel_page_buddypress-menu tr.activity td.plugin-title span:before, 190 194 .settings_page_bp-components tr.activity td.plugin-title span:before { 191 195 content: "\f452"; 192 196 } 193 197 198 .toplevel_page_buddypress-menu tr.notifications td.plugin-title span:before, 194 199 .settings_page_bp-components tr.notifications td.plugin-title span:before { 195 200 content: "\f339"; 196 201 } 197 202 203 .toplevel_page_buddypress-menu tr.xprofile td.plugin-title span:before, 198 204 .settings_page_bp-components tr.xprofile td.plugin-title span:before { 199 205 content: "\f336"; 200 206 } 201 207 208 .toplevel_page_buddypress-menu tr.settings td.plugin-title span:before, 202 209 .settings_page_bp-components tr.settings td.plugin-title span:before { 203 210 content: "\f108"; 204 211 } 205 212 213 .toplevel_page_buddypress-menu tr.groups td.plugin-title span:before, 206 214 .settings_page_bp-components tr.groups td.plugin-title span:before { 207 215 content: "\f456"; 208 216 } 209 217 218 .toplevel_page_buddypress-menu tr.messages td.plugin-title span:before, 210 219 .settings_page_bp-components tr.messages td.plugin-title span:before { 211 220 content: "\f457"; 212 221 } 213 222 223 .toplevel_page_buddypress-menu tr.forums td.plugin-title span:before, 214 224 .settings_page_bp-components tr.forums td.plugin-title span:before { 215 225 content: "\f452"; 216 226 } 217 227 228 .toplevel_page_buddypress-menu tr.blogs td.plugin-title span:before, 218 229 .settings_page_bp-components tr.blogs td.plugin-title span:before { 219 230 content: "\f120"; 220 231 } 221 232 233 .toplevel_page_buddypress-menu tr.friends td.plugin-title span:before, 222 234 .settings_page_bp-components tr.friends td.plugin-title span:before { 223 235 content: "\f454"; 224 236 } 225 237 238 .toplevel_page_buddypress-menu tr.core td.plugin-title span:before, 226 239 .settings_page_bp-components tr.core td.plugin-title span:before { 227 240 content: "\f448"; 228 241 } 229 242 243 .toplevel_page_buddypress-menu tr.members td.plugin-title span:before, 230 244 .settings_page_bp-components tr.members td.plugin-title span:before { 231 245 content: "\f307"; 232 246 } … … 236 250 } 237 251 238 252 @media screen and ( max-width: 782px ) { 253 .toplevel_page_buddypress-menu td.plugin-title span, 239 254 .settings_page_bp-components td.plugin-title span { 240 255 margin-top: 5px; 241 256 } -
src/bp-core/admin/css/common.css
169 169 content: "\f108"; 170 170 } 171 171 172 #adminmenu li.toplevel_page_bp-components .wp-menu-image, 173 #adminmenu li.toplevel_page_bp-general-settings .wp-menu-image { 172 #adminmenu #toplevel_page_buddypress-menu .wp-menu-image:before, 173 #adminmenu #toplevel_page_buddypress-menu_user .wp-menu-image:before, 174 #adminmenu #toplevel_page_buddypress-menu_network .wp-menu-image:before { 174 175 content: "\f448"; 175 176 } 176 177 177 178 /* Settings - Dashicons (WP 3.8+) */ 179 .toplevel_page_buddypress-menu td.plugin-title span, 178 180 .settings_page_bp-components td.plugin-title span { 179 181 float: left; 180 182 width: 18px; … … 182 184 margin-right: 5px; 183 185 } 184 186 187 .toplevel_page_buddypress-menu td.plugin-title span:before, 185 188 .settings_page_bp-components td.plugin-title span:before { 186 189 font-family: 'dashicons'; 187 190 font-size: 18px; 188 191 } 189 192 193 .toplevel_page_buddypress-menu tr.activity td.plugin-title span:before, 190 194 .settings_page_bp-components tr.activity td.plugin-title span:before { 191 195 content: "\f452"; 192 196 } 193 197 198 .toplevel_page_buddypress-menu tr.notifications td.plugin-title span:before, 194 199 .settings_page_bp-components tr.notifications td.plugin-title span:before { 195 200 content: "\f339"; 196 201 } 197 202 203 .toplevel_page_buddypress-menu tr.xprofile td.plugin-title span:before, 198 204 .settings_page_bp-components tr.xprofile td.plugin-title span:before { 199 205 content: "\f336"; 200 206 } 201 207 208 .toplevel_page_buddypress-menu tr.settings td.plugin-title span:before, 202 209 .settings_page_bp-components tr.settings td.plugin-title span:before { 203 210 content: "\f108"; 204 211 } 205 212 213 .toplevel_page_buddypress-menu tr.groups td.plugin-title span:before, 206 214 .settings_page_bp-components tr.groups td.plugin-title span:before { 207 215 content: "\f456"; 208 216 } 209 217 218 .toplevel_page_buddypress-menu tr.messages td.plugin-title span:before, 210 219 .settings_page_bp-components tr.messages td.plugin-title span:before { 211 220 content: "\f457"; 212 221 } 213 222 223 .toplevel_page_buddypress-menu tr.forums td.plugin-title span:before, 214 224 .settings_page_bp-components tr.forums td.plugin-title span:before { 215 225 content: "\f452"; 216 226 } 217 227 228 .toplevel_page_buddypress-menu tr.blogs td.plugin-title span:before, 218 229 .settings_page_bp-components tr.blogs td.plugin-title span:before { 219 230 content: "\f120"; 220 231 } 221 232 233 .toplevel_page_buddypress-menu tr.friends td.plugin-title span:before, 222 234 .settings_page_bp-components tr.friends td.plugin-title span:before { 223 235 content: "\f454"; 224 236 } 225 237 238 .toplevel_page_buddypress-menu tr.core td.plugin-title span:before, 226 239 .settings_page_bp-components tr.core td.plugin-title span:before { 227 240 content: "\f448"; 228 241 } 229 242 243 .toplevel_page_buddypress-menu tr.members td.plugin-title span:before, 230 244 .settings_page_bp-components tr.members td.plugin-title span:before { 231 245 content: "\f307"; 232 246 } … … 236 250 } 237 251 238 252 @media screen and ( max-width: 782px ) { 253 .toplevel_page_buddypress-menu td.plugin-title span, 239 254 .settings_page_bp-components td.plugin-title span { 240 255 margin-top: 5px; 241 256 } -
src/bp-core/classes/class-bp-admin.php
181 181 add_filter( 'ms_user_row_actions', 'bp_core_admin_user_row_actions', 10, 2 ); 182 182 add_filter( 'user_row_actions', 'bp_core_admin_user_row_actions', 10, 2 ); 183 183 184 // BuddyPress top level menu. 185 add_filter( 'bp_admin_menu_order', array( $this, 'bp_core_top_level_admin_menu_order' ), 1 ); 186 184 187 // Emails 185 188 add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 ); 186 189 } … … 191 194 * Contextually hooked to site or network-admin depending on current configuration. 192 195 * 193 196 * @since 1.6.0 197 * @since 2.5.0 Add back the BuddyPress top level menu. 194 198 * 195 199 * @uses add_management_page() To add the Recount page in Tools section. 196 200 * @uses add_options_page() To add the Forums settings page in Settings … … 221 225 array( $this, 'credits_screen' ) 222 226 ); 223 227 228 // Admin Links. 229 add_dashboard_page( 230 __( 'Welcome to BuddyPress', 'buddypress' ), 231 __( 'Welcome to BuddyPress', 'buddypress' ), 232 'manage_options', 233 'bp-admin-links', 234 array( $this, 'admin_links_screen' ) 235 ); 236 224 237 $hooks = array(); 225 238 226 // Changed in BP 1.6 . See bp_core_admin_backpat_menu().239 // Changed in BP 2.5.0. Bring back top level menu. 227 240 $hooks[] = add_menu_page( 228 241 __( 'BuddyPress', 'buddypress' ), 229 242 __( 'BuddyPress', 'buddypress' ), 230 243 $this->capability, 231 'bp-general-settings', 232 'bp_core_admin_backpat_menu', 233 'div' 244 'buddypress-menu', 245 'bp_core_admin_components_settings' 234 246 ); 235 247 236 248 $hooks[] = add_submenu_page( 249 'buddypress-menu', 250 __( 'Settings', 'buddypress' ), 251 __( 'Settings', 'buddypress' ), 252 $this->capability, 253 'buddypress-menu', 254 'bp_core_admin_components_settings' 255 ); 256 257 $hooks[] = add_submenu_page( 258 'buddypress-menu', 259 __( 'Admin Links', 'buddypress' ), 260 __( 'Admin Links', 'buddypress' ), 261 $this->capability, 262 'bp-admin-links', 263 'admin_links_screen' 264 ); 265 266 $hooks[] = add_submenu_page( 237 267 'bp-general-settings', 238 268 __( 'BuddyPress Help', 'buddypress' ), 239 269 __( 'Help', 'buddypress' ), … … 331 361 } 332 362 333 363 /** 364 * Add the BuddyPress top level menu to custom menus array. 365 * 366 * This ensures that the BuddyPress top level menu item appears 367 * in the proper order on the main Dashboard menu. 368 * 369 * @since 2.5.0 370 * 371 * @param array $custom_menus Array of BP top-level menu items. 372 * @return array Menu item array, with BuddyPress menu added. 373 */ 374 public function bp_core_top_level_admin_menu_order( $custom_menus = array() ) { 375 array_push( $custom_menus, 'buddypress-menu' ); 376 return $custom_menus; 377 } 378 379 /** 334 380 * Register site-admin nav menu elements. 335 381 * 336 382 * @since 2.5.0 … … 522 568 // Network Admin Tools. 523 569 remove_submenu_page( 'network-tools', 'network-tools' ); 524 570 525 // About and Credits pages. 526 remove_submenu_page( 'index.php', 'bp-about' ); 527 remove_submenu_page( 'index.php', 'bp-credits' ); 571 // About, Credits, and Admin Link pages. 572 remove_submenu_page( 'index.php', 'bp-about' ); 573 remove_submenu_page( 'index.php', 'bp-credits' ); 574 remove_submenu_page( 'index.php', 'bp-admin-links' ); 528 575 } 529 576 530 577 /** … … 552 599 553 600 <?php self::tab_navigation( __METHOD__ ); ?> 554 601 555 <?php if ( self::is_new_install() ) : ?>556 557 <div id="welcome-panel" class="welcome-panel">558 <div class="welcome-panel-content">559 <h3 style="margin:0"><?php _e( 'Getting Started with BuddyPress', 'buddypress' ); ?></h3>560 <div class="welcome-panel-column-container">561 <div class="welcome-panel-column">562 <h4><?php _e( 'Configure BuddyPress', 'buddypress' ); ?></h4>563 <ul>564 <li><?php printf(565 '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Set Up Components', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), $this->settings_page ) ) )566 ); ?></li>567 <li><?php printf(568 '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Assign Components to Pages', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), $this->settings_page ) ) )569 ); ?></li>570 <li><?php printf(571 '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Customize Settings', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), $this->settings_page ) ) )572 ); ?></li>573 </ul>574 <a class="button button-primary button-hero" style="margin-bottom:20px;margin-top:0;" href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), $this->settings_page ) ) ); ?>"><?php _e( 'Get Started', 'buddypress' ); ?></a>575 </div>576 <div class="welcome-panel-column">577 <h4><?php _e( 'Administration Tools', 'buddypress' ); ?></h4>578 <ul>579 <?php if ( bp_is_active( 'members' ) ) : ?>580 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add User Profile Fields', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-profile-setup' ), 'users.php' ) ) ) ); ?></li>581 <?php endif; ?>582 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage User Signups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-signups' ), 'users.php' ) ) ) ); ?></li>583 <?php if ( bp_is_active( 'activity' ) ) : ?>584 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Moderate Activity Streams', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-activity' ), 'admin.php' ) ) ) ); ?></li>585 <?php endif; ?>586 <?php if ( bp_is_active( 'groups' ) ) : ?>587 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage Groups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-groups' ), 'admin.php' ) ) ) ); ?></li>588 <?php endif; ?>589 <li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Repair Data', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-tools' ), 'tools.php' ) ) ) ); ?>590 </li>591 </ul>592 </div>593 <div class="welcome-panel-column welcome-panel-last">594 <h4><?php _e( 'Community and Support', 'buddypress' ); ?></h4>595 <p class="welcome-icon welcome-learn-more" style="margin-right:10px"><?php _e( 'Looking for help? The <a href="https://codex.buddypress.org/">BuddyPress Codex</a> has you covered.', 'buddypress' ) ?></p>596 <p class="welcome-icon welcome-learn-more" style="margin-right:10px"><?php _e( 'Can’t find what you need? Stop by <a href="https://buddypress.org/support/">our support forums</a>, where active BuddyPress users and developers are waiting to share tips and more.', 'buddypress' ) ?></p>597 </div>598 </div>599 </div>600 </div>601 602 <?php endif; ?>603 604 602 <div class="headline-feature"> 605 603 <h3><?php esc_html_e( 'Cover Images For Members And Groups', 'buddypress' ); ?></h3> 606 604 … … 824 822 } 825 823 826 824 /** 825 * Output the Admin Links screen. 826 * 827 * @since 2.5.0 828 */ 829 public function admin_links_screen() { 830 ?> 831 832 <div class="wrap about-wrap"> 833 834 <?php self::welcome_text(); ?> 835 836 <?php self::tab_navigation( __METHOD__ ); ?> 837 838 <table class="form-table"> 839 <tbody> 840 <tr> 841 <th scope="row"><?php _e( 'BuddyPress Settings', 'buddypress' ); ?></th> 842 <td> 843 <p><?php printf('<a href="%s">' . __( 'Settings — BuddyPress — Components', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), $this->settings_page ) ) ) ); ?></p> 844 <p><?php printf('<a href="%s">' . __( 'Settings — BuddyPress — Pages', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), $this->settings_page ) ) ) ); ?></p> 845 <p><?php printf('<a href="%s">' . __( 'Settings — BuddyPress — Options', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), $this->settings_page ) ) ) ); ?></p> 846 </td> 847 </tr> 848 <tr> 849 <th scope="row"><?php _e( 'Check Pending Users', 'buddypress' ); ?></th> 850 <td> 851 <p><?php printf( '<a href="%s">' . __( 'Users — Manage Signups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-signups' ), 'users.php' ) ) ) ); ?></p> 852 </td> 853 </tr> 854 <?php if ( bp_is_active( 'xprofile' ) ) : ?> 855 <tr> 856 <th scope="row"><?php _e( 'Add User Profile Fields', 'buddypress' ); ?></th> 857 <td> 858 <p><?php printf( '<a href="%s">' . __( 'Users — Profile Fields', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-profile-setup' ), 'users.php' ) ) ) ); ?></p> 859 </td> 860 </tr> 861 <?php endif; ?> 862 <?php if ( bp_is_active( 'activity' ) ) : ?> 863 <tr> 864 <th scope="row"><?php _e( 'Moderate Activities', 'buddypress' ); ?></th> 865 <td> 866 <p><?php printf( '<a href="%s">' . __( 'List of Sitewide Activities', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-activity' ), 'admin.php' ) ) ) ); ?></p> 867 </td> 868 </tr> 869 <?php endif; ?> 870 <?php if ( bp_is_active( 'groups' ) ) : ?> 871 <tr> 872 <th scope="row"><?php _e( 'Manage Groups', 'buddypress' ); ?></th> 873 <td> 874 <p><?php printf( '<a href="%s">' . __( 'List of all Groups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-groups' ), 'admin.php' ) ) ) ); ?></p> 875 </td> 876 </tr> 877 <?php endif; ?> 878 <tr> 879 <th scope="row"><?php _e( 'Customize Emails', 'buddypress' ); ?></th> 880 <td> 881 <?php if ( bp_is_network_activated() ) : ?> 882 <p><?php printf( '<a href="%s">' . __( 'List of Email Templates', 'buddypress' ) . '</a>', esc_url( get_admin_url( bp_get_root_blog_id(), 'edit.php?post_type=' . bp_get_email_post_type() ) ) ); ?></p> 883 <?php else : ?> 884 <p><?php printf( '<a href="%s">' . __( 'List of Email Templates', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'post_type' => 'bp-email' ), 'edit.php' ) ) ) ); ?></p> 885 <?php endif; ?> 886 <?php if ( bp_is_network_activated() ) : ?> 887 <p><?php printf( '<a href="%s">' . __( 'Add New Email Template', 'buddypress' ) . '</a>', esc_url( get_admin_url( bp_get_root_blog_id(), 'post-new.php?post_type=' . bp_get_email_post_type() ) ) ); ?></p> 888 <?php else : ?> 889 <p><?php printf( '<a href="%s">' . __( 'Add New Email Template', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'post_type' => 'bp-email' ), 'post-new.php' ) ) ) ); ?></p> 890 <?php endif; ?> 891 <p><?php _e( 'Appearance — Emails', 'buddypress' ); ?></p> 892 </td> 893 </tr> 894 <tr> 895 <th scope="row"><?php _e( 'Repair Data', 'buddypress' ); ?></th> 896 <td> 897 <p><?php printf( '<a href="%s">' . __( 'Tools — BuddyPress', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-tools' ), 'tools.php' ) ) ) ); ?></p> 898 </td> 899 </tr> 900 <tr> 901 <th scope="row"><?php _e( 'Community and Support', 'buddypress' ); ?></th> 902 <td> 903 <p><?php _e( 'Looking for help? The <a href="https://codex.buddypress.org/">BuddyPress Codex</a> has you covered.', 'buddypress' ) ?></p> 904 <p><?php _e( 'Can’t find what you need? Stop by <a href="https://buddypress.org/support/">our support forums</a>, where active BuddyPress users and developers are waiting to share tips and more.', 'buddypress' ) ?></p> 905 </td> 906 </tr> 907 </tbody> 908 </table> 909 910 <?php 911 } 912 913 /** 827 914 * Output welcome text and badge for What's New and Credits pages. 828 915 * 829 916 * @since 2.2.0 … … 869 956 <?php esc_html_e( 'What’s New', 'buddypress' ); ?> 870 957 </a><a class="nav-tab <?php if ( 'BP_Admin::credits_screen' === $tab ) : ?>nav-tab-active<?php endif; ?>" href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-credits' ), 'index.php' ) ) ); ?>"> 871 958 <?php esc_html_e( 'Credits', 'buddypress' ); ?> 872 </a> 959 </a><a class="nav-tab <?php if ( 'BP_Admin::admin_links_screen' === $tab ) : ?>nav-tab-active<?php endif; ?>" href="<?php echo esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-admin-links' ), 'index.php' ) ) ); ?>"> 960 <?php esc_html_e( 'Admin Links', 'buddypress' ); ?> 961 </a> 873 962 </h2> 874 963 875 964 <?php