X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..a9fa37e08fa731c7bd108a175c24876823bc071b:/wp-admin/custom-background.php diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index fc320f9f..dba32c66 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -18,7 +18,7 @@ class Custom_Background { /** * Callback for administration header. * - * @var callback + * @var callable * @since 3.0.0 */ public $admin_header_callback; @@ -26,12 +26,16 @@ class Custom_Background { /** * Callback for header div. * - * @var callback + * @var callable * @since 3.0.0 */ public $admin_image_div_callback; /** + * Used to trigger a success message when settings updated and set to true. + * + * @since 3.0.0 + * @access private * @var bool */ private $updated; @@ -40,8 +44,8 @@ class Custom_Background { * Constructor - Register administration header callback. * * @since 3.0.0 - * @param callback $admin_header_callback - * @param callback $admin_image_div_callback Optional custom image div output callback. + * @param callable $admin_header_callback + * @param callable $admin_image_div_callback Optional custom image div output callback. */ public function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; @@ -108,7 +112,6 @@ class Custom_Background { * @since 3.0.0 */ public function take_action() { - if ( empty($_POST) ) return; @@ -177,7 +180,7 @@ class Custom_Background { public function admin_page() { ?>
-

+

@@ -260,6 +263,7 @@ class Custom_Background { +
@@ -279,6 +283,7 @@ class Custom_Background {
+ @@ -357,7 +362,6 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * @since 3.0.0 */ public function handle_upload() { - if ( empty($_FILES) ) return; @@ -434,6 +438,9 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * * @since 3.4.0 * @deprecated 3.5.0 + * + * @param array $form_fields + * @return array $form_fields */ public function attachment_fields_to_edit( $form_fields ) { return $form_fields; @@ -443,6 +450,9 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) * * @since 3.4.0 * @deprecated 3.5.0 + * + * @param array $tabs + * @return array $tabs */ public function filter_upload_tabs( $tabs ) { return $tabs;