Changeset 1268
- Timestamp:
- 02/17/2015 07:33:21 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r1245 r1268 87 87 add_action( 'pre_get_posts', __NAMESPACE__ . '\\pre_get_posts' ); 88 88 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\theme_scripts_styles' ); 89 add_action( 'add_meta_boxes', __NAMESPACE__ . '\\rename_comments_meta_box', 10, 2 ); 89 90 90 91 add_filter( 'post_type_link', __NAMESPACE__ . '\\method_permalink', 10, 2 ); … … 250 251 wp_enqueue_script( 'wporg-developer-search', get_template_directory_uri() . '/js/search.js', array(), '20141029', true ); 251 252 } 253 254 /** 255 * Rename the 'Comments' meta box to 'User Contributed Notes' for reference-editing screens. 256 * 257 * @param string $post_type Post type. 258 * @param WP_Post $post WP_Post object for the current post. 259 */ 260 function rename_comments_meta_box( $post_type, $post ) { 261 if ( is_parsed_post_type( $post_type ) ) { 262 remove_meta_box( 'commentsdiv', $post_type, 'normal' ); 263 add_meta_box( 'commentsdiv', __( 'User Contributed Notes', 'wporg' ), 'post_comment_meta_box', $post_type, 'normal', 'high' ); 264 } 265 }
Note: See TracChangeset
for help on using the changeset viewer.