Making WordPress.org

Changeset 8546


Ignore:
Timestamp:
03/27/2019 09:45:09 PM (6 years ago)
Author:
tellyworth
Message:

Plugin dir: add block section to the list in template.

File:
1 edited

Legend:

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

    r8192 r8546  
    359359            'description',
    360360            'screenshots',
     361            'blocks',
    361362            'stats',
    362363            'support',
     
    367368            unset( $default_sections[ array_search( 'screenshots', $default_sections ) ] );
    368369        }
     370        if ( ! get_post_meta( $plugin->ID, 'all_blocks' ) ) {
     371            unset( $default_sections[ array_search( 'blocks', $default_sections ) ] );
     372        }
    369373
    370374        $raw_sections = get_post_meta( $plugin->ID, 'sections', true ) ?: array();
     
    425429                case 'other_notes':
    426430                    $title = _x( 'Other Notes', 'plugin tab title', 'wporg-plugins' );
     431                    $url   = trailingslashit( $permalink ) . '/' . $section_slug . '/';
     432                    break;
     433
     434                case 'blocks':
     435                    $title = _x( 'Blocks', 'plugin tab title', 'wporg-plugins' );
    427436                    $url   = trailingslashit( $permalink ) . '/' . $section_slug . '/';
    428437                    break;
Note: See TracChangeset for help on using the changeset viewer.