🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:functions.php
<?php define('UNFIA_VERSION', '1.0.0'); define('UNFIA_DIR', get_template_directory()); define('UNFIA_URI', get_template_directory_uri()); require_once UNFIA_DIR . '/inc/theme-setup.php'; require_once UNFIA_DIR . '/inc/enqueue.php'; require_once UNFIA_DIR . '/inc/custom-post-types.php'; require_once UNFIA_DIR . '/inc/theme-options.php'; require_once UNFIA_DIR . '/inc/helpers.php'; require_once UNFIA_DIR . '/inc/mega-menu.php'; add_filter('wp_check_filetype_and_ext', function ($data, $file, $filename, $mimes) { $filetype = wp_check_filetype($filename, $mimes); return [ 'ext' => $filetype['ext'], 'type' => $filetype['type'], 'proper_filename' => $data['proper_filename'] ]; }, 10, 4); add_filter('upload_mimes', function ($mimes) { $mimes['svg'] = 'image/svg+xml'; $mimes['webp'] = 'image/webp'; return $mimes; }); add_action('admin_post_unfia_contact_form', 'unfia_handle_contact_form'); add_action('admin_post_nopriv_unfia_contact_form', 'unfia_handle_contact_form'); function unfia_handle_contact_form() { if (!isset($_POST['contact_nonce']) || !wp_verify_nonce($_POST['contact_nonce'], 'unfia_contact_nonce')) { wp_die('Security check failed'); } $name = sanitize_text_field($_POST['user_name']); $email = sanitize_email($_POST['user_email']); $subject = sanitize_text_field($_POST['subject']); $message = sanitize_textarea_field($_POST['message']); $to = unfia_email(); $headers = ['Content-Type: text/html; charset=UTF-8', 'Reply-To: ' . $name . ' <' . $email . '>']; $body = 'Name: ' . $name . '<br>Email: ' . $email . '<br>Subject: ' . $subject . '<br>Message:<br>' . nl2br($message); wp_mail($to, 'New Inquiry from ' . $name, $body, $headers); wp_redirect(add_query_arg('sent', '1', wp_get_referer())); exit; }
Save Changes
Cancel
Create New File
Create New Folder