WordPress.org

Make WordPress Core

Changeset 24853


Ignore:
Timestamp:
07/29/2013 06:17:01 AM (8 years ago)
Author:
markjaquith
Message:

Tooltips for 3.6 features: Revisions, Post Locking.

Props siobhan. See #24832 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r24762 r24853  
    17351735            'index.php'    => 'wp330_toolbar',
    17361736            'post-new.php' => 'wp350_media',
    1737             'post.php'     => 'wp350_media',
     1737            'post.php'     => array( 'wp350_media', 'wp360_revisions' ),
     1738            'edit.php'     => 'wp360_locks',
    17381739            'themes.php'   => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ),
    17391740            'appearance_page_custom-header' => 'wp340_choose_image_from_library',
     
    17521753            'wp340_choose_image_from_library' => array( 'edit_theme_options' ),
    17531754            'wp350_media' => array( 'upload_files' ),
     1755            'wp360_revisions' => array( 'edit_posts' ),
     1756            'wp360_locks' => array( 'read' ),
    17541757        );
    17551758
     
    19011904    }
    19021905
     1906    public static function pointer_wp360_revisions() {
     1907        $content  = '<h3>' . __( 'Compare Revisions' ) . '</h3>';
     1908        $content .= '<p>' . __( 'View, compare, and restore other versions of this content on the improved revisions screen.' ) . '</p>';
     1909
     1910        self::print_js( 'wp360_revisions', '.misc-pub-section.num-revisions', array(
     1911            'content' => $content,
     1912            'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center', 'my' => is_rtl() ? 'left' : 'right-14px' ),
     1913        ) );
     1914    }
     1915
     1916    public static function pointer_wp360_locks() {
     1917        $content  = '<h3>' . __( 'Edit Lock' ) . '</h3>';
     1918        $content .= '<p>' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they&#8217;re done.' ) . '</p>';
     1919
     1920        if ( ! is_multi_author() )
     1921            return;
     1922
     1923        self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array(
     1924            'content' => $content,
     1925            'position' => array( 'edge' => 'left', 'align' => 'left' ),
     1926        ) );
     1927    }
     1928
    19031929    /**
    19041930     * Prevents new users from seeing existing 'new feature' pointers.
     
    19071933     */
    19081934    public static function dismiss_pointers_for_new_users( $user_id ) {
    1909         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' );
     1935        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,wp360_revisions,wp360_locks' );
    19101936    }
    19111937}
Note: See TracChangeset for help on using the changeset viewer.