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
jQuery(document).ready(function() { | |
jQuery("form[name='cartForm']").on("submit", function(event) { | |
jQuery("form[name='cartForm'] input[required], form[name='cartForm'] select[required]").each(function() { | |
if (jQuery(this).val() == "") { | |
jQuery(this).addClass("error"); | |
} | |
else { | |
jQuery(this).removeClass("error"); | |
} | |
}).each(function() { |
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
<?php | |
class PLUGIN_DataTypeSlug_AIOseo{ | |
public function __construct() { | |
$this->option = new Options(); | |
$this->data = new Apiu(); | |
} |
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
<?php | |
class Plugin_Shortcodes_SearchAndResults { | |
public function __construct() { | |
$this->data = new Api(); | |
$this->options = new Options(); | |
$this->_params = new Params(); | |
add_shortcode('search-form', [$this, '_form']); | |
add_shortcode('result', [$this, '_results']); |
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
<?php | |
class Plugin_DataTypeSlug_Template { | |
public function __construct() { | |
$this->option = new Options(); | |
} | |
public function add_actions_and_filters() { |
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
var _API={}; | |
_API.call_api=function(method, path, passing_data) { | |
var xhttp = new XMLHttpRequest(); | |
return new Promise(function(resolve, reject) { | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { |
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
<?php get_header(); ?> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-lg-10 col-lg-offset-1"> | |
<div class="row"> | |
<section class="col col-md-9 col-main" role="main"> | |
<?php if (have_posts()): ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
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
function ga_event(category, action, label, value) { | |
if (typeof gtag !== 'undefined') { | |
gtag('event', action, { | |
'event_category': category, | |
'event_label': label, | |
'event_value': value, | |
'event_callback': function() { | |
console.log('ga event callback ('+ action +' - '+ category +' - '+ label +')'); |
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
var miniSlider_data=new Object(); | |
function changeSlideOnMiniSlider(eleID, slideNum) { | |
if (eleID!=undefined && slideNum!=undefined && eleID in miniSlider_data) { | |
var aMiniSliders_data=miniSlider_data[(eleID)]; | |
if (slideNum=="next" || slideNum=="back") { | |
for (es=0; es < aMiniSliders_data['slides'].length; es++) { | |
if (! new RegExp("( |)(hideSlide)", "g").test(aMiniSliders_data['slides'][es].className)) { | |
eval("var slideNum="+ ((slideNum=="next")?((es==(aMiniSliders_data['slides'].length-1))?"0":"es+1"):((es==0)?(aMiniSliders_data['slides'].length-1):"es-1"))); |
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
<?php | |
add_filter('template_redirect', function() { | |
global $wp_query; | |
if(! empty($wp_query->query_vars["xml_listings_sitemap"]) ) { | |
$wp_query->is_404 = false; | |
header('Content-type: application/xml; charset=utf-8'); |
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
print "Welcome To Tic-Tac-Toe\n" | |
""" | |
THE BOARD | |
|{0}|{1}|{2}| | |
|{3}|{4}|{5}| | |
|{6}|{7}|{8}| | |
""" | |
winningCombinations = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]; |
OlderNewer