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 | |
/** | |
* Sets a 'wp_debug' cookie for logged in WordPress administrators | |
* In conjunction with a properly configured wp-config.php, it can enable WP_DEBUG mode conditionally. | |
* | |
* @link http://wordpress.stackexchange.com/questions/69549/define-wp-debug-conditionally-for-admins-only-log-errors-append-query-arg-f | |
*/ | |
function set_admin_debug_cookie( $user_login, $user ) { |
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 | |
/** | |
* Limit WordPress media uploader maximum upload file size | |
* Uploading very large images is pointless as they will hardly ever be used at full size. | |
* Crunching larger files takes more memory; larger files take more space too. | |
* | |
* @param mixed $file the uploaded file item to filter | |
* | |
* @return array $file the filtered file item with response |
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 | |
/** | |
* Get Terms used by Post Type | |
* Fetches only terms actually used by posts of a specified post type | |
* | |
* @param string $taxonomy the taxonomy to look for terms | |
* @param string $post_type the post type to match the taxonomy terms found | |
* | |
* @return array the query result (an array of taxonomy terms as objects) |
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
/* Minifies HTML and removes comments (except IE tags and comments within script tags) | |
* | |
* To disable compression of code portions, use '<!--wp-html-compression no compression-->' tag | |
* | |
* @see http://forrst.com/posts/Wordpress_Minify_output_HTML-29q | |
* @see http://www.intert3chmedia.net/2011/12/minify-html-javascript-css-without.html | |
*/ | |
class WP_HTML_Compression | |
{ | |
// Settings |
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
$('#dl-container-id').on('click', 'dt.class-name', function() { | |
$(this).next().toggle(); | |
}); |
NewerOlder