Changeset 1333393
- Timestamp:
- 01/22/2016 03:57:58 AM (10 years ago)
- Location:
- bcorp-shortcodes/trunk
- Files:
-
- 4 edited
-
bcorp_shortcodes.php (modified) (3 diffs)
-
bcorp_shortcodes_data.php (modified) (5 diffs)
-
css/bcsc.css (modified) (5 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bcorp-shortcodes/trunk/bcorp_shortcodes.php
r1322164 r1333393 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 46 Version: 0.17 7 7 Author: Tim Brattberg 8 8 Author URI: http://bcorp.com … … 372 372 } 373 373 374 function bcorp_icon_box_shortcode($atts,$content=null,$tag ) { 375 /* [bcorp_icon_box] 376 * title 377 * size (h1,h2,h3,h4,h5,h6) 378 * headingcolor (heading,font,altfont,link,custom) 379 * ->custom 380 * headingcustomcolor 381 * textcolor (heading,font,altfont,link,custom) 382 * ->custom 383 * textcustomcolor 384 * showicon (true,false) 385 * ->true 386 * icon 387 * align (left, center) 388 * textblock 389 * background (none,alt,custom) 390 * ->custom 391 * backgroundcolor 392 */ 393 $data=$GLOBALS['bcorp_shortcodes_data']->bcorp_sanitize_data($tag,$atts); 394 if ($data['background']=='alt') $alt = ' bcorp-alt-background'; else $alt=''; 395 if ($data['background']=='custom') $bgcolor = ' background-color:'.$data['backgroundcolor'].';'; else $bgcolor =''; 396 if ($data['padding'] !='') $padding = ' padding:'.$data['padding'].';'; else $padding =''; 397 if ($data['showicon'] == 'true' && $data['icon']) { 398 if ($data['iconcolor']) $iconcolor = ' style="color:'.$data['iconcolor'].';"'; else $iconcolor = ''; 399 $icon = '<span class="bcorp-icon-box-icon" aria-hidden="true" data-icon="&#x'.$data['icon'].';"'.$iconcolor.'></span>'; 400 } else $icon = ''; 401 if ($data['align']=='center') $align = ' style="text-align:center;"'; else $align =''; 402 $headingcustomcolor = ''; 403 if ($data['headingcolor'] == 'custom') { 404 $headingcolor = ''; 405 if ($data['headingcustomcolor']) $headingcustomcolor = ' style="color:'.$data['headingcustomcolor'].';"'; 406 } elseif ($data['headingcolor'] == 'altfont') $headingcolor = ' bcorp-color-font-alt'; 407 elseif ($data['headingcolor'] == 'font') $headingcolor = ' bcorp-color-font'; 408 elseif ($data['headingcolor'] == 'link') $headingcolor = ' bcorp-color-link'; 409 else $headingcolor =' bcorp-color-heading'; 410 411 $textcustomcolor = ''; 412 if ($data['textcolor'] == 'custom') { 413 $textcolor = ''; 414 if ($data['textcustomcolor']) $textcustomcolor = ' style="color:'.$data['textcustomcolor'].';"'; 415 } elseif ($data['textcolor'] == 'altfont') $textcolor = ' bcorp-color-font-alt'; 416 elseif ($data['textcolor'] == 'font') $textcolor = ' bcorp-color-font'; 417 elseif ($data['textcolor'] == 'link') $textcolor = ' bcorp-color-link'; 418 else $textcolor =' bcorp-color-heading'; 419 420 return '<div class="bcorp-icon-box'.$alt.'" style="'.$bgcolor.$padding.'"> 421 <div class="bcorp-icon-box-title'.$headingcolor.'"'.$headingcustomcolor.'><'.$data['size'].' class="bcorp-heading bcorp-heading"'.$align.'>'.$icon.$data['title'].'</'.$data['size'].'></div> 422 <div class="bcorp-icon-box-content'.$textcolor.'"'.$textcustomcolor.'>'.do_shortcode($content).'</div> 423 </div>'; 424 } 425 374 426 function bcorp_image_shortcode($atts,$content=null,$tag ) { 375 427 /* [bcorp_image] … … 567 619 static $bcorp_id; 568 620 $bcorp_id++; 569 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>';621 return '<div class="bcorp-tab-panel bcorp-alt-background" id="bcorp-tab-'.$bcorp_id.'"><div class="bcorp-tab-panel-inner">'.do_shortcode($content).'</div></div>'; 570 622 } 571 623 -
bcorp-shortcodes/trunk/bcorp_shortcodes_data.php
r1322164 r1333393 152 152 'type'=>'dropdown', 153 153 'default'=>'center', 154 'admin_class'=>true, 154 155 'values'=>array( 155 156 'left'=>'Left', … … 662 663 "admin_icon"=>"", 663 664 "closing_tag"=>false, 664 "admin_default"=>'<button class="bcve-bcorp_button bcorp-button-medium"><span class="bcve-bcorp_button-icon" data-icon=""></span><span class="bcve-bcorp_button-label">Button - Edit Me</span></button>', 665 "admin_default"=>'<div class="bcve-bcorp_button bcorp-button-medium"> 666 <button> 667 <span class="bcve-bcorp_button-icon" data-icon=""></span> 668 <span class="bcve-bcorp_button-label">Button - Edit Me</span> 669 </button> 670 </div>', 665 671 "variables"=>array( 666 672 'label'=>array( … … 1026 1032 1027 1033 $this->bcorp_add_shortcode( 1034 "bcorp_icon_box",array( 1035 "title"=>"Icon Box", 1036 "admin_icon"=>"", 1037 "admin_default"=>'<div class="bcve-bcorp_icon_box"> 1038 <span class="bcve-bcorp_icon_box-icon bcve-bcorp_heading-size-h3" aria-hidden="true" data-icon=""></span> 1039 <span class="bcve-bcorp_icon_box-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Icon Box - Edit Me</span> 1040 <div class="bcve-bcorp_icon_box-textblock"><p>Content - Edit Me</p></div> 1041 </div>', 1042 "variables"=>array( 1043 'title'=>array( 1044 'name'=>'Title', 1045 'type'=>'textfield', 1046 'default' =>''), 1047 'size'=>array( 1048 'name'=>'Size', 1049 'type'=>'dropdown', 1050 'default'=>'h1', 1051 'values'=>array( 1052 'h1'=>'Heading 1', 1053 'h2'=>'Heading 2', 1054 'h3'=>'Heading 3', 1055 'h4'=>'Heading 4', 1056 'h5'=>'Heading 5', 1057 'h6'=>'Heading 6')), 1058 'headingcolor'=>array( 1059 'name'=>'Heading Color', 1060 'admin_tab'=>'Colors', 1061 'type'=>'dropdown', 1062 'default'=>'heading', 1063 'dependents'=>array( 1064 'custom'=>array('headingcustomcolor')), 1065 'values'=>array( 1066 'heading'=>'Heading Color', 1067 'font'=>'Main Font Color', 1068 'altfont'=>'Alternate Font Color', 1069 'link'=>'Link Color', 1070 'custom'=>'Custom Color')), 1071 'headingcustomcolor'=>array( 1072 'name'=>'Heading Custom Color', 1073 'type'=>'color', 1074 'default'=>''), 1075 'textcolor'=>array( 1076 'name'=>'Text Color', 1077 'admin_tab'=>'Colors', 1078 'type'=>'dropdown', 1079 'default'=>'heading', 1080 'dependents'=>array( 1081 'custom'=>array('textcustomcolor')), 1082 'values'=>array( 1083 'heading'=>'Heading Color', 1084 'font'=>'Main Font Color', 1085 'altfont'=>'Alternate Font Color', 1086 'link'=>'Link Color', 1087 'custom'=>'Custom Color')), 1088 'textcustomcolor'=>array( 1089 'name'=>'Text Custom Color', 1090 'type'=>'color', 1091 'default'=>''), 1092 'showicon'=>'showicon', 1093 'align'=>array( 1094 'name'=>'Alignment', 1095 'type'=>'dropdown', 1096 'default'=>'left', 1097 'values'=>array( 1098 'left'=>'Left Aligned', 1099 'center'=>'Centered')), 1100 'textblock'=>array( 1101 'name'=>'Text Block', 1102 'type'=>'textarea', 1103 'editor'=>'tinymce', 1104 'default' =>'' 1105 ), 1106 'background'=>array( 1107 'name'=>'Type', 1108 'admin_tab'=>'Box', 1109 'type'=>'dropdown', 1110 'default'=>'success', 1111 'dependents'=>array( 1112 'custom'=>array('backgroundcolor')), 1113 'values'=>array( 1114 'none'=>'None', 1115 'alt'=>'Alternate Background Color', 1116 'custom'=>'Custom Background Color')), 1117 'backgroundcolor'=>array( 1118 'name'=>'Background Color', 1119 'type'=>'color', 1120 'default'=>''), 1121 'padding'=>array( 1122 'name'=>'Padding', 1123 'admin_tab'=>'Box', 1124 'units'=>array('px','em','%'), 1125 'description'=>'Enter a margin size in px, em or %. Defaults to px if no unit is entered.', 1126 'type'=>'textfield', 1127 'default'=>''), 1128 1129 1130 ) 1131 ) 1132 ); 1133 1134 $this->bcorp_add_shortcode( 1028 1135 "bcorp_image",array( 1029 1136 "title"=>"Image", … … 1067 1174 "child_element"=>"bcorp_tab_panel", 1068 1175 "width" => "1-1", 1069 "admin_default"=>'<div class="bcve-bcorp_tabs"><i class="bcve-icon bcve-header-icon"></i> 1070 <div class="bcve-bcorp_tabs-details">Position: <span class="bcve-bcorp_tabs-position">top</span></div></div>', 1176 "admin_default"=>'<div class="bcve-bcorp_tabs"> 1177 <i class="bcve-icon bcve-header-icon"></i> 1178 <div class="bcve-bcorp_tabs-details">Position: <span class="bcve-bcorp_tabs-position">top</span></div> 1179 </div>', 1071 1180 "variables"=>array( 1072 1181 'position'=>array( … … 1099 1208 "width"=>"1-3-min", 1100 1209 "parent_element"=>"bcorp_tabs", 1101 "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>', 1210 "admin_default"=>'<div class="bcve-bcorp_tab_panel"> 1211 <span class="bcve-bcorp_tab_panel-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Tab - Edit Me</span> 1212 <div class="bcve-bcorp_tab_panel-textblock"><p>Tab Content - Edit Me</p></div> 1213 </div>', 1102 1214 "variables"=>array( 1103 1215 'title'=>array( -
bcorp-shortcodes/trunk/css/bcsc.css
r1322164 r1333393 1 html,body { height:100% !important; } 2 1 3 @font-face { 2 4 font-family: 'FontAwesome'; … … 35 37 .bcorp-gutter { margin-left:2% } 36 38 37 38 39 39 @media screen and (min-width: 568px) and (max-width: 767px) { 40 40 .bcorp-mobile-1-6 { width:15%; } … … 51 51 .bcorp-mobile-1-1 { width:100%; } 52 52 } 53 54 53 55 54 .bcorp-1-8-no-gutter { width:12.75%;} … … 179 178 .bcorp-icon a {box-shadow: none; } 180 179 180 /* [bcorp_icon_box] */ 181 .bcorp-icon-box-icon { margin-right:8px; } 182 .bcorp-icon-box-title h1, .bcorp-icon-box-title h2, .bcorp-icon-box-title h3, .bcorp-icon-box-title h4, .bcorp-icon-box-title h5, .bcorp-icon-box-title h6 {margin-bottom:16px; } 181 183 /* [bcorp_image] */ 182 184 .bcorp-image { font-size:0; } … … 189 191 .bcorp-section .site-content { position:relative; } 190 192 .bcorp-section {position:relative; overflow:hidden; } 193 .bcorp-section .site-content { position:relative; } 194 .bcorp-background-video { 195 z-index:-1; 196 position:absolute; 197 } 198 .bcorp-cell { z-index:0; } 199 .bcorp-background-image { 200 z-index: -1; 201 font-size:0; 202 position: absolute; 203 } 204 .bcorp-background-image img { max-width:none; } 191 205 192 206 /* [bcorp_tabs] */ -
bcorp-shortcodes/trunk/readme.txt
r1322164 r1333393 4 4 Tags: shortcode, shortcodes, plugin, image, images, icons, widget, page, editor, button 5 5 Requires at least: 4.2.0 6 Tested up to: 4.4 7 Stable tag: 0.1 46 Tested up to: 4.4.1 7 Stable tag: 0.17 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 10 11 Powerful shortcode collection configured in a simple popup window or for use with the BCorp Visual Editor.11 Powerful shortcode collection configured in a simple popup window or for use with the drag and drop BCorp Visual Editor. 12 12 13 13 == Description == … … 24 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"] 25 25 26 **1 1x Shortcode Elements**26 **12 x Shortcode Elements** 27 27 28 28 * [bcorp_alert] … … 30 30 * [bcorp_button] 31 31 * [bcorp_heading] 32 * [bcorp_icon_box] 32 33 * [bcorp_image] 33 34 * [bcorp_divider] … … 71 72 == Changelog == 72 73 74 = 0.17 = 75 Added [icon_box] shortcode. 76 77 = 0.16 = 78 Author got married 16th January 2016. 79 73 80 = 0.14 = 74 81 Added [bcorp_section] shortcode for themes that directly support it. … … 91 98 == Upgrade Notice == 92 99 100 = 0.17 = 101 Added [icon_box] shortcode. 102 103 = 0.16 = 104 Author got married 16th January 2016. 105 93 106 = 0.14 = 94 107 Added [bcorp_section] shortcode for themes that directly support it.
Note: See TracChangeset
for help on using the changeset viewer.