Posts'; foreach ( $posts as $post ) { if ( ! is_object( $post ) ) { echo "$post\n"; } else { echo "
$post->ID: $post->post_title
";
echo "$post->post_type – $post->post_status – $post->relevance_score
";
property_exists( $post, 'relevanssi_link' ) && print( "relevanssi_link: $post->relevanssi_link
" );
echo 'the_permalink(): ';
the_permalink( $post->ID );
echo '
get_permalink(): ' . get_permalink( $post );
echo '
'; print_r( $array_value ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r echo ''; } /** * Prints out a string in a preformatted block. * * @param string $str The string to print. * @param string $title The title for the string. */ function relevanssi_debug_string( $str, $title ) { echo '
' . esc_html( $str ) . ''; } /** * Prints out the Relevanssi debug information for a post. * * This function is called by the 'wp' action, so it's executed on every page * load. */ function relevanssi_debug_post() { if ( ! is_singular() || ! relevanssi_is_debug() ) { return; } global $post; echo '
' . relevanssi_generate_db_post_view( $post->ID ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped relevanssi_debug_array( get_post_meta( $post->ID ), 'Post meta' ); exit(); } /** * Generates the debugging view for a post. * * @param int $post_id ID of the post. * * @return string The debugging view in a div container. */ function relevanssi_generate_db_post_view( int $post_id ) { global $wpdb; $element = '
' . esc_html__( 'Post not found', 'relevanssi' ) . '
'; $element .= '' . esc_html( $post_object->post_content ) . '
'; $element .= ''; return $element; } /** * Prints out the Relevanssi debug information for search settings. */ function relevanssi_debug_search_settings() { // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped echo '';
$value = get_option( 'relevanssi_fuzzy' );
echo "relevanssi_fuzzy: $value
";
$value = get_option( 'relevanssi_implicit_operator' );
echo "relevanssi_implicit_operator: $value
";
$value = get_option( 'relevanssi_disable_or_fallback' );
echo "relevanssi_disable_or_fallback: $value
";
$value = get_option( 'relevanssi_throttle' );
echo "relevanssi_throttle: $value
";
$value = get_option( 'relevanssi_throttle_limit' );
echo "relevanssi_throttle_limit: $value
";
$value = get_option( 'relevanssi_default_orderby' );
echo "relevanssi_default_orderby: $value
";
echo '