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 | |
/** | |
* Image shortcode callback | |
* | |
* Enables the [kovshenin_image] shortcode, pseudo-TimThumb but creates resized and cropped image files | |
* from existing media library entries. Usage: | |
* [kovshenin_image src="http://example.org/wp-content/uploads/2012/03/image.png" width="100" height="100"] | |
* | |
* @uses image_make_intermediate_size | |
*/ |
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 | |
/* | |
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes. | |
Author: Stephen Harris | |
Author URI: http://www.stephenharris.info | |
*/ | |
/* Copyright 2011 Stephen Harris (contact@stephenharris.info) | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by |
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 | |
/** | |
* _s Theme Options | |
* | |
* @package _s | |
* @since _s 1.0 | |
*/ | |
/** | |
* Register the form setting for our _s_options array. |
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 | |
/***** | |
All new versions will be posted at | |
https://github.com/rmccue/Rotor_WPPlugin | |
Please use that repository instead of this Gist. | |
******/ |
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
// Must be in an external file or loaded at the end of wp_footer() | |
jQuery(document).ajaxSend(function(e, x, a) { | |
var awesome = 1; | |
a.data += '&' + jQuery.param( {is_awesome: awesome} ); | |
}); |
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: Post Meta Revisions | |
Description: Revisions for the 'foo' post meta field | |
Version: 1.0 | |
Author: John Blackbourn | |
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress | |
*/ | |
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 | |
add_action( 'wp_print_styles', 'child_add_ie7_style_sheet', 200 ); | |
/** | |
* Enqueue an IE-specific style sheet (for all browsers). | |
* | |
* @author Gary Jones | |
* @link https://garyjones.io/ie-conditional-style-sheets-wordpress | |
*/ | |
function child_add_ie7_style_sheet() { |
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 | |
/** | |
* Author Endpoints Example | |
* | |
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License as | |
* published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. |
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: MMC Parks and Features | |
* Description: This plugin demonstrates how to route parent/child URLs like http://example.com/parks/yosemite/half-dome/in WordPress 3.3 | |
* Author: Mike Schinkel | |
* Author URL: http://about.me/mikeschinkel | |
* Notes: | |
* To answer http://lists.automattic.com/pipermail/wp-hackers/2011-November/041486.html | |
* Assumes a metabox that sets $post->post_parent field for a park feature with it's park's $post->ID. | |
* |
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 | |
add_filter ( 'authenticate', 'rkv_login_options', 20, 3 ); | |
function rkv_login_options( $user, $username, $password ) { | |
if ( is_email( $username ) ) { | |
$user = get_user_by( 'email', $username ); | |
} | |
if ( $user ) { |