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 () { | |
var channels = {}; | |
this.subscribe = function (channel, subscription) { | |
if (!channels[channel]) channels[channel] = []; | |
channels[channel].push(subscription); | |
}; | |
this.publish = function (channel) { | |
if (!channels[channel]) 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
// redirection if user is logged in | |
function rcp_redirect_if_user_is_logged() { | |
if (is_plugin_active('restrict-content-pro/restrict-content-pro.php')) { | |
if( is_user_logged_in() ) { | |
wp_redirect( home_url() ); // replace home_url() by whatever url/page you want | |
exit; | |
} | |
} | |
} | |
add_action( 'rcp_after_login_form', 'rcp_redirect_if_user_is_logged' ); |
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
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
} elseif( tribe_is_event() && is_single() ) { // Single Events | |
} elseif( tribe_is_day() ) { // Single Event Days | |
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($) { | |
var methods = { | |
init: function() { | |
var $ul = $("<ul/>").insertAfter(this); | |
var baseId = "_" + $(this).attr("id"); | |
$(this).children("option").each(function(index) { | |
var $option = $(this); | |
var id = baseId + index; | |
var $li = $("<li/>").appendTo($ul); |
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
<script type="text/javascript"> | |
var om_load_jquery = false; | |
</script> |
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 mySearchIncludeIds( $ids, $engine, $terms ) | |
{ | |
// if we're viewing a category page and the SearchWP engine is the default engine | |
if( is_category() && $engine == 'default' ) { | |
$termID = get_queried_object_id(); // determine which category we're viewing | |
// get the IDs of all the posts in this category |
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 | |
class GCE_Parser { | |
private $feeds = array(); | |
private $merged_feed_data = array(); | |
private $errors = array(); | |
private $title = null; | |
private $max_events_display = 0; | |
private $start_of_week = 0; | |
private $sort_order = 'asc'; |
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 inputs = document.querySelectorAll('input, textarea'); | |
for(var i=0;i<inputs.length;i++) { | |
inputs[i].addEventListener('blur', function(){ | |
if(!this.checkValidity()) { | |
this.classList.add('has-error'); | |
} else { | |
this.classList.remove('has-error'); | |
} | |
}); | |
} |
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 gulp = require('gulp'); | |
var nodemon = require('gulp-nodemon'); | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var notifier = require('node-notifier'); | |
var uglify = require('gulp-uglify'); | |
var sequence = require('run-sequence'); | |
var util = require('gulp-util'); |
OlderNewer