| | 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 | |
| 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’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 | | |