Make WordPress Core

Ticket #20554: 20554.5.diff

File 20554.5.diff, 3.5 KB (added by ryan, 12 years ago)

custom background too

  • wp-admin/includes/template.php

     
    17081708                        'post-new.php' => 'wp330_media_uploader',
    17091709                        'post.php'     => 'wp330_media_uploader',
    17101710                        'themes.php'   => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ),
     1711                        'appearance_page_custom-header' => 'wp340_choose_header_from_library',
     1712                        'appearance_page_custom-background' => 'wp340_choose_header_from_library',
    17111713                );
    17121714
    17131715                // Check if screen related pointer is registered
     
    17201722                        'wp330_media_uploader' => array( 'upload_files' ),
    17211723                        'wp330_saving_widgets' => array( 'edit_theme_options', 'switch_themes' ),
    17221724                        'wp340_customize_current_theme_link' => array( 'edit_theme_options' ),
     1725                        'wp340_choose_header_from_library' => array( 'edit_theme_options' ),
    17231726                );
    17241727
    17251728                // Get dismissed pointers
     
    18451848        }
    18461849
    18471850        /**
     1851         * Print 'New Feature: Current Theme Customize Link' for 3.4.0.
     1852         *
     1853         * @since 3.4.0
     1854         */
     1855        public static function pointer_wp340_choose_header_from_library() {
     1856                $content  = '<h3>' . __( 'New Feature: Choose Image from Library' ) . '</h3>';
     1857                $content .= '<p>' . __( 'Want to use an image you uploaded earlier? Select it from your media library instead of uploading it again.' ) . '</p>';
     1858
     1859                WP_Internal_Pointers::print_js( 'wp340_choose_header_from_library', '#choose-from-library-link', array(
     1860                        'content'  => $content,
     1861                        'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left' ),
     1862                ) );
     1863        }
     1864
     1865        /**
    18481866         * Prevents new users from seeing existing 'new feature' pointers.
    18491867         *
    18501868         * @since 3.3.0
  • wp-admin/custom-header.php

     
    588588                $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
    589589                $image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url );
    590590        ?>
    591         <span class="howto"><?php _ex( 'or', 'Custom Header: Choose an image from your computer - or - Choose from image library' ); ?></span> <a class="thickbox" href="<?php echo $image_library_url; ?>"><?php _e( 'Choose from image library' ); ?></a>
     591        <span class="howto"><?php _ex( 'or', 'Custom Header: Choose an image from your computer - or - Choose from image library' ); ?></span> <a class="thickbox" id="choose-from-library-link" href="<?php echo $image_library_url; ?>"><?php _e( 'Choose from image library' ); ?></a>
    592592</td>
    593593</tr>
    594594<?php endif; ?>
  • wp-admin/custom-background.php

     
    260260        $image_library_url = add_query_arg( array( 'context' => 'custom-background', 'TB_iframe' => 1 ), $image_library_url );
    261261?>
    262262        </form>
    263         <span class="howto"><?php _ex( 'or', 'Custom Background: Choose an image from your computer - or - Choose from image library' ); ?></span> <a class="thickbox" href="<?php echo $image_library_url; ?>"><?php _e( 'Choose from image library' ); ?></a>
     263        <span class="howto"><?php _ex( 'or', 'Custom Background: Choose an image from your computer - or - Choose from image library' ); ?></span> <a id="choose-from-library-link" class="thickbox" href="<?php echo $image_library_url; ?>"><?php _e( 'Choose from image library' ); ?></a>
    264264</td>
    265265</tr>
    266266</tbody>