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
// front end | |
function custom_front_scripts() { | |
wp_enqueue_style( 'front-css', plugins_url('/lib/css/front-css.css', __FILE__), array(), null, 'all' ); | |
wp_enqueue_script( 'front-init', plugins_url('/lib/js/front.init.js', __FILE__) , array('jquery'), null, true ); | |
} | |
add_action('wp_enqueue_scripts', 'custom_front_scripts' ); | |
// back end | |
function custom_admin_scripts() { |
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 | |
/** | |
* WooCommerce Upgrade Test Suite | |
* | |
* A set of acceptance tests for a standard WooCommerce store. | |
* | |
* https://gist.github.com/norcross/4d45f1902bfb2f1f4cf79997a47d9d03 | |
*/ | |
// It'll error out sometimes without this ¯\_(ツ)_/¯ . |
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 | |
/** | |
* Devin CSV Export | |
* | |
* Contains our export processing | |
*/ | |
/* | |
Copyright 2015 Reaktiv Studios | |
This program is free software; you can redistribute it and/or modify |
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_action ( 'init', 'rkv_adminbar_front_kill' ); | |
add_action ( 'admin_init', 'rkv_adminbar_back_kill' ); | |
function rkv_adminbar_front_kill() { | |
show_admin_bar( false ); | |
wp_dequeue_script('admin-bar'); | |
wp_dequeue_style('admin-bar'); |
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
/* | |
Usage (on the HTML tab, not the visual editor) | |
[email address="you@emailcompany.com"] | |
*/ | |
function emailbot_ssc($attr) { | |
extract( shortcode_atts( array( | |
'address' => '', | |
), $attr ) ); |
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
body { | |
background-color: #FFFFFF; | |
color: #111; | |
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; | |
font-size: 14px; | |
line-height: 20px; | |
margin: 0; | |
} | |
#wrapper { | |
width: 500px; |
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 | |
/** | |
* AJAX call for parsing HTML | |
* | |
*/ | |
public function parse_html() { | |
// get content from textarea | |
$text = $_POST['content']; |
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 cpt_feed_request($qv) { | |
if (isset($qv['feed'])) | |
$qv['post_type'] = get_post_types(); | |
return $qv; | |
} | |
add_filter('request', 'cpt_feed_request'); |
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( 'the_content', 'rkv_force_https_images', 10 ); | |
/** | |
* check image URLs and force https on them | |
* | |
* @param [type] $content [description] | |
*/ | |
function rkv_force_https_images( $content ) { | |
return str_replace( 'src="http://css-tricks.com', 'src="https://css-tricks.com', $content ); |
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 rkv_imagelink_setup() { | |
$image_set = get_option( 'image_default_link_type' ); | |
if ($image_set !== 'none') { | |
update_option('image_default_link_type', 'none'); | |
} | |
} | |
add_action('admin_init', 'rkv_imagelink_setup', 10); |