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
define('WP_DEBUG', true); // false | |
if (WP_DEBUG) { | |
define('WP_DEBUG_LOG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors',0); | |
} |
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
text/html text/plain text/xml text/css text/javascript application/javascript application/xhtml+xml application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp application/x-httpd-eruby image/svg+xml |
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
AddType image/x-icon .ico | |
<IfModule mod_headers.c> | |
# YEAR | |
<FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf)$"> | |
Header set Cache-Control "max-age=29030400" | |
</FilesMatch> | |
# WEEK | |
<FilesMatch "\.(js|css|swf)$"> | |
Header set Cache-Control "max-age=604800" | |
</FilesMatch> |
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 | |
/** | |
* slimline_wp_list_pages function | |
* | |
* Builds include and exclude parameters from a tree before calling | |
* a standard wp_list_pages call. All parameters are the same as the | |
* wp_list_pages functions with one exception listed below. | |
* | |
* @param string $args[ 'include_tree' ] Define a comma-separated list of Parent IDs to be included | |
*/ |
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 | |
/** | |
* slimline_random_orderby function | |
* | |
* Edit SQL ORDER BY statement to randomly order posts after other orders are accounted for. | |
* | |
* @param string $orderby The ORDER BY statement generated by get_posts() | |
* @return string $orderby ORDER BY statement with RAND() set as an additional clause | |
*/ |
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_submit_button", "slimline_gform_google_analytics", 10, 2 ); // add Google Analytics tracking to form submits | |
/** | |
* slimline_gform_google_analytics function | |
* | |
* Adds Google Analytics Tracking for Gravity Forms. | |
* | |
* @global object $wp The WordPress global object. Used for capturing the current request URI {@see http://kovshenin.com/2012/current-url-in-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_filter( 'get_terms_args', 'slimline_get_terms_args', 0 ); // allow extra filtering of terms arguments | |
/** | |
* slimline_get_terms_args filter | |
* | |
* Adds additional filtering to get_terms as needed. | |
* | |
* @param array $args An array of arguments passed from the get_terms() function |
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 | |
/** | |
* Login Functions | |
* | |
* Functions and filters that run only on the WordPress login screen. | |
* | |
* @package Slimline | |
* @subpackage Login | |
*/ |
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( 'get_terms_orderby', 'slimline_get_terms_orderby_name_as_number', 10, 2 ); | |
/** | |
* slimline_get_terms_orderby_name_as_number function | |
* | |
* @param string $orderby The orderby string created from the initial arguments passed through `get_terms` | |
* @param array $args `get_terms` arguments | |
* @return string $orderby Name cast as a number if `orderby` is 'name_as_number', otherwise unchanged | |
*/ | |
function slimline_get_terms_orderby_name_as_number( $orderby, $args ) { |
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
/** | |
* Slimline WordPress Globals | |
* | |
* Javascript conversion of WordPress vars.php needed for when I am using page caching, but still need browser-based body classes, etc. | |
* | |
* @link https://gist.github.com/michaeldozark/17412e3eeda6b391ae8c | |
* @version 0.1.0 | |
*/ | |
/** |
OlderNewer