Changeset 1321536
- Timestamp:
- 01/05/2016 08:57:26 AM (10 years ago)
- Location:
- bcorp-shortcodes/trunk
- Files:
-
- 5 edited
-
bcorp_shortcodes.php (modified) (4 diffs)
-
bcorp_shortcodes_data.php (modified) (4 diffs)
-
css/bcsc.css (modified) (2 diffs)
-
js/bcsc.js (modified) (3 diffs)
-
readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bcorp-shortcodes/trunk/bcorp_shortcodes.php
r1320862 r1321536 4 4 Plugin URI: http://shortcodes.bcorp.com 5 5 Description: Advanced word press shortcodes for use with any wordpress theme. 6 Version: 0.1 26 Version: 0.13 7 7 Author: Tim Brattberg 8 8 Author URI: http://bcorp.com … … 80 80 return $buttons; 81 81 } 82 83 function bcorp_accordion_shortcode($atts,$content=null,$tag) { 84 /* [bcorp_accordion] 85 multiple (true,false) 86 */ 87 $data=$GLOBALS['bcorp_shortcodes_data']->bcorp_sanitize_data($tag,$atts); 88 static $bcorp_id; 89 $bcorp_id++; 90 $output = '<div class="bcorp-accordion bcorp-accordion-multiple-'.$data['multiple'].'" id="bcorp-accordion-'.$bcorp_id.'">'.do_shortcode($content).'</div>'; 91 return $output; 92 } 93 94 function bcorp_accordion_panel_shortcode($atts,$content=null,$tag ) { 95 /* [bcorp_accord] 96 open (true,false) 97 title 98 textblock 99 */ 100 $data=$GLOBALS['bcorp_shortcodes_data']->bcorp_sanitize_data($tag,$atts); 101 return '<p class="bcorp-heading bcorp-accordion-header bcorp-accordion-header-hidden bcorp-accordion-open-'.$data['open'].'">'.$data['title'].'</p><div class="bcorp-accordion-content bcorp-alt-background">'.do_shortcode($content).'</div>'; 102 } 82 103 83 104 function bcorp_alert_box_shortcode($atts,$content=null,$tag ) { … … 477 498 } 478 499 479 function bcorp_tab bed_shortcode($atts,$content=null,$tag ) {480 /* [bcorp_tab bed]500 function bcorp_tab_panel_shortcode($atts,$content=null,$tag ) { 501 /* [bcorp_tab_panel] 481 502 * title 482 503 * showicon (true,false) … … 486 507 static $bcorp_id; 487 508 $bcorp_id++; 488 return '<div class="bcorp-tab bed bcorp-alt-background" id="bcorp-tab-'.$bcorp_id.'"><div class="bcorp-tabbed-inner">'.do_shortcode(rawurldecode($content)).'</div></div>';509 return '<div class="bcorp-tab-panel bcorp-alt-background" id="bcorp-tab-'.$bcorp_id.'"><div class="bcorp-tab-panel-inner">'.do_shortcode(rawurldecode($content)).'</div></div>'; 489 510 } 490 511 -
bcorp-shortcodes/trunk/bcorp_shortcodes_data.php
r1320862 r1321536 502 502 503 503 $this->bcorp_add_shortcode( 504 "bcorp_accordion",array( 505 "title"=>"Accordion", 506 "admin_icon"=>"", 507 "accept_content"=>true, 508 "child_element"=>"bcorp_accordion_panel", 509 "width" => "1-1", 510 "closing_tag"=>true, 511 "admin_default"=>'<div class="bcve-bcorp_accordion"> 512 <i class="bcve-icon bcve-header-icon"></i> 513 <div class="bcve-bcorp_accordion-details">Multiple Open: <span class="bcve-bcorp_accordion-multiple">false</span></div> 514 </div>', 515 "variables"=>array( 516 'multiple'=>array( 517 'name'=>'Allow Multiple Tabs Open At Once', 518 'type'=>'checkbox', 519 'default'=>'false'), 520 ) 521 ) 522 ); 523 524 $this->bcorp_add_shortcode( 525 "bcorp_accordion_panel",array( 526 "title"=>"Accordion Panel", 527 "admin_icon"=>"", 528 "only_child"=>true, 529 "width"=>"1-3-min", 530 "parent_element"=>"bcorp_accordion", 531 "admin_default"=>'<div class="bcve-bcorp_accordion_panel"> 532 <div class="bcve-bcorp_accordion_panel-details"> 533 <span class="bcve-bcorp_accordion_panel-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Accordion - Edit Me</span> 534 <div class="bcve-bcorp_accordion_panel-textblock"><p>Accordion Content - Edit Me</p></div> 535 </div> 536 </div>', 537 "variables"=>array( 538 'open'=>array( 539 'name'=>'Open Tab On Page Load', 540 'type'=>'checkbox', 541 'default'=>'false'), 542 'title'=>array( 543 'name'=>'Title', 544 'type'=>'textfield', 545 'default' =>''), 546 'textblock'=>array( 547 'name'=>'Text Block', 548 'type'=>'textarea', 549 'editor'=>'tinymce', 550 'default' =>'' 551 ) 552 ) 553 ) 554 ); 555 556 $this->bcorp_add_shortcode( 504 557 "bcorp_button",array( 505 558 "title"=>"Button", … … 909 962 "admin_icon"=>"", 910 963 "accept_content"=>true, 911 "child_element"=>"bcorp_tab bed",964 "child_element"=>"bcorp_tab_panel", 912 965 "width" => "1-1", 913 966 "admin_default"=>'<div class="bcve-bcorp_tabs"><i class="bcve-icon bcve-header-icon"></i> … … 937 990 938 991 $this->bcorp_add_shortcode( 939 "bcorp_tab bed",array(992 "bcorp_tab_panel",array( 940 993 "title"=>"Tab Panel", 941 994 "admin_icon"=>"", … … 943 996 "width"=>"1-3-min", 944 997 "parent_element"=>"bcorp_tabs", 945 "admin_default"=>'<div class="bcve-bcorp_tab bed"><span class="bcve-bcorp_tabbed-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Tab - Edit Me</span><div class="bcve-bcorp_tabbed-textblock"><p>Tab Content - Edit Me</p></div></div>',998 "admin_default"=>'<div class="bcve-bcorp_tab_panel"><span class="bcve-bcorp_tab_panel-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Tab - Edit Me</span><div class="bcve-bcorp_tab_panel-textblock"><p>Tab Content - Edit Me</p></div></div>', 946 999 "variables"=>array( 947 1000 'title'=>array( -
bcorp-shortcodes/trunk/css/bcsc.css
r1320862 r1321536 104 104 } 105 105 106 /* [bcorp_accordion] */ 107 .bcorp-accordion {padding-top:1px; border-color:inherit; } 108 .bcorp-accordion .bcorp-accordion-header { border-width:1px; border-style:solid; border-color:inherit; padding:2em; margin-top:-1px; border-top-left-radius:2px; border-top-right-radius:2px; } 109 .bcorp-accordion p.bcorp-accordion-header { line-height:1em; padding:1.2em 2em; } 110 p.bcorp-accordion-header { margin-bottom: 0; } 111 .bcorp-accordion .bcorp-accordion-content { display:none; border-width:1px; border-style:solid; border-color:inherit; border-top:none; margin-bottom:5px; } 112 .bcorp-accordion-header-visible:before { content: "\f0d7"; font-family: "FontAwesome"; font-size:1.5em; position:relative; right:8px; top: 2px;} 113 .bcorp-accordion-header-hidden:before { content: "\f0da"; font-family: "FontAwesome"; font-size:1.5em; position:relative; right:8px; top: 2px;} 114 .bcorp-accordion-content { padding:1em; } 115 .bcorp-accordion-content > p:last-child { margin-bottom:0; } 106 116 107 117 /* [bcorp_alert_box] */ … … 180 190 .bcorp-tabs a { outline:0; box-shadow:none; } 181 191 .bcorp-tabs * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } 182 .bcorp-tab bed-inner {padding:1em; }183 .bcorp-tab bed-inner > p:last-child { margin-bottom:0; }192 .bcorp-tab-panel-inner {padding:1em; } 193 .bcorp-tab-panel-inner > p:last-child { margin-bottom:0; } 184 194 .bcorp-tab-top {border-left-width:1px; border-left-style:solid; border-color:inherit;} 185 195 .bcorp-tab-top ul { margin:0px; font-size:14px; padding:0; height:46px; border-color:inherit; } -
bcorp-shortcodes/trunk/js/bcsc.js
r1320862 r1321536 22 22 if ($(this).hasClass('bcorp-vertical-tab')) $(this).css('min-height',$(this).find('ul').height()); 23 23 $(this).find('li:first').addClass('bcorp-active'); 24 $(this).find('.bcorp-tab bed').hide();25 $(this).find('.bcorp-tab bed:first').show();24 $(this).find('.bcorp-tab-panel').hide(); 25 $(this).find('.bcorp-tab-panel:first').show(); 26 26 27 27 $(this).find('li').click(function(){ … … 29 29 $(this).parent().find('li').removeClass('bcorp-active'); 30 30 $(this).addClass('bcorp-active'); 31 $(this).parent().parent().find('.bcorp-tab bed').hide();31 $(this).parent().parent().find('.bcorp-tab-panel').hide(); 32 32 $($(this).find('a').attr('href')).show().find("div:first-child").hide().fadeIn(); 33 33 } … … 37 37 } 38 38 39 accordion(''); 40 function accordion(accordion) { 41 $(accordion+'.bcorp-accordion .bcorp-accordion-header').click(function() { 42 if($(this).next("div").is(":visible")){ 43 $(this).toggleClass("bcorp-accordion-header-visible").toggleClass("bcorp-accordion-header-hidden").next("div").slideUp(); 44 } else { 45 if ($('#'+$(this).parent().attr('id')).hasClass('bcorp-accordion-multiple-false')) $('#'+$(this).parent().attr('id')+' .bcorp-accordion-content').slideUp(); 46 $(this).toggleClass("bcorp-accordion-header-visible").toggleClass("bcorp-accordion-header-hidden").next("div").slideToggle(); 47 } 48 }); 49 $(accordion+".bcorp-accordion-open-true").toggleClass("bcorp-accordion-header-visible").toggleClass("bcorp-accordion-header-hidden").next("div").slideToggle(); 50 } 39 51 40 52 }); -
bcorp-shortcodes/trunk/readme.txt
r1320862 r1321536 5 5 Requires at least: 4.2.0 6 6 Tested up to: 4.4 7 Stable tag: 0.1 27 Stable tag: 0.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 15 15 The BCorp Shortcode includes the following elements. All of which include multiple display options configured in an easy to configure popup window. 16 16 17 Or you can download the BCorp Visual Editor at http://wordpress.org/plugins/bcorp-visual-editor/ to use them in a drag & drop page builder. 18 19 Additional information and examples of usage is available at http://shortcodes.bcorp.com. 20 17 21 **13 x Layout Options** 18 22 … … 20 24 * [bcorp_cell width="1-6|1-5|1-4|1-3|2-5|1-2|3-5|2-3|3-4|4-5|5-6|1-1"] 21 25 22 ** 9x Shortcode Elements**26 **11 x Shortcode Elements** 23 27 24 28 * [bcorp_alert] 29 * [bcorp_accordion] [bcorp_accordion_panel] 25 30 * [bcorp_button] 26 31 * [bcorp_heading] … … 28 33 * [bcorp_divider] 29 34 * [bcorp_icon] 30 * [bcorp_tabs] [bcorp_tab bed]35 * [bcorp_tabs] [bcorp_tab_panel] 31 36 * [bcorp_text] 32 37 … … 45 50 * [bcorp_wp_text] 46 51 47 Additional information and examples of usage is available at http://shortcodes.bcorp.com. 48 49 Many new shortcodes will be added to the collection shortly. Once the collection is complete I will also be releasing my exciting new Visual Editor which will make working with the shortcodes even simpler than ever. 52 Many new shortcodes will be added to the collection shortly. 50 53 51 54 == Installation == … … 68 71 == Changelog == 69 72 73 = 0.13 = 74 Added [bcorp_accordion] & [bcorp_accordion_panel] shortcodes. 75 Renamed [bcorp_tabbed] to [bcorp_tab_panel] 76 70 77 = 0.12 = 71 78 Added [bcorp_tabs] & [bcorp_tabbed] shortcodes. … … 80 87 == Upgrade Notice == 81 88 89 = 0.13 = 90 Added [bcorp_accordion] & [bcorp_accordion_panel] shortcodes. 91 Renamed [bcorp_tabbed] to [bcorp_tab_panel] 92 82 93 = 0.12 = 83 94 Added [bcorp_tabs] & [bcorp_tabbed] shortcodes.
Note: See TracChangeset
for help on using the changeset viewer.