Make WordPress Core

Ticket #17184: show_shortcut_prompt.patch

File show_shortcut_prompt.patch, 1.1 KB (added by johnjamesjacoby, 14 years ago)

show_shortcut_prompt()

  • tools.php

     
    3434
    3535        <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>
    3636        <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>
    37         <p class="pressthis"><a onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e('Press This') ?></span></a></p>
     37        <script type="text/javascript">
     38                function show_shortcut_prompt() {
     39                        prompt( "<?php _e( 'Paste this URL into a new bookmark' ); ?>", "<?php echo htmlspecialchars( get_shortcut_link() ); ?>" );
     40                }
     41        </script>
     42        <p class="pressthis"><a onclick="show_shortcut_prompt(); return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e('Press This') ?></span></a></p>
    3843</div>
    3944<?php
    4045endif;