开发者 | jp2112 |
---|---|
更新时间 | 2014年8月16日 22:38 |
捐献地址: | 去捐款 |
PHP版本: | 3.5 及以上 |
WordPress版本: | 3.9 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
After installing, there are two new shortcodes:
[color-box color="gray"] This is an example of a Content Box. [/color-box]
Color is optional ("blue" is default), but it is recommended that you always specify the color you want instead of relying on the default, in case the default ever changes.
To create color buttons, specify the color, URL and content.
[color-button color="purple" href="http://www.mysite.com/"] Follow this link [/color-button]
Color is optional ("blue" is default), but it is recommended that you always specify the color you want instead of relying on the default, in case the default ever changes.
[color-box] This is an example of a Content Box. [/color-box] [color-button href="http://www.mysite.com/"] Follow this link [/color-button]
Shortcodes inside content are allowed, i.e.
[my_shortcode] Here is something I wrapped in [another_shortcode] shortcodes. [/my_shortcode]
Rounded corners and drop shadows for boxes and buttons are optional. For backward compatibility, rounded corners are turned on by default. To turn this off, add rounded="0"
as a parameter in the shortcode. i.e.
[color-box color="red" rounded="0"] This is an example of a Content Box without rounded corners. [/color-box]
You may also call the shortcode in your PHP code. Example:
echo do_shortcode('[color-button color="purple" href="http://www.google.com/"]Follow this link[/color-button]');
You can also call the box and button functions from your PHP code. Example:
if (function_exists('color_box_shortcode')) { color_box_shortcode(array('color' => 'purple', 'rounded' => 0, 'show' => 1), 'Here is my content'); }
if (function_exists('color_button_shortcode')) { color_button_shortcode(array('color' => 'purple', 'opennewwindow' => true, 'href' => 'http://www.jimmyscode.com/', 'show' => 1), 'Visit my website'); }
The plugin arguments and default values may change over time. To get the latest list of arguments and defaults, look at the settings page after installing the plugin. That is where the latest list will always be located. You will see what parameters you can specify and which ones are required.
The currently available colors are
scbb-button-bluegreen scbb-content-box-bluegreen
Clear your browser cache and also clear your cache plugin (if any). If you still don't see anything, check your webpage source for the following:
<!-- Standout Color Boxes and Buttons: plugin is disabled. Check Settings page. -->
This means the "enabled" checkbox on the settings page is unchecked. For color buttons, you must provide the URL and the hyperlink text. If the "enabled" checkbox is checked, but you do not provide a URL or hyperlink text for a button, you will see nothing.
Make sure you aren't using rounded=false
in your shortcode. If you are not, make sure your browser is up to date and check if it supports the border-radius
CSS attribute. You may have to view the page in another browser. You may also need to refresh your browser and clear your caching plugin. Also, check the plugin settings page to make sure the "rounded corner CSS" checkbox is checked.
The CSS files include a ?ver
query parameter. This parameter is incremented with every upgrade in order to bust caches. Make sure none of your plugins or functions are stripping query parameters. Also, if you are using a CDN, flush it or send an invalidation request for the plugin CSS files so that the edge servers request a new copy of it.
Are you using a plugin that minifies CSS? If so, try excluding the plugin CSS file from minification.
Add this to your functions.php:
remove_action('admin_head', 'insert_scbb_admin_css');
Add this to your functions.php:
add_action('wp_enqueue_scripts', 'remove_scbb_style'); function remove_scbb_style() { wp_deregister_style('scbb_style'); }
Add this to your functions.php:
remove_action('admin_enqueue_scripts', 'scbb_ed_buttons');
This plugin adds one or more toolbar buttons to the HTML editor. You will not see them on the Visual editor. The labels on the toolbar buttons are "SC Box" and "SC Button".
On the plugin settings page, go to the "Parameters" tab. There is a list of possible parameters there along with the default values. Make sure you are spelling the parameters correctly. The Parameters tab also contains sample shortcode and PHP code.