* @param int $status Status code to use.
* @param string $location The path to redirect to.
*/
$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );
if ( is_string( $x_redirect_by ) ) {
header( "X-Redirect-By: $x_redirect_by" );
}
header( "Location: $location", true, $status );
return true;
* @throws \ErrorException
*/
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
try {
parent::handleError($level, $message, $file, $line, $context);
} catch (Throwable $e) {
if (! apply_filters('acorn/throw_error_exception', true, $e)) {
return false;
}
* @param int $status Status code to use.
* @param string $location The path to redirect to.
*/
$x_redirect_by = apply_filters( 'x_redirect_by', $x_redirect_by, $status, $location );
if ( is_string( $x_redirect_by ) ) {
header( "X-Redirect-By: $x_redirect_by" );
}
header( "Location: $location", true, $status );
return true;
* @param string $fallback_url The fallback URL to use by default.
* @param int $status The HTTP response status code to use.
*/
$location = wp_validate_redirect( $location, apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status ) );
return wp_redirect( $location, $status, $x_redirect_by );
}
endif;
if ( ! function_exists( 'wp_validate_redirect' ) ) :
/**
// 'pagename' is for most permalink types, name is for when the %postname% is used as a top-level field.
if ( 'sitemap-xml' === $query->get( 'pagename' )
|| 'sitemap-xml' === $query->get( 'name' )
) {
wp_safe_redirect( $this->index->get_index_url() );
exit();
}
return $bypass;
}
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
}
// Don't pass the tag name to WP_Hook.
array_shift( $args );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
* @since 4.5.0
*
* @param bool $preempt Whether to short-circuit default header status handling. Default false.
* @param WP_Query $wp_query WordPress Query object.
*/
if ( false !== apply_filters( 'pre_handle_404', false, $wp_query ) ) {
return;
}
// If we've already issued a 404, bail.
if ( is_404() ) {
public function main( $query_args = '' ) {
$this->init();
$this->parse_request( $query_args );
$this->send_headers();
$this->query_posts();
$this->handle_404();
$this->register_globals();
/**
* Fires once the WordPress environment has been set up.
*
* @param string|array $query_vars Default WP_Query arguments.
*/
function wp( $query_vars = '' ) {
global $wp, $wp_query, $wp_the_query;
$wp->main( $query_vars );
if ( ! isset( $wp_the_query ) ) {
$wp_the_query = $wp_query;
}
}
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
ErrorException
|
---|
ErrorException: Cannot modify header information - headers already sent by (output started at /home/belden5/domains/beldenstreet.com/public_html/bh/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php:36) at /home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/pluggable.php:1350 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-content/mu-plugins/src/Roots/Acorn/Bootstrap/HandleExceptions.php:54) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() at header() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/pluggable.php:1350) at wp_redirect() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/pluggable.php:1458) at wp_safe_redirect() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/sitemaps/class-wp-sitemaps.php:240) at WP_Sitemaps->redirect_sitemapxml() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/class-wp-hook.php:307) at WP_Hook->apply_filters() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/plugin.php:189) at apply_filters() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/class-wp.php:671) at WP->handle_404() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/class-wp.php:761) at WP->main() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-includes/functions.php:1310) at wp() (/home/belden5/domains/beldenstreet.com/public_html/bh/wp-blog-header.php:16) at require('/home/belden5/domains/beldenstreet.com/public_html/bh/wp-blog-header.php') (/home/belden5/domains/beldenstreet.com/public_html/bh/index.php:17) |