Changeset 1159818
- Timestamp:
- 05/13/2015 06:13:26 PM (11 years ago)
- Location:
- terrys-commentary/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
terrys-commentary.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
terrys-commentary/trunk/readme.txt
r1159789 r1159818 21 21 regular HTML. It also supports shortcodes to generate them. Use the following 22 22 shortcode: 23 `[commentary text=" INSERT TOOLTIP TEXT HERE"]INSERT TARGET TEXTHERE[/commentary]`23 `[commentary text="TOOLTIP TEXT HERE"]TARGET HTML HERE[/commentary]` 24 24 25 25 For backward compatibility reasons, any tags with `class="commentary" title="tooltip"` are similarly enabled. … … 34 34 == Frequently Asked Questions == 35 35 36 = How do I make the fancy tooltips like the one in the [demo](http://osvaldas.info/examples/elegant-css-and-jquery-tooltip-responsive-mobile-friendly/) = 37 38 Add the following lines to your theme's `functions.php`: 39 40 ```php 41 function you_already_know($ignore) { 42 return 'fancy.css'; 43 } 44 add_filter( 'tccomment_default_css', 'you_already_know' ); 45 ``` 46 47 = I can style my own tooltips. I don't need the default or fancy stylesheet getting in the way. = 48 49 Add the following line to your theme's `functions.php`: 50 51 ```php 52 add_filter( 'tccomment_add_default_css', '__return_false' ); 53 ``` 54 55 The plugin's css file will no longer be loaded. 56 57 = I can't see where my tooltips are? = 58 59 The default stylesheet does not highlight tooltip targets in any way. To 60 highlight them in a manner common to most tooltips, go into your theme's 61 `style.css` and add the lines 62 63 ```css 64 [rel~="tooltip"] { 65 cursor: pointer; 66 border-bottom: 1px dashed #ccc; 67 } 68 ``` 69 70 = Give me a shortcode button in the editor! = 71 72 Maybe. I don't use the editor. :-P 73 74 = `commentary` is too hard to spell, I want a regular `tooltip` shortcode = 75 76 By default, I didn't want to override the `tooltip` shortcode as it would 77 change/break ACE-based themes and other plugins that use it. If you want a 78 normal tooltip, add the following line to your theme's `functions.php`: 79 80 ```php 81 add_filter( 'tccomment_add_tooltip_shortcode', '__return_true' ); 82 ``` 83 84 Then you can use shortcodes in the form of `[tooltip text="target"]content[/tooltip]`. (Programmers note: this is in the `init` hook to load after theme 85 files and such.) 86 87 = How do I add stuff to the "theme's `functions.php` or `style.css`" = 88 89 The best way is to install [One-Click Child Theme](https://wordpress.org/plugins/one-click-child-theme/) 90 and make a child theme of your blog's theme. This will ensure that changes you 91 make will not get overwritten when the parent theme is upgraded. Then simply 92 navigate to `Appearance > Editor` in the WordPress admin panel. By default it 93 will open your theme's Stylesheet `style.css` and you can edit the 94 `functions.php` by clicking on `Theme Functions` on the right side. 95 36 Please see [the plugin homepage](http://terrychay.com/wordpress-plugins/terrys-commentary) (It's easier to show code samples on my blog.) 96 37 97 38 == Screenshots == -
terrys-commentary/trunk/terrys-commentary.php
r1159386 r1159818 2 2 /* 3 3 Plugin Name: Terry's commentary 4 Plugin URI: http://terrychay.com/ article/this-is-my-tooltip.shtml4 Plugin URI: http://terrychay.com/wordpress-plugins/terrys-commentary 5 5 Description: Make commentary a tooltip, support tooltips 6 6 Version: 1.0
Note: See TracChangeset
for help on using the changeset viewer.