Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rajeebbanstola/ae42bbfc478a54964973 to your computer and use it in GitHub Desktop.
Save rajeebbanstola/ae42bbfc478a54964973 to your computer and use it in GitHub Desktop.

Revisions

  1. @alexkingorg alexkingorg revised this gist Jan 14, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    /*
    Plugin Name: Fullscreen Preview Button
    Description: Add a preview button to the fullscreen editor toolbar.
    Version: 1.1
    Version: 1.2
    Author: Alex King
    Author URI: http://alexking.org
    License: GPL2
  2. @alexkingorg alexkingorg revised this gist Jan 14, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,14 @@
    License: GPL2
    */

    function ak_fullscreen_preview_button() {
    function akv3_fullscreen_preview_button() {
    ?>
    <script type="text/javascript">
    ;(function($) {
    var $preview = $('#post-preview');
    $preview.clone()
    .removeAttr('id').removeClass('preview')
    .css('margin-right', '5px')
    .removeAttr('id').removeClass('preview').addClass('right')
    .css('margin-left', '5px')
    .click(function(e) {
    $preview.click();
    e.preventDefault();
    @@ -26,5 +26,5 @@ function ak_fullscreen_preview_button() {
    </script>
    <?php
    }
    add_action('admin_footer-post-new.php', 'ak_fullscreen_preview_button');
    add_action('admin_footer-post.php', 'ak_fullscreen_preview_button');
    add_action('admin_footer-post-new.php', 'akv3_fullscreen_preview_button');
    add_action('admin_footer-post.php', 'akv3_fullscreen_preview_button');
  3. Alex King revised this gist Jul 8, 2012. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    /*
    Plugin Name: Fullscreen Preview Button
    Description: Add a preview button to the fullscreen editor toolbar.
    Version: 1.0
    Version: 1.1
    Author: Alex King
    Author URI: http://alexking.org
    License: GPL2
    @@ -13,9 +13,15 @@ function ak_fullscreen_preview_button() {
    ?>
    <script type="text/javascript">
    ;(function($) {
    $('#post-preview').clone()
    var $preview = $('#post-preview');
    $preview.clone()
    .removeAttr('id').removeClass('preview')
    .prependTo('#wp-fullscreen-save');
    .css('margin-right', '5px')
    .click(function(e) {
    $preview.click();
    e.preventDefault();
    })
    .insertBefore('#wp-fullscreen-save input.button-primary');
    }(jQuery));
    </script>
    <?php
  4. Alex King revised this gist Jul 7, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,8 @@ function ak_fullscreen_preview_button() {
    ?>
    <script type="text/javascript">
    ;(function($) {
    $('#post-preview').clone().removeAttr('id').removeClass('preview')
    $('#post-preview').clone()
    .removeAttr('id').removeClass('preview')
    .prependTo('#wp-fullscreen-save');
    }(jQuery));
    </script>
  5. Alex King revised this gist Jul 6, 2012. 1 changed file with 11 additions and 4 deletions.
    15 changes: 11 additions & 4 deletions wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,15 @@
    <?php

    // Add a preview button to the fullscreen editor toolbar.
    /*
    Plugin Name: Fullscreen Preview Button
    Description: Add a preview button to the fullscreen editor toolbar.
    Version: 1.0
    Author: Alex King
    Author URI: http://alexking.org
    License: GPL2
    */

    function akv3_fullscreen_preview_button() {
    function ak_fullscreen_preview_button() {
    ?>
    <script type="text/javascript">
    ;(function($) {
    @@ -12,5 +19,5 @@ function akv3_fullscreen_preview_button() {
    </script>
    <?php
    }
    add_action('admin_footer-post-new.php', 'akv3_fullscreen_preview_button');
    add_action('admin_footer-post.php', 'akv3_fullscreen_preview_button');
    add_action('admin_footer-post-new.php', 'ak_fullscreen_preview_button');
    add_action('admin_footer-post.php', 'ak_fullscreen_preview_button');
  6. Alex King created this gist Jul 6, 2012.
    16 changes: 16 additions & 0 deletions wp-fullscreen-preview-button.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?php

    // Add a preview button to the fullscreen editor toolbar.

    function akv3_fullscreen_preview_button() {
    ?>
    <script type="text/javascript">
    ;(function($) {
    $('#post-preview').clone().removeAttr('id').removeClass('preview')
    .prependTo('#wp-fullscreen-save');
    }(jQuery));
    </script>
    <?php
    }
    add_action('admin_footer-post-new.php', 'akv3_fullscreen_preview_button');
    add_action('admin_footer-post.php', 'akv3_fullscreen_preview_button');