WordPress 4.5
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-nav-menus-panel.php
index e3be24b0033eb313aa6707202efec0477cc2d84e..adb19ee390a40b8b1bad3a212e8970c298dbcadd 100644 (file)
@@ -34,8 +34,9 @@ class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel {
         * @access public
         */
        public function render_screen_options() {
-               // Essentially adds the screen options.
-               add_filter( 'manage_nav-menus_columns', array( $this, 'wp_nav_menu_manage_columns' ) );
+               // Adds the screen options.
+               require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
+               add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' );
 
                // Display screen options.
                $screen = WP_Screen::get( 'nav-menus.php' );
@@ -48,20 +49,12 @@ class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel {
         * Link title attribute added as it's a relatively advanced concept for new users.
         *
         * @since 4.3.0
-        * @access public
-        *
-        * @return array The advanced menu properties.
+        * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns().
         */
        public function wp_nav_menu_manage_columns() {
-               return array(
-                       '_title'      => __( 'Show advanced menu properties' ),
-                       'cb'          => '<input type="checkbox" />',
-                       'link-target' => __( 'Link Target' ),
-                       'attr-title'  => __( 'Title Attribute' ),
-                       'css-classes' => __( 'CSS Classes' ),
-                       'xfn'         => __( 'Link Relationship (XFN)' ),
-                       'description' => __( 'Description' ),
-               );
+               _deprecated_function( __METHOD__, '4.5.0', 'wp_nav_menu_manage_columns' );
+               require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
+               return wp_nav_menu_manage_columns();
        }
 
        /**
@@ -84,7 +77,7 @@ class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel {
                        <div class="accordion-section-title">
                                <span class="preview-notice">
                                        <?php
-                                       /* Translators: %s is the site/panel title in the Customizer. */
+                                       /* translators: %s: the site/panel title in the Customizer */
                                        printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
                                        ?>
                                </span>