ssl);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close ($ch);
if ($status == 200 || $status == 401) {
return true;
}
}
return false;
}
/**
* Secure URL, if available or the given URL.
*
* @since 2.5
*
* @param string $url Complete URL path with transport.
* @return string Secure or regular URL path.
*/
function atom_service_url_filter($url)
{
if ( url_is_accessable_via_ssl($url) )
return preg_replace( '/^http:\/\//', 'https://', $url );
else
return $url;
}
/**
* Marks a function as deprecated and informs when it has been used.
*
* There is a hook deprecated_function_run that will be called that can be used
* to get the backtrace up to what file and function called the deprecated
* function.
*
* The current behavior is to trigger an user error if WP_DEBUG is defined and
* is true.
*
* This function is to be used in every function in depreceated.php
*
* @package WordPress
* @package Debug
* @since 2.5
* @access private
*
* @uses do_action() Calls 'deprecated_function_run' and passes the function name and what to use instead.
* @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do trigger or false to not trigger error.
*
* @param string $function The function that was called
* @param string $version The version of WordPress that depreceated the function
* @param string $replacement Optional. The function that should have been called
*/
function _deprecated_function($function, $version, $replacement=null) {
do_action('deprecated_function_run', $function, $replacement);
// Allow plugin to filter the output error trigger
if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_function_trigger_error', true )) {
if( !is_null($replacement) )
trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
else
trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $function, $version ) );
}
}
/**
* Marks a file as deprecated and informs when it has been used.
*
* There is a hook deprecated_file_included that will be called that can be used
* to get the backtrace up to what file and function included the deprecated
* file.
*
* The current behavior is to trigger an user error if WP_DEBUG is defined and
* is true.
*
* This function is to be used in every file that is depreceated
*
* @package WordPress
* @package Debug
* @since 2.5
* @access private
*
* @uses do_action() Calls 'deprecated_file_included' and passes the file name and what to use instead.
* @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do trigger or false to not trigger error.
*
* @param string $file The file that was included
* @param string $version The version of WordPress that depreceated the function
* @param string $replacement Optional. The function that should have been called
*/
function _deprecated_file($file, $version, $replacement=null) {
do_action('deprecated_file_included', $file, $replacement);
// Allow plugin to filter the output error trigger
if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_file_trigger_error', true )) {
if( !is_null($replacement) )
trigger_error( sprintf( __('%1$s is deprecated since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) );
else
trigger_error( sprintf( __('%1$s is deprecated since version %2$s with no alternative available.'), $file, $version ) );
}
}
/**
* Is the server running earlier than 1.5.0 version of lighttpd
*
* @since unknown
*
* @return bool Whether the server is running lighttpd < 1.5.0
*/
function is_lighttpd_before_150() {
$server_parts = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] )? $_SERVER['SERVER_SOFTWARE'] : '' );
$server_parts[1] = isset( $server_parts[1] )? $server_parts[1] : '';
return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' );
}
/**
* Does the specified module exist in the apache config?
*
* @since unknown
*
* @param string $mod e.g. mod_rewrite
* @param bool $default The default return value if the module is not found
* @return bool
*/
function apache_mod_loaded($mod, $default = false) {
global $is_apache;
if ( !$is_apache )
return false;
if ( function_exists('apache_get_modules') ) {
$mods = apache_get_modules();
if ( in_array($mod, $mods) )
return true;
} elseif ( function_exists('phpinfo') ) {
ob_start();
phpinfo(8);
$phpinfo = ob_get_clean();
if ( false !== strpos($phpinfo, $mod) )
return true;
}
return $default;
}
/**
* File validates against allowed set of defined rules.
*
* A return value of '1' means that the $file contains either '..' or './'. A
* return value of '2' means that the $file contains ':' after the first
* character. A return value of '3' means that the file is not in the allowed
* files list.
*
* @since 2.6
*
* @param string $file File path.
* @param array $allowed_files List of allowed files.
* @return int 0 means nothing is wrong, greater than 0 means something was wrong.
*/
function validate_file( $file, $allowed_files = '' ) {
if ( false !== strpos( $file, '..' ))
return 1;
if ( false !== strpos( $file, './' ))
return 1;
if (':' == substr( $file, 1, 1 ))
return 2;
if (!empty ( $allowed_files ) && (!in_array( $file, $allowed_files ) ) )
return 3;
return 0;
}
/**
* Determine if SSL is used.
*
* @since 2.6
*
* @return bool True if SSL, false if not used.
*/
function is_ssl() {
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
}
/**
* Whether SSL login should be forced.
*
* @since 2.6
*
* @param string|bool $force Optional.
* @return bool True if forced, false if not forced.
*/
function force_ssl_login($force = '') {
static $forced;
if ( '' != $force ) {
$old_forced = $forced;
$forced = $force;
return $old_forced;
}
return $forced;
}
/**
* Whether to force SSL used for the Administration Panels.
*
* @since 2.6
*
* @param string|bool $force
* @return bool True if forced, false if not forced.
*/
function force_ssl_admin($force = '') {
static $forced;
if ( '' != $force ) {
$old_forced = $forced;
$forced = $force;
return $old_forced;
}
return $forced;
}
/**
* Guess the URL for the site.
*
* Will remove wp-admin links to retrieve only return URLs not in the wp-admin
* directory.
*
* @since 2.6
*
* @return string
*/
function wp_guess_url() {
if ( defined('WP_SITEURL') && '' != WP_SITEURL ) {
$url = WP_SITEURL;
} else {
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return $url;
}
?>
Fatal error: Call to undefined function: require_wp_db() in /mnt/113/sdb/8/c/debats.et.polemiques/wp-settings.php on line 211