mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
See #49572. Built from https://develop.svn.wordpress.org/trunk@48104 git-svn-id: http://core.svn.wordpress.org/trunk@47873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
58bda42fc8
commit
e13c363b17
@ -1111,7 +1111,7 @@ class WP_List_Table {
|
||||
*
|
||||
* @staticvar int $cb_counter
|
||||
*
|
||||
* @param bool $with_id Whether to set the id attribute or not
|
||||
* @param bool $with_id Whether to set the ID attribute or not
|
||||
*/
|
||||
public function print_column_headers( $with_id = true ) {
|
||||
list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
|
||||
|
@ -1119,7 +1119,7 @@ function get_default_page_to_edit() {
|
||||
* @deprecated 3.5.0 Use image_resize()
|
||||
* @see image_resize()
|
||||
*
|
||||
* @param mixed $file Filename of the original image, Or attachment id.
|
||||
* @param mixed $file Filename of the original image, Or attachment ID.
|
||||
* @param int $max_side Maximum length of a single side for the thumbnail.
|
||||
* @param mixed $deprecated Never used.
|
||||
* @return string Thumbnail path on success, Error string on failure.
|
||||
|
@ -84,7 +84,7 @@ function register_column_headers( $screen, $columns ) {
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string|WP_Screen $screen The screen hook name or screen object.
|
||||
* @param bool $with_id Whether to set the id attribute or not.
|
||||
* @param bool $with_id Whether to set the ID attribute or not.
|
||||
*/
|
||||
function print_column_headers( $screen, $with_id = true ) {
|
||||
$wp_list_table = new _WP_List_Table_Compat( $screen );
|
||||
|
@ -119,7 +119,7 @@ function the_media_upload_tabs() {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param int $id Image attachment id.
|
||||
* @param int $id Image attachment ID.
|
||||
* @param string $caption Image caption.
|
||||
* @param string $title Image title attribute.
|
||||
* @param string $align Image CSS alignment property.
|
||||
@ -154,7 +154,7 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $html The image HTML markup to send.
|
||||
* @param int $id The attachment id.
|
||||
* @param int $id The attachment ID.
|
||||
* @param string $caption The image caption.
|
||||
* @param string $title The image title.
|
||||
* @param string $align The image alignment.
|
||||
@ -1009,7 +1009,7 @@ function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'htm
|
||||
// Store the original attachment source in meta.
|
||||
add_post_meta( $id, '_source_url', $file );
|
||||
|
||||
// If attachment id was requested, return it.
|
||||
// If attachment ID was requested, return it.
|
||||
if ( 'id' === $return ) {
|
||||
return $id;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ function add_user() {
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param int $user_id Optional. User ID.
|
||||
* @return int|WP_Error user id of the updated user.
|
||||
* @return int|WP_Error User ID of the updated user.
|
||||
*/
|
||||
function edit_user( $user_id = 0 ) {
|
||||
$wp_roles = wp_roles();
|
||||
@ -214,7 +214,7 @@ function edit_user( $user_id = 0 ) {
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param WP_Error $errors WP_Error object (passed by reference).
|
||||
* @param bool $update Whether this is a user update.
|
||||
* @param bool $update Whether this is a user update.
|
||||
* @param stdClass $user User object (passed by reference).
|
||||
*/
|
||||
do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );
|
||||
|
@ -939,8 +939,8 @@ window.commentReply = {
|
||||
*
|
||||
* @memberof commentReply
|
||||
*
|
||||
* @param {number} comment_id The comment id to open an editor for.
|
||||
* @param {number} post_id The post id to open an editor for.
|
||||
* @param {number} comment_id The comment ID to open an editor for.
|
||||
* @param {number} post_id The post ID to open an editor for.
|
||||
* @param {string} action The action to perform. Either 'edit' or 'replyto'.
|
||||
*
|
||||
* @return {boolean} Always false.
|
||||
@ -1186,7 +1186,7 @@ window.commentReply = {
|
||||
*
|
||||
* @memberof commentReply
|
||||
*
|
||||
* @param {number} post_id The post id.
|
||||
* @param {number} post_id The post ID.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
|
@ -101,7 +101,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
@ -145,7 +145,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {number} toggle Is 0 or 1, fades the icon in then 1 and out when 0.
|
||||
*
|
||||
* @return {void}
|
||||
@ -190,7 +190,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
*
|
||||
* @return {string} The value from the imagedit-save-target input field when available,
|
||||
* or 'full' when not available.
|
||||
@ -208,7 +208,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The current post id.
|
||||
* @param {number} postid The current post ID.
|
||||
* @param {number} x Is 0 when it applies the y-axis
|
||||
* and 1 when applicable for the x-axis.
|
||||
* @param {jQuery} el Element.
|
||||
@ -245,7 +245,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
*
|
||||
* @return {string} The aspect ratio.
|
||||
*/
|
||||
@ -273,7 +273,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {number} setSize 0 or 1, when 1 the image resets to its original size.
|
||||
*
|
||||
* @return {string} JSON string containing the history or an empty string if no history exists.
|
||||
@ -339,7 +339,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce to verify the request.
|
||||
* @param {function} callback Function to execute when the image is loaded.
|
||||
*
|
||||
@ -413,7 +413,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce to verify the request.
|
||||
* @param {string} action The action to perform on the image.
|
||||
* The possible actions are: "scale" and "restore".
|
||||
@ -481,7 +481,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id to get the image from the database.
|
||||
* @param {number} postid The post ID to get the image from the database.
|
||||
* @param {string} nonce The nonce to verify the request.
|
||||
*
|
||||
* @return {boolean|void} If the actions are successfully saved a response message is shown.
|
||||
@ -547,7 +547,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id for the image.
|
||||
* @param {number} postid The post ID for the image.
|
||||
* @param {string} nonce The nonce to verify the request.
|
||||
* @param {object} view The image editor view to be used for the editing.
|
||||
*
|
||||
@ -605,7 +605,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
@ -632,7 +632,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {HTMLElement} image The preview image.
|
||||
* @param {HTMLElement} parent The preview image container.
|
||||
*
|
||||
@ -740,7 +740,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {object} c The selection.
|
||||
*
|
||||
* @return {boolean}
|
||||
@ -772,7 +772,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {bool} warn Warning message.
|
||||
*
|
||||
* @return {void|bool} Returns false if there is a warning.
|
||||
@ -815,7 +815,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
*
|
||||
* @return {boolean} Returns true if the history is not saved.
|
||||
*/
|
||||
@ -841,7 +841,7 @@
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {object} op The original position.
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
*
|
||||
* @return {void}
|
||||
@ -875,7 +875,7 @@
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {string} angle The angle the image is rotated with.
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
* @param {object} t The target element.
|
||||
*
|
||||
@ -897,7 +897,7 @@
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} axis The axle the image is flipped on.
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
* @param {object} t The target element.
|
||||
*
|
||||
@ -918,7 +918,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
* @param {object} t The target object.
|
||||
*
|
||||
@ -948,7 +948,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
*
|
||||
* @return {void|false} Returns false if the undo button is disabled.
|
||||
@ -982,7 +982,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {string} nonce The nonce.
|
||||
*
|
||||
* @return {void}
|
||||
@ -1013,7 +1013,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {jQuery} el The element containing the values.
|
||||
*
|
||||
* @return {void|boolean} Returns false when the x or y value is lower than 1,
|
||||
@ -1101,7 +1101,7 @@
|
||||
*
|
||||
* @memberof imageEdit
|
||||
*
|
||||
* @param {number} postid The post id.
|
||||
* @param {number} postid The post ID.
|
||||
* @param {number} n The ratio to set.
|
||||
* @param {jQuery} el The element containing the values.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@ window.wp = window.wp || {};
|
||||
* @type {Object}
|
||||
*
|
||||
* @property {string} type The type of inline editor.
|
||||
* @property {string} what The prefix before the post id.
|
||||
* @property {string} what The prefix before the post ID.
|
||||
*
|
||||
*/
|
||||
( function( $, wp ) {
|
||||
@ -249,7 +249,7 @@ window.wp = window.wp || {};
|
||||
*
|
||||
* @memberof inlineEditPost
|
||||
*
|
||||
* @param {number|Object} id The id of the clicked post or an element within a post
|
||||
* @param {number|Object} id The ID of the clicked post or an element within a post
|
||||
* table row.
|
||||
* @return {boolean} Always returns false at the end of execution.
|
||||
*/
|
||||
@ -389,7 +389,7 @@ window.wp = window.wp || {};
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param {int} id The id for the post that has been changed.
|
||||
* @param {int} id The ID for the post that has been changed.
|
||||
* @return {boolean} False, so the form does not submit when pressing
|
||||
* Enter on a focused field.
|
||||
*/
|
||||
@ -496,15 +496,15 @@ window.wp = window.wp || {};
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the id for a the post that you want to quick edit from the row in the quick
|
||||
* Gets the ID for a the post that you want to quick edit from the row in the quick
|
||||
* edit table.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @memberof inlineEditPost
|
||||
*
|
||||
* @param {Object} o DOM row object to get the id for.
|
||||
* @return {string} The post id extracted from the table row in the object.
|
||||
* @param {Object} o DOM row object to get the ID for.
|
||||
* @return {string} The post ID extracted from the table row in the object.
|
||||
*/
|
||||
getId : function(o) {
|
||||
var id = $(o).closest('tr').attr('id'),
|
||||
|
@ -47,8 +47,8 @@ jQuery(document).ready(function($) {
|
||||
/**
|
||||
* Removes the term from the parent box and the tag cloud.
|
||||
*
|
||||
* `data.match(/tag_ID=(\d+)/)[1]` matches the term id from the data variable.
|
||||
* This term id is then used to select the relevant HTML elements:
|
||||
* `data.match(/tag_ID=(\d+)/)[1]` matches the term ID from the data variable.
|
||||
* This term ID is then used to select the relevant HTML elements:
|
||||
* The parent box and the tag cloud.
|
||||
*/
|
||||
$('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove();
|
||||
|
@ -190,7 +190,7 @@ class Featured_Content {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete featured content ids transient.
|
||||
* Delete featured content IDs transient.
|
||||
*
|
||||
* Hooks in the "save_post" action.
|
||||
*
|
||||
@ -233,7 +233,7 @@ class Featured_Content {
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to respect post ids already in the blacklist.
|
||||
// We need to respect post IDs already in the blacklist.
|
||||
$post__not_in = $query->get( 'post__not_in' );
|
||||
|
||||
if ( ! empty( $post__not_in ) ) {
|
||||
@ -508,7 +508,7 @@ class Featured_Content {
|
||||
|
||||
$output['hide-tag'] = isset( $input['hide-tag'] ) && $input['hide-tag'] ? 1 : 0;
|
||||
|
||||
// Delete the featured post ids transient.
|
||||
// Delete the featured post IDs transient.
|
||||
self::delete_transient();
|
||||
|
||||
return $output;
|
||||
|
@ -131,7 +131,7 @@ endif;
|
||||
*/
|
||||
function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
|
||||
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
|
||||
// Find out the id and set it up during a selective refresh.
|
||||
// Find out the ID and set it up during a selective refresh.
|
||||
global $twentyseventeencounter;
|
||||
|
||||
$id = str_replace( 'panel_', '', $partial->id );
|
||||
|
@ -173,7 +173,7 @@ function _walk_bookmarks( $bookmarks, $args = '' ) {
|
||||
* Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
|
||||
* @type int $limit Amount of bookmarks to display. Accepts 1+ or -1 for all.
|
||||
* Default -1.
|
||||
* @type string $category Comma-separated list of category ids to include links from.
|
||||
* @type string $category Comma-separated list of category IDs to include links from.
|
||||
* Default empty.
|
||||
* @type string $category_name Category to retrieve links for by name. Default empty.
|
||||
* @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts
|
||||
|
@ -116,7 +116,7 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
|
||||
* Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
|
||||
* @type int $limit Amount of bookmarks to display. Accepts any positive number or
|
||||
* -1 for all. Default -1.
|
||||
* @type string $category Comma-separated list of category ids to include links from.
|
||||
* @type string $category Comma-separated list of category IDs to include links from.
|
||||
* Default empty.
|
||||
* @type string $category_name Category to retrieve links for by name. Default empty.
|
||||
* @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts
|
||||
@ -321,13 +321,12 @@ function get_bookmarks( $args = '' ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitizes all bookmark fields
|
||||
* Sanitizes all bookmark fields.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @param stdClass|array $bookmark Bookmark row
|
||||
* @param string $context Optional, default is 'display'. How to filter the
|
||||
* fields
|
||||
* @param stdClass|array $bookmark Bookmark row.
|
||||
* @param string $context Optional. How to filter the fields. Default 'display'.
|
||||
* @return stdClass|array Same type as $bookmark but with fields sanitized.
|
||||
*/
|
||||
function sanitize_bookmark( $bookmark, $context = 'display' ) {
|
||||
|
@ -37,11 +37,11 @@ function get_category_link( $category ) {
|
||||
* @since 1.2.0
|
||||
* @since 4.8.0 The `$visited` parameter was deprecated and renamed to `$deprecated`.
|
||||
*
|
||||
* @param int $id Category ID.
|
||||
* @param bool $link Optional, default is false. Whether to format with link.
|
||||
* @param string $separator Optional, default is '/'. How to separate categories.
|
||||
* @param bool $nicename Optional, default is false. Whether to use nice name for display.
|
||||
* @param array $deprecated Not used.
|
||||
* @param int $id Category ID.
|
||||
* @param bool $link Optional. Whether to format with link. Default false.
|
||||
* @param string $separator Optional. How to separate categories. Default '/'.
|
||||
* @param bool $nicename Optional. Whether to use nice name for display. Default false.
|
||||
* @param array $deprecated Not used.
|
||||
* @return string|WP_Error A list of category parents on success, WP_Error on failure.
|
||||
*/
|
||||
function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $deprecated = array() ) {
|
||||
@ -64,7 +64,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename =
|
||||
/**
|
||||
* Retrieves post categories.
|
||||
*
|
||||
* This tag may be used outside The Loop by passing a post id as the parameter.
|
||||
* This tag may be used outside The Loop by passing a post ID as the parameter.
|
||||
*
|
||||
* Note: This function only returns results from the default "category" taxonomy.
|
||||
* For custom taxonomies use get_the_terms().
|
||||
|
@ -388,7 +388,7 @@ class WP_Comment_Query {
|
||||
*
|
||||
* The expected return type from this filter depends on the value passed in the request query_vars.
|
||||
* When `$this->query_vars['count']` is set, the filter should return the comment count as an int.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of comment ids.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of comment IDs.
|
||||
* Otherwise the filter should return an array of WP_Comment objects.
|
||||
*
|
||||
* @since 5.3.0
|
||||
@ -550,7 +550,7 @@ class WP_Comment_Query {
|
||||
$unapproved_ids = array();
|
||||
$unapproved_emails = array();
|
||||
foreach ( $include_unapproved as $unapproved_identifier ) {
|
||||
// Numeric values are assumed to be user ids.
|
||||
// Numeric values are assumed to be user IDs.
|
||||
if ( is_numeric( $unapproved_identifier ) ) {
|
||||
$approved_clauses[] = $wpdb->prepare( "( user_id = %d AND comment_approved = '0' )", $unapproved_identifier );
|
||||
} else {
|
||||
|
@ -1077,7 +1077,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the changeset post id for the loaded changeset.
|
||||
* Get the changeset post ID for the loaded changeset.
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
@ -3210,8 +3210,8 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param int $changeset_post_id Changeset post id.
|
||||
* @param bool $take_over Take over the changeset, default is false.
|
||||
* @param int $changeset_post_id Changeset post ID.
|
||||
* @param bool $take_over Whether to take over the changeset. Default false.
|
||||
*/
|
||||
public function set_changeset_lock( $changeset_post_id, $take_over = false ) {
|
||||
if ( $changeset_post_id ) {
|
||||
@ -3235,7 +3235,7 @@ final class WP_Customize_Manager {
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param int $changeset_post_id Changeset post id.
|
||||
* @param int $changeset_post_id Changeset post ID.
|
||||
*/
|
||||
public function refresh_changeset_lock( $changeset_post_id ) {
|
||||
if ( ! $changeset_post_id ) {
|
||||
|
@ -169,7 +169,7 @@ class WP_Network_Query {
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string|array $query Array or URL query string of parameters.
|
||||
* @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids',
|
||||
* or the number of networks when 'count' is passed as a query var.
|
||||
*/
|
||||
public function query( $query ) {
|
||||
@ -182,7 +182,7 @@ class WP_Network_Query {
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids',
|
||||
* or the number of networks when 'count' is passed as a query var.
|
||||
*/
|
||||
public function get_networks() {
|
||||
@ -206,7 +206,7 @@ class WP_Network_Query {
|
||||
*
|
||||
* The expected return type from this filter depends on the value passed in the request query_vars.
|
||||
* When `$this->query_vars['count']` is set, the filter should return the network count as an int.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of network ids.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of network IDs.
|
||||
* Otherwise the filter should return an array of WP_Network objects.
|
||||
*
|
||||
* @since 5.2.0
|
||||
|
@ -414,7 +414,7 @@ class WP_Object_Cache {
|
||||
* Sets the data contents into the cache.
|
||||
*
|
||||
* The cache contents are grouped by the $group parameter followed by the
|
||||
* $key. This allows for duplicate ids in unique groups. Therefore, naming of
|
||||
* $key. This allows for duplicate IDs in unique groups. Therefore, naming of
|
||||
* the group should be used with care and should follow normal function
|
||||
* naming guidelines outside of core WordPress usage.
|
||||
*
|
||||
|
@ -718,9 +718,9 @@ class WP_Query {
|
||||
* @type bool $sentence Whether to search by phrase. Default false.
|
||||
* @type bool $suppress_filters Whether to suppress filters. Default false.
|
||||
* @type string $tag Tag slug. Comma-separated (either), Plus-separated (all).
|
||||
* @type array $tag__and An array of tag ids (AND in).
|
||||
* @type array $tag__in An array of tag ids (OR in).
|
||||
* @type array $tag__not_in An array of tag ids (NOT in).
|
||||
* @type array $tag__and An array of tag IDs (AND in).
|
||||
* @type array $tag__in An array of tag IDs (OR in).
|
||||
* @type array $tag__not_in An array of tag IDs (NOT in).
|
||||
* @type int $tag_id Tag id or comma-separated list of IDs.
|
||||
* @type array $tag_slug__and An array of tag slugs (AND in).
|
||||
* @type array $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is
|
||||
|
@ -245,7 +245,7 @@ class WP_Site_Query {
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param string|array $query Array or URL query string of parameters.
|
||||
* @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',
|
||||
* or the number of sites when 'count' is passed as a query var.
|
||||
*/
|
||||
public function query( $query ) {
|
||||
@ -261,7 +261,7 @@ class WP_Site_Query {
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',
|
||||
* or the number of sites when 'count' is passed as a query var.
|
||||
*/
|
||||
public function get_sites() {
|
||||
@ -297,7 +297,7 @@ class WP_Site_Query {
|
||||
*
|
||||
* The expected return type from this filter depends on the value passed in the request query_vars:
|
||||
* When `$this->query_vars['count']` is set, the filter should return the site count as an int.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of site ids.
|
||||
* When `'ids' === $this->query_vars['fields']`, the filter should return an array of site IDs.
|
||||
* Otherwise the filter should return an array of WP_Site objects.
|
||||
*
|
||||
* @since 5.2.0
|
||||
|
@ -113,12 +113,12 @@ class WP_Term_Query {
|
||||
* Default 'ASC'.
|
||||
* @type bool|int $hide_empty Whether to hide terms not assigned to any posts. Accepts
|
||||
* 1|true or 0|false. Default 1|true.
|
||||
* @type array|string $include Array or comma/space-separated string of term ids to include.
|
||||
* @type array|string $include Array or comma/space-separated string of term IDs to include.
|
||||
* Default empty array.
|
||||
* @type array|string $exclude Array or comma/space-separated string of term ids to exclude.
|
||||
* @type array|string $exclude Array or comma/space-separated string of term IDs to exclude.
|
||||
* If $include is non-empty, $exclude is ignored.
|
||||
* Default empty array.
|
||||
* @type array|string $exclude_tree Array or comma/space-separated string of term ids to exclude
|
||||
* @type array|string $exclude_tree Array or comma/space-separated string of term IDs to exclude
|
||||
* along with all of their descendant terms. If $include is
|
||||
* non-empty, $exclude_tree is ignored. Default empty array.
|
||||
* @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any
|
||||
|
@ -25,7 +25,7 @@ class WP_User_Query {
|
||||
public $query_vars = array();
|
||||
|
||||
/**
|
||||
* List of found user ids
|
||||
* List of found user IDs.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @var array
|
||||
|
@ -1515,7 +1515,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if ( isset( $post_data['terms'] ) && is_array( $post_data['terms'] ) ) {
|
||||
$taxonomies = array_keys( $post_data['terms'] );
|
||||
|
||||
// Validating term ids.
|
||||
// Validating term IDs.
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
if ( ! array_key_exists( $taxonomy, $post_type_taxonomies ) ) {
|
||||
return new IXR_Error( 401, __( 'Sorry, one of the given taxonomies is not supported by the post type.' ) );
|
||||
@ -5656,7 +5656,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$postdata = get_post( $post_ID, ARRAY_A );
|
||||
|
||||
/*
|
||||
* If there is no post data for the give post id, stop now and return an error.
|
||||
* If there is no post data for the give post ID, stop now and return an error.
|
||||
* Otherwise a new post will be created (which was the old behavior).
|
||||
*/
|
||||
if ( ! $postdata || empty( $postdata['ID'] ) ) {
|
||||
|
@ -530,7 +530,7 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
|
||||
*
|
||||
* @param string[] $classes An array of comment classes.
|
||||
* @param string $class A comma-separated list of additional classes added to the list.
|
||||
* @param int $comment_id The comment id.
|
||||
* @param int $comment_id The comment ID.
|
||||
* @param WP_Comment $comment The comment object.
|
||||
* @param int|WP_Post $post_id The post ID or WP_Post object.
|
||||
*/
|
||||
@ -657,7 +657,7 @@ function comment_excerpt( $comment_ID = 0 ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the comment id of the current comment.
|
||||
* Retrieves the comment ID of the current comment.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
@ -679,7 +679,7 @@ function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFun
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the comment id of the current comment.
|
||||
* Displays the comment ID of the current comment.
|
||||
*
|
||||
* @since 0.71
|
||||
*/
|
||||
@ -1922,7 +1922,7 @@ function get_comment_id_fields( $id = 0 ) {
|
||||
$result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
|
||||
|
||||
/**
|
||||
* Filters the returned comment id fields.
|
||||
* Filters the returned comment ID fields.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
@ -1394,7 +1394,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
|
||||
* @param bool $force_delete Whether to bypass Trash and force deletion. Default is false.
|
||||
* @param bool $force_delete Whether to bypass Trash and force deletion. Default false.
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function wp_delete_comment( $comment_id, $force_delete = false ) {
|
||||
@ -1458,6 +1458,7 @@ function wp_delete_comment( $comment_id, $force_delete = false ) {
|
||||
do_action( 'wp_set_comment_status', $comment->comment_ID, 'delete' );
|
||||
|
||||
wp_transition_comment_status( 'delete', $comment->comment_approved, $comment );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1508,6 +1509,7 @@ function wp_trash_comment( $comment_id ) {
|
||||
* @param WP_Comment $comment The trashed comment.
|
||||
*/
|
||||
do_action( 'trashed_comment', $comment->comment_ID, $comment );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1547,6 +1549,7 @@ function wp_untrash_comment( $comment_id ) {
|
||||
if ( wp_set_comment_status( $comment, $status ) ) {
|
||||
delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
|
||||
delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
|
||||
|
||||
/**
|
||||
* Fires immediately after a comment is restored from the Trash.
|
||||
*
|
||||
@ -1557,6 +1560,7 @@ function wp_untrash_comment( $comment_id ) {
|
||||
* @param WP_Comment $comment The untrashed comment.
|
||||
*/
|
||||
do_action( 'untrashed_comment', $comment->comment_ID, $comment );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1593,6 +1597,7 @@ function wp_spam_comment( $comment_id ) {
|
||||
delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
|
||||
add_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', $comment->comment_approved );
|
||||
add_comment_meta( $comment->comment_ID, '_wp_trash_meta_time', time() );
|
||||
|
||||
/**
|
||||
* Fires immediately after a comment is marked as Spam.
|
||||
*
|
||||
@ -1603,6 +1608,7 @@ function wp_spam_comment( $comment_id ) {
|
||||
* @param WP_Comment $comment The comment marked as spam.
|
||||
*/
|
||||
do_action( 'spammed_comment', $comment->comment_ID, $comment );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1642,6 +1648,7 @@ function wp_unspam_comment( $comment_id ) {
|
||||
if ( wp_set_comment_status( $comment, $status ) ) {
|
||||
delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
|
||||
delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
|
||||
|
||||
/**
|
||||
* Fires immediately after a comment is unmarked as Spam.
|
||||
*
|
||||
@ -1652,6 +1659,7 @@ function wp_unspam_comment( $comment_id ) {
|
||||
* @param WP_Comment $comment The comment unmarked as spam.
|
||||
*/
|
||||
do_action( 'unspammed_comment', $comment->comment_ID, $comment );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1985,7 +1993,7 @@ function wp_insert_comment( $commentdata ) {
|
||||
function wp_filter_comment( $commentdata ) {
|
||||
if ( isset( $commentdata['user_ID'] ) ) {
|
||||
/**
|
||||
* Filters the comment author's user id before it is set.
|
||||
* Filters the comment author's user ID before it is set.
|
||||
*
|
||||
* The first time this filter is evaluated, 'user_ID' is checked
|
||||
* (for back-compat), followed by the standard 'user_id' value.
|
||||
@ -2279,7 +2287,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
|
||||
*
|
||||
* @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
|
||||
* @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'.
|
||||
* @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default is false.
|
||||
* @param bool $wp_error Whether to return a WP_Error object if there is a failure. Default false.
|
||||
* @return bool|WP_Error True on success, false or WP_Error on failure.
|
||||
*/
|
||||
function wp_set_comment_status( $comment_id, $comment_status, $wp_error = false ) {
|
||||
@ -2427,6 +2435,7 @@ function wp_update_comment( $commentarr ) {
|
||||
|
||||
clean_comment_cache( $comment_ID );
|
||||
wp_update_comment_count( $comment_post_ID );
|
||||
|
||||
/**
|
||||
* Fires immediately after a comment is updated in the database.
|
||||
*
|
||||
@ -2439,8 +2448,11 @@ function wp_update_comment( $commentarr ) {
|
||||
* @param array $data Comment data.
|
||||
*/
|
||||
do_action( 'edit_comment', $comment_ID, $data );
|
||||
|
||||
$comment = get_comment( $comment_ID );
|
||||
|
||||
wp_transition_comment_status( $comment->comment_approved, $old_status, $comment );
|
||||
|
||||
return $rval;
|
||||
}
|
||||
|
||||
|
@ -732,7 +732,7 @@ function wp_get_post_cats($blogid = '1', $post_ID = 0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the categories that the post id belongs to.
|
||||
* Sets the categories that the post ID belongs to.
|
||||
*
|
||||
* @since 1.0.1
|
||||
* @deprecated 2.1.0
|
||||
@ -2498,7 +2498,7 @@ function is_taxonomy( $taxonomy ) {
|
||||
* @param int|string $term The term to check
|
||||
* @param string $taxonomy The taxonomy name to use
|
||||
* @param int $parent ID of parent term under which to confine the exists search.
|
||||
* @return mixed Get the term id or Term Object, if exists.
|
||||
* @return mixed Get the term ID or term object, if exists.
|
||||
*/
|
||||
function is_term( $term, $taxonomy = '', $parent = 0 ) {
|
||||
_deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
|
||||
|
@ -1003,14 +1003,13 @@ function build_query( $data ) {
|
||||
*
|
||||
* @see https://www.php.net/manual/en/function.http-build-query.php
|
||||
*
|
||||
* @param array|object $data An array or object of data. Converted to array.
|
||||
* @param string $prefix Optional. Numeric index. If set, start parameter numbering with it.
|
||||
* Default null.
|
||||
* @param string $sep Optional. Argument separator; defaults to 'arg_separator.output'.
|
||||
* Default null.
|
||||
* @param string $key Optional. Used to prefix key name. Default empty.
|
||||
* @param bool $urlencode Optional. Whether to use urlencode() in the result. Default true.
|
||||
*
|
||||
* @param array|object $data An array or object of data. Converted to array.
|
||||
* @param string $prefix Optional. Numeric index. If set, start parameter numbering with it.
|
||||
* Default null.
|
||||
* @param string $sep Optional. Argument separator; defaults to 'arg_separator.output'.
|
||||
* Default null.
|
||||
* @param string $key Optional. Used to prefix key name. Default empty.
|
||||
* @param bool $urlencode Optional. Whether to use urlencode() in the result. Default true.
|
||||
* @return string The query string.
|
||||
*/
|
||||
function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urlencode = true ) {
|
||||
@ -4018,7 +4017,7 @@ function _wp_json_convert_string( $string ) {
|
||||
* @since 4.4.0
|
||||
* @deprecated 5.3.0 This function is no longer needed as support for PHP 5.2-5.3
|
||||
* has been dropped.
|
||||
* @access private
|
||||
* @access private
|
||||
*
|
||||
* @param mixed $data Native representation.
|
||||
* @return bool|int|float|null|string|array Data ready for `json_encode()`.
|
||||
@ -4411,7 +4410,7 @@ function wp_parse_list( $list ) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array|string $list List of ids.
|
||||
* @param array|string $list List of IDs.
|
||||
* @return int[] Sanitized array of IDs.
|
||||
*/
|
||||
function wp_parse_id_list( $list ) {
|
||||
@ -6955,7 +6954,7 @@ function wp_is_uuid( $uuid, $version = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get unique ID.
|
||||
* Gets unique ID.
|
||||
*
|
||||
* This is a PHP implementation of Underscore's uniqueId method. A static variable
|
||||
* contains an integer that is incremented with each call. This number is returned
|
||||
@ -6975,12 +6974,11 @@ function wp_unique_id( $prefix = '' ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last changed date for the specified cache group.
|
||||
* Gets last changed date for the specified cache group.
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param string $group Where the cache contents are grouped.
|
||||
*
|
||||
* @return string UNIX timestamp with microseconds representing when the group was last changed.
|
||||
*/
|
||||
function wp_cache_get_last_changed( $group ) {
|
||||
|
@ -318,7 +318,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
||||
*
|
||||
* @throws {Error} If there's no settingId.
|
||||
* @throws {Error} If the setting doesn't exist in the API.
|
||||
* @throws {Error} If the API doesn't pass an array of widget ids.
|
||||
* @throws {Error} If the API doesn't pass an array of widget IDs.
|
||||
*
|
||||
* @return {Array} A shallow copy of the array containing widget IDs.
|
||||
*/
|
||||
|
@ -439,7 +439,7 @@
|
||||
postId = parentModel.get( 'id' );
|
||||
embeddeds = parentModel.get( '_embedded' ) || {};
|
||||
|
||||
// Verify that we have a valid post id.
|
||||
// Verify that we have a valid post ID.
|
||||
if ( ! _.isNumber( postId ) || 0 === postId ) {
|
||||
deferred.reject();
|
||||
return deferred;
|
||||
@ -640,7 +640,7 @@
|
||||
*/
|
||||
setTagsWithCollection: function( tags ) {
|
||||
|
||||
// Pluck out the category ids.
|
||||
// Pluck out the category IDs.
|
||||
this.set( 'tags', tags.pluck( 'id' ) );
|
||||
return this.save();
|
||||
}
|
||||
@ -725,7 +725,7 @@
|
||||
*/
|
||||
setCategoriesWithCollection: function( categories ) {
|
||||
|
||||
// Pluck out the category ids.
|
||||
// Pluck out the category IDs.
|
||||
this.set( 'categories', categories.pluck( 'id' ) );
|
||||
return this.save();
|
||||
}
|
||||
@ -1347,7 +1347,7 @@
|
||||
modelClassName = mapping.models[ modelClassName ] || modelClassName;
|
||||
loadingObjects.models[ modelClassName ] = wp.api.WPApiBaseModel.extend( {
|
||||
|
||||
// Function that returns a constructed url based on the id.
|
||||
// Function that returns a constructed url based on the ID.
|
||||
url: function() {
|
||||
var url = routeModel.get( 'apiRoot' ) +
|
||||
routeModel.get( 'versionString' ) +
|
||||
|
@ -2370,11 +2370,11 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param bool $allow_css Whether the CSS in the test string is considered safe.
|
||||
* @param string $css_test_string The css string to test.
|
||||
* @param string $css_test_string The CSS string to test.
|
||||
*/
|
||||
$allow_css = apply_filters( 'safecss_filter_attr_allow_css', $allow_css, $css_test_string );
|
||||
|
||||
// Only add the css part if it passes the regex check.
|
||||
// Only add the CSS part if it passes the regex check.
|
||||
if ( $allow_css ) {
|
||||
if ( '' !== $css ) {
|
||||
$css .= ';';
|
||||
|
@ -1552,7 +1552,7 @@ function edit_comment_link( $text = null, $before = '', $after = '' ) {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark.
|
||||
* @param int|stdClass $link Optional. Bookmark ID. Default is the ID of the current bookmark.
|
||||
* @return string|void The edit bookmark link URL.
|
||||
*/
|
||||
function get_edit_bookmark_link( $link = 0 ) {
|
||||
@ -3844,10 +3844,10 @@ function rel_canonical() {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param int $id Optional. A post or site id. Default is 0, which means the current post or site.
|
||||
* @param string $context Optional. Whether the id is a 'site' id, 'post' id, or 'media' id. If 'post',
|
||||
* @param int $id Optional. A post or site ID. Default is 0, which means the current post or site.
|
||||
* @param string $context Optional. Whether the ID is a 'site' id, 'post' id, or 'media' id. If 'post',
|
||||
* the post_type of the post is consulted. If 'query', the current query is consulted
|
||||
* to determine the id and context. Default 'post'.
|
||||
* to determine the ID and context. Default 'post'.
|
||||
* @param bool $allow_slugs Optional. Whether to allow post slugs in the shortlink. It is up to the plugin how
|
||||
* and whether to honor this. Default true.
|
||||
* @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks
|
||||
|
@ -4329,7 +4329,7 @@ function get_post_galleries( $post, $html = true ) {
|
||||
$shortcode_attrs = array();
|
||||
}
|
||||
|
||||
// Specify the post id of the gallery we're viewing if the shortcode doesn't reference another post already.
|
||||
// Specify the post ID of the gallery we're viewing if the shortcode doesn't reference another post already.
|
||||
if ( ! isset( $shortcode_attrs['id'] ) ) {
|
||||
$shortcode[3] .= ' id="' . intval( $post->ID ) . '"';
|
||||
}
|
||||
@ -4502,7 +4502,7 @@ function attachment_url_to_postid( $url ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters an attachment id found by URL.
|
||||
* Filters an attachment ID found by URL.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -1213,6 +1213,7 @@ function wpmu_activate_signup( $key ) {
|
||||
* @param array $meta Signup meta data.
|
||||
*/
|
||||
do_action( 'wpmu_activate_user', $user_id, $password, $meta );
|
||||
|
||||
return array(
|
||||
'user_id' => $user_id,
|
||||
'password' => $password,
|
||||
@ -1251,6 +1252,7 @@ function wpmu_activate_signup( $key ) {
|
||||
),
|
||||
array( 'activation_key' => $key )
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires immediately after a site is activated.
|
||||
*
|
||||
|
@ -57,7 +57,7 @@ function get_network( $network = null ) {
|
||||
*
|
||||
* @param string|array $args Optional. Array or string of arguments. See WP_Network_Query::parse_query()
|
||||
* for information on accepted arguments. Default empty array.
|
||||
* @return array|int List of WP_Network objects, a list of network ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids',
|
||||
* or the number of networks when 'count' is passed as a query var.
|
||||
*/
|
||||
function get_networks( $args = array() ) {
|
||||
|
@ -240,7 +240,7 @@ function wp_delete_site( $site_id ) {
|
||||
* @deprecated 5.1.0
|
||||
*
|
||||
* @param int $site_id The site ID.
|
||||
* @param bool $drop True if site's table should be dropped. Default is false.
|
||||
* @param bool $drop True if site's table should be dropped. Default false.
|
||||
*/
|
||||
do_action_deprecated( 'delete_blog', array( $old_site->id, true ), '5.1.0' );
|
||||
|
||||
@ -282,7 +282,7 @@ function wp_delete_site( $site_id ) {
|
||||
* @deprecated 5.1.0
|
||||
*
|
||||
* @param int $site_id The site ID.
|
||||
* @param bool $drop True if site's tables should be dropped. Default is false.
|
||||
* @param bool $drop True if site's tables should be dropped. Default false.
|
||||
*/
|
||||
do_action_deprecated( 'deleted_blog', array( $old_site->id, true ), '5.1.0' );
|
||||
|
||||
@ -330,7 +330,7 @@ function get_site( $site = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds any sites from the given ids to the cache that do not already exist in cache.
|
||||
* Adds any sites from the given IDs to the cache that do not already exist in cache.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @since 5.1.0 Introduced the `$update_meta_cache` parameter.
|
||||
@ -450,7 +450,7 @@ function update_sitemeta_cache( $site_ids ) {
|
||||
* Default empty array.
|
||||
* @type bool $update_site_cache Whether to prime the cache for found sites. Default true.
|
||||
* }
|
||||
* @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
|
||||
* @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',
|
||||
* or the number of sites when 'count' is passed as a query var.
|
||||
*/
|
||||
function get_sites( $args = array() ) {
|
||||
|
@ -1366,9 +1366,9 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
|
||||
* will store revisions, and the 'comments' feature dictates whether the
|
||||
* comments count will show on the edit screen. A feature can also be
|
||||
* specified as an array of arguments to provide additional information
|
||||
* about supporting that feature. Example: `array( 'my_feature', array(
|
||||
* 'field' => 'value' ) )`. Default is an array containing 'title' and
|
||||
* 'editor'.
|
||||
* about supporting that feature.
|
||||
* Example: `array( 'my_feature', array( 'field' => 'value' ) )`.
|
||||
* Default is an array containing 'title' and 'editor'.
|
||||
* @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
|
||||
* edit form. Do remove_meta_box() and add_meta_box() calls in the
|
||||
* callback. Default null.
|
||||
@ -3065,6 +3065,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
do_action( 'delete_post', $postid, $post );
|
||||
|
||||
$result = $wpdb->delete( $wpdb->posts, array( 'ID' => $postid ) );
|
||||
if ( ! $result ) {
|
||||
return false;
|
||||
@ -3426,7 +3427,7 @@ function wp_untrash_post_comments( $post = null ) {
|
||||
* See WP_Term_Query::__construct() for supported arguments.
|
||||
* @return array|WP_Error List of categories. If the `$fields` argument passed via `$args` is 'all' or
|
||||
* 'all_with_object_id', an array of WP_Term objects will be returned. If `$fields`
|
||||
* is 'ids', an array of category ids. If `$fields` is 'names', an array of category names.
|
||||
* is 'ids', an array of category IDs. If `$fields` is 'names', an array of category names.
|
||||
* WP_Error object if 'category' taxonomy doesn't exist.
|
||||
*/
|
||||
function wp_get_post_categories( $post_id = 0, $args = array() ) {
|
||||
@ -7182,7 +7183,7 @@ function _update_term_count_on_transition_post_status( $new_status, $old_status,
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds any posts from the given ids to the cache that do not already exist in cache
|
||||
* Adds any posts from the given IDs to the cache that do not already exist in cache
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @access private
|
||||
|
@ -245,7 +245,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
$args['post__in'] = $args['post__in'] ? array_intersect( $sticky_posts, $args['post__in'] ) : $sticky_posts;
|
||||
|
||||
/*
|
||||
* If we intersected, but there are no post ids in common,
|
||||
* If we intersected, but there are no post IDs in common,
|
||||
* WP_Query won't return "no posts" for post__in = array()
|
||||
* so we have to fake it a bit.
|
||||
*/
|
||||
|
@ -164,7 +164,7 @@ class WP_Sitemaps_Posts extends WP_Sitemaps_Provider {
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param null|int $max_num_pages The maximum number of pages. Default null.
|
||||
* @param int|null $max_num_pages The maximum number of pages. Default null.
|
||||
* @param string $post_type Post type name.
|
||||
*/
|
||||
$max_num_pages = apply_filters( 'wp_sitemaps_posts_pre_max_num_pages', null, $post_type );
|
||||
|
@ -705,7 +705,7 @@ function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int|array $term_ids Term id or array of term ids of terms that will be used.
|
||||
* @param int|array $term_ids Term ID or array of term IDs of terms that will be used.
|
||||
* @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names.
|
||||
* @param array|string $args Change the order of the object_ids, either ASC or DESC.
|
||||
* @return WP_Error|array If the taxonomy does not exist, then WP_Error will be returned. On success.
|
||||
@ -1437,7 +1437,7 @@ function term_exists( $term, $taxonomy = '', $parent = null ) {
|
||||
/**
|
||||
* Check if a term is an ancestor of another term.
|
||||
*
|
||||
* You can use either an id or the term object for both parameters.
|
||||
* You can use either an ID or the term object for both parameters.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
@ -1895,6 +1895,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
|
||||
* @param int $tt_id Term taxonomy ID.
|
||||
*/
|
||||
do_action( 'delete_term_taxonomy', $tt_id );
|
||||
|
||||
$wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) );
|
||||
|
||||
/**
|
||||
@ -2432,7 +2433,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int $object_id The object to relate to.
|
||||
* @param string|int|array $terms A single term slug, single term id, or array of either term slugs or ids.
|
||||
* @param string|int|array $terms A single term slug, single term ID, or array of either term slugs or IDs.
|
||||
* Will replace all existing related terms in this taxonomy. Passing an
|
||||
* empty value will remove all related terms.
|
||||
* @param string $taxonomy The context in which to relate the term to the object.
|
||||
@ -2675,6 +2676,7 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
|
||||
* @param string $taxonomy Taxonomy slug.
|
||||
*/
|
||||
do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy );
|
||||
|
||||
$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
|
||||
|
||||
wp_cache_delete( $object_id, $taxonomy . '_relationships' );
|
||||
@ -2982,6 +2984,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
|
||||
$data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );
|
||||
|
||||
$wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) );
|
||||
|
||||
if ( empty( $slug ) ) {
|
||||
$slug = sanitize_title( $name, $term_id );
|
||||
$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
|
||||
@ -3237,7 +3240,7 @@ function clean_object_term_cache( $object_ids, $object_type ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Will remove all of the term ids from the cache.
|
||||
* Will remove all of the term IDs from the cache.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
@ -3636,7 +3639,7 @@ function _pad_term_counts( &$terms, $taxonomy ) {
|
||||
$term_ids[ $term->term_taxonomy_id ] = $term->term_id;
|
||||
}
|
||||
|
||||
// Get the object and term ids and stick them in a lookup table.
|
||||
// Get the object and term IDs and stick them in a lookup table.
|
||||
$tax_obj = get_taxonomy( $taxonomy );
|
||||
$object_types = esc_sql( $tax_obj->object_type );
|
||||
$results = $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON object_id = ID WHERE term_taxonomy_id IN (" . implode( ',', array_keys( $term_ids ) ) . ") AND post_type IN ('" . implode( "', '", $object_types ) . "') AND post_status = 'publish'" );
|
||||
@ -4602,7 +4605,6 @@ function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {
|
||||
* @param int $parent `term_id` of the parent for the term we're checking.
|
||||
* @param int $term_id The term we're checking.
|
||||
* @param string $taxonomy The taxonomy of the term we're checking.
|
||||
*
|
||||
* @return int The new parent for the term.
|
||||
*/
|
||||
function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) {
|
||||
|
@ -824,7 +824,7 @@ function switch_theme( $stylesheet ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that current theme files 'index.php' and 'style.css' exists.
|
||||
* Checks that the current theme has 'index.php' and 'style.css' files.
|
||||
*
|
||||
* Does not initially check the default theme, which is the fallback and should always exist.
|
||||
* But if it doesn't exist, it'll fall back to the latest core default theme that does exist.
|
||||
@ -1454,7 +1454,8 @@ function get_custom_header() {
|
||||
*
|
||||
* @global array $_wp_default_headers
|
||||
*
|
||||
* @param array $headers Array of headers keyed by a string id. The ids point to arrays containing 'url', 'thumbnail_url', and 'description' keys.
|
||||
* @param array $headers Array of headers keyed by a string ID. The IDs point to arrays
|
||||
* containing 'url', 'thumbnail_url', and 'description' keys.
|
||||
*/
|
||||
function register_default_headers( $headers ) {
|
||||
global $_wp_default_headers;
|
||||
@ -2844,8 +2845,7 @@ function remove_theme_support( $feature ) {
|
||||
* @global Custom_Background $custom_background
|
||||
*
|
||||
* @param string $feature
|
||||
*
|
||||
* @return bool Returns true when support is removed, false when the feature was not registered.
|
||||
* @return bool True if support was removed, false if the feature was not registered.
|
||||
*/
|
||||
function _remove_theme_support( $feature ) {
|
||||
global $_wp_theme_features;
|
||||
@ -2892,6 +2892,7 @@ function _remove_theme_support( $feature ) {
|
||||
}
|
||||
|
||||
unset( $_wp_theme_features[ $feature ] );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3005,7 +3006,7 @@ function require_if_theme_supports( $feature, $include ) {
|
||||
* @since 4.3.0 Also removes `header_image_data`.
|
||||
* @since 4.5.0 Also removes custom logo theme mods.
|
||||
*
|
||||
* @param int $id The attachment id.
|
||||
* @param int $id The attachment ID.
|
||||
*/
|
||||
function _delete_attachment_theme_mod( $id ) {
|
||||
$attachment_image = wp_get_attachment_url( $id );
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-48103';
|
||||
$wp_version = '5.5-alpha-48104';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -42,7 +42,7 @@ $wp_registered_sidebars = array();
|
||||
$wp_registered_widgets = array();
|
||||
|
||||
/**
|
||||
* Stores the registered widget control (options).
|
||||
* Stores the registered widget controls (options).
|
||||
*
|
||||
* @global array $wp_registered_widget_controls
|
||||
* @since 2.2.0
|
||||
@ -155,7 +155,7 @@ function unregister_widget( $widget ) {
|
||||
* Optional. Array or string of arguments for building a sidebar.
|
||||
*
|
||||
* @type string $id The base string of the unique identifier for each sidebar. If provided, and multiple
|
||||
* sidebars are being defined, the id will have "-2" appended, and so on.
|
||||
* sidebars are being defined, the ID will have "-2" appended, and so on.
|
||||
* Default 'sidebar-' followed by the number the sidebar creation is currently at.
|
||||
* @type string $name The name or title for the sidebars displayed in the admin dashboard. If registering
|
||||
* more than one sidebar, include '%d' in the string as a placeholder for the uniquely
|
||||
@ -220,7 +220,7 @@ function register_sidebars( $number = 1, $args = array() ) {
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
*
|
||||
* @param array|string $args {
|
||||
* Optional. Array or string of arguments for the sidebar being registered.
|
||||
@ -309,7 +309,7 @@ function register_sidebar( $args = array() ) {
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_sidebars Removes the sidebar from this array by sidebar ID.
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
*
|
||||
* @param string|int $sidebar_id The ID of the sidebar when it was registered.
|
||||
*/
|
||||
@ -655,13 +655,13 @@ function wp_unregister_widget_control( $id ) {
|
||||
* Display dynamic sidebar.
|
||||
*
|
||||
* By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or
|
||||
* 'name' parameter for its registered sidebars you can pass an id or name as the $index parameter.
|
||||
* 'name' parameter for its registered sidebars you can pass an ID or name as the $index parameter.
|
||||
* Otherwise, you can pass in a numerical index to display the sidebar at that index.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
* @global array $wp_registered_widgets
|
||||
* @global array $wp_registered_widgets Registered widgets.
|
||||
*
|
||||
* @param int|string $index Optional, default is 1. Index, name or ID of dynamic sidebar.
|
||||
* @return bool True, if widget sidebar was found and called. False if not found or not called.
|
||||
@ -897,7 +897,7 @@ function is_active_widget( $callback = false, $widget_id = false, $id_base = fal
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_widgets
|
||||
* @global array $wp_registered_widgets Registered widgets.
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
*
|
||||
* @return bool True if using widgets, false otherwise.
|
||||
@ -1226,7 +1226,7 @@ function _wp_sidebars_changed() {
|
||||
*
|
||||
* @global array $wp_registered_sidebars Registered sidebars.
|
||||
* @global array $sidebars_widgets
|
||||
* @global array $wp_registered_widgets
|
||||
* @global array $wp_registered_widgets Registered widgets.
|
||||
*
|
||||
* @param string|bool $theme_changed Whether the theme was changed as a boolean. A value
|
||||
* of 'customize' defers updates for the Customizer.
|
||||
@ -1676,7 +1676,7 @@ foreach ( array_keys( $default_inputs ) as $input ) :
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $widget_rss RSS widget feed data. Expects unescaped data.
|
||||
* @param bool $check_feed Optional, default is true. Whether to check feed for errors.
|
||||
* @param bool $check_feed Optional. Whether to check feed for errors. Default true.
|
||||
* @return array
|
||||
*/
|
||||
function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
|
||||
|
Loading…
Reference in New Issue
Block a user