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 limit_soup( $args ) { | |
$args['post_status'] = array( 'draft', 'future' ); | |
return $args; | |
} | |
add_filter( 'soup_query', 'limit_soup' ); |
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 load_parent_theme_css() { | |
$parentcss = get_template_directory() . '/style.css'; | |
wp_enqueue_style( | |
'parent-theme', | |
get_template_directory_uri() . '/style.css', | |
array(), | |
filemtime( $parentcss ) | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'load_parent_theme_css', 11 ); |
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="top-featured" class="clearfix home-block"> | |
<?php | |
$do_not_duplicate = array(); | |
$my_query = new WP_Query( array( | |
'post_type' => 'features', | |
'posts_per_page' => 1 | |
) ); | |
while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<div class="above-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
#!/usr/bin/env ruby | |
require 'rest-client' | |
require 'json' | |
require 'colorize' | |
$api_token = "xxxxxxxx" | |
$baseUrl = "https://api.digitalocean.com/v2/" | |
$headers = {:content_type => :json, "Authorization" => "Bearer #{$api_token}"} | |
$snapshots_to_keep = 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 | |
function getBitly($url) { | |
$bitly = file_get_contents("http://api.bit.ly/v3/shorten?login=yourbitlyusername&apiKey=yourbitlyAPIkey&longUrl=$url%2F&format=txt"); | |
return $bitly; | |
} | |
?> |
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
[note]evanescent - adjective. having no permanence[/note] |
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 displaydate(){ | |
return date('F jS, Y'); | |
} | |
add_shortcode( 'date', 'displaydate' ); |
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
[not_logged_in] | |
[signup_success] | |
[symple_box color="green" text_align="left" width="50%" float="none"] | |
Your signup was successful! You can login to the client area below. Remember that your username is your email address, and the password is the one that you specified during signup. | |
[/symple_box] | |
[symple_spacing size="20px"] | |
[/signup_success] | |
[login_form] | |
[/not_logged_in] |
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 shortcode to display message | |
function signup_complete_shortcode( $atts, $content = null ) { | |
$signup = get_query_var('signup'); | |
if( $signup == "success" ) { | |
return do_shortcode( $content ); | |
} | |
} | |
add_shortcode( 'signup_success', 'signup_complete_shortcode' ); |
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 // allow query var to be retrieved | |
function add_query_vars_filter( $vars ){ | |
$vars[] = "signup"; | |
return $vars; | |
} | |
add_filter( 'query_vars', 'add_query_vars_filter' ); |