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 | |
/** | |
* ImageSizes | |
* Define and create image sizes | |
* | |
* @todo Add setter method for adding image sizes | |
* | |
* @package ImageSizes | |
* @author Jess Green <jgreen@psy-dreamer.com> | |
* @version $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 image sizes to Insert Into Post list | |
* @see http://goo.gl/CJdR4 | |
* | |
* @param array $sizes | |
* @return array | |
*/ | |
add_filter('image_size_names_choose', 'display_image_size_names', 11, 1); | |
function display_image_size_names($sizes) |
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_filter("mce_external_plugins", "tomjn_mce_external_plugins"); | |
function tomjn_mce_external_plugins($plugin_array){ | |
$plugin_array['typekit'] = get_template_directory_uri().'/typekit.tinymce.js'; | |
return $plugin_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
/*------------------------------------------------------------------------------ | |
Document : print | |
Created on : Mar 22, 2013, 7:08:58 PM | |
Author : Jess Green <jgreen at psy-dreamer.com> | |
Description: Basic print stylesheet for single posts and pages | |
------------------------------------------------------------------------------*/ | |
@page { | |
margin: 1in; | |
} |
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
SELECT DISTINCT * FROM wp_users u | |
LEFT JOIN wp_usermeta um ON u.ID = um.user_id | |
WHERE um.meta_key = 'last_name' ORDER BY um.meta_value ASC; |
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('PLUGIN_PATH', plugin_dir_path(__FILE__)); | |
function my_template_function($id, $size = "", $title = "", $caption = "") | |
{ | |
$template = locate_template(array('my-theme-template.php')); | |
$found_template = ($template == '') | |
? $template |
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 | |
/** | |
* WordPress Sandbox | |
* | |
* @package WordPress_Sandbox | |
* @subpackage current-screen-test | |
* @author Jess Green <jgreen@psy-dreamer.com> | |
* @version $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('gform_field_content', 'add_placeholder_attr', 10, 3); | |
/** | |
* Add a placeholder attribute to text inputs | |
* | |
* @param string $content | |
* @param array $field | |
* @param mixed $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
<?php | |
add_filter('the_title', '_correct_empty_title', 10, 2); | |
/** | |
* Add snarky filler title for posts without titles | |
* | |
* @param string $title WordPress post title | |
* @param int $id WordPress post ID | |
* @return string | |
*/ |
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 | |
/** | |
* Change order parameter | |
* @param WP_Query $query WP query object | |
*/ | |
function mangapress_change_archive_order($query) | |
{ | |
$query->query['order'] = 'ASC'; | |
} | |
add_action('pre_get_posts', 'mangapress_change_archive_order') |