Plugin Directory

Changeset 1013694


Ignore:
Timestamp:
10/25/2014 04:41:28 AM (11 years ago)
Author:
jkrill
Message:

Version 3.3.1
+ Conflict resolutions
+ Cleaning up CSS of settings page
+ added filters

Location:
wp-jump-menu
Files:
64 added
6 edited

Legend:

Unmodified
Added
Removed
  • wp-jump-menu/trunk/assets/js/colorpicker/css/layout.css

    r290497 r1013694  
    1 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 
     1body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
    22    margin:0;
    33    padding:0;
     
    77    border-spacing:0;
    88}
    9 fieldset,img { 
     9fieldset,img {
    1010    border:0;
    1111}
  • wp-jump-menu/trunk/assets/js/colorpicker/js/colorpicker.js

    r425251 r1013694  
    33 * Color picker
    44 * Author: Stefan Petre www.eyecon.ro
    5  * 
     5 *
    66 * Dual licensed under the MIT and GPL licenses
    7  * 
     7 *
    88 */
    99(function ($) {
     
    113113                    field: field,
    114114                    val: parseInt(field.val(), 10),
    115                     preview: $(this).parent().parent().data('colorpicker').livePreview                 
     115                    preview: $(this).parent().parent().data('colorpicker').livePreview
    116116                };
    117117                $(document).bind('mouseup', current, upIncrement);
     
    223223            },
    224224            hide = function (ev) {
    225                
     225
    226226                if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
    227227                    if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
     
    265265                    b: Math.min(100, Math.max(0, hsb.b))
    266266                };
    267             }, 
     267            },
    268268            fixRGB = function (rgb) {
    269269                return {
     
    284284                }
    285285                return hex;
    286             }, 
     286            },
    287287            HexToRGB = function (hex) {
    288288                var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
     
    303303                hsb.b = max;
    304304                if (max != 0) {
    305                    
     305
    306306                }
    307307                hsb.s = max != 0 ? 255 * delta / max : 0;
  • wp-jump-menu/trunk/assets/js/jqueryfunctions.js

    r639481 r1013694  
    11jQuery(document).ready(function() {
    2        
     2
    33        if (jQuery('#wpjm-options-form').length > 0) {
    44
     
    5353        }
    5454
    55    
     55
    5656
    5757});
  • wp-jump-menu/trunk/readme.txt

    r1013556 r1013694  
    77Requires at least: 3.2.1
    88Tested up to: 4.0
    9 Stable tag: 3.3
     9Stable tag: 3.3.1
    1010
    1111Creates a drop-down menu in the admin area which makes it easy to jump to a page, post, custom post type or media file for editing.
     
    5454== Frequently Asked Questions ==
    5555
     56= Is there any way to add additional content to the jump menu? =
     57
     58Yes.
     59
     60There are two filters that run at the beginning of the menu and at the end.
     61
     62The first is:
     63
     64`wpjm-filter-beginning-of-list`
     65
     66which happens after the first <option> which is "Select to Edit"
     67
     68and the second is:
     69
     70`wpjm-filter-end-of-list`
     71
     72which happens just before the last <optgroup> which is for the Jump Menu Settings page.
     73
     74Your filter function would look something like this:
     75
     76    function wpjm_filter( $wpjm_string ) {
     77
     78        $wpjm_string .= '<optgroup label="Global Content Blocks">';
     79        $wpjm_string .= '<option value="url-on-select">Option Name</option>';
     80        $wpjm_string .= '</optgroup>';
     81
     82        return $wpjm_string;
     83
     84    }
     85
     86And your apply_filters would look like this:
     87
     88`apply_filters( 'wpjm-beginning-of-list', 'wpjm-filter' )`
     89
    5690= The jump menu isn't working. =
    5791
     
    6296= How do I put my logo in? =
    6397
    64 You need to upload your logo icon, through WordPress maybe, and get the full URL to the image.  This you will put into the Logo Icon field in the options.
     98The branding options are only accessible when the position of the jump menu is set to top or bottom, and not WP Admin Bar. You need to upload your logo icon, through WordPress maybe, and get the full URL to the image.  This you will put into the Logo Icon field in the options.
    6599
    66100== Screenshots ==
     
    73107
    74108== Changelog ==
     109
     110= 3.3.1 =
     111* Resolved conflict with SOLA Newsletters plugin (and other plugins that used the same colorpicker javascript)
     112* Added filters for adding items at the beginning or end of menu (see FAQ for more instructions)
     113* Fixed some styling issues on the settings page
    75114
    76115= 3.3 =
  • wp-jump-menu/trunk/settings.php

    r1013556 r1013694  
    413413            <thead>
    414414            <tr>
    415                 <th scope="col" id="cb" class="manage-column column-cb check-column"><input type="checkbox" /></th>
    416                 <th scope="col" class="wpjm-post-types-title-col">Post Types</th>
    417                 <th scope="col" class="wpjm-numberposts-col">Show</th>
    418                 <th scope="col" class="wpjm-order-by-col">Order By</th>
    419                 <th scope="col" class="wpjm-order-col">Order</th>
    420                 <th scope="col" class="wpjm-showdrafts-col">Post Status</th>
     415                <th scope="col" id="cb" class="manage-column column-cb check-column">
     416                    <label class="screen-reader-text" for="cb-select-all-1">Select All</label>
     417                    <input id="cb-select-all-1" type="checkbox" /></th>
     418                <th scope="col" class="manage-column wpjm-post-types-title-col">Post Types</th>
     419                <th scope="col" class="manage-column wpjm-numberposts-col">Show</th>
     420                <th scope="col" class="manage-column wpjm-order-by-col">Order By</th>
     421                <th scope="col" class="manage-column wpjm-order-col">Order</th>
     422                <th scope="col" class="manage-column wpjm-showdrafts-col">Post Status</th>
    421423            </tr>
    422424            </thead>
    423425            <tfoot>
    424426            <tr>
    425                 <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></th>
    426                 <th scope="col" class="wpjm-post-types-title-col">Post Types</th>
    427                 <th scope="col" class="wpjm-numberposts-col">Show</th>
    428                 <th scope="col" class="wpjm-order-by-col">Order By</th>
    429                 <th scope="col" class="wpjm-order-col">Order</th>
    430                 <th scope="col" class="wpjm-showdrafts-col">Post Status</th>
     427                <th scope="col" class="manage-column column-cb check-column">
     428                    <label class="screen-reader-text" for="cb-select-all-2">Select All</label>
     429                    <input id="cb-select-all-2" type="checkbox" /></th>
     430                <th scope="col" class="manage-column wpjm-post-types-title-col">Post Types</th>
     431                <th scope="col" class="manage-column wpjm-numberposts-col">Show</th>
     432                <th scope="col" class="manage-column wpjm-order-by-col">Order By</th>
     433                <th scope="col" class="manage-column wpjm-order-col">Order</th>
     434                <th scope="col" class="manage-column wpjm-showdrafts-col">Post Status</th>
    431435            </tr>
    432436            </tfoot>
    433             <tbody>
     437            <tbody id="the-list">
    434438        <?php
    435439
     
    492496                }
    493497                ?>
    494             <tr class="<?php if ($alt==""){ $alt = "alternate"; } else { echo $alt; $alt = ""; } ?>" valign="top">
     498            <tr class="<?php if ($alt==""){ $alt = "alternate"; echo $alt; } else { $alt = ""; echo $alt; } ?>" valign="top">
    495499                <th class="check-column" scope="row">
    496500                    <input type="checkbox" name="wpjm_options[postTypes][<?php echo $pt->name; ?>][show]" id="wpjm_postType_<?php echo $pt->name; ?>" value="1" <?php checked($wpjm_options['postTypes'][$pt->name]['show'], 1 ); ?> />
     
    586590        <br>
    587591    </div>
    588 <script>
    589     // Hide the left TH column next to the table of post types
    590     ;(function($){
    591         $('#wpjm-post-types-table').parent().parent().prev().hide();
    592     })(jQuery);
    593     </script>
    594592<?php
    595593}
  • wp-jump-menu/trunk/wp-jump-menu.php

    r1013556 r1013694  
    33 * @package WP_Jump_Menu
    44 * @author Jim Krill
    5  * @version 3.3
     5 * @version 3.3.1
    66 */
    77/*
     
    99Plugin URI: http://wpjumpmenu.com
    1010Description: Creates a drop-down menu (jump menu) in a bar across the top or bottom of the screen that makes it easy to jump right to a page, post, or custom post type in the admin area to edit.
    11 Version: 3.3
     11Version: 3.3.1
    1212Author: Jim Krill
    1313Author URI: http://krillwebdesign.com
     
    4040        $this->path = plugin_dir_path( __FILE__ );
    4141        $this->dir = plugins_url( '', __FILE__ );
    42         $this->version = '3.3';
     42        $this->version = '3.3.1';
    4343        $this->upgrade_version = '';
    4444        $this->options = get_option( 'wpjm_options' );
     
    8181
    8282        // actions
    83         add_action('admin_menu', array( $this,'admin_menu'));
    84         add_action('admin_print_scripts', array( $this,'admin_head'));
    85         add_action('admin_print_styles', array( $this, 'wpjm_css'));
    86         add_action('plugin_action_links', array( $this,'plugin_action_links'), 10, 2);
    87         add_action('wp_print_scripts', array( $this, 'wpjm_js'));
     83        add_action( 'admin_menu', array( $this, 'admin_menu' ) );
     84        add_action( 'admin_print_scripts', array( $this, 'admin_head' ) );
     85        add_action( 'admin_print_scripts-settings_page_wpjm-options', array( $this, 'wpjm_settings_scripts' ) );
     86        add_action( 'admin_print_styles', array( $this, 'wpjm_css') );
     87        add_action( 'plugin_action_links', array( $this,'plugin_action_links'), 10, 2 );
     88        add_action( 'wp_print_scripts', array( $this, 'wpjm_js') );
    8889
    8990        if ( $this->options['position'] == 'wpAdminBar' )
     
    124125            'wpjm-colorpicker-css' => $this->dir . '/assets/js/colorpicker/css/colorpicker.css',
    125126            'chosencss' => $this->dir . '/assets/js/chosen/chosen.css',
    126             'chosencss-wpadminbar' => $this->dir . '/assets/js/chosen/chosen-wpadmin.css'
     127            'chosencss-wpadminbar' => $this->dir . '/assets/js/chosen/chosen-wpadmin.css',
     128            'wpjm-settings-css' => $this->dir . '/assets/css/wpjm-settings.css'
    127129        );
    128130
     
    157159    {
    158160        $this->options_page = add_options_page('Jump Menu Options','Jump Menu Options', 'edit_posts', 'wpjm-options', array( $this, 'wpjm_options_page'));
     161        error_log(print_r($this->options_page,true));
    159162    }
    160163
     
    176179        wp_enqueue_script( 'wpjm-jquery-ui-position' );
    177180        wp_enqueue_script( 'wpjm-jquery-functions' );
     181
     182    }
     183
     184    function wpjm_settings_scripts()
     185    {
     186        // Colorpicker
    178187        wp_enqueue_script( 'wpjm-jquery-colorpicker' );
    179 
    180         // Colorpicker
    181188        wp_enqueue_style( 'wpjm-colorpicker-css' );
    182189
     190        // Settings page CSS
     191        wp_enqueue_style( 'wpjm-settings-css' );
    183192    }
    184193
     
    215224                <form action="options.php" method="post" id="wpjm-options-form">
    216225                <?php settings_fields('wpjm_options'); ?>
    217                 <?php do_settings_sections('wpjm'); ?>
     226                <div class="wpjm-post-types-wrapper">
     227                    <?php do_settings_sections('wpjm'); ?>
     228                </div>
    218229                <p class="submit">
    219230                    <input type="Submit" type="submit" value="<?php esc_attr_e('Save Changes'); ?>" class="button button-primary" />
    220231                </p>
    221                 <?php do_settings_sections('wpjm-2'); ?>
     232                <div class="wpjm-additional-settings-wrapper">
     233                    <?php do_settings_sections('wpjm-2'); ?>
     234                </div>
    222235
    223236                <p class="submit">
     
    473486        }
    474487        $wpjm_string .= '<option>Select to Edit</option>';
     488
     489        $wpjm_string = apply_filters( 'wpjm-filter-beginning-of-list', $wpjm_string );
    475490
    476491        // Loop through custom posts types, and echo them out
     
    738753        } // end if ($custom_post_types)
    739754
     755        $wpjm_string = apply_filters( 'wpjm-filter-end-of-list', $wpjm_string );
     756
    740757        // Print the options page link
    741758        if ( current_user_can( 'activate_plugins' ) ) {
     
    746763
    747764        }
     765
     766
    748767
    749768        // Close the select drop down
     
    946965    }
    947966
     967
     968
    948969}
    949970
Note: See TracChangeset for help on using the changeset viewer.