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 get_oembed( $url, $post_id, $args = array() ) { | |
global $wp_embed; | |
$oembed_url = esc_url( $url ); | |
// Sanitize object_id | |
$post_id = absint( $post_id ); |
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="wt-tags-box" class="wt-widget-bottom" <?php if ( wordtwit_post_box_cookie_check( 'wt-tags' ) ) { echo "style='display:none'"; } ?>> | |
<h4 class="wt-h4"><?php _e( "Hashtags", "wordtwit-pro" ); ?></h4> | |
<div class="wt-automatic"> | |
<ul class="tagchecklist"> | |
<?php if ( wordtwit_post_has_hash_tags() ) { ?> | |
<?php foreach( wordtwit_get_post_hash_tags() as $tag ) { ?> | |
<li id="<?php echo $tag; ?>-hashtag"><a href="#" class="hash-delete">X</a><span><?php echo $tag; ?></span></li> | |
<?php } ?> | |
<?php } ?> | |
</ul> |
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 | |
/** | |
* Dump wp_query data | |
*/ | |
function jw_die(){ | |
global $wp_query; | |
wp_die( '<pre>' . print_r( $wp_query, true ) . '</pre>'); | |
} | |
add_action( 'wp', 'jw_die' ); |
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 | |
// Featured Image for FB Like | |
$featured_image = get_the_post_thumbnail($post->ID); | |
// Get image source | |
if($featured_image) { | |
$doc = new DOMDocument(); | |
$doc->loadHTML($featured_image); | |
$imageTags = $doc->getElementsByTagName('img'); | |
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 | |
/** | |
* Tax Filter | |
* Can be used as a filter, or standalone method. | |
*/ | |
function msft_openness_home_grid_post_tax_filter( $techclasses = array() ) { | |
$post = get_post(); | |
$terms = wp_get_post_terms( $post->ID, 'technology', array( 'fields' => 'slug' ) ); | |
if( empty( $terms ) || is_wp_error( $terms ) ) return $techclasses; | |
foreach ( $terms as $term ) { |
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 while (have_posts()) : the_post(); ?> | |
<?php if (is_paged()) : ?> | |
<?php $postclass = ('regular'); ?> | |
<?php else : ?> | |
<?php $postclass = ($post == $posts[0]) ? 'featured' : 'regular'; ?> | |
<?php endif; ?> | |
<div class="<?php echo $postclass; ?>"> | |
<div class="thumbnail"> | |
<!-- post thumbnail --> | |
<?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?> |
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
--[[ | |
Books LUA file... | |
Originally by Direwolf20 | |
Update by Jay | |
--]] | |
local data = {} | |
rednet.open("right") | |
p = peripheral.wrap("bottom") |
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 | |
/* | |
Plugin Name: WebDev AJAX | |
Plugin URI: http://# | |
Description: Quick AJAX Tutorial | |
Version: 0.1a | |
Author: Anonymous | |
Author URI: http://# | |
*/ |
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
local tArgs = { ... } | |
if (#tArgs ~= 3) then | |
print( "USAGE: gist get GIST_ID PROGRAM_NAME" ) | |
return | |
end | |
local action = tArgs[1] | |
local gist_id = tArgs[2] |
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 cwv3_issue_17( $output ){ | |
$exit_text = get_option( 'cwv3_exit_txt', __( 'Exit', 'cwv3' ) ); | |
$enter_text = get_option( 'cwv3_enter_txt', __( 'Enter', 'cwv3' ) ); | |
$cwv3_denial_title = get_option( 'cwv3_den_title', __( 'Access Denied', 'cwv3' ) ); | |
$cwv3_denial_message = get_option( 'cwv3_den_msg', __( 'You have been denied access to this content. If you feel this is in error, please contact a site administrator.', 'cwv3' ) ); | |
$cwv3_title = get_option( 'cwv3_d_title', __( 'Warning: Explicit Content', 'cwv3' ) ); | |
$cwv3_message = get_option( 'cwv3_d_msg', __( 'The content you are about to view may be considered offensive and/or inappropriate. Furthermore, this content may be considered adult content, if you are not of legal age or are easily offended, you are required to click the exit button.', 'cwv3' ) ); | |
$exit_url = get_option( 'cwv3_exit_link', '#' ); |
OlderNewer