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: Custom Login Error | |
Plugin URI: http://www.thoughtrefinery.com/ | |
Description: Customize error messages on login form | |
Version: 0.1 | |
Author: Nick Ciske | Thought Refinery | |
Author URI: http://www.thoughtrefinery.com/ | |
*/ |
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
#http://www.dzone.com/snippets/redirect-one-domain-another | |
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www.old-domain.com$ [NC] | |
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L] |
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
// http://stackoverflow.com/questions/2936467/parse-youtube-video-id-using-preg-match | |
function my_get_youtube_videoid( $url ){ | |
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) { | |
return $match[1]; | |
} | |
} |
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
// http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct | |
// Doesn't work: | |
// $post_embed = do_shortcode('[embed]your-video-url[/embed]'); | |
// Does work: | |
global $wp_embed; | |
$post_embed = $wp_embed->run_shortcode('[embed]your-video-url[/embed]'); |
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
wrh-889 is the meeting id in this case (from WatchItToo) - change that to show different 'rooms' on different sites (or if you start a new meeting and want to post it). | |
708px wide (page) | |
<IFRAME FRAMEBORDER="0" SCROLLING="NO" MARGINWIDTH="0" MARGINHEIGHT="0" WIDTH="708" HEIGHT="860" src="http://watchitoo.com/iframe.php?id=wrh-889&scale=false&width=708&height=860&layout=12">Browser does not support iframes!</IFRAME> | |
640px wide (front page/status) | |
<IFRAME FRAMEBORDER="0" SCROLLING="NO" MARGINWIDTH="0" MARGINHEIGHT="0" WIDTH="640" HEIGHT="860" src="http://watchitoo.com/iframe.php?id=wrh-889&scale=false&width=640&height=860&layout=12">Browser does not support iframes!</IFRAME> |
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
// http://wordpress.stackexchange.com/questions/9394/getting-all-values-for-a-custom-field-key-cross-post | |
function get_meta_values( $key = '', $type = 'post', $status = 'publish' ) { | |
global $wpdb; | |
if( empty( $key ) ) | |
return; | |
$r = $wpdb->get_col( $wpdb->prepare( " | |
SELECT pm.meta_value FROM {$wpdb->postmeta} pm | |
LEFT JOIN {$wpdb->posts} p ON p.ID = pm.post_id | |
WHERE pm.meta_key = '%s' |
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
<a href="mailto:[email protected]?subject=<?php echo urlencode( get_the_title() ); ?>">LINK TEXT HERE</a> |
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
// Remove Genesis Author Box and load our own | |
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' ); | |
add_action( 'genesis_after_post', 'be_author_box' ); | |
/** | |
* Load Author Boxes | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-post-multiple-authors/ | |
*/ |
OlderNewer