开发者 | webkinder |
---|---|
更新时间 | 2017年12月12日 20:53 |
PHP版本: | 5.3 及以上 |
WordPress版本: | 4.9 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Is there a way to edit settings in my code?
Yes, there is a developer mode.
To enable it use add_filter('wksl_slidebars_dev_mode', '__return_true')
in your code. This will hide the plugins settings page. Then Slidebars will always use the default settings unless you modify them by using the filter wksl_slidebars_settings
:
`
<?php
// Specifies icon color and uses default for everything else
function my_filter_function( $settings ) {
$settings['icon_color'] = '#5d4a72';
return $settings;
}
add_filter( 'wksl_slidebars_settings', 'my_filter_function' );
`
For a full list of plugin options and their default values, consult the get_defaults()
method in the settings class.
Can I remove the icon completely?
Yes, if you are using version 0.5.0 or higher there should be an option on the setting page ("Settings->Slidebars").
Please remember that you need to add the button shortcode somewhere on your page or the user will be unable the open the Slidebar.
How can I add my own button to toggle the Slidebar?
Just use the shortcode [wksl_slidebar_button text="Some Text"]
.
Can I use a self-made/custom icon?
No, we do not officially support custom icons. We support FontAwesome and DashIcons, so you should have a big selection to choose from.
If you really need a custom icon you might be able to change it by using CSS rules in your theme.
Can I add some custom styles to my Slidebar components?
You can always change the style by using your own custom CSS rules in your theme.
The plugin itself does not allow custom CSS anymore.
Where is the custom CSS field?
If you used the plugin before version 1.0.0 you had the option to set custom CSS rules.
We decided remove custom CSS with version 1.0.0. Before updating to version 1.0.0 you should see a warning.
If you still need to add custom styles you should move them to your themes custom CSS.
1.0.1 [12 Dec 2017]
-webkit-
-Prefix.