Allow all file types for upload
You can create a plugin or add this to the config file, but for 3.9.2 this worked for me. define(‘ALLOW_UNFILTERED_UPLOADS’, true);
You can create a plugin or add this to the config file, but for 3.9.2 this worked for me. define(‘ALLOW_UNFILTERED_UPLOADS’, true);
Don’t let the action die, just do a redirect (to wherever you’d like): function wpse_92155_before_delete_post() { wp_redirect(admin_url(‘edit.php’)); exit(); } // function wpse_92155_before_delete_post add_action(‘before_delete_post’, ‘wpse_92155_before_delete_post’, 1);
Some of what is usually admin side functionality is not included as part of the “main” wordpress bootstrap, files containing uploaded file manipulation functions are one of them and you need to explicitly include them by adding include_once( ABSPATH . ‘wp-admin/includes/image.php’ ); into your call_import function.
@Byran M. I tend to use two constructs I don’t often see other WordPress developers using often, which surprises me, but I like them a lot. 1.) Heredocs You can store large blocks of text as heredocs string that might look like this so I can store worrying about mixing single and double quotes: $html=<<<HTML … Read more
So as noted in the comments above, I found a solution and used this code to do it: function remove_yoast_metabox_reservations(){ remove_meta_box(‘wpseo_meta’, ‘reservation’, ‘normal’); } add_action( ‘add_meta_boxes’, ‘remove_yoast_metabox_reservations’,11 ); In this instance, “reservation” was my custom post type. And “wpseo_meta” was the ID of the metabox. So the same code can be used on any meta … Read more
Somewhere in your theme or plugins is a line like this: add_filter( ‘something’, ‘regis_options’ ); Could also be add_action(). Find that piece of code and remove or fix it. The other errors are a result of the first one. The printed error message causes output and hence HTTP headers, so PHP/WP cannot send other headers … Read more
Have you made sure to copy the mini-cart.php into yourtheme/woocommerce/cart/ not just yourtheme/woocommerce I can say for certain this works in Woocommerce version 2.0.12 Also if your saying that editing the core file isn’t working is it possible that its getting override some where else in your theme. Could be worth searching your theme directory … Read more
Try to check class_exists: <?php if( class_exists(‘acf’) ) { echo “hi”; } ?>
is_plugin_active() expects just the base name of the plugin as parameter: So use: is_plugin_active( ‘woocommerce/woocommerce.php’ ); The function will use the option ‘active_plugins’ which is a list of plugins paths relative to the plugin directory already. On a multi-site installation it will search in get_site_option( ‘active_sitewide_plugins’) too. As an implementation note: Avoid these checks. Some … Read more
Maybe what you’re looking for is : WP_PLUGIN_DIR // full path, no trailing slash WP_PLUGIN_URL // full url, no trailing slash See documentation