lucaO
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
WP Bakery not loading anymore
Started by: lucaO
in: Toolset Professional Support
Problem: I am no longer able to use WP Bakery with Toolset. Solution: Update to the latest version of Views to receive the fix for this bug. |
2 | 8 | 6 years, 6 months ago | ||
Manage Toolset Button toolbar above editor
Started by: lucaO
in: Toolset Professional Support
Problem: I would like to hide several Toolset buttons above the WYSIWYG editor panel in a CRED form, but I would like to continue to display the "Add Media" button. Solution: function remove_toolset_buttons(){ // $post not available with init hook $postID = url_to_postid( $_SERVER['REQUEST_URI'] , '_wpg_def_keyword', true ); $target_pages = array( 123, 456, 789 ); // Comma-separated list of IDs of posts/pages where CRED forms are displayed if ( in_array( $postID, $target_pages ) ) { // remove the Fields and Views button add_filter( 'toolset_editor_add_form_buttons', function(){ return current_user_can('administrator'); } ); // remove the CRED button add_filter( 'toolset_cred_button_before_print', function(){ return current_user_can('administrator'); } ); // remove the Access button for certain roles add_filter( 'toolset_editor_add_access_button', function(){ $roles = array( 'editor', 'contributor', 'author', 'subscriber' ); return $roles; } ); } } add_action( 'init', 'remove_toolset_buttons' ); |
3 | 7 | 6 years, 8 months ago |