Making WordPress.org


Ignore:
Timestamp:
04/11/2016 01:42:53 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Initial setup for post status transitions.

Provides a place to handle post status transitions for plugins.

See #1570.

File:
1 edited

Legend:

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

    r2925 r2930  
    3434        if ( defined( 'WP_ADMIN' ) && WP_ADMIN ) {
    3535            Admin\Customizations::instance();
     36
     37            add_action( 'transition_post_status', array( 'Admin\Status_Transitions', 'instance' ) );
    3638        }
    3739
     
    7678                'edit_posts'         => 'plugin_dashboard_access',
    7779                'edit_others_posts'  => 'plugin_edit_others',
     80                'publish_posts'      => 'plugin_approve',
    7881                'read_private_posts' => 'do_not_allow',
    7982                'delete_posts'       => 'do_not_allow',
    80                 'create_posts'       => 'do_not_allow'
     83                'create_posts'       => 'do_not_allow',
    8184            )
    8285        ) );
     
    125128            'label'                     => _x( 'Pending', 'plugin status', 'wporg-plugins' ),
    126129            'public'                    => false,
    127             'show_in_admin_status_list' => current_user_can( 'plugin_approve' ),
     130            'show_in_admin_status_list' => current_user_can( 'plugin_review' ),
    128131            'label_count'               => _n_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'wporg-plugins' ),
    129132        ) );
Note: See TracChangeset for help on using the changeset viewer.