__( 'Clear','options_framework_theme' ), 'defaultString' => __( 'Default', 'options_framework_theme' ), 'pick' => __( 'Select Color', 'options_framework_theme' ) ); wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n ); } // Enqueue custom option panel JS wp_enqueue_script( 'options-custom', OPTIONS_FRAMEWORK_DIRECTORY . 'js/options-custom.js', array( 'jquery','wp-color-picker' ) ); // Inline scripts from options-interface.php add_action( 'admin_head', 'of_admin_head' ); } function of_admin_head() { // Hook to add custom scripts do_action( 'optionsframework_custom_scripts' ); } /* * Builds out the options panel. * * If we were using the Settings API as it was likely intended we would use * do_settings_sections here. But as we don't want the settings wrapped in a table, * we'll call our own custom optionsframework_fields. See options-interface.php * for specifics on how each individual field is generated. * * Nonces are provided using the settings_fields() * */ if ( !function_exists( 'optionsframework_page' ) ) : function optionsframework_page() { settings_errors(); ?>

Donation and Customization

We will refund the full amount if we are not able to fulfill your customization request.

After payment, send us an email with details of your customization using the form available here. Use the same Paypal email from which you made the payment else include the transaction ID.

Official Theme Demo

$value ) { $input[$id][$key] = false; } } // For a value to be submitted to database it must pass through a sanitization filter if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { $clean[$id] = apply_filters( 'of_sanitize_' . $option['type'], $input[$id], $option ); } } // Hook to run after validation do_action( 'optionsframework_after_validate', $clean ); return $clean; } /** * Display message when options have been saved */ function optionsframework_save_options_notice() { add_settings_error( 'options-framework', 'save_options', __( 'Options saved.', 'options_framework_theme' ), 'updated fade' ); } add_action( 'optionsframework_after_validate', 'optionsframework_save_options_notice' ); /** * Format Configuration Array. * * Get an array of all default values as set in * options.php. The 'id','std' and 'type' keys need * to be defined in the configuration array. In the * event that these keys are not present the option * will not be included in this function's output. * * @return array Rey-keyed options configuration array. * * @access private */ function of_get_default_values() { $output = array(); $config =& _optionsframework_options(); foreach ( (array) $config as $option ) { if ( ! isset( $option['id'] ) ) { continue; } if ( ! isset( $option['std'] ) ) { continue; } if ( ! isset( $option['type'] ) ) { continue; } if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { $output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option ); } } return $output; } /** * Add Theme Options menu item to Admin Bar. */ function optionsframework_adminbar() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'of_theme_options', 'title' => __( 'Theme Options', 'options_framework_theme' ), 'href' => admin_url( 'themes.php?page=options-framework' ) )); } /** * Wrapper for optionsframework_options() * * Allows for manipulating or setting options via 'of_options' filter * For example: * * * add_filter('of_options', function($options) { * $options[] = array( * 'name' => 'Input Text Mini', * 'desc' => 'A mini text input field.', * 'id' => 'example_text_mini', * 'std' => 'Default', * 'class' => 'mini', * 'type' => 'text' * ); * * return $options; * }); * * * Also allows for setting options via a return statement in the * options.php file. For example (in options.php): * * * return array(...); * * * @return array (by reference) */ function &_optionsframework_options() { static $options = null; if ( !$options ) { // Load options from options.php file (if it exists) $location = apply_filters( 'options_framework_location', array('options.php') ); if ( $optionsfile = locate_template( $location ) ) { $maybe_options = require_once $optionsfile; if ( is_array($maybe_options) ) { $options = $maybe_options; } else if ( function_exists( 'optionsframework_options' ) ) { $options = optionsframework_options(); } } // Allow setting/manipulating options via filters $options = apply_filters('of_options', $options); } return $options; } /** * Get Option. * * Helper function to return the theme option value. * If no value has been saved, it returns $default. * Needed because options are saved as serialized strings. */ if ( ! function_exists( 'of_get_option' ) ) { function of_get_option( $name, $default = false ) { $config = get_option( 'optionsframework' ); if ( ! isset( $config['id'] ) ) { return $default; } $options = get_option( $config['id'] ); if ( isset( $options[$name] ) ) { return $options[$name]; } return $default; } }