Action Scheduler Cleardown | Display Eventbrite Events
add_filter(‘action_scheduler_retention_period’, function() { return 2 * DAY_IN_SECONDS; // two days });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘action_scheduler_retention_period’, function() { return 2 * DAY_IN_SECONDS; // two days });Continue reading
add_filter( ‘wcv_dashboard_quick_links’, ‘change_add_product_link’ ); /** * Change the add product link * * @param array $links The links. */ function change_add_product_link( $links ) { if ( isset( $links[‘product’] ) ) { $links[‘product’][‘url’] = ‘https://example.com/add-product/’; $links[‘product’][‘label’] = __( ‘Add Product’, ‘wc-vendors’…Continue reading
function my_plugin_kses( $html ) { $kses_defaults = wp_kses_allowed_html( ‘post’ ); $svg_args = array( ‘svg’ => array( ‘class’ => true, ‘aria-hidden’ => true, ‘aria-labelledby’ => true, ‘role’ => true, ‘xmlns’ => true, ‘fill’ => true, ‘width’ => true, ‘height’ => true,…Continue reading
/** * Enable unfiltered_html capability for role. * * @param array $caps The user’s capabilities. * @param string $cap Capability name. * @param int $user_id The user ID. * @return array $caps The user’s capabilities, with ‘unfiltered_html’ potentially added. */…Continue reading
/** * Set the valid range for the list view. */ add_filter( ‘wfea_cal_list_options’ , function( $options ) { $options[‘fullcalendar’][‘validRange’] = array( ‘start’ => date( ‘Y-m-d’, strtotime( ‘-5 months’ ) ), // 5 months ago ‘end’ => date( ‘Y-m-d’, strtotime( ‘+5…Continue reading
/** * Set the valid range for the calendar view. */ add_filter( ‘wfea_cal_options’ , function( $options ) { $options[‘fullcalendar’][‘validRange’] = array( ‘start’ => date( ‘Y-m-d’, strtotime( ‘-5 months’ ) ), // 5 months ago ‘end’ => date( ‘Y-m-d’, strtotime( ‘+5…Continue reading
// disable generated image sizes //function tps_disable_image_sizes($sizes) { // unset($sizes[‘thumbnail’]); // disable thumbnail size // unset($sizes[‘medium’]); // disable medium size // unset($sizes[‘large’]); // disable large size //unset($sizes[‘medium_large’]); // disable medium-large size //unset($sizes[‘1536×1536’]); // disable 2x medium-large size //unset($sizes[‘2048×2048’]); // disable…Continue reading
add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_script( ‘generate-classlist’ ); wp_dequeue_style( ‘classic-theme-styles’ ); wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘global-styles’ ); //wp_deregister_style( ‘popup-maker-site’ ); //wp_dequeue_style( ‘popup-maker-site’ ); //wp_deregister_script( ‘popup-maker-site’ ); //wp_dequeue_script( ‘popup-maker-site’ ); //wp_deregister_script( ‘pum-stp’ ); //wp_dequeue_script( ‘pum-stp’ ); //wp_register_script( ‘popup-maker-site’, ‘/wp-content/plugins/popup-maker/assets/js/site.min.js’, array( ‘jquery’, ‘jquery-ui-core’,…Continue reading
/** * Enable shortcodes for menu navigation. */ if ( ! has_filter( ‘wp_nav_menu’, ‘do_shortcode’ ) ) { add_filter( ‘wp_nav_menu’, ‘shortcode_unautop’ ); add_filter( ‘wp_nav_menu’, ‘do_shortcode’, 11 ); } /** * Enable shortcodes for widgets (footer, sidebar…). */ if ( ! has_filter(…Continue reading
/* * Plugin Name: Image Upload Restrictions * Description: Prevents the upload of images too big, narrow, wide, tall, or short * Version: 1.2 * Author: Titus and Jeff * Author URI: https://titus-design.com */ //if (!defined(‘ABSPATH’)) die(‘Restricted Area’); add_filter(‘wp_handle_upload_prefilter’,’tps_validate_image_size’); function…Continue reading