Add Filters

YellowPencil provides some hooks and filters for developers that will include the plugin to their themes. You can add these one-line codes to your theme’s function.php file.

Disable The CSS Properties

you can disable CSS properties as you want, only replace CSS rule name in the following code and add to theme’s function.php file.

add_filter('yp_property__font-family', '__return_false');
add_filter('yp_property__transform', '__return_false');

If you want to allow users to make safe editing, disable width, height, position properties.

Disable And Enable The Tools And Features

Personalize the plugin with one-line codes to fit your needs!

yp_auto_load_popup

YellowPencil shows a popup for selecting the target page when you start editor from WordPress Dashboard > Appearance > YellowPencil Editor. Disable this automatic popup by using this code.

add_filter('yp_auto_load_popup', '__return_false');

yp_fixed_right_panel

The right panel is covering the page by default. You can fix the right panel to the right corner by using the following code.

add_filter('yp_fixed_right_panel', '__return_true');

yp_show_parent_tree

The plugin shows a small parent tree bar at the bottom of the screen, disable this feature by using this code.

add_filter('yp_show_parent_tree', '__return_false');

yp_hide_premium_options

The following code hides all premium properties in the free version. Use this code if you are planning to include the free version to your project.

add_filter('yp_hide_premium_options', '__return_true');

yp_show_margin_padding_on_hover

Shows margin and padding on the mouseover. Disable it by using the following code.

add_filter('yp_show_margin_padding_on_hover', '__return_false');

yp_smart_responsive_technology

This feature automatically detects the styles that can harm the responsive system and limits them with special screen size, disable it by using this code.

add_filter('yp_smart_responsive_technology', '__return_false');

yp_smart_important_tag

Adds the important tag to CSS rules if required, disable it by using this code.

add_filter('yp_smart_important_tag', '__return_false');

yp_high_performance

Enhances editor performance by use of a simple selector before selecting the element but as a result, there is no difference in CSS code. Active this feature by using the following code.

add_filter('yp_high_performance', '__return_true');

yp_append_auto_comments

Appends the new selectors to the editor with CSS comment description. Disable it by using the following code.

add_filter('yp_append_auto_comments', '__return_false');

yp_animation_tools

The following code disables animation manager and animation generator tools.

add_filter('yp_animation_tools', '__return_true');

yp_css_editor

This code disables live CSS editor. Users will not be able to access CSS editor.

add_filter('yp_css_editor', '__return_false');

yp_live_settings_menu

This code disables the live settings in the editor.

add_filter('yp_live_settings_menu', '__return_false');
Was this article helpful?
YesNo

Couldn't Find Your Answer?

Get quality customer support with our professional support team.

Create A Support Ticket
Live Editor