mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-09-08 01:50:18 +00:00
For doc block types, favor bool over the few remaining booleans
See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -319,7 +319,7 @@ function export_wp( $args = array() ) {
|
||||
*
|
||||
* @param bool $return_me
|
||||
* @param string $meta_key
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function wxr_filter_postmeta( $return_me, $meta_key ) {
|
||||
if ( '_edit_lock' == $meta_key )
|
||||
|
||||
@@ -837,7 +837,7 @@ function copy_dir($from, $to, $skip_list = array() ) {
|
||||
* the `WP_Filesystem_*()` classes. Default false.
|
||||
* @param string|false $context Optional. Context for get_filesystem_method(). Default false.
|
||||
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
|
||||
* @return null|boolean false on failure, true on success.
|
||||
* @return null|bool false on failure, true on success.
|
||||
*/
|
||||
function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
|
||||
global $wp_filesystem;
|
||||
@@ -996,13 +996,13 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
|
||||
*
|
||||
* @todo Properly mark optional arguments as such
|
||||
*
|
||||
* @param string $form_post the URL to post the form to
|
||||
* @param string $type the chosen Filesystem method in use
|
||||
* @param boolean $error if the current request has failed to connect
|
||||
* @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
|
||||
* @param array $extra_fields Extra POST fields which should be checked for to be included in the post.
|
||||
* @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
|
||||
* @return boolean False on failure. True on success.
|
||||
* @param string $form_post the URL to post the form to
|
||||
* @param string $type the chosen Filesystem method in use
|
||||
* @param bool $error if the current request has failed to connect
|
||||
* @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
|
||||
* @param array $extra_fields Extra POST fields which should be checked for to be included in the post.
|
||||
* @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
|
||||
* @return bool False on failure. True on success.
|
||||
*/
|
||||
function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ function wp_image_editor($post_id, $msg = false) {
|
||||
* @param WP_Image_Editor $image
|
||||
* @param string $mime_type
|
||||
* @param int $post_id
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function wp_stream_image( $image, $mime_type, $post_id ) {
|
||||
if ( $image instanceof WP_Image_Editor ) {
|
||||
@@ -264,7 +264,7 @@ function wp_stream_image( $image, $mime_type, $post_id ) {
|
||||
* @param WP_Image_Editor $image
|
||||
* @param string $mime_type
|
||||
* @param int $post_id
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
|
||||
if ( $image instanceof WP_Image_Editor ) {
|
||||
@@ -552,7 +552,7 @@ function image_edit_apply_changes( $image, $changes ) {
|
||||
* in $_REQUEST['history']
|
||||
*
|
||||
* @param int $post_id
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function stream_preview_image( $post_id ) {
|
||||
$post = get_post( $post_id );
|
||||
|
||||
@@ -1493,7 +1493,7 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
}
|
||||
if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) )
|
||||
&& post_type_supports( get_post_type( $calling_post_id ), 'thumbnail' ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) {
|
||||
|
||||
|
||||
$calling_post = get_post( $calling_post_id );
|
||||
$calling_post_type_object = get_post_type_object( $calling_post->post_type );
|
||||
|
||||
@@ -1743,11 +1743,11 @@ function media_upload_header() {
|
||||
|
||||
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
||||
|
||||
if ( ! empty( $post_id ) ) {
|
||||
$post_type = get_post_type( $post_id );
|
||||
if ( ! empty( $post_id ) ) {
|
||||
$post_type = get_post_type( $post_id );
|
||||
} else {
|
||||
$post_type = '';
|
||||
}
|
||||
$post_type = '';
|
||||
}
|
||||
|
||||
echo '<script type="text/javascript">post_id = ' . $post_id . ';post_type = ' . $post_type . ';</script>';
|
||||
if ( empty( $_GET['chromeless'] ) ) {
|
||||
@@ -3024,7 +3024,7 @@ function wp_read_video_metadata( $file ) {
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param string $file Path to file.
|
||||
* @return array|boolean Returns array of metadata, if found.
|
||||
* @return array|bool Returns array of metadata, if found.
|
||||
*/
|
||||
function wp_read_audio_metadata( $file ) {
|
||||
if ( ! file_exists( $file ) )
|
||||
|
||||
@@ -1482,9 +1482,9 @@ function get_settings_errors( $setting = '', $sanitize = false ) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $setting Optional slug title of a specific setting who's errors you want.
|
||||
* @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
|
||||
* @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
|
||||
* @param string $setting Optional slug title of a specific setting who's errors you want.
|
||||
* @param bool $sanitize Whether to re-sanitize the setting value before returning errors.
|
||||
* @param bool $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
|
||||
*/
|
||||
function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user