Changeset 38121
- Timestamp:
- 07/20/2016 04:56:21 PM (8 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r37985 r38121 353 353 * @type bool $hide_if_empty True to skip generating markup if no categories are found. 354 354 * Default false (create select element even if no categories are found). 355 * @type bool $required Whether the <select>element should have the HTML5 'required' attribute.355 * @type bool $required Whether the `<select>` element should have the HTML5 'required' attribute. 356 356 * Default false. 357 357 * } -
trunk/src/wp-includes/class-wp-comment-query.php
r38117 r38121 906 906 907 907 /** 908 * Populates found_comments and max_num_pages properties for the current query if the limit clause was used. 908 * Populates found_comments and max_num_pages properties for the current 909 * query if the limit clause was used. 909 910 * 910 911 * @since 4.6.0 … … 922 923 * @since 4.4.0 923 924 * 924 * @param string $found_comments_query SQL query. Default 'SELECT FOUND_ROWS()'.925 * @param WP_Comment_Query $comment_query The `WP_Comment_Query` instance.925 * @param string $found_comments_query SQL query. Default 'SELECT FOUND_ROWS()'. 926 * @param WP_Comment_Query $comment_query The `WP_Comment_Query` instance. 926 927 */ 927 928 $found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this ); -
trunk/src/wp-includes/class-wp-customize-manager.php
r38028 r38121 652 652 653 653 /** 654 * Return the sanitized value for a given setting from the request's POST data. 655 * 656 * @since 3.4.0 657 * @since 4.1.1 Introduced `$default` parameter. 658 * @since 4.6.0 Return `$default` when setting post value is invalid. 654 * Returns the sanitized value for a given setting from the request's POST data. 655 * 656 * @since 3.4.0 657 * @since 4.1.1 Introduced the `$default` parameter. 658 * @since 4.6.0 `$default` is now returned early when the setting post value is invalid. 659 * @access public 660 * 659 661 * @see WP_REST_Server::dispatch() 660 662 * @see WP_Rest_Request::sanitize_params() … … 988 990 989 991 /** 990 * Validate setting values.992 * Validates setting values. 991 993 * 992 994 * Sanitization is applied to the values before being passed for validation. … … 996 998 * @since 4.6.0 997 999 * @access public 1000 * 998 1001 * @see WP_REST_Request::has_valid_params() 999 1002 * @see WP_Customize_Setting::validate() … … 1027 1030 1028 1031 /** 1029 * Prepare setting validity for exporting to the client (JS).1032 * Prepares setting validity for exporting to the client (JS). 1030 1033 * 1031 1034 * Converts `WP_Error` instance into array suitable for passing into the … … 1036 1039 * 1037 1040 * @param true|WP_Error $validity Setting validity. 1038 * @return true|array If `$validity` was `WP_Error` then array mapping the error1039 * codes to their respective `message` and `data` to pass1040 * into the`wp.customize.Notification` JS model.1041 * @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped 1042 * to their respective `message` and `data` to pass into the 1043 * `wp.customize.Notification` JS model. 1041 1044 */ 1042 1045 public function prepare_setting_validity_for_js( $validity ) { … … 1081 1084 * Fires before save validation happens. 1082 1085 * 1083 * Plugins can add just-in-time `customize_validate_{$setting_id}`filters1086 * Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters 1084 1087 * at this point to catch any settings registered after `customize_register`. 1088 * The dynamic portion of the hook name, `$this->ID` referrs to the setting ID. 1085 1089 * 1086 1090 * @since 4.6.0 -
trunk/src/wp-includes/class-wp-customize-setting.php
r37982 r38121 465 465 466 466 /** 467 * Check user capabilities and theme supports, and then save467 * Checks user capabilities and theme supports, and then saves 468 468 * the value of the setting. 469 469 * 470 470 * @since 3.4.0 471 471 * @since 4.6.0 Return the result of updating the value. 472 * @access public 472 473 * 473 474 * @return false|void False if cap check fails or value isn't set or is invalid. … … 529 530 530 531 /** 531 * Validate an input.532 * Validates an input. 532 533 * 533 534 * @since 4.6.0 534 535 * @access public 536 * 535 537 * @see WP_REST_Request::has_valid_params() 536 538 * 537 539 * @param mixed $value Value to validate. 538 * @return true|WP_Error 540 * @return true|WP_Error True if the input was validated, otherwise WP_Error. 539 541 */ 540 542 public function validate( $value ) { … … 549 551 550 552 /** 551 * Validate a Customize setting value.553 * Validates a Customize setting value. 552 554 * 553 555 * Plugins should amend the `$validity` object via its `WP_Error::add()` method. 556 * 557 * The dynamic portion of the hook name, `$this->ID`, refers to the setting ID. 554 558 * 555 559 * @since 4.6.0 … … 696 700 * Filters a Customize setting value not handled as a theme_mod or option. 697 701 * 698 * The dynamic portion of the hook name, `$ this->id_date['base']`, refers to699 * the base slug of the setting name .702 * The dynamic portion of the hook name, `$id_base`, refers to 703 * the base slug of the setting name, initialized from `$this->id_data['base']`. 700 704 * 701 705 * For settings handled as theme_mods or options, see those corresponding … … 703 707 * 704 708 * @since 3.4.0 705 * @since 4.6.0 Added the `$this` setting instance as the second param .709 * @since 4.6.0 Added the `$this` setting instance as the second parameter. 706 710 * 707 711 * @param mixed $default The setting default value. Default empty. … … 751 755 752 756 /** 753 * Getthe data to export to the client via JSON.757 * Retrieves the data to export to the client via JSON. 754 758 * 755 759 * @since 4.6.0 760 * @access public 756 761 * 757 762 * @return array Array of parameters passed to JavaScript. -
trunk/src/wp-includes/class-wp-site.php
r37923 r38121 302 302 303 303 /** 304 * Retrieve the details for this site.304 * Retrieves the details for this site. 305 305 * 306 306 * This method is used internally to lazy-load the extended properties of a site. -
trunk/src/wp-includes/class-wp-theme.php
r37946 r38121 1332 1332 1333 1333 /** 1334 * Enable a theme for all sites on the current network.1334 * Enables a theme for all sites on the current network. 1335 1335 * 1336 1336 * @since 4.6.0 1337 * 1337 * @access public 1338 1338 * @static 1339 * @access public1340 1339 * 1341 1340 * @param string|array $stylesheets Stylesheet name or array of stylesheet names. … … 1359 1358 1360 1359 /** 1361 * Disable a theme for all sites on the current network.1360 * Disables a theme for all sites on the current network. 1362 1361 * 1363 1362 * @since 4.6.0 1364 * 1363 * @access public 1365 1364 * @static 1366 * @access public1367 1365 * 1368 1366 * @param string|array $stylesheets Stylesheet name or array of stylesheet names. -
trunk/src/wp-includes/class-wp-widget-factory.php
r37333 r38121 54 54 * @since 4.6.0 55 55 * @access private 56 * @var array 57 * 56 58 * @see WP_Widget_Factory::hash_object() 57 *58 * @var array59 59 */ 60 60 private $hashed_class_counts = array(); 61 61 62 62 /** 63 * Hash an object, doing fallback of `spl_object_hash()` if not available.63 * Hashes an object, doing fallback of `spl_object_hash()` if not available. 64 64 * 65 65 * This can be eliminated in favor of straight spl_object_hash() when 5.3 … … 94 94 * 95 95 * @since 2.8.0 96 * @since 4.6.0 The `$widget` param can also be an instance object of `WP_Widget` instead of just a `WP_Widget` subclass name. 96 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object 97 * instead of simply a `WP_Widget` subclass name. 97 98 * @access public 98 99 * … … 111 112 * 112 113 * @since 2.8.0 113 * @since 4.6.0 The `$widget` param can also be an instance object of `WP_Widget` instead of just a `WP_Widget` subclass name. 114 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object 115 * instead of simply a `WP_Widget` subclass name. 114 116 * @access public 115 117 * -
trunk/src/wp-includes/comment-template.php
r38018 r38121 139 139 * 140 140 * @since 0.71 141 * @since 4.6.0 The `$comment` parameter was added.141 * @since 4.6.0 Added the `$comment` parameter. 142 142 * 143 143 * @param string $linktext Optional. Text to display instead of the comment author's email address. … … 163 163 * 164 164 * @since 2.7.0 165 * @since 4.6.0 The `$comment` parameter was added.165 * @since 4.6.0 Added the `$comment` parameter. 166 166 * 167 167 * @param string $linktext Optional. Text to display instead of the comment author's email address. … … 359 359 * 360 360 * @since 1.5.0 361 * @since 4.6.0 The `$comment` parameter was added.361 * @since 4.6.0 Added the `$comment` parameter. 362 362 * 363 363 * @param string $linktext Optional. The text to display instead of the comment … … 397 397 * 398 398 * @since 0.71 399 * @since 4.6.0 The `$comment` parameter was added.399 * @since 4.6.0 Added the `$comment` parameter. 400 400 * 401 401 * @param string $linktext Optional. Text to display instead of the comment author's -
trunk/src/wp-includes/comment.php
r38098 r38121 2036 2036 * 2037 2037 * @since 1.2.0 2038 * @since 4.6.0 The `$data` parameter was added.2038 * @since 4.6.0 Added the `$data` parameter. 2039 2039 * 2040 2040 * @param int $comment_ID The comment ID. -
trunk/src/wp-includes/compat.php
r37750 r38121 518 518 519 519 /** 520 * Register a function to be autoloaded.520 * Registers a function to be autoloaded. 521 521 * 522 522 * @since 4.6.0 523 523 * 524 524 * @param callable $autoload_function The function to register. 525 * @param boolean $throw Should the function throw an exception if the function isn't callable? 526 * @param boolean $prepend Should we prepend the function to the stack? 525 * @param bool $throw Optional. Whether the function should throw an exception 526 * if the function isn't callable. Default true. 527 * @param bool $prepend Whether the function should be prepended to the stack. 528 * Default false. 527 529 */ 528 530 function spl_autoload_register( $autoload_function, $throw = true, $prepend = false ) { … … 547 549 548 550 /** 549 * Unregister an autoloader function.551 * Unregisters an autoloader function. 550 552 * 551 553 * @since 4.6.0 552 554 * 553 555 * @param callable $function The function to unregister. 554 * @return bool eanTrue if the function was unregistered, false if it could not be.556 * @return bool True if the function was unregistered, false if it could not be. 555 557 */ 556 558 function spl_autoload_unregister( $function ) { … … 567 569 568 570 /** 569 * Getthe registered autoloader functions.571 * Retrieves the registered autoloader functions. 570 572 * 571 573 * @since 4.6.0 -
trunk/src/wp-includes/formatting.php
r38087 r38121 1492 1492 * 1493 1493 * @since 1.2.1 1494 * @since 4.6.0 Locale support was addedfor `de_CH`, `de_CH_informal`, and `ca`.1494 * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`. 1495 1495 * 1496 1496 * @param string $string Text that might have accent characters … … 4923 4923 4924 4924 /** 4925 * Print inline Emoji dection script4925 * Prints inline Emoji dection script 4926 4926 * 4927 4927 * @ignore … … 4929 4929 * @access private 4930 4930 * 4931 * @global string $wp_version 4931 * @global string $wp_version WordPress version string. 4932 4932 */ 4933 4933 function _print_emoji_detection_script() { -
trunk/src/wp-includes/functions.php
r38095 r38121 2439 2439 2440 2440 /** 2441 * Retrieve list of common file extensions and their types.2441 * Retrieves the list of common file extensions and their types. 2442 2442 * 2443 2443 * @since 4.6.0 … … 3119 3119 3120 3120 /** 3121 * Check that a JSONP callback is a valid JavaScript callback.3121 * Checks that a JSONP callback is a valid JavaScript callback. 3122 3122 * 3123 3123 * Only allows alphanumeric characters and the dot character in callback … … 3903 3903 * Marks a deprecated action or filter hook as deprecated and throws a notice. 3904 3904 * 3905 * Use the 'deprecated_hook_run' action to get the backtrace describing where the3906 * deprecated hook was called.3907 * 3908 * Default behavior is to trigger a user error if WP_DEBUGis true.3905 * Use the {@see 'deprecated_hook_run'} action to get the backtrace describing where 3906 * the deprecated hook was called. 3907 * 3908 * Default behavior is to trigger a user error if `WP_DEBUG` is true. 3909 3909 * 3910 3910 * This function is called by the do_action_deprecated() and apply_filters_deprecated() … … 3933 3933 3934 3934 /** 3935 * Filter whether to trigger deprecated hook errors.3935 * Filters whether to trigger deprecated hook errors. 3936 3936 * 3937 3937 * @since 4.6.0 … … 5365 5365 * @since 4.6.0 5366 5366 * 5367 * @param string $context Context in which the function is called. 5368 * Either 'admin', 'image' or an arbitrary other context. 5369 * Defaults to 'admin'. 5370 * If an arbitrary context is passed, the similarly arbitrary 5371 * "{$context}_memory_limit" filter will be invoked. 5367 * @param string $context Optional. Context in which the function is called. Accepts either 'admin', 5368 * 'image', or an arbitrary other context. If an arbitrary context is passed, 5369 * the similarly arbitrary {@see '{$context}_memory_limit'} filter will be 5370 * invoked. Default 'admin'. 5372 5371 * @return bool|int|string The limit that was set or false on failure. 5373 5372 */ … … 5394 5393 * Filters the maximum memory limit available for administration screens. 5395 5394 * 5396 * This only applies to administrators, who may require more memory for tasks like updates.5397 * Memory limits when processing images (uploaded or edited by users of any role) are5398 * handled separately.5395 * This only applies to administrators, who may require more memory for tasks 5396 * like updates. Memory limits when processing images (uploaded or edited by 5397 * users of any role) are handled separately. 5399 5398 * 5400 * The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available 5401 * when in the administration back end. The default is 256M (256 megabytes 5402 * of memory) or the original `memory_limit` php.ini value if this is higher. 5399 * The `WP_MAX_MEMORY_LIMIT` constant specifically defines the maximum memory 5400 * limit available when in the administration back end. The default is 256M 5401 * (256 megabytes of memory) or the original `memory_limit` php.ini value if 5402 * this is higher. 5403 5403 * 5404 5404 * @since 3.0.0 5405 * @since 4.6.0 The default takes the original `memory_limit` into account.5405 * @since 4.6.0 The default now takes the original `memory_limit` into account. 5406 5406 * 5407 * @param int|string $filtered_limit The maximum WordPress memory limit. 5408 * Accepts an integer (bytes), or a shorthand string 5409 * notation, such as '256M'. 5407 * @param int|string $filtered_limit The maximum WordPress memory limit. Accepts an integer 5408 * (bytes), or a shorthand string notation, such as '256M'. 5410 5409 */ 5411 5410 $filtered_limit = apply_filters( 'admin_memory_limit', $filtered_limit ); … … 5417 5416 * 5418 5417 * @since 3.5.0 5419 * @since 4.6.0 The default takes the original `memory_limit` into account.5418 * @since 4.6.0 The default now takes the original `memory_limit` into account. 5420 5419 * 5421 5420 * @param int|string $filtered_limit Maximum memory limit to allocate for images. 5422 * Default WP_MAX_MEMORY_LIMITor the original5423 * php.ini memory_limit, whichever is higher.5421 * Default `WP_MAX_MEMORY_LIMIT` or the original 5422 * php.ini `memory_limit`, whichever is higher. 5424 5423 * Accepts an integer (bytes), or a shorthand string 5425 5424 * notation, such as '256M'. … … 5439 5438 * 5440 5439 * @param int|string $filtered_limit Maximum memory limit to allocate for images. 5441 * Default 256M or the original php.ini memory_limit, 5442 * whichever is higher. 5443 * Accepts an integer (bytes), or a shorthand string 5444 * notation, such as '256M'. 5440 * Default '256M' or the original php.ini `memory_limit`, 5441 * whichever is higher. Accepts an integer (bytes), or a 5442 * shorthand string notation, such as '256M'. 5445 5443 */ 5446 5444 $filtered_limit = apply_filters( "{$context}_memory_limit", $filtered_limit ); -
trunk/src/wp-includes/general-template.php
r38100 r38121 2256 2256 * 2257 2257 * @since 2.1.0 2258 * @since 4.6.0 The `$post` parameter was added.2258 * @since 4.6.0 Added the `$post` parameter. 2259 2259 * 2260 2260 * @param string $d Optional. PHP date format defaults to the date_format option if not specified. … … 2278 2278 * 2279 2279 * @since 2.1.0 2280 * @since 4.6.0 The `$post` parameter was added.2280 * @since 4.6.0 Added the `$post` parameter. 2281 2281 * 2282 2282 * @param string $the_time The formatted date. … … 2409 2409 * 2410 2410 * @since 2.0.0 2411 * @since 4.6.0 The `$post` parameter was added.2411 * @since 4.6.0 Added the `$post` parameter. 2412 2412 * 2413 2413 * @param string $d Optional. Format to use for retrieving the time the post … … 2433 2433 * 2434 2434 * @since 2.0.0 2435 * @since 4.6.0 The `$post` parameter was added.2435 * @since 4.6.0 Added the `$post` parameter. 2436 2436 * 2437 2437 * @param string $the_time The formatted time. … … 2789 2789 2790 2790 /** 2791 * Prints resource hints to browsers for pre-fetching, pre-rendering and pre-connecting to web sites. 2792 * 2793 * Gives hints to browsers to prefetch specific pages or render them in the background, 2794 * to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background. 2791 * Prints resource hints to browsers for pre-fetching, pre-rendering 2792 * and pre-connecting to web sites. 2793 * 2794 * Gives hints to browsers to prefetch specific pages or render them 2795 * in the background, to perform DNS lookups or to begin the connection 2796 * handshake (DNS, TCP, TLS) in the background. 2795 2797 * 2796 2798 * These performance improving indicators work by using `<link rel"…">`. … … 2852 2854 2853 2855 /** 2854 * Ret urns a list of unique hosts of all enqueued scripts and styles.2856 * Retrieves a list of unique hosts of all enqueued scripts and styles. 2855 2857 * 2856 2858 * @since 4.6.0 -
trunk/src/wp-includes/kses.php
r37931 r38121 1709 1709 * 1710 1710 * @since 2.8.1 1711 * @since 4.4.0 `min-height`, `max-height`, `min-width`, and `max-width` were added.1712 * @since 4.6.0 `list-style-type` was added.1711 * @since 4.4.0 Added support for `min-height`, `max-height`, `min-width`, and `max-width`. 1712 * @since 4.6.0 Added support for `list-style-type`. 1713 1713 * 1714 1714 * @param array $attr List of allowed CSS attributes. -
trunk/src/wp-includes/l10n.php
r37985 r38121 665 665 666 666 /** 667 * Load a plugin's translated strings.667 * Loads a plugin's translated strings. 668 668 * 669 669 * If the path is not given then it will be the root of the plugin directory. … … 675 675 * 676 676 * @param string $domain Unique identifier for retrieving translated strings 677 * @param string $deprecated Use the $plugin_rel_path parameter instead.677 * @param string $deprecated Optional. Use the $plugin_rel_path parameter instead. Defaukt false. 678 678 * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR where the .mo file resides. 679 679 * Default false. … … 717 717 * 718 718 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 719 * @param string $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which the .mo file resides.720 * Default empty string.719 * @param string $mu_plugin_rel_path Optional. Relative to `WPMU_PLUGIN_DIR` directory in which the .mo 720 * file resides. Default empty string. 721 721 * @return bool True when textdomain is successfully loaded, false otherwise. 722 722 */ … … 800 800 801 801 /** 802 * Just in time loading of plugin and theme textdomains. 803 * 804 * When a textdomain is encountered for the first time, we try to load the translation file 805 * from wp-content/languages, removing the need to call `load_plugin_texdomain()` or 806 * `load_theme_texdomain()`. Holds a cached list of available .mo files to improve performance. 802 * Loads plugin and theme textdomains just-in-time. 803 * 804 * When a textdomain is encountered for the first time, we try to load 805 * the translation file from `wp-content/languages`, removing the need 806 * to call load_plugin_texdomain() or load_theme_texdomain(). 807 * 808 * Holds a cached list of available .mo files to improve performance. 807 809 * 808 810 * @since 4.6.0
Note: See TracChangeset
for help on using the changeset viewer.