Plugin Directory

Changeset 1201488


Ignore:
Timestamp:
07/18/2015 08:43:29 AM (11 years ago)
Author:
scriptrunner
Message:

added initial support for qTip2

Location:
wp-jquery-qtip/trunk
Files:
12 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-jquery-qtip/trunk/readme.txt

    r650047 r1201488  
    44Tags: tooltip, link text
    55Requires at least: 3.3
    6 Tested up to: 3.5
    7 Stable tag: 0.9.0
     6Tested up to: 4.2.2
     7Stable tag: 1.9.0
    88License: MIT License
    99License URI: http://www.opensource.org/licenses/mit-license.php
    1010
    11 WP jQuery qTip is a plugin that uses qTip v1.0 to display nice looking, user friendly tooltips. Colors and position are easily changeable.
     11WP jQuery qTip is a plugin that uses qTip v1.0 and v2.0 to display nice looking, user friendly tooltips. Colors and position are easily changeable.
    1212
    1313== Description ==
     
    3838and upgraded the plugin to work on the latest (3.5) WordPress.
    3939
     40But wait, this release has preliminary support for qTip2! I'll be lookng at qTip2 and see what I can add.
     41You can continue to use qTip1, I'll provide backwards compatibility for the foreseeable future.
     42Expect support for shortcodes at somepoint as well.
     43
    4044== Screenshots ==
    4145
     
    4650== Changelog ==
    4751
     52= 1.9.0 =
     53* Initial support for qTip2.
     54
    4855= 0.9.0 =
    4956* Initial release.
  • wp-jquery-qtip/trunk/wp-jquery-qtip.php

    r650049 r1201488  
    44Plugin URI: http://www.dougparling.org/
    55Description: JR qTip for Wordpress is a plugin that uses qTip to display nice looking, user friendly tooltips. Colors and position are easily changeable. Based on JR qTip for WordPress by Jacob Ras
    6 Version: 0.9.0
     6Version: 1.9.0
    77Author: Doug Sparling
    88Author URI: http://www.dougsparling.org
    99
    10     Copyright 2013 Doug Sparling (email : [email protected])
     10    Copyright 2013-2015 Doug Sparling (email : [email protected])
    1111    Copyright 2009  Jacob Ras    (email : [email protected])
    1212
     
    2929function wp_jquery_qtip() {
    3030
    31     $wp_jquery_qtip = get_option( 'wp_jquery_qtip' );
    32 
    33     if ( $wp_jquery_qtip['enable_qtip'] == 'on' ) {
    34 
    35         wp_enqueue_script( 'jquery' );
    36 
    37         wp_enqueue_script( 'jquery.qtip',
    38             plugin_dir_url( __FILE__ ) . 'js/jquery.qtip-1.0.0-rc3.min.js',
    39             array( 'jquery' ), '', 1 );
    40 
    41         wp_enqueue_script( 'wp_jquery_qtip_tooltip',
    42           plugin_dir_url( __FILE__ ) . 'js/wp_jquery_qtip_tooltip.js',
    43           array( 'jquery', 'jquery.qtip' ), '', 1 );
    44 
    45         $params = array(
    46           'tooltip_color' => $wp_jquery_qtip['tooltip_color'],
    47           'tooltip_target' =>  $wp_jquery_qtip['tooltip_target'],
    48           'tooltip_position' => $wp_jquery_qtip['tooltip_position']
    49         );
    50 
    51         wp_localize_script( 'wp_jquery_qtip_tooltip', 'wp_jquery_qtip_params', $params );
    52 
    53     }
     31    $wp_jquery_qtip = get_option( 'wp_jquery_qtip' );
     32
     33    if ( $wp_jquery_qtip['enable_qtip'] == 'on' ) {
     34
     35        if ( $wp_jquery_qtip['tooltip_version'] == 1 ) {
     36            wp_register_script( 'jquery.qtip', plugins_url( 'js/jquery.qtip-1.0.0-rc3.min.js', __FILE__ ) );
     37            wp_enqueue_script( 'jquery.qtip', array( 'jquery' ) );
     38
     39            wp_register_script( 'wp_jquery_qtip_tooltip', plugins_url( 'js/wp_jquery_qtip_tooltip.js', __FILE__ ) );
     40            wp_enqueue_script( 'wp_jquery_qtip_tooltip', array( 'jquery', 'jquery.qtip' ) );
     41        } else {
     42            wp_register_script( 'jquery.qtip', plugins_url( 'js/qTip2/jquery.qtip.min.js', __FILE__ ) );
     43            wp_enqueue_script( 'jquery.qtip', array('jquery'));
     44
     45            wp_register_script( 'wp_jquery_qtip_tooltip', plugins_url( 'js/qTip2/wp_jquery_qtip_tooltip.js', __FILE__ ) );
     46            wp_enqueue_script( 'wp_jquery_qtip_tooltip', array( 'jquery', 'jquery.qtip' ) );
     47
     48            wp_register_style('jquery.qtip', plugins_url( 'css/qTip2/jquery.qtip.min.css', __FILE__ ) );
     49            wp_enqueue_style( 'jquery.qtip');
     50        }
     51
     52        $params = array(
     53            'tooltip_version'  => $wp_jquery_qtip['tooltip_version'],
     54            'tooltip_color'    => $wp_jquery_qtip['tooltip_color'], // Style
     55            'tooltip_target'   =>  $wp_jquery_qtip['tooltip_target'],
     56            'tooltip_position' => $wp_jquery_qtip['tooltip_position']
     57        );
     58
     59        wp_localize_script( 'wp_jquery_qtip_tooltip', 'wp_jquery_qtip_params', $params );
     60
     61    }
    5462}
    5563
     
    6775                $wp_jquery_qtip['enable_qtip'] = '';
    6876            }
     77            $wp_jquery_qtip['tooltip_version'] = $_POST['wp_jquery_qtip_tooltip_version'];
    6978            $wp_jquery_qtip['tooltip_color'] = $_POST['wp_jquery_qtip_tooltip_color'];
    7079            $wp_jquery_qtip['tooltip_target'] = $_POST['wp_jquery_qtip_tooltip_target'];
     
    96105                                </tr>
    97106
    98                                 <tr>
    99                                     <th valign="top">
    100                                         <label>Tooltip color:</label>
     107                                <tr>
     108                                    <th valign="top">
     109                                        <label>qTip version</label>
     110                                    </th>
     111                                    <td valign="top">
     112                                        <select name="wp_jquery_qtip_tooltip_version">
     113                                            <option <?php if( $wp_jquery_qtip['tooltip_version'] == 1 ) { echo 'selected="selected"'; } ?> value="1">1&nbsp;&nbsp;&nbsp;</option>
     114                                            <option <?php if( $wp_jquery_qtip['tooltip_version'] == 2 ) { echo 'selected="selected"'; } ?> value="2">2&nbsp;&nbsp;&nbsp;</option>
     115                                        </select>
     116                                    </td>
     117                                </tr>
     118
     119                                <tr>
     120                                    <th valign="top">
     121                                        <label>Tooltip style:</label>
    101122                                    </th>
    102123                                    <td valign="top">
     
    164185
    165186                    <div class="postbox">
    166                     <h3>Tooltip color &amp; positioning preview:</h3>
     187                    <h3>Tooltip style &amp; positioning preview:</h3>
    167188                    <p style="text-align:center;">
    168189                        <img src="<?php echo get_bloginfo('url') . '/wp-content/plugins/wp-jquery-qtip/qtip_positioning.jpg'; ?>" />
     
    189210$wp_jquery_qtip = array();
    190211$wp_jquery_qtip['enable_qtip']       = 'on';
     212$wp_jquery_qtip['tooltip_version']   = 1;
    191213$wp_jquery_qtip['tooltip_color']     = 'cream';
    192214$wp_jquery_qtip['tooltip_target']    = 'bottomMiddle';
Note: See TracChangeset for help on using the changeset viewer.