WordPress.org

Make WordPress Core

Changeset 19389


Ignore:
Timestamp:
11/21/2011 11:04:35 PM (9 years ago)
Author:
nacin
Message:

Remove old dismissed pointers as the IDs have changed. Switch to underscores that way we don't need to translate them for method names. Avoid an empty pointer in the array. see #18693.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r19132 r19389  
    15761576//  check_ajax_referer( 'dismiss-pointer_' . $pointer );
    15771577
    1578     $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
     1578    $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) );
    15791579
    15801580    if ( in_array( $pointer, $dismissed ) )
  • trunk/wp-admin/includes/template.php

    r19388 r19389  
    16741674     *     remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
    16751675     *
    1676      * Individual pointers (e.g. wp330-toolbar) can be disabled using the following:
     1676     * Individual pointers (e.g. wp330_toolbar) can be disabled using the following:
    16771677     *     remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp330_toolbar' ) );
    16781678     */
     
    16831683         */
    16841684        $registered_pointers = array(
    1685             'index.php'    => 'wp330-toolbar',
    1686             'post-new.php' => 'wp330-media-uploader',
    1687             'themes.php'   => 'wp330-saving-widgets',
     1685            'index.php'    => 'wp330_toolbar',
     1686            'post-new.php' => 'wp330_media_uploader',
     1687            'post.php'     => 'wp330_media_uploader',
     1688            'themes.php'   => 'wp330_saving_widgets',
    16881689        );
    16891690
     
    17021703
    17031704        // Bind pointer print function
    1704         add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . str_replace( '-', '_', $pointer ) ) );
     1705        add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) );
    17051706
    17061707        // Add pointers script and style to queue
     
    17541755            $content .= '<p>' .esc_js( __( 'Network Admin is now located in the My Sites menu.' ) ) . '</p>';
    17551756
    1756         WP_Internal_Pointers::print_js( 'wp330-toolbar', '#wpadminbar', array(
     1757        WP_Internal_Pointers::print_js( 'wp330_toolbar', '#wpadminbar', array(
    17571758            'content'  => $content,
    17581759            'position' => array( 'edge' => 'top', 'align' => 'center' ),
     
    17691770        $content .= '<p>' . esc_js( __( 'The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.' ) ) . '</p>';
    17701771
    1771         WP_Internal_Pointers::print_js( 'wp330-media-uploader', '#content-add_media', array(
     1772        WP_Internal_Pointers::print_js( 'wp330_media_uploader', '#content-add_media', array(
    17721773            'content'  => $content,
    17731774            'position' => array( 'edge' => 'left', 'align' => 'center' ),
     
    17841785        $content .= '<p>' . esc_js( __( 'If you change your mind and revert to your previous theme, we&#8217;ll put the widgets back the way you had them.' ) ) . '</p>';
    17851786
    1786         WP_Internal_Pointers::print_js( 'wp330-saving-widgets', '#message2', array(
     1787        WP_Internal_Pointers::print_js( 'wp330_saving_widgets', '#message2', array(
    17871788            'content'  => $content,
    17881789            'position' => array( 'edge' => 'top', 'align' => 'left' ),
  • trunk/wp-admin/includes/upgrade.php

    r19062 r19389  
    452452        upgrade_300();
    453453
    454     if ( $wp_current_db_version < 19061 )
     454    if ( $wp_current_db_version < 19389 )
    455455        upgrade_330();
    456456
     
    11461146        $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" );
    11471147    }
     1148
     1149    // 3.3-beta. Can remove before release.
     1150    if ( $wp_current_db_version > 18715 && $wp_current_db_version < 19389
     1151        && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) )
     1152            delete_metadata( 'user', 0, 'dismissed_wp_pointers', '', true );
     1153
    11481154
    11491155    if ( $wp_current_db_version >= 11548 )
  • trunk/wp-includes/version.php

    r19364 r19389  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 19364;
     14$wp_db_version = 19389;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.