/home
/gzxgloe
/www
/wp-includes
/pluggable.php
$location = wp_sanitize_redirect( $location );
if ( ! $is_IIS && 'cgi-fcgi' !== PHP_SAPI ) {
status_header( $status ); // This causes problems on IIS and some FastCGI setups.
}
/**
* Filters the X-Redirect-By header.
*
* Allows applications to identify themselves when they're doing a redirect.
*
* @since 5.1.0
*
* @param string|false $x_redirect_by The application doing the redirect or false to omit the header.
* @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;
}
endif;
if ( ! function_exists( 'wp_sanitize_redirect' ) ) :
/**
* Sanitizes a URL for use in a redirect.
*
* @since 2.3.0
*
* @param string $location The path to redirect to.
* @return string Redirect-sanitized URL.
*/
function wp_sanitize_redirect( $location ) {
// Encode spaces.
$location = str_replace( ' ', '%20', $location );
Arguments
"Cannot modify header information - headers already sent by (output started at /home/gzxgloe/www/wp-content/plugins/plugins-load-order/plugins-load-order.php:446)"
/home
/gzxgloe
/www
/wp-includes
/pluggable.php
$location = wp_sanitize_redirect( $location );
if ( ! $is_IIS && 'cgi-fcgi' !== PHP_SAPI ) {
status_header( $status ); // This causes problems on IIS and some FastCGI setups.
}
/**
* Filters the X-Redirect-By header.
*
* Allows applications to identify themselves when they're doing a redirect.
*
* @since 5.1.0
*
* @param string|false $x_redirect_by The application doing the redirect or false to omit the header.
* @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;
}
endif;
if ( ! function_exists( 'wp_sanitize_redirect' ) ) :
/**
* Sanitizes a URL for use in a redirect.
*
* @since 2.3.0
*
* @param string $location The path to redirect to.
* @return string Redirect-sanitized URL.
*/
function wp_sanitize_redirect( $location ) {
// Encode spaces.
$location = str_replace( ' ', '%20', $location );
Arguments
"X-Redirect-By: WordPress"
/home
/gzxgloe
/www
/wp-includes
/pluggable.php
* @return bool False if the redirect was canceled, true otherwise.
*/
function wp_safe_redirect( $location, $status = 302, $x_redirect_by = 'WordPress' ) {
// Need to look at the URL the way it will end up in wp_redirect().
$location = wp_sanitize_redirect( $location );
/**
* Filters the redirect fallback URL for when the provided redirect is not safe (local).
*
* @since 4.3.0
*
* @param string $fallback_url The fallback URL to use by default.
* @param int $status The HTTP response status code to use.
*/
$fallback_url = apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status );
$location = wp_validate_redirect( $location, $fallback_url );
return wp_redirect( $location, $status, $x_redirect_by );
}
endif;
if ( ! function_exists( 'wp_validate_redirect' ) ) :
/**
* Validates a URL for use in a redirect.
*
* Checks whether the $location is using an allowed host, if it has an absolute
* path. A plugin can therefore set or remove allowed host(s) to or from the
* list.
*
* If the host is not allowed, then the redirect is to $fallback_url supplied.
*
* @since 2.8.1
*
* @param string $location The redirect to validate.
* @param string $fallback_url The value to return if $location is not allowed.
* @return string Redirect-sanitized URL.
*/
function wp_validate_redirect( $location, $fallback_url = '' ) {
Arguments
"https://www.ecolemegagic.com/tous-les-tutos/vip/"
302
"WordPress"
/home
/gzxgloe
/www
/wp-content
/plugins
/sfwd-lms
/includes
/ld-misc-functions.php
* @param string $location The URL to redirect the user to.
* @param int $status The HTTP Status to set. Default 302.
* @param string $context Unique string provided by the caller to help filter conditions.
*/
if ( apply_filters( 'learndash_safe_redirect_nocache_header', true, $location, $status, $context ) ) {
nocache_headers();
}
/**
* Filters to override using the WordPress function wp_safe_redirect().
*
* @since 3.3.0.2
*
* @param bool true True to call wp_safe_redirect().
* @param string $location The URL to redirect the user to.
* @param int $status The HTTP Status to set. Default 302.
* @param string $context Unique string provided by the caller to help filter conditions.
*/
if ( apply_filters( 'learndash_use_wp_safe_redirect', LEARNDASH_USE_WP_SAFE_REDIRECT, $location, $status, $context ) ) {
$redirect_status = wp_safe_redirect( $location, $status );
} else {
$redirect_status = wp_redirect( $location, $status ); //phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
}
if ( $redirect_status ) {
if ( $exit ) {
exit;
}
}
// Only here if $exit is not true.
return $redirect_status;
}
}
return false;
}
/**
* Utility function to determine if we are using the Select2 library on selects.
*
Arguments
"https://www.ecolemegagic.com/tous-les-tutos/vip/"
302
/home
/gzxgloe
/www
/wp-content
/plugins
/sfwd-lms
/includes
/course
/ld-course-user-functions.php
* @param int $post_id The ID of the resource that belongs to a course.
*
* @return boolean|void Returns true if the user has access to the course.
*/
function sfwd_lms_access_redirect( $post_id ) {
$access = sfwd_lms_has_access( $post_id );
if ( true === $access ) {
return true;
}
$link = get_permalink( learndash_get_course_id( $post_id ) );
/**
* Filters the course redirect URL after checking access.
*
* @param string $link The course URL a user is redirected to it has access.
* @param int $post_id Post ID.
*/
$link = apply_filters( 'learndash_access_redirect', $link, $post_id );
if ( ! empty( $link ) ) {
learndash_safe_redirect( $link );
}
}
/**
* Checks whether the user's access to the course is expired.
*
* @since 2.1.0
*
* @param int $course_id Course ID.
* @param int $user_id User ID.
*
* @return bool Returns true if the access is expired otherwise false.
*/
function ld_course_access_expired( $course_id, $user_id ) {
$course_access_upto = ld_course_access_expires_on( $course_id, $user_id );
if ( empty( $course_access_upto ) ) {
return false;
} else {
if ( time() >= $course_access_upto ) {
Arguments
"https://www.ecolemegagic.com/tous-les-tutos/vip/"
/home
/gzxgloe
/www
/wp-content
/plugins
/sfwd-lms
/includes
/class-ld-cpt-instance.php
return;
}
if ( $post_type === $this->post_type ) {
if ( is_robots() ) {
/**
* Display the robots.txt file content. (wp core action)
*
* @since 2.1.0
*
* @link https://codex.wordpress.org/Function_Reference/do_robots
*/
do_action( 'do_robots' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WordPress Core hook
} elseif ( is_trackback() ) {
include ABSPATH . 'wp-trackback.php';
} elseif ( ! empty( $wp->query_vars['name'] ) ) {
// single.
if ( in_array( $post_type, learndash_get_post_types( 'course_steps' ), true ) ) {
global $post;
sfwd_lms_access_redirect( $post->ID );
$course_id = learndash_get_course_id( $post->ID );
if ( ! empty( $course_id ) ) {
learndash_course_exam_challenge_redirect( $course_id );
}
} elseif ( learndash_get_post_type_slug( 'course' ) === $post_type ) {
learndash_course_exam_challenge_redirect( $post->ID );
} elseif ( learndash_get_post_type_slug( 'exam' ) === $post_type ) {
learndash_exam_challenge_view_permission( $post->ID );
}
}
}
} // end template_redirect_access()
/**
* Amend $wp_query based on what content user is viewing
*
* If archive for post type of this instance, set order and posts per page
* If post archive, don't display certificates
*
* @since 2.1.0
Arguments
/home
/gzxgloe
/www
/wp-includes
/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// 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, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
/home
/gzxgloe
/www
/wp-includes
/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
Arguments
/home
/gzxgloe
/www
/wp-includes
/plugin.php
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
Arguments
/home
/gzxgloe
/www
/wp-includes
/template-loader.php
<?php
/**
* Loads the correct template based on the visitor's url
*
* @package WordPress
*/
if ( wp_using_themes() ) {
/**
* Fires before determining which template to load.
*
* @since 1.5.0
*/
do_action( 'template_redirect' );
}
/**
* Filters whether to allow 'HEAD' requests to generate content.
*
* Provides a significant performance bump by exiting before the page
* content loads for 'HEAD' requests. See #14348.
*
* @since 3.5.0
*
* @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
*/
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {
exit;
}
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) {
/**
* Fired when the template loader determines a robots.txt request.
*
* @since 2.1.0
*/
do_action( 'do_robots' );
return;
} elseif ( is_favicon() ) {
/**
Arguments
/home
/gzxgloe
/www
/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// 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';
}
Arguments
"/home/gzxgloe/www/wp-includes/template-loader.php"
/home
/gzxgloe
/www
/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Arguments
"/home/gzxgloe/www/wp-blog-header.php"