Collapse-O-Matic - Version 1.2

Version Description

  • Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
  • Style will support various element tags... span, div, h1, h2... etc.
  • Style seperates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 Collapse-O-Matic
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

collapse-o-matic.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: jQuery Collapse-O-Matic
4
  Plugin URI: http://www.twinpictures.de/collapse/
5
  Description: Collapseable Objects using jQuery.
6
- Version: 1.1
7
  Author: Twinpictures
8
  Author URI: http://www.twinpictures.de
9
  License: GPL2
@@ -46,9 +46,10 @@ function collapsTronic($atts, $content=null){
46
  extract(shortcode_atts(array(
47
  'title' => '',
48
  'id' => $ran,
 
49
  ), $atts));
50
 
51
- $link = "<span class=\"collapseomatic\" title=\"".$title."\" id=\"".$id."\">".$title."</span>";
52
  $eDiv = "<div id=\"target-".$id."\" style=\"display:none;\" class=\"collapseomatic_content\">".do_shortcode($content)."</div>";
53
  return $link . $eDiv;
54
  }
3
  Plugin Name: jQuery Collapse-O-Matic
4
  Plugin URI: http://www.twinpictures.de/collapse/
5
  Description: Collapseable Objects using jQuery.
6
+ Version: 1.2
7
  Author: Twinpictures
8
  Author URI: http://www.twinpictures.de
9
  License: GPL2
46
  extract(shortcode_atts(array(
47
  'title' => '',
48
  'id' => $ran,
49
+ 'tag' => 'span',
50
  ), $atts));
51
 
52
+ $link = "<".$tag." class=\"collapseomatic\" title=\"".$title."\" id=\"".$id."\">".$title."</".$tag.">";
53
  $eDiv = "<div id=\"target-".$id."\" style=\"display:none;\" class=\"collapseomatic_content\">".do_shortcode($content)."</div>";
54
  return $link . $eDiv;
55
  }
images/arrow-down.png ADDED
Binary file
images/arrow-up.png ADDED
Binary file
images/collapse-arrows.png DELETED
Binary file
readme.txt CHANGED
@@ -5,13 +5,13 @@ Donate link: http://www.twinpictures.de/collapse-o-matic/
5
  Tags: collapse, expand, collapsible, expandable, content, shortcode, hidden, jQuery, javascript, twinpictures
6
  Requires at least: 2.7
7
  Tested up to: 3.0.2
8
- Stable tag: 1.1
9
 
10
  Collapse-O-Matic adds an `[expand]` shortcode that wraps any object or content--including other shortcodes--into a lovely jQuery collapsible div.
11
 
12
  == Description ==
13
 
14
- Collapse-O-Matic adds an `[expand title="title" id="id"]content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery collapsible div. This plugin is a more advanced version of--and inspired by--DrLebowski's Collapsing Objects.
15
 
16
  == Installation ==
17
 
@@ -26,12 +26,12 @@ Collapse-O-Matic adds an `[expand title="title" id="id"]content[/expand]` shortc
26
  == Frequently Asked Questions ==
27
 
28
  = How dose one use the shortcode, exactly? =
29
- '[expand title="title goes here" id="optional-id-goes-here"]this is where content, including other shortcodes, goes.[/expand]'
30
 
31
  = Can one of the expands auto-expand based on an anchor tag in the url? =
32
  Yes, just do this:
33
- 1. Give the expand a specific id in the short code: '[expand title="title goes here" id="monkey"]this is where content, including other shortcodes, goes.[/expand]'
34
- 1. Use the id as and anchor in the URL: http://www.twinpictures.de/your-page/#monkey
35
 
36
  = Is Galato the same as Ice Cream? =
37
  No. Not even close.
@@ -43,6 +43,11 @@ No. Not even close.
43
 
44
  == Changelog ==
45
 
 
 
 
 
 
46
  = 1.1 =
47
  * Optimized Code
48
  * Shortcode now works in Sidebar
@@ -55,6 +60,9 @@ No. Not even close.
55
 
56
  == Upgrade Notice ==
57
 
 
 
 
58
  = 1.1 =
59
  Shortcode now works in sidebars. Shorcode must be written as `[expand title="title goes here" id="optional-id-goes-here"]content goes here[/expand]`.
60
 
5
  Tags: collapse, expand, collapsible, expandable, content, shortcode, hidden, jQuery, javascript, twinpictures
6
  Requires at least: 2.7
7
  Tested up to: 3.0.2
8
+ Stable tag: 1.2
9
 
10
  Collapse-O-Matic adds an `[expand]` shortcode that wraps any object or content--including other shortcodes--into a lovely jQuery collapsible div.
11
 
12
  == Description ==
13
 
14
+ Collapse-O-Matic adds an `[expand title="title" id="optional-id" tag="optional-span"]content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery collapsible div. This plugin is a more advanced version of--and inspired by--DrLebowski's Collapsing Objects.
15
 
16
  == Installation ==
17
 
26
  == Frequently Asked Questions ==
27
 
28
  = How dose one use the shortcode, exactly? =
29
+ [expand title="title goes here" id="optional-id-goes-here" tag="optional-html-tag-goes-here"]this is where content, including other shortcodes, goes.[/expand]
30
 
31
  = Can one of the expands auto-expand based on an anchor tag in the url? =
32
  Yes, just do this:
33
+ * Give the expand a specific id in the short code: [expand title="title goes here" id="monkey"]this is where content, including other shortcodes, goes.[/expand]
34
+ * Use the id as and anchor in the URL: http://www.twinpictures.de/your-page/#monkey
35
 
36
  = Is Galato the same as Ice Cream? =
37
  No. Not even close.
43
 
44
  == Changelog ==
45
 
46
+ = 1.2 =
47
+ * Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
48
+ * Style will support various element tags... span, div, h1, h2... etc.
49
+ * Style seperates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
50
+
51
  = 1.1 =
52
  * Optimized Code
53
  * Shortcode now works in Sidebar
60
 
61
  == Upgrade Notice ==
62
 
63
+ = 1.2 =
64
+ Style has been updated for ultimate flexibility. Shorcode can now be written as `[expand title="title goes here" id="optional-id-goes-here" tag="optional-html-tag-goes-here"]content goes here[/expand]`.
65
+
66
  = 1.1 =
67
  Shortcode now works in sidebars. Shorcode must be written as `[expand title="title goes here" id="optional-id-goes-here"]content goes here[/expand]`.
68
 
style.css CHANGED
@@ -1,11 +1,11 @@
1
- span.collapseomatic {
2
- background-image:url(images/collapse-arrows.png) !important;
3
  background-repeat:no-repeat;
4
  padding: 0 0 10px 16px;
5
  cursor: pointer;
6
  }
7
- span.close {
8
- background-position: 0 -33px !important;
9
  }
10
  .collapseomatic_content {
11
  display: none;
1
+ .collapseomatic {
2
+ background-image:url(images/arrow-down.png) !important;
3
  background-repeat:no-repeat;
4
  padding: 0 0 10px 16px;
5
  cursor: pointer;
6
  }
7
+ .close {
8
+ background-image:url(images/arrow-up.png) !important;
9
  }
10
  .collapseomatic_content {
11
  display: none;