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 bit_crp_add_fields( $fields, $post_id ) { | |
global $wpdb; | |
$match_title = strip_tags( get_the_title( $post_id ) ); | |
$match_content = bit_get_the_matcher($post_id); | |
$field_score = ", ( ( MATCH($wpdb->posts.post_title) AGAINST ('%s') *5 ) + ( MATCH($wpdb->postmeta.meta_value) AGAINST ('%s') *10 ) ) as score "; | |
$field_score = $wpdb->prepare( $field_score, $match_title, $match_content ) ; |
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
function custom_override_yoast_breadcrumb_trail( $links ) { | |
global $post; | |
if ( is_singular() ) { | |
$bit_term_key = 0; | |
$bit_parent_page = 0; | |
foreach ( $links as $key => $link ) { | |
// Is there a term / category within a breadcrumn in a singular post |
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 | |
$protocol = $_SERVER["SERVER_PROTOCOL"]; | |
if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0'; | |
header( "$protocol 503 Service Unavailable", true, 503 ); | |
header( 'Content-Type: text/html; charset=utf-8' ); | |
header( 'Retry-After: 600' ); | |
$temp = mysql_error(); | |
$url = curPageURL(); |