init(); // Instantiate the media uploader class $options_framework_media_uploader = new Options_Framework_Media_Uploader; $options_framework_media_uploader->init(); } add_action( 'init', 'optionsframework_init', 20 ); endif; /** * A unique identifier is defined to store the options in the database and reference them from the theme. */ function optionsframework_option_name() { // Change this to use your theme slug return 'accesspress-root'; } /** * 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. * * Not in a class to support backwards compatibility in themes. */ if ( ! function_exists( 'of_get_option' ) ) : function of_get_option( $name, $default = false ) { $option_name = ''; // Gets option name as defined in the theme if ( function_exists( 'optionsframework_option_name' ) ) { $option_name = optionsframework_option_name(); } // Fallback option name if ( '' == $option_name ) { $option_name = get_option( 'stylesheet' ); $option_name = preg_replace( "/\W/", "_", strtolower( $option_name ) ); } // Get option settings from database $options = get_option( $option_name ); // Return specific option if ( isset( $options[$name] ) ) { return $options[$name]; } return $default; } endif;