/* Plugin Name: Daily Cleanup with Report Description: Deletes all posts, categories, and tags daily and emails a summary. Version: 1.4 */ function delete_all_posts_categories_tags_with_report() { global $wpdb; // 🕒 Track last cleanup execution time update_option( ‘last_run_cleanup’, current_time( ‘mysql’ ) );…Continue reading
/* Plugin Name: Daily Cleanup with Report Description: Deletes all posts, categories, and tags daily and emails a summary. Version: 1.4 */ function delete_all_posts_categories_tags_with_report() { global $wpdb; // 🕒 Track last cleanup execution time update_option( ‘last_run_cleanup’, current_time( ‘mysql’ ) );…Continue reading
/* Plugin Name: Daily Cleanup with Report Description: Deletes all posts, categories, and tags daily and emails a summary. Version: 1.4 */ function delete_all_posts_categories_tags_with_report() { global $wpdb; // 🕒 Track last cleanup execution time update_option( ‘last_run_cleanup’, current_time( ‘mysql’ ) );…Continue reading
/* Plugin Name: Daily Cleanup with Report Description: Deletes all posts, categories, and tags daily and emails a summary. Version: 1.4 */ function delete_all_posts_categories_tags_with_report() { global $wpdb; // 🕒 Track last cleanup execution time update_option( ‘last_run_cleanup’, current_time( ‘mysql’ ) );…Continue reading
add_action( ‘admin_notices’, function() { if ( ! current_user_can( ‘manage_options’ ) ) return; $cleanup_time = get_option( ‘last_run_cleanup’, ‘Never’ ); $purge_time = get_option( ‘last_run_purge’, ‘Never’ ); echo ‘ ‘; echo ‘ 🧹 Cleanup Last Ran: ‘ . esc_html( $cleanup_time ) . ‘‘;…Continue reading
add_action( ‘init’, function() { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { $compat = \Automattic\WooCommerce\Utilities\FeaturesUtil::is_plugin_compatible( ‘custom_order_tables’, ‘ajax-search-for-woocommerce-premium/ajax-search-for-woocommerce.php’ ); add_action( ‘admin_notices’, function() use ( $compat ) { echo ‘ ‘; echo ‘📋 WooCommerce reconhece o FiboSearch como ‘ . ($compat ? ‘compatível…Continue reading
// Compatibilizar FiboSearch Pro com HPOS (WooCommerce) add_action( ‘before_woocommerce_init’, function() { if ( class_exists( AutomatticWooCommerceUtilitiesFeaturesUtil::class ) ) { AutomatticWooCommerceUtilitiesFeaturesUtil::declare_compatibility( ‘custom_order_tables’, ‘ajax-search-for-woocommerce-premium/ajax-search-for-woocommerce.php’, true ); } });Continue reading
// Est. Reading Time $reading_speed = 200; // 200 words per minute $content = get_post_field( ‘post_content’, get_the_id() ); $word_count = str_word_count( strip_tags( $content ) ); $reading_time = ceil( $word_count / $reading_speed ); function post_read_time_shortcode($atts) { echo ‘ Estimated reading time:…Continue reading
// Add an Edit Post Link to Archives edit_post_link( __( ‘{Edit}’ ) ); // Add page slug to body class for better styling. function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type…Continue reading