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 | |
add_action( 'save_post', function( $post_id ) { | |
if( get_post_type( $post_id ) != WPEP_POST_TYPE_COURSE ) | |
return; | |
global $wpdb; | |
$wpdb->query( 'DELETE FROM `' . $wpdb->postmeta . '` WHERE `meta_key` LIKE "_oembed%" AND post_id = ' . $post_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
.wpep-wrapper>.wpep-container .course-grid-container .wpep-course-grid-items-container>div.wpep-visible, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-ebook-grid-items-container>div.wpep-visible, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-list-item-grid-items-container>div.wpep-visible, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-offer-grid-items-container>div.wpep-visible, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-video-grid-items-container>div.wpep-visible, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-course-grid-items-container>div.wpep-hidden, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-ebook-grid-items-container>div.wpep-hidden, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-list-item-grid-items-container>div.wpep-hidden, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-offer-grid-items-container>div.wpep-hidden, | |
.wpep-wrapper>.wpep-container .course-grid-container .wpep-video-grid-items-contai |
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
iPhone XR: The reviews are in | |
Reviewers around the world have put iPhone XR through its paces and are sharing their impressions of the newest member of the iPhone family. That includes everything from its 6.1-inch Liquid Retina display, advanced camera system that creates dramatic portraits using a single camera lens, all-day battery life and six beautiful finishes; white, black, blue, yellow, coral and (PRODUCT)RED. | |
Here are some of the reviewers’ reactions: | |
Digital Trends | |
“The colors are stunning, battery life is great, Face ID is still industry-leading technology, iOS gestures are intuitive, the camera is superb, and performance is fantastic. This is the iPhone to buy.” | |
Daring Fireball |
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 | |
class WPEPContentLibraryIntegrationExample extends WPEP_Content_Library_Integration { | |
public $service_name = 'Integration Name'; | |
public $meta_box_active = true; // If you want to integrate with the Content Library without the Metabox, simply set this to false. | |
public $meta_box_title = 'Integration Name'; | |
public $default_purchase_cta = 'Upgrade Membership Plan'; |
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 | |
// You'll want to get an User Access Rules Instance list this : | |
$user_access_rule = new WPEPAddOnSalesEngine\Entity\UserAccess( $user_id ); | |
// Case 1 : Give Access to One-Time Purchases ( not Memberships ) | |
// $post_id = Post Type, if it's a Membership, you can set an Expiration date also. | |
$user_access_rule->get_post_access_rules( $post_id )->give_access(); // when giving access it will save automatically. |
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
UPDATE `wp_posts` SET `post_title` = SUBSTRING_INDEX(PREG_REPLACE('#<[^>]+>#',' ',`post_content`), ' ', 8) | |
WHERE DATE(`post_date`) > '2000-11-11' AND DATE(`post_date`) < '2007-11-11' |
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 | |
function my_lost_password_redirect() { | |
wp_redirect( 'https://growlearnteach.com' ); | |
exit; | |
} | |
add_action('after_password_reset', 'my_lost_password_redirect'); |
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 | |
// Please ensure that WPEP -> Settings -> Index Page -> Grid Options -> Enforce Ordering Option is Disabled. | |
add_filter( 'wpep_primary_content_list_args', function($args) { | |
$args = [ | |
'order' => 'DESC', | |
'orderby' => 'date', | |
]; |
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 | |
// How it is : | |
function gutenberg_wpautop( $content ) { | |
if ( gutenberg_content_has_blocks( $content ) ) { | |
return $content; | |
} | |
return wpautop( $content ); |
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 | |
add_action( 'wpep_user_set_assessment_data', function( $key, $value, $post_id, $question_id, $question_answer_id, $user_id ) { | |
if( $key != WPEP_USER_ASSESSMENT_STATUS ) | |
return; | |
$student_name = wpep_content_user_profile_format_name( $user_id ); | |
$status_label = wpep_get_setting_translated( 'assessment-status-label-' . $value ); | |
$admin_url = wpep_admin_url_statistics( [ | |
'tab' => 'assessments', |