IP : 3.135.200.168Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
public_html/
wp-admin/
js/
../
./
options.php/
/
<?php /** * Options Management Administration Screen. * * If accessed directly in a browser this page shows a list of all saved options * along with editable fields for their values. Serialized data is not supported * and there is no way to remove options via this page. It is not linked to from * anywhere else in the admin. * * This file is also the target of the forms in core and custom options pages * that use the Settings API. In this case it saves the new option values * and returns the user to their page of origin. * * @package WordPress * @subpackage Administration */
// This is for back compat and will eventually be removed. if ( empty( $option_page ) ) { $option_page = 'options'; } else {
/** * Filters the capability required when using the Settings API. * * By default, the options groups for all registered settings require the manage_options capability. * This filter is required to change the capability required for a certain options page. * * @since 3.2.0 * * @param string $capability The capability used for the page, which is manage_options by default. */ $capability = apply_filters( "option_page_capability_{$option_page}", $capability ); }
if ( ! current_user_can( $capability ) ) { wp_die( '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' . '<p>' . __( 'Sorry, you are not allowed to manage options for this site.' ) . '</p>', 403 ); }
/* * If upload_url_path is not the default (empty), * or upload_path is not the default ('wp-content/uploads' or empty), * they can be edited, otherwise they're locked. */ if ( get_option( 'upload_url_path' ) || get_option( 'upload_path' ) && 'wp-content/uploads' !== get_option( 'upload_path' ) ) { $allowed_options['media'][] = 'upload_path'; $allowed_options['media'][] = 'upload_url_path'; } }
if ( 'update' === $action ) { // We are saving settings sent from a settings page. if ( 'options' === $option_page && ! isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed. $unregistered = true; check_admin_referer( 'update-options' ); } else { $unregistered = false; check_admin_referer( $option_page . '-options' ); }
if ( ! isset( $allowed_options[ $option_page ] ) ) { wp_die( sprintf( /* translators: %s: The options page name. */ __( '<strong>Error:</strong> The %s options page is not in the allowed options list.' ), '<code>' . esc_html( $option_page ) . '</code>' ) ); }
if ( 'options' === $option_page ) { if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) { wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) ); } $options = isset( $_POST['page_options'] ) ? explode( ',', wp_unslash( $_POST['page_options'] ) ) : null; } else { $options = $allowed_options[ $option_page ]; }
/* * Switch translation in case WPLANG was changed. * The global $locale is used in get_locale() which is * used as a fallback in get_user_locale(). */ unset( $GLOBALS['locale'] ); $user_language_new = get_user_locale(); if ( $user_language_old !== $user_language_new ) { load_default_textdomain( $user_language_new ); } } else { add_settings_error( 'general', 'settings_updated', __( 'Settings save failed.' ), 'error' ); }
/* * Handle settings errors and return to options page. */
// If no settings errors were registered add a general 'updated' message. if ( ! count( get_settings_errors() ) ) { add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' ); }
// Redirect back to the settings page that was submitted. $goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() ); wp_redirect( $goback ); exit; }