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 | |
| /** | |
| * Main Singleton class for My Awesome Plugin. | |
| * | |
| * @package My_Awesome_Plugin | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; // Exit if accessed directly. | |
| } |
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 | |
| /** | |
| * Plugin Name: AI Accessibility Analyzer | |
| * Plugin URI: https://yoursite.com/ai-accessibility-analyzer | |
| * Description: Analyzes web accessibility issues using AI, displays errors in a floating popup with stacked messages, and includes PDF export option. | |
| * Version: 1.2.8 | |
| * Author: Your Name | |
| * License: GPL v2 or later | |
| * Text Domain: ai-accessibility-analyzer | |
| */ |
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
| function import_users_from_emails() { | |
| global $wpdb; | |
| // List of emails from your updated list | |
| $emails = [ | |
| 'p&p@familie-schmitt-online.de', | |
| 'diagus@t-online.de', | |
| 'melanie@familie-gebert.de', | |
| 'marcokollmann@t-online.de', | |
| 'dagmar.richter26@web.de', |
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
| function generate_pmpro_memberships_inserts_shortcode($atts) { | |
| global $wpdb; | |
| // Initialize output | |
| $output = ''; | |
| $values = []; | |
| $missing_emails = []; | |
| // Query wp_xhvvxzqhmz_pmpro_memberships_users | |
| $results = $wpdb->get_results(" |
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
| function update_pmpro_subscriptions_shortcode($atts) { | |
| global $wpdb; | |
| // Initialize arrays | |
| $mappings = []; | |
| $unmatched = []; | |
| // Step 1: Build mappings array | |
| $subscriptions = $wpdb->get_results(" | |
| SELECT id, user_id |
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
| function update_pmpro_membership_orders_shortcode($atts) { | |
| global $wpdb; | |
| // Initialize arrays | |
| $mappings = []; | |
| $unmatched = []; | |
| // Step 1: Build mappings array from wp_xhvvxzqhmz_pmpro_membership_orders | |
| $orders = $wpdb->get_results(" | |
| SELECT id, user_id |
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
| function display_user_membership_levels_shortcode($atts) { | |
| global $wpdb; | |
| // Shortcode attributes with default user_id as current user | |
| $atts = shortcode_atts(array( | |
| 'user_id' => get_current_user_id(), // Defaults to logged-in user | |
| ), $atts, 'user_membership_levels'); | |
| $user_id = intval($atts['user_id']); |
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
| function check_active_membership_levels_shortcode($atts) { | |
| global $wpdb; | |
| // Step 1: Get active user_ids from wp_pmpro_subscriptions where status = 'active' | |
| $active_users = $wpdb->get_col(" | |
| SELECT DISTINCT user_id | |
| FROM {$wpdb->prefix}pmpro_subscriptions | |
| WHERE status = 'active' | |
| "); |
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
| function remove_membership_by_emails_shortcode($atts) { | |
| global $wpdb; | |
| // List of 661 emails to process | |
| $emails_to_remove = array( | |
| 'a.baechle@icloud.com', 'a.hliscs@web.de', 'a.johns@outlook.de', 'a.lombardo@online.de', 'a.luetschen@me.com', | |
| 'a.waschke@web.de', 'aaronluithle@posteo.de', 'abarloi@drbarloi.de', 'abie.vanwyk@gmail.com', 'achim.engel@gmx.de', | |
| 'adafreese@gmx.net', 'adiehl@gmx.net', 'aileenaltmann@web.de', 'ajakobljevich@web.de', 'ak.sports@gmx.de', | |
| 'akutschki@icloud.com', 'alexander.jobst@gmx.com', 'alexander.leckbandt@gmx.de', 'alexander.sorge@gmail.com', | |
| 'alexanderdaum84@gmx.net', 'alexanderjerlitschka@gmail.com', 'alexandra.hebbe@gmail.com', 'alexniclas.peters@yahoo.de', |
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
| <script> | |
| jQuery(document).ready(function() { | |
| // Disable options that contain "limit" in the text (both methods for Safari compatibility) | |
| jQuery('#input_13_34 option').each(function() { | |
| if (jQuery(this).text().toLowerCase().includes("limit")) { | |
| jQuery(this) | |
| .attr("disabled", "true") // Standard way | |
| .attr("disabled", "disabled") // Alternative way | |
| .prop("disabled", true); // Safari compatibility |
NewerOlder