Plugin Directory

Changeset 1333512


Ignore:
Timestamp:
01/22/2016 08:16:57 AM (10 years ago)
Author:
BCorp
Message:

Updates to [icon_box] shortcode.

Location:
bcorp-shortcodes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bcorp-shortcodes/trunk/bcorp_shortcodes.php

    r1333393 r1333512  
    44Plugin URI: http://shortcodes.bcorp.com
    55Description: Advanced word press shortcodes for use with any wordpress theme.
    6 Version: 0.17
     6Version: 0.18
    77Author: Tim Brattberg
    88Author URI: http://bcorp.com
     
    375375    /* [bcorp_icon_box]
    376376     * title
    377      * size (h1,h2,h3,h4,h5,h6)
     377     * heading^
    378378     * headingcolor (heading,font,altfont,link,custom)
    379379     * ->custom
     
    392392     */
    393393   $data=$GLOBALS['bcorp_shortcodes_data']->bcorp_sanitize_data($tag,$atts);
     394   if ($data['heading'] == 'default') $data['heading'] = 'h1';
     395   if ($data['heading'] == 'custom') {$data['heading']='h1'; $customfontsize=' font-size:'.$data['headingsize'].';'; } else {
     396     $customfontsize='';
     397   }
    394398   if ($data['background']=='alt') $alt = ' bcorp-alt-background'; else $alt='';
    395399   if ($data['background']=='custom') $bgcolor = ' background-color:'.$data['backgroundcolor'].';'; else $bgcolor ='';
     
    419423
    420424   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>
     425              <div class="bcorp-icon-box-title'.$headingcolor.'"'.$headingcustomcolor.'><'.$data['heading'].' class="bcorp-heading bcorp-heading"'.$align.' style="'.$customfontsize.'">'.$icon.$data['title'].'</'.$data['heading'].'></div>
    422426              <div class="bcorp-icon-box-content'.$textcolor.'"'.$textcustomcolor.'>'.do_shortcode($content).'</div>
    423427           </div>';
  • bcorp-shortcodes/trunk/bcorp_shortcodes_data.php

    r1333393 r1333512  
    10351035        "title"=>"Icon Box",
    10361036        "admin_icon"=>"&#xe809;",
    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="&#59401;"></span>
    1039                             <span class="bcve-bcorp_icon_box-title bcve-bcorp_heading-text bcve-bcorp_heading-size-h3">Icon Box - Edit Me</span>
     1037        "admin_default"=>'<div class="bcve-bcorp_icon_box bcve-bcorp_heading-heading-h1">
     1038                            <span class="bcve-bcorp_icon_box-icon" aria-hidden="true" data-icon="&#59401;"></span>
     1039                            <span class="bcve-bcorp_icon_box-title bcve-bcorp_heading-text">Icon Box - Edit Me</span>
    10401040                            <div class="bcve-bcorp_icon_box-textblock"><p>Content - Edit Me</p></div>
    10411041                          </div>',
     
    10451045            'type'=>'textfield',
    10461046            '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')),
     1047          'heading'=>'heading',
     1048          'headingcolor'=>array(
     1049            'name'=>'Heading Color',
     1050            'admin_tab'=>'Colors',
     1051            'type'=>'dropdown',
     1052            'default'=>'heading',
     1053            'dependents'=>array(
     1054                'custom'=>array('headingcustomcolor')),
     1055            'values'=>array(
     1056                'heading'=>'Heading Color',
     1057                'font'=>'Main Font Color',
     1058                'altfont'=>'Alternate Font Color',
     1059                'link'=>'Link Color',
     1060                'custom'=>'Custom Color')),
    10711061            'headingcustomcolor'=>array(
    10721062              'name'=>'Heading Custom Color',
  • bcorp-shortcodes/trunk/readme.txt

    r1333393 r1333512  
    55Requires at least: 4.2.0
    66Tested up to: 4.4.1
    7 Stable tag: 0.17
     7Stable tag: 0.18
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    7272== Changelog ==
    7373
     74= 0.18 =
     75Updates to [icon_box] shortcode.
     76
    7477= 0.17 =
    7578Added [icon_box] shortcode.
     
    98101== Upgrade Notice ==
    99102
     103= 0.18 =
     104Updates to [icon_box] shortcode.
     105
    100106= 0.17 =
    101107Added [icon_box] shortcode.
Note: See TracChangeset for help on using the changeset viewer.