function spammersdeletion() { global $wpdb; $from = strtotime(‘-30 day’, time()); $wpdb->query(‘DELETE FROM wp_users WHERE DATE(user_registered) < "'.date('Y-m-d', $from).'"AND user_status = "2"'); } add_action('init','spammersdeletion');Continue reading
add_action(‘wp_footer’, ‘fitboots_hide_other_shipping_methods_when_free’); function fitboots_hide_other_shipping_methods_when_free() { if (is_checkout()) { ?>Continue reading
add_action(‘save_post’, ‘check_and_add_categories_to_menu’, 20, 3); function check_and_add_categories_to_menu($post_id, $post, $update) { // Only run for posts and prevent autosaves if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id) || $post->post_type !== ‘post’) { return; } $locations = get_nav_menu_locations(); if (!isset($locations[‘primary’])) return; $menu_id = $locations[‘primary’]; $menu_items = wp_get_nav_menu_items($menu_id);…Continue reading
/** * For the Accordion Template, this is a helper script * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_action( ‘wp_head’, function () { ?>Continue reading