Changeset 6118 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 11/14/2017 05:01:46 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r5867 r6118 45 45 add_filter( 'the_content', array( $this, 'filter_rel_nofollow' ) ); 46 46 add_action( 'wp_head', array( Template::class, 'json_ld_schema' ), 1 ); 47 add_action( 'wp_head', array( Template::class, ' meta_description' ), 1 );47 add_action( 'wp_head', array( Template::class, 'output_meta' ), 1 ); 48 48 add_action( 'wp_head', array( Template::class, 'hreflang_link_attributes' ), 2 ); 49 49 … … 318 318 register_post_status( 'disabled', array( 319 319 'label' => _x( 'Disabled', 'plugin status', 'wporg-plugins' ), 320 'public' => false,320 'public' => true, 321 321 'show_in_admin_status_list' => current_user_can( 'plugin_disable' ), 322 322 'label_count' => _n_noop( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', 'wporg-plugins' ), … … 330 330 register_post_status( 'closed', array( 331 331 'label' => _x( 'Closed', 'plugin status', 'wporg-plugins' ), 332 'public' => false,332 'public' => true, 333 333 'show_in_admin_status_list' => current_user_can( 'plugin_close' ), 334 334 'label_count' => _n_noop( 'Closed <span class="count">(%s)</span>', 'Closed <span class="count">(%s)</span>', 'wporg-plugins' ), … … 789 789 790 790 // For singular requests, or self-author profile requests allow restricted post_status items to show on the front-end. 791 if ( $wp_query->is_main_query() && ( $viewing_own_author_archive || is_user_logged_in() && ! empty( $wp_query->query_vars['name'] ) ) ) {791 if ( $wp_query->is_main_query() && ( $viewing_own_author_archive || is_user_logged_in() && ! empty( $wp_query->query_vars['name'] ) ) ) { 792 792 793 793 $wp_query->query_vars['post_status'] = array( 'approved', 'publish', 'closed', 'disabled' ); … … 817 817 return $posts; 818 818 }, 10, 2 ); 819 } 820 821 // Allow anyone to view a closed plugin directly from its page. It won't show in search results or lists. 822 if ( $wp_query->is_main_query() && ! empty( $wp_query->query_vars['name'] ) ) { 823 $wp_query->query_vars['post_status'] = (array) $wp_query->query_vars['post_status']; 824 $wp_query->query_vars['post_status'][] = 'closed'; 825 $wp_query->query_vars['post_status'][] = 'disabled'; 826 $wp_query->query_vars['post_status'] = array_unique( $wp_query->query_vars['post_status'] ); 819 827 } 820 828
Note: See TracChangeset
for help on using the changeset viewer.