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
| /** | |
| * Shortcode to get ACF field value for the current user. | |
| * | |
| * This shortcode retrieves the value of an Advanced Custom Fields (ACF) field | |
| * for the currently logged-in user. | |
| * | |
| * Usage: | |
| * [acf_custom_field field_name="your_acf_field_name"] | |
| * | |
| * The field_name attribute corresponds to the ACF field 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
| <?php | |
| /** | |
| * Plugin Name: Custom LD Rest API | |
| * Plugin URI: https://elearningevolve.com/ | |
| * Description: Provides custom REST API endpoints utilizing LearnDash | |
| * Version: 1.0.0 | |
| * Author: eLearning evolve | |
| * Author URI: https://elearningevolve.com/ | |
| * License: GPL-2.0+ | |
| * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
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
| -- Step 1: Delete from wp_usermeta | |
| DELETE FROM wp_usermeta | |
| WHERE user_id IN ( | |
| SELECT ID | |
| FROM wp_users | |
| WHERE ID IN ( | |
| SELECT user_id | |
| FROM wp_usermeta | |
| WHERE meta_key = 'last_login' | |
| AND FROM_UNIXTIME(meta_value) < DATE_SUB(NOW(), INTERVAL 1 YEAR) |
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
| /** | |
| * Handle the AJAX request to mark a LearnDash topic or lesson as complete. | |
| * | |
| * @return void | |
| */ | |
| function custom_evolve_handle_ld_mark_topic_complete() { | |
| // Verify the nonce for security. | |
| check_ajax_referer( 'ld_complete_nonce', 'nonce' ); | |
| // Get and sanitize input data. |
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
| // Enqueue custom CSS for the admin bar if on a staging site | |
| function eevolve_custom_admin_bar_css() { | |
| if ( strpos( get_site_url(), 'staging' ) !== false ) { | |
| wp_register_style( 'eevolve-admin-bar-css', false ); | |
| wp_enqueue_style( 'eevolve-admin-bar-css' ); | |
| wp_add_inline_style( | |
| 'eevolve-admin-bar-css', | |
| ' | |
| #wpadminbar { background-color: #cc8400; } | |
| #wp-admin-bar-woocommerce-site-visibility-badge { display: none; } |
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
| import subprocess, requests, re, sys, os | |
| OLLAMA_URL = "http://localhost:11434/api/generate" | |
| MODEL = "default" | |
| MAX_RETRIES = 5 | |
| SYSTEM_RULES = """You are a senior WordPress plugin developer doing a code review and cleanup. | |
| You will be given an existing PHP file. Rewrite it to meet these standards while preserving | |
| its original functionality and intent: |
OlderNewer