Make WordPress Core


Ignore:
Timestamp:
07/13/2015 09:00:29 PM (9 years ago)
Author:
DrewAPicture
Message:

Fix syntax and add missing @access tags to a variety of methods and properties in WP_Customize_Nav_Menu_Item_Setting added in 4.3.

See [32806]. See #32891.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r33071 r33221  
    640640 * @since 4.3.0
    641641 *
    642  * @see wp_get_nav_menu_items()
    643642 * @see WP_Customize_Setting
    644643 */
     
    655654     *
    656655     * @since 4.3.0
    657      *
     656     * @access public
    658657     * @var string
    659658     */
     
    664663     *
    665664     * @since 4.3.0
     665     * @access public
     666     * @var array
    666667     *
    667668     * @see wp_setup_nav_menu_item()
    668      * @var array
    669669     */
    670670    public $default = array(
     
    692692     *
    693693     * @since 4.3.0
    694      *
     694     * @access public
    695695     * @var string
    696696     */
     
    705705     *
    706706     * @since 4.3.0
    707      *
     707     * @access public
    708708     * @var int
    709709     */
     
    719719     *
    720720     * @since 4.3.0
     721     * @access public
     722     * @var int
    721723     *
    722724     * @see WP_Customize_Nav_Menu_Item_Setting::update()
    723725     * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
    724      *
    725      * @var int
    726726     */
    727727    public $previous_post_id;
     
    732732     *
    733733     * @since 4.3.0
    734      *
     734     * @access public
    735735     * @var int
    736736     */
     
    741741     *
    742742     * @since 4.3.0
    743      *
     743     * @access protected
    744744     * @var bool
    745745     */
     
    750750     *
    751751     * @since 4.3.0
    752      *
     752     * @access protected
    753753     * @var bool
    754754     */
     
    762762     *
    763763     * @since 4.3.0
     764     * @access public
     765     * @var string updated|inserted|deleted|error
    764766     *
    765767     * @see WP_Customize_Nav_Menu_Item_Setting::update()
    766768     * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
    767      *
    768      * @var string updated|inserted|deleted|error
    769769     */
    770770    public $update_status;
     
    774774     *
    775775     * @since 4.3.0
     776     * @access public
     777     * @var WP_Error
    776778     *
    777779     * @see WP_Customize_Nav_Menu_Item_Setting::update()
    778780     * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
    779      *
    780      * @var WP_Error
    781781     */
    782782    public $update_error;
     
    788788     *
    789789     * @since 4.3.0
    790      *
    791      * @param WP_Customize_Manager $manager Manager instance.
     790     * @access public
     791     *
     792     * @param WP_Customize_Manager $manager Bootstrap Customizer instance.
    792793     * @param string               $id      An specific ID of the setting. Can be a
    793794     *                                      theme mod or option name.
    794795     * @param array                $args    Optional. Setting arguments.
     796     *
    795797     * @throws Exception If $id is not valid for this setting type.
    796798     */
     
    816818     *
    817819     * @since 4.3.0
     820     * @access public
    818821     *
    819822     * @see wp_setup_nav_menu_item()
    820823     *
    821      * @return array
     824     * @return array Instance data.
    822825     */
    823826    public function value() {
     
    890893     *
    891894     * @since 4.3.0
     895     * @access public
    892896     *
    893897     * @see WP_Customize_Manager::post_value()
     
    917921     *
    918922     * @since 4.3.0
     923     * @access public
    919924     *
    920925     * @see wp_get_nav_menu_items()
     
    988993     *
    989994     * @since 4.3.0
     995     * @access public
     996     * @static
    990997     *
    991998     * @see wp_get_nav_menu_items()
     
    10221029     *
    10231030     * @since 4.3.0
    1024      *
    1025      * @return WP_Post With {@see wp_setup_nav_menu_item()} applied.
     1031     * @access public
     1032     *
     1033     * @return WP_Post With wp_setup_nav_menu_item() applied.
    10261034     */
    10271035    public function value_as_wp_post_nav_menu_item() {
     
    10561064     *
    10571065     * @since 4.3.0
     1066     * @access public
    10581067     *
    10591068     * @param array $menu_item_value The value to sanitize.
    1060      * @return array|false|null Null if an input isn't valid. False if it is marked for deletion. Otherwise the sanitized value.
     1069     * @return array|false|null Null if an input isn't valid. False if it is marked for deletion.
     1070     *                          Otherwise the sanitized value.
    10611071     */
    10621072    public function sanitize( $menu_item_value ) {
     
    11331143     *
    11341144     * @since 4.3.0
     1145     * @access protected
    11351146     *
    11361147     * @see wp_update_nav_menu_item()
    11371148     *
    1138      * @param array|false $value The menu item array to update. If false, then the menu item will be deleted entirely.
    1139      *                           See {@see WP_Customize_Nav_Menu_Item_Setting::$default} for what the value should
    1140      *                           consist of.
    1141      * @return void
     1149     * @param array|false $value The menu item array to update. If false, then the menu item will be deleted
     1150     *                           entirely. See WP_Customize_Nav_Menu_Item_Setting::$default for what the value
     1151     *                           should consist of.
     1152     * @return null|void
    11421153     */
    11431154    protected function update( $value ) {
     
    12641275     *
    12651276     * @since 4.3.0
     1277     * @access public
    12661278     *
    12671279     * @see WP_Customize_Nav_Menu_Item_Setting::update()
    12681280     *
    12691281     * @param array $data Additional information passed back to the 'saved' event on `wp.customize`.
    1270      * @return array
     1282     * @return array Save response data.
    12711283     */
    12721284    public function amend_customize_save_response( $data ) {
     
    12811293            'status'           => $this->update_status,
    12821294        );
    1283 
    12841295        return $data;
    12851296    }
     
    13091320     *
    13101321     * @since 4.3.0
    1311      *
     1322     * @access public
    13121323     * @var string
    13131324     */
     
    13181329     *
    13191330     * @since 4.3.0
     1331     * @access public
     1332     * @var array
    13201333     *
    13211334     * @see wp_get_nav_menu_object()
    1322      *
    1323      * @var array
    13241335     */
    13251336    public $default = array(
     
    13341345     *
    13351346     * @since 4.3.0
    1336      *
     1347     * @access public
    13371348     * @var string
    13381349     */
     
    13451356     *
    13461357     * @since 4.3.0
    1347      *
     1358     * @access public
    13481359     * @var int
    13491360     */
     
    13591370     *
    13601371     * @since 4.3.0
     1372     * @access public
     1373     * @var int
    13611374     *
    13621375     * @see WP_Customize_Nav_Menu_Setting::update()
    13631376     * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
    1364      *
    1365      * @var int
    13661377     */
    13671378    public $previous_term_id;
     
    13711382     *
    13721383     * @since 4.3.0
    1373      *
     1384     * @access protected
    13741385     * @var bool
    13751386     */
     
    13801391     *
    13811392     * @since 4.3.0
    1382      *
     1393     * @access protected
    13831394     * @var bool
    13841395     */
     
    13921403     *
    13931404     * @since 4.3.0
     1405     * @access public
     1406     * @var string updated|inserted|deleted|error
    13941407     *
    13951408     * @see WP_Customize_Nav_Menu_Setting::update()
    13961409     * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
    1397      *
    1398      * @var string updated|inserted|deleted|error
    13991410     */
    14001411    public $update_status;
     
    14041415     *
    14051416     * @since 4.3.0
     1417     * @access public
     1418     * @var WP_Error
    14061419     *
    14071420     * @see WP_Customize_Nav_Menu_Setting::update()
    14081421     * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
    1409      *
    1410      * @var WP_Error
    14111422     */
    14121423    public $update_error;
     
    14181429     *
    14191430     * @since 4.3.0
    1420      *
    1421      * @param WP_Customize_Manager $manager Manager instance.
     1431     * @access public
     1432     *
     1433     * @param WP_Customize_Manager $manager Bootstrap Customizer instance.
    14221434     * @param string               $id      An specific ID of the setting. Can be a
    14231435     *                                      theme mod or option name.
    14241436     * @param array                $args    Optional. Setting arguments.
     1437     *
    14251438     * @throws Exception If $id is not valid for this setting type.
    14261439     */
     
    14431456     *
    14441457     * @since 4.3.0
     1458     * @access public
    14451459     *
    14461460     * @see wp_get_nav_menu_object()
    14471461     *
    1448      * @return array
     1462     * @return array Instance data.
    14491463     */
    14501464    public function value() {
     
    14881502     *
    14891503     * @since 4.3.0
     1504     * @access public
    14901505     *
    14911506     * @see WP_Customize_Manager::post_value()
     
    15111526     *
    15121527     * @since 4.3.0
     1528     * @access public
    15131529     *
    15141530     * @see wp_get_nav_menu_object()
     
    15591575     *
    15601576     * @since 4.3.0
     1577     * @access public
    15611578     *
    15621579     * @param array $nav_menu_options Nav menu options including auto_add.
    1563      * @return array
     1580     * @return array (Kaybe) modified nav menu options.
    15641581     */
    15651582    public function filter_nav_menu_options( $nav_menu_options ) {
     
    15851602     *
    15861603     * @since 4.3.0
     1604     * @access public
    15871605     *
    15881606     * @param array $value The value to sanitize.
    1589      * @return array|false|null Null if an input isn't valid. False if it is marked for deletion. Otherwise the sanitized value.
     1607     * @return array|false|null Null if an input isn't valid. False if it is marked for deletion.
     1608     *                          Otherwise the sanitized value.
    15901609     */
    15911610    public function sanitize( $value ) {
     
    16321651     *
    16331652     * @since 4.3.0
     1653     * @access public
    16341654     *
    16351655     * @see wp_update_nav_menu_object()
     
    16441664     *     @type bool   $auto_add    Whether pages will auto_add to this menu. Default false.
    16451665     * }
    1646      * @return void
     1666     * @return null|void
    16471667     */
    16481668    protected function update( $value ) {
     
    17311751
    17321752    /**
    1733      * Update a nav_menu_options array.
    1734      *
    1735      * @since 4.3.0
     1753     * Updates a nav_menu_options array.
     1754     *
     1755     * @since 4.3.0
     1756     * @access public
    17361757     *
    17371758     * @see WP_Customize_Nav_Menu_Setting::filter_nav_menu_options()
     
    17411762     * @param int   $menu_id          The term ID for the given menu.
    17421763     * @param bool  $auto_add         Whether to auto-add or not.
    1743      * @return array
     1764     * @return array (Maybe) modified nav_menu_otions array.
    17441765     */
    17451766    protected function filter_nav_menu_options_value( $nav_menu_options, $menu_id, $auto_add ) {
     
    17631784     *
    17641785     * @since 4.3.0
     1786     * @access public
    17651787     *
    17661788     * @see WP_Customize_Nav_Menu_Setting::update()
    17671789     *
    17681790     * @param array $data Additional information passed back to the 'saved' event on `wp.customize`.
    1769      * @return array
     1791     * @return array Export data.
    17701792     */
    17711793    public function amend_customize_save_response( $data ) {
Note: See TracChangeset for help on using the changeset viewer.