FC – Permitir subidas SVG

// Permitir subida de SVG en la biblioteca de medios add_filter(‘upload_mimes’, function ($mimes) { $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘svgz’] = ‘image/svg+xml’; return $mimes; });Continue reading

Outseta Subdomain Backend Checker

add_action(‘wp_ajax_check_subdomain’, ‘check_subdomain_handler’); add_action(‘wp_ajax_nopriv_check_subdomain’, ‘check_subdomain_handler’); add_action(‘rest_api_init’, function () { register_rest_route(‘custom/v1’, ‘/trigger-deploy’, [ ‘methods’ => ‘POST’, ‘callback’ => ‘rmm_trigger_deploy’, ‘permission_callback’ => ‘__return_true’, // Replace with real auth in production ]); }); error_log(“✅ check_subdomain_handler called: ” . date(‘c’)); function rmm_trigger_deploy($request) { $params =…Continue reading

rmm_container_table

// Register AJAX handlers add_action(‘wp_ajax_rmm_container_action’, ‘handle_rmm_container_action’); add_action(‘wp_ajax_nopriv_rmm_container_action’, ‘handle_rmm_container_action’); function handle_rmm_container_action() { $rmm_action = sanitize_text_field($_POST[‘rmm_action’]); $outseta_uid = isset($_POST[‘outseta_uid’]) ? sanitize_text_field($_POST[‘outseta_uid’]) : ”; $subdomain = isset($_POST[‘subdomain’]) ? sanitize_text_field($_POST[‘subdomain’]) : ”; $response = array(‘success’ => false, ‘message’ => ‘Unknown action’); if ($rmm_action ===…Continue reading

normalize css (the new normal)

// Add custom styles function add_the_new_normal_css() { wp_register_style( ‘the-new-normal-css’, ‘https://github.com/sarahschopick/the-new-normal.css/blob/c413cad2074e314774f538dd044ad30d8b5ce31d/the-new-normal.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal-css’ ); } add_action( ‘wp_enqueue_scripts’, ‘add_the_new_normal_css’ );Continue reading

Login Restrict

// Restrict login to only the senior developer by user ID function restrict_login_to_senior_dev( $user, $username, $password ) { // Allow login only for the specified user ID $allowed_user_id = 1; // Replace with your user ID (e.g., 1, 2, etc.)…Continue reading

inkt CRM to Fluent Forms Autofill – Person_id

// Author: Sumaiya, anytype doc: anytype://object?objectId=bafyreiemzcszvrirdfznkbgehn3q27ayd6djlvj7rtvyhk6sue6w2diccq&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv /** * inkt CRM to Fluent Forms Autofill (Flowmattic Secure Connection) * * HOW IT WORKS: * 1. This script runs only when ‘project_id’ and ‘person_id’ are in the URL. * 2. It takes…Continue reading

Enable HTTP Strict Transport Security (HSTS)

/** * Enables the HTTP Strict Transport Security (HSTS) header in WordPress. * Includes preloading with subdomain support. */ function tg_enable_strict_transport_security_hsts_header_wordpress() { header( ‘Strict-Transport-Security: max-age=31536000; includeSubDomains; preload’ ); } add_action( ‘send_headers’, ‘tg_enable_strict_transport_security_hsts_header_wordpress’ );Continue reading

Post Shortcodes

// Post Title Shortcode function shortcode_post_title() { return get_the_title(); } add_shortcode(‘post_title’, ‘shortcode_post_title’); // Featured Image Shortcode function shortcode_featured_image() { if (has_post_thumbnail()) { return get_the_post_thumbnail(null, ‘full’); } return ”; } add_shortcode(‘featured_image’, ‘shortcode_featured_image’); // Excerpt Shortcode function shortcode_post_excerpt() { global $post; return…Continue reading

Removing File Upload Fields from Notifications

add_filter( ‘wpforms_emails_notifications_field_ignored’, ‘wpf_ignore_email_fields’, 10, 3 ); function wpf_ignore_email_fields( $is_ignored, $field, $form_data ) { if ( empty( $form_data[‘id’] ) ) { return $is_ignored; } // TODO: Change `1` to your form ID. if ( (int) $form_data[‘id’] !== 1 ) { return…Continue reading