mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-11 10:59:07 +01:00
Feature pointers:
* Finalize the text for the media pointer. Offer it for translation. * Remove the favorites pointer. fixes #22454. git-svn-id: http://core.svn.wordpress.org/trunk@22874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
735c64c965
commit
fe3ace4f05
@ -1674,7 +1674,6 @@ final class WP_Internal_Pointers {
|
|||||||
'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ),
|
'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ),
|
||||||
'appearance_page_custom-header' => 'wp340_choose_image_from_library',
|
'appearance_page_custom-header' => 'wp340_choose_image_from_library',
|
||||||
'appearance_page_custom-background' => 'wp340_choose_image_from_library',
|
'appearance_page_custom-background' => 'wp340_choose_image_from_library',
|
||||||
'plugin-install.php' => 'wp350_favorites',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if screen related pointer is registered
|
// Check if screen related pointer is registered
|
||||||
@ -1828,8 +1827,8 @@ final class WP_Internal_Pointers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function pointer_wp350_media() {
|
public static function pointer_wp350_media() {
|
||||||
$content = '<h3>' . ( 'New Media Uploader' ) . '</h3>';
|
$content = '<h3>' . __( 'New Media Manager' ) . '</h3>';
|
||||||
$content .= '<p>' . ( 'Uploading and inserting images and other files has never been easier.' ) . '</p>';
|
$content .= '<p>' . __( 'Uploading files and creating image galleries has a whole new look. Check it out!' ) . '</p>';
|
||||||
|
|
||||||
self::print_js( 'wp350_media', '.insert-media', array(
|
self::print_js( 'wp350_media', '.insert-media', array(
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
@ -1837,23 +1836,13 @@ final class WP_Internal_Pointers {
|
|||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function pointer_wp350_favorites() {
|
|
||||||
$content = '<h3>' . __( 'New Feature: Plugin Favorites' ) . '</h3>';
|
|
||||||
$content .= '<p>' . __( 'If you have favorited plugins on WordPress.org, you can now install them directly from this tab.' ) . '</p>';
|
|
||||||
|
|
||||||
self::print_js( 'wp350_favorites', '.plugin-install-favorites', array(
|
|
||||||
'content' => $content,
|
|
||||||
'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left', 'offset' => is_rtl() ? '40 0' : '-40 0' ),
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevents new users from seeing existing 'new feature' pointers.
|
* Prevents new users from seeing existing 'new feature' pointers.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
public static function dismiss_pointers_for_new_users( $user_id ) {
|
public static function dismiss_pointers_for_new_users( $user_id ) {
|
||||||
add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media,wp350_favorites' );
|
add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user