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
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType text/js "access plus 1 month" |
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
/** WP Debug Settings */ | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_LOG', true); | |
define( 'WP_DEBUG_DISPLAY', false ); |
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
/** Set alt, title and description for image uploads */ | |
function set_image_meta_upload( $post_ID ) { | |
if ( wp_attachment_is_image( $post_ID ) ) { | |
$my_image_title = get_post( $post_ID )->post_title; | |
$my_image_title = preg_replace( '%\s*[-_\s]+\s*%', ' ', | |
$my_image_title ); | |
$my_image_title = ucwords( strtolower( $my_image_title ) ); | |
$my_image_meta = array( | |
'ID' => $post_ID, | |
'post_title' => $my_image_title, |
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
/** | |
* WPGulp Configuration File | |
* | |
* 1. Edit the variables as per your project requirements. | |
* 2. In paths you can add <<glob or array of globs>>. | |
* | |
* @package WPGulp | |
*/ | |
module.exports = { |
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
{ | |
"name": "[[ Project Name ]]", | |
"description": "A WPGulp based project.", | |
"version": "1.0.0", | |
"author": "Link Digital", | |
"repository": { | |
"type": "git", | |
"url": "[[ Git Repo ]]" | |
}, | |
"license": "MIT", |
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
<div id="wrapper"> | |
<h1>This is the primary heading and there should only be one of these per page</h1> | |
<p>A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits.</p> | |
<ul> | |
<li>This is a list item</li> | |
<li>So is this - there could be more</li> | |
<li>Make sure to style list items to: | |
<ul> | |
<li>Not forgetting child list items</li> | |
<li>Not forgetting child list items</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
/** | |
* Gulpfile. | |
* | |
* Gulp with WordPress. | |
* | |
* Implements: | |
* 1. Live reloads browser with BrowserSync. | |
* 2. CSS: Sass to CSS conversion, error catching, Autoprefixing, Sourcemaps, | |
* CSS minification, and Merge Media Queries. | |
* 3. JS: Concatenates & uglifies Vendor and Custom JS files. |
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 get_woo_variations() { | |
global $product; | |
return $product->get_available_variations(); | |
} | |
add_action( 'woocommerce_after_shop_loop_item', 'amend_add_to_cart_buttons', 1 ); | |
function amend_add_to_cart_buttons() { | |
if( is_product_category() || is_shop()) { | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); |
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
//Checking div for a shorcode and doing work to hide everything after it | |
//Set Some naming and labels | |
let wrapOptions = { | |
moreButtonText: 'Show More', | |
lessButtonText: 'Show Less', | |
buttonClass: 'readMoreButton', | |
wrapperClass: 'wrapAllText', | |
wrapperClosedClass: 'wrapAllText__hidden', |
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 function console($arr) { | |
<script type="text/javascript"> | |
var arr = <?php echo json_encode($arr); ?>; | |
console.log(arr); | |
</script> | |
} | |
?> |
OlderNewer