开发者 | jp2112 |
---|---|
更新时间 | 2015年1月20日 20:36 |
捐献地址: | 去捐款 |
PHP版本: | 4.0 及以上 |
WordPress版本: | 4.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Use a shortcode to call the plugin from any page or post like this:
[standout-css3-button cssclass="button-dribbble" href="http://www.google.com/"] Click here [/standout-css3-button]
This will output the following:
<a class="scss3b-button-dribbble" href="http://www.google.com/" rel="nofollow">Click here</a>
CSS styling from the included .css file will be applied to this link. You may also include shortcodes within the shortcode.
The shortcode can also be used in your PHP code (functions.php, or a plugin) using the do_shortcode function, ex:
echo do_shortcode('[standout-css3-button cssclass="scss3b-button-dribbble" href="http://www.google.com/"]Click here[/standout-css3-button]');
You can also call the plugin's function in your PHP code like this:
add_action('the_content', 'show_css3_button'); function show_css3_button($content) { if (is_page('home')) { // we are on a page with slug 'home' if (function_exists('scss3button')) { // plugin is installed/active $content .= scss3button(array('cssclass' => 'scss3b-button-rss', 'href' => 'http://www.google.com/'), 'Click here'); } } return $content; }
This will add a button (with scss3b-button-rss
color style) at the end of your content, if you are on a page with a slug named "home". Always wrap plugin function calls with a function_exists
check so that your site doesn't go down if the plugin isn't active.
In short, 'standout-css3-button' is the shortcode and 'scss3button' is the PHP function name.
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 following styles are available.
scss3b-button-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 CSS3 Buttons: plugin is disabled. Check Settings page. -->
This means you didn't pass a necessary setting to the plugin. For example, you must specify the URL either in the shortcode or on the plugin settings page. You should also check that the "enabled" checkbox on the plugin settings page is checked.
Make sure you aren't using rounded="0"
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.
Are you using a plugin that minifies or combines CSS files at runtime? If so, try excluding the plugin CSS file from minification.
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 this query parameter. 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.
Add this to your functions.php:
remove_action('admin_enqueue_scripts', 'scss3b_ed_buttons');
Add this to your functions.php:
remove_action('admin_head', 'insert_scss3b_admin_css');
Add this to your functions.php:
add_action('wp_enqueue_scripts', 'remove_scss3b_style'); function remove_scss3b_style() { wp_deregister_style('standout_css3_button_style'); }
This plugin adds one or more toolbar buttons to the HTML editor. You will not see them on the Visual editor. The label on the toolbar button is "CSS3 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.