View genesis_cpt_intro_text.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
if( genesis_has_post_type_archive_support() ){ | |
$intro_text = genesis_get_cpt_option( 'intro_text' ); | |
if( !empty( $intro_text ) ){ | |
echo apply_filters( 'genesis_term_intro_text_output', $intro_text ); | |
} | |
} |
View next_prev_pages.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
global $post; | |
$pageID = $post->ID; | |
$args = array( | |
'parent' => 0, | |
'sort_order' => 'ASC', | |
'sort_column' => 'menu_order', | |
); | |
$pagelist = get_pages( $args ); |
View functions.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
add_action( 'after_setup_theme', 'remove_parent_theme_features', 10 ); | |
function remove_parent_theme_features(){ | |
// remove shortcode from parent theme | |
remove_shortcode( 'example' ); | |
// replace with child theme shortcode callback | |
add_shortcode( 'example', 'child_theme_example_callback' ); | |
} |
View rackspace_cloud_sites_gen_ssh_key.sh
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
#!/bin/sh | |
cd .ssh | |
ssh-keygen -trsa -fid_rsa | |
ssh-keyscan -t rsa _REMOTE_REPO_HOST_ >> known_hosts |
View force_ie_edge_rendering.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
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) | |
header('X-UA-Compatible: IE=edge,chrome=1'); |
View table_html.html
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
<table> | |
<caption>Wafer Fab</caption> | |
<colgroup> | |
<col style="width: 25%;" /> | |
<col style="width: 25%;" /> | |
<col style="width: 25%;" /> | |
<col style="width: 25%;" /> | |
</colgroup> | |
<thead> | |
<tr> |
View wordpress_query_functions.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
add_filter( 'query_vars', 'theme_query_vars' ); | |
/** | |
* Adds variables to $wp->query_vars | |
* | |
* @param array $vars Global WP query vars. | |
* @return array Array used in $wp->query_vars. | |
*/ | |
function theme_query_vars( $vars ){ | |
$vars[] = 'qa'; // "query_action" - used for switch in theme_parse_request() | |
return $vars; |
View jquery_ajax_request.js
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
jQuery( function($){ | |
$( 'a.button' ).click( function( e ){ | |
$.post( '?qa=default', { var1: var1, var2: var2 }, function( data ){ | |
console.log( '[jQuery AJAX Request] ' + data.message ); | |
}); | |
e.preventDefault(); | |
}); | |
}); |
View recent_feed_posts_shortcode.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
add_shortcode('mcm_recent_feed_posts', 'shortcode_mcm_recent_feed_posts'); | |
/** | |
* shortcode_mcm_recent_feed_posts() - Retrieves posts from RSS feed | |
* | |
* @see fetch_feed() | |
* | |
* @since 1.0.0 | |
* | |
* @param array $atts { | |
* @type string $url RSS feed URL. |
View impbcopy.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
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
#import <unistd.h> | |
BOOL copy_to_clipboard(NSString *path) | |
{ | |
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage | |
NSImage * image; | |
if([path isEqualToString:@"-"]) | |
{ | |
// http://caiustheory.com/read-standard-input-using-objective-c |
OlderNewer