You appear to be a bot. Output may be restricted
Description
oik plugins settings pageProcessing depends on the button that was pressed. There should only be one!
Selection | Validate? | Perform action | Display check | Display add | Display edit | Display select list |
---|---|---|---|---|---|---|
check_plugin | No | n/a | Yes | – | – | - |
delete_plugin | No | delete selected plugin | – | – | – | Yes |
edit_plugin | No | n/a | – | – | Yes | Yes |
_oik_plugins_edit_settings | Yes | update selected plugin | – | – | Yes | Yes |
_oik_plugins_add_plugin | No | n/a | – | Yes | – | ? |
_oik_plugins_add_settings | Yes | add selected plugin | – | – | – | ? |
Usage
oik_lazy_plugins_server_settings();
Parameters
Returns
voidSource
File name: oik/libs/oik_plugins.phpLines:
1 to 61 of 61
function oik_lazy_plugins_server_settings() { //bw_trace2(); //bw_backtrace(); BW_::oik_menu_header( __( "plugin server settings", null ), "w100pc" ); $validated = false; $check_plugin = bw_array_get( $_REQUEST, "check_plugin", null ); $delete_plugin = bw_array_get( $_REQUEST, "delete_plugin", null ); $edit_plugin = bw_array_get( $_REQUEST, "edit_plugin", null ); /** These plugins override the ones from the list... but why do we need to do it? * Do we have to receive the others in the $_REQUEST **?** * */ $oik_plugins_edit_settings = bw_array_get( $_REQUEST, "_oik_plugins_edit_settings", null ); $oik_plugins_add_settings = bw_array_get( $_REQUEST, "_oik_plugins_add_settings", null ); $oik_plugins_add_plugin = bw_array_get( $_REQUEST, "_oik_plugins_add_plugin", null ); if ( $oik_plugins_add_plugin || $oik_plugins_add_settings ) { $check_plugin = null; $delete_plugin = null; $edit_plugin = null; } if ( $check_plugin ) { BW_::oik_box( NULL, NULL, _x( "Check", "examine", null ) , "oik_plugins_check" ); } if ( $delete_plugin ) { _oik_plugins_delete_settings( $delete_plugin ); } if ( $edit_plugin ) { global $bw_plugin; $bw_plugins = get_option( "bw_plugins" ); $bw_plugin = bw_array_get( $bw_plugins, $edit_plugin, null ); if ( $bw_plugin == null ) { $bw_plugin['server'] = null; $bw_plugin['apikey'] = null; } $bw_plugin['plugin'] = $edit_plugin; bw_trace2( $bw_plugin ); } if ( $oik_plugins_edit_settings ) { $validated = _oik_plugins_settings_validate( false ); } if ( $oik_plugins_add_settings ) { $validated = _oik_plugins_settings_validate( true ); } if ( $oik_plugins_add_plugin || ( $oik_plugins_add_settings && !$validated ) ) { BW_::oik_box( NULL, NULL, __( "Add new", null ), "oik_plugins_add_settings" ); } if ( $edit_plugin || $oik_plugins_edit_settings || $validated ) { BW_::oik_box( null, null, __( "Edit plugin", null ), "oik_plugins_edit_settings" ); } BW_::oik_box( NULL, NULL, __( "Settings", null ), "oik_plugins_settings" ); oik_menu_footer(); bw_flush(); }View on GitHub View on Trac