~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-includes/customize/class-wp-customize-nav-menu-item-setting.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        /**
133
133
         * Status for calling the update method, used in customize_save_response filter.
134
134
         *
 
135
         * See {@see 'customize_save_response'}.
 
136
         *
135
137
         * When status is inserted, the placeholder post ID is stored in $previous_post_id.
136
138
         * When status is error, the error is stored in $update_error.
137
139
         *
404
406
        }
405
407
 
406
408
        /**
407
 
         * Filter the wp_get_nav_menu_items() result to supply the previewed menu items.
 
409
         * Filters the wp_get_nav_menu_items() result to supply the previewed menu items.
408
410
         *
409
411
         * @since 4.3.0
410
412
         * @access public
570
572
                /** This filter is documented in wp-includes/nav-menu.php */
571
573
                $post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
572
574
 
 
575
                /** This filter is documented in wp-includes/nav-menu.php */
 
576
                $post = apply_filters( 'wp_setup_nav_menu_item', $post );
 
577
 
573
578
                return $post;
574
579
        }
575
580
 
655
660
        }
656
661
 
657
662
        /**
658
 
         * Create/update the nav_menu_item post for this setting.
 
663
         * Creates/updates the nav_menu_item post for this setting.
659
664
         *
660
665
         * Any created menu items will have their assigned post IDs exported to the client
661
 
         * via the customize_save_response filter. Likewise, any errors will be exported
662
 
         * to the client via the customize_save_response() filter.
 
666
         * via the {@see 'customize_save_response'} filter. Likewise, any errors will be
 
667
         * exported to the client via the customize_save_response() filter.
663
668
         *
664
669
         * To delete a menu, the client can send false as the value.
665
670
         *