initial commit

This commit is contained in:
2024-04-29 13:12:44 +05:45
commit 34887303c5
19300 changed files with 5268802 additions and 0 deletions

View File

@ -0,0 +1,241 @@
<?php
/**
* ReduxFramework Sample Config File
* For full documentation, please visit: https://github.com/ReduxFramework/ReduxFramework/wiki
**/
global $UltimoWP;
if (!class_exists("ReduxFramework")) {
return;
}
if (!class_exists("ReduxUltimoSetup")) {
class ReduxUltimoSetup
{
public $args = array();
public $sections = array();
/* This var will carry which options wiil be available for us to use on our less file */
public $less = array();
/* Error */
public $_error = "";
public $theme;
public $ReduxFramework;
public $td = 'indigo';
public function __construct()
{
// Just for demo purposes. Not needed per say.
$this->theme = wp_get_theme();
// Set the default arguments
$this->setArguments();
// Set a few help tabs so you can see how it's done
$this->setHelpTabs();
// Create the sections and fields
$this->setSections();
if (!isset($this->args['opt_name'])) { // No errors please
return;
}
$this->ReduxFramework = new ReduxFramework($this->sections, $this->args);
// If Redux is running as a plugin, this will remove the demo notice and links
//add_action( 'redux/plugin/hooks', array( $this, 'remove_demo' ) );
// Function to test the compiler hook and demo CSS output.
add_filter('redux/options/' . $this->args['opt_name'] . '/compiler', array($this, 'compiler_action'), 10, 2);
// Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.
// Change the arguments after they've been declared, but before the panel is created
//add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) );
// Change the default value of a field after it's been set, but before it's been used
//add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) );
// Dynamically add a section. Can be also used to modify sections/fields
//add_filter('redux/options/' . $this->args['opt_name'] . '/sections', array($this, 'dynamic_section'));
}
/**
*
* This is a test function that will let you see when the compiler hook occurs.
* It only runs if a field set with compiler=>true is changed.
**/
function compiler_action($options, $css) {
global $UltimoWP;
$UltimoWP->runCompiler($options, $css);
}
/*
* Prints errors while compiling
*/
function compiler_error()
{
?>
<div class="error">
<p><strong>Fatal Error: </strong><?php echo $this->_error; ?></p>
</div>
<?php
}
/**
*
* Custom function for filtering the sections array. Good for child themes to override or add to the sections.
* Simply include this function in the child themes functions.php file.
*
* NOTE: the defined constants for URLs, and directories will NOT be available at this point in a child theme,
* so you must use get_template_directory_uri() if you want to use any of the built in icons
**/
function dynamic_section($sections)
{
//$sections = array();
$sections[] = array(
'title' => __('Section via hook', 'redux-framework-demo'),
'desc' => __('<p class="description">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'redux-framework-demo'),
'icon' => 'el-icon-paper-clip',
// Leave this as a blank section, no options just some intro text set above.
'fields' => array()
);
return $sections;
}
/**
*
* Filter hook for filtering the args. Good for child themes to override or add to the args array. Can also be used in other functions.
**/
function change_arguments($args)
{
//$args['dev_mode'] = true;
return $args;
}
/**
*
* Filter hook for filtering the default value of any given field. Very useful in development mode.
**/
function change_defaults($defaults)
{
$defaults['str_replace'] = "Testing filter hook!";
return $defaults;
}
// Remove the demo link and the notice of integrated demo from the redux-framework plugin
function remove_demo()
{
// Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.
if (class_exists('ReduxFrameworkPlugin')) {
remove_filter('plugin_row_meta', array(ReduxFrameworkPlugin::get_instance(), 'plugin_meta_demo_mode_link'), null, 2);
}
// Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.
remove_action('admin_notices', array(ReduxFrameworkPlugin::get_instance(), 'admin_notices'));
}
public function setSections()
{
/*
* Require sections setup
*/
require_once(dirname(__FILE__) . '/sections.php');
}
public function setHelpTabs()
{
/*
* Require helptabs setup
*/
require_once(dirname(__FILE__) . '/help.php');
}
/**
*
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
**/
public function setArguments()
{
/*
* Require args setup
*/
require_once(dirname(__FILE__) . '/config.php');
}
}
add_action('init', "reduxUltimoWP", -1);
function reduxUltimoWP()
{
new ReduxUltimoSetup();
}
}
/**
*
* Custom function for the callback referenced above
*/
if (!function_exists('redux_my_custom_field')):
function redux_my_custom_field($field, $value)
{
print_r($field);
print_r($value);
}
endif;
/**
*
* Custom function for the callback validation referenced above
**/
if (!function_exists('redux_validate_callback_function')):
function redux_validate_callback_function($field, $value, $existing_value)
{
$error = false;
$value = 'just testing';
/*
do your validation
if(something) {
$value = $value;
} elseif(something else) {
$error = true;
$value = $existing_value;
$field['msg'] = 'your custom error message';
}
*/
$return['value'] = $value;
if ($error == true) {
$return['error'] = $field;
}
return $return;
}
endif;

View File

@ -0,0 +1,78 @@
<?php
/*
*
* Options Panel Arguments
* - Be careful when editing this!
*
*/
// Text Domain
$args = array(
// TYPICAL -> Change these values as you need/desire
'opt_name' => 'theme_options_' . sanitize_title(__('Ultimo WP Settings', $this->td)), // This is where your data is stored in the database and also becomes your global variable name.
'display_name' => __('Ultimo WP Settings', $this->td), // Name that appears at the top of your panel
'display_version' => '', // Version that appears at the top of your panel
'menu_type' => 'menu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)
'allow_sub_menu' => true, // Show the sections below the admin menu item or not
'menu_title' => __('Ultimo WP', $this->td),
'page' => __('Ultimo WP', $this->td),
'google_api_key' => 'AIzaSyBDmSLNoNF5Tk1zRUy6ZJMVlB58amxjFVQ', // Must be defined to add google fonts to the typography module
'global_variable' => 'ultimoSettings', // Set a different name for your global variable other than the opt_name
'dev_mode' => false, // Show the time the page took to load, etc
'customizer' => false, // Enable basic customizer support
// OPTIONAL -> Give you extra features
'page_priority' => 109020.3, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
'page_parent' => 'ultimo-wp', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
'page_permissions' => 'manage_options', // Permissions needed to access the options panel.
'menu_icon' => 'dashicons-marker', // Specify a custom URL to an icon
//'last_tab' => '', // Force your panel to always open to a specific tab (by id)
//'page_icon' => 'icon-marker', // Icon displayed in the admin panel next to your menu_title
'page_slug' => 'ultimo-wp', // Page slug used to denote the panel
'save_defaults' => true, // On load save the defaults to DB before user clicks save or not
'default_show' => false, // If true, shows the default value next to each field that is not the default value.
'default_mark' => '*', // What to print by the field's title if the value shown is default. Suggested: *
'class' => 'plugins-732-redux',
'ajax_save' => false,
// CAREFUL -> These options are for advanced use only
'transient_time' => 60 * MINUTE_IN_SECONDS,
'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output
'output_tag' => false, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head
//'domain' => 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.
'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.
// FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
//'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
//'show_import_export' => true, // REMOVE
//'system_info' => false, // REMOVE
//'help_tabs' => array(),
//'help_sidebar' => '', // __( '', $args['domain'] );
);
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
/*$args['share_icons'][] = array(
'url' => 'https://github.com/ReduxFramework/42layers',
'title' => 'Visit us on GitHub',
'icon' => 'el-icon-github'
// 'img' => '', // You can use icon OR img. IMG needs to be a full URL.
);*/
/*
* Adding INJECTED fields to the arguments
*/
//$args = apply_filters("inject_redux_configs", $args);
/*
* Pass $sections back to the class
*/
$this->args = $args;

View File

@ -0,0 +1,17 @@
<?php
/*
// Custom page help tabs, displayed using the help API. Tabs are shown in order of definition.
$this->args['help_tabs'][] = array(
'id' => 'redux-opts-1',
'title' => __('Theme Information 1', 'redux-framework-demo'),
'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')
);
$this->args['help_tabs'][] = array(
'id' => 'redux-opts-2',
'title' => __('Theme Information 2', 'redux-framework-demo'),
'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')
);
// Set the help sidebar
$this->args['help_sidebar'] = __('<p>This is the sidebar content, HTML is allowed.</p>', 'redux-framework-demo');*/

View File

@ -0,0 +1,41 @@
<?php
/*
* Adding INJECTED fields to the arguments
*/
$sections = apply_filters("inject_redux_sections", $sections);
/*
* Comparison function
*/
function cmp($a, $b)
{
if ($a['order'] == $b['order']) {
return 0;
}
return ($a['order'] < $b['order']) ? -1 : 1;
}
/*
* Order fields based on order param on the field
*/
$keys = array_keys($sections);
foreach ($sections as $i => &$section) {
$section['order'] = (isset($section['order'])) ? $section['order'] : array_search($i, $keys);
foreach ($section['fields'] as $index => &$field) {
$field['order'] = (isset($field['order'])) ? $field['order'] : $index;
/* If has LESS flag, make available on LESS */
if(isset($field['less']) && $field['less'] == true) {
$this->less[] = $field['id'];
}
}
/* Compare and Order params */
usort($section['fields'], "cmp");
}
usort($sections, "cmp");
/*
* Pass $sections back to the class
*/
$this->sections = $sections;

View File

@ -0,0 +1,463 @@
<?php
global $UltimoWP;
$sections = array();
// - - - - - - - - - - - - - -
// General
// - - - - - - - - - - - - - -
$sections[] = array(
'title' => __('General Options', $UltimoWP->textDomain),
'desc' => __('General settings of the theme.', $UltimoWP->textDomain),
'icon' => 'el-icon-cog-alt',
'fields' => array(
array(
'id' => "returning",
'type' => 'info',
'title' => __('News and Announcements', $UltimoWP->textDomain),
'desc' => __('We are very happy to let you know that we are going back to actively support this plugin. If you have a feature you would like to suggest or a bug you would like to se fixed, just go to our website and contact us directly using the contact form.
<br><br><a target="_blank" href="http://weare732.com/en/home/#av_section_4" class="button button-primary">Contact Us</a>', $UltimoWP->textDomain),
//'desc' => __('You can hide, rename, change the icon for the menu items using WPAMM', $UltimoWP->textDomain),
"default" => false,
'compiler' => false
),
array(
'id' => 'preset',
'type' => 'image_select',
'presets' => true,
'title' => __('Presets', $UltimoWP->textDomain),
'subtitle' => __('Select one of our customizable themes to start giving your style to the WordPress Admin Dashboard.', $UltimoWP->textDomain),
'default' => 0,
'options' => array(
// JSON string of preset options
'default-theme' => array(
'alt' => 'Default Theme',
'img' => $UltimoWP->getAsset('presets/default.png'),
'presets' => '{"preset":0,"help-tabs":true,"screen-options-tabs":true,"bg-base":"#222","bg-highlight":"#E14D43","bg-notification":"#69A8BB","advanced-color-control":false,"bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'"},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'"},"logo-text":"Wordpress","header-height":60,"menu-width":250,"menu-separators":true,"menu-icons":true,"menu-manage":false,"footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'"},"login-page-bg":{"background-size":"cover","background-color":"#222"},"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'pro-theme-dark' => array(
'alt' => 'Pro Theme Dark',
'img' => $UltimoWP->getAsset('presets/pro-theme-dark.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#111111","bg-highlight":"#222222","bg-notification":"#1e73be","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":[""],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"50","menu-width":"230","menu-separators":"1","menu-icons":"0","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#222","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"presets":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'pro-theme-light' => array(
'alt' => 'Pro Theme Light',
'img' => $UltimoWP->getAsset('presets/pro-theme-light.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#cccccc","bg-highlight":"#222222","bg-notification":"#1e73be","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":[""],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"50","menu-width":"230","menu-separators":"1","menu-icons":"0","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#222","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'midnight' => array(
'alt' => 'Midnight',
'img' => $UltimoWP->getAsset('presets/midnight.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#363b3f","bg-highlight":"#E14D43","bg-notification":"#69A8BB","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"60","menu-width":"230","menu-separators":"1","menu-icons":"1","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#363b3f","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'coffee' => array(
'alt' => 'Coffee',
'img' => $UltimoWP->getAsset('presets/coffee.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#59524c","bg-highlight":"#c7a589","bg-notification":"#9ea476","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"60","menu-width":"230","menu-separators":"1","menu-icons":"1","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#363b3f","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'ectoplasm' => array(
'alt' => 'Ectoplasm',
'img' => $UltimoWP->getAsset('presets/ectoplasm.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#413256","bg-highlight":"#a3b745","bg-notification":"#d46f15","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"60","menu-width":"250","menu-separators":"1","menu-icons":"1","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#222","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'ocean' => array(
'alt' => 'Ocean',
'img' => $UltimoWP->getAsset('presets/ocean.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#738e96","bg-highlight":"#9ebaa0","bg-notification":"#aa9d88","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png'). '","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"60","menu-width":"250","menu-separators":"1","menu-icons":"1","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#222","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
// JSON string of preset options
'sunrise' => array(
'alt' => 'Sunrise',
'img' => $UltimoWP->getAsset('presets/sunrise.png'),
'presets' => '{"last_tab":"","help-tabs":"1","screen-options-tabs":"1","bg-base":"#cf4944","bg-highlight":"#dd823b","bg-notification":"#ccaf0b","advanced-color-control":"","bg-logo":"#3498db","bg-header":"#fdfdfd","welcome-text":["Welcome back,","Hello there,","What\'s up,"],"logo-align":"left","logo-type":"image","logo-img":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-img-mini":{"url":"'. $UltimoWP->getAsset('logo-mini.png') .'","id":"","height":"","width":"","thumbnail":""},"logo-text":"Wordpress","header-height":"60","menu-width":"250","menu-separators":"1","menu-icons":"1","footer-left-text":"","footer-right-text":"","login-page-logo":{"url":"'. $UltimoWP->getAsset('logo.png') .'","id":"","height":"","width":"","thumbnail":""},"login-page-bg":{"background-color":"#222","background-repeat":"","background-size":"cover","background-attachment":"","background-position":"","background-image":"","media":{"id":"","height":"","width":"","thumbnail":""}},"preset":0,"menu-manage":false,"redux_import_export":"","redux-backup":1}'
),
),
),
array(
'id' => 'help-tabs',
'type' => 'switch',
'title' => __('Display Help Tab?', $UltimoWP->textDomain),
'subtitle' => __('Select if your want to dusplay the top Help Tabs.', $UltimoWP->textDomain),
'default' => true,
),
array(
'id' => 'screen-options-tabs',
'type' => 'switch',
'title' => __('Display Screen Options Tab?', $UltimoWP->textDomain),
'subtitle' => __('Select if your want to dusplay the top Screen Options Tabs.', $UltimoWP->textDomain),
'default' => true,
),
)
);
// - - - - - - - - - - - - - -
// Color Schemes
// - - - - - - - - - - - - - -
// Color Schemes Fields
$color_schemes = array();
// Color Scheme add the defsults one
// TODO: Create one or two colorschemes diretenes
// Add the NEW color scheme
// Menu
$color_schemes[] = array(
'id' => "bg-base",
'type' => 'color',
'title' => __('Base Color', $UltimoWP->textDomain),
'subtitle' => __('Select the primary color of this Color Scheme.', $UltimoWP->textDomain),
'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => '#222',
'transparent' => false,
'validate' => 'color',
'compiler' => true,
);
// highlight
$color_schemes[] = array(
'id' => "bg-highlight",
'type' => 'color',
'title' => __('Highlight Color', $UltimoWP->textDomain),
'subtitle' => __('Select the notification color of this Color Scheme.', $UltimoWP->textDomain),
'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => '#E14D43',
'transparent' => false,
'validate' => 'color',
'compiler' => true,
);
// notifications
$color_schemes[] = array(
'id' => "bg-notification",
'type' => 'color',
'title' => __('Notification Color', $UltimoWP->textDomain),
'subtitle' => __('Select the notification color of this Color Scheme.', $UltimoWP->textDomain),
'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => '#69A8BB',
'transparent' => false,
'validate' => 'color',
'compiler' => true,
);
// Advanced Color control
$color_schemes[] = array(
'id' => "advanced-color-control",
'type' => 'switch',
'title' => __('Advanced Control', $UltimoWP->textDomain),
'subtitle' => __('Enabling this option will give you extra control over the colors used on the layout.', $UltimoWP->textDomain),
// 'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => false,
);
// BG Logo Area
$color_schemes[] = array(
'id' => "bg-logo",
'type' => 'color',
'title' => __('Logo Background Color', $UltimoWP->textDomain),
'subtitle' => __('Select the notification color of this Color Scheme.', $UltimoWP->textDomain),
'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => '#3498db',
'transparent' => false,
'validate' => 'color',
'required' => array('advanced-color-control', '=', '1'),
'compiler' => array(
'background-color' => '.custom-site-logo.wp-ui-notification',
),
);
// BG Header
$color_schemes[] = array(
'id' => "bg-header",
'type' => 'color',
'title' => __('Header Background Color', $UltimoWP->textDomain),
'subtitle' => __('Select the notification color of this Color Scheme.', $UltimoWP->textDomain),
'desc' => __('This is the color used as background for the menu and the header.', $UltimoWP->textDomain),
'default' => '#fdfdfd',
'transparent' => false,
'validate' => 'color',
'required' => array('advanced-color-control', '=', '1'),
'compiler' => array(
'background-color' => '#wpadminbar',
),
);
// - - - - - - - - - - - - - -
// Make Panel itself
// - - - - - - - - - - - - - -
// Create Section
$sections[] = array(
'title' => __('Color Scheme', $UltimoWP->textDomain),
'desc' => __('Personalize the colors of the theme to make it look as you always wanted.', $UltimoWP->textDomain),
'icon' => 'el-icon-tint',
'fields' => $color_schemes,
);
// - - - - - - - - - - - - - -
// Create Color Schemes Panels
// - - - - - - - - - - - - - -
// Available or not?
// $fields[] = array(
// 'id' => "{$slug}-switch",
// 'type' => 'switch',
// 'title' => sprintf(__('Activate %s Color Scheme.', $UltimoWP->textDomain), $cs),
// 'subtitle' => __('Turn this switch on to make this color scheme available to the users.', $UltimoWP->textDomain),
// 'default' => true
// );
// - - - - - - - - - - - - - -
// Header
// - - - - - - - - - - - - - -
$sections[] = array(
'title' => __('Header', $UltimoWP->textDomain),
'desc' => __('Custom header settings.', $UltimoWP->textDomain),
'icon' => 'el-icon-chevron-up',
'fields' => array(
array(
'id' => 'welcome-text',
'type' => 'multi_text',
'title' => __('Welcome Text', $UltimoWP->textDomain),
'desc' => __('You can leave it blank to display only the username. You can enter more than one and in each page one will be randomly selected.', $UltimoWP->textDomain),
'subtitle' => __('This is the text shown before the username.', $UltimoWP->textDomain),
'default' => array(
__('Welcome back,', $UltimoWP->textDomain),
__('Hello there,', $UltimoWP->textDomain),
__('What\'s up,', $UltimoWP->textDomain),
),
),
array(
'id' => 'logo-align',
'type' => 'button_set',
'title' => __('Logo Position', $UltimoWP->textDomain),
'subtitle' => __('Select where to position your logo or text.', $UltimoWP->textDomain),
// 'desc' => __('This is the description field, again good for additional info.', $UltimoWP->textDomain),
//Must provide key => value pairs for options
'options' => array(
'left' => __('Left', $UltimoWP->textDomain),
'center' => __('Center', $UltimoWP->textDomain),
'right' => __('Right', $UltimoWP->textDomain)
),
'default' => 'left'
),
array(
'id' => 'logo-type',
'type' => 'button_set',
'title' => __('Logo Type', $UltimoWP->textDomain),
'subtitle' => __('Select the type of your logo.', $UltimoWP->textDomain),
// 'desc' => __('This is the description field, again good for additional info.', $UltimoWP->textDomain),
//Must provide key => value pairs for options
'options' => array(
'image' => __('Image', $UltimoWP->textDomain),
'text' => __('Text', $UltimoWP->textDomain)
),
'default' => 'image'
),
// Case Logo Image
array(
'id' => 'logo-img',
'required' => array('logo-type', '=', 'image'),
'type' => 'media',
'url' => true,
'title' => __('Logo', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the logo image you want to use.', $UltimoWP->textDomain),
'default' => array(
'url' => $UltimoWP->getAsset('logo.png')
),
),
array(
'id' => 'logo-img-mini',
'required' => array('logo-type', '=', 'image'),
'type' => 'media',
'url' => true,
'title' => __('Logo (Folded Version)', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the logo image you want to use when the menu is folded.', $UltimoWP->textDomain),
'default' => array(
'url' => $UltimoWP->getAsset('logo-mini.png')
),
),
// Case Logo Text
array(
'id' => 'logo-text',
'required' => array('logo-type', '=', 'text'),
'type' => 'text',
'url' => true,
'title' => __('Logo Text', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the logo Text', $UltimoWP->textDomain),
'default' => get_bloginfo('Name')
),
// Height
array(
'id' => 'header-height',
'type' => 'slider',
'title' => __('Header Height', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the height of the header bar.', $UltimoWP->textDomain),
"default" => 60,
"min" => 50,
"step" => 5,
"max" => 100,
'display_value' => 'text',
'compiler' => true
),
)
);
// - - - - - - - - - - - - - -
// Menu
// - - - - - - - - - - - - - -
// Create Section
$sections[] = array(
'title' => __('Menu', $UltimoWP->textDomain),
'desc' => __('Sidebar menu settings.', $UltimoWP->textDomain),
'icon' => 'el-icon-lines',
'fields' => array(
array(
'id' => "menu-width",
'type' => 'slider',
'title' => __('Menu Width', $UltimoWP->textDomain),
'subtitle' => __('Select the width of the main menu.', $UltimoWP->textDomain),
"default" => 250,
"min" => 180,
"step" => 5,
"max" => 350,
'display_value' => 'text',
'compiler' => true
),
array(
'id' => "menu-separators",
'type' => 'switch',
'title' => __('Display Separators', $UltimoWP->textDomain),
'subtitle' => __('Select if you want to display the menu separators or not.', $UltimoWP->textDomain),
"default" => true,
'compiler' => false
),
array(
'id' => "menu-icons",
'type' => 'switch',
'title' => __('Display Icons', $UltimoWP->textDomain),
'subtitle' => __('Select if you want to display the menu icons or not.', $UltimoWP->textDomain),
"default" => true,
'compiler' => false
),
// array(
// 'id' => "menu-manage",
// 'type' => 'info',
// 'title' => __('You can hide, rename, change the icon for the menu items using WPAMM', $UltimoWP->textDomain),
// 'desc' => __('We added to Ultimo WP our awesome plugin WPAMM, that lets you hide, rename, reorder ad change the icon of the WordPress Admin Menu Items, based on user or roles! Try it out:
// <br><br><a href="'. admin_url('edit.php?post_type=amm') .'" class="button button-primary">Use WP Admin Menu Manager</a>', $UltimoWP->textDomain),
// //'desc' => __('You can hide, rename, change the icon for the menu items using WPAMM', $UltimoWP->textDomain),
// "default" => false,
// 'compiler' => false
// ),
)
);
// - - - - - - - - - - - - - -
// Footer
// - - - - - - - - - - - - - -
$sections[] = array(
'title' => __('Footer', $UltimoWP->textDomain),
'desc' => __('Change the footer texts.', $UltimoWP->textDomain),
'icon' => 'el-icon-chevron-down',
'fields' => array(
array(
'id' => 'footer-left-text',
'type' => 'editor',
'title' => __('Left Footer text', $UltimoWP->textDomain),
'subtitle' => __('Add your custom left footer text.', $UltimoWP->textDomain),
'desc' => __('To hide it, just save the field with at least one space (leaving it blank will display WordPress defaults).', $UltimoWP->textDomain),
'default' => '',
),
array(
'id' => 'footer-right-text',
'type' => 'editor',
'title' => __('Right Footer text', $UltimoWP->textDomain),
'subtitle' => __('Add your custom right footer text.', $UltimoWP->textDomain),
'desc' => __('To hide it, just save the field with at least one space (leaving it blank will display WordPress defaults, in this case, the wordpress version).', $UltimoWP->textDomain),
'default' => '',
),
)
);
// - - - - - - - - - - - - - -
// Login Page
// - - - - - - - - - - - - - -
$sections[] = array(
'title' => __('Login', $UltimoWP->textDomain),
'desc' => __('Custom Login page settings.', $UltimoWP->textDomain),
'icon' => 'el-icon-unlock',
'fields' => array(
array(
'id' => 'login-page-logo',
'type' => 'media',
'url' => true,
'title' => __('Login Page Logo', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the logo image you want to see in your login page.', $UltimoWP->textDomain),
'default' => array(
'url' => $UltimoWP->getAsset('logo.png')
),
),
array(
'id' => 'login-page-bg',
'type' => 'background',
'url' => true,
'title' => __('Login Page Background', $UltimoWP->textDomain),
// 'desc' => __('Basic media uploader with disabled URL input field.', $UltimoWP->textDomain),
'subtitle' => __('Select the background options you want to see in your login page.', $UltimoWP->textDomain),
'compiler' => array('background' => 'body.login '),
'default' => array(
'background-size' => 'cover',
'background-color' => '#222',
),
),
),
);
$this->sections = $sections;