Plugin Directory

Changeset 1888967


Ignore:
Timestamp:
06/07/2018 02:50:16 PM (8 years ago)
Author:
Shellbot
Message:

Compatibility update for latest version of WP

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

Legend:

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

    r1286242 r1888967  
    33Tags: tooltips, tooltip, hover, hint, bubble, textbubble, shortcode,
    44Requires at least: 3.0.1
    5 Tested up to: 4.3
     5Tested up to: 4.9.6
    66Donate link: http://patreon.com/shellbot
    77Stable tag: trunk
     
    7474== Changelog ==
    7575
     76= 1.1.0 =
     77* Compatibility update for latest version of WP
     78
    7679= 1.0.2 =
    7780* Formatting improvements for tooltip content
     
    8689== Upgrade Notice ==
    8790
     91= 1.1.0 =
     92* Compatibility update for latest version of WP
     93
    8894= 1.0.2 =
    8995* Tooltip formatting improvements plus a new trigger text color setting.
  • advanced-custom-tooltips/trunk/admin/class-advanced-custom-tooltips-admin.php

    r1286242 r1888967  
    6060        $this->version = $version;
    6161        $this->defaults = $defaults;
     62       
     63        add_filter( 'ot_show_pages', '__return_false' );
     64        add_filter( 'ot_use_theme_options', '__return_false' );
    6265
    6366    }
     
    326329  }
    327330
    328     /**
    329      * OptionTree options framework for generating plugin settings page & metaboxes.
    330      *
    331      * Only needs to load if no other theme/plugin already loaded it.
    332      *
    333      * @since 0.0.1
    334      */
    335     function include_optiontree() {
    336 
    337         if ( ! class_exists( 'OT_Loader' ) ) {
    338                         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/option-tree/ot-loader.php';
    339 
    340             /* TODO - probably shouldn't be doing this here */
    341             add_filter( 'ot_show_pages', '__return_false' );
    342             add_filter( 'ot_use_theme_options', '__return_false' );
    343         }
    344 
    345     }
    346 
    347331}
  • advanced-custom-tooltips/trunk/advanced-custom-tooltips.php

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

    r1286242 r1888967  
    108108     */
    109109    private function load_dependencies() {
     110       
     111        /**
     112         * OptionTree framework for plugin settings page.
     113         * Only load if not already loaded from elsewhere.
     114         */
     115         
     116        if ( ! class_exists( 'OT_Loader' ) ) {
     117            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/option-tree/ot-loader.php';
     118        }
    110119
    111120        /**
     
    166175
    167176        $this->loader->add_action( 'init', $plugin_admin, 'add_tooltip_cpt' );
    168                 $this->loader->add_action( 'init', $plugin_admin, 'register_tooltip_settings_page' );
     177        $this->loader->add_action( 'init', $plugin_admin, 'register_tooltip_settings_page' );
    169178        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
    170179        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    171         $this->loader->add_action( 'after_setup_theme', $plugin_admin, 'include_optiontree' );
    172180
    173181        $this->loader->add_filter( 'ot_header_logo_link', $plugin_admin, 'filter_header_logo_link' );
    174                 $this->loader->add_filter( 'ot_header_version_text', $plugin_admin, 'filter_header_version_text' );
     182        $this->loader->add_filter( 'ot_header_version_text', $plugin_admin, 'filter_header_version_text' );
    175183
    176184    }
  • advanced-custom-tooltips/trunk/public/class-advanced-custom-tooltips-public.php

    r1286242 r1888967  
    120120            case 'all':
    121121                foreach( $tooltips as $tooltip ) {
    122                     $content = str_replace( $tooltip->post_title, '<span class="act-tooltip" title="' . $this->format_tooltip_content( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $content );
     122                    $content = str_ireplace( $tooltip->post_title, '<span class="act-tooltip" title="' . $this->format_tooltip_content( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $content );
    123123                }
    124124            break;
    125125            case 'first':
    126126                foreach( $tooltips as $tooltip ) {
    127                     $pos = strpos( $content, $tooltip->post_title );
     127
     128                    $pos = stripos( $content, $tooltip->post_title );
    128129                    if ($pos !== false) {
    129130                        $content = substr_replace( $content, '<span class="act-tooltip" title="' . $this->format_tooltip_content( $tooltip->post_content ) . '">' . $tooltip->post_title . '</span>', $pos, strlen( $tooltip->post_title ) );
Note: See TracChangeset for help on using the changeset viewer.