PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-admin/tools.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 63 lines | 47 code | 9 blank | 7 comment | 4 complexity | caa503d8def4023633713797c1f83ea4 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. /**
  3. * Tools Administration Screen.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. /** WordPress Administration Bootstrap */
  9. require_once('./admin.php');
  10. $title = __('Tools');
  11. add_contextual_help($current_screen,
  12. '<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>' .
  13. '<p>' . __('The Use This link for the Categories and Tags Converter will take you to the Import page, where that Converter is one of the plugins you can download. Once that plugin is installed, the link on this page takes you to a screen where you can choose conversion either way.') . '</p>' .
  14. '<p>' . __('Note: Turbo/Gears is no longer promoted on this screen as it was in previous versions due to the fact that Google has discontinued support for it.') . '</p>' .
  15. '<p><strong>' . __('For more information:') . '</strong></p>' .
  16. '<p>' . __('<a href="http://codex.wordpress.org/Tools_Screen" target="_blank">Documentation on Tools</a>') . '</p>' .
  17. '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
  18. );
  19. require_once('./admin-header.php');
  20. ?>
  21. <div class="wrap">
  22. <?php screen_icon(); ?>
  23. <h2><?php echo esc_html( $title ); ?></h2>
  24. <?php if ( current_user_can('edit_posts') ) : ?>
  25. <div class="tool-box">
  26. <h3 class="title"><?php _e('Press This') ?></h3>
  27. <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>
  28. <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>
  29. <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>
  30. <p class="pressthis"><a onclick="return false;" oncontextmenu="if(window.navigator.userAgent.indexOf('WebKit')!=-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>
  31. <div class="pressthis-code" style="display:none;">
  32. <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>
  33. <p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p>
  34. </div>
  35. </div>
  36. <?php
  37. endif;
  38. if ( current_user_can( 'import' ) ) :
  39. $cats = get_taxonomy('category');
  40. $tags = get_taxonomy('post_tag');
  41. if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
  42. <div class="tool-box">
  43. <h3 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h3>
  44. <p><?php printf( __('<a href="%s">Use this</a> to convert categories to tags or tags to categories.'), 'import.php' ); ?></p>
  45. </div>
  46. <?php
  47. endif;
  48. endif;
  49. do_action( 'tool_box' );
  50. ?>
  51. </div>
  52. <?php
  53. include('./admin-footer.php');
  54. ?>