add_action( ‘elementor/query/trucks_category_query’, function( $query ) { $term_ids = get_terms([ ‘taxonomy’ => ‘category’, ‘slug’ => [‘trucks’, ‘trucks-patreonmods’, ‘trucks-servermods’, ‘trucks-exclusivemods’], ‘fields’ => ‘ids’, ‘hide_empty’ => true, ]); if ( !empty($term_ids) && !is_wp_error( $term_ids ) ) { $query->set( ‘category__in’, $term_ids ); } });Continue reading
add_action( ‘elementor/query/tractors_mods_query’, function( $query ) { $term_ids = get_terms([ ‘taxonomy’ => ‘category’, ‘slug’ => [‘tractors’, ‘tractors-patreonmods’, ‘tractors-servermods’, ‘tractors-exclusivemods’], ‘fields’ => ‘ids’, ‘hide_empty’ => true, ]); if ( !empty($term_ids) && !is_wp_error( $term_ids ) ) { $query->set( ‘category__in’, $term_ids ); } });Continue reading
function update_download_links() { global $wpdb; $table_name = $wpdb->prefix . ‘postmeta’; // Correct table name as per WordPress structure // SQL query to select the posts with specific meta key and a flexible URL pattern $results = $wpdb->get_results(“SELECT post_id, meta_value FROM…Continue reading
function update_download_links() { global $wpdb; $table_name = $wpdb->prefix . ‘postmeta’; // Correcting table name based on typical WordPress structure // SQL query to select the posts with specific meta key and URL format $results = $wpdb->get_results(“SELECT post_id, meta_value FROM {$table_name}…Continue reading
add_action( ‘plugins_loaded’, function(){ remove_filter(‘attachment_fields_to_edit’, array(‘Fusion_Images’, ‘add_image_meta_fields’), 10); remove_filter(‘attachment_fields_to_edit’, array(‘Avada_Images’, ‘add_image_meta_fields’), 10); }, 99); function remove_masonry($fields) { unset($fields[‘fusion_masonry_element_layout’]); return $fields; } add_filter(‘attachment_fields_to_edit’, ‘remove_caption’, 99);Continue reading
add_action(‘init’, function(){ add_theme_support(‘post-thumbnails’); add_image_size( ‘envira-gallery-thumbnail’, 75, 50, true ); }); add_filter(‘image_size_names_choose’, function($size_names){ $new_sizes = [ ‘envira-gallery-thumbnail’ => ‘Envira Gallery Thumbnail’ ]; return array_merge($size_names, $new_sizes); });Continue reading
/** * Disable all embeds in WordPress. */ add_action( ‘init’, function () { // Remove the REST API endpoint. remove_action( ‘rest_api_init’, ‘wp_oembed_register_route’ ); // Turn off oEmbed auto discovery. add_filter( ’embed_oembed_discover’, ‘__return_false’ ); // Don’t filter oEmbed results. remove_filter( ‘oembed_dataparse’,…Continue reading
add_filter( ‘woocommerce_shop_manager_editable_roles’, function( $roles ) { return array_merge( $roles, array( ‘customer_company’ ) ); } );Continue reading