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 | |
namespace Roots\Sage\Rakuten; | |
function assets() { | |
wp_register_script('sage/rakuten', '//tag.rmp.rakuten.com/124013.ct.js', [], null, false); | |
wp_enqueue_script('sage/rakuten'); | |
} | |
add_action('wp_enqueue_scripts', __NAMESPACE__ . '\\assets', 10); |
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 | |
global $wp_query; | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$prev_text = __('Newer Posts'); | |
$next_text = __('Older Posts'); | |
// The magic happens here. First we grab the URL and check it for URL params, |
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
/* | |
* | |
* Bootstrap 3 reset for CF7 | |
* | |
*/ | |
input, textarea { | |
&.wpcf7-form-control { | |
&:extend(.form-control all); | |
&.wpcf7-validates-as-required.wpcf7-not-valid { |
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 clear_jetpack_published() { | |
if(empty($_REQUEST['post'])) { | |
wp_die(__('Invalid post ID or action')); | |
} | |
global $wpdb; | |
$id = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : ''; |
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
1. $ brew install fontforge ttf2eot ttfautohint | |
2. $ brew tap bramstein/webfonttools && brew install sfnt2woff | |
3. Download/clone https://github.com/google/woff2 into any handy dir | |
cd into dir and: | |
$ git submodule init | |
$ git submodule update | |
$ make clean all | |
then: |
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
/* | |
* | |
* Bootstrap 3 input group form for Contact Form 7 | |
* | |
* In the shortcode, you must use html_id="my-id" | |
* or html_class="my-class" to target a specific form | |
* | |
* Actual form sample: | |
* <label for="your-email">Email:</label> | |
* [email* your-email 0/ placeholder "enter your email"] |
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
// Save existing sort parameters | |
Shopify.queryParams = {}; | |
if(location.search.length) { | |
for(var aKeyValue, i = 0, aCouples = location.search.substr(1).split('&'); i < aCouples.length; i++) { | |
aKeyValue = aCouples[i].split('='); | |
if (aKeyValue.length > 1) { | |
Shopify.queryParams[decodeURIComponent(aKeyValue[0])] = decodeURIComponent(aKeyValue[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
function mailpoet_enable_wpmail(){ | |
if(class_exists('WYSIJA')){ | |
$model_config = WYSIJA::get('config','model'); | |
$model_config->save(array('allow_wpmail' => true)); | |
} | |
} | |
add_action('init', 'mailpoet_enable_wpmail'); |
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
'use strict'; | |
module.exports = function(grunt) { | |
// Load all tasks | |
require('load-grunt-tasks')(grunt); | |
// Show elapsed time | |
require('time-grunt')(grunt); | |
var jsFileList = [ | |
'assets/vendor/bootstrap/js/transition.js', | |
'assets/vendor/bootstrap/js/alert.js', |