Changeset 1888967
- Timestamp:
- 06/07/2018 02:50:16 PM (8 years ago)
- Location:
- advanced-custom-tooltips/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (3 diffs)
-
admin/class-advanced-custom-tooltips-admin.php (modified) (2 diffs)
-
advanced-custom-tooltips.php (modified) (1 diff)
-
includes/class-advanced-custom-tooltips.php (modified) (2 diffs)
-
public/class-advanced-custom-tooltips-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-custom-tooltips/trunk/README.txt
r1286242 r1888967 3 3 Tags: tooltips, tooltip, hover, hint, bubble, textbubble, shortcode, 4 4 Requires at least: 3.0.1 5 Tested up to: 4. 35 Tested up to: 4.9.6 6 6 Donate link: http://patreon.com/shellbot 7 7 Stable tag: trunk … … 74 74 == Changelog == 75 75 76 = 1.1.0 = 77 * Compatibility update for latest version of WP 78 76 79 = 1.0.2 = 77 80 * Formatting improvements for tooltip content … … 86 89 == Upgrade Notice == 87 90 91 = 1.1.0 = 92 * Compatibility update for latest version of WP 93 88 94 = 1.0.2 = 89 95 * Tooltip formatting improvements plus a new trigger text color setting. -
advanced-custom-tooltips/trunk/admin/class-advanced-custom-tooltips-admin.php
r1286242 r1888967 60 60 $this->version = $version; 61 61 $this->defaults = $defaults; 62 63 add_filter( 'ot_show_pages', '__return_false' ); 64 add_filter( 'ot_use_theme_options', '__return_false' ); 62 65 63 66 } … … 326 329 } 327 330 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.1334 */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 347 331 } -
advanced-custom-tooltips/trunk/advanced-custom-tooltips.php
r1286242 r1888967 10 10 * Plugin URI: http://codebyshellbot.com/wordpress-plugins/advanced-custom-tooltips 11 11 * Description: Advanced tooltip creator 12 * Version: 1. 0.212 * Version: 1.1.0 13 13 * Author: Shellbot 14 14 * Author URI: http://codebyshellbot.com -
advanced-custom-tooltips/trunk/includes/class-advanced-custom-tooltips.php
r1286242 r1888967 108 108 */ 109 109 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 } 110 119 111 120 /** … … 166 175 167 176 $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' ); 169 178 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 170 179 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 171 $this->loader->add_action( 'after_setup_theme', $plugin_admin, 'include_optiontree' );172 180 173 181 $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' ); 175 183 176 184 } -
advanced-custom-tooltips/trunk/public/class-advanced-custom-tooltips-public.php
r1286242 r1888967 120 120 case 'all': 121 121 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 ); 123 123 } 124 124 break; 125 125 case 'first': 126 126 foreach( $tooltips as $tooltip ) { 127 $pos = strpos( $content, $tooltip->post_title ); 127 128 $pos = stripos( $content, $tooltip->post_title ); 128 129 if ($pos !== false) { 129 130 $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.