Make WordPress Core

Ticket #30177: 30177.option2.diff

File 30177.option2.diff, 3.5 KB (added by rzen, 12 years ago)
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index b0f2525..9e25c6c 100644
    function _wp_admin_html_begin() { 
    18741874}
    18751875
    18761876final class WP_Internal_Pointers {
     1877
     1878        public static function __callStatic( $method, $args ) {
     1879                $deprecated_pointers = self::get_deprecated_pointers();
     1880                if ( in_array( $method, array_keys( $deprecated_pointers ) ) ) {
     1881                        return _deprecated_function( $method, $deprecated_pointers[ $method ] );
     1882                }
     1883        }
     1884
     1885        /**
     1886         * Get all deprecated methods with the version in which they were deprecated.
     1887         *
     1888         * @since  4.1.0
     1889         *
     1890         * @return array Method name => version deprecated.
     1891         */
     1892        public static function get_deprecated_pointers() {
     1893                return array(
     1894                        'pointer_wp330_media_uploader'               => '3.7.0',
     1895                        'pointer_wp330_toolbar'                      => '3.9.0',
     1896                        'pointer_wp330_saving_widgets'               => '3.9.0',
     1897                        'pointer_wp340_customize_current_theme_link' => '3.9.0',
     1898                        'pointer_wp340_choose_image_from_library'    => '3.9.0',
     1899                        'pointer_wp350_media'                        => '4.1.0',
     1900                        'pointer_wp360_revisions'                    => '4.1.0',
     1901                        'pointer_wp360_locks'                        => '4.1.0',
     1902                );
     1903        }
     1904
    18771905        /**
    18781906         * Initializes the new feature pointers.
    18791907         *
    final class WP_Internal_Pointers { 
    18921920                 */
    18931921
    18941922                $registered_pointers = array(
    1895                         'post-new.php' => 'wp350_media',
    1896                         'post.php'     => array( 'wp350_media', 'wp360_revisions' ),
    1897                         'edit.php'     => 'wp360_locks',
    18981923                        'widgets.php'  => 'wp390_widgets',
    18991924                        'themes.php'   => 'wp390_widgets',
    19001925                );
    final class WP_Internal_Pointers { 
    19812006                <?php
    19822007        }
    19832008
    1984         public static function pointer_wp330_toolbar() {}
    1985         public static function pointer_wp330_media_uploader() {}
    1986         public static function pointer_wp330_saving_widgets() {}
    1987         public static function pointer_wp340_customize_current_theme_link() {}
    1988         public static function pointer_wp340_choose_image_from_library() {}
    1989 
    1990         public static function pointer_wp350_media() {
    1991                 $content  = '<h3>' . __( 'New Media Manager' ) . '</h3>';
    1992                 $content .= '<p>' . __( 'Uploading files and creating image galleries has a whole new look. Check it out!' ) . '</p>';
    1993 
    1994                 self::print_js( 'wp350_media', '.insert-media', array(
    1995                         'content'  => $content,
    1996                         'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ),
    1997                 ) );
    1998         }
    1999 
    2000         public static function pointer_wp360_revisions() {
    2001                 $content  = '<h3>' . __( 'Compare Revisions' ) . '</h3>';
    2002                 $content .= '<p>' . __( 'View, compare, and restore other versions of this content on the improved revisions screen.' ) . '</p>';
    2003 
    2004                 self::print_js( 'wp360_revisions', '.misc-pub-section.misc-pub-revisions', array(
    2005                         'content' => $content,
    2006                         'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center' ),
    2007                 ) );
    2008         }
    2009 
    2010         public static function pointer_wp360_locks() {
    2011                 if ( ! is_multi_author() ) {
    2012                         return;
    2013                 }
    2014 
    2015                 $content  = '<h3>' . __( 'Edit Lock' ) . '</h3>';
    2016                 $content .= '<p>' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they&#8217;re done.' ) . '</p>';
    2017 
    2018                 self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array(
    2019                         'content' => $content,
    2020                         'position' => array( 'edge' => 'left', 'align' => 'left' ),
    2021                 ) );
    2022         }
    2023 
    20242009        public static function pointer_wp390_widgets() {
    20252010                if ( ! current_theme_supports( 'widgets' ) ) {
    20262011                        return;