save_options(); arras_update_options(); echo '

' . __('Your settings have been saved to the database.', 'arras') . '

'; } if ( isset($_REQUEST['reset']) ) { delete_option('arras_options'); arras_flush_options(); echo '

' . __('Your settings have been reverted to the defaults.', 'arras') . '

'; } if ( isset($_REQUEST['clearcache']) ) { $cache_location = get_template_directory() . '/library/cache'; if ( !$dh = @opendir($cache_location) ) return false; while ( false !== ($obj = readdir($dh)) ) { if($obj == '.' || $obj == '..') continue; @unlink(trailingslashit($cache_location) . $obj); } closedir($dh); echo '

' . __('Thumbnail cache has been cleared.', 'arras') . '

'; } $nonce = wp_create_nonce('arras-admin'); // create nonce token for security include 'templates/options_page.php'; } } function arras_admin_scripts() { wp_enqueue_script('jquery-1.3.2', get_template_directory_uri() . '/js/jquery-1.3.2.min.js'); wp_enqueue_script('jquery-ui-tabs', null, 'jquery-ui-core'); wp_enqueue_script('jquery-ui-sortable', null, 'jquery-ui-core'); wp_enqueue_script('farbtastic', get_template_directory_uri() . '/js/farbtastic.js'); wp_enqueue_script('arras-admin-js', get_template_directory_uri() . '/js/admin.js'); } function arras_admin_styles() { ?>