?>
</p>
<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>
<div class="pressthis-code" style="display:none;">
	<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>
	<p><textarea rows="5" cols="120" readonly="readonly"><?php 
echo htmlspecialchars(get_shortcut_link());
?>
</textarea></p>
</div>

<?php 
if (apply_filters('enable_post_by_email_configuration', true)) {
    ?>
<h3><?php 
    _e('Post via e-mail');
    ?>
</h3>
<p><?php 
    printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <kbd>%s</kbd>, <kbd>%s</kbd>, <kbd>%s</kbd>.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false));
    ?>
</p>
<?php endif; ?>

<?php
do_settings_fields('writing', 'default');
do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
?>
</table>

<h3 class="title"><?php _e('Press This') ?></h3>
<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>
<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>
<p><?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>
<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>
<div class="pressthis-code" style="display:none;">
	<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>
	<p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p>
</div>

<?php
/** This filter is documented in wp-admin/options.php */
if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
?>
<h3 class="title"><?php _e('Post via e-mail') ?></h3>
<p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <kbd>%s</kbd>, <kbd>%s</kbd>, <kbd>%s</kbd>.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?></p>

<table class="form-table">
<tr>
<th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th>
<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" />
<label for="mailserver_port"><?php _e('Port') ?></label>
<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" />
</div>

<div class="headline-feature feature-video">
	<embed type="application/x-shockwave-flash" src="https://v0.wordpress.com/player.swf?v=1.04" width="1000" height="560" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=e9kH4FzP&amp;isDynamicSeeking=true"></embed>
</div>

<hr />

<div class="feature-section two-col">
	<div class="col">
		<h3><?php _e( 'An easier way to share content' ); ?></h3>
		<p><?php printf( __( 'Clip it, edit it, publish it. Get familiar with the new and improved Press This. From the <a href="%s">Tools</a> menu, add Press This to your browser bookmark bar or your mobile device home screen. Once installed you can share your content with lightning speed. Sharing your favorite videos, images, and content has never been this fast or this easy.' ), admin_url( 'tools.php' ) ); ?></p>
		<p><?php _e( 'Drag the bookmarklet below to your bookmarks bar. Then, when you&#8217;re on a page you want to share, simply &#8220;press&#8221; it.' ); ?></p>

		<p class="pressthis-bookmarklet-demo">
			<a class="pressthis-bookmarklet" onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ); ?></span></a>
		</p>
	</div>

	<div class="col">
		<img src="//s.w.org/images/core/4.2/press-this.jpg" />
	</div>
</div>

<div class="feature-section two-col">
	<div class="col">
		<img src="//s.w.org/images/core/4.2/unicode.png" />
	</div>
	<div class="col">
		<h3><?php _e( 'Extended character support' ); ?></h3>
		<p><?php _e( 'Writing in WordPress, whatever your language, just got better. WordPress 4.2 supports a host of new characters out-of-the-box, including native Chinese, Japanese, and Korean characters, musical and mathematical symbols, and hieroglyphs.' ); ?></p>
Beispiel #4
0
    /**
     * Prints a custom options page for PT
     *
     * @since 4.2
     *
     * @see $this->register_options_page()
     */
    public function do_options_page()
    {
        /**
         * Adding the following <style> block here. I need to review how to properly add CSS to this page
         */
        ?>
		<style type="text/css">
			.postbox-pt {
				margin: 20px 0 0 0;
				padding: 0.7em 2em 1em;
				max-width: 420px;
			}

			.postbox-pt textarea {
				width: 100%;
				font-size: 1em;
			}

			.postbox-pt h4 {
				margin: 2em 0 1em;
			}

			.pressthis {
				vertical-align: top;
				position: relative;
				z-index: 1;
			}

			p.pressthis .button {
				margin-left: 10px;
				padding: 0;
				height: auto;
				vertical-align: top;
			}
			.pressthis button .dashicons {
				margin: 5px 8px 6px 7px;
				color: #777;
			}

		</style>
		<div class="wrap">
			<h2><?php 
        echo get_admin_page_title();
        ?>
</h2>
			<div class="postbox postbox-pt">
				<h3><?php 
        _e('What it is?');
        ?>
</h3>
				<p><?php 
        _e('Press This is a little app that lets you grab bits of the web and create new posts with ease.');
        ?>
</p>
				<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>
			</div>
			<form>
			<div class="postbox postbox-pt">
				<h3><?php 
        _e('Install Press This');
        ?>
</h3>
				<h4><?php 
        _e('Bookmarklet');
        ?>
</h4>
				<p><?php 
        _e('Drag the bookmarklet below to your bookmarks bar. Then, when you\'re on a page you want to share, simply "press" it.');
        ?>
</p>

				<p class="pressthis">
					<a class="" onclick="return false;" href="<?php 
        echo htmlspecialchars(get_shortcut_link());
        ?>
"><span><?php 
        _e('Press This');
        ?>
</span></a>
					<button type="button" class="button button-secondary js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap"><span class="dashicons dashicons-clipboard"></span><span class="screen-reader-text"><?php 
        _e('Copy Press This Bookmarklet');
        ?>
</span></button>
				</p>

				<div class="hidden js-pressthis-code-wrap">
					<p id="pressthis-code-desc"><?php 
        _e('If you can\'t drag it to your bookmarks, copy the following code and create new bookmark. Paste the code into the new bookmark\'s URL field.');
        ?>
</p>
					<p><textarea class="js-pressthis-code" rows="5" cols="120" readonly="readonly" aria-labelledby="pressthis-code-desc"><?php 
        echo htmlspecialchars(get_shortcut_link());
        ?>
</textarea></p>
				</div>


				<h4><?php 
        _e('Direct link (best for mobile)');
        ?>
</h4>
				<p><?php 
        _e('Follow the link to open Press This. Then add it to your device\'s bookmarks or home screen.');
        ?>
</p>

				<p>
					<a class="button button-secondary" href="<?php 
        echo htmlspecialchars(admin_url('press-this.php'));
        ?>
"><?php 
        _e('Open Press This');
        ?>
</a>
				</p>

			</div>
			</form>
		</div>
		<script>
			jQuery( document ).ready( function( $ ) {

				var $showPressThisWrap = $( '.js-show-pressthis-code-wrap' );
				var $pressthisCode = $( '.js-pressthis-code' );

				$showPressThisWrap.on( 'click', function( event ) {

					$(this).parent().next( '.js-pressthis-code-wrap' ).slideToggle(200);

					$( this ).attr( 'aria-expanded', $( this ).attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );

				});

				// Select Press This code when focusing (tabbing) or clicking the textarea.
				$pressthisCode.on( 'click focus', function() {

					var self = this;

					setTimeout( function() { self.select(); }, 50 );

				});

			});
		</script>
	<?php 
    }
Beispiel #5
0
?>
</a></li>
<?php 
do_action('post_relatedlinks_list');
?>
</ul>

<h5><?php 
_e('Shortcuts');
?>
</h5>
<p><?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.');
?>
  <a href="<?php 
echo get_shortcut_link();
?>
" title="<?php 
echo attribute_escape(__('Press This'));
?>
"><?php 
_e('Press This');
?>
</a></p>
</div>

<?php 
do_action('submitpost_box');
?>
</div>
<h5><?php _e('Related') ?></h5>

<ul>
<?php if ($post_ID): ?>
<li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
<?php endif; ?>
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
<li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
<li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
<li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
<li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
<?php do_action('post_relatedlinks_list'); ?>
</ul>

<h5><?php _e('Shortcuts') ?></h5>
<p><?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.') ?>  <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
</div>

<?php do_action('submitpost_box'); ?>
</div>

<div id="post-body">
<div id="titlediv">
<h3><label for="title"><?php _e('Title') ?></label></h3>
<div id="titlewrap">
	<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
</div>
<div class="inside">
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
	<div id="edit-slug-box">
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :