Changeset 6287 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 12/19/2017 04:22:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r6217 r6287 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\Admin; 3 3 4 use \WordPressdotorg\Plugin_Directory; 4 5 use \WordPressdotorg\Plugin_Directory\Tools; … … 49 50 add_action( 'do_meta_boxes', array( $this, 'replace_title_global' ) ); 50 51 51 add_filter( 'postbox_classes_plugin_internal-notes', 52 add_filter( 'postbox_classes_plugin_plugin-committers', array( __NAMESPACE__ . '\Metabox\Committers','postbox_classes' ) );53 add_filter( 'postbox_classes_plugin_plugin-support-reps', array( __NAMESPACE__ . '\Metabox\Support_Reps', 54 add_filter( 'wp_ajax_add-committer', 55 add_filter( 'wp_ajax_delete-committer', 56 add_filter( 'wp_ajax_add-support-rep', 57 add_filter( 'wp_ajax_delete-support-rep', 52 add_filter( 'postbox_classes_plugin_internal-notes', array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) ); 53 add_filter( 'postbox_classes_plugin_plugin-committers', array( __NAMESPACE__ . '\Metabox\Committers', 'postbox_classes' ) ); 54 add_filter( 'postbox_classes_plugin_plugin-support-reps', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'postbox_classes' ) ); 55 add_filter( 'wp_ajax_add-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer' ) ); 56 add_filter( 'wp_ajax_delete-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) ); 57 add_filter( 'wp_ajax_add-support-rep', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'add_support_rep' ) ); 58 add_filter( 'wp_ajax_delete-support-rep', array( __NAMESPACE__ . '\Metabox\Support_Reps', 'remove_support_rep' ) ); 58 59 add_action( 'wp_ajax_plugin-author-lookup', array( __NAMESPACE__ . '\Metabox\Author', 'lookup_author' ) ); 59 60 } … … 204 205 205 206 if ( $rejected ) { 206 set_transient( 'settings_errors', array( array( 207 'setting' => 'wporg-plugins', 208 'code' => 'plugins-bulk-rejected', 209 'message' => sprintf( _n( '%d plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ), 210 'type' => 'updated', 211 ) ) ); 207 set_transient( 'settings_errors', array( 208 array( 209 'setting' => 'wporg-plugins', 210 'code' => 'plugins-bulk-rejected', 211 'message' => sprintf( _n( '%d plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ), 212 'type' => 'updated', 213 ), 214 ) ); 212 215 } 213 216 … … 277 280 278 281 if ( $message ) { 279 printf( '<div class="notice %1$s"><p>%2$s</p></div>', esc_attr( $type ), esc_html( $message ) ); 282 printf( '<div class="notice %1$s"><p>%2$s</p></div>', esc_attr( $type ), esc_html( $message ) ); 280 283 } 281 284 } … … 331 334 return $data; 332 335 } 333 336 334 337 $existing_plugin = Plugin_Directory\Plugin_Directory::get_plugin_post( $data['post_name'] ); 335 338 … … 416 419 ); 417 420 418 419 421 add_meta_box( 420 422 'plugin-fields', … … 449 451 450 452 // Remove unnecessary metaboxes. 451 remove_meta_box( 'commentsdiv', 453 remove_meta_box( 'commentsdiv', 'plugin', 'normal' ); 452 454 remove_meta_box( 'commentstatusdiv', 'plugin', 'normal' ); 453 455 … … 489 491 * Changes the permalink for internal notes to link to the edit post screen. 490 492 * 491 * @param string $link The comment permalink with '#comment-$id' appended.493 * @param string $link The comment permalink with '#comment-$id' appended. 492 494 * @param \WP_Comment $comment The current comment object. 493 495 * @return string The permalink to the given comment. … … 602 604 ob_start(); 603 605 if ( isset( $_REQUEST['mode'] ) && 'dashboard' == $_REQUEST['mode'] ) { 604 require_once ( ABSPATH . 'wp-admin/includes/dashboard.php' );606 require_once ABSPATH . 'wp-admin/includes/dashboard.php'; 605 607 _wp_dashboard_recent_comments_row( $comment ); 606 608 } else { … … 618 620 'id' => $comment->comment_ID, 619 621 'data' => $comment_list_item, 620 'position' => $position 622 'position' => $position, 621 623 ); 622 624 … … 631 633 _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments', 'wporg-plugins' ), 632 634 number_format_i18n( $counts->moderated ) 633 ) 635 ), 634 636 ); 635 637
Note: See TracChangeset
for help on using the changeset viewer.