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
SELECT u.user_email, | |
um.meta_key AS "login_type", | |
from_unixtime(um.meta_value,'%c/%e/%y') AS "login_date", | |
GROUP_CONCAT(p.post_title) AS "courses" | |
FROM nPJeAgtL_users u | |
INNER JOIN nPJeAgtL_usermeta um ON um.user_id = u.id AND um.meta_key = 'learndash-last-login' | |
LEFT JOIN nPJeAgtL_learndash_user_activity lua ON lua.user_id = u.id AND lua.activity_type = 'course' | |
LEFT JOIN nPJeAgtL_posts p ON lua.course_id = p.id | |
WHERE from_unixtime(um.meta_value) < '2019-03-01 00:00:00' AND p.id IN (1947,1938,7694,1932) | |
GROUP BY u.user_login |
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
/*------------------Group leader frontpage table------------------------*/ | |
function group_leader_data() { | |
ob_start(); | |
$user = wp_get_current_user(); | |
if ( in_array( 'group_leader', (array) $user->roles ) || in_array( 'administrator', (array) $user->roles )) { | |
$group_leader_id = $user->ID; | |
$user_group_ids = learndash_get_administrators_group_ids( $group_leader_id, true ); |
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 | |
define( 'WP_USE_THEMES', false ); | |
require( 'wp-blog-header.php' ); | |
$usermeta = get_user_meta( 354, '_sfwd-quizzes', true ); | |
$new = array(); | |
foreach ($usermeta as $key => $value) { | |
if ( $value['time'] < 1476545002 ) | |
array_push($new, $value); |
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 | |
function inspect_scripts() { | |
if (!is_admin()) { | |
global $wp_scripts, $wp_styles; | |
echo '<h1>Scripts</h1>'; | |
echo '<ol>'; | |
foreach( $wp_scripts->queue as $handle ) : | |
echo '<li>' . $handle . '</li>'; | |
endforeach; | |
echo '</ol>'; |
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 | |
class SES | |
{ | |
public $accessKey = NULL; | |
public $accessKeyID = NULL; | |
public $host = 'https://email.us-east-1.amazonaws.com/'; | |
public $userAgent = 'Test SES Class / v1.0'; | |
public $data = array(); |
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 | |
/** | |
* Contains the grade for a given user. | |
* | |
* @since 1.0.0 | |
* | |
* @package LearnDash_Gradebook | |
* @subpackage LearnDash_Gradebook/includes | |
*/ |
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
// https://developer.wordpress.org/reference/functions/add_post_type_support/ | |
add_action( 'init', 'lelandf_custom_fields_support_learndash' ); | |
function lelandf_custom_fields_support_learndash() { | |
$post_types = [ | |
'sfwd-courses', | |
'sfwd-lessons', | |
'sfwd-topic', | |
]; | |
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
//thanks to https://gist.github.com/sultann/24baa5483b4632c3cf214a8de5648204#file-ld-auto-mark-complete-php-L17 for most of | |
//this code, i just corrected it to work with ld_lesson_tag to grab the tags as the original version returned empty | |
//array since it was looking for standard wp tags | |
function ld_is_tagged($postId) { | |
//get all learndash tags on post | |
$tags = wp_get_post_terms($postId,'ld_lesson_tag'); | |
foreach ($tags as $tag) { | |
//need to check for auto-mark-complete tag exists on this post |
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
Run the command below first: | |
sudo nano /etc/systemd/system/xampp.service | |
If you have gedit, you can use gedit instead of nano | |
Copy and Paste Below Into the text editor and save | |
[Unit] | |
Description=XAMPP | |
[Service] |
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
Just run: | |
wget -qO- https://raw.githubusercontent.com/cra0zy/code-nautilus/master/install.sh | bash | |
and it will install all the necessary packages to get the feature on menu. |
OlderNewer