Gravity forms available to Editor role
/* make gravity forms available to Editor role */ function add_gf_cap() { $role = get_role( ‘editor’ ); $role->add_cap( ‘gform_full_access’ ); } add_action( ‘admin_init’, ‘add_gf_cap’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/* make gravity forms available to Editor role */ function add_gf_cap() { $role = get_role( ‘editor’ ); $role->add_cap( ‘gform_full_access’ ); } add_action( ‘admin_init’, ‘add_gf_cap’ );Continue reading
add_action( ‘admin_menu’, function () { $user = wp_get_current_user(); $disallowed_roles = array( ‘administrator’ ); if ( ! array_intersect( $disallowed_roles, $user->roles ) ) { // Stuff here for allowed roles remove_menu_page(‘wp_oopspam_settings_page’); // Below not needed since removed Category capability from Editors //…Continue reading
// Description: Displays the responsive width of the preview in the Elementor editor // Author: Carlos Béjinha // Author URI: https://binformatica.pt // ———————————— // Info Width In Elementor Editor function add_custom_script_to_elementor() { ?>Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter( ‘classic_editor_enabled_editors_for_post_type’, function ( $editors, $post_type ) { if ( $post_type == ‘mpcs-course’ || $post_type == ‘mpcs-lesson’ || $post_type = ‘mpcs-quiz’ ) { $editors[‘classic_editor’] = false; } return $editors; }, 10, 2 );Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading
add_action( ‘current_screen’, function () { $screen = get_current_screen(); // Add other custom post types here as needed. if ( in_array( $screen->id, array( ‘post’, ‘page’ ) ) ) { remove_theme_support( ‘block-templates’ ); } } );Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading