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
/** | |
* Integration styles | |
*/ | |
@-webkit-keyframes spin-360 { | |
from { | |
-webkit-transform: rotate(0); | |
-moz-transform: rotate(0); | |
-ms-transform: rotate(0); | |
-o-transform: rotate(0); | |
transform: rotate(0); |
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
<li id="slide-5261" class="slide slide-number-1 flex-active-slide" style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 1; display: block; z-index: 2;"> | |
<section class="entry col-full"> | |
<p>This is a custom post type slide. Aliquam erat volutpat. Vivamus eget mi velit, sed convallis tellus. Suspendisse sit amet lacinia nisl. Nam tempus mi sed odio fringilla bibendum. Vivamus nisl ipsum, imperdiet eu euismod a, tincidunt aliquam leo. Praesent dolor est, dignissim id placerat id, cursus id diam.</p> | |
</section> | |
</li> |
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
add_filter('register', 'my_custom_registration_link'); | |
function my_custom_registration_link($link) { | |
if(!is_user_logged_in()) { | |
// In this example there is a page with slug 'register' so the url would be http://mysite.com/register | |
$link = '<div class="status register"><a href="' . site_url('register') . '">' . __('Register') . '</a></div>'; | |
} | |
return $link; | |
} // End my_custom_registration_link() |
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
/** | |
* 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 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 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; | |
} | |
} |
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 | |
add_filter( 'woo_template_parts', 'idx_search_fix', 1 ); | |
function idx_search_fix( $templates ) { | |
$options = get_option('fmc_settings'); | |
$page_id = absint( $options['destlink'] ); | |
if ( is_page( $page_id ) && isset( $templates[2] ) ) { | |
unset($templates[2]); | |
$templates = array_values($templates); | |
} | |
return $templates; |
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 get_posts_categories_optimized( $number_posts = 1000, $category_terms = array() ) { | |
$post_id_array = get_posts(array( | |
'numberposts' => $number_posts, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'category', | |
'field' => 'id', | |
'terms' => $category_terms | |
), |
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
jQuery( function( $ ) { | |
$.ajax( { | |
url: 'http://wcct.dev/wp-json/wp/v2/posts?filter[order]=ASC&filter[category_name]=slides&filter[posts_per_page]=-1', | |
success: function ( data ) { | |
$.each( data, function( key, value ) { | |
urlstring = ''; | |
if ( value.featured_image_thumbnail_url !== null ) { | |
urlstring = ' data-background="' + value.featured_image_thumbnail_url + '"'; | |
} |