Changeset 33221 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 07/13/2015 09:00:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r33071 r33221 640 640 * @since 4.3.0 641 641 * 642 * @see wp_get_nav_menu_items()643 642 * @see WP_Customize_Setting 644 643 */ … … 655 654 * 656 655 * @since 4.3.0 657 * 656 * @access public 658 657 * @var string 659 658 */ … … 664 663 * 665 664 * @since 4.3.0 665 * @access public 666 * @var array 666 667 * 667 668 * @see wp_setup_nav_menu_item() 668 * @var array669 669 */ 670 670 public $default = array( … … 692 692 * 693 693 * @since 4.3.0 694 * 694 * @access public 695 695 * @var string 696 696 */ … … 705 705 * 706 706 * @since 4.3.0 707 * 707 * @access public 708 708 * @var int 709 709 */ … … 719 719 * 720 720 * @since 4.3.0 721 * @access public 722 * @var int 721 723 * 722 724 * @see WP_Customize_Nav_Menu_Item_Setting::update() 723 725 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() 724 *725 * @var int726 726 */ 727 727 public $previous_post_id; … … 732 732 * 733 733 * @since 4.3.0 734 * 734 * @access public 735 735 * @var int 736 736 */ … … 741 741 * 742 742 * @since 4.3.0 743 * 743 * @access protected 744 744 * @var bool 745 745 */ … … 750 750 * 751 751 * @since 4.3.0 752 * 752 * @access protected 753 753 * @var bool 754 754 */ … … 762 762 * 763 763 * @since 4.3.0 764 * @access public 765 * @var string updated|inserted|deleted|error 764 766 * 765 767 * @see WP_Customize_Nav_Menu_Item_Setting::update() 766 768 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() 767 *768 * @var string updated|inserted|deleted|error769 769 */ 770 770 public $update_status; … … 774 774 * 775 775 * @since 4.3.0 776 * @access public 777 * @var WP_Error 776 778 * 777 779 * @see WP_Customize_Nav_Menu_Item_Setting::update() 778 780 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() 779 *780 * @var WP_Error781 781 */ 782 782 public $update_error; … … 788 788 * 789 789 * @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. 792 793 * @param string $id An specific ID of the setting. Can be a 793 794 * theme mod or option name. 794 795 * @param array $args Optional. Setting arguments. 796 * 795 797 * @throws Exception If $id is not valid for this setting type. 796 798 */ … … 816 818 * 817 819 * @since 4.3.0 820 * @access public 818 821 * 819 822 * @see wp_setup_nav_menu_item() 820 823 * 821 * @return array 824 * @return array Instance data. 822 825 */ 823 826 public function value() { … … 890 893 * 891 894 * @since 4.3.0 895 * @access public 892 896 * 893 897 * @see WP_Customize_Manager::post_value() … … 917 921 * 918 922 * @since 4.3.0 923 * @access public 919 924 * 920 925 * @see wp_get_nav_menu_items() … … 988 993 * 989 994 * @since 4.3.0 995 * @access public 996 * @static 990 997 * 991 998 * @see wp_get_nav_menu_items() … … 1022 1029 * 1023 1030 * @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. 1026 1034 */ 1027 1035 public function value_as_wp_post_nav_menu_item() { … … 1056 1064 * 1057 1065 * @since 4.3.0 1066 * @access public 1058 1067 * 1059 1068 * @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. 1061 1071 */ 1062 1072 public function sanitize( $menu_item_value ) { … … 1133 1143 * 1134 1144 * @since 4.3.0 1145 * @access protected 1135 1146 * 1136 1147 * @see wp_update_nav_menu_item() 1137 1148 * 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 should1140 * consist of.1141 * @return void1149 * @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 1142 1153 */ 1143 1154 protected function update( $value ) { … … 1264 1275 * 1265 1276 * @since 4.3.0 1277 * @access public 1266 1278 * 1267 1279 * @see WP_Customize_Nav_Menu_Item_Setting::update() 1268 1280 * 1269 1281 * @param array $data Additional information passed back to the 'saved' event on `wp.customize`. 1270 * @return array 1282 * @return array Save response data. 1271 1283 */ 1272 1284 public function amend_customize_save_response( $data ) { … … 1281 1293 'status' => $this->update_status, 1282 1294 ); 1283 1284 1295 return $data; 1285 1296 } … … 1309 1320 * 1310 1321 * @since 4.3.0 1311 * 1322 * @access public 1312 1323 * @var string 1313 1324 */ … … 1318 1329 * 1319 1330 * @since 4.3.0 1331 * @access public 1332 * @var array 1320 1333 * 1321 1334 * @see wp_get_nav_menu_object() 1322 *1323 * @var array1324 1335 */ 1325 1336 public $default = array( … … 1334 1345 * 1335 1346 * @since 4.3.0 1336 * 1347 * @access public 1337 1348 * @var string 1338 1349 */ … … 1345 1356 * 1346 1357 * @since 4.3.0 1347 * 1358 * @access public 1348 1359 * @var int 1349 1360 */ … … 1359 1370 * 1360 1371 * @since 4.3.0 1372 * @access public 1373 * @var int 1361 1374 * 1362 1375 * @see WP_Customize_Nav_Menu_Setting::update() 1363 1376 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() 1364 *1365 * @var int1366 1377 */ 1367 1378 public $previous_term_id; … … 1371 1382 * 1372 1383 * @since 4.3.0 1373 * 1384 * @access protected 1374 1385 * @var bool 1375 1386 */ … … 1380 1391 * 1381 1392 * @since 4.3.0 1382 * 1393 * @access protected 1383 1394 * @var bool 1384 1395 */ … … 1392 1403 * 1393 1404 * @since 4.3.0 1405 * @access public 1406 * @var string updated|inserted|deleted|error 1394 1407 * 1395 1408 * @see WP_Customize_Nav_Menu_Setting::update() 1396 1409 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() 1397 *1398 * @var string updated|inserted|deleted|error1399 1410 */ 1400 1411 public $update_status; … … 1404 1415 * 1405 1416 * @since 4.3.0 1417 * @access public 1418 * @var WP_Error 1406 1419 * 1407 1420 * @see WP_Customize_Nav_Menu_Setting::update() 1408 1421 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() 1409 *1410 * @var WP_Error1411 1422 */ 1412 1423 public $update_error; … … 1418 1429 * 1419 1430 * @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. 1422 1434 * @param string $id An specific ID of the setting. Can be a 1423 1435 * theme mod or option name. 1424 1436 * @param array $args Optional. Setting arguments. 1437 * 1425 1438 * @throws Exception If $id is not valid for this setting type. 1426 1439 */ … … 1443 1456 * 1444 1457 * @since 4.3.0 1458 * @access public 1445 1459 * 1446 1460 * @see wp_get_nav_menu_object() 1447 1461 * 1448 * @return array 1462 * @return array Instance data. 1449 1463 */ 1450 1464 public function value() { … … 1488 1502 * 1489 1503 * @since 4.3.0 1504 * @access public 1490 1505 * 1491 1506 * @see WP_Customize_Manager::post_value() … … 1511 1526 * 1512 1527 * @since 4.3.0 1528 * @access public 1513 1529 * 1514 1530 * @see wp_get_nav_menu_object() … … 1559 1575 * 1560 1576 * @since 4.3.0 1577 * @access public 1561 1578 * 1562 1579 * @param array $nav_menu_options Nav menu options including auto_add. 1563 * @return array 1580 * @return array (Kaybe) modified nav menu options. 1564 1581 */ 1565 1582 public function filter_nav_menu_options( $nav_menu_options ) { … … 1585 1602 * 1586 1603 * @since 4.3.0 1604 * @access public 1587 1605 * 1588 1606 * @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. 1590 1609 */ 1591 1610 public function sanitize( $value ) { … … 1632 1651 * 1633 1652 * @since 4.3.0 1653 * @access public 1634 1654 * 1635 1655 * @see wp_update_nav_menu_object() … … 1644 1664 * @type bool $auto_add Whether pages will auto_add to this menu. Default false. 1645 1665 * } 1646 * @return void1666 * @return null|void 1647 1667 */ 1648 1668 protected function update( $value ) { … … 1731 1751 1732 1752 /** 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 1736 1757 * 1737 1758 * @see WP_Customize_Nav_Menu_Setting::filter_nav_menu_options() … … 1741 1762 * @param int $menu_id The term ID for the given menu. 1742 1763 * @param bool $auto_add Whether to auto-add or not. 1743 * @return array 1764 * @return array (Maybe) modified nav_menu_otions array. 1744 1765 */ 1745 1766 protected function filter_nav_menu_options_value( $nav_menu_options, $menu_id, $auto_add ) { … … 1763 1784 * 1764 1785 * @since 4.3.0 1786 * @access public 1765 1787 * 1766 1788 * @see WP_Customize_Nav_Menu_Setting::update() 1767 1789 * 1768 1790 * @param array $data Additional information passed back to the 'saved' event on `wp.customize`. 1769 * @return array 1791 * @return array Export data. 1770 1792 */ 1771 1793 public function amend_customize_save_response( $data ) {
Note: See TracChangeset
for help on using the changeset viewer.