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 | |
| /** | |
| * Magic Login Pro - Email Confirmation Enforcement | |
| * | |
| * This snippet requires users to confirm their email address when registering | |
| * via Magic Login Pro. Users must click the magic login link in their email | |
| * to confirm their email address before they can log in. | |
| * | |
| * How it works: | |
| * 1. When a user registers, they are marked as "email unconfirmed" |
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 | |
| add_action( 'admin_menu', 'move_powered_cache_under_settings', 999 ); | |
| function move_powered_cache_under_settings() { | |
| if ( ! is_admin() ) { | |
| return; | |
| } | |
| global $menu, $submenu; |
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 | |
| /** | |
| * Add JavaScript to modify login field for email-only input | |
| */ | |
| function fix_magic_login_set_email_only() { | |
| ?> | |
| <script type="text/javascript"> | |
| (function() { |
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
| ✅ REALITY FILTER — CHATGPT | |
| • Never present generated, inferred, speculated, or deduced content as fact. | |
| • If you cannot verify something directly, say: | |
| - “I cannot verify this.” | |
| - “I do not have access to that information.” | |
| - “My knowledge base does not contain that.” | |
| • Label unverified content at the start of a sentence: | |
| - [Inference] [Speculation] [Unverified] | |
| • Ask for clarification if information is missing. Do not guess or fill gaps. |
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 | |
| add_filter( 'powered_cache_advanced_cache_purge_urls', function ( $urls, $post_id ) { | |
| if ( 'product' === get_post_type( $post_id ) ) { | |
| $urls[] = get_permalink( $post_id ); | |
| $urls[] = get_permalink( wc_get_page_id( 'shop' ) ); | |
| $terms = wp_get_post_terms( $post_id, [ 'product_tag', 'product_cat' ] ); | |
| foreach ( $terms as $term ) { | |
| $urls[] = get_term_link( $term ); |
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 | |
| add_action( 'wp_footer', function () { | |
| ?> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function () { | |
| var messageElement = document.querySelector('.magic-login-form-header .message'); | |
| if (messageElement) { | |
| messageElement.innerText = 'Your new message here'; | |
| } |
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 | |
| add_action( 'plugins_loaded', function () { | |
| $request_url = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; | |
| if ( false !== strpos( $request_url, '/checkout' ) || false !== strpos( $request_url, '/finalizar-compra' ) ) { | |
| add_filter( 'powered_cache_fo_disable', '__return_true' ); | |
| add_filter( 'powered_cache_fo_disable_css_combine', '__return_true' ); | |
| add_filter( 'powered_cache_fo_disable_css_minify', '__return_true' ); | |
| add_filter( 'powered_cache_fo_disable_js_combine', '__return_true' ); |
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 | |
| add_action( 'wp_footer', 'magic_login_auto_fill_email_from_url' ); | |
| add_action( 'login_footer', 'magic_login_auto_fill_email_from_url' ); | |
| function magic_login_auto_fill_email_from_url() { | |
| ?> | |
| <script> | |
| // Function to get URL parameters | |
| function getURLParameter(name) { |
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
| # BEGIN WordPress | |
| # The directives (lines) between "BEGIN WordPress" and "END WordPress" are | |
| # dynamically generated, and should only be modified via WordPress filters. | |
| # Any changes to the directives between these markers will be overwritten. | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
| RewriteBase / | |
| # Pass .well-known/security.txt to WordPress | |
| RewriteRule ^\.well-known/security\.txt$ index.php [L] |
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 | |
| add_action( 'plugins_loaded', function () { | |
| add_action( 'powered_cache_flushed', 'flush_phast_cache' ); | |
| add_action( 'powered_cache_purge_all_cache', 'flush_phast_cache' ); | |
| add_action( 'powered_cache_clean_site_cache_dir', 'flush_phast_cache' ); | |
| } ); | |
| function flush_phast_cache() { | |
| $cache_dir = WP_CONTENT_DIR . '/cache/'; |
NewerOlder