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 5.3+ anonymous function | |
add_action( 'widgets_init', function() { | |
register_widget( 'Sample_Widget_SO_19246434' ); | |
}); | |
class Sample_Widget_SO_19246434 extends WP_Widget | |
{ | |
function __construct() { | |
parent::__construct( |
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
/** | |
* Custom excerpt | |
* | |
* @since 1.0 | |
* | |
* @uses get_queried_object() | |
* | |
* @see get_the_ID() | |
* |
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
function eduprime_get_nested_events() | |
{ | |
// get the meta | |
$event_posts = get_posts(array('post_type' => 'tp_event', 'posts_per_page' => -1)); | |
if( ! $event_posts ) return ''; | |
$status_meta = array(); | |
foreach ($event_posts as $single ) { | |
$meta = get_post_meta( $single->ID, 'tp_event_status', true ); |
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
/** | |
* | |
* Import Class | |
* A helper class for support CS to OCDI | |
* | |
*/ | |
if ( !class_exists( 'OCDI_Plugin' ) ) | |
return; |
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
.curex-hero-thumb { | |
position: absolute; | |
left: calc((-100vw + 100%) / 2); | |
right: calc((-100vw + 100%) / 2); | |
height: 100%; | |
} |
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
String.prototype.getValueByKey = function(k){ | |
var p = new RegExp('\\b'+k+'\\b','gi'); | |
return this.search(p) != -1 ? decodeURIComponent(this.substr(this.search(p)+k.length+1).substr(0,this.substr(this.search(p)+k.length+1).search(/(&|;|$)/))) : ""; | |
}; |
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( 'wpcf7_before_send_mail', 'fordwich_create_post_after_cf7' ); | |
/** | |
* Do stuff for my contact form form. This function shouldn't return aything | |
* | |
* @param WPCF7_ContactForm $contact_form wpcf7 object, passed by refference | |
*/ | |
function fordwich_create_post_after_cf7( $WPCF7_ContactForm ) { |
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
var mySwiper = new Swiper('.swiper-container', { | |
slidesPerView: 5, | |
spaceBetween: 30, | |
loop: true, | |
centeredSlides: true, | |
pagination: { | |
el: '.swiper-pagination', | |
clickable: true, | |
}, | |
on: { |