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
/** | |
* Display time since post was published | |
* | |
* @uses human_time_diff() Return time difference in easy to read format | |
* @uses get_the_time() Get the time the post was published | |
* @uses current_time() Get the current time | |
* | |
* @return string Timestamp since post was published | |
* | |
* @author c.bavota |
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
// Debouncer | |
(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; |
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('json_api_encode', 'json_api_encode_acf'); | |
function json_api_encode_acf($response) | |
{ | |
if (isset($response['posts'])) { | |
foreach ($response['posts'] as $post) { | |
json_api_add_acf($post); // Add specs to each post | |
} |
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
.rpwe-block { | |
ul { | |
list-style: none !important; | |
margin-left: 0 !important; | |
padding-left: 0 !important; | |
} | |
li { | |
border-bottom: 1px solid #eee; | |
margin-bottom: 10px; |
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($) { | |
$('#tag-description').closest('.form-field').remove(); | |
$('#description').closest('.form-field').remove(); | |
})(jQuery); |
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 jw_admin_scripts() { | |
wp_enqueue_script( 'adminscripts', get_stylesheet_directory_uri() . '/assets/js/admin.min.js', array('jquery'), NULL, true ); | |
} | |
add_action( 'admin_enqueue_scripts', 'jw_admin_scripts' ); |
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
/** | |
* Remove default description column from category | |
* | |
*/ | |
function jw_remove_taxonomy_description($columns) | |
{ | |
// only edit the columns on the current taxonomy, replace category with your custom taxonomy (don't forget to change in the filter as well) | |
if ( !isset($_GET['taxonomy']) || $_GET['taxonomy'] != 'category' ) | |
return $columns; |
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
/** | |
* | |
* Filter Yoast SEO Metabox Priority | |
* @author Jacob Wise | |
* @link http://swellfire.com/code/filter-yoast-seo-metabox-priority | |
* | |
*/ | |
add_filter( 'wpseo_metabox_prio', 'jw_filter_yoast_seo_metabox' ); | |
function jw_filter_yoast_seo_metabox() { | |
return 'high'; |
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 | |
/** | |
* Recent Custom Posts | |
* @author Jacob Wise | |
* @link http://swellfire.com/code/recent-custom-posts | |
* | |
* @param string $post_type | |
* @param int $numberposts | |
* @echo string $output |