You appear to be a bot. Output may be restricted
Description
Validates the settings for the theme
Usage
$bool = _oik_themes_settings_validate( $add_theme );
Parameters
- $add_theme
- ( bool ) optional default: 1 – true for add, false for update
Returns
bool true when validSource
File name: oik/libs/oik_themes.phpLines:
1 to 19 of 19
function _oik_themes_settings_validate( $add_theme=true ) { global $bw_theme; $bw_theme['theme'] = sanitize_key( trim( bw_array_get( $_REQUEST, "theme", null ) ) ); $bw_theme['server'] = esc_url_raw( trim( bw_array_get( $_REQUEST, "server", null ) ) ); $bw_theme['apikey'] = sanitize_key( trim( bw_array_get( $_REQUEST, "apikey", null ) ) ); $ok = oik_themes_validate_theme( $bw_theme['theme'] ); // validate the fields and add the settings IF it's OK to add // $add_theme = bw_array_get( $_REQUEST, "_oik_themes_add_settings", false ); if ( $ok ) { if ( $add_theme ) { $ok = _oik_themes_add_settings( $bw_theme ); } else { $ok = _oik_themes_update_settings( $bw_theme ); } } return( $ok ); }View on GitHub View on Trac