Version Description
- fully tested with WordPress 4.8
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.7.5
- collapse-o-matic.php +2 -2
- readme.txt +6 -4
- trunk/collapse-o-matic.php +0 -872
- trunk/dark_style.css +0 -53
- trunk/images/arrow-down-dark.png +0 -0
- trunk/images/arrow-down.png +0 -0
- trunk/images/arrow-up-dark.png +0 -0
- trunk/images/arrow-up.png +0 -0
- trunk/images/arrows.psd +0 -0
- trunk/images/collapse-o-matic-icon.png +0 -0
- trunk/js/collapse.js +0 -595
- trunk/light_style.css +0 -53
- trunk/readme.txt +0 -339
collapse-o-matic.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Collapse-O-Matic
|
|
4 |
Text Domain: jquery-collapse-o-matic
|
5 |
Plugin URI: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
6 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
7 |
-
Version: 1.7.
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: https://twinpictures.de/
|
10 |
License: GPL2
|
@@ -29,7 +29,7 @@ class WP_Collapse_O_Matic {
|
|
29 |
* Current version
|
30 |
* @var string
|
31 |
*/
|
32 |
-
var $version = '1.7.
|
33 |
|
34 |
/**
|
35 |
* Used as prefix for options entry
|
4 |
Text Domain: jquery-collapse-o-matic
|
5 |
Plugin URI: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
6 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
7 |
+
Version: 1.7.5
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: https://twinpictures.de/
|
10 |
License: GPL2
|
29 |
* Current version
|
30 |
* @var string
|
31 |
*/
|
32 |
+
var $version = '1.7.5';
|
33 |
|
34 |
/**
|
35 |
* Used as prefix for options entry
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: twinpictures, baden03
|
|
4 |
Donate link: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
|
6 |
Requires at least: 4.0
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 1.7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -50,6 +50,9 @@ No. Not even close.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
53 |
= 1.7.4 =
|
54 |
* fixed issue with external triggers for nested elements
|
55 |
* changed links to https
|
@@ -335,5 +338,4 @@ Fixed auto-expand of urls with id-anchors
|
|
335 |
* The plug-in came to be.
|
336 |
|
337 |
== Upgrade Notice ==
|
338 |
-
|
339 |
-
fully tested with WordPress 4.7.3
|
4 |
Donate link: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
|
6 |
Requires at least: 4.0
|
7 |
+
Tested up to: 4.8
|
8 |
+
Stable tag: 1.7.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 1.7.5 =
|
54 |
+
* fully tested with WordPress 4.8
|
55 |
+
|
56 |
= 1.7.4 =
|
57 |
* fixed issue with external triggers for nested elements
|
58 |
* changed links to https
|
338 |
* The plug-in came to be.
|
339 |
|
340 |
== Upgrade Notice ==
|
341 |
+
fully tested with WordPress 4.8
|
|
trunk/collapse-o-matic.php
DELETED
@@ -1,872 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Collapse-O-Matic
|
4 |
-
Text Domain: jquery-collapse-o-matic
|
5 |
-
Plugin URI: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
6 |
-
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
7 |
-
Version: 1.7.4
|
8 |
-
Author: twinpictures, baden03
|
9 |
-
Author URI: https://twinpictures.de/
|
10 |
-
License: GPL2
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class WP_Collapse_O_Matic
|
15 |
-
* @package WP_Collapse_O_Matic
|
16 |
-
* @category WordPress Plugins
|
17 |
-
*/
|
18 |
-
|
19 |
-
if(!defined('PLUGIN_OVEN_URL')){
|
20 |
-
define( 'PLUGIN_OVEN_URL', 'https://plugins.twinpictures.de' );
|
21 |
-
}
|
22 |
-
if(!defined('PLUGIN_OVEN_CC')){
|
23 |
-
define( 'PLUGIN_OVEN_CC', 'Collapse Commander' );
|
24 |
-
}
|
25 |
-
|
26 |
-
class WP_Collapse_O_Matic {
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Current version
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
var $version = '1.7.4';
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Used as prefix for options entry
|
36 |
-
* @var string
|
37 |
-
*/
|
38 |
-
var $domain = 'colomat';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Name of the options
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
var $options_name = 'WP_Collapse_O_Matic_options';
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
var $options = array(
|
50 |
-
'style' => 'light',
|
51 |
-
'cid' => '',
|
52 |
-
'tag' => 'span',
|
53 |
-
'trigclass' => '',
|
54 |
-
'targtag' => 'div',
|
55 |
-
'targclass' => '',
|
56 |
-
'duration' => 'fast',
|
57 |
-
'tabindex' => '0',
|
58 |
-
'slideEffect' => 'slideFade',
|
59 |
-
'custom_css' => '',
|
60 |
-
'script_check' => '',
|
61 |
-
'css_check' => '',
|
62 |
-
'script_location' => 'footer',
|
63 |
-
'cc_download_key' => '',
|
64 |
-
'cc_email' => '',
|
65 |
-
'filter_content' => '',
|
66 |
-
);
|
67 |
-
|
68 |
-
var $license_group = 'colomat_licenseing';
|
69 |
-
|
70 |
-
var $license_name = 'WP_Collapse_O_Matic_license';
|
71 |
-
|
72 |
-
var $license_options = array(
|
73 |
-
'collapse_commander_license_key' => '',
|
74 |
-
'collapse_commander_license_status' => ''
|
75 |
-
);
|
76 |
-
|
77 |
-
/**
|
78 |
-
* PHP5 constructor
|
79 |
-
*/
|
80 |
-
function __construct() {
|
81 |
-
// set option values
|
82 |
-
$this->_set_options();
|
83 |
-
|
84 |
-
// load text domain for translations
|
85 |
-
load_plugin_textdomain( 'jquery-collapse-o-matic' );
|
86 |
-
|
87 |
-
//load the script and style if viewing the front-end
|
88 |
-
add_action('wp_enqueue_scripts', array( $this, 'collapsTronicInit' ) );
|
89 |
-
|
90 |
-
// add actions
|
91 |
-
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
92 |
-
add_action( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'plugin_actions' ) );
|
93 |
-
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
94 |
-
if($this->options['script_location'] == 'footer' ){
|
95 |
-
add_action( 'wp_footer', array( $this, 'colomat_js_vars' ) );
|
96 |
-
}
|
97 |
-
else{
|
98 |
-
add_action('wp_head', array( $this, 'colomat_js_vars' ) );
|
99 |
-
}
|
100 |
-
add_shortcode('expand', array($this, 'shortcode'));
|
101 |
-
|
102 |
-
//add expandsub shortcodes
|
103 |
-
for ($i=1; $i<30; $i++) {
|
104 |
-
add_shortcode('expandsub'.$i, array($this, 'shortcode'));
|
105 |
-
}
|
106 |
-
|
107 |
-
// Add shortcode support for widgets
|
108 |
-
add_filter('widget_text', 'do_shortcode');
|
109 |
-
}
|
110 |
-
|
111 |
-
//global javascript vars
|
112 |
-
function colomat_js_vars(){
|
113 |
-
echo "<script type='text/javascript'>\n";
|
114 |
-
echo "var colomatduration = '".$this->options['duration']."';\n";
|
115 |
-
echo "var colomatslideEffect = '".$this->options['slideEffect']."';\n";
|
116 |
-
echo "</script>";
|
117 |
-
if( !empty( $this->options['custom_css'] ) ){
|
118 |
-
echo "\n<style>\n";
|
119 |
-
echo $this->options['custom_css'];
|
120 |
-
echo "\n</style>\n";
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Callback init
|
126 |
-
*/
|
127 |
-
function collapsTronicInit() {
|
128 |
-
//collapse script
|
129 |
-
$load_in_footer = false;
|
130 |
-
if($this->options['script_location'] == 'footer' ){
|
131 |
-
$load_in_footer = true;
|
132 |
-
}
|
133 |
-
wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.6.6', $load_in_footer);
|
134 |
-
if( empty($this->options['script_check']) ){
|
135 |
-
wp_enqueue_script('collapseomatic-js');
|
136 |
-
}
|
137 |
-
|
138 |
-
//css
|
139 |
-
if ($this->options['style'] !== 'none') {
|
140 |
-
wp_register_style( 'collapseomatic-css', plugins_url('/'.$this->options['style'].'_style.css', __FILE__) , array (), '1.6' );
|
141 |
-
if( empty($this->options['css_check']) ){
|
142 |
-
wp_enqueue_style( 'collapseomatic-css' );
|
143 |
-
}
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Callback admin_menu
|
149 |
-
*/
|
150 |
-
function admin_menu() {
|
151 |
-
if ( function_exists( 'add_options_page' ) AND current_user_can( 'manage_options' ) ) {
|
152 |
-
// add options page
|
153 |
-
$page = add_options_page('Collapse-O-Matic Options', 'Collapse-O-Matic', 'manage_options', 'collapse-o-matic-options', array( $this, 'options_page' ));
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Callback admin_init
|
159 |
-
*/
|
160 |
-
function admin_init() {
|
161 |
-
// register settings
|
162 |
-
register_setting( $this->domain, $this->options_name );
|
163 |
-
register_setting( $this->license_group, $this->license_name, array($this, 'edd_sanitize_license') );
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Callback shortcode
|
168 |
-
*/
|
169 |
-
function shortcode($atts, $content = null){
|
170 |
-
$options = $this->options;
|
171 |
-
if( !empty($this->options['script_check']) ){
|
172 |
-
wp_enqueue_script('collapseomatic-js');
|
173 |
-
}
|
174 |
-
if( !empty($this->options['css_check']) ){
|
175 |
-
wp_enqueue_style( 'collapseomatic-css' );
|
176 |
-
}
|
177 |
-
//find a random number, if no id is assigned
|
178 |
-
$ran = rand(1, 10000);
|
179 |
-
extract(shortcode_atts(array(
|
180 |
-
'title' => '',
|
181 |
-
'cid' => $options['cid'],
|
182 |
-
'swaptitle' => '',
|
183 |
-
'alt' => '',
|
184 |
-
'swapalt' => '',
|
185 |
-
'notitle' => '',
|
186 |
-
'id' => 'id'.$ran,
|
187 |
-
'tag' => $options['tag'],
|
188 |
-
'trigclass' => $options['trigclass'],
|
189 |
-
'targtag' => $options['targtag'],
|
190 |
-
'targclass' => $options['targclass'],
|
191 |
-
'targpos' => '',
|
192 |
-
'trigpos' => 'above',
|
193 |
-
'rel' => '',
|
194 |
-
'group' => '',
|
195 |
-
'togglegroup' => '',
|
196 |
-
'expanded' => '',
|
197 |
-
'excerpt' => '',
|
198 |
-
'swapexcerpt' => false,
|
199 |
-
'excerptpos' => 'below-trigger',
|
200 |
-
'excerpttag' => 'div',
|
201 |
-
'excerptclass' => '',
|
202 |
-
'findme' => '',
|
203 |
-
'scrollonclose' => '',
|
204 |
-
'startwrap' => '',
|
205 |
-
'endwrap' => '',
|
206 |
-
'elwraptag' => '',
|
207 |
-
'elwrapclass' => '',
|
208 |
-
'filter' => $options['filter_content'],
|
209 |
-
'tabindex' => $options['tabindex'],
|
210 |
-
'animation_effect' => '',
|
211 |
-
'duration' => '',
|
212 |
-
), $atts, 'expand'));
|
213 |
-
if(!empty($cid)){
|
214 |
-
$args = array(
|
215 |
-
'post_type' => 'expand-element',
|
216 |
-
'p' => $cid,
|
217 |
-
);
|
218 |
-
$query_commander = new WP_Query( $args );
|
219 |
-
if ( $query_commander->have_posts() ) {
|
220 |
-
while ( $query_commander->have_posts() ) {
|
221 |
-
$query_commander->the_post();
|
222 |
-
$title = get_the_title();
|
223 |
-
|
224 |
-
//meta values
|
225 |
-
$meta_values = get_post_meta( $cid );
|
226 |
-
foreach($meta_values as $key => $value){
|
227 |
-
if(!empty($value) && $key[0] != '_'){
|
228 |
-
${substr($key, 9)} = $value[0];
|
229 |
-
}
|
230 |
-
}
|
231 |
-
if(!empty($triggertext)){
|
232 |
-
$title = $triggertext;
|
233 |
-
}
|
234 |
-
if(!empty($highlander) && !empty($rel)){
|
235 |
-
$rel .= '-highlander';
|
236 |
-
}
|
237 |
-
|
238 |
-
//content
|
239 |
-
$content = get_the_content();
|
240 |
-
}
|
241 |
-
}
|
242 |
-
wp_reset_postdata();
|
243 |
-
}
|
244 |
-
|
245 |
-
//content filtering
|
246 |
-
if(empty($filter) || $filter == 'false'){
|
247 |
-
$content = do_shortcode($content);
|
248 |
-
}
|
249 |
-
else{
|
250 |
-
$content = apply_filters( 'the_content', $content );
|
251 |
-
$content = str_replace( ']]>', ']]>', $content );
|
252 |
-
}
|
253 |
-
|
254 |
-
$ewo = '';
|
255 |
-
$ewc = '';
|
256 |
-
|
257 |
-
//id does not allow spaces
|
258 |
-
$id = preg_replace('/\s+/', '_', $id);
|
259 |
-
|
260 |
-
//placeholders
|
261 |
-
$placeholder_arr = array('%(%', '%)%', '%{%', '%}%');
|
262 |
-
$swapout_arr = array('<', '>', '[', ']');
|
263 |
-
|
264 |
-
$title = do_shortcode(str_replace($placeholder_arr, $swapout_arr, $title));
|
265 |
-
if($swaptitle){
|
266 |
-
$swaptitle = do_shortcode(str_replace($placeholder_arr, $swapout_arr, $swaptitle));
|
267 |
-
}
|
268 |
-
if($startwrap){
|
269 |
-
$startwrap = do_shortcode(str_replace($placeholder_arr, $swapout_arr, $startwrap));
|
270 |
-
}
|
271 |
-
if($endwrap){
|
272 |
-
$endwrap = do_shortcode(str_replace($placeholder_arr, $swapout_arr, $endwrap));
|
273 |
-
}
|
274 |
-
//need to check for a few versions, because of new option setting. can be removed after a few revisiosn.
|
275 |
-
if(empty($targtag)){
|
276 |
-
$targtag = 'div';
|
277 |
-
}
|
278 |
-
|
279 |
-
if($elwraptag){
|
280 |
-
$ewclass = '';
|
281 |
-
if($elwrapclass){
|
282 |
-
$ewclass = 'class="'.$elwrapclass.'"';
|
283 |
-
}
|
284 |
-
$ewo = '<'.$elwraptag.' '.$ewclass.'>';
|
285 |
-
$ewc = '</'.$elwraptag.'>';
|
286 |
-
}
|
287 |
-
|
288 |
-
$eDiv = '';
|
289 |
-
if($content){
|
290 |
-
$inline_class = '';
|
291 |
-
$collapse_class = 'collapseomatic_content ';
|
292 |
-
if($targpos == 'inline'){
|
293 |
-
$inline_class = 'colomat-inline ';
|
294 |
-
$collapse_class = 'collapseomatic_content_inline ';
|
295 |
-
}
|
296 |
-
$eDiv = '<'.$targtag.' id="target-'.$id.'" class="'.$collapse_class.$inline_class.$targclass.'">'.$content.'</'.$targtag.'>';
|
297 |
-
}
|
298 |
-
|
299 |
-
if($excerpt){
|
300 |
-
$excerpt = str_replace($placeholder_arr, $swapout_arr, $excerpt);
|
301 |
-
if(empty($filter) || $filter == 'false'){
|
302 |
-
$excerpt = do_shortcode($excerpt);
|
303 |
-
}
|
304 |
-
else{
|
305 |
-
$excerpt = apply_filters( 'the_content', $excerpt );
|
306 |
-
$excerpt = str_replace( ']]>', ']]>', $excerpt );
|
307 |
-
}
|
308 |
-
|
309 |
-
if($targpos == 'inline'){
|
310 |
-
$excerpt .= $eDiv;
|
311 |
-
$eDiv = '';
|
312 |
-
}
|
313 |
-
if($excerptpos == 'above-trigger'){
|
314 |
-
$nibble = '<'.$excerpttag.' id="excerpt-'.$id.'" class="'.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
|
315 |
-
}
|
316 |
-
else{
|
317 |
-
$nibble = '<'.$excerpttag.' id="excerpt-'.$id.'" class="collapseomatic_excerpt '.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
|
318 |
-
}
|
319 |
-
//swapexcerpt
|
320 |
-
if($swapexcerpt !== false){
|
321 |
-
$swapexcerpt = str_replace($placeholder_arr, $swapout_arr, $swapexcerpt);
|
322 |
-
if(empty($filter) || $filter == 'false'){
|
323 |
-
$swapexcerpt = do_shortcode($swapexcerpt);
|
324 |
-
}
|
325 |
-
else{
|
326 |
-
$swapexcerpt = apply_filters( 'the_content', $swapexcerpt );
|
327 |
-
$swapexcerpt = str_replace( ']]>', ']]>', $swapexcerpt );
|
328 |
-
}
|
329 |
-
$nibble .= '<'.$excerpttag.' id="swapexcerpt-'.$id.'" style="display:none;">'.$swapexcerpt.'</'.$excerpttag.'>';
|
330 |
-
}
|
331 |
-
}
|
332 |
-
$altatt = '';
|
333 |
-
if($alt){
|
334 |
-
$altatt = 'alt="'.$alt.'" title="'.$alt.'"';
|
335 |
-
}
|
336 |
-
else if( !$notitle ){
|
337 |
-
$altatt = 'title="'.$title.'"';
|
338 |
-
}
|
339 |
-
$relatt = '';
|
340 |
-
if($rel){
|
341 |
-
$relatt = 'rel="'.$rel.'"';
|
342 |
-
}
|
343 |
-
|
344 |
-
$groupatt = '';
|
345 |
-
//legacy
|
346 |
-
if($group && !$togglegroup){
|
347 |
-
$togglegroup = $group;
|
348 |
-
}
|
349 |
-
|
350 |
-
if($togglegroup){
|
351 |
-
$groupatt = 'data-togglegroup="'.$togglegroup.'"';
|
352 |
-
}
|
353 |
-
$inexatt = '';
|
354 |
-
if(!empty($tabindex) || $tabindex == 0 ){
|
355 |
-
$inexatt = 'tabindex="'.$tabindex.'"';
|
356 |
-
}
|
357 |
-
if($expanded){
|
358 |
-
$trigclass .= ' colomat-close';
|
359 |
-
}
|
360 |
-
$anchor = '';
|
361 |
-
if($findme){
|
362 |
-
$trigclass .= ' find-me';
|
363 |
-
$offset = '';
|
364 |
-
if($findme != 'true' && $findme != 'auto'){
|
365 |
-
$offset = $findme;
|
366 |
-
}
|
367 |
-
//$anchor = '<input type="hidden" id="find-'.$id.'" name="'.$offset.'"/>';
|
368 |
-
$anchor = 'data-findme="'.$offset.'"';
|
369 |
-
}
|
370 |
-
|
371 |
-
//effect
|
372 |
-
$effatt = '';
|
373 |
-
if($animation_effect){
|
374 |
-
$effatt = 'data-animation_effect="'.$animation_effect.'"';
|
375 |
-
}
|
376 |
-
|
377 |
-
//duration
|
378 |
-
$duratt = '';
|
379 |
-
if($duration){
|
380 |
-
$duratt = 'data-duration="'.$duration.'"';
|
381 |
-
}
|
382 |
-
|
383 |
-
$closeanchor = '';
|
384 |
-
if($scrollonclose && (is_numeric($scrollonclose) || $scrollonclose == 0)){
|
385 |
-
$trigclass .= ' scroll-to-trigger';
|
386 |
-
$closeanchor = '<input type="hidden" id="scrollonclose-'.$id.'" name="'.$scrollonclose.'"/>';
|
387 |
-
}
|
388 |
-
|
389 |
-
//deal with image from collapse-commander
|
390 |
-
if( !empty($trigtype) && $trigtype == 'image' && !empty($triggerimage) && strtolower($tag) == 'img' ){
|
391 |
-
$imageclass = 'collapseomatic noarrow' . $trigclass;
|
392 |
-
$image_atts = array( 'id' => $id, 'class' => $imageclass, 'alt' => $alt );
|
393 |
-
if(!$notitle){
|
394 |
-
$image_atts['title'] = $alt;
|
395 |
-
}
|
396 |
-
$link = $closeanchor.wp_get_attachment_image( $triggerimage, 'full', false, $image_atts );
|
397 |
-
}
|
398 |
-
else{
|
399 |
-
if(!empty($trigtype) && $trigtype == 'image' && !empty($triggerimage)){
|
400 |
-
$title = wp_get_attachment_image( $triggerimage, 'full' );
|
401 |
-
}
|
402 |
-
$link = $closeanchor.'<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$inexatt.' '.$altatt.' '.$anchor.' '.$groupatt.' '.$effatt.' '.$duratt.'>'.$startwrap.$title.$endwrap.'</'.$tag.'>';
|
403 |
-
}
|
404 |
-
|
405 |
-
//swap image
|
406 |
-
if( !empty($trigtype) && $trigtype == 'image' && !empty($swapimage) && strtolower($tag) == 'img' ){
|
407 |
-
$link .= wp_get_attachment_image( $swapimage, 'full', false, array( 'id' => 'swap-'.$id, 'class' => 'colomat-swap', 'alt' => $swapalt, 'style' => 'display:none;' ) );
|
408 |
-
}
|
409 |
-
else{
|
410 |
-
if(!empty($trigtype) && $trigtype == 'image' && !empty($swapimage)){
|
411 |
-
$swaptitle = wp_get_attachment_image( $swapimage, 'full' );
|
412 |
-
}
|
413 |
-
}
|
414 |
-
//swap title
|
415 |
-
if($swaptitle){
|
416 |
-
$link .= "<".$tag." id='swap-".$id."' alt='".$swapalt."' class='colomat-swap' style='display:none;'>".$startwrap.$swaptitle.$endwrap."</".$tag.">";
|
417 |
-
}
|
418 |
-
|
419 |
-
if($excerpt){
|
420 |
-
if($excerptpos == 'above-trigger'){
|
421 |
-
if($trigpos == 'below'){
|
422 |
-
$retStr = $ewo.$eDiv.$nibble.$link.$ewc;
|
423 |
-
}
|
424 |
-
else{
|
425 |
-
$retStr = $ewo.$nibble.$link.$eDiv.$ewc;
|
426 |
-
}
|
427 |
-
}
|
428 |
-
else if($excerptpos == 'below-trigger'){
|
429 |
-
if($trigpos == 'below'){
|
430 |
-
$retStr = $ewo.$eDiv.$link.$nibble.$ewc;
|
431 |
-
}
|
432 |
-
else{
|
433 |
-
$retStr = $ewo.$link.$nibble.$eDiv.$ewc;
|
434 |
-
}
|
435 |
-
}
|
436 |
-
else{
|
437 |
-
if($trigpos == 'below'){
|
438 |
-
$retStr = $ewo.$eDiv.$link.$nibble.$ewc;
|
439 |
-
}
|
440 |
-
else{
|
441 |
-
$retStr = $ewo.$link.$eDiv.$nibble.$ewc;
|
442 |
-
}
|
443 |
-
}
|
444 |
-
}
|
445 |
-
else{
|
446 |
-
if($trigpos == 'below'){
|
447 |
-
$retStr = $ewo.$eDiv.$link.$ewc;
|
448 |
-
}
|
449 |
-
else{
|
450 |
-
$retStr = $ewo.$link.$eDiv.$ewc;
|
451 |
-
}
|
452 |
-
}
|
453 |
-
return $retStr;
|
454 |
-
}
|
455 |
-
|
456 |
-
// Add link to options page from plugin list
|
457 |
-
function plugin_actions($links) {
|
458 |
-
$new_links = array();
|
459 |
-
$new_links[] = '<a href="options-general.php?page=collapse-o-matic-options">' . __('Settings', 'jquery-collapse-o-matic') . '</a>';
|
460 |
-
return array_merge($new_links, $links);
|
461 |
-
}
|
462 |
-
|
463 |
-
/**
|
464 |
-
* Admin options page
|
465 |
-
*/
|
466 |
-
function options_page() {
|
467 |
-
$like_it_arr = array(
|
468 |
-
__('really tied the room together', 'jquery-collapse-o-matic'),
|
469 |
-
__('made you feel all warm and fuzzy on the inside', 'jquery-collapse-o-matic'),
|
470 |
-
__('restored your faith in humanity... even if only for a fleeting second', 'jquery-collapse-o-matic'),
|
471 |
-
__('rocked your world', 'provided a positive vision of future living', 'jquery-collapse-o-matic'),
|
472 |
-
__('inspired you to commit a random act of kindness', 'jquery-collapse-o-matic'),
|
473 |
-
__('encouraged more regular flossing of the teeth', 'jquery-collapse-o-matic'),
|
474 |
-
__('helped organize your life in the small ways that matter', 'jquery-collapse-o-matic'),
|
475 |
-
__('saved your minutes--if not tens of minutes--writing your own solution', 'jquery-collapse-o-matic'),
|
476 |
-
__('brightened your day... or darkened if if you are trying to sleep in', 'jquery-collapse-o-matic'),
|
477 |
-
__('caused you to dance a little jig of joy and joyousness', 'jquery-collapse-o-matic'),
|
478 |
-
__('inspired you to tweet a little @twinpictues social love', 'jquery-collapse-o-matic'),
|
479 |
-
__('tasted great, while also being less filling', 'jquery-collapse-o-matic'),
|
480 |
-
__('caused you to shout: "everybody spread love, give me some mo!"', 'jquery-collapse-o-matic'),
|
481 |
-
__('helped you keep the funk alive', 'jquery-collapse-o-matic'),
|
482 |
-
__('<a href="https://www.youtube.com/watch?v=dvQ28F5fOdU" target="_blank">soften hands while you do dishes</a>', 'jquery-collapse-o-matic'),
|
483 |
-
__('helped that little old lady <a href="https://www.youtube.com/watch?v=Ug75diEyiA0" target="_blank">find the beef</a>', 'jquery-collapse-o-matic')
|
484 |
-
);
|
485 |
-
$rand_key = array_rand($like_it_arr);
|
486 |
-
$like_it = $like_it_arr[$rand_key];
|
487 |
-
?>
|
488 |
-
<div class="wrap">
|
489 |
-
<div class="icon32" id="icon-options-custom" style="background:url( <?php echo plugins_url( 'images/collapse-o-matic-icon.png', __FILE__ ) ?> ) no-repeat 50% 50%"><br></div>
|
490 |
-
<h2>Collapse-O-Matic</h2>
|
491 |
-
</div>
|
492 |
-
|
493 |
-
<div class="postbox-container metabox-holder meta-box-sortables" style="width: 69%">
|
494 |
-
<div style="margin:0 5px;">
|
495 |
-
<div class="postbox">
|
496 |
-
<div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
|
497 |
-
<h3 class="hndle"><?php _e( 'Default Collapse-O-Matic Settings', 'jquery-collapse-o-matic' ) ?></h3>
|
498 |
-
<div class="inside">
|
499 |
-
<form method="post" action="options.php">
|
500 |
-
<?php
|
501 |
-
settings_fields( $this->domain );
|
502 |
-
$options = $this->options;
|
503 |
-
?>
|
504 |
-
<fieldset class="options">
|
505 |
-
<table class="form-table">
|
506 |
-
<tr>
|
507 |
-
<th><?php _e( 'Style', 'jquery-collapse-o-matic' ) ?>:</th>
|
508 |
-
<td><label><select id="<?php echo $this->options_name ?>[style]" name="<?php echo $this->options_name ?>[style]">
|
509 |
-
<?php
|
510 |
-
if(empty($options['style'])){
|
511 |
-
$options['style'] = 'light';
|
512 |
-
}
|
513 |
-
$st_array = array(
|
514 |
-
__('Light', 'jquery-collapse-o-matic') => 'light',
|
515 |
-
__('Dark', 'jquery-collapse-o-matic') => 'dark',
|
516 |
-
__('None', 'jquery-collapse-o-matic') => 'none'
|
517 |
-
);
|
518 |
-
foreach( $st_array as $key => $value){
|
519 |
-
$selected = '';
|
520 |
-
if($options['style'] == $value){
|
521 |
-
$selected = 'SELECTED';
|
522 |
-
}
|
523 |
-
echo '<option value="'.$value.'" '.$selected.'>'.$key.'</option>';
|
524 |
-
}
|
525 |
-
?>
|
526 |
-
</select>
|
527 |
-
<br /><span class="description"><?php _e('Select Light for sites with lighter backgrounds. Select Dark for sites with darker backgrounds. Select None to handle styling yourself.', 'jquery-collapse-o-matic'); ?></span></label>
|
528 |
-
</td>
|
529 |
-
</tr>
|
530 |
-
|
531 |
-
<?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
532 |
-
<tr>
|
533 |
-
<th><?php _e( 'CID Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
534 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[cid]" name="<?php echo $this->options_name ?>[cid]" value="<?php echo $options['cid']; ?>" />
|
535 |
-
<br /><span class="description"><?php printf( __('Default %sCollapse Commander%s ID', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/premium-plugins/collapse-commander/" target="_blank">', '</a>'); ?></span></label>
|
536 |
-
</td>
|
537 |
-
</tr>
|
538 |
-
<?php endif; ?>
|
539 |
-
|
540 |
-
<tr>
|
541 |
-
<th><?php _e( 'Tag Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
542 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[tag]" name="<?php echo $this->options_name ?>[tag]" value="<?php echo $options['tag']; ?>" />
|
543 |
-
<br /><span class="description"><?php printf(__('HTML tag use to wrap the trigger text. See %sTag Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tag" target="_blank">', '</a>'); ?></span></label>
|
544 |
-
</td>
|
545 |
-
</tr>
|
546 |
-
|
547 |
-
<tr>
|
548 |
-
<th><?php _e( 'Trigclass Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
549 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[trigclass]" name="<?php echo $this->options_name ?>[trigclass]" value="<?php echo $options['trigclass']; ?>" />
|
550 |
-
<br /><span class="description"><?php printf(__('Default class assigned to the trigger element. See %sTrigclass Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#trigclass" target="_blank">', '</a>'); ?></span></label>
|
551 |
-
</td>
|
552 |
-
</tr>
|
553 |
-
|
554 |
-
<tr>
|
555 |
-
<th><?php _e( 'Tabindex Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
556 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[tabindex]" name="<?php echo $this->options_name ?>[tabindex]" value="<?php echo $options['tabindex']; ?>" />
|
557 |
-
<br /><span class="description"><?php printf(__('Default tabindex value to be assigned to the trigger element. See %sTabindex Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#tabindex" target="_blank">', '</a>'); ?></span></label>
|
558 |
-
</td>
|
559 |
-
</tr>
|
560 |
-
|
561 |
-
<tr>
|
562 |
-
<th><?php _e( 'Targtag Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
563 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[targtag]" name="<?php echo $this->options_name ?>[targtag]" value="<?php echo $options['targtag']; ?>" />
|
564 |
-
<br /><span class="description"><?php printf(__('HTML tag use for the target element. See %sTargtag Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targtag" target="_blank">', '</a>'); ?></span></label>
|
565 |
-
</td>
|
566 |
-
</tr>
|
567 |
-
|
568 |
-
<tr>
|
569 |
-
<th><?php _e( 'Targclass Attribute', 'jquery-collapse-o-matic' ) ?>:</th>
|
570 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[targclass]" name="<?php echo $this->options_name ?>[targclass]" value="<?php echo $options['targclass']; ?>" />
|
571 |
-
<br /><span class="description"><?php printf(__('Default class assigned to the target element. See %sTargclass Attribute%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#targclass" target="_blank">', '</a>'); ?></span></label>
|
572 |
-
</td>
|
573 |
-
</tr>
|
574 |
-
|
575 |
-
<tr>
|
576 |
-
<?php
|
577 |
-
if(empty($options['duration'])){
|
578 |
-
$options['duration'] = 'fast';
|
579 |
-
}
|
580 |
-
?>
|
581 |
-
<th><?php _e( 'Collapse/Expand Duration', 'jquery-collapse-o-matic' ) ?>:</th>
|
582 |
-
<td><label><input type="text" id="<?php echo $this->options_name ?>[duration]" name="<?php echo $this->options_name ?>[duration]" value="<?php echo $options['duration']; ?>" />
|
583 |
-
<br /><span class="description"><?php printf(__('A string or number determining how long the animation will run. See %sDuration%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#duration" target="_blank">', '</a>'); ?></span></label>
|
584 |
-
</td>
|
585 |
-
</tr>
|
586 |
-
|
587 |
-
<tr>
|
588 |
-
<th><?php _e( 'Animation Effect', 'jquery-collapse-o-matic' ) ?>:</th>
|
589 |
-
<td><label><select id="<?php echo $this->options_name ?>[slideEffect]" name="<?php echo $this->options_name ?>[slideEffect]">
|
590 |
-
<?php
|
591 |
-
if(empty($options['slideEffect'])){
|
592 |
-
$options['slideEffect'] = 'slideFade';
|
593 |
-
}
|
594 |
-
$se_array = array(
|
595 |
-
__('Slide Only', 'jquery-collapse-o-matic') => 'slideToggle',
|
596 |
-
__('Slide & Fade', 'jquery-collapse-o-matic') => 'slideFade'
|
597 |
-
);
|
598 |
-
foreach( $se_array as $key => $value){
|
599 |
-
$selected = '';
|
600 |
-
if($options['slideEffect'] == $value){
|
601 |
-
$selected = 'SELECTED';
|
602 |
-
}
|
603 |
-
echo '<option value="'.$value.'" '.$selected.'>'.$key.'</option>';
|
604 |
-
}
|
605 |
-
?>
|
606 |
-
</select>
|
607 |
-
<br /><span class="description"><?php printf(__('Animation effect to use while collapsing and expanding. See %sAnimation Effect%s in the documentation for more info.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#animation-effect" target="_blank">', '</a>'); ?></span></label>
|
608 |
-
</td>
|
609 |
-
</tr>
|
610 |
-
|
611 |
-
<tr>
|
612 |
-
<th><?php _e( 'Custom Style', 'jquery-collapse-o-matic' ) ?>:</th>
|
613 |
-
<td><label><textarea id="<?php echo $this->options_name ?>[custom_css]" name="<?php echo $this->options_name ?>[custom_css]" style="width: 100%; height: 150px;"><?php echo $options['custom_css']; ?></textarea>
|
614 |
-
<br /><span class="description"><?php _e( 'Custom CSS style for <em>ultimate flexibility</em>', 'jquery-collapse-o-matic' ) ?></span></label>
|
615 |
-
</td>
|
616 |
-
</tr>
|
617 |
-
|
618 |
-
<tr>
|
619 |
-
<th><?php _e( 'Content Filter', 'jquery-collapse-o-matic' ) ?>:</th>
|
620 |
-
<td><label><input type="checkbox" id="<?php echo $this->options_name ?>[filter_content]" name="<?php echo $this->options_name ?>[filter_content]" value="1" <?php echo checked( $options['filter_content'], 1 ); ?> /> <?php _e('Apply filter', 'jquery-collapse-o-matic'); ?>
|
621 |
-
<br /><span class="description"><?php _e('Apply the_content filter to target content.', 'jquery-collapse-o-matic'); ?></span></label>
|
622 |
-
</td>
|
623 |
-
</tr>
|
624 |
-
|
625 |
-
<tr>
|
626 |
-
<th><?php _e( 'Shortcode Loads Scripts', 'jquery-collapse-o-matic' ) ?>:</th>
|
627 |
-
<td><label><input type="checkbox" id="<?php echo $this->options_name ?>[script_check]" name="<?php echo $this->options_name ?>[script_check]" value="1" <?php echo checked( $options['script_check'], 1 ); ?> /> <?php _e('Only load scripts with shortcode.', 'jquery-collapse-o-matic'); ?>
|
628 |
-
<br /><span class="description"><?php _e('Only load Collapse-O-Matic scripts if [expand] shortcode is used.', 'jquery-collapse-o-matic'); ?></span></label>
|
629 |
-
</td>
|
630 |
-
</tr>
|
631 |
-
|
632 |
-
<tr>
|
633 |
-
<th><?php _e( 'Shortcode Loads CSS', 'jquery-collapse-o-matic' ) ?>:</th>
|
634 |
-
<td><label><input type="checkbox" id="<?php echo $this->options_name ?>[css_check]" name="<?php echo $this->options_name ?>[css_check]" value="1" <?php echo checked( $options['css_check'], 1 ); ?> /> <?php _e('Only load CSS with shortcode.', 'jquery-collapse-o-matic'); ?>
|
635 |
-
<br /><span class="description"><?php _e('Only load Collapse-O-Matic CSS if [expand] shortcode is used.', 'jquery-collapse-o-matic'); ?></span></label>
|
636 |
-
</td>
|
637 |
-
</tr>
|
638 |
-
|
639 |
-
<tr>
|
640 |
-
<th><?php _e( 'Script Load Location', 'jquery-collapse-o-matic' ) ?>:</th>
|
641 |
-
<td><label><select id="<?php echo $this->options_name ?>[script_location]" name="<?php echo $this->options_name ?>[script_location]">
|
642 |
-
<?php
|
643 |
-
if(empty($options['script_location'])){
|
644 |
-
$options['script_location'] = 'footer';
|
645 |
-
}
|
646 |
-
$sl_array = array(
|
647 |
-
__('Header', 'jquery-collapse-o-matic') => 'header',
|
648 |
-
__('Footer', 'jquery-collapse-o-matic') => 'footer'
|
649 |
-
);
|
650 |
-
foreach( $sl_array as $key => $value){
|
651 |
-
$selected = '';
|
652 |
-
if($options['script_location'] == $value){
|
653 |
-
$selected = 'SELECTED';
|
654 |
-
}
|
655 |
-
echo '<option value="'.$value.'" '.$selected.'>'.$key.'</option>';
|
656 |
-
}
|
657 |
-
?>
|
658 |
-
</select>
|
659 |
-
<br /><span class="description"><?php _e('Where should the script be loaded, in the Header or the Footer?', 'jquery-collapse-o-matic'); ?></span></label>
|
660 |
-
</td>
|
661 |
-
</tr>
|
662 |
-
<?php if( !is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
663 |
-
<tr>
|
664 |
-
<th><strong><?php _e( 'Take Command!', 'jquery-collapse-o-matic' ) ?></strong></th>
|
665 |
-
<td><?php printf(__( '%sCollapse Commander%s is an add-on plugin that introduces an advanced management interface to better organize expand elements and simplify expand shortcodes.', 'jquery-collapse-o-matic' ), '<a href="https://plugins.twinpictures.de/premium-plugins/collapse-commander/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">', '</a>'); ?>
|
666 |
-
</td>
|
667 |
-
</tr>
|
668 |
-
<?php endif; ?>
|
669 |
-
<tr>
|
670 |
-
<th><strong><?php _e( 'Level Up!', 'jquery-collapse-o-matic' ) ?></strong></th>
|
671 |
-
<td><?php printf(__( '%sCollapse-Pro-Matic%s is our premium plugin that offers additional attributes and features for <i>ultimate</i> flexibility, in addition to a very %shigh level of personal support%s.', 'jquery-collapse-o-matic' ), '<a href="https://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-pro-matic&utm_campaign=collapse-o-matic-pro">', '</a>', '<a href="https://plugins.twinpictures.de/testimonial/collapse-pro-matic/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-pro-matic&utm_campaign=collapse-o-matic-support">', '</a>'); ?>
|
672 |
-
</td>
|
673 |
-
</tr>
|
674 |
-
</table>
|
675 |
-
</fieldset>
|
676 |
-
|
677 |
-
<p class="submit">
|
678 |
-
<input class="button-primary" type="submit" value="<?php _e( 'Save Changes' ) ?>" />
|
679 |
-
</p>
|
680 |
-
</form>
|
681 |
-
</div>
|
682 |
-
</div>
|
683 |
-
</div>
|
684 |
-
</div>
|
685 |
-
|
686 |
-
<div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
|
687 |
-
<div style="margin:0 5px;">
|
688 |
-
<div class="postbox">
|
689 |
-
<div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
|
690 |
-
<h3 class="hndle"><?php _e( 'About' ) ?></h3>
|
691 |
-
<div class="inside">
|
692 |
-
<h4><img src="<?php echo plugins_url( 'images/collapse-o-matic-icon.png', __FILE__ ) ?>" width="16" height="16"/> Collapse-O-Matic Version <?php echo $this->version; ?></h4>
|
693 |
-
<p><?php _e( 'Remove clutter, save space. Display and hide additional content in a SEO friendly way. Wrap any content—including other shortcodes—into a lovely jQuery expanding and collapsing element.', 'jquery-collapse-o-matic') ?></p>
|
694 |
-
<?php /*<p style="padding: 5px; border: 1px dashed #cccc66; background: #EEE;"><strong>Last Chance for 2015 Prices:</strong> <a href="https://plugins.twinpictures.de/premium-plugins/collapse-pro-matic/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-pro-matic&utm_campaign=collapse-pro-year-end">Update to Collapse-Pro-Matic</a> before January 2016 to take advantage of 2015 pricing.</p> */ ?>
|
695 |
-
<ul>
|
696 |
-
<li><?php printf( __( '%sDetailed documentation%s, complete with working demonstrations of all shortcode attributes, is available for your instructional enjoyment.', 'jquery-collapse-o-matic'), '<a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/" target="_blank">', '</a>'); ?></li>
|
697 |
-
<li><?php printf( __( '%sFree Opensource Support%s', 'jquery-collapse-o-matic'), '<a href="https://wordpress.org/support/plugin/jquery-collapse-o-matic" target="_blank">', '</a>'); ?></li>
|
698 |
-
<li><?php printf( __( 'If this plugin %s, please consider %sreviewing it at WordPress.org%s to help others.', 'jquery-collapse-o-matic'), $like_it, '<a href="https://wordpress.org/support/view/plugin-reviews/jquery-collapse-o-matic" target="_blank">', '</a>' ) ?></li>
|
699 |
-
<li><a href="https://wordpress.org/plugins/jquery-collapse-o-matic/" target="_blank">WordPress.org</a> | <a href="https://plugins.twinpictures.de/plugins/collapse-o-matic/" target="_blank">Twinpictues Plugin Oven</a></li>
|
700 |
-
</ul>
|
701 |
-
</div>
|
702 |
-
</div>
|
703 |
-
</div>
|
704 |
-
<div class="clear"></div>
|
705 |
-
</div>
|
706 |
-
|
707 |
-
<?php if( is_plugin_active( 'collapse-commander/collapse-commander.php' ) ) : ?>
|
708 |
-
|
709 |
-
<div class="postbox-container side metabox-holder" style="width:29%;">
|
710 |
-
<div style="margin:0 5px;">
|
711 |
-
<div class="postbox">
|
712 |
-
<h3 class="handle"><?php _e( 'Register Collapse Commander', 'jquery-collapse-o-matic') ?></h3>
|
713 |
-
<div class="inside">
|
714 |
-
<p><?php printf( __('To receive plugin updates you must register your plugin. Enter your Collapse Commander licence key below. Licence keys may be viewed and manged by logging into %syour account%s.', 'colpromat'), '<a href="https://plugins.twinpictures.de/your-account/" target="_blank">', '</a>'); ?></p>
|
715 |
-
<form method="post" action="options.php">
|
716 |
-
<?php
|
717 |
-
settings_fields( $this->license_group );
|
718 |
-
$options = get_option($this->license_name);
|
719 |
-
$cc_licence = ( !isset( $options['collapse_commander_license_key'] ) ) ? '' : $options['collapse_commander_license_key'];
|
720 |
-
?>
|
721 |
-
<fieldset>
|
722 |
-
<table style="width: 100%">
|
723 |
-
<tbody>
|
724 |
-
<tr>
|
725 |
-
<th><?php _e( 'License Key', 'colpromat' ) ?>:</th>
|
726 |
-
<td><label for="<?php echo $this->license_name ?>[collapse_commander_license_key]"><input type="text" id="<?php echo $this->license_name ?>[collapse_commander_license_key]" name="<?php echo $this->license_name ?>[collapse_commander_license_key]" value="<?php esc_attr_e( $cc_licence ); ?>" style="width: 100%" />
|
727 |
-
<br /><span class="description"><?php _e('Enter your license key', 'colpromat'); ?></span></label>
|
728 |
-
</td>
|
729 |
-
|
730 |
-
</tr>
|
731 |
-
|
732 |
-
<?php if( isset($options['collapse_commander_license_key']) ) { ?>
|
733 |
-
<tr valign="top">
|
734 |
-
<th><?php _e('License Status', 'colpromat'); ?>:</th>
|
735 |
-
<td>
|
736 |
-
<?php if( isset($options['collapse_commander_license_status']) && $options['collapse_commander_license_status'] == 'valid' ) { ?>
|
737 |
-
<span style="color:green;"><?php _e('active'); ?></span><br/>
|
738 |
-
<input type="submit" class="button-secondary" name="edd_cc_license_deactivate" value="<?php _e('Deactivate License'); ?>"/>
|
739 |
-
<?php } else {
|
740 |
-
if( isset($options['collapse_commander_license_status']) ){ ?>
|
741 |
-
<span style="color: red"><?php echo $options['collapse_commander_license_status']; ?></span><br/>
|
742 |
-
<?php } else { ?>
|
743 |
-
<span style="color: grey">inactive</span><br/>
|
744 |
-
<?php } ?>
|
745 |
-
<input type="submit" class="button-secondary" name="edd_cc_license_activate" value="<?php _e('Activate License'); ?>"/>
|
746 |
-
<?php } ?>
|
747 |
-
</td>
|
748 |
-
</tr>
|
749 |
-
<?php } ?>
|
750 |
-
</tbody>
|
751 |
-
</table>
|
752 |
-
</fieldset>
|
753 |
-
<?php submit_button( __( 'Register', 'colpromat') ); ?>
|
754 |
-
</form>
|
755 |
-
</div>
|
756 |
-
</div>
|
757 |
-
</div>
|
758 |
-
</div>
|
759 |
-
<?php else: ?>
|
760 |
-
<div class="postbox-container side metabox-holder meta-box-sortables" style="width:29%;">
|
761 |
-
<div style="margin:0 5px;">
|
762 |
-
<div class="postbox">
|
763 |
-
<div class="handlediv" title="<?php _e( 'Click to toggle', 'jquery-collapse-o-matic' ) ?>"><br/></div>
|
764 |
-
<h3 class="hndle">Collapse Commander</h3>
|
765 |
-
<div class="inside">
|
766 |
-
<p>A brief and not-exactly-sober overview of <a href="https://plugins.twinpictures.de/premium-plugins/collapse-commander/?utm_source=collapse-o-matic&utm_medium=plugin-settings-page&utm_content=collapse-commander&utm_campaign=collapse-o-matic-commander">Collapse Commander</a>, a new add-on plugin for Collapse-O-Matic and Collapse-Pro-Matic that adds and advanded expand shortcode management system.</p>
|
767 |
-
<iframe width="100%" height="300" src="//www.youtube.com/embed/w9X4nXpAEfo" frameborder="0" allowfullscreen></iframe>
|
768 |
-
</div>
|
769 |
-
</div>
|
770 |
-
</div>
|
771 |
-
<div class="clear"></div>
|
772 |
-
</div>
|
773 |
-
<?php endif; ?>
|
774 |
-
<?php
|
775 |
-
}
|
776 |
-
|
777 |
-
/**
|
778 |
-
* Set options from save values or defaults
|
779 |
-
*/
|
780 |
-
function _set_options() {
|
781 |
-
// set options
|
782 |
-
$saved_options = get_option( $this->options_name );
|
783 |
-
|
784 |
-
// backwards compatible (old values)
|
785 |
-
if ( empty( $saved_options ) ) {
|
786 |
-
$saved_options = get_option( $this->domain . 'options' );
|
787 |
-
}
|
788 |
-
|
789 |
-
// set all options
|
790 |
-
if ( ! empty( $saved_options ) ) {
|
791 |
-
foreach ( $this->options AS $key => $option ) {
|
792 |
-
$this->options[ $key ] = ( empty( $saved_options[ $key ] ) ) ? '' : $saved_options[ $key ];
|
793 |
-
}
|
794 |
-
}
|
795 |
-
}
|
796 |
-
|
797 |
-
function edd_sanitize_license( $new ) {
|
798 |
-
//collapse commander
|
799 |
-
$options = get_option($this->license_name);
|
800 |
-
$old_cc = ( !isset( $options['collapse_commander_license_key'] ) ) ? '' : $options['collapse_commander_license_key'];
|
801 |
-
$old_cc_status = ( !isset( $options['collapse_commander_license_status'] ) ) ? '' : $options['collapse_commander_license_status'];
|
802 |
-
|
803 |
-
if( !empty($old_cc) && $old_cc != $new['collapse_commander_license_key'] ) {
|
804 |
-
$new['collapse_commander_license_status'] = '';
|
805 |
-
}
|
806 |
-
else{
|
807 |
-
$new['collapse_commander_license_status'] = $old_cc_status;
|
808 |
-
}
|
809 |
-
|
810 |
-
if( isset( $_POST['edd_cc_license_activate'] ) ) {
|
811 |
-
$new['collapse_commander_license_status'] = $this->plugin_oven_activate_license( urlencode( PLUGIN_OVEN_CC ), $new['collapse_commander_license_key'], 'activate_license');
|
812 |
-
}
|
813 |
-
|
814 |
-
if( isset( $_POST['edd_cc_license_deactivate'] ) ) {
|
815 |
-
$new['collapse_commander_license_status'] = $this->plugin_oven_activate_license( urlencode( PLUGIN_OVEN_CC ), $new['collapse_commander_license_key'], 'deactivate_license');
|
816 |
-
}
|
817 |
-
return $new;
|
818 |
-
}
|
819 |
-
|
820 |
-
|
821 |
-
/************************************
|
822 |
-
* this illustrates how to activate
|
823 |
-
* a license key
|
824 |
-
*************************************/
|
825 |
-
|
826 |
-
function plugin_oven_activate_license($plugin_name, $license_key, $edd_action) {
|
827 |
-
// data to send in our API request
|
828 |
-
$api_params = array(
|
829 |
-
'edd_action' => $edd_action,
|
830 |
-
'license' => $license_key,
|
831 |
-
'item_name' => $plugin_name,
|
832 |
-
'url' => home_url()
|
833 |
-
);
|
834 |
-
|
835 |
-
// Call the custom API.
|
836 |
-
$response = wp_remote_get( esc_url_raw( add_query_arg( $api_params, PLUGIN_OVEN_URL ) ), array( 'timeout' => 15, 'sslverify' => false ) );
|
837 |
-
|
838 |
-
// make sure the response came back okay
|
839 |
-
if ( is_wp_error( $response ) )
|
840 |
-
return false;
|
841 |
-
|
842 |
-
// decode the license data
|
843 |
-
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
844 |
-
|
845 |
-
// $license_data->license will be either "valid" or "invalid"
|
846 |
-
return $license_data->license;
|
847 |
-
}
|
848 |
-
|
849 |
-
} // end class WP_Collapse_O_Matic
|
850 |
-
|
851 |
-
|
852 |
-
/**
|
853 |
-
* Create instance
|
854 |
-
*/
|
855 |
-
$WP_Collapse_O_Matic = new WP_Collapse_O_Matic;
|
856 |
-
|
857 |
-
//clean unwanted p and br tags from shortcodes
|
858 |
-
//https://www.wpexplorer.com/clean-up-wordpress-shortcode-formatting
|
859 |
-
if (!function_exists('tp_clean_shortcodes')) {
|
860 |
-
function tp_clean_shortcodes($content){
|
861 |
-
$array = array (
|
862 |
-
'<p>[' => '[',
|
863 |
-
']</p>' => ']',
|
864 |
-
']<br />' => ']'
|
865 |
-
);
|
866 |
-
$content = strtr($content, $array);
|
867 |
-
return $content;
|
868 |
-
}
|
869 |
-
add_filter('the_content', 'tp_clean_shortcodes');
|
870 |
-
}
|
871 |
-
|
872 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/dark_style.css
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
.collapseomatic {
|
2 |
-
background-image: url(images/arrow-down-dark.png);
|
3 |
-
background-repeat: no-repeat;
|
4 |
-
padding: 0 0 10px 16px;
|
5 |
-
cursor: pointer;
|
6 |
-
}
|
7 |
-
.collapseomatic:focus {
|
8 |
-
outline: 0;
|
9 |
-
}
|
10 |
-
.arrowright {
|
11 |
-
background-position: top right;
|
12 |
-
padding: 0 16px 10px 0;
|
13 |
-
}
|
14 |
-
.noarrow {
|
15 |
-
background-image: none !important;
|
16 |
-
padding: 0 0 10px 0;
|
17 |
-
}
|
18 |
-
.colomat-hover {
|
19 |
-
text-decoration: underline;
|
20 |
-
}
|
21 |
-
.colomat-close {
|
22 |
-
background-image: url(images/arrow-up-dark.png);
|
23 |
-
}
|
24 |
-
.colomat-swap {
|
25 |
-
display: none;
|
26 |
-
}
|
27 |
-
.collapseomatic_excerpt, .collapseomatic_content {
|
28 |
-
margin-top: 0px;
|
29 |
-
margin-left: 16px;
|
30 |
-
padding: 0px;
|
31 |
-
}
|
32 |
-
.content_collapse_wrapper {
|
33 |
-
position: absolute; left: -999em;
|
34 |
-
}
|
35 |
-
.collapseall, .expandall {
|
36 |
-
cursor: pointer;
|
37 |
-
}
|
38 |
-
.collapseall:hover, .expandall:hover, .collapseall:focus, .expandall:focus {
|
39 |
-
text-decoration: underline;
|
40 |
-
}
|
41 |
-
.maptastic {
|
42 |
-
position: absolute !important;
|
43 |
-
left: -10000px !important;
|
44 |
-
display:block !important;
|
45 |
-
max-width: 9999px;
|
46 |
-
}
|
47 |
-
.span_fix {
|
48 |
-
padding: 0 !important;
|
49 |
-
margin: 0 !important;
|
50 |
-
}
|
51 |
-
.span_fix:before, .span_fix:after {
|
52 |
-
content: none;
|
53 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/images/arrow-down-dark.png
DELETED
Binary file
|
trunk/images/arrow-down.png
DELETED
Binary file
|
trunk/images/arrow-up-dark.png
DELETED
Binary file
|
trunk/images/arrow-up.png
DELETED
Binary file
|
trunk/images/arrows.psd
DELETED
Binary file
|
trunk/images/collapse-o-matic-icon.png
DELETED
Binary file
|
trunk/js/collapse.js
DELETED
@@ -1,595 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Collapse-O-Matic JavaSctipt v1.6.6
|
3 |
-
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
-
*
|
5 |
-
* Copyright 2017, Twinpictures
|
6 |
-
*
|
7 |
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
-
* of this software and associated documentation files (the "Software"), to deal
|
9 |
-
* in the Software without restriction, including without limitation the rights
|
10 |
-
* to use, copy, modify, merge, publish, distribute, sublicense, blend, trade,
|
11 |
-
* bake, hack, scramble, difiburlate, digest and/or sell copies of the Software,
|
12 |
-
* and to permit persons to whom the Software is furnished to do so, subject to
|
13 |
-
* the following conditions:
|
14 |
-
*
|
15 |
-
* The above copyright notice and this permission notice shall be included in
|
16 |
-
* all copies or substantial portions of the Software.
|
17 |
-
*
|
18 |
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19 |
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20 |
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21 |
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22 |
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23 |
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24 |
-
* THE SOFTWARE.
|
25 |
-
*/
|
26 |
-
function collapse_init() {
|
27 |
-
//force collapse
|
28 |
-
jQuery('.force_content_collapse').each(function(index) {
|
29 |
-
jQuery(this).css('display', 'none');
|
30 |
-
});
|
31 |
-
|
32 |
-
//inital collapse
|
33 |
-
jQuery('.collapseomatic:not(.colomat-close)').each(function(index) {
|
34 |
-
var thisid = jQuery(this).attr('id');
|
35 |
-
jQuery('#target-'+thisid).css('display', 'none');
|
36 |
-
});
|
37 |
-
|
38 |
-
//inital swaptitle for pre-expanded elements
|
39 |
-
jQuery('.collapseomatic.colomat-close').each(function(index) {
|
40 |
-
var thisid = jQuery(this).attr('id');
|
41 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
42 |
-
swapTitle(this, "#swap-"+thisid );
|
43 |
-
}
|
44 |
-
if(jQuery("#swapexcerpt-"+thisid).length > 0){
|
45 |
-
swapTitle("#excerpt-"+thisid, "#swapexcerpt-"+thisid);
|
46 |
-
}
|
47 |
-
});
|
48 |
-
}
|
49 |
-
|
50 |
-
function swapTitle(origObj, swapObj){
|
51 |
-
if(jQuery(origObj).prop("tagName") == 'IMG'){
|
52 |
-
var origsrc = jQuery(origObj).prop('src');
|
53 |
-
var swapsrc = jQuery(swapObj).prop('src');
|
54 |
-
|
55 |
-
jQuery(origObj).prop('src',swapsrc);
|
56 |
-
jQuery(swapObj).prop('src',origsrc);
|
57 |
-
}
|
58 |
-
else{
|
59 |
-
var orightml = jQuery(origObj).html();
|
60 |
-
var swaphtml = jQuery(swapObj).html();
|
61 |
-
|
62 |
-
jQuery(origObj).html(swaphtml);
|
63 |
-
jQuery(swapObj).html(orightml);
|
64 |
-
|
65 |
-
//is cufon involved? if so, do that thing
|
66 |
-
if(swaphtml.indexOf("<cufon") != -1){
|
67 |
-
var trigelem = jQuery(this).get(0).tagName;
|
68 |
-
Cufon.replace(trigelem);
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
function toggleState (obj, id, maptastic, trig_id) {
|
74 |
-
//toggletarget class
|
75 |
-
//jQuery('[id^=target][id$='+id+']').toggleClass('colomat-targ-visable');
|
76 |
-
|
77 |
-
if (maptastic && jQuery('[id^=target][id$='+id+']').hasClass('maptastic') ) {
|
78 |
-
jQuery('[id^=target][id$='+id+']').removeClass('maptastic');
|
79 |
-
}
|
80 |
-
|
81 |
-
//reset effect and duration to default
|
82 |
-
com_effect = colomatslideEffect;
|
83 |
-
com_duration = colomatduration;
|
84 |
-
|
85 |
-
//effect override
|
86 |
-
if( obj.attr('data-animation_effect') ){
|
87 |
-
com_effect = obj.attr('data-animation_effect');
|
88 |
-
}
|
89 |
-
|
90 |
-
//duration override
|
91 |
-
if( obj.attr('data-duration') ){
|
92 |
-
com_duration = obj.attr('data-duration');
|
93 |
-
}
|
94 |
-
|
95 |
-
//if durration is a number, make it a number
|
96 |
-
if( isFinite(com_duration) ){
|
97 |
-
com_duration = parseFloat(com_duration);
|
98 |
-
}
|
99 |
-
|
100 |
-
//slideToggle
|
101 |
-
if(com_effect == 'slideToggle'){
|
102 |
-
jQuery('[id^=target][id$='+id+']').slideToggle(com_duration, function() {
|
103 |
-
// Animation complete.
|
104 |
-
if( jQuery(this).hasClass('colomat-inline') && jQuery(this).is(':visible') ){
|
105 |
-
jQuery(this).css('display', 'inline');
|
106 |
-
}
|
107 |
-
|
108 |
-
//deal with any findme links
|
109 |
-
if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
|
110 |
-
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
111 |
-
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
112 |
-
|
113 |
-
if(!offset_top || offset_top == 'auto'){
|
114 |
-
target_offset = jQuery('#'+trig_id).offset();
|
115 |
-
offset_top = target_offset.top;
|
116 |
-
}
|
117 |
-
jQuery('html, body').animate({scrollTop:offset_top}, 500);
|
118 |
-
}
|
119 |
-
});
|
120 |
-
}
|
121 |
-
//slideFade
|
122 |
-
else if(com_effect == 'slideFade'){
|
123 |
-
jQuery('[id^=target][id$='+id+']').animate({
|
124 |
-
height: "toggle",
|
125 |
-
opacity: "toggle"
|
126 |
-
}, com_duration, function (){
|
127 |
-
//Animation complete
|
128 |
-
if( jQuery(this).hasClass('colomat-inline') && jQuery(this).is(':visible') ){
|
129 |
-
jQuery(this).css('display', 'inline');
|
130 |
-
}
|
131 |
-
|
132 |
-
//deal with any findme links
|
133 |
-
if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
|
134 |
-
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
135 |
-
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
136 |
-
|
137 |
-
if(!offset_top || offset_top == 'auto'){
|
138 |
-
target_offset = jQuery('#'+trig_id).offset();
|
139 |
-
offset_top = target_offset.top;
|
140 |
-
}
|
141 |
-
jQuery('html, body').animate({scrollTop:offset_top}, 500);
|
142 |
-
}
|
143 |
-
});
|
144 |
-
}
|
145 |
-
|
146 |
-
//deal with google maps builder resize
|
147 |
-
if(jQuery('#'+id).hasClass('colomat-close')){
|
148 |
-
jQuery('.google-maps-builder').each(function(index) {
|
149 |
-
map = jQuery(".google-maps-builder")[index];
|
150 |
-
google.maps.event.trigger(map, 'resize');
|
151 |
-
});
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
function closeOtherGroups(rel){
|
156 |
-
jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
|
157 |
-
//add close class if open
|
158 |
-
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
159 |
-
return;
|
160 |
-
}
|
161 |
-
if(jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
162 |
-
jQuery(this).removeClass('colomat-close');
|
163 |
-
var id = jQuery(this).attr('id');
|
164 |
-
//remove parent highlight class
|
165 |
-
jQuery('#parent-'+id).removeClass('colomat-parent-highlight');
|
166 |
-
|
167 |
-
//check if the title needs to be swapped out
|
168 |
-
if(jQuery("#swap-"+id).length > 0){
|
169 |
-
swapTitle(this, "#swap-"+id);
|
170 |
-
}
|
171 |
-
|
172 |
-
//check if the excerpt needs to be swapped out
|
173 |
-
if(jQuery("#swapexcerpt-"+id).length > 0){
|
174 |
-
swapTitle("#exerpt-"+id, "#swapexcerpt-"+id);
|
175 |
-
}
|
176 |
-
|
177 |
-
toggleState (jQuery(this), id, false, false);
|
178 |
-
|
179 |
-
//check if there are nested children that need to be collapsed
|
180 |
-
var ancestors = jQuery('.collapseomatic', '#target-'+id);
|
181 |
-
ancestors.each(function(index) {
|
182 |
-
jQuery(this).removeClass('colomat-close');
|
183 |
-
var thisid = jQuery(this).attr('id');
|
184 |
-
jQuery('#target-'+thisid).css('display', 'none');
|
185 |
-
})
|
186 |
-
}
|
187 |
-
});
|
188 |
-
}
|
189 |
-
|
190 |
-
function closeOtherMembers(rel, id){
|
191 |
-
jQuery('.collapseomatic[rel="' + rel +'"]').each(function(index) {
|
192 |
-
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
193 |
-
return;
|
194 |
-
}
|
195 |
-
|
196 |
-
//add close class if open
|
197 |
-
if(jQuery(this).attr('id') != id && jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
198 |
-
//collapse the element
|
199 |
-
jQuery(this).removeClass('colomat-close');
|
200 |
-
var thisid = jQuery(this).attr('id');
|
201 |
-
//remove parent highlight class
|
202 |
-
jQuery('#parent-'+thisid).removeClass('colomat-parent-highlight');
|
203 |
-
|
204 |
-
//check if the title needs to be swapped out
|
205 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
206 |
-
swapTitle(this, "#swap-"+thisid);
|
207 |
-
}
|
208 |
-
|
209 |
-
//check if the excerpt needs to be swapped out
|
210 |
-
if(jQuery("#swapexcerpt-"+thisid).length > 0){
|
211 |
-
swapTitle("#excerpt-"+thisid, "#swapexcerpt-"+thisid);
|
212 |
-
}
|
213 |
-
|
214 |
-
//check for snap-shut
|
215 |
-
if(!jQuery(this).hasClass('colomat-close') && jQuery(this).hasClass('snap-shut')){
|
216 |
-
jQuery('#target-'+thisid).hide();
|
217 |
-
}
|
218 |
-
else{
|
219 |
-
toggleState (jQuery(this), thisid, false, false);
|
220 |
-
}
|
221 |
-
|
222 |
-
//check if there are nested children that need to be collapsed
|
223 |
-
var ancestors = jQuery('.collapseomatic', '#target-'+id);
|
224 |
-
ancestors.each(function(index) {
|
225 |
-
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
226 |
-
return;
|
227 |
-
}
|
228 |
-
//deal with extra tirggers
|
229 |
-
var pre_id = id.split('-');
|
230 |
-
if (pre_id[0].indexOf('extra') != '-1') {
|
231 |
-
//console.log('this is an extra trigger');
|
232 |
-
pre = pre_id.splice(0, 1);
|
233 |
-
id = pre_id.join('-');
|
234 |
-
|
235 |
-
//deal with any scroll to links from the Extra Collapse Trigger
|
236 |
-
if(jQuery(this).hasClass('scroll-to-trigger')){
|
237 |
-
var target_offset = jQuery('#'+id).offset();
|
238 |
-
offset_top = target_offset.top;
|
239 |
-
}
|
240 |
-
|
241 |
-
//deal with any scroll to links from the Title Trigger
|
242 |
-
if(jQuery('#'+id).hasClass('scroll-to-trigger')){
|
243 |
-
offset_top = jQuery('#scrollonclose-'+id).attr('name');
|
244 |
-
if (offset_top == 'auto') {
|
245 |
-
var target_offset = jQuery('#'+id).offset();
|
246 |
-
offset_top = target_offset.top;
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
//toggle master trigger arrow
|
251 |
-
jQuery('#'+id).toggleClass('colomat-close');
|
252 |
-
|
253 |
-
//toggle any other extra trigger arrows
|
254 |
-
jQuery('[id^=extra][id$='+id+']').toggleClass('colomat-close');
|
255 |
-
}
|
256 |
-
|
257 |
-
if(jQuery(this).attr('id').indexOf('bot-') == '-1'){
|
258 |
-
jQuery(this).removeClass('colomat-close');
|
259 |
-
var thisid = jQuery(this).attr('id');
|
260 |
-
//check if the title needs to be swapped out
|
261 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
262 |
-
swapTitle(this, "#swap-"+thisid);
|
263 |
-
}
|
264 |
-
//check if the excerpt needs to be swapped out
|
265 |
-
if(jQuery("#swapexcerpt-"+thisid).length > 0){
|
266 |
-
swapTitle("#excerpt-"+thisid, "#swapexcerpt-"+thisid);
|
267 |
-
}
|
268 |
-
jQuery('#target-'+thisid).css('display', 'none');
|
269 |
-
}
|
270 |
-
})
|
271 |
-
}
|
272 |
-
});
|
273 |
-
}
|
274 |
-
|
275 |
-
function colomat_expandall(loop_items){
|
276 |
-
if (!loop_items){
|
277 |
-
loop_items = jQuery('.collapseomatic:not(.colomat-close)');
|
278 |
-
}
|
279 |
-
loop_items.each(function(index) {
|
280 |
-
jQuery(this).addClass('colomat-close');
|
281 |
-
var thisid = jQuery(this).attr('id');
|
282 |
-
jQuery('#parent-'+thisid).addClass('colomat-parent-highlight');
|
283 |
-
|
284 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
285 |
-
swapTitle(this, "#swap-"+thisid);
|
286 |
-
}
|
287 |
-
|
288 |
-
if(jQuery("#swapexcerpt-"+thisid).length > 0){
|
289 |
-
swapTitle("#excerpt-"+thisid, "#swapexcerpt-"+thisid);
|
290 |
-
}
|
291 |
-
|
292 |
-
toggleState(jQuery(this), thisid, false, false);
|
293 |
-
});
|
294 |
-
}
|
295 |
-
|
296 |
-
function colomat_collapseall(loop_items){
|
297 |
-
if (!loop_items){
|
298 |
-
loop_items = jQuery('.collapseomatic.colomat-close');
|
299 |
-
}
|
300 |
-
|
301 |
-
loop_items.each(function(index) {
|
302 |
-
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
303 |
-
return;
|
304 |
-
}
|
305 |
-
|
306 |
-
jQuery(this).removeClass('colomat-close');
|
307 |
-
var thisid = jQuery(this).attr('id');
|
308 |
-
jQuery('#parent-'+thisid).removeClass('colomat-parent-highlight');
|
309 |
-
|
310 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
311 |
-
swapTitle(this, "#swap-"+thisid);
|
312 |
-
}
|
313 |
-
|
314 |
-
if(jQuery("#swapexcerpt-"+thisid).length > 0){
|
315 |
-
swapTitle("#excerpt-"+thisid, "#swapexcerpt-"+thisid);
|
316 |
-
}
|
317 |
-
|
318 |
-
toggleState(jQuery(this), thisid, false, false);
|
319 |
-
|
320 |
-
});
|
321 |
-
}
|
322 |
-
|
323 |
-
|
324 |
-
jQuery(document).ready(function() {
|
325 |
-
//console.log(colomatduration, colomatslideEffect);
|
326 |
-
collapse_init();
|
327 |
-
|
328 |
-
//jetpack infinite scroll catch-all
|
329 |
-
jQuery( document.body ).on( 'post-load', function () {
|
330 |
-
collapse_init();
|
331 |
-
} );
|
332 |
-
|
333 |
-
//Display the collapse wrapper... use to reverse the show-all on no JavaScript degredation.
|
334 |
-
jQuery('.content_collapse_wrapper').each(function(index) {
|
335 |
-
jQuery(this).css('display', 'inline');
|
336 |
-
});
|
337 |
-
|
338 |
-
//hover
|
339 |
-
jQuery(document).on({
|
340 |
-
mouseenter: function(){
|
341 |
-
//stuff to do on mouseover
|
342 |
-
jQuery(this).addClass('colomat-hover');
|
343 |
-
},
|
344 |
-
mouseleave: function(){
|
345 |
-
//stuff to do on mouseleave
|
346 |
-
jQuery(this).removeClass('colomat-hover');
|
347 |
-
},
|
348 |
-
focusin: function(){
|
349 |
-
//stuff to do on keyboard focus
|
350 |
-
jQuery(this).addClass('colomat-hover');
|
351 |
-
},
|
352 |
-
focusout: function(){
|
353 |
-
//stuff to do on losing keyboard focus
|
354 |
-
jQuery(this).removeClass('colomat-hover');
|
355 |
-
}
|
356 |
-
}, '.collapseomatic'); //pass the element as an argument to .on
|
357 |
-
|
358 |
-
//tabindex enter
|
359 |
-
jQuery(document).on('keypress','.collapseomatic', function(event) {
|
360 |
-
if (event.which == 13) {
|
361 |
-
event.currentTarget.click();
|
362 |
-
};
|
363 |
-
});
|
364 |
-
|
365 |
-
//the main collapse/expand function
|
366 |
-
jQuery(document).on('click', '.collapseomatic', function(event) {
|
367 |
-
var offset_top;
|
368 |
-
|
369 |
-
//alert('phones ringin dude');
|
370 |
-
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
371 |
-
return;
|
372 |
-
}
|
373 |
-
|
374 |
-
//highlander must be one
|
375 |
-
if(jQuery(this).attr('rel') && jQuery(this).attr('rel').indexOf('-highlander') != '-1' && jQuery(this).hasClass('must-be-one') && jQuery(this).hasClass('colomat-close')){
|
376 |
-
return;
|
377 |
-
}
|
378 |
-
|
379 |
-
var id = jQuery(this).attr('id');
|
380 |
-
|
381 |
-
//deal with any scroll to links
|
382 |
-
if(jQuery(this).hasClass('colomat-close') && jQuery(this).hasClass('scroll-to-trigger')){
|
383 |
-
offset_top = jQuery('#scrollonclose-'+id).attr('name');
|
384 |
-
if (offset_top == 'auto') {
|
385 |
-
var target_offset = jQuery('#'+id).offset();
|
386 |
-
offset_top = target_offset.top;
|
387 |
-
}
|
388 |
-
}
|
389 |
-
|
390 |
-
var id_arr = id.split('-');
|
391 |
-
|
392 |
-
//deal with extra tirggers
|
393 |
-
if (id_arr[0].indexOf('extra') != '-1') {
|
394 |
-
//console.log('this is an extra trigger');
|
395 |
-
pre = id_arr.splice(0, 1);
|
396 |
-
id = id_arr.join('-');
|
397 |
-
|
398 |
-
//deal with any scroll to links from the Extra Collapse Trigger
|
399 |
-
if(jQuery(this).hasClass('scroll-to-trigger')){
|
400 |
-
var target_offset = jQuery('#'+id).offset();
|
401 |
-
offset_top = target_offset.top;
|
402 |
-
}
|
403 |
-
|
404 |
-
//deal with any scroll to links from the Title Trigger
|
405 |
-
if(jQuery('#'+id).hasClass('scroll-to-trigger')){
|
406 |
-
offset_top = jQuery('#scrollonclose-'+id).attr('name');
|
407 |
-
if (offset_top == 'auto') {
|
408 |
-
var target_offset = jQuery('#'+id).offset();
|
409 |
-
offset_top = target_offset.top;
|
410 |
-
}
|
411 |
-
}
|
412 |
-
|
413 |
-
//toggle master trigger arrow
|
414 |
-
jQuery('#'+id).toggleClass('colomat-close');
|
415 |
-
|
416 |
-
//toggle any other extra trigger arrows
|
417 |
-
jQuery('[id^=extra][id$='+id+']').toggleClass('colomat-close');
|
418 |
-
}
|
419 |
-
|
420 |
-
else if(id.indexOf('bot-') != '-1'){
|
421 |
-
id = id.substr(4);
|
422 |
-
jQuery('#'+id).toggleClass('colomat-close');
|
423 |
-
|
424 |
-
//deal with any scroll to links from the Internal Collapse Trigger
|
425 |
-
if(jQuery(this).hasClass('scroll-to-trigger')){
|
426 |
-
var target_offset = jQuery('#'+id).offset();
|
427 |
-
offset_top = target_offset.top;
|
428 |
-
}
|
429 |
-
|
430 |
-
//deal with any scroll to links from the Title Trigger
|
431 |
-
if(jQuery('#'+id).hasClass('scroll-to-trigger')){
|
432 |
-
offset_top = jQuery('#scrollonclose-'+id).attr('name');
|
433 |
-
if (offset_top == 'auto') {
|
434 |
-
var target_offset = jQuery('#'+id).offset();
|
435 |
-
offset_top = target_offset.top;
|
436 |
-
}
|
437 |
-
}
|
438 |
-
}
|
439 |
-
else{
|
440 |
-
jQuery(this).toggleClass('colomat-close');
|
441 |
-
//toggle any extra triggers
|
442 |
-
jQuery('[id^=extra][id$='+id+']').toggleClass('colomat-close');
|
443 |
-
}
|
444 |
-
|
445 |
-
//check if the title needs to be swapped out
|
446 |
-
if(jQuery("#swap-"+id).length > 0){
|
447 |
-
swapTitle(jQuery('#'+id), "#swap-"+id);
|
448 |
-
}
|
449 |
-
|
450 |
-
//check if the excerpt needs to be swapped out
|
451 |
-
if(jQuery("#swapexcerpt-"+id).length > 0){
|
452 |
-
swapTitle("#excerpt-"+id, "#swapexcerpt-"+id);
|
453 |
-
}
|
454 |
-
|
455 |
-
//add visited class
|
456 |
-
jQuery(this).addClass('colomat-visited');
|
457 |
-
|
458 |
-
//toggle parent highlight class
|
459 |
-
var parentID = 'parent-'+id;
|
460 |
-
jQuery('#' + parentID).toggleClass('colomat-parent-highlight');
|
461 |
-
|
462 |
-
//check for snap-shut
|
463 |
-
if(!jQuery(this).hasClass('colomat-close') && jQuery(this).hasClass('snap-shut')){
|
464 |
-
jQuery('#target-'+id).hide();
|
465 |
-
}
|
466 |
-
else{
|
467 |
-
toggleState (jQuery(this), id, true, id);
|
468 |
-
}
|
469 |
-
|
470 |
-
//deal with grouped items if needed
|
471 |
-
if(jQuery(this).attr('rel') !== undefined){
|
472 |
-
var rel = jQuery(this).attr('rel');
|
473 |
-
if(rel.indexOf('-highlander') != '-1'){
|
474 |
-
closeOtherMembers(rel, id);
|
475 |
-
}
|
476 |
-
else{
|
477 |
-
closeOtherGroups(rel);
|
478 |
-
}
|
479 |
-
}
|
480 |
-
|
481 |
-
if(offset_top){
|
482 |
-
jQuery('html, body').animate({scrollTop:offset_top}, 500);
|
483 |
-
}
|
484 |
-
});
|
485 |
-
|
486 |
-
|
487 |
-
jQuery(document).on('click', '.expandall', function(event) {
|
488 |
-
if(jQuery(this).attr('rel') !== undefined){
|
489 |
-
var rel = jQuery(this).attr('rel');
|
490 |
-
var loop_items = jQuery('.collapseomatic:not(.colomat-close)[rel="' + rel +'"]');
|
491 |
-
}
|
492 |
-
else if(jQuery(this).attr('data-togglegroup') !== undefined){
|
493 |
-
var toggroup = jQuery(this).attr('data-togglegroup');
|
494 |
-
var loop_items = jQuery('.collapseomatic:not(.colomat-close)[data-togglegroup="' + toggroup +'"]');
|
495 |
-
}
|
496 |
-
else{
|
497 |
-
var loop_items = jQuery('.collapseomatic:not(.colomat-close)');
|
498 |
-
}
|
499 |
-
|
500 |
-
colomat_expandall(loop_items);
|
501 |
-
});
|
502 |
-
|
503 |
-
jQuery(document).on('click', '.collapseall', function(event) {
|
504 |
-
if(jQuery(this).attr('rel') !== undefined){
|
505 |
-
var rel = jQuery(this).attr('rel');
|
506 |
-
var loop_items = jQuery('.collapseomatic.colomat-close[rel="' + rel +'"]');
|
507 |
-
}
|
508 |
-
else if(jQuery(this).attr('data-togglegroup') !== undefined){
|
509 |
-
var toggroup = jQuery(this).attr('data-togglegroup');
|
510 |
-
var loop_items = jQuery('.collapseomatic.colomat-close[data-togglegroup="' + toggroup +'"]');
|
511 |
-
}
|
512 |
-
else {
|
513 |
-
var loop_items = jQuery('.collapseomatic.colomat-close');
|
514 |
-
}
|
515 |
-
|
516 |
-
colomat_collapseall(loop_items);
|
517 |
-
});
|
518 |
-
|
519 |
-
//handle new page loads with anchor
|
520 |
-
var fullurl = document.location.toString();
|
521 |
-
// the URL contains an anchor, but not a hash-bang (#!)
|
522 |
-
if (fullurl.match('#(?!\!)')) {
|
523 |
-
// click the navigation item corresponding to the anchor
|
524 |
-
var anchor_arr = fullurl.split(/#(?!\!)/);
|
525 |
-
if(anchor_arr.length > 1){
|
526 |
-
junk = anchor_arr.splice(0, 1);
|
527 |
-
anchor = anchor_arr.join('#');
|
528 |
-
}
|
529 |
-
else{
|
530 |
-
anchor = anchor_arr[0];
|
531 |
-
}
|
532 |
-
|
533 |
-
//if the element exists
|
534 |
-
if( jQuery('#' + anchor).length ){
|
535 |
-
|
536 |
-
//if the element isn't already expanded, expand it
|
537 |
-
if(!jQuery('#' + anchor).hasClass('colomat-close')){
|
538 |
-
jQuery('#' + anchor).click();
|
539 |
-
}
|
540 |
-
|
541 |
-
//expand any nested parents
|
542 |
-
jQuery('#' + anchor).parents('.collapseomatic_content').each(function(index) {
|
543 |
-
parent_arr = jQuery(this).attr('id').split('-');
|
544 |
-
junk = parent_arr.splice(0, 1);
|
545 |
-
parent = parent_arr.join('-');
|
546 |
-
jQuery('#' + parent).click();
|
547 |
-
})
|
548 |
-
|
549 |
-
if(typeof colomatoffset !== 'undefined'){
|
550 |
-
var anchor_offset = jQuery('#' + anchor).offset();
|
551 |
-
colomatoffset = colomatoffset + anchor_offset.top;
|
552 |
-
jQuery('html, body').animate({scrollTop:colomatoffset}, 50);
|
553 |
-
}
|
554 |
-
}
|
555 |
-
}
|
556 |
-
|
557 |
-
//handle anchor links within the same page
|
558 |
-
jQuery(document).on('click', 'a.expandanchor', function(event) {
|
559 |
-
//event.preventDefault();
|
560 |
-
var fullurl = jQuery(this).attr('href');
|
561 |
-
// the URL contains an anchor but not a hash-bang
|
562 |
-
if (fullurl.match('#(?!\!)')) {
|
563 |
-
// click the navigation item corresponding to the anchor
|
564 |
-
var anchor_arr = fullurl.split(/#(?!\!)/);
|
565 |
-
|
566 |
-
if(anchor_arr.length > 1){
|
567 |
-
junk = anchor_arr.splice(0, 1);
|
568 |
-
anchor = anchor_arr.join('#');
|
569 |
-
}
|
570 |
-
else{
|
571 |
-
anchor = anchor_arr[0];
|
572 |
-
}
|
573 |
-
|
574 |
-
if( jQuery('#' + anchor).length ){
|
575 |
-
//expand any nested parents
|
576 |
-
jQuery('#' + anchor).parents('.collapseomatic_content').each(function(index) {
|
577 |
-
parent_arr = jQuery(this).attr('id').split('-');
|
578 |
-
junk = parent_arr.splice(0, 1);
|
579 |
-
parent = parent_arr.join('-');
|
580 |
-
if(!jQuery('#' + parent).hasClass('colomat-close')){
|
581 |
-
jQuery('#' + parent).click();
|
582 |
-
}
|
583 |
-
})
|
584 |
-
//now expand the target anchor
|
585 |
-
if(!jQuery('#' + anchor).hasClass('colomat-close')){
|
586 |
-
jQuery('#' + anchor).click();
|
587 |
-
}
|
588 |
-
}
|
589 |
-
}
|
590 |
-
});
|
591 |
-
|
592 |
-
jQuery(document).on('click', 'a.colomat-nolink', function(event) {
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/light_style.css
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
.collapseomatic {
|
2 |
-
background-image: url('images/arrow-down.png');
|
3 |
-
background-repeat: no-repeat;
|
4 |
-
padding: 0 0 10px 16px;
|
5 |
-
cursor: pointer;
|
6 |
-
}
|
7 |
-
.collapseomatic:focus {
|
8 |
-
outline: 0;
|
9 |
-
}
|
10 |
-
.arrowright {
|
11 |
-
background-position: top right;
|
12 |
-
padding: 0 16px 10px 0;
|
13 |
-
}
|
14 |
-
.noarrow {
|
15 |
-
background-image: none !important;
|
16 |
-
padding: 0 0 10px 0;
|
17 |
-
}
|
18 |
-
.colomat-hover {
|
19 |
-
text-decoration: underline;
|
20 |
-
}
|
21 |
-
.colomat-close {
|
22 |
-
background-image: url('images/arrow-up.png');
|
23 |
-
}
|
24 |
-
.colomat-swap {
|
25 |
-
display: none;
|
26 |
-
}
|
27 |
-
.collapseomatic_excerpt, .collapseomatic_content {
|
28 |
-
margin-top: 0px;
|
29 |
-
margin-left: 16px;
|
30 |
-
padding: 0px;
|
31 |
-
}
|
32 |
-
.content_collapse_wrapper {
|
33 |
-
position: absolute; left: -999em;
|
34 |
-
}
|
35 |
-
.collapseall, .expandall {
|
36 |
-
cursor: pointer;
|
37 |
-
}
|
38 |
-
.collapseall:hover, .expandall:hover, .collapseall:focus, .expandall:focus {
|
39 |
-
text-decoration: underline;
|
40 |
-
}
|
41 |
-
.maptastic {
|
42 |
-
position: absolute !important;
|
43 |
-
left: -10000px !important;
|
44 |
-
display:block !important;
|
45 |
-
max-width: 9999px;
|
46 |
-
}
|
47 |
-
.span_fix {
|
48 |
-
padding: 0 !important;
|
49 |
-
margin: 0 !important;
|
50 |
-
}
|
51 |
-
.span_fix:before, .span_fix:after {
|
52 |
-
content: none;
|
53 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/readme.txt
DELETED
@@ -1,339 +0,0 @@
|
|
1 |
-
=== Collapse-O-Matic ===
|
2 |
-
|
3 |
-
Contributors: twinpictures, baden03
|
4 |
-
Donate link: https://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
-
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
|
6 |
-
Requires at least: 4.0
|
7 |
-
Tested up to: 4.8
|
8 |
-
Stable tag: 1.7.4
|
9 |
-
License: GPLv2 or later
|
10 |
-
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
|
12 |
-
Remove clutter, save space: display and hide additional content in a SEO friendly way by wrapping content in an [expand] shortcode.
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A <a href='https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options and attribute demos</a> are available, as well as <a href='https://wordpress.org/support/plugin/jquery-collapse-o-matic'>free community</a> support.
|
17 |
-
|
18 |
-
== Installation ==
|
19 |
-
|
20 |
-
1. Old-school: upload the `collapse-o-matic` folder to the `/wp-content/plug-ins/` directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plug-ins menu.
|
21 |
-
1. Activate the Plug-in
|
22 |
-
1. Add a the shortcode to your post like so: `[expand title="Displayed Title Goes Here"]Hidden content goes here[/expand]`
|
23 |
-
1. Test that the this plug-in meets your demanding needs.
|
24 |
-
1. Tweak the CSS to match your flavour.
|
25 |
-
1. Rate the plug-in and verify if it works at wordpress.org.
|
26 |
-
1. Leave a comment regarding bugs, feature request, cocktail recipes at https://wordpress.org/tags/jquery-collapse-o-matic/
|
27 |
-
|
28 |
-
== Frequently Asked Questions ==
|
29 |
-
|
30 |
-
= Where can I translate this plugin into my favourite language? =
|
31 |
-
<a href='https://translate.wordpress.org/projects/wp-plugins/jquery-collapse-o-matic'>Community translation for Collapse-O-Matic</a> is available via the WordPress Translation project.
|
32 |
-
|
33 |
-
= I am a Social Netwookiee, might Twinpictures have a Facebook page? =
|
34 |
-
Yes, yes... <a href='https://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
|
35 |
-
|
36 |
-
= Does Twinpictures do the Twitter? =
|
37 |
-
Ah yes! <a href='https://twitter.com/#!/twinpictures'>@Twinpictures</a> does the twitter tweeting around here.
|
38 |
-
|
39 |
-
= How does one use the shortcode, exactly? =
|
40 |
-
A <a href='https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options</a> has been provided to answer this exact question.
|
41 |
-
|
42 |
-
= Is Galato the same as Ice Cream? =
|
43 |
-
No. Not even close.
|
44 |
-
|
45 |
-
== Screenshots ==
|
46 |
-
|
47 |
-
1. Hmmm... wonder what happens this text by that arrow is clicked?
|
48 |
-
2. Holy Crap! That other text just showed up like magic! Thank you Collapse-O-Matic!
|
49 |
-
3. Options Page? Yes, Options Page!
|
50 |
-
|
51 |
-
== Changelog ==
|
52 |
-
|
53 |
-
= 1.7.4 =
|
54 |
-
* fixed issue with external triggers for nested elements
|
55 |
-
* changed links to https
|
56 |
-
* fully tested with WordPress 4.7.3
|
57 |
-
|
58 |
-
= 1.7.3 =
|
59 |
-
* added effect and duration attributes and data-attributes
|
60 |
-
* if duration is a number, string will be converted to integer
|
61 |
-
* fully tested with WordPress 4.6
|
62 |
-
|
63 |
-
= 1.7.2 =
|
64 |
-
* adjusted data-findme to deal with ‘auto’ value
|
65 |
-
* added the must-be-one class to force one highlander element to stay open
|
66 |
-
|
67 |
-
= 1.7.1 =
|
68 |
-
* integrated new collapse-commander image trigger feature
|
69 |
-
* added new togglegroup shortcode attribute and data-togglegroup html attribute to reference groups of expand elements with out auto-collapsing other groups, such as when using the real attribute
|
70 |
-
* added the ability to load plugin css only when shortcode is used
|
71 |
-
* removed language files in favour of WordPress language packs
|
72 |
-
* fully tested to work with WordPress 4.5
|
73 |
-
|
74 |
-
= 1.7.0 =
|
75 |
-
* reworked the find-me feature to use new data-findme attribute, rather than create a hidden element.
|
76 |
-
|
77 |
-
= 1.6.15 =
|
78 |
-
* renamed language files to xx_XX.po and xx_XX.mo
|
79 |
-
* recreated the .pot file
|
80 |
-
|
81 |
-
= 1.6.14 =
|
82 |
-
* hash-bang (#!) that are used in urls will not be processed as url anchors
|
83 |
-
* now checks if a url anchor is actually an existing element before trying to process it
|
84 |
-
* changed language domain to jquery-collapse-o-matic to work with WordPress’ new translation process
|
85 |
-
* updated tested up to tag to 4.3.1
|
86 |
-
|
87 |
-
= 1.6.13 =
|
88 |
-
* added map resize support for google maps builder
|
89 |
-
|
90 |
-
= 1.6.12 =
|
91 |
-
* removed css that changed the display to block on focus
|
92 |
-
|
93 |
-
= 1.6.11 =
|
94 |
-
* added css to remove the border on focus
|
95 |
-
|
96 |
-
= 1.6.10 =
|
97 |
-
* added styles and jQuery for accessibility: focus/keyboard navigation
|
98 |
-
|
99 |
-
= 1.6.9 =
|
100 |
-
* added catch-all callback for jetpack’s infinite-scroll
|
101 |
-
* fix: XSS Vulnerability
|
102 |
-
|
103 |
-
= 1.6.8 =
|
104 |
-
* fixed filter_content toggle bug.
|
105 |
-
* even if content is not to be filtered, it will still be passed through do_shortcode function
|
106 |
-
|
107 |
-
= 1.6.7 =
|
108 |
-
* added filter_content to the options page, defaults to off
|
109 |
-
|
110 |
-
= 1.6.6 =
|
111 |
-
* added filter attribute to pass the content through the_content filter
|
112 |
-
* changed name of wpex_clean_shortcodes function
|
113 |
-
* tested up to: WordPress 4.2-alpha-31047
|
114 |
-
|
115 |
-
= 1.6.5 =
|
116 |
-
* maptastic class only removed when present
|
117 |
-
* maptastic has a max-width assigned to prevent content from entering display area.
|
118 |
-
* updated collapse-commander integration to work with new licensing system
|
119 |
-
* tested up to: WordPress 4.2-alpha-31047
|
120 |
-
|
121 |
-
= 1.6.4 =
|
122 |
-
* added plugin to GitHub: https://github.com/baden03/collapse-o-matic
|
123 |
-
* added new tabindex attribute to shortcode and options page
|
124 |
-
* registration fields are masked using password input type
|
125 |
-
|
126 |
-
= 1.6.3 =
|
127 |
-
* added shortcode and html support for the title, swaptitle, startwrap, enwrap and excerpt attributes using placeholders
|
128 |
-
* added wpex_clean_shortcodes filter to strip unwanted p and br tags from the shortcode
|
129 |
-
* added the ability to set trigclass, targtag and targclass attribute values in the plugin options page
|
130 |
-
|
131 |
-
= 1.6.2 =
|
132 |
-
* added colomat-swap class to the swaptitle element
|
133 |
-
* added optional cid default to the shortcode
|
134 |
-
|
135 |
-
= 1.6.1 =
|
136 |
-
* fixed undeclared cid variable
|
137 |
-
|
138 |
-
= 1.6 =
|
139 |
-
* fixed issue with using id anchor links on elements with expanded=‘true’
|
140 |
-
* added support for Collapse Commander add-on plugin to manage expand elements
|
141 |
-
|
142 |
-
= 1.5.10 =
|
143 |
-
* change the find me element from an anchor to an input due to HTML5 no longer supporting the Name attribute
|
144 |
-
* fixed bug with trigpos inline
|
145 |
-
* added span_fix classes to css files
|
146 |
-
* added 4.0 icons to assets
|
147 |
-
|
148 |
-
= 1.5.9 =
|
149 |
-
* fixed issue with missing classes in dark style
|
150 |
-
* streamlined the collapse/expand function
|
151 |
-
* streamlined the collapseall/expandall functions
|
152 |
-
* added auto to scrollonclose attribute
|
153 |
-
* added new colomat_expandall and colomat_collpaseall functions that can be triggered externally
|
154 |
-
|
155 |
-
= 1.5.8 =
|
156 |
-
* load scripts only if shortcode is in use defaults to false - load all the time
|
157 |
-
* added option to choose where all scripts will load: header or footer
|
158 |
-
|
159 |
-
= 1.5.7 =
|
160 |
-
* option to only load scripts if shortcode is in use
|
161 |
-
* script now loaded in footer
|
162 |
-
* loading js and css now hooked to wp_enqueue_scripts rather than init
|
163 |
-
* added Serbian language files courtesy of Borisa Djuraskovic from webhostinghub.com
|
164 |
-
|
165 |
-
= 1.5.6 =
|
166 |
-
* fixed admin_init error
|
167 |
-
|
168 |
-
= 1.5.5 =
|
169 |
-
* updated for 3.8
|
170 |
-
* cleaned up old code
|
171 |
-
|
172 |
-
= 1.5.4 =
|
173 |
-
* updated .on method
|
174 |
-
* removed php4 constructor
|
175 |
-
* added DE and RU languages
|
176 |
-
|
177 |
-
= 1.5.3 =
|
178 |
-
* shortcode works in sidebar widgets (again)
|
179 |
-
* fixed hasClass error in Slide Only animation option
|
180 |
-
|
181 |
-
= 1.5.2 =
|
182 |
-
* find-me now is called only after collapse/expand animations
|
183 |
-
* using .on() method once again
|
184 |
-
* updated Requires at least tag to 3.3
|
185 |
-
* added swapexcerpt
|
186 |
-
* fixed typos on the options page
|
187 |
-
* added custom css to options page
|
188 |
-
* added targtag and targpos attributes
|
189 |
-
* added the ability to insert extra external triggers
|
190 |
-
|
191 |
-
= 1.5.1 =
|
192 |
-
* find-me auto feature improved to work with responsive websites
|
193 |
-
|
194 |
-
= 1.5 =
|
195 |
-
* completely re-wrote plugin
|
196 |
-
* added sweet-sweet options page
|
197 |
-
* added colomat-expand-only class that forces collapse element to only open once and stay open
|
198 |
-
* introduced Collapse-Pro-Matic for Premium Level Collapsing Action.
|
199 |
-
* added scroll-to-trigger class for Internal Collapse Triggers
|
200 |
-
* added livequery to bind collapse functions to dynamically added content
|
201 |
-
* added callbacks: collapse_init(); and findme(); for dynamically added content
|
202 |
-
* added language files for localization
|
203 |
-
|
204 |
-
= 1.4.11 =
|
205 |
-
* added colomat-parent-highlight class functionality
|
206 |
-
* moved findme auto calculations until after all images have loaded.
|
207 |
-
* Added elwraptag and elwrapclass attributes
|
208 |
-
* Added snap-shut class to slam collapse elements shut
|
209 |
-
|
210 |
-
= 1.4.10 =
|
211 |
-
* Added colomat-nolink class for anchor tags to prevent auto-scrolling to anchor
|
212 |
-
* bot- links for targets with swaptitle will now only swap out title for top trigger text
|
213 |
-
|
214 |
-
= 1.4.9 =
|
215 |
-
* Replaced on() event handler back to click due to the WordPress world not quite ready for on(). People are still using jQuery 1.6.4 - can you believe that?!
|
216 |
-
|
217 |
-
= 1.4.8 =
|
218 |
-
* Click events now use jQuery's on() event handler for content that arrived dynamically via AJAX NOTE: plugin now requires jQuery version 1.7 or newer
|
219 |
-
* added notitle attribute if no title should be displayed
|
220 |
-
* added startwrap and enwrap attributes for wrapping titles
|
221 |
-
* fixed bug when using nested close links and highlander grouping
|
222 |
-
* added expandanchor to expand items from anchor links on the same page
|
223 |
-
* added colomat-expand-only class to prevent collapse from trigger text
|
224 |
-
* added scrollonclose attribute and scroll-to-trigger class to trigger auto-scroll to specific value on close.
|
225 |
-
|
226 |
-
= 1.4.7 =
|
227 |
-
Fixed auto-expand of urls with id-anchors
|
228 |
-
|
229 |
-
= 1.4.6 =
|
230 |
-
* fixed JS error in 1.4.5 - GRRR
|
231 |
-
|
232 |
-
= 1.4.5 =
|
233 |
-
* Added SlideFade/SlideToggle option
|
234 |
-
* Visited trigers now have colomat-visited class
|
235 |
-
|
236 |
-
= 1.4.4 =
|
237 |
-
* Minified javascript for faster page loads
|
238 |
-
|
239 |
-
= 1.4.3 =
|
240 |
-
* Added the findme attribute to auto scroll to start of expanded items
|
241 |
-
|
242 |
-
= 1.4.2 =
|
243 |
-
* Added speed adjustment to the slideToggle
|
244 |
-
|
245 |
-
= 1.4.1 =
|
246 |
-
* Autoclose elements will now trigger SwapTitle
|
247 |
-
|
248 |
-
= 1.4 =
|
249 |
-
* Relaunched of plugin page on Twinpictures' Plugin Oven
|
250 |
-
|
251 |
-
= 1.3.18 =
|
252 |
-
* Added alternate style sheet for sites with dark backgrounds.
|
253 |
-
|
254 |
-
= 1.3.17 =
|
255 |
-
* Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
|
256 |
-
|
257 |
-
= 1.3.16.1 =
|
258 |
-
* Added noarrows class for better integration of images as triggers.
|
259 |
-
|
260 |
-
= 1.3.16 =
|
261 |
-
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
262 |
-
|
263 |
-
= 1.3.15 =
|
264 |
-
* Added trigpos attribute to position the trigger below the target.
|
265 |
-
|
266 |
-
= 1.3.14 =
|
267 |
-
* Fixed the Enqueue error (thanks pborg & lancehudson)
|
268 |
-
* Expand All and Collapse All will now also trigger swap titles
|
269 |
-
* Added force_content_collapse class trigger to hide all targets w/o tirggers (roll-your-own)
|
270 |
-
* Added content_collapse_wrapper class trigger that keeps targets hidden if no JavaScript is present.
|
271 |
-
|
272 |
-
= 1.3.13 =
|
273 |
-
* Added the ability to place a second trigger link inside the expanding content area.
|
274 |
-
|
275 |
-
= 1.3.12 =
|
276 |
-
* Added the 'tracy patch' that will collapse all nested items if the parent is collapsed via highlander grouping.
|
277 |
-
|
278 |
-
= 1.3.11 =
|
279 |
-
* Added excerpt feature and all related attributes.
|
280 |
-
|
281 |
-
= 1.3.10 =
|
282 |
-
* Swaptitle system rebuilt to support images and cufon.
|
283 |
-
* Updated CSS the over generalized names close and hover to more plug-in specific colomat-close and colomat-hover
|
284 |
-
* removed !important from CSS arrow definitions to make it easier to redefine arrows.
|
285 |
-
|
286 |
-
= 1.3.9 =
|
287 |
-
* Swaptitle will not be triggered if either <img> or <cufon> tags are used in trigger titles
|
288 |
-
* Added rel grouping to the collapse/expand-all triggers to target only elements of a single group.
|
289 |
-
|
290 |
-
= 1.3.8 =
|
291 |
-
* Expand elements containing content with one empty space will no longer insert empty target elements.
|
292 |
-
|
293 |
-
= 1.3.7 =
|
294 |
-
* Added expandsub1 - expandsub3 shortcodes for nested expand elements.
|
295 |
-
* Added collapse/expand-all triggers.
|
296 |
-
* Better looking 24bit arrows.
|
297 |
-
|
298 |
-
= 1.3.6 =
|
299 |
-
* Plug-in now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
|
300 |
-
|
301 |
-
= 1.3.5 =
|
302 |
-
* Random ID's now start with letters, for valid xhtml.
|
303 |
-
|
304 |
-
= 1.3.4 =
|
305 |
-
* Changed '-member' to '-highlander' because it sounds better.
|
306 |
-
|
307 |
-
= 1.3.3 =
|
308 |
-
* Added the ability to have only one member of a group expanded by adding '-member' to the rel attribute value.
|
309 |
-
|
310 |
-
= 1.3.2 =
|
311 |
-
* Added Expanded attribute that sets the default position expanded open.
|
312 |
-
* Added style that moves arrows to the right of the text.
|
313 |
-
|
314 |
-
= 1.3.1 =
|
315 |
-
* Added the hover style to pimp the element style when moused over.
|
316 |
-
|
317 |
-
= 1.3 =
|
318 |
-
* Added the rel attribute to deal with grouping collapse elements.
|
319 |
-
* Added the trigclass and targclass attributes.
|
320 |
-
* Added the alt attribute to define the title's hover-over text.
|
321 |
-
|
322 |
-
= 1.2 =
|
323 |
-
* Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
|
324 |
-
* Style will support various element tags... span, div, h1, h2... etc.
|
325 |
-
* Style separates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
|
326 |
-
|
327 |
-
= 1.1 =
|
328 |
-
* Optimized Code
|
329 |
-
* Shortcode now works in Sidebar
|
330 |
-
* Expand Titles now have title tags that match the title, not just some random number
|
331 |
-
* Shortcode can include a user-defined ID instead of a generated random number
|
332 |
-
* Added auto expand feature if an anchor tag is used in the URL
|
333 |
-
|
334 |
-
= 1.0 =
|
335 |
-
* The plug-in came to be.
|
336 |
-
|
337 |
-
== Upgrade Notice ==
|
338 |
-
fixed issue with external triggers for nested elements
|
339 |
-
fully tested with WordPress 4.7.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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