This file contains 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 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 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 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. |
OlderNewer