]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/custom-background.php
WordPress 4.3-scripts
[autoinstalls/wordpress.git] / wp-admin / custom-background.php
index fc320f9f416045cd8c090ce71df0226fb9d04bdb..36a5b504fad8067c0bbba7fc6d7d03a9a81d43f3 100644 (file)
@@ -108,7 +108,6 @@ class Custom_Background {
         * @since 3.0.0
         */
        public function take_action() {
-
                if ( empty($_POST) )
                        return;
 
@@ -177,7 +176,7 @@ class Custom_Background {
        public function admin_page() {
 ?>
 <div class="wrap" id="custom-background">
-<h2><?php _e( 'Custom Background' ); ?></h2>
+<h1><?php _e( 'Custom Background' ); ?></h1>
 
 <?php if ( current_user_can( 'customize' ) ) { ?>
 <div class="notice notice-info hide-if-no-customize">
@@ -260,6 +259,7 @@ class Custom_Background {
 </tr>
 <?php endif; ?>
 
+<?php if ( current_user_can( 'upload_files' ) ): ?>
 <tr>
 <th scope="row"><?php _e('Select Image'); ?></th>
 <td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
@@ -279,6 +279,7 @@ class Custom_Background {
        </form>
 </td>
 </tr>
+<?php endif; ?>
 </tbody>
 </table>
 
@@ -357,7 +358,6 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) )
         * @since 3.0.0
         */
        public function handle_upload() {
-
                if ( empty($_FILES) )
                        return;
 
@@ -434,6 +434,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 +446,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;