Plugin Directory

Changeset 1214689


Ignore:
Timestamp:
08/07/2015 08:32:48 AM (11 years ago)
Author:
Shellbot
Message:

Fix various errors & conflict with Bootstrap tooltip class.

Location:
advanced-custom-tooltips/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • advanced-custom-tooltips/trunk/README.txt

    r1205625 r1214689  
    7070== Changelog ==
    7171
     72= 1.0.1 =
     73* Bugfix: Activation warning, tooltips limit & Bootstrap class conflict.
    7274= 1.0.0 =
    7375* First release
     76
     77== Upgrade Notice ==
     78
     79= 1.0.1 =
     80* Bugfix: Activation warning, tooltips limit & Bootstrap class conflict.
  • advanced-custom-tooltips/trunk/admin/class-advanced-custom-tooltips-admin.php

    r1205625 r1214689  
    9494    function add_tooltip_cpt() {
    9595        $labels = array(
    96         'name'               => _x( 'Tooltips', 'post type general name', 'sb-act' ),
    97         'singular_name'      => _x( 'Tooltip', 'post type singular name', 'sb-act' ),
    98         'menu_name'          => _x( 'Tooltips', 'admin menu', 'sb-act' ),
    99         'name_admin_bar'     => _x( 'Tooltips', 'add new on admin bar', 'sb-act' ),
    100         'add_new'            => _x( 'Add New', 'tooltip', 'sb-act' ),
    101         'add_new_item'       => __( 'Add New Tooltip', 'sb-act' ),
    102         'new_item'           => __( 'New Tooltip', 'sb-act' ),
    103         'edit_item'          => __( 'Edit Tooltip', 'sb-act' ),
    104         'view_item'          => __( 'View Tooltip', 'sb-act' ),
    105         'all_items'          => __( 'All Tooltips', 'sb-act' ),
    106         'search_items'       => __( 'Search Tooltips', 'sb-act' ),
    107         'parent_item_colon'  => __( 'Parent Tooltips:', 'sb-act' ),
    108         'not_found'          => __( 'No tooltips found.', 'sb-act' ),
    109         'not_found_in_trash' => __( 'No tooltips found in Trash.', 'sb-act' )
     96        'name'               => _x( 'Tooltips', 'post type general name', 'advanced-custom-tooltips' ),
     97        'singular_name'      => _x( 'Tooltip', 'post type singular name', 'advanced-custom-tooltips' ),
     98        'menu_name'          => _x( 'Tooltips', 'admin menu', 'advanced-custom-tooltips' ),
     99        'name_admin_bar'     => _x( 'Tooltips', 'add new on admin bar', 'advanced-custom-tooltips' ),
     100        'add_new'            => _x( 'Add New', 'tooltip', 'advanced-custom-tooltips' ),
     101        'add_new_item'       => __( 'Add New Tooltip', 'advanced-custom-tooltips' ),
     102        'new_item'           => __( 'New Tooltip', 'advanced-custom-tooltips' ),
     103        'edit_item'          => __( 'Edit Tooltip', 'advanced-custom-tooltips' ),
     104        'view_item'          => __( 'View Tooltip', 'advanced-custom-tooltips' ),
     105        'all_items'          => __( 'All Tooltips', 'advanced-custom-tooltips' ),
     106        'search_items'       => __( 'Search Tooltips', 'advanced-custom-tooltips' ),
     107        'parent_item_colon'  => __( 'Parent Tooltips:', 'advanced-custom-tooltips' ),
     108        'not_found'          => __( 'No tooltips found.', 'advanced-custom-tooltips' ),
     109        'not_found_in_trash' => __( 'No tooltips found in Trash.', 'advanced-custom-tooltips' )
    110110        );
    111111
     
    151151             }
    152152             $tooltip_content = $content;
    153              return '<span class="tooltip" title="' . $tooltip_content . '">' . $tooltip_text . '</span>';
     153             return '<span class="act-tooltip" title="' . $tooltip_content . '">' . $tooltip_text . '</span>';
    154154         }
    155155
     
    170170         endwhile; endif; wp_reset_query();
    171171
    172          return '<span class="tooltip" title="' . do_shortcode( $tooltip_content ) . '">' . $tooltip_text . '</span>';
     172         return '<span class="act-tooltip" title="' . do_shortcode( $tooltip_content ) . '">' . $tooltip_text . '</span>';
    173173
    174174     }
     
    193193                  'id'              => 'wpact-tooltip-settings',
    194194                  'parent_slug'     => 'edit.php?post_type=act_tooltip',
    195                   'page_title'      => __( 'Advanced Custom Tooltips - Global Settings', 'wp-craft-blogger' ),
    196                   'menu_title'      => __( 'Settings', 'wp-craft-blogger' ),
     195                  'page_title'      => __( 'Advanced Custom Tooltips - Global Settings', 'advanced-custom-tooltips' ),
     196                  'menu_title'      => __( 'Settings', 'advanced-custom-tooltips' ),
    197197                  'capability'      => 'edit_theme_options',
    198198                  'menu_slug'       => 'wpact-settings',
    199199                  'icon_url'        => null,
    200200                  'position'        => null,
    201                   'updated_message' => __( 'Settings updated', 'wp-craft-blogger' ),
    202                   'reset_message'   => __( 'Settings reset', 'wp-craft-blogger' ),
    203                   'button_text'     => __( 'Save changes', 'wp-craft-blogger' ),
     201                  'updated_message' => __( 'Settings updated', 'advanced-custom-tooltips' ),
     202                  'reset_message'   => __( 'Settings reset', 'advanced-custom-tooltips' ),
     203                  'button_text'     => __( 'Save changes', 'advanced-custom-tooltips' ),
    204204                  'show_buttons'    => true,
    205205                  'screen_icon'     => 'options-general',
     
    208208                    array(
    209209                      'id'          => 'wpact-general',
    210                       'title'       => __( 'General', 'wp-craft-blogger' ),
     210                      'title'       => __( 'General', 'advanced-custom-tooltips' ),
    211211                    ),
    212212                                    array(
    213213                      'id'          => 'wpact-styles',
    214                       'title'       => __( 'Styling', 'wp-craft-blogger' ),
     214                      'title'       => __( 'Styling', 'advanced-custom-tooltips' ),
    215215                    ),
    216216                  ),
     
    251251                                    array(
    252252                                        'id'                    => 'trigger_color',
    253                                         'label'             => 'Color for trigger style',
     253                                        'label'             => __( 'Color for trigger style', 'advanced-custom-tooltips' ),
    254254                                        'section'           => 'wpact-styles',
    255255                                        'type'              => 'colorpicker',
     
    258258                                    array(
    259259                                        'id'                    => 'tooltip_background_color',
    260                                         'label'             => 'Color for tooltip background',
     260                                        'label'             => __( 'Color for tooltip background', 'advanced-custom-tooltips' ),
    261261                                        'section'           => 'wpact-styles',
    262262                                        'type'              => 'colorpicker',
     
    265265                                    array(
    266266                                        'id'                    => 'tooltip_text_color',
    267                                         'label'             => 'Color for tooltip text',
     267                                        'label'             => __( 'Color for tooltip text', 'advanced-custom-tooltips' ),
    268268                                        'section'           => 'wpact-styles',
    269269                                        'type'              => 'colorpicker',
     
    272272                                    array(
    273273                                        'id'                    => 'tooltip_border_color',
    274                                         'label'             => 'Color for tooltip border',
     274                                        'label'             => __( 'Color for tooltip border', 'advanced-custom-tooltips' ),
    275275                                        'section'           => 'wpact-styles',
    276276                                        'type'              => 'colorpicker',
     
    279279                                    array(
    280280                                        'id'                    => 'tooltip_corner_style',
    281                                         'label'             => 'Tooltip corner style',
     281                                        'label'             => __( 'Tooltip corner style', 'advanced-custom-tooltips' ),
    282282                                        'section'           => 'wpact-styles',
    283283                                        'type'              => 'radio',
  • advanced-custom-tooltips/trunk/advanced-custom-tooltips.php

    r1205625 r1214689  
    1010 * Plugin URI:        http://codebyshellbot.com/wordpress-plugins/advanced-custom-tooltips
    1111 * Description:       Advanced tooltip creator
    12  * Version:           1.0.0
     12 * Version:           1.0.1
    1313 * Author:            Shellbot
    1414 * Author URI:        http://codebyshellbot.com
  • advanced-custom-tooltips/trunk/includes/class-advanced-custom-tooltips.php

    r1205625 r1214689  
    7979
    8080        $this->plugin_name = 'Advanced Custom Tooltips';
    81         $this->version = '1.0.0';
     81        $this->version = '1.0.1';
    8282        $this->defaults = $this->set_defaults();
    8383
  • advanced-custom-tooltips/trunk/public/class-advanced-custom-tooltips-public.php

    r1205625 r1214689  
    7272        $this->version = $version;
    7373        $this->defaults = $defaults;
    74         $this->global_settings = array_merge( $defaults, get_option( 'wpact_global_settings' ) );
     74        $this->global_settings = ( get_option( 'wpact_global_settings' ) ? array_merge( $defaults, get_option( 'wpact_global_settings' ) ) : $defaults );
    7575
    7676    }
     
    117117            case 'all':
    118118                foreach( $tooltips as $tooltip ) {
    119                     $content = str_replace( $tooltip->post_title, '<span class="tooltip" title="' . htmlentities( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $content );
     119                    $content = str_replace( $tooltip->post_title, '<span class="act-tooltip" title="' . htmlentities( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $content );
    120120                }
    121121            break;
     
    124124                    $pos = strpos( $content, $tooltip->post_title );
    125125                    if ($pos !== false) {
    126                         $content = substr_replace( $content, '<span class="tooltip" title="' . htmlentities( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $pos, strlen( $tooltip->post_title ) );
     126                        $content = substr_replace( $content, '<span class="act-tooltip" title="' . htmlentities( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $pos, strlen( $tooltip->post_title ) );
    127127                    }
    128128                }
     
    144144        $query = array (
    145145                'post_type' => 'act_tooltip',
     146                'posts_per_page' => -1,
    146147        );
    147148
     
    222223        <script type="text/javascript">
    223224            jQuery(document).ready(function() {
    224                 jQuery('.tooltip').tooltipster({
     225                jQuery('.act-tooltip').tooltipster({
    225226                    contentAsHTML: true,
    226227                    interactive: true
Note: See TracChangeset for help on using the changeset viewer.