Skip to content

Instantly share code, notes, and snippets.

View codeiscode-dev's full-sized avatar

codeiscode-dev

View GitHub Profile
@codeiscode-dev
codeiscode-dev / Redirect to custom URL
Last active October 3, 2018 22:07
Redirect upon Login / Logout
add_action('wp_logout','auto_redirect_external_after_logout');
function auto_redirect_external_after_logout(){
wp_redirect( 'https://www.growlearnteach.com' );
exit();
}
@codeiscode-dev
codeiscode-dev / center_video.php
Last active September 3, 2018 13:51
How to Embed Videos into WPEP
[wpep_center]
[video width=“560” height=“315” mp4=“link-to-mp4” autoplay=“no”]
[/wpep_center]
@codeiscode-dev
codeiscode-dev / function-response-2.php
Last active August 29, 2018 17:12
WPEP PHP - Index Page Button Filters
<?php
return '<span class="dashicons dashicons-arrow-right-alt"></span> My Custom Text';
@codeiscode-dev
codeiscode-dev / the-course-content.less
Last active April 3, 2018 10:42
One Off Course Type CSS Tricks
.wpep-wrapper .wpep-container .wpep-course-single.course-type-basic .course-primary-container .course-primary-content .content {
font-size: 18px;
}
@codeiscode-dev
codeiscode-dev / the-box-titles.less
Last active April 3, 2018 10:40
Standard Course Page CSS Tricks
.wpep-widget-area .wpep-widget .wpep-widget-wrapper h2 {
font-size: 14px;
}
@codeiscode-dev
codeiscode-dev / button-item.less
Last active April 3, 2018 10:35
Index Page CSS Tricks
.wpep-wrapper .wpep-container .course-grid-container .grid-item-cont .video-grid-item a.link {
font-size: 18px;
}
@codeiscode-dev
codeiscode-dev / the-container.css
Last active April 3, 2018 10:15
Execution Plan Course Type CSS Tricks
.wpep-wrapper .wpep-container .wpep-course-single .course-primary-container .course-primary-content .course-header {
background: #ffffff;
}
@codeiscode-dev
codeiscode-dev / how-does-this-work.css
Last active April 3, 2018 10:10
CSS Tricks Introduction
.wpep-wrapper .wpep-container .wpep-course-single .course-primary-container .course-primary-content .course-header {
background: #ffffff;
}
<?php
/* WPEP Assessment User Data
* The same concept for Settings as Key -> Value, will be used by WPEP, but different, to optimize data queries.
* This event does not trigger if the previous $value has not changed during a save.
* STRING $key <- the key, explained bellow
* STRING|INT $value <- the value, explained bellow
* INT $post_id <- the Assessment ID for which this data belongs ( always present )
* INT $question_id <- the question id for which this data belongs ( sometimes available )
* INT $question_answer_id <- the question answer id, for example checkbox / select / radio field types ( sometimes available )
@codeiscode-dev
codeiscode-dev / wpep-frontend-course-events-list.php
Created February 12, 2018 20:24
WPEP Frontend Course Events List
<?php
/* Course Lesson Completed
* $lesson_id <- Lesson ID, from the WPEP Lesson Table
* $is_completed <- true/false
* $user_id <- the User that has completed the lesson, this is also triggered if it's 0
*/
do_action( "wpep_user_activity_lesson_status", $lesson_id, $is_completed, $user_id );
// How to Get The Course ID From the Lesson ID