Make WordPress Core

Ticket #38370: 38370.diff

File 38370.diff, 2.7 KB (added by celloexpressions, 10 years ago)

Don't add available theme sections on multisite, as installation is not allowed in the customizer here.

  • src/wp-includes/class-wp-customize-manager.php

     
    30263026                        'priority'    => 0,
    30273027                ) ) );
    30283028
    3029                 $this->add_section( new WP_Customize_Themes_Section( $this, 'search_themes', array(
    3030                         'title'       => __( 'Search themes…' ),
    3031                         'text_before' => __( 'Browse all WordPress.org themes' ),
    3032                         'action'      => 'search',
    3033                         'capability'  => 'install_themes',
    3034                         'panel'       => 'themes',
    3035                         'priority'    => 5,
    3036                 ) ) );
     3029                if ( ! is_multisite() ) {
     3030                        $this->add_section( new WP_Customize_Themes_Section( $this, 'search_themes', array(
     3031                                'title'       => __( 'Search themes…' ),
     3032                                'text_before' => __( 'Browse all WordPress.org themes' ),
     3033                                'action'      => 'search',
     3034                                'capability'  => 'install_themes',
     3035                                'panel'       => 'themes',
     3036                                'priority'    => 5,
     3037                        ) ) );
    30373038
    3038                 $this->add_section( new WP_Customize_Themes_Section( $this, 'featured_themes', array(
    3039                         'title'      => __( 'Featured' ),
    3040                         'action'     => 'featured',
    3041                         'capability' => 'install_themes',
    3042                         'panel'      => 'themes',
    3043                         'priority'   => 10,
    3044                 ) ) );
     3039                        $this->add_section( new WP_Customize_Themes_Section( $this, 'featured_themes', array(
     3040                                'title'      => __( 'Featured' ),
     3041                                'action'     => 'featured',
     3042                                'capability' => 'install_themes',
     3043                                'panel'      => 'themes',
     3044                                'priority'   => 10,
     3045                        ) ) );
    30453046
    3046                 $this->add_section( new WP_Customize_Themes_Section( $this, 'popular_themes', array(
    3047                         'title'      => __( 'Popular' ),
    3048                         'action'     => 'popular',
    3049                         'capability' => 'install_themes',
    3050                         'panel'      => 'themes',
    3051                         'priority'   => 15,
    3052                 ) ) );
     3047                        $this->add_section( new WP_Customize_Themes_Section( $this, 'popular_themes', array(
     3048                                'title'      => __( 'Popular' ),
     3049                                'action'     => 'popular',
     3050                                'capability' => 'install_themes',
     3051                                'panel'      => 'themes',
     3052                                'priority'   => 15,
     3053                        ) ) );
    30533054
    3054                 $this->add_section( new WP_Customize_Themes_Section( $this, 'latest_themes', array(
    3055                         'title'      => __( 'Latest' ),
    3056                         'action'     => 'latest',
    3057                         'capability' => 'install_themes',
    3058                         'panel'      => 'themes',
    3059                         'priority'   => 20,
    3060                 ) ) );
     3055                        $this->add_section( new WP_Customize_Themes_Section( $this, 'latest_themes', array(
     3056                                'title'      => __( 'Latest' ),
     3057                                'action'     => 'latest',
     3058                                'capability' => 'install_themes',
     3059                                'panel'      => 'themes',
     3060                                'priority'   => 20,
     3061                        ) ) );
     3062                }
    30613063
    30623064                $this->add_section( new WP_Customize_Themes_Section( $this, 'feature_filter_themes', array(
    30633065                        'title'      => __( 'Feature Filter' ),