Changeset 32654 for trunk/src/wp-admin/custom-header.php
- Timestamp:
- 05/29/2015 08:16:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-header.php
r32642 r32654 318 318 } 319 319 ?> 320 321 320 <script type="text/javascript"> 322 321 (function($){ … … 926 925 * 927 926 * @since 3.4.0 927 * 928 * @param array $form_fields 929 * @return $form_fields 928 930 */ 929 931 public function attachment_fields_to_edit( $form_fields ) { … … 935 937 * 936 938 * @since 3.4.0 939 * 940 * @param array $tabs 941 * @return $tabs 937 942 */ 938 943 public function filter_upload_tabs( $tabs ) { … … 951 956 * 952 957 * @since 3.4.0 958 * 959 * @param array|object|string $choice 953 960 */ 954 961 final public function set_header_image( $choice ) { … … 1002 1009 */ 1003 1010 final public function remove_header_image() { 1004 return$this->set_header_image( 'remove-header' );1011 $this->set_header_image( 'remove-header' ); 1005 1012 } 1006 1013 … … 1016 1023 $default = get_theme_support( 'custom-header', 'default-image' ); 1017 1024 1018 if ( ! $default ) 1019 return $this->remove_header_image(); 1020 1025 if ( ! $default ) { 1026 $this->remove_header_image(); 1027 return; 1028 } 1021 1029 $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ); 1022 1030 … … 1036 1044 * Calculate width and height based on what the currently selected theme supports. 1037 1045 * 1046 * @param array $dimensions 1038 1047 * @return array dst_height and dst_width of header image. 1039 1048 */ … … 1085 1094 * Create an attachment 'object'. 1086 1095 * 1087 * @param string $cropped Cropped image URL.1088 * @param int $parent_attachment_id Attachment ID of parent image.1096 * @param string $cropped Cropped image URL. 1097 * @param int $parent_attachment_id Attachment ID of parent image. 1089 1098 * 1090 1099 * @return array Attachment object. … … 1113 1122 * Insert an attachment and its metadata. 1114 1123 * 1115 * @param array $objectAttachment object.1124 * @param array $object Attachment object. 1116 1125 * @param string $cropped Cropped image URL. 1117 1126 * … … 1241 1250 } 1242 1251 1252 /** 1253 * 1254 * @param WP_Customize_Manager $wp_customize 1255 */ 1243 1256 public function customize_set_last_used( $wp_customize ) { 1244 1257 $data = $wp_customize->get_setting( 'header_image_data' )->post_value(); … … 1253 1266 } 1254 1267 1268 /** 1269 * 1270 * @return array 1271 */ 1255 1272 public function get_default_header_images() { 1256 1273 $this->process_default_headers(); … … 1286 1303 1287 1304 // The rest of the set comes after. 1288 $header_images = array_merge( $header_images, $this->default_headers ); 1289 return $header_images; 1290 } 1291 1305 return array_merge( $header_images, $this->default_headers ); 1306 } 1307 1308 /** 1309 * 1310 * @return array 1311 */ 1292 1312 public function get_uploaded_header_images() { 1293 1313 $header_images = get_uploaded_header_images();
Note: See TracChangeset
for help on using the changeset viewer.