mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Docs: Corrections and improvements to types used in various docblocks.
See #51800, #52217 git-svn-id: https://develop.svn.wordpress.org/trunk@49936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -872,8 +872,8 @@ function get_super_admins() {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param int $user_id (Optional) The ID of a user. Defaults to the current user.
|
||||
* @return bool True if the user is a site admin.
|
||||
* @param int|false $user_id Optional. The ID of a user. Defaults to false, to check the current user.
|
||||
* @return bool Whether the user is a site admin.
|
||||
*/
|
||||
function is_super_admin( $user_id = false ) {
|
||||
if ( ! $user_id || get_current_user_id() == $user_id ) {
|
||||
|
||||
@@ -878,10 +878,10 @@ function get_comments_number( $post_id = 0 ) {
|
||||
* @since 0.71
|
||||
* @since 5.4.0 The `$deprecated` parameter was changed to `$post_id`.
|
||||
*
|
||||
* @param string $zero Optional. Text for no comments. Default false.
|
||||
* @param string $one Optional. Text for one comment. Default false.
|
||||
* @param string $more Optional. Text for more than one comment. Default false.
|
||||
* @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is the global `$post`.
|
||||
* @param string|false $zero Optional. Text for no comments. Default false.
|
||||
* @param string|false $one Optional. Text for one comment. Default false.
|
||||
* @param string|false $more Optional. Text for more than one comment. Default false.
|
||||
* @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is the global `$post`.
|
||||
*/
|
||||
function comments_number( $zero = false, $one = false, $more = false, $post_id = 0 ) {
|
||||
echo get_comments_number_text( $zero, $one, $more, $post_id );
|
||||
@@ -1108,9 +1108,9 @@ function get_comment_type( $comment_ID = 0 ) {
|
||||
*
|
||||
* @since 0.71
|
||||
*
|
||||
* @param string $commenttxt Optional. String to display for comment type. Default false.
|
||||
* @param string $trackbacktxt Optional. String to display for trackback type. Default false.
|
||||
* @param string $pingbacktxt Optional. String to display for pingback type. Default false.
|
||||
* @param string|false $commenttxt Optional. String to display for comment type. Default false.
|
||||
* @param string|false $trackbacktxt Optional. String to display for trackback type. Default false.
|
||||
* @param string|false $pingbacktxt Optional. String to display for pingback type. Default false.
|
||||
*/
|
||||
function comment_type( $commenttxt = false, $trackbacktxt = false, $pingbacktxt = false ) {
|
||||
if ( false === $commenttxt ) {
|
||||
@@ -1199,7 +1199,7 @@ function trackback_url( $deprecated_echo = true ) {
|
||||
*
|
||||
* @since 0.71
|
||||
*
|
||||
* @param int $deprecated Not used (Was $timezone = 0).
|
||||
* @param int|string $deprecated Not used (Was $timezone = 0).
|
||||
*/
|
||||
function trackback_rdf( $deprecated = '' ) {
|
||||
if ( ! empty( $deprecated ) ) {
|
||||
@@ -1980,13 +1980,13 @@ function comment_id_fields( $post_id = 0 ) {
|
||||
*
|
||||
* @global WP_Comment $comment Global comment object.
|
||||
*
|
||||
* @param string $no_reply_text Optional. Text to display when not replying to a comment.
|
||||
* Default false.
|
||||
* @param string $reply_text Optional. Text to display when replying to a comment.
|
||||
* Default false. Accepts "%s" for the author of the comment
|
||||
* being replied to.
|
||||
* @param string $link_to_parent Optional. Boolean to control making the author's name a link
|
||||
* to their comment. Default true.
|
||||
* @param string|false $no_reply_text Optional. Text to display when not replying to a comment.
|
||||
* Default false.
|
||||
* @param string|false $reply_text Optional. Text to display when replying to a comment.
|
||||
* Default false. Accepts "%s" for the author of the comment
|
||||
* being replied to.
|
||||
* @param bool $link_to_parent Optional. Boolean to control making the author's name a link
|
||||
* to their comment. Default true.
|
||||
*/
|
||||
function comment_form_title( $no_reply_text = false, $reply_text = false, $link_to_parent = true ) {
|
||||
global $comment;
|
||||
|
||||
@@ -2716,7 +2716,7 @@ function wp_update_comment_count_now( $post_id ) {
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $url URL to ping.
|
||||
* @param int $deprecated Not Used.
|
||||
* @param string $deprecated Not Used.
|
||||
* @return string|false String containing URI on success, false on failure.
|
||||
*/
|
||||
function discover_pingback_server_uri( $url, $deprecated = '' ) {
|
||||
|
||||
@@ -99,7 +99,7 @@ function wp_embed_defaults( $url = '' ) {
|
||||
* @see WP_oEmbed
|
||||
*
|
||||
* @param string $url The URL that should be embedded.
|
||||
* @param array $args {
|
||||
* @param array|string $args {
|
||||
* Optional. Additional arguments for retrieving embed HTML. Default empty.
|
||||
*
|
||||
* @type int|string $width Optional. The `maxwidth` value passed to the provider URL.
|
||||
|
||||
@@ -934,9 +934,9 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
|
||||
* @since 1.5.0
|
||||
* @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
|
||||
*
|
||||
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
|
||||
* @param string $path Optional. Path to the directory containing the .mo file.
|
||||
* Default false.
|
||||
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
|
||||
* @param string|false $path Optional. Path to the directory containing the .mo file.
|
||||
* Default false.
|
||||
* @return bool True when textdomain is successfully loaded, false otherwise.
|
||||
*/
|
||||
function load_theme_textdomain( $domain, $path = false ) {
|
||||
@@ -974,9 +974,9 @@ function load_theme_textdomain( $domain, $path = false ) {
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
|
||||
* @param string $path Optional. Path to the directory containing the .mo file.
|
||||
* Default false.
|
||||
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
|
||||
* @param string|false $path Optional. Path to the directory containing the .mo file.
|
||||
* Default false.
|
||||
* @return bool True when the theme textdomain is successfully loaded, false otherwise.
|
||||
*/
|
||||
function load_child_theme_textdomain( $domain, $path = false ) {
|
||||
|
||||
@@ -3362,7 +3362,7 @@ add_shortcode( 'video', 'wp_video_shortcode' );
|
||||
*
|
||||
* @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array
|
||||
* of width and height values in pixels (in that order). Default 'thumbnail'.
|
||||
* @param string $text Optional. Link text. Default false.
|
||||
* @param string|false $text Optional. Link text. Default false.
|
||||
*/
|
||||
function previous_image_link( $size = 'thumbnail', $text = false ) {
|
||||
adjacent_image_link( true, $size, $text );
|
||||
@@ -3377,7 +3377,7 @@ function previous_image_link( $size = 'thumbnail', $text = false ) {
|
||||
*
|
||||
* @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array
|
||||
* of width and height values in pixels (in that order). Default 'thumbnail'.
|
||||
* @param string $text Optional. Link text. Default false.
|
||||
* @param string|false $text Optional. Link text. Default false.
|
||||
*/
|
||||
function next_image_link( $size = 'thumbnail', $text = false ) {
|
||||
adjacent_image_link( false, $size, $text );
|
||||
|
||||
@@ -2298,7 +2298,7 @@ function maybe_add_existing_user_to_blog() {
|
||||
*
|
||||
* @since MU (3.0.0)
|
||||
*
|
||||
* @param array $details {
|
||||
* @param array|false $details {
|
||||
* User details. Must at least contain values for the keys listed below.
|
||||
*
|
||||
* @type int $user_id The ID of the user being added to the current blog.
|
||||
|
||||
@@ -1058,8 +1058,8 @@ function wp_user_settings() {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $name The name of the setting.
|
||||
* @param string $default Optional default value to return when $name is not set.
|
||||
* @param string $name The name of the setting.
|
||||
* @param string|false $default Optional. Default value to return when $name is not set. Default false.
|
||||
* @return mixed The last saved user setting or the default value/false if it doesn't exist.
|
||||
*/
|
||||
function get_user_setting( $name, $default = false ) {
|
||||
|
||||
@@ -5843,7 +5843,7 @@ function is_local_attachment( $url ) {
|
||||
* @see wp_insert_post()
|
||||
*
|
||||
* @param string|array $args Arguments for inserting an attachment.
|
||||
* @param string $file Optional. Filename.
|
||||
* @param string|false $file Optional. Filename.
|
||||
* @param int $parent Optional. Parent post ID.
|
||||
* @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false.
|
||||
* @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true.
|
||||
@@ -7415,7 +7415,7 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
|
||||
* @access private
|
||||
*
|
||||
* @param string $post_name Slug.
|
||||
* @param string $post_ID Optional. Post ID that should be ignored. Default 0.
|
||||
* @param int $post_ID Optional. Post ID that should be ignored. Default 0.
|
||||
*/
|
||||
function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_ID = 0 ) {
|
||||
$trashed_posts_with_desired_slug = get_posts(
|
||||
|
||||
Reference in New Issue
Block a user