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 link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') |
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 link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') |
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 link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') |
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 link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') |
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 link = $('link'); | |
$('button').on('click', function() { | |
var $this = $(this), | |
stylesheet = $this.data('file'); | |
link.attr('href', stylesheet + '.css'); | |
$this | |
.siblings('button') | |
.removeAttr('disabled') |
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 custom_next_prev_post_links( $join, $in_same_term, $excluded_terms, $taxonomy, $post ){ | |
global $wpdb; | |
$join .= " INNER JOIN $wpdb->postmeta AS m ON p.ID = m.post_id AND m.meta_key = 'your_meta_key_name'"; | |
return $join; | |
} | |
add_filter('get_next_post_join', 'custom_next_prev_post_links', 10, 5); | |
add_filter('get_previous_post_join', 'custom_next_prev_post_links', 10, 5); |
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
/** | |
* Determine whether ajax request from frontend. | |
* | |
* @return boolean | |
*/ | |
function request_is_frontend_ajax() { | |
$script_filename = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; | |
//Try to figure out if frontend AJAX request... If we are DOING_AJAX; let's look closer |