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 ( $ ) { | |
$( document ).keydown( function( e ) { | |
var url = false; | |
if ( 37 == e.which ) { // Left arrow key code | |
url = $( '.prev a' ).attr( 'href' ); // set right class | |
} | |
else if ( 39 == e.which ) { // Right arrow key code | |
url = $( '.next a' ).attr( 'href' ); // set right class | |
} |
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
<a id="github" href="https://github.com/bueltge"> | |
<span>Fork me on GitHub!</span> | |
<span>Get free lemonade!</span> | |
</a> |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
margin: 5em; | |
} | |
.tooltip { | |
font: normal 11px/17px sans-serif; |
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
/* View and change on http://dabblet.com/gist/1787522 | |
*/ | |
body { | |
margin: 7em 3em; | |
} | |
button, | |
input, | |
select, | |
textarea { |
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
add_action( 'add_meta_boxes', 'do_my_meta_boxes' ); | |
function do_my_meta_boxes( $post_type ) { | |
remove_meta_box( 'my_taxonomydiv', $post_type, 'side' ); | |
add_meta_box( 'my_taxonomydiv', 'My Taxonomy', 'my_meta_box', $post_type, 'side' ); | |
} | |
function my_meta_box( $post, $meta_box ) { | |
$taxonomy = 'my_taxonomy'; | |
$tax = get_taxonomy( $taxonomy ); |
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
// my custom field for the author is meta_key | |
// the field for table, filtering is my_author | |
$my_post_type = 'post'; | |
add_filter( 'manage_edit-' . $my_post_type . '_columns', 'fb_add_columns' ); | |
add_filter( 'manage_posts_custom_column', 'fb_return_custom_columns', 10, 3 ); | |
add_filter( 'manage_edit-' . $my_post_type . '_sortable_columns', 'fb_sortable_columns' ); |
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 | |
/** | |
* Plugin Name: Template Check | |
* Plugin URI: http://wordpress.stackexchange.com/questions/60451/check-for-page-template-on-save-post-hook/ | |
* Description: | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de | |
* License: GPLv3 | |
*/ |
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 | |
/** | |
* Plugin Name: Fix Custom Fields in WP 3.4.2 | |
* Version: 0.0.1 | |
* Plugin URI: http://core.trac.wordpress.org/ticket/21829 | |
* Description: Implements a workaround for adding and updating custom fields in WordPress 3.4.2 | |
* Author: | |
* Author URI: | |
*/ |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: MultilingualPress Add on as example to create a custom language switcher widget. | |
* Description: This is a simple add-on for the MultilingualPress plugin to create a language switcher widget, that is only visible if there are relationship. | |
* Author: Inpsyde GmbH | |
* Author URI: http://inpsyde.com | |
* Version: 2015-10-19 | |
* Text Domain: multilingualpressaddon | |
* Domain Path: /languages | |
* License: GPLv2+ |
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
$main-font-size: 16px; | |
@mixin x-rem ($property, $value) { | |
#{$property}: $value * $main-font-size; | |
#{$property}: #{$value}rem; | |
} | |
.some-class { | |
@include x-rem(font-size, 1.4); |