// 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
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
// 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
if ( ! function_exists( ‘enqueue_custom_styles’ ) ) { function enqueue_custom_styles() { // Normalize wp_register_style( ‘the-new-normal-css’, ‘https://cdn.jsdelivr.net/gh/sarahschopick/the-new-normal.css@main/the-new-normal.min.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal-css’ ); // WordPress Normalization wp_register_style( ‘normalize-wordpress’, ‘https://cdn.jsdelivr.net/gh/sarahschopick/normalize-wordpress@main/normalize-wordpress.min.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘normalize-wordpress’ ); } } add_action( ‘wp_enqueue_scripts’, ‘enqueue_custom_styles’ );Continue reading
// 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
// 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
/** * 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