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
/** | |
* A LessCSS version of the 960 Grid System | |
* | |
* All widths are using percentages making the grid | |
* responsive to most resolutions. | |
* | |
* http://lesscss.org/ | |
* http://960.gs/ | |
*/ |
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
function wpautop_forked($pee, $br = 1) {</code> | |
if ( trim($pee) === '' ) | |
return ''; | |
$pee = $pee . "\n"; // just to make things a little easier, pad the end | |
$pee = preg_replace('| | |
\s* | |
|', "\n\n", $pee); | |
// Space things out a little | |
$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li |
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
// A simple function for checking if a page is using a custom template | |
function using_page_template() | |
{ | |
$templates = get_page_templates(); | |
$result = FALSE; | |
foreach ($templates AS $template_name => $template_filename) | |
{ | |
if ( is_page_template($template_filename) ) | |
{ |
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_action( 'tgmpa_register', 'register_required_plugins' ); | |
// This function is called from the above hook | |
function register_required_plugins() | |
{ | |
// The plugins array allows us to define multiple plugins we want to include. | |
// The commented out example shows how we can include and activation a bundled | |
// plugin zip file in our theme. | |
$plugins = array( | |
/* 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
/** | |
* Wordpress has a known bug with the posts_per_page value and overriding it using | |
* query_posts. The result is that although the number of allowed posts_per_page | |
* is abided by on the first page, subsequent pages give a 404 error and act as if | |
* there are no more custom post type posts to show and thus gives a 404 error. | |
* | |
* This fix is a nicer alternative to setting the blog pages show at most value in the | |
* WP Admin reading options screen to a low value like 1. | |
* | |
*/ |
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_action('customize_controls_print_footer_scripts', function() { | |
?> | |
<script type="text/javascript"> | |
(function($, window) { | |
$(document).ready(function() { | |
var $customisationOptions = $("#customize-theme-controls"); |
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
// Ensures this function is only called after the theme is setup | |
// You could bind to the "init" event if "after_setup_theme" doesn't work well for you. | |
add_action('after_setup_theme', 'create_404_page'); | |
// Insert a privately published page we can query for our 404 page | |
function create_404_page() { | |
// Check if the 404 page exists | |
$page_exists = get_page_by_title( '404' ); |
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_header(); ?> | |
<?php | |
$the_page = null; | |
$errorpageid = get_option( '404pageid', 0 ); | |
if ($errorpageid !== 0) { | |
// Typecast to an integer | |
$errorpageid = (int) $errorpageid; |
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
# BEGIN W3TC Browser Cache | |
<IfModule mod_mime.c> | |
AddType text/css .css | |
AddType text/x-component .htc | |
AddType application/x-javascript .js | |
AddType application/javascript .js2 | |
AddType text/javascript .js3 | |
AddType text/x-js .js4 | |
AddType text/html .html .htm | |
AddType text/richtext .rtf .rtx |
OlderNewer