Replace The WordPress Logo on Login Page with your own logo (copy)

add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://qcs-ghana.stromstadafroshop.se/wp-content/uploads/2024/04/logo-email-header.webp’; $logo_width = 100; $logo_height = 100; printf( ‘.login h1 a {background-image:url(%1$s) !important; margin:0…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

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Completely Disable Comments (copy) (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

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