Making WordPress.org


Ignore:
Timestamp:
09/03/2017 09:43:53 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Plugin Directory: Introduce UI for managing plugin support reps.

Support representatives can mark forum topics as resolved or sticky (same as plugin authors and contributors), but don't have commit access to the plugin.

See #3029, #2699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r5727 r5867  
    4949        add_action( 'do_meta_boxes', array( $this, 'replace_title_global' ) );
    5050
    51         add_filter( 'postbox_classes_plugin_internal-notes',    array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) );
    52         add_filter( 'postbox_classes_plugin_plugin-committers', array( __NAMESPACE__ . '\Metabox\Committers',     'postbox_classes' ) );
    53         add_filter( 'wp_ajax_add-committer',    array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer'    ) );
    54         add_filter( 'wp_ajax_delete-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) );
     51        add_filter( 'postbox_classes_plugin_internal-notes',      array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) );
     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',     'postbox_classes' ) );
     54        add_filter( 'wp_ajax_add-committer',        array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer'    ) );
     55        add_filter( 'wp_ajax_delete-committer',     array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) );
     56        add_filter( 'wp_ajax_add-support-rep',      array( __NAMESPACE__ . '\Metabox\Support_Reps', 'add_support_rep' ) );
     57        add_filter( 'wp_ajax_delete-support-rep',   array( __NAMESPACE__ . '\Metabox\Support_Reps', 'remove_support_rep' ) );
    5558        add_action( 'wp_ajax_plugin-author-lookup', array( __NAMESPACE__ . '\Metabox\Author', 'lookup_author' ) );
    5659
     
    115118                    wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 5 );
    116119                    wp_localize_script( 'plugin-admin-post-js', 'pluginDirectory', array(
    117                         'approvePluginAYS'   => __( 'Are you sure you want to approve this plugin?', 'wporg-plugins' ),
    118                         'rejectPluginAYS'    => __( 'Are you sure you want to reject this plugin?', 'wporg-plugins' ),
    119                         'removeCommitterAYS' => __( 'Are you sure you want to remove this committer?', 'wporg-plugins' ),
     120                        'approvePluginAYS'    => __( 'Are you sure you want to approve this plugin?', 'wporg-plugins' ),
     121                        'rejectPluginAYS'     => __( 'Are you sure you want to reject this plugin?', 'wporg-plugins' ),
     122                        'removeCommitterAYS'  => __( 'Are you sure you want to remove this committer?', 'wporg-plugins' ),
     123                        'removeSupportRepAYS' => __( 'Are you sure you want to remove this support rep?', 'wporg-plugins' ),
    120124                    ) );
    121125                    break;
     
    437441            );
    438442
     443            add_meta_box(
     444                'plugin-support-reps',
     445                __( 'Plugin Support Reps', 'wporg-plugins' ),
     446                array( __NAMESPACE__ . '\Metabox\Support_Reps', 'display' ),
     447                'plugin', 'side'
     448            );
    439449        }
    440450
     
    496506     * Saves a comment that is not built-in.
    497507     *
    498      * We pretty much have to replicate all of `wp_ajax_replyto_comment()` to be able to comment on draft posts.
     508     * We pretty much have to replicate all of `wp_ajax_replyto_comment()` to be able to comment on pending posts.
    499509     */
    500510    public function save_custom_comment() {
Note: See TracChangeset for help on using the changeset viewer.