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
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 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
/*------------------------------------------------------------------------------ | |
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 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
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 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 | |
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 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 | |
/** | |
* WordPress Sandbox | |
* | |
* @package WordPress_Sandbox | |
* @subpackage current-screen-test | |
* @author Jess Green <[email protected]> | |
* @version $Id$ | |
*/ |
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 | |
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 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 | |
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 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 | |
add_filter('posts_request', function ($request, $query){ | |
if( ($query->is_main_query() && $query->is_front_page()) && !$query->is_admin) { | |
return false; | |
} else { | |
return $request; | |
} | |
}, 10, 2); |
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 | |
/** | |
* WordPress Gallery Modification example | |
* Requires output buffering | |
* | |
* @author Jess Green <jgreen @ psy-dreamer.com> | |
* @package Gallery | |
* @version $Id$ | |
*/ |
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 | |
/** | |
* Modify WP_Query to return taxonomy fields in post array | |
* | |
* @author Jess Green <jgreen AT psy-dreamer.com> | |
*/ | |
add_filter('posts_orderby', 'taxonomy_orderby'); | |
add_filter('posts_fields', 'taxonomy_archive_select_fields'); | |
add_filter('posts_join', 'taxonomy_archive_join'); | |