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
$('#percent').on('change', function() { | |
var val = parseInt($(this).val()); | |
var $circle = $('#svg #bar'); | |
if (isNaN(val)) { | |
val = 100; | |
} else { | |
var r = $circle.attr('r'); | |
var c = Math.PI * (r * 2); |
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 pfun_update_notification ( $transient ) { | |
if ( empty( $transient->checked['pfun'] ) ) { | |
return $transient; | |
} | |
$url = 'http://ptheme.com/update.json'; | |
//Send the request. |
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( document ).ready( function() { | |
/* === Checkbox Multiple Control === */ | |
jQuery( '.customize-control-checkbox-multiple input[type="checkbox"]' ).on( 'change', function() { | |
checkbox_values = jQuery( this ).parents( '.customize-control' ).find( 'input[type="checkbox"]:checked' ).map( | |
function() { | |
return this.value; | |
} |
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 myScript = document.createElement('script'); | |
myScript.src = 'http://code.jquery.com/jquery-2.1.4.min.js'; | |
myScript.onload = function() { | |
console.log('jQuery loaded.'); | |
}; | |
document.body.appendChild(myScript); |
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( $ ) { | |
$('#upload_form').on('submit', function(e){ | |
e.preventDefault(); | |
var $this = $(this), | |
nonce = $this.find('#image_upload_nonce').val(), | |
images_wrap = $('#images_wrap'), | |
status = $('#status'), | |
formdata = false; | |
if ( $this.find('#images').val() == '' ) { |
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 | |
// Define custom query parameters | |
$custom_query_args = array( /* Parameters go here */ ); | |
// Get current page and append to custom query parameters array | |
$custom_query_args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
// If your page is a static front page, be sure to use page instead of paged as a static front page uses page and not paged | |
// https://codex.wordpress.org/Function_Reference/WP_Query#Pagination_Parameters | |
// $custom_query_args['paged'] = get_query_var( 'page' ) ? get_query_var( 'page' ) : 1; |
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
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'start_post_rel_link'); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'adjacent_posts_rel_link'); | |
remove_action( 'wp_head', 'wp_shortlink_wp_head' ); |
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
remove_action('admin_print_scripts', 'print_emoji_detection_script'); | |
remove_action('admin_print_styles', 'print_emoji_styles'); | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action('embed_head', 'print_emoji_detection_script'); | |
remove_filter('the_content_feed', 'wp_staticize_emoji'); | |
remove_filter('comment_text_rss', 'wp_staticize_emoji'); | |
remove_filter('wp_mail', 'wp_staticize_emoji_for_email'); |
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 get_tinymce_content(){ | |
if (jQuery("#wp-editor_id-wrap").hasClass("tmce-active")){ | |
return tinyMCE.activeEditor.getContent(); | |
}else{ | |
return jQuery('#html_text_area_id').val(); | |
} | |
} |
NewerOlder