Location: everywhere
Disable XML-RPC (copy)
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
Disable XML-RPC (copy)
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
Site Title Anywhere
function site_title_shortcode() { return get_bloginfo(‘name’); } add_shortcode(‘sitetitle’, ‘site_title_shortcode’);Continue reading
Envira CDN – Exclude a custom post type from using Envira CDN images
/** * Exclude my_news from using CDN, where my_news is the slug of custom post type. */ add_filter( ‘envira_cdn_should_process_content’, function( $should_process, $content ) { // Check if we’re on a single post/page and it’s my_news post type if ( is_singular(…Continue reading
Allow SVG Files Upload (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
Allow SVG Files Upload (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
Riduzione soglia recaptcha v3
//su aiper la form contatti non va altrimenti add_filter(‘wpcf7_recaptcha_threshold’, function() { return 0.25; });Continue reading
Allow SVG Files Upload (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
Conditionally disable Cloudflare Turnstile
/** * Conditionally disable Cloudflare Turnstile * * @param array $form_data Form data. * @return array Modified form data. */ function wpf_disable_turnstile( $form_data ) { // Disable CAPTCHA setting. $form_data[‘settings’][‘recaptcha’] = ‘0’; return $form_data; } add_filter( ‘wpforms_frontend_form_data’, ‘wpf_disable_turnstile’, 10, 1…Continue reading