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_filter( 'genesis_attr_content', 'yoast_schema_empty', 20 ); | |
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 ); | |
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 ); | |
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 ); | |
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 ); | |
/** | |
* We'll use the post info output to add more meta data about the event. |
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
location /redirect/ { | |
rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last; | |
} |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^index\.php$ - [L] | |
RewriteRule (.*) ./index.php?id=$1 [L] | |
</IfModule> |
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 | |
/** | |
* Example function description | |
* | |
* @since {Next WordPress SEO Version} | |
* | |
* @param {array, string, int, objext} {$variable_name} {Short description} | |
* @param {array, string, int, objext} {$variable_name} {Short description} | |
* |
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 | |
/** | |
* Check whether a comment author is using a valid gravatar email address, if he/she is, approve the comment. | |
* | |
* @param bool $approved Whether or not the comment is approved alreadt. | |
* @param array $comment The entire comment object. | |
* | |
* @return bool $approved | |
*/ |
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 fix_content_input( $content, $vid ) { | |
$post = get_post( $vid['post_id'] ); | |
if ( !empty( $post->post_excerpt ) ) | |
$content = "\n" . $post->post_excerpt . "\n" . $content; | |
return $content; | |
} | |
add_filter( 'wpseo_video_index_content', 'fix_content_input', 10, 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 fix_content_input( $content, $vid ) { | |
$post = get_post( $vid['post_id'] ); | |
if ( !empty( $post->post_excerpt ) ) { | |
$content = "\n" . 'http://youtube.com/v/'. $post->post_excerpt . "\n" . $content; | |
} | |
return $content; | |
} | |
add_filter( 'wpseo_video_index_content', 'fix_content_input', 10, 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
# Rewrites for WordPress SEO XML Sitemap | |
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last; | |
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last; |
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 you have a function with a default argument: | |
function bla ( $echo = true ) { | |
if ( !$echo ) | |
return 'bla'; | |
else | |
echo 'bla'; | |
} |