]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/tools.php
WordPress 4.1-scripts
[autoinstalls/wordpress.git] / wp-admin / tools.php
1 <?php
2 /**
3  * Tools Administration Screen.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /** WordPress Administration Bootstrap */
10 require_once( dirname( __FILE__ ) . '/admin.php' );
11
12 $title = __('Tools');
13
14 get_current_screen()->add_help_tab( array(
15         'id'      => 'press-this',
16         'title'   => __('Press This'),
17         'content' => '<p>' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you&#8217;ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '</p>',
18 ) );
19 get_current_screen()->add_help_tab( array(
20         'id'      => 'converter',
21         'title'   => __('Categories and Tags Converter'),
22         'content' => '<p>' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' .
23         '<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin &amp; Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>',
24 ) );
25
26 get_current_screen()->set_help_sidebar(
27         '<p><strong>' . __('For more information:') . '</strong></p>' .
28         '<p>' . __('<a href="http://codex.wordpress.org/Tools_Screen" target="_blank">Documentation on Tools</a>') . '</p>' .
29         '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
30 );
31
32 require_once( ABSPATH . 'wp-admin/admin-header.php' );
33
34 ?>
35 <div class="wrap">
36 <h2><?php echo esc_html( $title ); ?></h2>
37
38 <?php if ( current_user_can('edit_posts') ) : ?>
39 <div class="tool-box">
40         <h3 class="title"><?php _e('Press This') ?></h3>
41         <p><?php _e('Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.');?></p>
42
43         <p><?php _e('Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.'); ?></p>
44         <p class="description"><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?></p>
45         <p class="pressthis"><a onclick="return false;" oncontextmenu="if(window.navigator.userAgent.indexOf('WebKit')!=-1||window.navigator.userAgent.indexOf('MSIE')!=-1){jQuery('.pressthis-code').show().find('textarea').focus().select();return false;}" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e('Press This') ?></span></a></p>
46         <div class="pressthis-code" style="display:none;">
47         <p class="description"><?php _e('If your bookmarks toolbar is hidden: copy the code below, open your Bookmarks manager, create new bookmark, type Press This into the name field and paste the code into the URL field.') ?></p>
48         <p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p>
49         </div>
50 </div>
51 <?php
52 endif;
53
54 if ( current_user_can( 'import' ) ) :
55 $cats = get_taxonomy('category');
56 $tags = get_taxonomy('post_tag');
57 if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
58 <div class="tool-box">
59     <h3 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h3>
60     <p><?php printf( __('If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.'), 'import.php' ); ?></p>
61 </div>
62 <?php
63 endif;
64 endif;
65
66 /**
67  * Fires at the end of the Tools Administration screen.
68  *
69  * @since 2.8.0
70  */
71 do_action( 'tool_box' );
72 ?>
73 </div>
74 <?php
75 include( ABSPATH . 'wp-admin/admin-footer.php' );