first commit
This commit is contained in:
113
wp-content/themes/nuzi/admin/functions/functions.admin.php
Normal file
113
wp-content/themes/nuzi/admin/functions/functions.admin.php
Normal file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* SMOF Admin
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage SMOF
|
||||
* @since 1.4.0
|
||||
* @author Syamil MJ
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Head Hook
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_head() { do_action( 'of_head' ); }
|
||||
|
||||
/**
|
||||
* Add default options upon activation else DB does not exist
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_option_setup()
|
||||
{
|
||||
|
||||
if (!of_get_options())
|
||||
{
|
||||
global $of_options, $options_machine;
|
||||
$options_machine = new Options_Machine($of_options);
|
||||
of_save_options($options_machine->Defaults);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change activation message
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function optionsframework_admin_message() {
|
||||
|
||||
//Tweaked the message on theme activate
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(function(){
|
||||
|
||||
var message = '<p>This theme comes with an <a href="<?php echo admin_url('admin.php?page=optionsframework'); ?>">options panel</a> to configure settings. This theme also supports widgets, please visit the <a href="<?php echo admin_url('widgets.php'); ?>">widgets settings page</a> to configure them.</p>';
|
||||
jQuery('.themes-php #message2').html(message);
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get header classes
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_get_header_classes_array()
|
||||
{
|
||||
global $of_options;
|
||||
|
||||
foreach ($of_options as $value)
|
||||
{
|
||||
if ($value['type'] == 'heading')
|
||||
$hooks[] = str_replace(' ','',strtolower($value['name']));
|
||||
}
|
||||
|
||||
return $hooks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get options from the database and process them with the load filter hook.
|
||||
*
|
||||
* @author Jonah Dahlquist
|
||||
* @since 1.4.0
|
||||
* @return array
|
||||
*/
|
||||
function of_get_options($key = OPTIONS) {
|
||||
|
||||
$data = get_option($key);
|
||||
$data = apply_filters('of_options_after_load', $data);
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Save options to the database after processing them
|
||||
*
|
||||
* @param $data Options array to save
|
||||
* @author Jonah Dahlquist
|
||||
* @since 1.4.0
|
||||
* @uses update_option()
|
||||
* @return void
|
||||
*/
|
||||
function of_save_options($data, $key=OPTIONS)
|
||||
{
|
||||
$data = apply_filters('of_options_before_save', $data);
|
||||
update_option($key, $data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For use in themes
|
||||
*
|
||||
* @since forever
|
||||
*/
|
||||
|
||||
$data = of_get_options();
|
||||
$smof_data = of_get_options();
|
71
wp-content/themes/nuzi/admin/functions/functions.filters.php
Normal file
71
wp-content/themes/nuzi/admin/functions/functions.filters.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SMOF Option filters
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage SMOF
|
||||
* @since 1.4.0
|
||||
* @author Jonah Dahlquist
|
||||
*/
|
||||
|
||||
/**
|
||||
* Filter URLs from uploaded media fields and replaces them with keywords.
|
||||
* This is to keep from storing the site URL in the database to make
|
||||
* migrations easier.
|
||||
*
|
||||
* @since 1.4.0
|
||||
* @param $data Options array
|
||||
* @return array
|
||||
*/
|
||||
function of_filter_save_media_upload($data) {
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$data[$key] = str_replace(
|
||||
array(
|
||||
site_url('', 'http'),
|
||||
site_url('', 'https'),
|
||||
),
|
||||
array(
|
||||
'[site_url]',
|
||||
'[site_url_secure]',
|
||||
),
|
||||
$value
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
add_filter('of_options_before_save', 'of_filter_save_media_upload');
|
||||
|
||||
/**
|
||||
* Filter URLs from uploaded media fields and replaces the site URL keywords
|
||||
* with the actual site URL.
|
||||
*
|
||||
* @since 1.4.0
|
||||
* @param $data Options array
|
||||
* @return array
|
||||
*/
|
||||
function of_filter_load_media_upload($data) {
|
||||
if(!empty($data)) {
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$data[$key] = str_replace(
|
||||
array(
|
||||
'[site_url]',
|
||||
'[site_url_secure]',
|
||||
),
|
||||
array(
|
||||
site_url('', 'http'),
|
||||
site_url('', 'https'),
|
||||
),
|
||||
$value
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
add_filter('of_options_after_load', 'of_filter_load_media_upload');
|
253
wp-content/themes/nuzi/admin/functions/functions.interface.php
Normal file
253
wp-content/themes/nuzi/admin/functions/functions.interface.php
Normal file
@ -0,0 +1,253 @@
|
||||
<?php
|
||||
/**
|
||||
* SMOF Interface
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage SMOF
|
||||
* @since 1.4.0
|
||||
* @author Syamil MJ
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Admin Init
|
||||
*
|
||||
* @uses wp_verify_nonce()
|
||||
* @uses header()
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function optionsframework_admin_init()
|
||||
{
|
||||
// Rev up the Options Machine
|
||||
global $of_options, $options_machine;
|
||||
$options_machine = new Options_Machine($of_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Options page
|
||||
*
|
||||
* @uses add_theme_page()
|
||||
* @uses add_action()
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function optionsframework_add_admin() {
|
||||
|
||||
$of_page = add_menu_page( THEMENAME, 'Theme Options', 'edit_theme_options', 'optionsframework', 'optionsframework_options_page');
|
||||
|
||||
// Add framework functionaily to the head individually
|
||||
add_action("admin_print_scripts-$of_page", 'of_load_only');
|
||||
add_action("admin_print_styles-$of_page",'of_style_only');
|
||||
add_action( "admin_print_styles-$of_page", 'optionsframework_mlu_css', 0 );
|
||||
add_action( "admin_print_scripts-$of_page", 'optionsframework_mlu_js', 0 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build Options page
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function optionsframework_options_page(){
|
||||
|
||||
global $options_machine;
|
||||
|
||||
/*
|
||||
//for debugging
|
||||
|
||||
$smof_data = of_get_options();
|
||||
print_r($smof_data);
|
||||
|
||||
*/
|
||||
|
||||
include_once( ADMIN_PATH . 'front-end/options.php' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Options page
|
||||
*
|
||||
* @uses wp_enqueue_style()
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_style_only(){
|
||||
wp_enqueue_style('admin-style', ADMIN_DIR . 'assets/css/admin-style.css');
|
||||
wp_enqueue_style('color-picker', ADMIN_DIR . 'assets/css/colorpicker.css');
|
||||
wp_enqueue_style('jquery-ui-custom-admin', ADMIN_DIR .'assets/css/jquery-ui-custom.css');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Options page
|
||||
*
|
||||
* @uses add_action()
|
||||
* @uses wp_enqueue_script()
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_load_only()
|
||||
{
|
||||
add_action('admin_head', 'smof_admin_head');
|
||||
|
||||
wp_enqueue_script('jquery-ui-core');
|
||||
wp_enqueue_script('jquery-ui-sortable');
|
||||
wp_enqueue_script('jquery-ui-slider');
|
||||
wp_enqueue_script('jquery-input-mask', ADMIN_DIR .'assets/js/jquery.maskedinput-1.2.2.js', array( 'jquery' ));
|
||||
wp_enqueue_script('tipsy', ADMIN_DIR .'assets/js/jquery.tipsy.js', array( 'jquery' ));
|
||||
wp_enqueue_script('color-picker', ADMIN_DIR .'assets/js/colorpicker.js', array('jquery'));
|
||||
wp_enqueue_script('ajaxupload', ADMIN_DIR .'assets/js/ajaxupload.js', array('jquery'));
|
||||
wp_enqueue_script('cookie', ADMIN_DIR . 'assets/js/cookie.js', 'jquery');
|
||||
wp_enqueue_script('smof', ADMIN_DIR .'assets/js/smof.js', array( 'jquery' ));
|
||||
}
|
||||
|
||||
/**
|
||||
* Front end inline jquery scripts
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function smof_admin_head() { ?>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
jQuery.noConflict();
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
// COLOR Picker
|
||||
$('.colorSelector').each(function(){
|
||||
var Othis = this; //cache a copy of the this variable for use inside nested function
|
||||
|
||||
$(this).ColorPicker({
|
||||
color: '<?php if(isset($color)) echo $color; ?>',
|
||||
onShow: function (colpkr) {
|
||||
$(colpkr).fadeIn(500);
|
||||
return false;
|
||||
},
|
||||
onHide: function (colpkr) {
|
||||
$(colpkr).fadeOut(500);
|
||||
return false;
|
||||
},
|
||||
onChange: function (hsb, hex, rgb) {
|
||||
$(Othis).children('div').css('backgroundColor', '#' + hex);
|
||||
$(Othis).next('input').attr('value','#' + hex);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}); //end color picker
|
||||
|
||||
}); //end doc ready
|
||||
|
||||
</script>
|
||||
|
||||
<?php }
|
||||
|
||||
/**
|
||||
* Ajax Save Options
|
||||
*
|
||||
* @uses get_option()
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function of_ajax_callback()
|
||||
{
|
||||
global $options_machine, $of_options;
|
||||
|
||||
$nonce=$_POST['security'];
|
||||
|
||||
if (! wp_verify_nonce($nonce, 'of_ajax_nonce') ) die('-1');
|
||||
|
||||
//get options array from db
|
||||
$all = of_get_options();
|
||||
|
||||
$save_type = $_POST['type'];
|
||||
|
||||
//echo $_POST['data'];
|
||||
|
||||
//Uploads
|
||||
if($save_type == 'upload')
|
||||
{
|
||||
|
||||
$clickedID = $_POST['data']; // Acts as the name
|
||||
$filename = $_FILES[$clickedID];
|
||||
$filename['name'] = preg_replace('/[^a-zA-Z0-9._\-]/', '', $filename['name']);
|
||||
|
||||
$override['test_form'] = false;
|
||||
$override['action'] = 'wp_handle_upload';
|
||||
$uploaded_file = wp_handle_upload($filename,$override);
|
||||
|
||||
$upload_tracking[] = $clickedID;
|
||||
|
||||
//update $options array w/ image URL
|
||||
$upload_image = $all; //preserve current data
|
||||
|
||||
$upload_image[$clickedID] = $uploaded_file['url'];
|
||||
|
||||
of_save_options($upload_image);
|
||||
|
||||
|
||||
if(!empty($uploaded_file['error'])) {echo 'Upload Error: ' . $uploaded_file['error']; }
|
||||
else { echo $uploaded_file['url']; } // Is the Response
|
||||
|
||||
}
|
||||
elseif($save_type == 'image_reset')
|
||||
{
|
||||
|
||||
$id = $_POST['data']; // Acts as the name
|
||||
|
||||
$delete_image = $all; //preserve rest of data
|
||||
$delete_image[$id] = ''; //update array key with empty value
|
||||
of_save_options($delete_image ) ;
|
||||
|
||||
}
|
||||
elseif($save_type == 'backup_options')
|
||||
{
|
||||
|
||||
$backup = $all;
|
||||
$backup['backup_log'] = date('r');
|
||||
|
||||
of_save_options($backup, BACKUPS) ;
|
||||
|
||||
die('1');
|
||||
}
|
||||
elseif($save_type == 'restore_options')
|
||||
{
|
||||
|
||||
$smof_data = get_option(BACKUPS);
|
||||
|
||||
update_option(OPTIONS, $smof_data);
|
||||
|
||||
of_save_options($smof_data);
|
||||
|
||||
die('1');
|
||||
}
|
||||
elseif($save_type == 'import_options'){
|
||||
|
||||
|
||||
$smof_data = unserialize(base64_decode($smof_data)); //100% safe - ignore theme check nag
|
||||
of_save_options($smof_data);
|
||||
|
||||
|
||||
die('1');
|
||||
}
|
||||
elseif ($save_type == 'save')
|
||||
{
|
||||
|
||||
wp_parse_str(stripslashes($_POST['data']), $smof_data);
|
||||
unset($smof_data['security']);
|
||||
unset($smof_data['of_save']);
|
||||
of_save_options($smof_data);
|
||||
|
||||
|
||||
die('1');
|
||||
}
|
||||
elseif ($save_type == 'reset')
|
||||
{
|
||||
of_save_options($options_machine->Defaults);
|
||||
|
||||
die('1'); //options reset
|
||||
}
|
||||
|
||||
die();
|
||||
}
|
15
wp-content/themes/nuzi/admin/functions/functions.load.php
Normal file
15
wp-content/themes/nuzi/admin/functions/functions.load.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* Functions Load
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage SMOF
|
||||
* @since 1.4.0
|
||||
* @author Syamil MJ
|
||||
*/
|
||||
require_once( ADMIN_PATH . 'functions/functions.php' );
|
||||
require_once( ADMIN_PATH . 'functions/functions.filters.php' );
|
||||
require_once( ADMIN_PATH . 'functions/functions.interface.php' );
|
||||
require_once( ADMIN_PATH . 'functions/functions.options.php' );
|
||||
require_once( ADMIN_PATH . 'functions/functions.admin.php' );
|
||||
require_once( ADMIN_PATH . 'functions/functions.mediauploader.php' );
|
@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* WooThemes Media Library-driven AJAX File Uploader Module (2010-11-05)
|
||||
*
|
||||
* Slightly modified for use in the Options Framework.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sets up a custom post type to attach image to. This allows us to have
|
||||
* individual galleries for different uploaders.
|
||||
*/
|
||||
add_action('init', 'optionsframework_mlu_init');
|
||||
if ( ! function_exists( 'optionsframework_mlu_init' ) ) {
|
||||
function optionsframework_mlu_init () {
|
||||
register_post_type( 'options', array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Options' ),
|
||||
),
|
||||
'public' => true,
|
||||
'show_ui' => false,
|
||||
'capability_type' => 'post',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => false,
|
||||
'supports' => array( 'title', 'editor' ),
|
||||
'query_var' => false,
|
||||
'can_export' => true,
|
||||
'show_in_nav_menus' => false
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces insert into post
|
||||
*/
|
||||
|
||||
add_filter( 'get_media_item_args', 'force_send' );
|
||||
function force_send($args){
|
||||
$args['send'] = true;
|
||||
return $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Thickbox CSS file and specific loading and button images to the header
|
||||
* on the pages where this function is called.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_css' ) ) {
|
||||
|
||||
function optionsframework_mlu_css () {
|
||||
|
||||
$_html = '';
|
||||
$_html .= '<link rel="stylesheet" href="' . get_option('siteurl') . '/' . WPINC . '/js/thickbox/thickbox.css" type="text/css" media="screen" />' . "\n";
|
||||
$_html .= '<script type="text/javascript">
|
||||
var tb_pathToImage = "' . get_option('siteurl') . '/' . WPINC . '/js/thickbox/loadingAnimation.gif";
|
||||
var tb_closeImage = "' . get_option('siteurl') . '/' . WPINC . '/js/thickbox/tb-close.png";
|
||||
</script>' . "\n";
|
||||
|
||||
echo $_html;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers and enqueues (loads) the necessary JavaScript file for working with the
|
||||
* Media Library-driven AJAX File Uploader Module.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_js' ) ) {
|
||||
|
||||
function optionsframework_mlu_js () {
|
||||
|
||||
// Registers custom scripts for the Media Library AJAX uploader.
|
||||
wp_register_script( 'of-medialibrary-uploader', ADMIN_DIR .'assets/js/of-medialibrary-uploader.js', array( 'jquery', 'thickbox' ) );
|
||||
wp_enqueue_script( 'of-medialibrary-uploader' );
|
||||
wp_enqueue_script( 'media-upload' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses "silent" posts in the database to store relationships for images.
|
||||
* This also creates the facility to collect galleries of, for example, logo images.
|
||||
*
|
||||
* Return: $_postid.
|
||||
*
|
||||
* If no "silent" post is present, one will be created with the type "optionsframework"
|
||||
* and the post_name of "of-$_token".
|
||||
*
|
||||
* Example Usage:
|
||||
* optionsframework_mlu_get_silentpost ( 'of_logo' );
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_get_silentpost' ) ) {
|
||||
|
||||
function optionsframework_mlu_get_silentpost ( $_token ) {
|
||||
|
||||
global $wpdb;
|
||||
$_id = 0;
|
||||
|
||||
// Check if the token is valid against a whitelist.
|
||||
// $_whitelist = array( 'of_logo', 'of_custom_favicon', 'of_ad_top_image' );
|
||||
// Sanitise the token.
|
||||
|
||||
$_token = strtolower( str_replace( ' ', '_', $_token ) );
|
||||
|
||||
// if ( in_array( $_token, $_whitelist ) ) {
|
||||
if ( $_token ) {
|
||||
|
||||
// Tell the function what to look for in a post.
|
||||
|
||||
$_args = array( 'post_type' => 'options', 'post_name' => 'of-' . $_token, 'post_status' => 'draft', 'comment_status' => 'closed', 'ping_status' => 'closed' );
|
||||
|
||||
// Look in the database for a "silent" post that meets our criteria.
|
||||
$query = 'SELECT ID FROM ' . $wpdb->posts . ' WHERE post_parent = 0';
|
||||
foreach ( $_args as $k => $v ) {
|
||||
$query .= ' AND ' . $k . ' = "' . $v . '"';
|
||||
} // End FOREACH Loop
|
||||
|
||||
$query .= ' LIMIT 1';
|
||||
$_posts = $wpdb->get_row( $query );
|
||||
|
||||
// If we've got a post, loop through and get it's ID.
|
||||
if ( count( $_posts ) ) {
|
||||
$_id = $_posts->ID;
|
||||
} else {
|
||||
|
||||
// If no post is present, insert one.
|
||||
// Prepare some additional data to go with the post insertion.
|
||||
$_words = explode( '_', $_token );
|
||||
$_title = join( ' ', $_words );
|
||||
$_title = ucwords( $_title );
|
||||
$_post_data = array( 'post_title' => $_title );
|
||||
$_post_data = array_merge( $_post_data, $_args );
|
||||
$_id = wp_insert_post( $_post_data );
|
||||
}
|
||||
}
|
||||
return $_id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger code inside the Media Library popup.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_insidepopup' ) ) {
|
||||
|
||||
function optionsframework_mlu_insidepopup () {
|
||||
|
||||
if ( isset( $_REQUEST['is_optionsframework'] ) && $_REQUEST['is_optionsframework'] == 'yes' ) {
|
||||
|
||||
add_action( 'admin_head', 'optionsframework_mlu_js_popup' );
|
||||
add_filter( 'media_upload_tabs', 'optionsframework_mlu_modify_tabs' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_js_popup' ) ) {
|
||||
|
||||
function optionsframework_mlu_js_popup () {
|
||||
|
||||
$_of_title = $_REQUEST['of_title'];
|
||||
if ( ! $_of_title ) { $_of_title = 'file'; } // End IF Statement
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
|
||||
jQuery.noConflict();
|
||||
|
||||
// Change the title of each tab to use the custom title text instead of "Media File".
|
||||
$( 'h3.media-title' ).each ( function () {
|
||||
var current_title = $( this ).html();
|
||||
var new_title = current_title.replace( 'media file', '<?php echo $_of_title; ?>' );
|
||||
$( this ).html( new_title );
|
||||
|
||||
} );
|
||||
|
||||
// Change the text of the "Insert into Post" buttons to read "Use this File".
|
||||
$( '.savesend input.button[value*="Insert into Post"], .media-item #go_button' ).attr( 'value', 'Use this File' );
|
||||
|
||||
// Hide the "Insert Gallery" settings box on the "Gallery" tab.
|
||||
$( 'div#gallery-settings' ).hide();
|
||||
|
||||
// Preserve the "is_optionsframework" parameter on the "delete" confirmation button.
|
||||
$( '.savesend a.del-link' ).click ( function () {
|
||||
|
||||
var continueButton = $( this ).next( '.del-attachment' ).children( 'a.button[id*="del"]' );
|
||||
var continueHref = continueButton.attr( 'href' );
|
||||
continueHref = continueHref + '&is_optionsframework=yes';
|
||||
continueButton.attr( 'href', continueHref );
|
||||
|
||||
} );
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered inside the Media Library popup to modify the title of the "Gallery" tab.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'optionsframework_mlu_modify_tabs' ) ) {
|
||||
|
||||
function optionsframework_mlu_modify_tabs ( $tabs ) {
|
||||
$tabs['gallery'] = str_replace( __( 'Gallery', 'optionsframework' ), __( 'Previously Uploaded', 'optionsframework' ), $tabs['gallery'] );
|
||||
return $tabs;
|
||||
}
|
||||
}
|
887
wp-content/themes/nuzi/admin/functions/functions.options.php
Normal file
887
wp-content/themes/nuzi/admin/functions/functions.options.php
Normal file
@ -0,0 +1,887 @@
|
||||
<?php
|
||||
|
||||
add_action('init','of_options');
|
||||
|
||||
if (!function_exists('of_options'))
|
||||
{
|
||||
function of_options()
|
||||
{
|
||||
//Access the WordPress Categories via an Array
|
||||
$of_categories = array();
|
||||
$of_categories_obj = get_categories('hide_empty=0');
|
||||
foreach ($of_categories_obj as $of_cat) {
|
||||
$of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}
|
||||
$categories_tmp = array_unshift($of_categories, "Select a category:");
|
||||
|
||||
//Access the WordPress Pages via an Array
|
||||
$of_pages = array();
|
||||
$of_pages_obj = get_pages('sort_column=post_parent,menu_order');
|
||||
foreach ($of_pages_obj as $of_page) {
|
||||
$of_pages[$of_page->ID] = $of_page->post_name; }
|
||||
$of_pages_tmp = array_unshift($of_pages, "Select a page:");
|
||||
//Testing
|
||||
$of_layout_select = array("fullwidth" => "Fullwidth","boxed" => "Boxed Layout");
|
||||
$of_options_bg_repeat = array("stretch" => "Strech Image","repeat" => "repeat","no-repeat" => "no-repeat","repeat-y" => "repeat-y","repeat-x" => "repeat-x");
|
||||
$of_options_bg_size = array("auto" => "Auto","cover" => "Cover","contain" => "Contain");
|
||||
$of_options_radio = array("one" => "One","two" => "Two","three" => "Three","four" => "Four","five" => "Five");
|
||||
$border_width = array("1px" => "1px","2px" => "2px","3px" => "3px","4px" => "4px","5px" => "5px");
|
||||
|
||||
//Sample Homepage blocks for the layout manager (sorter)
|
||||
$of_options_homepage_blocks = array
|
||||
(
|
||||
"disabled" => array (
|
||||
"placebo" => "placebo", //REQUIRED!
|
||||
"block_one" => "Block One",
|
||||
"block_two" => "Block Two",
|
||||
"block_three" => "Block Three",
|
||||
),
|
||||
"enabled" => array (
|
||||
"placebo" => "placebo", //REQUIRED!
|
||||
"block_four" => "Block Four",
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
//Stylesheets Reader
|
||||
$alt_stylesheet_path = LAYOUT_PATH;
|
||||
$alt_stylesheets = array();
|
||||
|
||||
if ( is_dir($alt_stylesheet_path) )
|
||||
{
|
||||
if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) )
|
||||
{
|
||||
while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false )
|
||||
{
|
||||
if(stristr($alt_stylesheet_file, ".css") !== false)
|
||||
{
|
||||
$alt_stylesheets[] = $alt_stylesheet_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Background Images Reader
|
||||
$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images
|
||||
$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images
|
||||
$bg_images = array();
|
||||
|
||||
if ( is_dir($bg_images_path) ) {
|
||||
if ($bg_images_dir = opendir($bg_images_path) ) {
|
||||
while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {
|
||||
if(stristr($bg_images_file, ".png") !== false || stristr($bg_images_file, ".jpg") !== false) {
|
||||
$bg_images[] = $bg_images_url . $bg_images_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* TO DO: Add options/functions that use these */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
//More Options
|
||||
$uploads_arr = wp_upload_dir();
|
||||
$all_uploads_path = $uploads_arr['path'];
|
||||
$all_uploads = get_option('of_uploads');
|
||||
$other_entries = array("Select a number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19");
|
||||
$body_repeat = array("no-repeat","repeat-x","repeat-y","repeat");
|
||||
$body_pos = array("top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right");
|
||||
|
||||
// Image Alignment radio box
|
||||
$of_options_thumb_align = array("alignleft" => "Left","alignright" => "Right","aligncenter" => "Center");
|
||||
|
||||
// Image Links to Options
|
||||
$of_options_image_link_to = array("image" => "The Image","post" => "The Post");
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* The Options Array */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
// Set the Options Array
|
||||
global $of_options,$tw_googlefonts;
|
||||
$of_options = array();
|
||||
|
||||
/* ThemeWaves custom admin section started */
|
||||
// General TAB
|
||||
$of_options[] = array( "name" => "General",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "General",
|
||||
"desc" => "",
|
||||
"id" => "general_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">General Options</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Page builder ?",
|
||||
"desc" => "This will enable, disable PageBuilder.",
|
||||
"id" => "pagebuilder",
|
||||
"std" => 1,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
|
||||
|
||||
$of_options[] = array( "name" => "Theme Layout",
|
||||
"desc" => "",
|
||||
"id" => "layout_theme_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Theme Layout</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Theme Layout Style",
|
||||
"desc" => "Choose the Theme layout style.",
|
||||
"id" => "theme_layout",
|
||||
"std" => "Fullwidth",
|
||||
"type" => "select",
|
||||
"options" => $of_layout_select
|
||||
);
|
||||
$of_options[] = array( "name" => "Layout Options if boxed",
|
||||
"desc" => "",
|
||||
"id" => "layout_opt_boxed_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">If boxed Theme Layout Style chosen.</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Background Color",
|
||||
"desc" => "Choose the background color.",
|
||||
"id" => "background_color",
|
||||
"std" => "#d1d1d1",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Background Image",
|
||||
"desc" => "This option will only works under boxed layout chosen.",
|
||||
"id" => "background_image",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Background Image Repeat",
|
||||
"desc" => "Choose the repeat or stretch image option.",
|
||||
"id" => "background_repeat",
|
||||
"std" => "repeat",
|
||||
"type" => "select",
|
||||
"options" => $of_options_bg_repeat
|
||||
);
|
||||
$of_options[] = array( "name" => "Margin from Top",
|
||||
"desc" => "Boxed Layout margin top.",
|
||||
"id" => "margin_top",
|
||||
"std" => "60",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Margin from Bottom",
|
||||
"desc" => "Boxed Layout margin bottom.",
|
||||
"id" => "margin_bottom",
|
||||
"std" => "60",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Tracking",
|
||||
"desc" => "",
|
||||
"id" => "track_code_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Tracking</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Tracking Code",
|
||||
"desc" => "Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.",
|
||||
"id" => "tracking_code",
|
||||
"std" => "",
|
||||
"type" => "textarea"
|
||||
);
|
||||
$of_options[] = array( "name" => "Consumer key",
|
||||
"desc" => "",
|
||||
"id" => "consumerkey",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Consumer secret",
|
||||
"desc" => "",
|
||||
"id" => "consumersecret",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Access token",
|
||||
"desc" => "",
|
||||
"id" => "accesstoken",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Access token secret",
|
||||
"desc" => "",
|
||||
"id" => "accesstokensecret",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
// Header and Footer TAB
|
||||
$of_options[] = array( "name" => "Additional",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Page Title Background Image",
|
||||
"desc" => "Inserted picture must be above 1600px width and height is atleast 120px. You can redefine or choose other option to your specific page on meta options.",
|
||||
"id" => "title_bg_image",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Featured Media section on post single?",
|
||||
"desc" => "If it's On then it will be showed, Off will be hidden.",
|
||||
"id" => "feature_show",
|
||||
"std" => 1,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Post Author section on post single?",
|
||||
"desc" => "If it's On then it will be showed, Off will be hidden.",
|
||||
"id" => "post_author",
|
||||
"std" => 1,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Breadcrumps?",
|
||||
"desc" => "This will enable or disable Breadcrumps.",
|
||||
"id" => "breadcrumps",
|
||||
"std" => 0,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Portfolio image height",
|
||||
"desc" => "Related portfolios height and Default portfolio image height.",
|
||||
"id" => "port_height",
|
||||
"std" => "250",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Blog Page Title",
|
||||
"desc" => "Insert Title of your Blog page.",
|
||||
"id" => "blog_title",
|
||||
"std" => "Blog",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Blog Page Subtitle",
|
||||
"desc" => "Insert Sub Title of your Blog page.",
|
||||
"id" => "blog_subtitle",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
|
||||
|
||||
// Header and Footer TAB
|
||||
$of_options[] = array( "name" => "Header and Footer",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Header layout option",
|
||||
"desc" => "",
|
||||
"id" => "header_layout_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Header layout option</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Header style",
|
||||
"desc" => "Choose header layout.",
|
||||
"id" => "header_layout",
|
||||
"std" => "Header style 1",
|
||||
"type" => "select",
|
||||
"options" => array(
|
||||
'header_1' => 'Header style 1',
|
||||
'header_2' => 'Header style 2',
|
||||
'header_3' => 'Header style 3'
|
||||
)
|
||||
);
|
||||
$of_options[] = array( "name" => "Logo option heading",
|
||||
"desc" => "",
|
||||
"id" => "logo_opt_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Logo options</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Upload Standard Logo",
|
||||
"desc" => "Please insert your logo.",
|
||||
"id" => "theme_logo",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Logo Margin from Top",
|
||||
"desc" => "Note: You need to insert only value.",
|
||||
"id" => "logo_top",
|
||||
"std" => "0",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Logo Margin from Bottom",
|
||||
"desc" => "Note: You need to insert only value.",
|
||||
"id" => "logo_bottom",
|
||||
"std" => "0",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Retina Logo",
|
||||
"desc" => "",
|
||||
"id" => "logo_retina",
|
||||
"std" => 0,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Upload Retina Logo (2x)",
|
||||
"desc" => "Note: You retina logo must be larger than 2x. Example: Main logo 120x200 then Retina must be 240x400.",
|
||||
"id" => "theme_logo_retina",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"fold" => "logo_retina", /* the checkbox hook */
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Standard Logo Width",
|
||||
"desc" => "You need to insert Non retina logo width. Height auto",
|
||||
"id" => "logo_width",
|
||||
"std" => "",
|
||||
"fold" => "logo_retina", /* the checkbox hook */
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Favicon option heading",
|
||||
"desc" => "",
|
||||
"id" => "favicon_opt_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Favicon options</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Upload Standard Favicon",
|
||||
"desc" => "Please insert your favicon 16x16 icon. You may use <a href='http://www.favicon.cc/' target='_blank'>favicon.cc</a>",
|
||||
"id" => "theme_favicon",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Retina Favicon",
|
||||
"desc" => "",
|
||||
"id" => "favicon_retina",
|
||||
"std" => 0,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Favicon for iPhone (57x57)",
|
||||
"desc" => "Please upload your favicon 57x57.",
|
||||
"id" => "favicon_iphone",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"fold" => "favicon_retina", /* the checkbox hook */
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Retina Favicon for iPhone (114x114)",
|
||||
"desc" => "Please upload your favicon 114x114.",
|
||||
"id" => "favicon_iphone_retina",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"fold" => "favicon_retina", /* the checkbox hook */
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Favicon for iPad (72x72)",
|
||||
"desc" => "Please upload your favicon 72x72.",
|
||||
"id" => "favicon_ipad",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"fold" => "favicon_retina", /* the checkbox hook */
|
||||
"type" => "upload"
|
||||
);
|
||||
$of_options[] = array( "name" => "Retina Favicon for iPad (144x144)",
|
||||
"desc" => "Please upload your favicon 144x144.",
|
||||
"id" => "favicon_ipad_retina",
|
||||
"std" => "",
|
||||
"mod" => "min",
|
||||
"fold" => "favicon_retina", /* the checkbox hook */
|
||||
"type" => "upload"
|
||||
);
|
||||
|
||||
$of_options[] = array( "name" => "Top Bar",
|
||||
"desc" => "",
|
||||
"id" => "topbar_colors_main",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Top Bar</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Top bar",
|
||||
"desc" => "Insert your social icons in Social Icons Tab.",
|
||||
"id" => "top_bar",
|
||||
"std" => 0,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Top bar text",
|
||||
"desc" => "Insert your text bar content.",
|
||||
"id" => "top_bar_text",
|
||||
"std" => "Dynamically target high-payoff intellectual capital for customized",
|
||||
"fold" => "top_bar",
|
||||
"type" => "textarea"
|
||||
);
|
||||
|
||||
$of_options[] = array( "name" => "Footer section",
|
||||
"desc" => "",
|
||||
"id" => "footer_section_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Footer section</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Widget",
|
||||
"desc" => "",
|
||||
"id" => "footer_widget",
|
||||
"std" => 1,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$url = ADMIN_DIR . 'assets/images/footer/';
|
||||
$of_options[] = array( "name" => "Footer Layout",
|
||||
"desc" => "Choose footer layout.",
|
||||
"id" => "footer_layout",
|
||||
"std" => "3-3-3-3",
|
||||
"type" => "images",
|
||||
"fold" => "footer_widget", /* the checkbox hook */
|
||||
"options" => array(
|
||||
'12' => $url . '1.png',
|
||||
'6-6' => $url . '2.png',
|
||||
'4-4-4' => $url . '3.png',
|
||||
'3-3-3-3' => $url . '4.png'
|
||||
)
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Social",
|
||||
"desc" => "",
|
||||
"id" => "footer_social",
|
||||
"std" => 1,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Copyright Text",
|
||||
"desc" => "Insert Copyright Text.",
|
||||
"id" => "copyright_text",
|
||||
"std" => "NUZI Theme by ThemeWaves.<br/> Proudly Powered by <a href='http://wordpress.org/' title='Wordpress is the Best!'>Wordpress </a>",
|
||||
"type" => "textarea"
|
||||
);
|
||||
// Colors and Styling TAB
|
||||
$of_options[] = array( "name" => "Colors and Styling",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "General",
|
||||
"desc" => "",
|
||||
"id" => "colors_and_styling_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">General</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Primary Color",
|
||||
"desc" => "Theme Primary color has all of accent colors of this theme. Default: #4da4f3",
|
||||
"id" => "primary_color",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Link Color",
|
||||
"desc" => "Pick a tag color (default: #4da4f3).",
|
||||
"id" => "link_color",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Link Hover Color",
|
||||
"desc" => "Pick a tag's hover color (default: #4da4f3).",
|
||||
"id" => "link_hover_color",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Header Colors",
|
||||
"desc" => "",
|
||||
"id" => "header_colors_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Header</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Header Background Color",
|
||||
"desc" => "Pick a background color for the header (default: #fff).",
|
||||
"id" => "header_background",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Top Bar Color",
|
||||
"desc" => "",
|
||||
"id" => "topbar_colors_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Top Bar Color</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Top bar Background Color",
|
||||
"desc" => "Insert your top bar background color.",
|
||||
"id" => "top_bar_bg",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Menu Colors Options",
|
||||
"desc" => "",
|
||||
"id" => "menu_colors_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Menu</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Menu Background Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "menu_background",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Menu Link Hover&Active Color",
|
||||
"desc" => "Default: #282828",
|
||||
"id" => "menu_hover",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Menu Link Hover&Active Background Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "menu_hover_background",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Sub Menu Background Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "submenu_bg",
|
||||
"std" => "#282828",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Sub Menu Link Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "submenu_link",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Sub Menu Hover Background Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "submenu_hover_background",
|
||||
"std" => "#282828",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Sub Menu Link Hover Color",
|
||||
"desc" => "Default: #fff",
|
||||
"id" => "submenu_hover",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Body Colors",
|
||||
"desc" => "",
|
||||
"id" => "body_colors_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Body</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Body Background Color",
|
||||
"desc" => "Pick a background color for the body (default: #fff).",
|
||||
"id" => "body_background",
|
||||
"std" => "#fff",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Colors",
|
||||
"desc" => "",
|
||||
"id" => "footer_colors_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Footer</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Background Color",
|
||||
"desc" => "Pick a background color for the footer (default: #222222).",
|
||||
"id" => "footer_background",
|
||||
"std" => "#222222",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Text Color",
|
||||
"desc" => "Pick a footers text color (default: #8d8d8d).",
|
||||
"id" => "footer_text_color",
|
||||
"std" => "#8d8d8d",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Link Color",
|
||||
"desc" => "Pick a footers a tag color (default: #4da4f3).",
|
||||
"id" => "footer_link_color",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Link Hover Color",
|
||||
"desc" => "Pick a footers a tag hover color (default: #4da4f3).",
|
||||
"id" => "footer_link_hover_color",
|
||||
"std" => "#4da4f3",
|
||||
"type" => "color"
|
||||
);
|
||||
// Typography TAB
|
||||
$of_options[] = array( "name" => "Typography",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Body",
|
||||
"desc" => "",
|
||||
"id" => "body_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Body</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Body text font",
|
||||
"desc" => "Specify the body font properties",
|
||||
"id" => "body_text_font",
|
||||
"std" => array('size' => '13px','face' => 'Arial','style' => 'normal','color' => '#8d8d8d'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "Widget",
|
||||
"desc" => "",
|
||||
"id" => "menu_link_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Menu</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Menu Link customize",
|
||||
"desc" => "Specify the body font properties",
|
||||
"id" => "menu_font",
|
||||
"std" => array('size' => '13px','face' => 'Noto Sans','style' => 'bold','color' => '#222'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "Widget",
|
||||
"desc" => "",
|
||||
"id" => "widget_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Widget</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Sidebar Widgets Title",
|
||||
"desc" => "Specify the sidebar headline font properties",
|
||||
"id" => "sidebar_widgets_title",
|
||||
"std" => array('size' => '16px','face' => 'Noto Sans','style' => 'normal','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "Footer Widgets Title",
|
||||
"desc" => "Specify the sidebar headline font properties",
|
||||
"id" => "footer_widgets_title",
|
||||
"std" => array('size' => '16px','face' => 'Noto Sans','style' => 'normal','color' => '#fff'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "Headers font styling",
|
||||
"desc" => "",
|
||||
"id" => "header_font_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Headlines</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Heading Font Family",
|
||||
"desc" => "",
|
||||
"id" => "heading_font",
|
||||
"std" => "Noto Sans",
|
||||
"type" => "select_google_font",
|
||||
"options" => $tw_googlefonts
|
||||
);
|
||||
$of_options[] = array( "name" => "H1 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h1_spec_font",
|
||||
"std" => array('size' => '28px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "H2 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h2_spec_font",
|
||||
"std" => array('size' => '22px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "H3 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h3_spec_font",
|
||||
"std" => array('size' => '18px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "H4 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h4_spec_font",
|
||||
"std" => array('size' => '16px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "H5 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h5_spec_font",
|
||||
"std" => array('size' => '14px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "H6 - Specify Font Properties",
|
||||
"desc" => "",
|
||||
"id" => "h6_spec_font",
|
||||
"std" => array('size' => '12px','color' => '#282828'),
|
||||
"type" => "typography"
|
||||
);
|
||||
$of_options[] = array( "name" => "Google Font Subset",
|
||||
"desc" => "",
|
||||
"id" => "google_font_subset",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Google Font Subset</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Google Font Subset",
|
||||
"desc" => "Some of Google fonts have additional subsets. Please insert those subsets seperated with comma (,). More information <a href='https://developers.google.com/fonts/docs/getting_started' target='_blank'>Google Font Subset</a>",
|
||||
"id" => "google_font_subset",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
// Social Icons TAB
|
||||
$of_options[] = array( "name" => "Social Icons",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Social Icons heading",
|
||||
"desc" => "",
|
||||
"id" => "social_icons_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Inserted Social Icons will be displayed on top Header section.</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Facebook ID",
|
||||
"desc" => "Enter the Facebook ID.",
|
||||
"id" => "facebook_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Flickr Username",
|
||||
"desc" => "Enter the Flickr Username.",
|
||||
"id" => "flickr_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Google + ID",
|
||||
"desc" => "Enter the Google + Username.",
|
||||
"id" => "googleplus_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Twitter Username",
|
||||
"desc" => "Enter the Twitter Username.",
|
||||
"id" => "twitter_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Instagram Username",
|
||||
"desc" => "Enter the Instagram Username.",
|
||||
"id" => "instagram_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "RSS URL",
|
||||
"desc" => "Enter the RSS URL.",
|
||||
"id" => "rss_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Pinterest Username",
|
||||
"desc" => "Enter the Pinterest Username.",
|
||||
"id" => "pinterest_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Skype Username",
|
||||
"desc" => "Enter the Skype Username.",
|
||||
"id" => "skype_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Vimeo Username",
|
||||
"desc" => "Enter the Vimeo Username.",
|
||||
"id" => "vimeo_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Youtube Username",
|
||||
"desc" => "Enter the Youtube Username.",
|
||||
"id" => "youtube_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Dribbble Username",
|
||||
"desc" => "Enter the Dribbble Username.",
|
||||
"id" => "dribbble_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Linkedin Username",
|
||||
"desc" => "Enter the Linkedin Username.",
|
||||
"id" => "linkedin_username",
|
||||
"std" => "",
|
||||
"type" => "text"
|
||||
);
|
||||
// FB Twitter TAB
|
||||
|
||||
$of_options[] = array( "name" => "FB Twitter API",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Facebook & Twitter",
|
||||
"desc" => "",
|
||||
"id" => "facebook_twitter_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Facebook Comment API section</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Facebook comment?",
|
||||
"desc" => "On will be enabling facebook comment, Off will be Wordpress default comment.",
|
||||
"id" => "facebook_comment",
|
||||
"std" => 0,
|
||||
"folds" => 1,
|
||||
"type" => "switch"
|
||||
);
|
||||
$of_options[] = array( "name" => "Facebook api key",
|
||||
"desc" => "Create your own Facebook Application and <a href='https://developers.facebook.com/apps' target='_blank'>get ID</a>.",
|
||||
"id" => "facebook_app_id",
|
||||
"std" => "",
|
||||
"fold" => "facebook_comment", /* the checkbox hook */
|
||||
"type" => "text"
|
||||
);
|
||||
$of_options[] = array( "name" => "Facebook & Twitter",
|
||||
"desc" => "",
|
||||
"id" => "facebook_twitter_info2",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Twitter API section (Note this will Required!)</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Consumer key",
|
||||
"desc" => "You need to Create your Twitter APP and <a href='https://dev.twitter.com/apps' target='_blank'>insert the ID</a>.",
|
||||
"id" => "consumerkey",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Consumer secret",
|
||||
"desc" => "",
|
||||
"id" => "consumersecret",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Access token",
|
||||
"desc" => "",
|
||||
"id" => "accesstoken",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
$of_options[] = array( "name" => "Access token secret",
|
||||
"desc" => "",
|
||||
"id" => "accesstokensecret",
|
||||
"std" => "",
|
||||
"type" => "text");
|
||||
|
||||
// Custom CSS TAB
|
||||
$of_options[] = array( "name" => "Custom CSS",
|
||||
"type" => "heading"
|
||||
);
|
||||
$of_options[] = array( "name" => "Custom CSS",
|
||||
"desc" => "",
|
||||
"id" => "custom_css_info",
|
||||
"std" => "<h3 style=\"margin: 3px;\">Enter the Custom CSS of your custom Modify.</h3>",
|
||||
"icon" => true,
|
||||
"type" => "info"
|
||||
);
|
||||
$of_options[] = array( "name" => "Custom CSS",
|
||||
"desc" => "Paste your own customized CSS code.",
|
||||
"id" => "custom_css",
|
||||
"std" => "",
|
||||
"type" => "textarea"
|
||||
);
|
||||
// Backup Options
|
||||
$of_options[] = array( "name" => "Backup Options",
|
||||
"type" => "heading"
|
||||
);
|
||||
|
||||
$of_options[] = array( "name" => "Backup and Restore Options",
|
||||
"id" => "of_backup",
|
||||
"std" => "",
|
||||
"type" => "backup",
|
||||
"desc" => 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',
|
||||
);
|
||||
|
||||
$of_options[] = array( "name" => "Transfer Theme Options Data",
|
||||
"id" => "of_transfer",
|
||||
"std" => "",
|
||||
"type" => "transfer",
|
||||
"desc" => 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click "Import Options".',
|
||||
);
|
||||
}//End function: of_options()
|
||||
}//End chack if function exists: of_options()
|
||||
?>
|
Reference in New Issue
Block a user