X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/53f4633144ed68c8b8fb5861f992b5489894a940..3d39054f012aefe514b3f5509e32f09fc4feda44:/wp-admin/custom-header.php diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index e61feb78..fc5adb67 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -18,7 +18,7 @@ class Custom_Image_Header { /** * Callback for administration header. * - * @var callback + * @var callable * @since 2.1.0 */ public $admin_header_callback; @@ -26,7 +26,7 @@ class Custom_Image_Header { /** * Callback for header div. * - * @var callback + * @var callable * @since 3.0.0 */ public $admin_image_div_callback; @@ -41,6 +41,10 @@ class Custom_Image_Header { public $default_headers = array(); /** + * Used to trigger a success message when settings updated and set to true. + * + * @since 3.0.0 + * @access private * @var bool */ private $updated; @@ -49,8 +53,8 @@ class Custom_Image_Header { * Constructor - Register administration header callback. * * @since 2.1.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; @@ -257,6 +261,9 @@ class Custom_Image_Header { * Random image option is on by default if no header has been set. * * @since 3.0.0 + * + * @param string $type The header type. One of 'default' (for the Uploaded Images control) + * or 'uploaded' (for the Uploaded Images control). */ public function show_header_selector( $type = 'default' ) { if ( 'default' == $type ) { @@ -278,14 +285,13 @@ class Custom_Image_Header { foreach ( $headers as $header_key => $header ) { $header_thumbnail = $header['thumbnail_url']; $header_url = $header['url']; - $header_desc = empty( $header['description'] ) ? '' : $header['description']; - $header_alt_text = empty( $header['alt_text'] ) ? $header_desc : $header['alt_text']; + $header_alt_text = empty( $header['alt_text'] ) ? '' : $header['alt_text']; echo '