One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
<?php | |
/** | |
* Restore CSV upload functionality for WordPress 4.9.9 and up | |
*/ | |
add_filter('wp_check_filetype_and_ext', function($values, $file, $filename, $mimes) { | |
if ( extension_loaded( 'fileinfo' ) ) { | |
// with the php-extension, a CSV file is issues type text/plain so we fix that back to | |
// text/csv by trusting the file extension. | |
$finfo = finfo_open( FILEINFO_MIME_TYPE ); | |
$real_mime = finfo_file( $finfo, $file ); |
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter( 'RCL/Available', 'btc_rcl_elementor_my_templates', 10, 3 ); | |
/** | |
* Disable "Builder Template Category" taxonomy for Elementor My Templates for | |
* the "WP Real Categories Management" plugin (Premium, by Matthias Günter). | |
* | |
* @author David Decker - DECKERWEB |
<?php | |
/** | |
* Disable Gutenberg by Default | |
* but let others easily override that by changing hook priority to 5 | |
* https://justnorris.com/how-to-dynamically-enable-gutenberg/ | |
*/ | |
add_filter( 'gutenberg_can_edit_post', '__return_false', 5 ); | |
add_filter( 'use_block_editor_for_post', '__return_false', 5 ); |
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter( 'register_taxonomy_args', 'ddw_btc_make_tax_public', 10, 2 ); | |
/** | |
* Make the "Builder Template Category" taxonomy public. | |
* For plugin: "Builder Template Taxonomies". | |
* | |
* @author David Decker - DECKERWEB |
<?php | |
/** Do NOT include the opening php tag */ | |
/** | |
* Plugin: Toolbar Extras - Completely remove Admin notices. | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/9113a2d6016fb018b3afba0715a635bb | |
*/ | |
if ( ! function_exists( 'tbex_remove_admin_notices' ) ) : |
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter( 'btc/filter/integrations/all', 'btc_register_integration_wordpress_pages' ); | |
/** | |
* Plugin: Builder Template Categories - Register custom integration. | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/dd00884e81783e7d21046ae0a72ed683 |
<?php | |
/** Do NOT include the opening php tag */ | |
add_action( 'admin_menu', 'ddw_map_elementor_document_type_page_submenu' ); | |
/** | |
* Map the Elementor Template document type "Page" as a submenu under WordPress | |
* regular "Pages". | |
* | |
* @author David Decker - DECKERWEB |
<?php | |
/** | |
* gets the current post type in the WordPress Admin | |
*/ | |
function get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
//we have a post so we can just get the post type from that | |
if ( $post && $post->post_type ) { | |
return $post->post_type; |
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter( 'btc/filter/integrations/all', 'btc_tweak_integration_args', 20, 1 ); | |
/** | |
* Plugin: Builder Template Categories - Tweak arguments of integrations, for | |
* example labels. | |
* | |
* Note: The priority of the filter needs to be higher than 10, otherwise it |