Plugin Directory

Changeset 1230794


Ignore:
Timestamp:
08/25/2015 10:12:21 PM (11 years ago)
Author:
White Bracket
Message:

updated the settings to automatically include 'px' in the output as it is implied it is added in the admin section. The plugin now accepts the font size being given as just a number e.g. 24 or a number with pixels e.g. 24px

Location:
white-bracket-theme-options
Files:
12 added
3 edited

Legend:

Unmodified
Added
Removed
  • white-bracket-theme-options/trunk/readme.txt

    r1228137 r1230794  
    4545== Changelog ==
    4646
     47= 1.3.1 =
     48* Automatically add 'px' to generated css, if it hasn't been specified
     49
    4750= 1.3.0 =
    4851* Added in the ability for paragraph tags to be removed from the shortcode output.
  • white-bracket-theme-options/trunk/white-bracket-functions.php

    r1228137 r1230794  
    3636    $li_settings = get_option('white_bracket_setting_li');
    3737
    38     $output = '<!-- ADDED BY WHITE BRACKET THEME OPTIONS -->';
    39     $output .= '<style type="text/css">';
     38    $output = '<!-- ADDED BY WHITE BRACKET THEME OPTIONS START -->'.PHP_EOL;
     39    $output .= '<style type="text/css">'.PHP_EOL;
    4040        if($h1_settings):
    4141            $output .= add_white_bracket_css( 'h1', $h1_settings );
     
    6565            $output .= add_white_bracket_css( 'li', $li_settings );
    6666        endif;
    67     $output .= '</style>';
    68     $output .= '<!-- ADDED BY WHITE BRACKET THEME OPTIONS -->';
     67    $output .= '</style>'.PHP_EOL;
     68    $output .= '<!-- ADDED BY WHITE BRACKET THEME OPTIONS END -->'.PHP_EOL;
    6969
    7070    if( $output != '<!-- ADDED BY WHITE BRACKET THEME OPTIONS --><style type="text/css"></style><!-- ADDED BY WHITE BRACKET THEME OPTIONS -->' ):
     
    7979    $value = unserialize($setting);
    8080    if( $value["font-size"] || $value["colour"] ):
    81         $output = $tag.'{font-size:'.$value["font-size"].'; color:'.$value["colour"].';}';
     81        $font_size = $value["font-size"];
     82        if( stripos($font_size, 'px') > 0 ):
     83            $output = $tag.'{font-size:'.$value["font-size"].' !important; color:'.$value["colour"].' !important;}'.PHP_EOL;
     84        else:
     85            $output = $tag.'{font-size:'.$value["font-size"].'px !important; color:'.$value["colour"].' !important;}'.PHP_EOL;
     86        endif;
    8287    else:
    8388        $output = '';
  • white-bracket-theme-options/trunk/white-bracket-theme-options.php

    r1228137 r1230794  
    44 * Plugin Name: White Bracket Theme Options
    55 * Plugin URI:
    6  * Description: Lets you create global content/global options. Perfect for creating content you want to appear in multiple places around the site, and edit it in one place.
    7  * Version: 1.3.0
     6 * Description: Lets you create global content/global options. Perfect for creating content to appear in multiple places around the site, and edit it in one place.
     7 * Version: 1.3.1
    88 * Author: White Bracket
    99 * Author URI: http://www.white-bracket.co.uk
Note: See TracChangeset for help on using the changeset viewer.