public/wordpress/wp-content/plugins/theme-my-login/admin/settings.php
/**
 * Handle the network settings page.
 *
 * @since 7.0
 */
Handle the network settings page.
Handle the network settings page .
function tml_admin_save_ms_settings() {
	if ( ! tml_is_post_request() ) {
		return;
	}
	$action      = isset( $_REQUEST['action']      ) ? $_REQUEST['action']      : '';
	$option_page = isset( $_REQUEST['option_page'] ) ? $_REQUEST['option_page'] : '';
	if ( ! theme_my_login_admin()->has_page( $option_page ) ) {
		return;
	}
	$whitelist_options = apply_filters( 'whitelist_options', array() );
	if ( ! isset( $whitelist_options[ $option_page ] ) ) {
		wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
	}
	foreach ( $whitelist_options[ $option_page ] as $option ) {
		$option = trim( $option );
		$value  = null;
		if ( isset( $_POST[ $option ] ) ) {
			$value = $_POST[ $option ];
			if ( ! is_array( $value ) ) {
				$value = trim( $value );
			}
			$value = wp_unslash( $value );
		}
		update_site_option( $option, $value );
	}
	tml_flush_rewrite_rules();
	if ( ! count( get_settings_errors() ) ) {
		add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
	}
	set_transient( 'settings_errors', get_settings_errors(), 30 );
	$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );
	wp_redirect( $goback );
	exit;
}
function tml_admin_save_ms_settings ( ) { if ( ! tml_is_post_request ( ) ) { return ; } $ action = isset ( $ _REQUEST [ 'action' ] ) ? $ _REQUEST [ 'action' ] : '' ; $ option_page = isset ( $ _REQUEST [ 'option_page' ] ) ? $ _REQUEST [ 'option_page' ] : '' ; if ( ! theme_my_login_admin ( ) -> has_page ( $ option_page ) ) { return ; } $ whitelist_options = apply_filters ( 'whitelist_options' , array ( ) ) ; if ( ! isset ( $ whitelist_options [ $ option_page ] ) ) { wp_die ( __ ( '<strong>ERROR</strong>: options page not found.' ) ) ; } foreach ( $ whitelist_options [ $ option_page ] as $ option ) { $ option = trim ( $ option ) ; $ value = null ; if ( isset ( $ _POST [ $ option ] ) ) { $ value = $ _POST [ $ option ] ; if ( ! is_array ( $ value ) ) { $ value = trim ( $ value ) ; } $ value = wp_unslash ( $ value ) ; } update_site_option ( $ option , $ value ) ; } tml_flush_rewrite_rules ( ) ; if ( ! count ( get_settings_errors ( ) ) ) { add_settings_error ( 'general' , 'settings_updated' , __ ( 'Settings saved.' ) , 'updated' ) ; } set_transient ( 'settings_errors' , get_settings_errors ( ) , 30 ) ; $ goback = add_query_arg ( 'settings-updated' , 'true' , wp_get_referer ( ) ) ; wp_redirect ( $ goback ) ; exit ; }
Handle the network settings page.
Handle the network settings page .
/* This filter is documented in wp-admin/options.php */