How to disable “Transform to” option in Gutenberg custom blocks
How to disable “Transform to” option in Gutenberg custom blocks
How to disable “Transform to” option in Gutenberg custom blocks
Gutenberg is there a way to know if the current block is reusable?
Using the component outside the editor. select(‘core’) is null
The comments_array filter as part of the comments_template() function, the purpose of which is to load a comment template. It filters comments being prepared to be rendered in the comment section of singular type pages. The preprocess_comment and comment_post actions (in that order) both fire as part of the wp_new_comment() function, the purpose of which … Read more
This should do it: // Going to add a conditional statement here to run this vc_remove_element function if the checkbox for Row is selected vc_remove_element( “vc_row” ); // Row add_action(‘admin_menu’, ‘plugin_admin_settings_tab’); function plugin_admin_settings_tab() { add_options_page(‘Remove Visual Composer Elements’, ‘Remove Visual Composer Elements’, ‘manage_options’, ‘remove_visual_composer_elements’, ‘plugin_rvce_options_page’); add_action(‘admin_init’, ‘plugin_rvce_admin_init’); } ?> <?php function plugin_rvce_options_page() { ?> <div> … Read more
Post type names cannot contain capital letters. So behind the scenes, your CPT is probably called projectscpt rather than ProjectsCPT – hence it not matching the value in your array.
The table name needs to be in quotes on the line where you’re checking if it exists. I tested it, and after that was fixed, the table was successfully created. Here is the full code: function mm_booking_activate() { global $wpdb; $mm_booking_table_name = $wpdb->prefix . “mm_booking”; $mm_booking_db_version = ‘1.0’; $charset_collate = $wpdb->get_charset_collate(); if ( $wpdb->get_var( “SHOW … Read more
The function get_post_class() is used to generate these classes. You can filter post_class to change the output. Example is_admin() && add_filter( ‘post_class’, function( $classes, $class, $post_id ) { $post = get_post( $post_id ); // Decide whether to add a class or not … $classes[] = ‘my-custom-class’; return $classes; }, 10, 3 );
If a third party plugin (the plugin you want to extend) uses the Settings API, you can add a new setting field if you now the options page and option group defined by the third party plugin. Just use the Settings APT too: First, with add_setting_field() you can add a new field to any settings … Read more
You can filter the_content and use preg_replace() to look for instances of <table></table> and then surround them with your <div>. add_action( ‘the_content’, ‘wpse_260756_the_content’, 10, 1 ); function wpse_260756_the_content( $content ) { $pattern = “/<table(.*?)>(.*?)<\/table>/i”; $replacement=”<div class=”table-responsive”><table$1>$2</table></div>”; return preg_replace( $pattern, $replacement, $content ); }