/* 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
function tmobile_coverage_map_shortcode() { // Get current post ID and required custom fields $post_id = get_the_ID(); $zip_code = get_post_meta($post_id, ‘zip_code’, true); $city = get_post_meta($post_id, ‘city’, true); $state = get_post_meta($post_id, ‘state’, true); // If required fields are missing if (empty($zip_code) || empty($city)…Continue reading
// Shortcode to display Zip Code Coverage Map with Optimized GeoJSON Loading function zip_code_coverage_map_shortcode() { ob_start(); ?>Continue reading
function render_att_darkstar_metrics_cards($atts) { // Fetch custom fields $custom_fields = get_post_meta(get_the_ID()); $city = isset($custom_fields[‘city’][0]) ? $custom_fields[‘city’][0] : ‘Unknown City’; $zip_code = isset($custom_fields[‘zip_code’][0]) ? $custom_fields[‘zip_code’][0] : ‘00000’; // Helper function to safely get field values if (!function_exists(‘get_field_value’)) { function get_field_value($fields, $key, $default…Continue reading
/** * Author: Sumaiya * Clickup Doc: https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-11295 * Calculate Reading time for the content * * @param string $content * @return int */ function calculate_reading_time( $content ) { $word_count = str_word_count( strip_tags( $content ) ); $reading_speed = 200; //…Continue reading
/** * Displays fallback value if the field value is empty. For the “view” mode only. * @param string $value * @param string $default * @param string $key * @param string $type * @param array $data * @return string */…Continue reading
/** * Load permutations jQuery */ function permutations_jquery_loader() { ?>Continue reading
/* 1.0 Ricrea elenco dei brand del plugin BRAND v1 * 2.0 RICHIAMA IMMAGINE DEL BRAND ELENCATO */ //if(is_user_logged_in() ){ // 1.0 Ricrea elenco dei brand del plugin BRAND // Serve per aggiungere il titolo del brand sotto immagine visibile…Continue reading
// Custom query for Elementor archive loop widget with ID ‘related_vendor_loop’ add_action( ‘elementor/query/related_vendor_loop’, ‘related_vendor_loop_query’ ); function related_vendor_loop_query( $query ) { // Log that the function has been triggered error_log( ‘related_vendor_loop_query function called’ ); // Ensure we have a valid WP_Query…Continue reading
// ACF custom variables $knowsabout = get_field( ‘author_knowsabout’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout2 = get_field( ‘author_knowsabout_2’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout3 = get_field( ‘author_knowsabout_3’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout4 = get_field( ‘author_knowsabout_4’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout5 = get_field( ‘author_knowsabout_5’,…Continue reading