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
<head> | |
<?php if (is_single() || is_page()) { ?> | |
<meta name="description" content="<?php $s = trim(str_replace("\r\n", " ", htmlspecialchars(strip_tags($post->post_content)))); if(mb_strlen($s,'UTF-8') > 200){$postdescr = mb_substr($s,0,198,'UTF-8').' …';} else{$postdescr = $s;}; echo $postdescr; ?>" /> | |
<meta property="og:description" content="<?php echo $postdescr; ?>" /> | |
<meta property="og:url" content="http://site.com/<?php global $post; echo $post->post_name; ?>" /> <!-- OR --> | |
<meta property="og:url" content="<?php the_permalink() ?>" /> | |
<meta property="og:title" content="Site Name<?php wp_title(); ?>" /> | |
<meta property="og:headline" content="Site Name<?php wp_title(); ?>" /> | |
<?php if (get_post_meta($post->ID, 'image_id', true)){$postimage = wp_get_attachment_image_src(get_post_meta($post->ID, 'image_id', true), 'full'); ?> | |
<link rel="image_src" href="<?php echo $postimage[0]; ?>" /> |
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: WordPress Functionality Plugin | |
* Plugin URI: http://rickrduncan.com/wordpress/functionality-plugin | |
* Description: Core WordPress customizations that are theme independent. | |
* Author: Rick R. Duncan - B3Marketing, LLC | |
* Author URI: http://rickrduncan.com | |
* | |
* | |
* Version: 1.0.0 |
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
<ul class="collapse_list"> | |
<li><a href="#" data-toggle="collapse" data-target="#one">One</a></li> | |
<li><a href="#" data-toggle="collapse" data-target="#two">Two</a></li> | |
</ul> | |
<div class="collapse_content"> | |
<div id="one"> | |
<p>Content for div one</p> | |
</div> |
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 | |
// always paste as plain text | |
foreach ( array( 'tiny_mce_before_init', 'teeny_mce_before_init') as $filter ) { | |
add_filter( $filter, function( $mceInit ) { | |
$mceInit[ 'paste_text_sticky' ] = true; | |
$mceInit[ 'paste_text_sticky_default' ] = true; | |
return $mceInit; | |
}); | |
} |
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 | |
/** | |
* Force cache headers on 404 pages and prevent WordPress from handling 404s. | |
* | |
* @param bool $preempt determines who handles 404s. | |
* @param obj $wp_query global query object. | |
*/ | |
function change_404_headers( $preempt, $wp_query ) { | |
if ( ! is_admin() && ! is_robots() && count( $wp_query->posts ) < 1 ) { | |
header( 'Cache-Control: max-age=30000, must-revalidate' ); |
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( | |
strpos( $_SERVER['HTTP_REFERER'], 'wp-admin' ) === false && | |
strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) !== false | |
) { | |
header( 'Cache-Control: max-age=30000, must-revalidate' ); | |
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', strtotime( '+5000 minutes' ) ) . ' GMT' ); | |
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', strtotime( '-5000 minutes' ) ) . ' GMT' ); | |
header( $_SERVER["SERVER_PROTOCOL"]." 404 Not Found" ); | |
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 | |
// add theme support for | |
add_theme_support('html5'); | |
add_theme_support('menus'); | |
add_theme_support('post-formats', array( | |
'aside', | |
'image', | |
'link', | |
'status' | |
)); |
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
######################################################################################## | |
# bewho's robots.txt file for RadarTek websites | |
######################################################################################## | |
User-agent: * | |
Allow: / | |
Allow: /robots.txt | |
Allow: /*.png* | |
Allow: /*.jpg* | |
Allow: /*.jpeg* |