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
/** | |
* sensei_filter_lessons_archive function. | |
* @access public | |
* @param mixed $wp_query | |
* @return void | |
*/ | |
function sensei_filter_lessons_archive( $wp_query ) { | |
// Handle lesson archive page | |
if ( is_post_type_archive( 'lesson' ) ) { |
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
/** | |
* JS version of PHP htmlentities. | |
* | |
* @since 1.0.8 | |
* @access public | |
*/ | |
jQuery.fn.htmlentities = function( str ) { | |
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); | |
} |
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
add_action('admin_init', 'sensei_prevent_admin_access'); | |
function sensei_prevent_admin_access() { | |
if ( ! is_ajax() && ! current_user_can('edit_posts') ) { | |
global $woothemes_sensei; | |
wp_safe_redirect(get_permalink(intval( $woothemes_sensei->settings->settings[ 'course_page' ] ))); | |
exit; | |
} | |
} |
NewerOlder