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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<script type="text/javascript" src="script.js"></script> | |
<style> | |
#calculator{ | |
width: 100%; |
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
let Variable; | |
const Variable2; | |
var Variable; | |
/* | |
A semicolon at the end of a line indicates where a statement ends. | |
A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($). Subsequent characters can also be digits (0–9). | |
Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) as well as "a" through "z" (lowercase). |
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
/* | |
* I wanted the custom post type to show up on the regular author page. Here's what I came up with in case anyone else is looking: | |
*/ | |
add_filter('posts_where', 'include_for_author'); | |
function include_for_author($where){ | |
if(is_author()) | |
$where = str_replace(".post_type = 'post'", ".post_type in ('post', 'custom_post_type')", $where); | |
return $where; | |
} |
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
{ | |
"Seti_tabs_small": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Predawn/predawn.tmTheme", | |
"findreplace_small": true, | |
"font_face": "Hack", | |
"font_size": 14.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": |
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 | |
function my_body_class( $classes ) { | |
if ( wp_is_mobile() ) { | |
$classes[] = 'is-mobile'; | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'my_body_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
/* Kill attachment, search, author, daily archive pages */ | |
add_action('template_redirect', 'custom_template_redirect'); | |
function custom_template_redirect(){ | |
global $wp_query, $post; | |
if (is_author() || is_attachment() || is_day() || is_search() || is_category()) | |
{ | |
$wp_query->set_404(); | |
} | |
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
$.fn.serializeObject = function() { | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); | |
} else { |
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($) { | |
$.fn.countTo = function(options) { | |
// merge the default plugin settings with the custom options | |
options = $.extend({}, $.fn.countTo.defaults, options || {}); | |
// how many times to update the value, and how much to increment the value on each update | |
var loops = Math.ceil(options.speed / options.refreshInterval), | |
increment = (options.to - options.from) / loops; | |
return $(this).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
<img src="small.jpg" srcset="small.jpg [smallwidth]w, large.jpg [largewidth]w" alt="Alt Text" /> |
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
<!-- Twitter --> | |
<a href="https://twitter.com/home?status=Your%20custom%20tweet%20with%20blanks.">Share on Twitter</a> | |
<a href="https://twitter.com/home?status=Check%20out%20this%20article%20by%20@ikalli:%20<?php the_title(); ?> <?php the_permalink(); ?>">Share on Twitter</a> | |
<!-- Facebook --> | |
<a href="https://www.facebook.com/sharer/sharer.php?u=http://mydomain.com/articletitle">Share on Facebook</a> | |
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>">Share on Facebook</a> |
NewerOlder