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
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' ); | |
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' ); | |
define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' ); | |
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); | |
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); | |
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content'); | |
define( 'WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins'); | |
define( 'UPLOADS', 'wp-content/uploads' ); |
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 return_template_part($template, $specialized_name = ''){ | |
ob_start(); | |
get_template_part($template, $specialized_name); | |
return ob_get_clean(); | |
} |
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
SELECT DISTINCT | |
u.ID, | |
u.user_login, | |
u.user_nicename, | |
u.user_email, | |
u.display_name, | |
m2.meta_value as role, | |
GROUP_CONCAT(DISTINCT m.meta_value) AS terms | |
FROM wp_users as u | |
LEFT JOIN wp_usermeta AS m |
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_user_role_tax_intersection($args = array()){ | |
global $wpdb; | |
$default_args = array( | |
'hide_untaxed' => true | |
'terms' => array(), | |
'roles' => array('administrator') | |
); | |
$args = array_merge($default_args, $args); |
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
<!-- OLD --> | |
<article class="widget content-container span12 image-widget"> | |
<header class="content-header"> | |
<h3>Discover ideas. Ask Questions. Be you. Welcome to the Community.</h3> | |
</header> | |
<article class="content-container"> | |
<img src=""> | |
</article> | |
</article> |
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 | |
if(!is_ajax()) { | |
get_template_part('parts/header', 'results-list'); | |
} | |
$post_type = get_query_var('post_type'); | |
$post_type = (is_array($post_type)) ? $post_type[0] : $post_type; | |
loop('results-list', array($post_type, 'post'), 'parts', 'parts/no-results.php'); | |
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
move = !git stash && git checkout $1 && git stash apply stash@{0} && wait |
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
public function register_video_type() { | |
$labels = array( | |
'name' => _x('Video', 'post type general name'), | |
'singular_name' => _x('Video', 'post type singular name'), | |
'add_new' => _x('Add New', 'section'), | |
'add_new_item' => __('Add New Video'), | |
'edit_item' => __('Edit Video'), | |
'new_item' => __('New Video'), | |
'all_items' => __('All Videos'), | |
'view_item' => __('View Video'), |
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
<article class="widget content-container featured-category-questions widget span12"> | |
<header class="content-header"> | |
<h1>Featured Questions</h1> | |
</header> | |
<section class="content-body clearfix"> | |
<section class="span6"> | |
<!-- DROPZONE: FIRST FEATURED QUESTION --> |
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
<article class="content-container featured-post span12"> | |
<header class="content-header"> | |
<h3>Featured Blog Post</h3> | |
</header> | |
<section class="content-body clearfix"> | |
<div class="featured-image span6"> | |
<img src="/wp-content/uploads/2012/07/blogmodule.jpg"> | |
</div> |