This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function disable_cf7_assets_except_some_pages() { | |
$allowed_pages = ['contact']; | |
if (!is_page($allowed_pages)) { | |
wp_dequeue_style('contact-form-7'); | |
wp_deregister_style('contact-form-7'); | |
wp_dequeue_script('contact-form-7'); | |
wp_deregister_script('contact-form-7'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if a valid access code has been submitted | |
if (isset($_POST['access_code'])) { | |
$stored_hash = 'a891af9b4934fe765b5778469d1f1f45'; // Replace with your actual MD5 hash | |
$entered_code = $_POST['access_code']; | |
$entered_hash = md5($entered_code); // Hash the entered code | |
if ($entered_hash === $stored_hash) { | |
// Display your link |