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 | |
/* General idea | |
1. Create new membership called 'Single tutorial'. | |
2. In settings, make sure this membership can be purchased multiple times by same user. | |
2. Add a custom field to that registration form in settings, a text field named 'tutorial' for the post ID being purchased. | |
3. User will arrive at the form, with this tutorial custom field pre-filled based on the link they clicked from /?tutorial=POSTID | |
4. User meta data will store an array of post ids that user has purchased 'users_tutorials'. | |
5. Use the 'mepr-pre-run-rule-content' filter, to unblock any post for those users that have purchased |
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
<link rel="stylesheet" href="https://cdn.vidstack.io/player/theme.css" /> | |
<link rel="stylesheet" href="https://cdn.vidstack.io/player/video.css" /> | |
<script src="https://cdn.vidstack.io/player" type="module"></script> | |
<media-player | |
playsinline | |
load="play" | |
title="Sprite Fight" | |
src="youtube/_cMxraX_5RE" |
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 my_previous_post_where() { | |
global $post, $wpdb; | |
return $wpdb->prepare( "WHERE p.menu_order < %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); | |
} | |
add_filter( 'get_previous_post_where', 'my_previous_post_where' ); |
NewerOlder