Файловый менеджер - Редактировать - /home/bean7936/perfect-community.com/442aa3/uncode-core.tar
Назад
includes/compatibility.php 0000755 00000001765 15174671607 0011766 0 ustar 00 <?php /** * Third-party related functions. */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Translate content for qTranslate. */ function uncode_core_qtranslate_support( $content ) { if ( function_exists( 'qtranxf_getLanguage' ) ) { return __( $content ); } else { return $content; } } add_filter( 'uncode_filter_for_translation', 'uncode_core_qtranslate_support' ); /** * Remove Jetpack related posts from content. */ function uncode_core_jetpackme_remove_rp() { if ( class_exists( 'Jetpack_RelatedPosts' ) ) { $jprp = Jetpack_RelatedPosts::init(); $callback = array( $jprp, 'filter_add_target_to_dom' ); remove_filter( 'the_content', $callback, 40 ); } } add_filter( 'wp', 'uncode_core_jetpackme_remove_rp', 20 ); /** * Hide Yoast from content blocks. */ function uncode_core_hide_wp_seo_meta_box() { echo "<style>.post-type-uncodeblock #wpseo_meta {display: none !important;}</style>"; } add_action( 'admin_head', 'uncode_core_hide_wp_seo_meta_box' ); includes/shortcodes.php 0000755 00000005112 15174671607 0011260 0 ustar 00 <?php function uncode_hl_text( $atts, $content ) { extract( shortcode_atts( array( 'color' => 'accent', 'height' => '100', 'text_color' => '', 'offset' => '', 'opacity' => '', 'animate' => '', ), $atts ) ); $parent_style = $atts_output = $parent_output = ''; $parent_classes = array(); $span_classes = ''; if ( $color != 'default' ) { if ( substr( $color, 0, 1 ) === "#" ) { $span_classes .= '"bg":"' . sanitize_hex_color( $color ) . '",'; } else { $span_classes .= '"bg":"style-' . esc_attr( $color ) . '-bg",'; } } else { $span_classes .= '"bg":"headings-bg",'; } if ( $height !== '' ) { if ( is_numeric( $height ) ) { $height .= '%'; } $span_classes .= '"height":"' . esc_attr( $height ) . '",'; } if ( $offset !== '' ) { $span_classes .= '"offset":"' . esc_attr( $offset ) . '",'; } if ( $opacity !== '' ) { $span_classes .= '"opacity":"' . floatval( $opacity ) . '",'; } if ( $text_color !== '' ) { if ( substr( $text_color, 0, 1 ) === "#" ) { $parent_style .= 'color:' . sanitize_hex_color( $text_color ) . ';'; } else { $span_classes .= '"color":"text-' . $text_color . '-color",'; } } if ( $animate !== '' && $animate !== false && $animate !== 'false' ) { $span_classes .= '"animated":"yes",'; } if ( ! empty( $parent_classes ) ) { $parent_output = esc_attr(implode( ' ', $parent_classes )); } $parent_output = ' class="heading-text-highlight ' . $parent_output . '"'; if ( $parent_style !== '' ) { $parent_output .= ' style="' . $parent_style . '"'; } $atts_output = rtrim($span_classes,','); $atts_output = ' data-atts=\'{' . $atts_output . '}\''; return '<span' . $parent_output . $atts_output . '>' . $content . '</span>'; } add_shortcode( 'uncode_hl_text', 'uncode_hl_text' ); function uncode_text_icon( $atts, $content ) { extract( shortcode_atts( array( 'text' => '', 'icon' => '', 'position' => '', ), $atts ) ); global $front_background_colors; $classes = array( 'text-icon' ); $pre_el = ''; $after_el = ''; // Icons if ( $icon ) { if ( $position === 'after' ) { $after_el = '<span class="text-icon__icon"><i class="' . $icon . '"></i></span>'; $classes[] = 'text-icon--after'; } else { $pre_el = '<span class="text-icon__icon"><i class="' . $icon . '"></i></span>'; $classes[] = 'text-icon--before'; } } $html = '<span class="' . esc_attr( implode( ' ', $classes ) ) . '">' . $pre_el . '<span class="text-icon__text">' . esc_html( $text ) . '</span>' . $after_el . '</span>'; return $html; } add_shortcode( 'uncode_text_icon', 'uncode_text_icon' ); includes/theme-options/ot-loader.php 0000755 00000041366 15174671607 0013577 0 ustar 00 <?php /** * Plugin Name: OptionTree * Plugin URI: https://github.com/valendesigns/option-tree/ * Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. * Version: 2.5.4 * Author: Derek Herman * Author URI: http://valendesigns.com * License: GPLv3 */ /** * Forces Plugin Mode when OptionTree is already loaded and displays an admin notice. */ if ( class_exists( 'OT_Loader' ) && defined( 'OT_PLUGIN_MODE' ) && OT_PLUGIN_MODE == true ) { add_filter( 'ot_theme_mode', '__return_false', 999 ); function ot_conflict_notice() { echo '<div class="error"><p>' . esc_html__( 'OptionTree is installed as a plugin and also embedded in your current theme. Please deactivate the plugin to load the theme dependent version of OptionTree, and remove this warning.', 'uncode-core' ) . '</p></div>'; } add_action( 'admin_notices', 'ot_conflict_notice' ); } /** * This is the OptionTree loader class. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman */ if ( ! class_exists( 'OT_Loader' ) ) { class OT_Loader { /** * PHP5 constructor method. * * This method loads other methods of the class. * * @return void * * @access public * @since 2.0 */ public function __construct() { /* load languages */ $this->load_languages(); /* load OptionTree */ add_action( 'after_setup_theme', array( $this, 'load_option_tree' ), 1 ); } /** * Load the languages before everything else. * * @return void * * @access private * @since 2.1.3 */ private function load_languages() { /** * A quick check to see if we're in plugin mode. * * @since 2.1.3 */ define( 'OT_PLUGIN_MODE', strpos( dirname( __FILE__ ), 'plugins' . DIRECTORY_SEPARATOR . basename( dirname( __FILE__ ) ) ) !== false ? true : false ); /** * Path to the languages directory. * * This path will be relative in plugin mode and absolute in theme mode. * * @since 2.0.10 * @updated 2.4.1 */ if ( OT_PLUGIN_MODE ) { define( 'OT_LANG_DIR', trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) . trailingslashit( 'languages' ) ); } else { if ( apply_filters( 'ot_child_theme_mode', false ) == true ) { $path_array = @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); $path = ltrim( end( $path_array ), '/' ); define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' ); } else { $path_array = @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); $path = ltrim( end( $path_array ), '/' ); define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' ); } } } /** * Load OptionTree on the 'after_setup_theme' action. Then filters will * be availble to the theme, and not only when in Theme Mode. * * @return void * * @access public * @since 2.1.2 */ public function load_option_tree() { if ( ! defined( 'UNCODE_SLIM' ) ) { return; } /* setup the constants */ $this->constants(); /* include the required admin files */ $this->admin_includes(); /* include the required files */ $this->includes(); /* hook into WordPress */ $this->hooks(); } /** * Constants * * Defines the constants for use within OptionTree. Constants * are prefixed with 'OT_' to avoid any naming collisions. * * @return void * * @access private * @since 2.0 */ private function constants() { /** * Current Version number. */ define( 'OT_VERSION', '2.5.4' ); /** * For developers: Theme mode. * * Run a filter and set to true to enable OptionTree theme mode. * You must have this files parent directory inside of * your themes root directory. As well, you must include * a reference to this file in your themes functions.php. * * @since 2.0 */ define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) ); /** * For developers: Child Theme mode. TODO document * * Run a filter and set to true to enable OptionTree child theme mode. * You must have this files parent directory inside of * your themes root directory. As well, you must include * a reference to this file in your themes functions.php. * * @since 2.0.15 */ define( 'OT_CHILD_THEME_MODE', apply_filters( 'ot_child_theme_mode', false ) ); /** * For developers: Show Pages. * * Run a filter and set to false if you don't want to load the * settings & documentation pages in the admin area of WordPress. * * @since 2.0 */ define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) ); /** * For developers: Show Theme Options UI Builder * * Run a filter and set to false if you want to hide the * Theme Options UI page in the admin area of WordPress. * * @since 2.1 */ define( 'OT_SHOW_OPTIONS_UI', apply_filters( 'ot_show_options_ui', true ) ); /** * For developers: Show Settings Import * * Run a filter and set to false if you want to hide the * Settings Import options on the Import page. * * @since 2.1 */ define( 'OT_SHOW_SETTINGS_IMPORT', apply_filters( 'ot_show_settings_import', true ) ); /** * For developers: Show Settings Export * * Run a filter and set to false if you want to hide the * Settings Import options on the Import page. * * @since 2.1 */ define( 'OT_SHOW_SETTINGS_EXPORT', apply_filters( 'ot_show_settings_export', true ) ); /** * For developers: Show New Layout. * * Run a filter and set to false if you don't want to show the * "New Layout" section at the top of the theme options page. * * @since 2.0.10 */ define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) ); /** * For developers: Show Documentation * * Run a filter and set to false if you want to hide the Documentation. * * @since 2.1 */ define( 'OT_SHOW_DOCS', apply_filters( 'ot_show_docs', true ) ); /** * For developers: Custom Theme Option page * * Run a filter and set to false if you want to hide the OptionTree * Theme Option page and build your own. * * @since 2.1 */ define( 'OT_USE_THEME_OPTIONS', apply_filters( 'ot_use_theme_options', true ) ); /** * For developers: Meta Boxes. * * Run a filter and set to false to keep OptionTree from * loading the meta box resources. * * @since 2.0 */ define( 'OT_META_BOXES', apply_filters( 'ot_meta_boxes', true ) ); /** * For developers: Allow Unfiltered HTML in all the textareas. * * Run a filter and set to true if you want all the * users to be able to post anything in the textareas. * WARNING: This opens a security hole for low level users * to be able to post malicious scripts, you've been warned. * * @since 2.0 */ define( 'OT_ALLOW_UNFILTERED_HTML', apply_filters( 'ot_allow_unfiltered_html', false ) ); /** * Check if in theme mode. * * If OT_THEME_MODE and OT_CHILD_THEME_MODE is false, set the * directory path & URL like any other plugin. Otherwise, use * the parent or child themes root directory. * * @since 2.0 */ if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) { define( 'OT_DIR', plugin_dir_path( __FILE__ ) ); define( 'OT_URL', plugin_dir_url( __FILE__ ) ); } else { if ( true == OT_CHILD_THEME_MODE ) { $path_array = @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); $path = ltrim( end( $path_array ), '/' ); define( 'OT_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) ); define( 'OT_URL', trailingslashit( trailingslashit( get_stylesheet_directory_uri() ) . $path ) ); } else { $path_array = @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); $path = ltrim( end( $path_array ), '/' ); define( 'OT_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) ); define( 'OT_URL', trailingslashit( trailingslashit( get_template_directory_uri() ) . $path ) ); } } /** * Template directory URI for the current theme. * * @since 2.1 */ if ( true == OT_CHILD_THEME_MODE ) { define( 'OT_THEME_URL', get_stylesheet_directory_uri() ); } else { define( 'OT_THEME_URL', get_template_directory_uri() ); } } /** * Include admin files * * These functions are included on admin pages only. * * @return void * * @access private * @since 2.0 */ private function admin_includes() { /* exit early if we're not on an admin page */ if ( ! is_admin() ) return false; /* global include files */ $files = array( 'ot-functions-admin', 'ot-functions-option-types', 'ot-functions-compat', 'ot-settings-api' ); /* include the meta box api */ if ( OT_META_BOXES == true ) { $files[] = 'ot-meta-box-api'; } /* include the settings & docs pages */ if ( OT_SHOW_PAGES == true ) { $files[] = 'ot-functions-settings-page'; } /* require the files */ foreach ( $files as $file ) { $this->load_file( OT_DIR . "includes" . DIRECTORY_SEPARATOR . "{$file}.php" ); } /* Registers the Theme Option page */ add_action( 'init', 'ot_register_theme_options_page' ); /* Registers the Settings page */ if ( OT_SHOW_PAGES == true ) { add_action( 'init', 'ot_register_settings_page' ); } } /** * Include front-end files * * These functions are included on every page load * incase other plugins need to access them. * * @return void * * @access private * @since 2.0 */ private function includes() { $files = array( 'ot-functions', 'ot-functions-deprecated' ); /* require the files */ foreach ( $files as $file ) { $this->load_file( OT_DIR . "includes" . DIRECTORY_SEPARATOR . "{$file}.php" ); } } /** * Execute the WordPress Hooks * * @return void * * @access public * @since 2.0 */ private function hooks() { /* load the Meta Box assets */ if ( OT_META_BOXES == true ) { /* add scripts for metaboxes to post-new.php & post.php */ add_action( 'admin_print_scripts-post-new.php', 'ot_admin_scripts', 11 ); add_action( 'admin_print_scripts-post.php', 'ot_admin_scripts', 11 ); /* add styles for metaboxes to post-new.php & post.php */ add_action( 'admin_print_styles-post-new.php', 'ot_admin_styles', 11 ); add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 ); } /* Adds the Theme Option page to the admin bar */ add_action( 'admin_bar_menu', 'ot_register_theme_options_admin_bar_menu', 999 ); /* prepares the after save do_action */ add_action( 'admin_init', 'ot_after_theme_options_save', 1 ); /* add xml to upload filetypes array */ add_action( 'admin_init', 'ot_add_xml_to_upload_filetypes', 3 ); /* import */ add_action( 'admin_init', 'ot_import', 4 ); /* save settings */ add_action( 'admin_init', 'ot_save_settings', 6 ); /* save layouts */ add_action( 'admin_init', 'ot_modify_layouts', 7 ); /* dynamic front-end CSS */ add_action( 'wp_enqueue_scripts', 'ot_load_dynamic_css', 999 ); /* insert theme CSS dynamically */ add_action( 'ot_after_theme_options_save', 'ot_save_css' ); /* AJAX call to create a new section */ add_action( 'wp_ajax_add_section', array( $this, 'add_section' ) ); /* AJAX call to create a new setting */ add_action( 'wp_ajax_add_setting', array( $this, 'add_setting' ) ); /* AJAX call to create a new contextual help */ add_action( 'wp_ajax_add_the_contextual_help', array( $this, 'add_the_contextual_help' ) ); /* AJAX call to create a new choice */ add_action( 'wp_ajax_add_choice', array( $this, 'add_choice' ) ); /* AJAX call to create a new list item setting */ add_action( 'wp_ajax_add_list_item_setting', array( $this, 'add_list_item_setting' ) ); /* AJAX call to create a new layout */ add_action( 'wp_ajax_add_layout', array( $this, 'add_layout' ) ); /* AJAX call to create a new list item */ add_action( 'wp_ajax_add_list_item', array( $this, 'add_list_item' ) ); /* AJAX call to create a new social link */ add_action( 'wp_ajax_add_social_links', array( $this, 'add_social_links' ) ); } /** * Load a file * * @return void * * @access private * @since 2.0.15 */ private function load_file( $file ){ include_once( $file ); } /** * AJAX utility function for adding a new section. */ public function add_section() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_sections_view( ot_settings_id() . '[sections]', $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding a new setting. */ public function add_setting() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_settings_view( $_REQUEST['name'], $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding a new list item setting. */ public function add_list_item_setting() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_settings_view( $_REQUEST['name'] . '[settings]', $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding new contextual help content. */ public function add_the_contextual_help() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_contextual_help_view( $_REQUEST['name'], $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding a new choice. */ public function add_choice() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_choices_view( $_REQUEST['name'], $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding a new layout. */ public function add_layout() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { echo ot_layout_view( $_REQUEST['count'] ); } wp_die(); } /** * AJAX utility function for adding a new list item. */ public function add_list_item() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], uncode_core_safe_unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] ); } wp_die(); } /** * AJAX utility function for adding a new social link. */ public function add_social_links() { if ( current_user_can( 'manage_options' ) || apply_filters( 'uncode_core_option_tree_ajax_cap', false ) ) { ot_social_links_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], uncode_core_safe_unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] ); } wp_die(); } } /** * Instantiate the OptionTree loader class. * * @since 2.0 */ $ot_loader = new OT_Loader(); } /* End of file ot-loader.php */ /* Location: ./ot-loader.php */ includes/theme-options/includes/ot-functions-compat.php 0000755 00000005036 15174671607 0017422 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * Compatibility Functions. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /* run the actions & filters */ add_filter( 'ot_option_types_array', 'compat_ot_option_types_array', 10, 1 ); add_filter( 'ot_recognized_background_repeat', 'compat_ot_recognized_background_repeat', 10, 2 ); add_filter( 'ot_recognized_background_position', 'compat_ot_recognized_background_position', 10, 2 ); add_filter( 'ot_measurement_unit_types', 'compat_ot_measurement_unit_types', 10, 2 ); /** * Filters the option types array. * * Allows the old 'option_tree_option_types' filter to * change the new 'ot_option_types_array' return value. * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'compat_ot_option_types_array' ) ) { function compat_ot_option_types_array( $array ) { return apply_filters( 'option_tree_option_types', $array ); } } /** * Filters the recognized background repeat array. * * Allows the old 'recognized_background_repeat' filter to * change the new 'ot_recognized_background_repeat' return value. * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'compat_ot_recognized_background_repeat' ) ) { function compat_ot_recognized_background_repeat( $array, $id ) { return apply_filters( 'recognized_background_repeat', $array, $id ); } } /** * Filters the recognized background position array. * * Allows the old 'recognized_background_position' filter to * change the new 'ot_recognized_background_position' return value. * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'compat_ot_recognized_background_position' ) ) { function compat_ot_recognized_background_position( $array, $id ) { return apply_filters( 'recognized_background_position', $array, $id ); } } /** * Filters the measurement unit types array. * * Allows the old 'measurement_unit_types' filter to * change the new 'ot_measurement_unit_types' return value. * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'compat_ot_measurement_unit_types' ) ) { function compat_ot_measurement_unit_types( $array, $id ) { return apply_filters( 'measurement_unit_types', $array, $id ); } } /* End of file ot-functions-compat.php */ /* Location: ./includes/ot-functions-compat.php */ includes/theme-options/includes/ot-functions-deprecated.php 0000755 00000005217 15174671607 0020240 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * OptionTree deprecated functions * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /** * Displays or returns a value from the 'option_tree' array. * * @param string $item_id * @param array $options * @param bool $echo * @param bool $is_array * @param int $offset * @return mixed array or comma seperated lists of values * * @access public * @since 1.0.0 * @updated 2.0 * @deprecated 2.0 */ if ( ! function_exists( 'get_option_tree' ) ) { function get_option_tree( $item_id = '', $options = '', $echo = false, $is_array = false, $offset = -1 ) { /* load saved options */ if ( ! $options ) $options = get_option( ot_options_id() ); /* no value return */ if ( ! isset( $options[$item_id] ) || empty( $options[$item_id] ) ) return; /* set content value & strip slashes */ $content = option_tree_stripslashes( $options[$item_id] ); /* is an array */ if ( $is_array == true ) { /* saved as a comma seperated lists of values, explode into an array */ if ( !is_array( $content ) ) $content = explode( ',', $content ); /* get an array value using an offset */ if ( is_numeric( $offset ) && $offset >= 0 ) { $content = $content[$offset]; } else if ( ! is_numeric( $offset ) && isset( $content[$offset] ) ) { $content = $content[$offset]; } /* not an array */ } else if ( $is_array == false ) { /* saved as array, implode and return a comma seperated lists of values */ if ( is_array( $content ) ) $content = implode( ',', $content ); /* This is fucked */ } /* echo content */ if ( $echo ) echo wp_kses_post($content); return $content; } } /** * Custom stripslashes from single value or array. * * @param mixed $input * @return mixed * * @access public * @since 1.1.3 * @deprecated 2.0 */ if ( ! function_exists( 'option_tree_stripslashes' ) ) { function option_tree_stripslashes( $input ) { if ( is_array( $input ) ) { foreach( $input as &$val ) { if ( is_array( $val ) ) { $val = option_tree_stripslashes( $val ); } else { $val = stripslashes( $val ); } } } else { $input = stripslashes( $input ); } return $input; } } /* End of file ot-functions-deprecated.php */ /* Location: ./includes/ot-functions-deprecated.php */ includes/theme-options/includes/ot-functions-settings-page.php 0000755 00000036515 15174671607 0020717 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * OptionTree settings page functions. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /** * Create option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_theme_options_ui' ) ) { function ot_type_theme_options_ui() { global $blog_id; echo '<form method="post" id="option-tree-settings-form">'; /* form nonce */ wp_nonce_field( 'option_tree_settings_form', 'option_tree_settings_nonce' ); /* format setting outer wrapper */ echo '<div class="format-setting type-textblock has-desc">'; /* description */ echo '<div class="description">'; echo '<h4>'. esc_html__( 'Warning!', 'uncode-core' ) . '</h4>'; echo '<p class="warning">' . sprintf( wp_kses(__( 'Go to the %s page if you want to save data, this page is for adding settings.', 'uncode-core' ), array( 'a' => array( 'href' => array() ), 'code' => array() ) ), '<a href="' . get_admin_url( $blog_id, apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) . '"><code>Appearance->Theme Options</code></a>' ) . '</p>'; echo '<p class="warning">' . sprintf( wp_kses(__( 'If you\'re unsure or not completely positive that you should be editing these settings, you should read the %s first.', 'uncode-core' ), array( 'a' => array( 'href' => array() ), 'code' => array() ) ), '<a href="' . get_admin_url( $blog_id, 'admin.php?page=ot-documentation' ) . '"><code>Options Utils->Documentation</code></a>' ) . '</p>'; echo '<h4>'. esc_html__( 'Things could break or be improperly displayed to the end-user if you do one of the following:', 'uncode-core' ) . '</h4>'; echo '<p class="warning">' . esc_html__( 'Give two sections the same ID, give two settings the same ID, give two contextual help content areas the same ID, don\'t create any settings, or have a section at the end of the settings list.', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'You can create as many settings as your project requires and use them how you see fit. When you add a setting here, it will be available on the Theme Options page for use in your theme. To separate your settings into sections, click the "Add Section" button, fill in the input fields, and a new navigation menu item will be created.', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'All of the settings can be sorted and rearranged to your liking with Drag & Drop. Don\'t worry about the order in which you create your settings, you can always reorder them.', 'uncode-core' ) . '</p>'; echo '</div>'; /* get the saved settings */ $settings = get_option( ot_settings_id() ); /* wrap settings array */ echo '<div class="format-setting-inner">'; /* set count to zero */ $count = 0; /* loop through each section and its settings */ echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_list" data-name="' . ot_settings_id() . '[settings]">'; if ( isset( $settings['sections'] ) ) { foreach( $settings['sections'] as $section ) { /* section */ echo '<li class="' . ( $count == 0 ? 'ui-state-disabled' : 'ui-state-default' ) . ' list-section">' . ot_sections_view( ot_settings_id() . '[sections]', $count, $section ) . '</li>'; /* increment item count */ $count++; /* settings in this section */ if ( isset( $settings['settings'] ) ) { foreach( $settings['settings'] as $setting ) { if ( isset( $setting['section'] ) && $setting['section'] == $section['id'] ) { echo '<li class="ui-state-default list-setting">' . ot_settings_view( ot_settings_id() . '[settings]', $count, $setting ) . '</li>'; /* increment item count */ $count++; } } } } } echo '</ul>'; /* buttons */ echo '<a href="javascript:void(0);" class="option-tree-section-add option-tree-ui-button button hug-left">' . esc_html__( 'Add Section', 'uncode-core' ) . '</a>'; echo '<a href="javascript:void(0);" class="option-tree-setting-add option-tree-ui-button button">' . esc_html__( 'Add Setting', 'uncode-core' ) . '</a>'; echo '<button class="option-tree-ui-button button button-primary right hug-right">' . esc_html__( 'Save Changes', 'uncode-core' ) . '</button>'; /* sidebar textarea */ echo ' <div class="format-setting-label" id="contextual-help-label"> <h3 class="label">' . esc_html__( 'Contextual Help', 'uncode-core' ) . '</h3> </div> <div class="format-settings" id="contextual-help-setting"> <div class="format-setting type-textarea no-desc"> <div class="description"><strong>' . esc_html__( 'Contextual Help Sidebar', 'uncode-core' ) . '</strong>: ' . esc_html__( 'If you decide to add contextual help to the Theme Option page, enter the optional "Sidebar" HTML here. This would be an extremely useful place to add links to your themes documentation or support forum. Only after you\'ve added some content below will this display to the user.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <textarea class="textarea" rows="10" cols="40" name="' . ot_settings_id(). '[contextual_help][sidebar]">' . ( isset( $settings['contextual_help']['sidebar'] ) ? esc_html( $settings['contextual_help']['sidebar'] ) : '' ) . '</textarea> </div> </div> </div>'; /* set count to zero */ $count = 0; /* loop through each contextual_help content section */ echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_settings_help" data-name="' . ot_settings_id(). '[contextual_help][content]">'; if ( isset( $settings['contextual_help']['content'] ) ) { foreach( $settings['contextual_help']['content'] as $content ) { /* content */ echo '<li class="ui-state-default list-contextual-help">' . ot_contextual_help_view( ot_settings_id() . '[contextual_help][content]', $count, $content ) . '</li>'; /* increment content count */ $count++; } } echo '</ul>'; echo '<a href="javascript:void(0);" class="option-tree-help-add option-tree-ui-button button hug-left">' . esc_html__( 'Add Contextual Help Content', 'uncode-core' ) . '</a>'; //echo '<button class="option-tree-ui-button button button-primary right hug-right">' . esc_html__( 'Save Changes', 'uncode-core' ) . '</button>'; echo '</div>'; echo '</div>'; echo '</form>'; } } /** * Import Data option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_import_data' ) ) { function ot_type_import_data() { echo '<form method="post" id="import-data-form">'; /* form nonce */ wp_nonce_field( 'import_data_form', 'import_data_nonce' ); /* format setting outer wrapper */ echo '<div class="format-setting type-textarea has-desc">'; /* description */ echo '<div class="description">'; if ( OT_SHOW_SETTINGS_IMPORT ) echo '<p>' . esc_html__( 'Only after you\'ve imported the Settings should you try and update your Theme Options.', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'To import your Theme Options copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Theme Options" button.', 'uncode-core' ) . '</p>'; /* button */ echo '<button class="option-tree-ui-button button button-primary right hug-right">' . esc_html__( 'Import Theme Options', 'uncode-core' ) . '</button>'; echo '</div>'; /* textarea */ echo '<div class="format-setting-inner">'; echo '<textarea rows="10" cols="40" name="import_data" id="import_data" class="textarea"></textarea>'; echo '</div>'; echo '</div>'; echo '</form>'; } } /** * Import Layouts option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_import_layouts' ) ) { function ot_type_import_layouts() { echo '<form method="post" id="import-layouts-form">'; /* form nonce */ wp_nonce_field( 'import_layouts_form', 'import_layouts_nonce' ); /* format setting outer wrapper */ echo '<div class="format-setting type-textarea has-desc">'; /* description */ echo '<div class="description">'; if ( OT_SHOW_SETTINGS_IMPORT ) echo '<p>' . esc_html__( 'Only after you\'ve imported the Settings should you try and update your Layouts.', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'To import your Layouts copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Layouts" button. Keep in mind that when you import your layouts, the active layout\'s saved data will write over the current data set for your Theme Options.', 'uncode-core' ) . '</p>'; /* button */ echo '<button class="option-tree-ui-button button button-primary right hug-right">' . esc_html__( 'Import Layouts', 'uncode-core' ) . '</button>'; echo '</div>'; /* textarea */ echo '<div class="format-setting-inner">'; echo '<textarea rows="10" cols="40" name="import_layouts" id="import_layouts" class="textarea"></textarea>'; echo '</div>'; echo '</div>'; echo '</form>'; } } /** * Export Data option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_export_data' ) ) { function ot_type_export_data() { /* format setting outer wrapper */ echo '<div class="format-setting type-textarea simple has-desc">'; /* description */ echo '<div class="description">'; echo '<p>' . wp_kses(__( 'You can export or back up your Theme Options data by highlighting this text, copying it, and pasting it into a blank text file. Then you can simply paste it into the Options Utils > Import Theme Options text area on another website. This is also a way to create manual backups of your Theme Options quickly.', 'uncode-core' ), array( 'strong' => array( ), 'code' => array() ) ) . '</p>'; echo '</div>'; /* get theme options data */ $data = get_option( ot_options_id() ); $data = ! empty( $data ) ? ot_encode( serialize( $data ) ) : ''; echo '<div class="format-setting-inner">'; echo '<textarea rows="10" cols="40" name="export_data" id="export_data" class="textarea">' . $data . '</textarea>'; echo '</div>'; echo '</div>'; } } /** * Export Layouts option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_export_layouts' ) ) { function ot_type_export_layouts() { /* format setting outer wrapper */ echo '<div class="format-setting type-textarea simple has-desc">'; /* description */ echo '<div class="description">'; echo '<p>' . wp_kses(__( 'Export your Layouts by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the <code>Options Utils->Settings->Import</code> <strong>Layouts</strong> textarea on another web site.', 'uncode-core' ), array( 'strong' => array( ), 'code' => array() ) ) . '</p>'; echo '</div>'; /* get layout data */ $layouts = get_option( ot_layouts_id() ); $layouts = ! empty( $layouts ) ? ot_encode( serialize( $layouts ) ) : ''; echo '<div class="format-setting-inner">'; echo '<textarea rows="10" cols="40" name="export_layouts" id="export_layouts" class="textarea">' . $layouts . '</textarea>'; echo '</div>'; echo '</div>'; } } /** * Modify Layouts option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_modify_layouts' ) ) { function ot_type_modify_layouts() { echo '<form method="post" id="option-tree-settings-form">'; /* form nonce */ wp_nonce_field( 'option_tree_modify_layouts_form', 'option_tree_modify_layouts_nonce' ); /* format setting outer wrapper */ echo '<div class="format-setting type-textarea has-desc">'; /* description */ echo '<div class="description">'; echo '<p>' . esc_html__( 'To add a new layout enter a unique lower case alphanumeric string (dashes allowed) in the text field and click "Save Layouts".', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'As well, you can activate, remove, and drag & drop the order; all situations require you to click "Save Layouts" for the changes to be applied.', 'uncode-core' ) . '</p>'; echo '<p>' . esc_html__( 'When you create a new layout it will become active and any changes made to the Theme Options will be applied to it. If you switch back to a different layout immediately after creating a new layout that new layout will have a snapshot of the current Theme Options data attached to it.', 'uncode-core' ) . '</p>'; if ( OT_SHOW_DOCS ) echo '<p>' . wp_kses(__( 'Visit <code>Options Utils->Documentation->Layouts Overview</code> to see a more in-depth description of what layouts are and how to use them.', 'uncode-core' ), array( 'code' => array() ) ) . '</p>'; echo '</div>'; echo '<div class="format-setting-inner">'; /* get the saved layouts */ $layouts = get_option( ot_layouts_id() ); /* set active layout */ $active_layout = isset( $layouts['active_layout'] ) ? $layouts['active_layout'] : ''; echo '<input type="hidden" name="' . ot_layouts_id() . '[active_layout]" value="' . esc_attr( $active_layout ) . '" class="active-layout-input" />'; /* add new layout */ echo '<input type="text" name="' . ot_layouts_id() . '[_add_new_layout_]" value="" class="widefat option-tree-ui-input" autocomplete="off" />'; /* loop through each layout */ echo '<ul class="option-tree-setting-wrap option-tree-sortable" id="option_tree_layouts">'; if ( is_array( $layouts ) && ! empty( $layouts ) ) { foreach( $layouts as $key => $data ) { /* skip active layout array */ if ( $key == 'active_layout' ) continue; /* content */ echo '<li class="ui-state-default list-layouts">' . ot_layout_view( $key, $data, $active_layout ) . '</li>'; } } echo '</ul>'; echo '<button class="option-tree-ui-button button button-primary right hug-right">' . esc_html__( 'Save Layouts', 'uncode-core' ) . '</button>'; echo '</div>'; echo '</div>'; echo '</form>'; } } /* End of file ot-functions-settings-page.php */ /* Location: ./includes/ot-functions-settings-page.php */ includes/theme-options/includes/ot-settings-api.php 0000755 00000101320 15174671607 0016531 0 ustar 00 <?php if ( ! defined( 'OT_VERSION') ) exit( 'No direct script access allowed' ); /** * OptionTree Settings API * * This class loads all the methods and helpers specific to a Settings page. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman */ if ( ! class_exists( 'OT_Settings' ) ) { class OT_Settings { /* the options array */ private $options; /* hooks for targeting admin pages */ private $page_hook; /** * Constructor * * @param array An array of options * @return void * * @access public * @since 2.0 */ public function __construct( $args ) { $this->options = $args; /* return early if not viewing an admin page or no options */ if ( ! is_admin() || ! is_array( $this->options ) ) return false; /* load everything */ $this->hooks(); } /** * Execute the WordPress Hooks * * @return void * * @access public * @since 2.0 */ public function hooks() { /** * Filter the `admin_menu` action hook priority. * * @since 2.5.0 * * @param int $priority The priority. Default '10'. */ $priority = apply_filters( 'ot_admin_menu_priority', 10 ); /* add pages & menu items */ add_action( 'admin_menu', array( $this, 'add_page' ), $priority ); /* register sections */ add_action( 'admin_init', array( $this, 'add_sections' ) ); /* register settings */ add_action( 'admin_init', array( $this, 'add_settings' ) ); /* reset options */ add_action( 'admin_init', array( $this, 'reset_options' ), 10 ); /* initialize settings */ add_action( 'admin_init', array( $this, 'initialize_settings' ), 11 ); } /** * Loads each admin page * * @return void * * @access public * @since 2.0 */ public function add_page() { /* loop through options */ foreach( (array) $this->options as $option ) { /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /** * Theme Check... stop nagging me about this kind of stuff. * The damn admin pages are required for OT to function, duh! */ $theme_check_bs = 'add_menu_page'; $theme_check_bs2 = 'add_submenu_page'; /* load page in WP top level menu */ if ( ! isset( $page['parent_slug'] ) || empty( $page['parent_slug'] ) ) { $page_hook = $theme_check_bs( $page['page_title'], $page['menu_title'], $page['capability'], $page['menu_slug'], array( $this, 'display_page' ), $page['icon_url'], $page['position'] ); /* load page in WP sub menu */ } else { $page_hook = $theme_check_bs2( $page['parent_slug'], $page['page_title'], $page['menu_title'], $page['capability'], $page['menu_slug'], array( $this, 'display_page' ) ); } /* only load if not a hidden page */ if ( ! isset( $page['hidden_page'] ) ) { /* associate $page_hook with page id */ $this->page_hook[$page['id']] = $page_hook; /* add scripts */ add_action( 'admin_print_scripts-' . $page_hook, array( $this, 'scripts' ) ); /* add styles */ add_action( 'admin_print_styles-' . $page_hook, array( $this, 'styles' ) ); /* add contextual help */ add_action( 'load-' . $page_hook, array( $this, 'help' ) ); } } } return false; } /** * Loads the scripts * * @return void * * @access public * @since 2.0 */ public function scripts() { ot_admin_scripts(); } /** * Loads the styles * * @return void * * @access public * @since 2.0 */ public function styles() { ot_admin_styles(); } /** * Loads the contextual help for each page * * @return void * * @access public * @since 2.0 */ public function help() { $screen = get_current_screen(); /* loop through options */ foreach( (array) $this->options as $option ) { /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* verify page */ if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) { /* set up the help tabs */ if ( ! empty( $page['contextual_help']['content'] ) ) { foreach( $page['contextual_help']['content'] as $contextual_help ) { $screen->add_help_tab( array( 'id' => esc_attr( $contextual_help['id'] ), 'title' => esc_attr( $contextual_help['title'] ), 'content' => htmlspecialchars_decode( $contextual_help['content'] ), ) ); } } /* set up the help sidebar */ if ( ! empty( $page['contextual_help']['sidebar'] ) ) { $screen->set_help_sidebar( htmlspecialchars_decode( $page['contextual_help']['sidebar'] ) ); } } } } return false; } /** * Loads the content for each page * * @return string * * @access public * @since 2.0 */ public function display_page() { $screen = get_current_screen(); /* loop through settings */ foreach( (array) $this->options as $option ) { /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* verify page */ if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) { $show_buttons = isset( $page['show_buttons'] ) && $page['show_buttons'] == false ? false : true; /* update active layout content */ if ( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) { $layouts = get_option( ot_layouts_id() ); /* has active layout */ if ( isset( $layouts['active_layout'] ) ) { $option_tree = get_option( $option['id'] ); $layouts[$layouts['active_layout']] = ot_encode( serialize( $option_tree ) ); update_option( ot_layouts_id(), $layouts ); } } echo '<div class="wrap settings-wrap uncode-wrap" id ="page-' . $page['id'] . '">'; if ( $page[ 'id' ] == 'settings' ) { echo uncode_admin_panel_page_title( 'utils' ); } else { echo uncode_admin_panel_page_title( true, array( 'page_title' => esc_html__( 'Theme Options', 'uncode-core' ), 'description' => esc_html__( 'Theme Options are the backbone of Uncode. They are logically organised and give you full control over your website design and settings.', 'uncode-core' ), ) ); } if ( $page[ 'id' ] != 'settings' ) { echo ot_alert_message( $page ); settings_errors( 'option-tree' ); /* Header */ // echo '<div id="option-tree-header-wrap">'; // echo '<ul id="option-tree-header">'; // echo '<li id="option-tree-logo">' . apply_filters( 'ot_header_logo_link', '<a href="http://wordpress.org/extend/plugins/option-tree/" target="_blank">OptionTree</a>', $page['id'] ) . '</li>'; // echo '<li id="option-tree-version"><span>' . apply_filters( 'ot_header_version_text', 'OptionTree ' . OT_VERSION, $page['id'] ) . '</span></li>'; // // Add additional theme specific links here. // do_action( 'ot_header_list', $page['id'] ); // echo '</ul>'; // echo '</div>'; } if ( $page[ 'id' ] == 'settings' ) { echo '<div class="uncode-admin-panel">'; echo uncode_admin_panel_menu( 'utils' ); echo '<div class="uncode-admin-panel__content">'; //echo '<h2 class="uncode-admin-panel__heading">' . esc_html__( 'Options Utils', 'uncode-core' ) . '</h2>'; echo ot_alert_message( $page ); settings_errors( 'option-tree' ); } /* remove forms on the custom settings pages */ if ( $show_buttons ) { $is_ajax_enabled = get_option( 'uncode_ajax_theme_panel' ) && get_option( 'uncode_ajax_theme_panel' ) != 'no' ? true : false; $is_ajax_enabled = apply_filters( 'uncode_ajax_theme_panel_enabled', $is_ajax_enabled ); $form_class = 'uncode-admin-panel'; $form_class .= $is_ajax_enabled ? ' ajax-enabled' : ''; echo '<form action="options.php" method="post" id="option-tree-settings-api" class="' . $form_class . '">'; settings_fields( $option['id'] ); } else { //echo '<div id="option-tree-settings-api">'; } $active_theme = wp_get_theme(); $theme_name = $active_theme->Name; $theme_version = $active_theme->Version; if ( is_child_theme() ) { $parent_theme = $active_theme->parent(); $theme_name = $parent_theme->Name; $theme_version = $parent_theme->Version; } if ( $show_buttons ) { echo '<div id="option-tree-header" class="option-tree-header-wrap">'; echo '<span id="option-tree-site-name">' . get_bloginfo('name') . '</span>'; echo '<span id="option-tree-version">' . $theme_name . ' ' . $theme_version . '</span>'; echo '</div>'; } echo '<div class="option-tree-opts-wrap">'; if ( $page[ 'id' ] != 'settings' ) { /* Sub Header */ echo '<div id="option-tree-sub-header">'; echo '<div id="theme-options-ajax-message"></div>'; if ( $show_buttons ) { echo '<button class="option-tree-ui-button button button-primary right option-tree-save-button uncode-spinning"><span><span class="uncode-ot-spinner"></span><span class="uncode-ot-ok"></span><span class="uncode-ot-no"></span>' . $page['button_text'] . '</span></button>'; } echo '</div>'; // <!-- #option-tree-sub-header --> } /* Navigation */ echo '<div class="ui-tabs">'; /* check for sections */ if ( isset( $page['sections'] ) && count( $page['sections'] ) > 0 ) { echo '<ul class="ui-tabs-nav uncode-admin-panel__left">'; /* Header */ //echo '<div id="option-tree-header-wrap">'; if ( $page[ 'id' ] == 'settings' ) { echo '<h2 class="uncode-admin-panel__heading">' . esc_html__('Options', 'uncode-core') . '</h2>'; } $group = ''; $labels = array(); /* loop through page sections */ foreach( $page['sections'] as $section ) { if ( isset($section['group']) ) { if ( isset($section['group_icon']) && $section['group_icon'] != '' ) $labels[sanitize_title($section['group'])]['icon'] = '<i class="fa ' . $section['group_icon'] . '"></i>'; $labels[sanitize_title($section['group'])][] = $section; } else { $labels['no-group'][] = $section; } } foreach( (array) $labels as $key => $label ) { foreach( (array) $label as $key2 => $section ) { $group_icon = isset($labels[$key]['icon']) && $labels[$key]['icon'] != '' ? $labels[$key]['icon'] : ''; if ( $key2 !== 'icon' ) { if ( isset($section['group']) && $group != $section['group'] ) { echo '<li id="group_' . sanitize_title($section['group']) . '" class="ot-section-group-label"><span>' . $group_icon . $section['group'] . '</span></li>'; $group = $section['group']; } elseif ( $key2 == 'no-group' ) { echo '<li id="group_no_group" class="ot-section-group-label"></li>'; } echo '<li id="tab_' . sanitize_title($section['id']) . '" class="ot-section-label"><a href="#section_' . sanitize_title($section['id']) . '">' . $section['title'] . '</a></li>'; } } } echo '</ul>'; } /* sections */ echo '<div id="poststuff" class="metabox-holder uncode-admin-panel__right">'; echo '<div id="post-body">'; echo '<div id="post-body-content">'; $this->do_settings_sections( $_GET['page'] ); echo '</div>'; echo '</div>'; echo '</div>'; echo '<div class="clear"></div>'; echo '</div>'; // <!-- .ui-tabs --> /* buttons */ // if ( $show_buttons ) { // echo '<div class="option-tree-ui-buttons">'; // echo '<button class="option-tree-ui-button button button-primary right option-tree-save-button"><span><span class="uncode-ot-spinner"></span><span class="uncode-ot-ok"></span><span class="uncode-ot-no"></span>' . $page['button_text'] . '</span></button>'; // echo '</div>'; // } echo '</div>'; // <!-- .option-tree-opts-wrap --> if ($show_buttons) { echo '</form>'; // <!-- form#option-tree-settings-api --> } else { '</div>'; // <!-- #option-tree-settings-api --> } if ( $show_buttons || ( $page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true ) ) echo '<div class="uncode-ot-bottom-toolbar">'; /* layouts form */ if ( $page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true ) ot_theme_options_layouts_form(); /* reset button */ if ( $show_buttons ) { // Reset theme panel echo '<form method="post" action="' . str_replace( '&settings-updated=true', '', $_SERVER["REQUEST_URI"] ) . '" class="option-tree-reset-form">'; /* form nonce */ wp_nonce_field( 'option_tree_reset_form', 'option_tree_reset_nonce' ); echo '<input type="hidden" name="action" value="reset" />'; echo '<button type="button" class="option-tree-ui-button button button-secondary left reset-settings" title="' . esc_html__( 'Reset Options', 'uncode-core' ) . '">' . esc_html__( 'Reset Options', 'uncode-core' ) . '</button>'; echo '</form>'; // <!-- .option-tree-reset-form --> // Toggle AJAX echo '<form method="post" class="toggle-ajax-theme-panel">'; /* form nonce */ wp_nonce_field( 'uncode_toggle_ajax_theme_panel', 'uncode_toggle_ajax_theme_panel_nonce' ); $toggle_ajax_text = $is_ajax_enabled ? esc_html__( 'Disable AJAX Saving', 'uncode-core' ) : esc_html__( 'Enable AJAX Saving', 'uncode-core' ); $toggle_ajax_action = $is_ajax_enabled ? 'disable-ajax' : 'enable-ajax'; echo '<input type="hidden" name="toggle_ajax" value="' . $toggle_ajax_action . '">'; echo '<button type="submit" class="option-tree-ui-button button button-secondary left toggle-ajax" title="' . $toggle_ajax_text . '">' . $toggle_ajax_text . '</button>'; echo '</form>'; // <!-- .toggle-ajax-theme-panel --> } if ( $show_buttons || ( $page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true ) ) echo '</div>'; // <!-- .uncode-ot-bottom-toolbar --> if ( $page[ 'id' ] == 'settings' ) { echo '</div>'; // <!-- .uncode-admin-panel__content --> echo '</div>'; // <!-- .uncode-admin-panel --> } echo '</div>'; // <!-- .uncode-wrap --> } } } return false; } /** * Adds sections to the page * * @return void * * @access public * @since 2.0 */ public function add_sections() { /* loop through options */ foreach( (array) $this->options as $option ) { /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* loop through page sections */ foreach( (array) $this->get_sections( $page ) as $section ) { if ( isset( $section['id'] ) && isset( $section['title'] ) && isset( $page['menu_slug'] ) ) { /* add each section */ add_settings_section( $section['id'], $section['title'], array( $this, 'display_section' ), $page['menu_slug'] ); } } } } return false; } /** * Callback for add_settings_section() * * @return string * * @access public * @since 2.0 */ public function display_section() { /* currently pointless */ } /** * Add settings the the page * * @return void * * @access public * @since 2.0 */ public function add_settings() { /* loop through options */ foreach( (array) $this->options as $option ) { register_setting( $option['id'], $option['id'], array ( $this, 'sanitize_callback' ) ); /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* loop through page settings */ foreach( (array) $this->get_the_settings( $page ) as $setting ) { /* skip if no setting ID */ if ( ! isset( $setting['id'] ) ) continue; /* add get_option param to the array */ $setting['get_option'] = $option['id']; /* add each setting */ add_settings_field( $setting['id'], $setting['label'], array( $this, 'display_setting' ), $page['menu_slug'], $setting['section'], $setting ); } } } return false; } /** * Callback for add_settings_field() to build each setting by type * * @param array Setting object array * @return string * * @access public * @since 2.0 */ public function display_setting( $args = array() ) { extract( $args ); /* get current saved data */ $options = get_option( $get_option, false ); // Set field value $field_value = isset( $options[$id] ) ? $options[$id] : ''; /* set standard value */ if ( isset( $std ) ) { $field_value = ot_filter_std_value( $field_value, $std ); } // Allow the descriptions to be filtered before being displayed $desc = apply_filters( 'ot_filter_description', ( isset( $desc ) ? $desc : '' ), $id ); /* build the arguments array */ $_args = array( 'type' => $type, 'field_id' => $id, 'field_name' => $get_option . '[' . $id . ']', 'field_value' => $field_value, 'field_desc' => $desc, 'field_std' => isset( $std ) ? $std : '', 'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15, 'field_post_type' => isset( $post_type ) && ! empty( $post_type ) ? $post_type : 'post', 'field_taxonomy' => isset( $taxonomy ) && ! empty( $taxonomy ) ? $taxonomy : 'category', 'field_min_max_step'=> isset( $min_max_step ) && ! empty( $min_max_step ) ? $min_max_step : '0,100,1', 'field_condition' => isset( $condition ) && ! empty( $condition ) ? $condition : '', 'field_operator' => isset( $operator ) && ! empty( $operator ) ? $operator : 'and', 'field_class' => isset( $class ) ? $class : '', 'field_choices' => isset( $choices ) && ! empty( $choices ) ? $choices : array(), 'field_settings' => isset( $settings ) && ! empty( $settings ) ? $settings : array(), 'post_id' => 0, 'get_option' => $get_option, 'field_warning' => isset( $field['warning'] ) && is_array( $field['warning'] ) ? $field['warning'] : array(), ); /* get the option HTML */ echo ot_display_by_type( $_args ); } /** * Sets the option standards if nothing yet exists. * * @return void * * @access public * @since 2.0 */ public function initialize_settings() { $default_header_image = get_option('uncode_default_header_image'); /* loop through options */ foreach( (array) $this->options as $option ) { /* skip if option is already set */ if ( isset( $option['id'] ) && get_option( $option['id'], false ) ) { return false; } $defaults = array(); /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* loop through page settings */ foreach( (array) $this->get_the_settings( $page ) as $setting ) { if ( isset( $setting['std'] ) ) { $defaults[$setting['id']] = ot_validate_setting( $setting['std'], $setting['type'], $setting['id'] ); } } } update_option( $option['id'], $defaults ); uncode_create_dynamic_css(); } return false; } /** * Sanitize callback for register_setting() * * @return string * * @access public * @since 2.0 */ public function sanitize_callback( $input ) { $current_settings = get_option( ot_settings_id() ); /* loop through options */ foreach( (array) $this->options as $option ) { $current_options = get_option( $option['id'] ); /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* loop through page settings */ foreach( (array) $this->get_the_settings( $page ) as $setting ) { /* verify setting has a type & value */ if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) { /* validate setting */ if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { /* required title setting */ $required_setting = array( array( 'id' => 'title', 'label' => esc_html__( 'Title', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'class' => 'option-tree-setting-title', 'post_type' => '', 'choices' => array() ) ); /* get the settings array */ $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array(); /* settings are empty for some odd ass reason get the defaults */ if ( empty( $settings ) ) { $settings = 'slider' == $setting['type'] ? ot_slider_settings( $setting['id'] ) : ot_list_item_settings( $setting['id'] ); } /* merge the two settings array */ $settings = array_merge( $required_setting, $settings ); /* create an empty WPML id array */ $wpml_ids = array(); foreach( $input[$setting['id']] as $k => $setting_array ) { foreach( $settings as $sub_setting ) { /* setup the WPML ID */ $wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k; /* add id to array */ $wpml_ids[] = $wpml_id; /* verify sub setting has a type & value */ if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) { /* validate setting */ $input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id ); } } } } else if ( is_array( $input[$setting['id']] ) && $setting['type'] == 'social-links' ) { /* get the settings array */ $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array(); /* settings are empty get the defaults */ if ( empty( $settings ) ) { $settings = ot_social_links_settings( $setting['id'] ); } /* create an empty WPML id array */ $wpml_ids = array(); foreach( $input[$setting['id']] as $k => $setting_array ) { foreach( $settings as $sub_setting ) { /* setup the WPML ID */ $wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k; /* add id to array */ $wpml_ids[] = $wpml_id; /* verify sub setting has a type & value */ if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) { /* validate setting */ $input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id ); } } } } else { $input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'], $setting['id'] ); } } /* unregister WPML strings that were deleted from lists and sliders */ if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { if ( ! isset( $wpml_ids ) ) $wpml_ids = array(); foreach( $current_settings['settings'] as $check_setting ) { if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) { foreach( $current_options[$setting['id']] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { $id = $setting['id'] . '_' . $ckey . '_' . $key; if ( ! in_array( $id, $wpml_ids ) ) { ot_wpml_unregister_string( $id ); } } } } } } /* unregister WPML strings that were deleted from social links */ if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && $setting['type'] == 'social-links' ) { if ( ! isset( $wpml_ids ) ) $wpml_ids = array(); foreach( $current_settings['settings'] as $check_setting ) { if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) { foreach( $current_options[$setting['id']] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { $id = $setting['id'] . '_' . $ckey . '_' . $key; if ( ! in_array( $id, $wpml_ids ) ) { ot_wpml_unregister_string( $id ); } } } } } } } } } return $input; } /** * Helper function to get the pages array for an option * * @param array Option array * @return mixed * * @access public * @since 2.0 */ public function get_pages( $option = array() ) { if ( empty( $option ) ) return false; /* check for pages */ if ( isset( $option['pages'] ) && ! empty( $option['pages'] ) ) { /* return pages array */ return $option['pages']; } return false; } /** * Helper function to get the sections array for a page * * @param array Page array * @return mixed * * @access public * @since 2.0 */ public function get_sections( $page = array() ) { if ( empty( $page ) ) return false; /* check for sections */ if ( isset( $page['sections'] ) && ! empty( $page['sections'] ) ) { /* return sections array */ return $page['sections']; } return false; } /** * Helper function to get the settings array for a page * * @param array Page array * @return mixed * * @access public * @since 2.0 */ public function get_the_settings( $page = array() ) { if ( empty( $page ) ) return false; /* check for settings */ if ( isset( $page['settings'] ) && ! empty( $page['settings'] ) ) { /* return settings array */ return $page['settings']; } return false; } /** * Prints out all settings sections added to a particular settings page * * @global $wp_settings_sections Storage array of all settings sections added to admin pages * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections * * @param string The slug name of the page whos settings sections you want to output * @return string * * @access public * @since 2.0 */ public function do_settings_sections( $page ) { global $wp_settings_sections, $wp_settings_fields; if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[$page] ) ) { return false; } foreach ( (array) $wp_settings_sections[$page] as $section ) { if ( ! isset( $section['id'] ) ) continue; echo '<div id="section_' . $section['id'] . '" class="ui-tabs-panel">'; call_user_func( $section['callback'], $section ); if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[$page] ) || ! isset( $wp_settings_fields[$page][$section['id']] ) ) continue; echo '<div class="inside">'; $this->do_settings_fields( $page, $section['id'] ); echo '</div>'; echo '</div>'; } } /** * Print out the settings fields for a particular settings section * * @global $wp_settings_fields Storage array of settings fields and their pages/sections * * @param string $page Slug title of the admin page who's settings fields you want to show. * @param string $section Slug title of the settings section who's fields you want to show. * @return string * * @access public * @since 2.0 */ public function do_settings_fields( $page, $section ) { global $wp_settings_fields; if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) ) return; foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { $conditions = ''; if ( isset( $field['args']['condition'] ) && ! empty( $field['args']['condition'] ) ) { $conditions = ' data-condition="' . $field['args']['condition'] . '"'; $conditions.= isset( $field['args']['operator'] ) && in_array( $field['args']['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['args']['operator'] . '"' : ''; } // Build the setting CSS class if ( isset( $field['args']['class'] ) && ! empty( $field['args']['class'] ) ) { $classes = explode( ' ', $field['args']['class'] ); foreach( $classes as $key => $value ) { $classes[$key] = $value . '-wrap'; } $class = 'format-settings ' . implode( ' ', $classes ); } else { $class = 'format-settings'; } $has_warning = isset( $field['args']['warning'] ) && is_array( $field['args']['warning'] ) ? true : false; if ( $has_warning ) { $class .= ' format-settings--with-warning'; } echo '<div id="setting_' . $field['id'] . '" class="' . $class . '"' . $conditions . '>'; echo '<div class="format-setting-wrap">'; if ( $field['args']['type'] != 'textblock' && ! empty( $field['title'] ) ) { echo '<div class="format-setting-label">'; echo '<h3 class="label">' . $field['title']; if ( isset($field['args']['desc']) && $field['args']['desc'] !== '' ) echo '<span class="toggle-description"></span>'; echo '</h3>'; if ( isset($field['args']['desc']) && $field['args']['desc'] !== '' ) echo '<small class="description"><span>' . htmlspecialchars_decode( $field['args']['desc'] ) . '</span></small>'; echo '</div>'; } call_user_func( $field['callback'], $field['args'] ); if ( $has_warning ) { $warning = $field['args']['warning']; echo '<div class="format-setting-warning">'; if ( isset( $warning['title'] ) && $warning['title'] ) { echo '<span class="format-setting-warning__title">'; if ( isset( $warning['icon'] ) && $warning['icon'] ) { echo '<i class="' . $warning['icon'] . '"></i>'; } echo $warning['title']; echo '</span>'; } if ( isset( $warning['message'] ) && $warning['message'] ) { echo '<p class="format-setting-warning__message">' . $warning['message'] . '</p>'; } if ( isset( $warning['button'] ) && $warning['button'] ) { echo '<button class="format-setting-warning__button button" type="button">' . $warning['button'] . '</button>'; } echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Resets page options before the screen is displayed * * @return void * * @access public * @since 2.0 */ public function reset_options() { /* check for reset action */ if ( isset( $_POST['option_tree_reset_nonce'] ) && wp_verify_nonce( $_POST['option_tree_reset_nonce'], 'option_tree_reset_form' ) ) { /* loop through options */ foreach( (array) $this->options as $option ) { /* loop through pages */ foreach( (array) $this->get_pages( $option ) as $page ) { /* verify page */ if ( isset( $_GET['page'] ) && $_GET['page'] == $page['menu_slug'] ) { /* reset options */ delete_option( $option['id'] ); delete_option( 'uncode_font_options' ); } } } } return false; } } } /** * This method instantiates the settings class & builds the UI. * * @uses OT_Settings() * * @param array Array of arguments to create settings * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_register_settings' ) ) { function ot_register_settings( $args ) { if ( ! $args ) return; $ot_settings = new OT_Settings( $args ); } } /* End of file ot-settings-api.php */ /* Location: ./includes/ot-settings-api.php */ includes/theme-options/includes/ot-functions.php 0000755 00000014754 15174671607 0016150 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * OptionTree functions * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /** * Theme Options ID * * @return string * * @access public * @since 2.3.0 */ if ( ! function_exists( 'ot_options_id' ) ) { function ot_options_id() { return apply_filters( 'ot_options_id', 'uncode' ); } } /** * Theme Settings ID * * @return string * * @access public * @since 2.3.0 */ if ( ! function_exists( 'ot_settings_id' ) ) { function ot_settings_id() { return apply_filters( 'ot_settings_id', 'uncode_settings' ); } } /** * Theme Layouts ID * * @return string * * @access public * @since 2.3.0 */ if ( ! function_exists( 'ot_layouts_id' ) ) { function ot_layouts_id() { return apply_filters( 'ot_layouts_id', 'uncode_layouts' ); } } /** * Get Option. * * Helper function to return the option value. * If no value has been saved, it returns $default. * * @param string The option ID. * @param string The default option value. * @return mixed * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_get_option' ) ) { function ot_get_option( $option_id, $default = '' ) { /* get the saved options */ $options = get_option( ot_options_id() ); /* look for the saved value */ if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) { $value = ot_wpml_filter( $options, $option_id ); $value = apply_filters( 'uncode_ot_get_option', $value, $option_id ); $value = apply_filters( 'uncode_ot_get_option' . $option_id, $value, $option_id ); return $value; } $default = apply_filters( 'uncode_ot_get_option', $default, $option_id ); $default = apply_filters( 'uncode_ot_get_option' . $option_id, $default, $option_id ); return $default; } } /** * Echo Option. * * Helper function to echo the option value. * If no value has been saved, it echos $default. * * @param string The option ID. * @param string The default option value. * @return mixed * * @access public * @since 2.2.0 */ if ( ! function_exists( 'ot_echo_option' ) ) { function ot_echo_option( $option_id, $default = '' ) { echo ot_get_option( $option_id, $default ); } } /** * Filter the return values through WPML * * @param array $options The current options * @param string $option_id The option ID * @return mixed * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_wpml_filter' ) ) { function ot_wpml_filter( $options, $option_id ) { // Return translated strings using WMPL if ( function_exists('icl_t') ) { $settings = get_option( ot_settings_id() ); if ( isset( $settings['settings'] ) ) { foreach( $settings['settings'] as $setting ) { // List Item & Slider if ( $option_id == $setting['id'] && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { foreach( $options[$option_id] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { $id = $option_id . '_' . $ckey . '_' . $key; $_string = icl_t( 'Theme Options', $id, $cvalue ); if ( ! empty( $_string ) ) { $options[$option_id][$key][$ckey] = $_string; } } } // List Item & Slider } else if ( $option_id == $setting['id'] && $setting['type'] == 'social-links' ) { foreach( $options[$option_id] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { $id = $option_id . '_' . $ckey . '_' . $key; $_string = icl_t( 'Theme Options', $id, $cvalue ); if ( ! empty( $_string ) ) { $options[$option_id][$key][$ckey] = $_string; } } } // All other acceptable option types } else if ( $option_id == $setting['id'] && in_array( $setting['type'], apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) ) ) ) { $_string = icl_t( 'Theme Options', $option_id, $options[$option_id] ); if ( ! empty( $_string ) ) { $options[$option_id] = $_string; } } } } } return $options[$option_id]; } } /** * Enqueue the dynamic CSS. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_load_dynamic_css' ) ) { function ot_load_dynamic_css() { /* don't load in the admin */ if ( is_admin() ) return; /* grab a copy of the paths */ $ot_css_file_paths = get_option( 'ot_css_file_paths', array() ); if ( is_multisite() ) { $ot_css_file_paths = get_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths ); } if ( ! empty( $ot_css_file_paths ) ) { $last_css = ''; /* loop through paths */ foreach( $ot_css_file_paths as $key => $path ) { if ( '' != $path && file_exists( $path ) ) { $parts = explode( '/wp-content', $path ); if ( isset( $parts[1] ) ) { $css = set_url_scheme( WP_CONTENT_URL ) . $parts[1]; if ( $last_css !== $css ) { /* enqueue filtered file */ wp_enqueue_style( 'ot-dynamic-' . $key, $css, false, OT_VERSION ); $last_css = $css; } } } } } } } /** * Registers the Theme Option page link for the admin bar. * * @return void * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_register_theme_options_admin_bar_menu' ) ) { function ot_register_theme_options_admin_bar_menu( $wp_admin_bar ) { if ( ! current_user_can( apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ) ) || ! is_admin_bar_showing() ) return; $wp_admin_bar->add_node( array( 'parent' => 'appearance', 'id' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ), 'title' => apply_filters( 'ot_theme_options_page_title', esc_html__( 'Theme Options', 'uncode-core' ) ), 'href' => admin_url( 'admin.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) ); } } /* End of file ot-functions.php */ /* Location: ./includes/ot-functions.php */ includes/theme-options/includes/ot-functions-admin.php 0000755 00000372456 15174671607 0017244 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * Functions used only while viewing the admin UI. * * Limit loading these function only when needed * and not in the front end. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /** * Registers the Theme Option page * * @uses ot_register_settings() * * @return void * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_register_theme_options_page' ) ) { function ot_register_theme_options_page() { /* get the settings array */ $get_settings = get_option( ot_settings_id() ); /* sections array */ $sections = isset( $get_settings['sections'] ) ? $get_settings['sections'] : array(); /* settings array */ $settings = isset( $get_settings['settings'] ) ? $get_settings['settings'] : array(); /* contexual_help array */ $contextual_help = isset( $get_settings['contextual_help'] ) ? $get_settings['contextual_help'] : array(); /* build the Theme Options */ if ( function_exists( 'ot_register_settings' ) && OT_USE_THEME_OPTIONS ) { ot_register_settings( array( array( 'id' => ot_options_id(), 'pages' => array( array( 'id' => 'ot_theme_options', 'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'my-menu' ), 'page_title' => apply_filters( 'ot_theme_options_page_title', esc_html__( 'Theme Options', 'uncode-core' ) ), 'menu_title' => apply_filters( 'ot_theme_options_menu_title', esc_html__( 'Theme Options', 'uncode-core' ) ), 'capability' => $caps = apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ), 'menu_slug' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ), 'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ), 'position' => apply_filters( 'ot_theme_options_position', null ), 'updated_message' => apply_filters( 'ot_theme_options_updated_message', esc_html__( 'Theme Options updated.', 'uncode-core' ) ), 'reset_message' => apply_filters( 'ot_theme_options_reset_message', esc_html__( 'Theme Options reset.', 'uncode-core' ) ), 'button_text' => apply_filters( 'ot_theme_options_button_text', esc_html__( 'Save Changes', 'uncode-core' ) ), 'contextual_help' => apply_filters( 'ot_theme_options_contextual_help', $contextual_help ), 'sections' => apply_filters( 'ot_theme_options_sections', $sections ), 'settings' => apply_filters( 'ot_theme_options_settings', $settings ) ) ) ) ) ); // Filters the options.php to add the minimum user capabilities. if (version_compare(PHP_VERSION, '7.2.0') >= 0) add_filter( 'option_page_capability_' . ot_options_id(), function($caps) { return $caps; }, 999 ); else add_filter( 'option_page_capability_' . ot_options_id(), create_function( '$caps', "return '$caps';" ), 999 ); } } } /** * Registers the Settings page * * @uses ot_register_settings() * * @return void * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_register_settings_page' ) ) { function ot_register_settings_page() { global $ot_has_custom_theme_options; // Display UI Builder admin notice if ( OT_SHOW_OPTIONS_UI == true && isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'uncode-settings' && ( $ot_has_custom_theme_options == true || has_action( 'admin_init', 'custom_theme_options' ) || has_action( 'init', 'custom_theme_options' ) ) ) { function ot_has_custom_theme_options() { echo '<div class="error"><p>' . esc_html__( 'The Theme Options UI Builder is being overridden by a custom file in your theme. Any changes you make via the UI Builder will not be saved.', 'uncode-core' ) . '</p></div>'; } add_action( 'admin_notices', 'ot_has_custom_theme_options' ); } // Create the filterable pages array $ot_register_pages_array = array( array( 'id' => 'ot', 'page_title' => esc_html__( 'OptionTree', 'uncode-core' ), 'menu_title' => esc_html__( 'OptionTree', 'uncode-core' ), 'capability' => 'edit_theme_options', 'menu_slug' => 'uncode-settings', 'icon_url' => null, 'position' => 61, 'hidden_page' => true ), array( 'id' => 'settings', 'parent_slug' => 'my-menu', 'page_title' => esc_html__( 'Settings', 'uncode-core' ), 'menu_title' => esc_html__( 'Settings', 'uncode-core' ), 'capability' => 'edit_theme_options', 'menu_slug' => 'uncode-settings', 'icon_url' => null, 'position' => null, 'updated_message' => esc_html__( 'Theme Options updated.', 'uncode-core' ), 'reset_message' => esc_html__( 'Theme Options reset.', 'uncode-core' ), 'button_text' => esc_html__( 'Save Settings', 'uncode-core' ), 'show_buttons' => false, 'sections' => array( array( 'id' => 'create_setting', 'title' => esc_html__( 'Theme Options UI', 'uncode-core' ) ), array( 'id' => 'export', 'title' => esc_html__( 'Export', 'uncode-core' ) ), array( 'id' => 'import', 'title' => esc_html__( 'Import', 'uncode-core' ) ), array( 'id' => 'layouts', 'title' => esc_html__( 'Layouts', 'uncode-core' ) ) ), 'settings' => array( array( 'id' => 'import_data_text', 'label' => esc_html__( 'Theme Options', 'uncode-core' ), 'type' => 'import-data', 'section' => 'import' ), array( 'id' => 'import_layouts_text', 'label' => esc_html__( 'Layouts', 'uncode-core' ), 'type' => 'import-layouts', 'section' => 'import' ), array( 'id' => 'export_data_text', 'label' => esc_html__( 'Theme Options', 'uncode-core' ), 'type' => 'export-data', 'section' => 'export' ), array( 'id' => 'export_layout_text', 'label' => esc_html__( 'Layouts', 'uncode-core' ), 'type' => 'export-layouts', 'section' => 'export' ), array( 'id' => 'modify_layouts_text', 'label' => esc_html__( 'Layout Management', 'uncode-core' ), 'type' => 'modify-layouts', 'section' => 'layouts' ) ) ), ); // Loop over the settings and remove as needed. foreach( $ot_register_pages_array as $key => $page ) { // Remove various options from the Settings UI. if ( $page['id'] == 'settings' ) { // Remove the Theme Options UI if ( OT_SHOW_OPTIONS_UI == false ) { foreach( $page['sections'] as $section_key => $section ) { if ( $section['id'] == 'create_setting' ) { unset($ot_register_pages_array[$key]['sections'][$section_key]); } } foreach( $page['settings'] as $setting_key => $setting ) { if ( $setting['section'] == 'create_setting' ) { unset($ot_register_pages_array[$key]['settings'][$setting_key]); } } } // Remove parts of the Imports UI if ( OT_SHOW_SETTINGS_IMPORT == false ) { foreach( $page['settings'] as $setting_key => $setting ) { if ( $setting['section'] == 'import' && in_array( $setting['id'], array('import_xml_text', 'import_settings_text' ) ) ) { unset($ot_register_pages_array[$key]['settings'][$setting_key]); } } } // Remove parts of the Export UI if ( OT_SHOW_SETTINGS_EXPORT == false ) { foreach( $page['settings'] as $setting_key => $setting ) { if ( $setting['section'] == 'export' && in_array( $setting['id'], array('export_settings_file_text', 'export_settings_text' ) ) ) { unset($ot_register_pages_array[$key]['settings'][$setting_key]); } } } // Remove the Layouts UI if ( OT_SHOW_NEW_LAYOUT == false ) { foreach( $page['sections'] as $section_key => $section ) { if ( $section['id'] == 'layouts' ) { unset($ot_register_pages_array[$key]['sections'][$section_key]); } } foreach( $page['settings'] as $setting_key => $setting ) { if ( $setting['section'] == 'layouts' ) { unset($ot_register_pages_array[$key]['settings'][$setting_key]); } } } } // Remove the Documentation UI. if ( OT_SHOW_DOCS == false && $page['id'] == 'documentation' ) { unset( $ot_register_pages_array[$key] ); } } $ot_register_pages_array = apply_filters( 'ot_register_pages_array', $ot_register_pages_array ); // Register the pages. ot_register_settings( array( array( 'id' => ot_settings_id(), 'pages' => $ot_register_pages_array ) ) ); } } /** * Runs directly after the Theme Options are save. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_after_theme_options_save' ) ) { function ot_after_theme_options_save() { $page = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : ''; $updated = isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ? true : false; /* only execute after the theme options are saved */ if ( apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) == $page && $updated ) { /* grab a copy of the theme options */ $options = get_option( ot_options_id() ); /* execute the action hook and pass the theme options to it */ do_action( 'ot_after_theme_options_save', $options ); } } } /** * Validate the options by type before saving. * * This function will run on only some of the option types * as all of them don't need to be validated, just the * ones users are going to input data into; because they * can't be trusted. * * @param mixed Setting value * @param string Setting type * @param string Setting field ID * @param string WPML field ID * @return mixed * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_validate_setting' ) ) { function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { /* exit early if missing data */ if ( ! $input || ! $type || ! $field_id ) return $input; $input = apply_filters( 'ot_validate_setting', $input, $type, $field_id ); /* WPML Register and Unregister strings */ if ( ! empty( $wmpl_id ) ) { /* Allow filtering on the WPML option types */ $single_string_types = apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) ); if ( in_array( $type, $single_string_types ) ) { if ( ! empty( $input ) ) { ot_wpml_register_string( $wmpl_id, $input ); } else { ot_wpml_unregister_string( $wmpl_id ); } } } if ( 'background' == $type ) { //$input['background-color'] = ot_validate_setting( $input['background-color'], 'colorpicker', $field_id ); $input['background-image'] = isset( $input['background-image'] ) ? ot_validate_setting( $input['background-image'], 'upload', $field_id ) : ''; // Loop over array and check for values foreach( (array) $input as $key => $value ) { if ( ! empty( $value ) ) { $has_value = true; } } // No value; set to empty if ( ! isset( $has_value ) ) { $input = ''; } } else if ( 'border' == $type ) { // Loop over array and set errors or unset key from array. foreach( $input as $key => $value ) { // Validate width if ( $key == 'width' && ! empty( $value ) && ! is_numeric( $value ) ) { $input[$key] = '0'; add_settings_error( 'option-tree', 'invalid_border_width', sprintf( wp_kses(__( 'The %s input field for %s only allows numeric values.', 'uncode-core' ), array( 'code' => array() ) ), '<code>width</code>', '<code>' . $field_id . '</code>' ), 'error' ); } // Validate color if ( $key == 'color' && ! empty( $value ) ) { $input[$key] = ot_validate_setting( $value, 'colorpicker', $field_id ); } // Unset keys with empty values. if ( empty( $value ) ) { unset( $input[$key] ); } } if ( empty( $input ) ) { $input = ''; } } else if ( 'box-shadow' == $type ) { // Validate inset $input['inset'] = isset( $input['inset'] ) ? 'inset' : ''; // Validate offset-x $input['offset-x'] = ot_validate_setting( $input['offset-x'], 'text', $field_id ); // Validate offset-y $input['offset-y'] = ot_validate_setting( $input['offset-y'], 'text', $field_id ); // Validate blur-radius $input['blur-radius'] = ot_validate_setting( $input['blur-radius'], 'text', $field_id ); // Validate spread-radius $input['spread-radius'] = ot_validate_setting( $input['spread-radius'], 'text', $field_id ); // Validate color $input['color'] = ot_validate_setting( $input['color'], 'colorpicker', $field_id ); // Unset keys with empty values. foreach( $input as $key => $value ) { if ( empty( $value ) ) { unset( $input[$key] ); } } // Set empty array to empty string. if ( empty( $input ) ) { $input = ''; } } else if ( 'colorpicker' == $type ) { /* return empty & set error */ if ( 0 === preg_match( '/^#([a-f0-9]{6}|[a-f0-9]{3})$/i', $input ) && 0 === preg_match( '/^rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]{1,4})\s*\)/i', $input ) ) { $input = ''; add_settings_error( 'option-tree', 'invalid_hex', sprintf( wp_kses(__( 'The %s Colorpicker only allows valid hexadecimal or rgba values.', 'uncode-core' ), array( 'code' => array() ) ), '<code>' . $field_id . '</code>' ), 'error' ); } } else if ( 'colorpicker-opacity' == $type ) { // Not allowed if ( is_array( $input ) ) { $input = ''; } // Validate color $input = ot_validate_setting( $input, 'colorpicker', $field_id ); } else if ( in_array( $type, array( 'css', 'javascript', 'text', 'textarea', 'textarea-simple' ) ) ) { if ( ! current_user_can( 'unfiltered_html' ) && OT_ALLOW_UNFILTERED_HTML == false ) { $input = wp_kses_post( $input ); } } else if ( 'dimension' == $type ) { // Loop over array and set error keys or unset key from array. foreach( $input as $key => $value ) { if ( ! empty( $value ) && ! is_numeric( $value ) && $key !== 'unit' ) { $errors[] = $key; } if ( empty( $value ) ) { unset( $input[$key] ); } } /* return 0 & set error */ if ( isset( $errors ) ) { foreach( $errors as $error ) { $input[$error] = '0'; add_settings_error( 'option-tree', 'invalid_dimension_' . $error, sprintf( wp_kses(__( 'The %s input field for %s only allows numeric values.', 'uncode-core' ), array( 'code' => array() ) ), '<code>' . $error . '</code>', '<code>' . $field_id . '</code>' ), 'error' ); } } if ( empty( $input ) ) { $input = ''; } } else if ( 'link-color' == $type ) { // Loop over array and check for values if ( is_array( $input ) && ! empty( $input ) ) { foreach( $input as $key => $value ) { if ( ! empty( $value ) ) { $input[$key] = ot_validate_setting( $input[$key], 'colorpicker', $field_id . '-' . $key ); $has_value = true; } } } // No value; set to empty if ( ! isset( $has_value ) ) { $input = ''; } } else if ( 'measurement' == $type ) { $input[0] = sanitize_text_field( $input[0] ); // No value; set to empty if ( empty( $input[0] ) && empty( $input[1] ) ) { $input = ''; } } else if ( 'upload' == $type ) { if( filter_var( $input, FILTER_VALIDATE_INT ) === FALSE ) { $input = esc_url_raw( $input ); } } else if ( 'social-links' == $type ) { // Loop over array and check for values, plus sanitize the text field foreach( (array) $input as $key => $value ) { if ( ! empty( $value ) && is_array( $value ) ) { foreach( (array) $value as $item_key => $item_value ) { if ( ! empty( $item_value ) ) { $has_value = true; $input[$key][$item_key] = sanitize_text_field( $item_value ); } } } } // No value; set to empty if ( ! isset( $has_value ) ) { $input = ''; } } $input = apply_filters( 'ot_after_validate_setting', $input, $type, $field_id ); return $input; } } /** * Setup the default admin styles * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_admin_styles' ) ) { function ot_admin_styles() { global $wp_styles, $post; /* execute styles before actions */ do_action( 'ot_admin_styles_before' ); /* load WP colorpicker */ wp_enqueue_style( 'wp-color-picker' ); /* load the RTL stylesheet */ $wp_styles->add_data( 'ot-admin','rtl', true ); /* Remove styles added by the Easy Digital Downloads plugin */ if ( isset( $post->post_type ) && $post->post_type == 'post' ) wp_dequeue_style( 'jquery-ui-css' ); /** * Filter the screen IDs used to dequeue `jquery-ui-css`. * * @since 2.5.0 * * @param array $screen_ids An array of screen IDs. */ $screen_ids = apply_filters( 'ot_dequeue_jquery_ui_css_screen_ids', array( 'toplevel_page_uncode-settings', 'optiontree_page_ot-documentation', 'appearance_page_ot-theme-options' ) ); /* Remove styles added by the WP Review plugin and any custom pages added through filtering */ if ( in_array( get_current_screen()->id, $screen_ids ) ) { wp_dequeue_style( 'plugin_name-admin-ui-css' ); wp_dequeue_style( 'jquery-ui-css' ); } /* execute styles after actions */ do_action( 'ot_admin_styles_after' ); } } /** * Setup the default admin scripts * * @uses add_thickbox() Include Thickbox for file uploads * @uses wp_enqueue_script() Add OptionTree scripts * @uses wp_localize_script() Used to include arbitrary Javascript data * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_admin_scripts' ) ) { function ot_admin_scripts() { /* execute scripts before actions */ do_action( 'ot_admin_scripts_before' ); $screen = get_current_screen(); if ( isset( $screen->id ) && ( $screen->id === 'uncode_page_uncode-options' || $screen->id === 'uncode_page_uncode-settings' ) ) { if ( function_exists( 'wp_enqueue_media' ) ) { /* WP 3.5 Media Uploader */ wp_enqueue_media(); } else { /* Legacy Thickbox */ add_thickbox(); } } /* load jQuery-ui slider */ wp_enqueue_script( 'jquery-ui-slider' ); /* load WP colorpicker */ wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_script( 'ot-drag', OT_URL . 'assets/js/min/dom-drag.min.js', array( 'jquery' ), '1.0.1' ); wp_enqueue_script( 'ot-colorpicker', OT_URL . 'assets/js/min/colorpicker.min.js', array( 'jquery' ), '1.0.1' ); wp_enqueue_script( 'ot-gradx', OT_URL . 'assets/js/gradX.js', array( 'jquery' ), '1.0.1' ); /* load Ace Editor for CSS Editing */ wp_enqueue_script( 'ace-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js', null, '1.2.3' ); /* load all the required scripts */ wp_enqueue_script( 'ot-admin-js', OT_URL . 'assets/js/min/ot-admin.min.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-sortable', 'jquery-ui-slider', 'wp-color-picker' ), OT_VERSION ); /* create localized JS array */ $localized_array = array( 'ajax' => admin_url( 'admin-ajax.php' ), 'upload_text' => apply_filters( 'ot_upload_text', esc_html__( 'Send to OptionTree', 'uncode-core' ) ), 'remove_media_text' => esc_html__( 'Remove Media', 'uncode-core' ), 'reset_agree' => esc_html__( 'Are you sure you want to reset back to the defaults?', 'uncode-core' ), 'remove_no' => esc_html__( 'You can\'t remove this! But you can edit the values.', 'uncode-core' ), 'remove_agree' => esc_html__( 'Are you sure you want to remove this?', 'uncode-core' ), 'activate_layout_agree' => esc_html__( 'Are you sure you want to activate this layout?', 'uncode-core' ), 'setting_limit' => esc_html__( 'Sorry, you can\'t have settings three levels deep.', 'uncode-core' ), 'delete' => esc_html__( 'Delete Gallery', 'uncode-core' ), 'edit' => esc_html__( 'Edit Gallery', 'uncode-core' ), 'create' => esc_html__( 'Create Gallery', 'uncode-core' ), 'confirm' => esc_html__( 'Are you sure you want to delete this Gallery?', 'uncode-core' ), 'date_current' => esc_html__( 'Today', 'uncode-core' ), 'date_time_current' => esc_html__( 'Now', 'uncode-core' ), 'date_close' => esc_html__( 'Close', 'uncode-core' ), 'replace' => esc_html__( 'Featured Image', 'uncode-core' ), 'with' => esc_html__( 'Image', 'uncode-core' ) ); /* localized script attached to 'option_tree' */ wp_localize_script( 'ot-admin-js', 'option_tree', $localized_array ); /* execute scripts after actions */ do_action( 'ot_admin_scripts_after' ); } } /** * Helper function to update the CSS option type after save. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_save_css' ) ) { function ot_save_css( $options ) { /* grab a copy of the settings */ $settings = get_option( ot_settings_id() ); /* has settings */ if ( isset( $settings['settings'] ) ) { /* loop through sections and insert CSS when needed */ foreach( $settings['settings'] as $k => $setting ) { /* is the CSS option type */ if ( isset( $setting['type'] ) && 'css' == $setting['type'] ) { /* insert CSS into dynamic.css */ if ( isset( $options[$setting['id']] ) && '' !== $options[$setting['id']] ) { ot_insert_css_with_markers( $setting['id'], $options[$setting['id']] ); /* remove old CSS from dynamic.css */ } else { ot_remove_old_css( $setting['id'] ); } } } } } } /** * Helper function to load filters for XML mime type. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_add_xml_to_upload_filetypes' ) ) { function ot_add_xml_to_upload_filetypes() { add_filter( 'upload_mimes', 'ot_upload_mimes' ); add_filter( 'wp_mime_type_icon', 'ot_xml_mime_type_icon', 10, 2 ); } } /** * Filter 'upload_mimes' and add xml. * * @param array $mimes An array of valid upload mime types * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_upload_mimes' ) ) { function ot_upload_mimes( $mimes ) { $mimes['xml'] = 'application/xml'; return $mimes; } } /** * Filters 'wp_mime_type_icon' and have xml display as a document. * * @param string $icon The mime icon * @param string $mime The mime type * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_xml_mime_type_icon' ) ) { function ot_xml_mime_type_icon( $icon, $mime ) { if ( $mime == 'application/xml' || $mime == 'text/xml' ) return wp_mime_type_icon( 'document' ); return $icon; } } /** * Import before the screen is displayed. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_import' ) ) { function ot_import() { /* check and verify import theme options data nonce */ if ( isset( $_POST['import_data_nonce'] ) && wp_verify_nonce( $_POST['import_data_nonce'], 'import_data_form' ) ) { /* default message */ $message = 'failed'; /* textarea value */ $options = isset( $_POST['import_data'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST['import_data'] ) ) : ''; /* get settings array */ $settings = get_option( ot_settings_id() ); /* has options */ if ( is_array( $options ) ) { /* validate options */ if ( is_array( $settings ) ) { foreach( $settings['settings'] as $setting ) { if ( isset( $options[$setting['id']] ) ) { $content = ot_stripslashes( $options[$setting['id']] ); $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] ); } } } /* execute the action hook and pass the theme options to it */ do_action( 'ot_before_theme_options_save', $options ); /* update the option tree array */ update_option( ot_options_id(), $options ); $message = 'success'; } /* redirect accordingly */ wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-data', 'message' => $message ), $_POST['_wp_http_referer'] ) ) ); exit; } /* check and verify import layouts nonce */ if ( isset( $_POST['import_layouts_nonce'] ) && wp_verify_nonce( $_POST['import_layouts_nonce'], 'import_layouts_form' ) ) { /* default message */ $message = 'failed'; /* textarea value */ $layouts = isset( $_POST['import_layouts'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST['import_layouts'] ) ) : ''; /* get settings array */ $settings = get_option( ot_settings_id() ); /* has layouts */ if ( is_array( $layouts ) ) { /* validate options */ if ( is_array( $settings ) ) { foreach( $layouts as $key => $value ) { if ( $key == 'active_layout' ) continue; $options = unserialize( ot_decode( $value ) ); foreach( $settings['settings'] as $setting ) { if ( isset( $options[$setting['id']] ) ) { $content = ot_stripslashes( $options[$setting['id']] ); $options[$setting['id']] = ot_validate_setting( $content, $setting['type'], $setting['id'] ); } } $layouts[$key] = ot_encode( serialize( $options ) ); } } /* update the option tree array */ if ( isset( $layouts['active_layout'] ) ) { $new_options = unserialize( ot_decode( $layouts[$layouts['active_layout']] ) ); /* execute the action hook and pass the theme options to it */ do_action( 'ot_before_theme_options_save', $new_options ); update_option( ot_options_id(), $new_options ); } /* update the option tree layouts array */ update_option( ot_layouts_id(), $layouts ); $message = 'success'; } /* redirect accordingly */ wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'import-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) ) ); exit; } return false; } } /** * Reusable XMl import helper function. * * @param string $file The path to the file. * @return mixed False or an array of settings. * * @access public * @since 2.0.8 */ if ( ! function_exists( 'ot_import_xml' ) ) { function ot_import_xml( $file ) { $get_data = wp_remote_get( $file ); if ( is_wp_error( $get_data ) ) return false; $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : false; if ( $rawdata ) { $section_count = 0; $settings_count = 0; $section = ''; $settings = array(); $xml = new SimpleXMLElement( $rawdata ); foreach ( $xml->row as $value ) { /* heading is a section now */ if ( $value->item_type == 'heading' ) { /* add section to the sections array */ $settings['sections'][$section_count]['id'] = (string) $value->item_id; $settings['sections'][$section_count]['title'] = (string) $value->item_title; /* save the last section id to use in creating settings */ $section = (string) $value->item_id; /* increment the section count */ $section_count++; } else { /* add setting to the settings array */ $settings['settings'][$settings_count]['id'] = (string) $value->item_id; $settings['settings'][$settings_count]['label'] = (string) $value->item_title; $settings['settings'][$settings_count]['desc'] = (string) $value->item_desc; $settings['settings'][$settings_count]['section'] = $section; $settings['settings'][$settings_count]['type'] = ot_map_old_option_types( (string) $value->item_type ); $settings['settings'][$settings_count]['std'] = ''; $settings['settings'][$settings_count]['class'] = ''; /* textarea rows */ $rows = ''; if ( in_array( $settings['settings'][$settings_count]['type'], array( 'css', 'javascript', 'textarea' ) ) ) { if ( (int) $value->item_options > 0 ) { $rows = (int) $value->item_options; } else { $rows = 15; } } $settings['settings'][$settings_count]['rows'] = $rows; /* post type */ $post_type = ''; if ( in_array( $settings['settings'][$settings_count]['type'], array( 'custom-post-type-select', 'custom-post-type-checkbox' ) ) ) { if ( '' != (string) $value->item_options ) { $post_type = (string) $value->item_options; } else { $post_type = 'post'; } } $settings['settings'][$settings_count]['post_type'] = $post_type; /* choices */ $choices = array(); if ( in_array( $settings['settings'][$settings_count]['type'], array( 'checkbox', 'radio', 'select' ) ) ) { if ( '' != (string) $value->item_options ) { $choices = ot_convert_string_to_array( (string) $value->item_options ); } } $settings['settings'][$settings_count]['choices'] = $choices; $settings_count++; } } /* make sure each setting has a section just incase */ if ( isset( $settings['sections'] ) && isset( $settings['settings'] ) ) { foreach( $settings['settings'] as $k => $setting ) { if ( '' == $setting['section'] ) { $settings['settings'][$k]['section'] = $settings['sections'][0]['id']; } } } return $settings; } return false; } } /** * Save settings array before the screen is displayed. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_save_settings' ) ) { function ot_save_settings() { /* check and verify import settings nonce */ if ( isset( $_POST['option_tree_settings_nonce'] ) && wp_verify_nonce( $_POST['option_tree_settings_nonce'], 'option_tree_settings_form' ) ) { /* settings value */ $settings = isset( $_POST[ot_settings_id()] ) ? $_POST[ot_settings_id()] : ''; /* validate sections */ if ( isset( $settings['sections'] ) ) { /* fix numeric keys since drag & drop will change them */ $settings['sections'] = array_values( $settings['sections'] ); /* loop through sections */ foreach( $settings['sections'] as $k => $section ) { /* remove from array if missing values */ if ( ( ! isset( $section['title'] ) && ! isset( $section['id'] ) ) || ( '' == $section['title'] && '' == $section['id'] ) ) { unset( $settings['sections'][$k] ); } else { /* validate label */ if ( '' != $section['title'] ) { $settings['sections'][$k]['title'] = wp_kses_post( $section['title'] ); } /* missing title set to unfiltered ID */ if ( ! isset( $section['title'] ) || '' == $section['title'] ) { $settings['sections'][$k]['title'] = wp_kses_post( $section['id'] ); /* missing ID set to title */ } else if ( ! isset( $section['id'] ) || '' == $section['id'] ) { $section['id'] = wp_kses_post( $section['title'] ); } /* sanitize ID once everything has been checked first */ $settings['sections'][$k]['id'] = ot_sanitize_option_id( wp_kses_post( $section['id'] ) ); } } $settings['sections'] = ot_stripslashes( $settings['sections'] ); } /* validate settings by looping over array as many times as it takes */ if ( isset( $settings['settings'] ) ) { $settings['settings'] = ot_validate_settings_array( $settings['settings'] ); } /* validate contextual_help */ if ( isset( $settings['contextual_help']['content'] ) ) { /* fix numeric keys since drag & drop will change them */ $settings['contextual_help']['content'] = array_values( $settings['contextual_help']['content'] ); /* loop through content */ foreach( $settings['contextual_help']['content'] as $k => $content ) { /* remove from array if missing values */ if ( ( ! isset( $content['title'] ) && ! isset( $content['id'] ) ) || ( '' == $content['title'] && '' == $content['id'] ) ) { unset( $settings['contextual_help']['content'][$k] ); } else { /* validate label */ if ( '' != $content['title'] ) { $settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['title'] ); } /* missing title set to unfiltered ID */ if ( ! isset( $content['title'] ) || '' == $content['title'] ) { $settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['id'] ); /* missing ID set to title */ } else if ( ! isset( $content['id'] ) || '' == $content['id'] ) { $content['id'] = wp_kses_post( $content['title'] ); } /* sanitize ID once everything has been checked first */ $settings['contextual_help']['content'][$k]['id'] = ot_sanitize_option_id( wp_kses_post( $content['id'] ) ); } /* validate textarea description */ if ( isset( $content['content'] ) ) { $settings['contextual_help']['content'][$k]['content'] = wp_kses_post( $content['content'] ); } } } /* validate contextual_help sidebar */ if ( isset( $settings['contextual_help']['sidebar'] ) ) { $settings['contextual_help']['sidebar'] = wp_kses_post( $settings['contextual_help']['sidebar'] ); } $settings['contextual_help'] = ot_stripslashes( $settings['contextual_help'] ); /* default message */ $message = 'failed'; /* is array: save & show success message */ if ( is_array( $settings ) ) { /* WPML unregister ID's that have been removed */ if ( function_exists( 'icl_unregister_string' ) ) { $current = get_option( ot_settings_id() ); $options = get_option( ot_options_id() ); if ( isset( $current['settings'] ) ) { /* Empty ID array */ $new_ids = array(); /* Build the WPML IDs array */ foreach( $settings['settings'] as $setting ) { if ( $setting['id'] ) { $new_ids[] = $setting['id']; } } /* Remove missing IDs from WPML */ foreach( $current['settings'] as $current_setting ) { if ( ! in_array( $current_setting['id'], $new_ids ) ) { if ( ! empty( $options[$current_setting['id']] ) && in_array( $current_setting['type'], array( 'list-item', 'slider' ) ) ) { foreach( $options[$current_setting['id']] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { ot_wpml_unregister_string( $current_setting['id'] . '_' . $ckey . '_' . $key ); } } } else if ( ! empty( $options[$current_setting['id']] ) && $current_setting['type'] == 'social-icons' ) { foreach( $options[$current_setting['id']] as $key => $value ) { foreach( $value as $ckey => $cvalue ) { ot_wpml_unregister_string( $current_setting['id'] . '_' . $ckey . '_' . $key ); } } } else { ot_wpml_unregister_string( $current_setting['id'] ); } } } } } update_option( ot_settings_id(), $settings ); $message = 'success'; } /* redirect */ wp_redirect( esc_url_raw( add_query_arg( array( 'action' => 'save-settings', 'message' => $message ), $_POST['_wp_http_referer'] ) ) ); exit; } return false; } } /** * Validate the settings array before save. * * This function will loop over the settings array as many * times as it takes to validate every sub setting. * * @param array $settings The array of settings. * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_validate_settings_array' ) ) { function ot_validate_settings_array( $settings = array() ) { /* validate settings */ if ( count( $settings ) > 0 ) { /* fix numeric keys since drag & drop will change them */ $settings = array_values( $settings ); /* loop through settings */ foreach( $settings as $k => $setting ) { /* remove from array if missing values */ if ( ( ! isset( $setting['label'] ) && ! isset( $setting['id'] ) ) || ( '' == $setting['label'] && '' == $setting['id'] ) ) { unset( $settings[$k] ); } else { /* validate label */ if ( '' != $setting['label'] ) { $settings[$k]['label'] = wp_kses_post( $setting['label'] ); } /* missing label set to unfiltered ID */ if ( ! isset( $setting['label'] ) || '' == $setting['label'] ) { $settings[$k]['label'] = $setting['id']; /* missing ID set to label */ } else if ( ! isset( $setting['id'] ) || '' == $setting['id'] ) { $setting['id'] = wp_kses_post( $setting['label'] ); } /* sanitize ID once everything has been checked first */ $settings[$k]['id'] = ot_sanitize_option_id( wp_kses_post( $setting['id'] ) ); } /* validate description */ if ( '' != $setting['desc'] ) { $settings[$k]['desc'] = wp_kses_post( $setting['desc'] ); } /* validate choices */ if ( isset( $setting['choices'] ) ) { /* loop through choices */ foreach( $setting['choices'] as $ck => $choice ) { /* remove from array if missing values */ if ( ( ! isset( $choice['label'] ) && ! isset( $choice['value'] ) ) || ( '' == $choice['label'] && '' == $choice['value'] ) ) { unset( $setting['choices'][$ck] ); } else { /* missing label set to unfiltered ID */ if ( ! isset( $choice['label'] ) || '' == $choice['label'] ) { $setting['choices'][$ck]['label'] = wp_kses_post( $choice['value'] ); /* missing value set to label */ } else if ( ! isset( $choice['value'] ) || '' == $choice['value'] ) { $setting['choices'][$ck]['value'] = ot_sanitize_option_id( wp_kses_post( $choice['label'] ) ); } } } /* update keys and push new array values */ $settings[$k]['choices'] = array_values( $setting['choices'] ); } /* validate sub settings */ if ( isset( $setting['settings'] ) ) { $settings[$k]['settings'] = ot_validate_settings_array( $setting['settings'] ); } } } /* return array but strip those damn slashes out first!!! */ return ot_stripslashes( $settings ); } } /** * Save layouts array before the screen is displayed. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_modify_layouts' ) ) { function ot_modify_layouts() { /* check and verify modify layouts nonce */ if ( isset( $_POST['option_tree_modify_layouts_nonce'] ) && wp_verify_nonce( $_POST['option_tree_modify_layouts_nonce'], 'option_tree_modify_layouts_form' ) ) { /* previous layouts value */ $option_tree_layouts = get_option( ot_layouts_id() ); /* new layouts value */ $layouts = isset( $_POST[ot_layouts_id()] ) ? $_POST[ot_layouts_id()] : ''; /* rebuild layout array */ $rebuild = array(); /* validate layouts */ if ( is_array( $layouts ) && ! empty( $layouts ) ) { /* setup active layout */ if ( isset( $layouts['active_layout'] ) && ! empty( $layouts['active_layout'] ) ) { $rebuild['active_layout'] = $layouts['active_layout']; } /* add new and overwrite active layout */ if ( isset( $layouts['_add_new_layout_'] ) && ! empty( $layouts['_add_new_layout_'] ) ) { $rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] ); $rebuild[$rebuild['active_layout']] = ot_encode( serialize( get_option( ot_options_id() ) ) ); } $first_layout = ''; /* loop through layouts */ foreach( $layouts as $key => $layout ) { /* skip over active layout key */ if ( $key == 'active_layout' ) continue; /* check if the key exists then set value */ if ( isset( $option_tree_layouts[$key] ) && ! empty( $option_tree_layouts[$key] ) ) { $rebuild[$key] = $option_tree_layouts[$key]; if ( '' == $first_layout ) { $first_layout = $key; } } } if ( isset( $rebuild['active_layout'] ) && ! isset( $rebuild[$rebuild['active_layout']] ) && ! empty( $first_layout ) ) { $rebuild['active_layout'] = $first_layout; } } /* default message */ $message = 'failed'; /* is array: save & show success message */ if ( count( $rebuild ) > 1 ) { /* rebuild the theme options */ $rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) ); if ( is_array( $rebuild_option_tree ) ) { /* execute the action hook and pass the theme options to it */ do_action( 'ot_before_theme_options_save', $rebuild_option_tree ); update_option( ot_options_id(), $rebuild_option_tree ); } /* rebuild the layouts */ update_option( ot_layouts_id(), $rebuild ); /* change message */ $message = 'success'; } else if ( count( $rebuild ) <= 1 ) { /* delete layouts option */ delete_option( ot_layouts_id() ); /* change message */ $message = 'deleted'; } /* redirect */ if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) { $query_args = esc_url_raw( add_query_arg( array( 'settings-updated' => 'layout' ), remove_query_arg( array( 'action', 'message' ), $_POST['_wp_http_referer'] ) ) ); } else { $query_args = esc_url_raw( add_query_arg( array( 'action' => 'save-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) ); } wp_redirect( $query_args ); exit; } return false; } } /** * Helper function to display alert messages. * * @param array Page array * @return mixed * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_alert_message' ) ) { function ot_alert_message( $page = array() ) { if ( empty( $page ) ) return false; $before = apply_filters( 'ot_before_page_messages', '', $page ); if ( $before ) { return $before; } $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : ''; $message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : ''; $updated = isset( $_REQUEST['settings-updated'] ) ? $_REQUEST['settings-updated'] : ''; if ( $action == 'save-settings' ) { if ( $message == 'success' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Settings updated.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Settings updated.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'failed' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--error fade"><p>' . esc_html__( 'Settings could not be saved.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="error fade below-h2"><p>' . esc_html__( 'Settings could not be saved.', 'uncode-core' ) . '</p></div>'; } } } else if ( $action == 'import-xml' || $action == 'import-settings' ) { if ( $message == 'success' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Settings Imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Settings Imported.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'failed' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--error fade"><p>' . esc_html__( 'Settings could not be imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="error fade below-h2"><p>' . esc_html__( 'Settings could not be imported.', 'uncode-core' ) . '</p></div>'; } } } else if ( $action == 'import-data' ) { if ( $message == 'success' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Data Imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Data Imported.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'failed' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--error fade"><p>' . esc_html__( 'Data could not be imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="error fade below-h2"><p>' . esc_html__( 'Data could not be imported.', 'uncode-core' ) . '</p></div>'; } } } else if ( $action == 'import-layouts' ) { if ( $message == 'success' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Layouts Imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Layouts Imported.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'failed' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--error fade"><p>' . esc_html__( 'Layouts could not be imported.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="error fade below-h2"><p>' . esc_html__( 'Layouts could not be imported.', 'uncode-core' ) . '</p></div>'; } } } else if ( $action == 'save-layouts' ) { if ( $message == 'success' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Layouts Updated.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Layouts Updated.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'failed' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--error fade"><p>' . esc_html__( 'Layouts could not be updated.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="error fade below-h2"><p>' . esc_html__( 'Layouts could not be updated.', 'uncode-core' ) . '</p></div>'; } } else if ( $message == 'deleted' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Layouts have been deleted.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Layouts have been deleted.', 'uncode-core' ) . '</p></div>'; } } } else if ( $updated == 'layout' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . esc_html__( 'Layout activated.', 'uncode-core' ) . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . esc_html__( 'Layout activated.', 'uncode-core' ) . '</p></div>'; } } else if ( $action == 'reset' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . $page['reset_message'] . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . $page['reset_message'] . '</p></div>'; } } do_action( 'ot_custom_page_messages', $page ); if ( $updated == 'true' ) { if ( $page[ 'id' ] == 'settings' ) { return '<div class="uncode-ui-notice uncode-ui-notice--success fade"><p>' . $page['updated_message'] . '</p></div>'; } else { return '<div id="uncode-ot-message" class="updated fade below-h2"><p>' . $page['updated_message'] . '</p></div>'; } } return false; } } /** * Setup the default option types. * * The returned option types are filterable so you can add your own. * This is not a task for a beginner as you'll need to add the function * that displays the option to the user and validate the saved data. * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_option_types_array' ) ) { function ot_option_types_array() { return apply_filters( 'ot_option_types_array', array( 'background' => esc_html__('Background', 'uncode-core'), 'border' => esc_html__('Border', 'uncode-core'), 'box-shadow' => esc_html__('Box Shadow', 'uncode-core'), 'category-checkbox' => esc_html__('Category Checkbox', 'uncode-core'), 'category-select' => esc_html__('Category Select', 'uncode-core'), 'checkbox' => esc_html__('Checkbox', 'uncode-core'), 'colorpicker' => esc_html__('Colorpicker', 'uncode-core'), 'gradientpicker' => esc_html__('Gradientpicker', 'uncode-core'), 'colorpicker-opacity' => esc_html__('Colorpicker Opacity', 'uncode-core'), 'css' => esc_html__('CSS', 'uncode-core'), 'custom-post-type-checkbox' => esc_html__('Custom Post Type Checkbox', 'uncode-core'), 'custom-post-type-select' => esc_html__('Custom Post Type Select', 'uncode-core'), 'dimension' => esc_html__('Dimension', 'uncode-core'), 'javascript' => esc_html__('JavaScript', 'uncode-core'), 'link-color' => esc_html__('Link Color', 'uncode-core'), 'list-item' => esc_html__('List Item', 'uncode-core'), 'measurement' => esc_html__('Measurement', 'uncode-core'), 'numeric-slider' => esc_html__('Numeric Slider', 'uncode-core'), 'on-off' => esc_html__('On/Off', 'uncode-core'), 'page-checkbox' => esc_html__('Page Checkbox', 'uncode-core'), 'page-select' => esc_html__('Page Select', 'uncode-core'), 'post-checkbox' => esc_html__('Post Checkbox', 'uncode-core'), 'post-select' => esc_html__('Post Select', 'uncode-core'), 'radio' => esc_html__('Radio', 'uncode-core'), 'radio-image' => esc_html__('Radio Image', 'uncode-core'), 'select' => esc_html__('Select', 'uncode-core'), 'sidebar-select' => esc_html__('Sidebar Select', 'uncode-core'), 'slider' => esc_html__('Slider', 'uncode-core'), 'social-links' => esc_html__('Social Links', 'uncode-core'), 'tab' => esc_html__('Tab', 'uncode-core'), 'tag-checkbox' => esc_html__('Tag Checkbox', 'uncode-core'), 'tag-select' => esc_html__('Tag Select', 'uncode-core'), 'taxonomy-checkbox' => esc_html__('Taxonomy Checkbox', 'uncode-core'), 'taxonomy-select' => esc_html__('Taxonomy Select', 'uncode-core'), 'text' => esc_html__('Text', 'uncode-core'), 'textarea' => esc_html__('Textarea', 'uncode-core'), 'textarea-simple' => esc_html__('Textarea Simple', 'uncode-core'), 'textblock' => esc_html__('Textblock', 'uncode-core'), 'textblock-titled' => esc_html__('Textblock Titled', 'uncode-core'), 'upload' => esc_html__('Upload', 'uncode-core') ) ); } } /** * Map old option types for rebuilding XML and Table data. * * @param string $type The old option type * @return string The new option type * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_map_old_option_types' ) ) { function ot_map_old_option_types( $type = '' ) { if ( ! $type ) return 'text'; $types = array( 'background' => 'background', 'category' => 'category-select', 'categories' => 'category-checkbox', 'checkbox' => 'checkbox', 'colorpicker' => 'colorpicker', 'gradientpicker' => 'gradientpicker', 'css' => 'css', 'custom_post' => 'custom-post-type-select', 'custom_post-2' => 'custom-post-type-select-2', 'custom_posts' => 'custom-post-type-checkbox', 'input' => 'text', 'image' => 'upload', 'measurement' => 'measurement', 'page' => 'page-select', 'pages' => 'page-checkbox', 'post' => 'post-select', 'posts' => 'post-checkbox', 'radio' => 'radio', 'select' => 'select', 'slider' => 'slider', 'tag' => 'tag-select', 'tags' => 'tag-checkbox', 'textarea' => 'textarea', 'textblock' => 'textblock', 'typography' => 'typography', 'upload' => 'upload' ); if ( isset( $types[$type] ) ) return $types[$type]; return false; } } /** * Recognized background repeat * * Returns an array of all recognized background repeat values. * Renamed in version 2.0 to avoid name collisions. * * @uses apply_filters() * * @return array * * @access public * @since 1.1.8 * @updated 2.0 */ if ( ! function_exists( 'ot_recognized_background_repeat' ) ) { function ot_recognized_background_repeat( $field_id = '' ) { return apply_filters( 'ot_recognized_background_repeat', array( 'no-repeat' => 'No Repeat', 'repeat' => 'Repeat All', 'repeat-x' => 'Repeat Horizontally', 'repeat-y' => 'Repeat Vertically', 'inherit' => 'Inherit' ), $field_id ); } } /** * Recognized background attachment * * Returns an array of all recognized background attachment values. * Renamed in version 2.0 to avoid name collisions. * * @uses apply_filters() * * @return array * * @access public * @since 1.1.8 * @updated 2.0 */ if ( ! function_exists( 'ot_recognized_background_attachment' ) ) { function ot_recognized_background_attachment( $field_id = '' ) { return apply_filters( 'ot_recognized_background_attachment', array( "fixed" => "Fixed", "scroll" => "Scroll", "inherit" => "Inherit" ), $field_id ); } } /** * Recognized background position * * Returns an array of all recognized background position values. * Renamed in version 2.0 to avoid name collisions. * * @uses apply_filters() * * @return array * * @access public * @since 1.1.8 * @updated 2.0 */ if ( ! function_exists( 'ot_recognized_background_position' ) ) { function ot_recognized_background_position( $field_id = '' ) { return apply_filters( 'ot_recognized_background_position', array( "left top" => "Left Top", "left center" => "Left Center", "left bottom" => "Left Bottom", "center top" => "Center Top", "center center" => "Center Center", "center bottom" => "Center Bottom", "right top" => "Right Top", "right center" => "Right Center", "right bottom" => "Right Bottom" ), $field_id ); } } /** * Border Styles * * Returns an array of all available style types. * * @uses apply_filters() * * @return array * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_recognized_border_style_types' ) ) { function ot_recognized_border_style_types( $field_id = '' ) { return apply_filters( 'ot_recognized_border_style_types', array( 'hidden' => 'Hidden', 'dashed' => 'Dashed', 'solid' => 'Solid', 'double' => 'Double', 'groove' => 'Groove', 'ridge' => 'Ridge', 'inset' => 'Inset', 'outset' => 'Outset', ), $field_id ); } } /** * Border Units * * Returns an array of all available unit types. * * @uses apply_filters() * * @return array * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_recognized_border_unit_types' ) ) { function ot_recognized_border_unit_types( $field_id = '' ) { return apply_filters( 'ot_recognized_border_unit_types', array( 'px' => 'px', '%' => '%', 'em' => 'em', 'pt' => 'pt' ), $field_id ); } } /** * Measurement Units * * Returns an array of all available unit types. * Renamed in version 2.0 to avoid name collisions. * * @uses apply_filters() * * @return array * * @access public * @since 1.1.8 * @updated 2.0 */ if ( ! function_exists( 'ot_measurement_unit_types' ) ) { function ot_measurement_unit_types( $field_id = '' ) { return apply_filters( 'ot_measurement_unit_types', array( 'px' => 'px', '%' => '%', 'em' => 'em', 'pt' => 'pt' ), $field_id ); } } /** * Radio Images default array. * * Returns an array of all available radio images. * You can filter this function to change the images * on a per option basis. * * @uses apply_filters() * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_radio_images' ) ) { function ot_radio_images( $field_id = '' ) { return apply_filters( 'ot_radio_images', array( array( 'value' => 'left-sidebar', 'label' => esc_html__( 'Left Sidebar', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/left-sidebar.png' ), array( 'value' => 'right-sidebar', 'label' => esc_html__( 'Right Sidebar', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/right-sidebar.png' ), array( 'value' => 'full-width', 'label' => esc_html__( 'Full Width (no sidebar)', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/full-width.png' ), array( 'value' => 'dual-sidebar', 'label' => esc_html__( 'Dual Sidebar', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/dual-sidebar.png' ), array( 'value' => 'left-dual-sidebar', 'label' => esc_html__( 'Left Dual Sidebar', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/left-dual-sidebar.png' ), array( 'value' => 'right-dual-sidebar', 'label' => esc_html__( 'Right Dual Sidebar', 'uncode-core' ), 'src' => OT_URL . 'assets/images/layout/right-dual-sidebar.png' ) ), $field_id ); } } /** * Default List Item Settings array. * * Returns an array of the default list item settings. * You can filter this function to change the settings * on a per option basis. * * @uses apply_filters() * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_list_item_settings' ) ) { function ot_list_item_settings( $id ) { $settings = apply_filters( 'ot_list_item_settings', array( array( 'id' => 'image', 'label' => esc_html__( 'Image', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'upload', 'rows' => '', 'class' => '', 'post_type' => '', 'choices' => array() ), array( 'id' => 'link', 'label' => esc_html__( 'Link', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'class' => '', 'post_type' => '', 'choices' => array() ), array( 'id' => 'description', 'label' => esc_html__( 'Description', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'textarea-simple', 'rows' => 10, 'class' => '', 'post_type' => '', 'choices' => array() ) ), $id ); return $settings; } } /** * Default Slider Settings array. * * Returns an array of the default slider settings. * You can filter this function to change the settings * on a per option basis. * * @uses apply_filters() * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_slider_settings' ) ) { function ot_slider_settings( $id ) { $settings = apply_filters( 'image_slider_fields', array( array( 'name' => 'image', 'type' => 'image', 'label' => esc_html__( 'Image', 'uncode-core' ), 'class' => '' ), array( 'name' => 'link', 'type' => 'text', 'label' => esc_html__( 'Link', 'uncode-core' ), 'class' => '' ), array( 'name' => 'description', 'type' => 'textarea', 'label' => esc_html__( 'Description', 'uncode-core' ), 'class' => '' ) ), $id ); /* fix the array keys, values, and just get it 2.0 ready */ foreach( $settings as $_k => $setting ) { foreach( $setting as $s_key => $s_value ) { if ( 'name' == $s_key ) { $settings[$_k]['id'] = $s_value; unset($settings[$_k]['name']); } else if ( 'type' == $s_key ) { if ( 'input' == $s_value ) { $settings[$_k]['type'] = 'text'; } else if ( 'textarea' == $s_value ) { $settings[$_k]['type'] = 'textarea-simple'; } else if ( 'image' == $s_value ) { $settings[$_k]['type'] = 'upload'; } } } } return $settings; } } /** * Default Social Links Settings array. * * Returns an array of the default social links settings. * You can filter this function to change the settings * on a per option basis. * * @uses apply_filters() * * @return array * * @access public * @since 2.4.0 */ if ( ! function_exists( 'ot_social_links_settings' ) ) { function ot_social_links_settings( $id ) { $settings = apply_filters( 'ot_social_links_settings', array( array( 'id' => 'name', 'label' => esc_html__( 'Name', 'uncode-core' ), 'desc' => esc_html__( 'Enter the name of the social website.', 'uncode-core' ), 'std' => '', 'type' => 'text', 'class' => 'option-tree-setting-title' ), array( 'id' => 'title', 'label' => 'Title', 'desc' => esc_html__( 'Enter the text shown in the title attribute of the link.', 'uncode-core' ), 'type' => 'text' ), array( 'id' => 'href', 'label' => 'Link', 'desc' => sprintf( wp_kses(__( 'Enter a link to the profile or page on the social website. Remember to add the %s part to the front of the link.', 'uncode-core' ), array( 'code' => array() ) ), '<code>http://</code>' ), 'type' => 'text', ) ), $id ); return $settings; } } /** * Inserts CSS with field_id markers. * * Inserts CSS into a dynamic.css file, placing it between * BEGIN and END field_id markers. Replaces existing marked info, * but still retains surrounding data. * * @param string $field_id The CSS option field ID. * @param array $options The current option_tree array. * @return bool True on write success, false on failure. * * @access public * @since 1.1.8 * @updated 2.5.3 */ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) { function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = false ) { /* missing $field_id or $insertion exit early */ if ( '' == $field_id || '' == $insertion ) return; /* path to the dynamic.css file */ $filepath = get_stylesheet_directory() . '/dynamic.css'; if ( is_multisite() ) { $multisite_filepath = get_stylesheet_directory() . '/dynamic-' . get_current_blog_id() . '.css'; if ( file_exists( $multisite_filepath ) ) { $filepath = $multisite_filepath; } } /* allow filter on path */ $filepath = apply_filters( 'css_option_file_path', $filepath, $field_id ); /* grab a copy of the paths array */ $ot_css_file_paths = get_option( 'ot_css_file_paths', array() ); if ( is_multisite() ) { $ot_css_file_paths = get_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths ); } /* set the path for this field */ $ot_css_file_paths[$field_id] = $filepath; /* update the paths */ if ( is_multisite() ) { update_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths ); } else { update_option( 'ot_css_file_paths', $ot_css_file_paths ); } /* insert CSS into file */ if ( file_exists( $filepath ) ) { $insertion = ot_normalize_css( $insertion ); $regex = "/{{([a-zA-Z0-9\_\-\#\|\=]+)}}/"; $marker = $field_id; /* Match custom CSS */ preg_match_all( $regex, $insertion, $matches ); /* Loop through CSS */ foreach( $matches[0] as $option ) { $value = ''; $option_array = explode( '|', str_replace( array( '{{', '}}' ), '', $option ) ); $option_id = isset( $option_array[0] ) ? $option_array[0] : ''; $option_key = isset( $option_array[1] ) ? $option_array[1] : ''; $option_type = ot_get_option_type_by_id( $option_id ); $fallback = ''; // Get the meta array value if ( $meta ) { global $post; $value = get_post_meta( $post->ID, $option_id, true ); // Get the options array value } else { $options = get_option( ot_options_id() ); if ( isset( $options[$option_id] ) ) { $value = $options[$option_id]; } } // This in an array of values if ( is_array( $value ) ) { if ( empty( $option_key ) ) { // Measurement if ( $option_type == 'measurement' ) { // Set $value with measurement properties if ( isset( $value[0] ) && isset( $value[1] ) ) $value = $value[0].$value[1]; // Border } else if ( $option_type == 'border' ) { $border = array(); $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px'; if ( ! empty( $value['width'] ) ) $border[] = $value['width'].$unit; if ( ! empty( $value['style'] ) ) $border[] = $value['style']; if ( ! empty( $value['color'] ) ) $border[] = $value['color']; /* set $value with border properties or empty string */ $value = ! empty( $border ) ? implode( ' ', $border ) : ''; // Box Shadow } else if ( $option_type == 'box-shadow' ) { /* set $value with box-shadow properties or empty string */ $value = ! empty( $value ) ? implode( ' ', $value ) : ''; // Background } else if ( $option_type == 'background' ) { $bg = array(); if ( ! empty( $value['background-color'] ) ) $bg[] = $value['background-color']; if ( ! empty( $value['background-image'] ) ) { // If an attachment ID is stored here fetch its URL and replace the value if ( wp_attachment_is_image( $value['background-image'] ) ) { $attachment_data = wp_get_attachment_image_src( $value['background-image'], 'original' ); // Check for attachment data if ( $attachment_data ) { $value['background-image'] = $attachment_data[0]; } } $bg[] = 'url("' . $value['background-image'] . '")'; } if ( ! empty( $value['background-repeat'] ) ) $bg[] = $value['background-repeat']; if ( ! empty( $value['background-attachment'] ) ) $bg[] = $value['background-attachment']; if ( ! empty( $value['background-position'] ) ) $bg[] = $value['background-position']; if ( ! empty( $value['background-size'] ) ) $size = $value['background-size']; // Set $value with background properties or empty string $value = ! empty( $bg ) ? 'background: ' . implode( " ", $bg ) . ';' : ''; if ( isset( $size ) ) { if ( ! empty( $bg ) ) { $value.= apply_filters( 'ot_insert_css_with_markers_bg_size_white_space', "\n\x20\x20", $option_id ); } $value.= "background-size: $size;"; } } } else { $value = $value[$option_key]; } } // If an attachment ID is stored here fetch its URL and replace the value if ( $option_type == 'upload' && wp_attachment_is_image( $value ) ) { $attachment_data = wp_get_attachment_image_src( $value, 'original' ); // Check for attachment data if ( $attachment_data ) { $value = $attachment_data[0]; } } // Attempt to fallback when `$value` is empty if ( empty( $value ) ) { // We're trying to access a single array key if ( ! empty( $option_key ) ) { // Link Color `inherit` if ( $option_type == 'link-color' ) { $fallback = 'inherit'; } } else { // Border if ( $option_type == 'border' ) { $fallback = 'inherit'; } // Box Shadow if ( $option_type == 'box-shadow' ) { $fallback = 'none'; } // Colorpicker if ( $option_type == 'colorpicker' ) { $fallback = 'inherit'; } // Gradientpicker if ( $option_type == 'gradientpicker' ) { $fallback = 'inherit'; } // Colorpicker Opacity if ( $option_type == 'colorpicker-opacity' ) { $fallback = 'inherit'; } } /** * Filter the `dynamic.css` fallback value. * * @since 2.5.3 * * @param string $fallback The default CSS fallback value. * @param string $option_id The option ID. * @param string $option_type The option type. * @param string $option_key The option array key. */ $fallback = apply_filters( 'ot_insert_css_with_markers_fallback', $fallback, $option_id, $option_type, $option_key ); } // Let's fallback! if ( ! empty( $fallback ) ) { $value = $fallback; } // Filter the CSS $value = apply_filters( 'ot_insert_css_with_markers_value', $value, $option_id ); // Insert CSS, even if the value is empty $insertion = stripslashes( str_replace( $option, $value, $insertion ) ); } // Can't write to the file so we error out if ( ! is_writable( $filepath ) ) { add_settings_error( 'option-tree', 'dynamic_css', sprintf( wp_kses(__( 'Unable to write to file %s.', 'uncode-core' ), array( 'code' => array() ) ), '<code>' . $filepath . '</code>' ), 'error' ); return false; } // Create array from the lines of code $markerdata = explode( "\n", implode( '', file( $filepath ) ) ); // Can't write to the file return false if ( ! $f = ot_file_open( $filepath, 'w' ) ) { return false; } $searching = true; $foundit = false; // Has array of lines if ( ! empty( $markerdata ) ) { // Foreach line of code foreach( $markerdata as $n => $markerline ) { // Found begining of marker, set $searching to false if ( $markerline == "/* BEGIN {$marker} */" ) $searching = false; // Keep searching each line of CSS if ( $searching == true ) { if ( $n + 1 < count( $markerdata ) ) ot_file_write( $f, "{$markerline}\n" ); else ot_file_write( $f, "{$markerline}" ); } // Found end marker write code if ( $markerline == "/* END {$marker} */" ) { ot_file_write( $f, "/* BEGIN {$marker} */\n" ); ot_file_write( $f, "{$insertion}\n" ); ot_file_write( $f, "/* END {$marker} */\n" ); $searching = true; $foundit = true; } } } // Nothing inserted, write code. DO IT, DO IT! if ( ! $foundit ) { ot_file_write( $f, "/* BEGIN {$marker} */\n" ); ot_file_write( $f, "{$insertion}\n" ); ot_file_write( $f, "/* END {$marker} */\n" ); } // Close file ot_file_close( $f ); return true; } return false; } } /** * Remove old CSS. * * Removes CSS when the textarea is empty, but still retains surrounding styles. * * @param string $field_id The CSS option field ID. * @return bool True on write success, false on failure. * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_remove_old_css' ) ) { function ot_remove_old_css( $field_id = '' ) { /* missing $field_id string */ if ( '' == $field_id ) return false; /* path to the dynamic.css file */ $filepath = get_stylesheet_directory() . '/dynamic.css'; /* allow filter on path */ $filepath = apply_filters( 'css_option_file_path', $filepath, $field_id ); /* remove CSS from file */ if ( is_writeable( $filepath ) ) { /* get each line in the file */ $markerdata = explode( "\n", implode( '', file( $filepath ) ) ); /* can't write to the file return false */ if ( ! $f = ot_file_open( $filepath, 'w' ) ) return false; $searching = true; /* has array of lines */ if ( ! empty( $markerdata ) ) { /* foreach line of code */ foreach ( $markerdata as $n => $markerline ) { /* found begining of marker, set $searching to false */ if ( $markerline == "/* BEGIN {$field_id} */" ) $searching = false; /* $searching is true, keep rewrite each line of CSS */ if ( $searching == true ) { if ( $n + 1 < count( $markerdata ) ) ot_file_write( $f, "{$markerline}\n" ); else ot_file_write( $f, "{$markerline}" ); } /* found end marker delete old CSS */ if ( $markerline == "/* END {$field_id} */" ) { ot_file_write( $f, "" ); $searching = true; } } } /* close file */ ot_file_close( $f ); return true; } return false; } } /** * Normalize CSS * * Normalize & Convert all line-endings to UNIX format. * * @param string $css * @return string * * @access public * @since 1.1.8 * @updated 2.0 */ if ( ! function_exists( 'ot_normalize_css' ) ) { function ot_normalize_css( $css ) { /* Normalize & Convert */ $css = str_replace( "\r\n", "\n", $css ); $css = str_replace( "\r", "\n", $css ); /* Don't allow out-of-control blank lines */ $css = preg_replace( "/\n{2,}/", "\n\n", $css ); return $css; } } /** * Helper function to loop over the option types. * * @param array $type The current option type. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_loop_through_option_types' ) ) { function ot_loop_through_option_types( $type = '', $child = false ) { $content = ''; $types = ot_option_types_array(); if ( $child ) unset($types['list-item']); foreach( $types as $key => $value ) $content.= '<option value="' . $key . '" ' . selected( $type, $key, false ) . '>' . $value . '</option>'; return $content; } } /** * Helper function to loop over choices. * * @param string $name The form element name. * @param array $choices The array of choices. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_loop_through_choices' ) ) { function ot_loop_through_choices( $name, $choices = array() ) { $content = ''; foreach( (array) $choices as $key => $choice ) $content.= '<li class="ui-state-default list-choice">' . ot_choices_view( $name, $key, $choice ) . '</li>'; return $content; } } /** * Helper function to loop over sub settings. * * @param string $name The form element name. * @param array $settings The array of settings. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_loop_through_sub_settings' ) ) { function ot_loop_through_sub_settings( $name, $settings = array() ) { $content = ''; foreach( $settings as $key => $setting ) $content.= '<li class="ui-state-default list-sub-setting">' . ot_settings_view( $name, $key, $setting ) . '</li>'; return $content; } } /** * Helper function to display sections. * * This function is used in AJAX to add a new section * and when section have already been added and saved. * * @param int $key The array key for the current element. * @param array An array of values for the current section. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_sections_view' ) ) { function ot_sections_view( $name, $key, $section = array() ) { return ' <div class="option-tree-setting is-section"> <div class="open">' . ( isset( $section['title'] ) ? esc_attr( $section['title'] ) : 'Section ' . ( $key + 1 ) ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body"> <div class="format-settings"> <div class="format-setting type-text"> <div class="description">' . esc_html__( '<strong>Section Title</strong>: Displayed as a menu item on the Theme Options page.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][title]" value="' . ( isset( $section['title'] ) ? esc_attr( $section['title'] ) : '' ) . '" class="widefat option-tree-ui-input option-tree-setting-title section-title" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text"> <div class="description">' . esc_html__( '<strong>Section ID</strong>: A unique lower case alphanumeric string, underscores allowed.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][id]" value="' . ( isset( $section['id'] ) ? esc_attr( $section['id'] ) : '' ) . '" class="widefat option-tree-ui-input section-id" autocomplete="off" /> </div> </div> </div> </div> </div>'; } } /** * Helper function to display settings. * * This function is used in AJAX to add a new setting * and when settings have already been added and saved. * * @param int $key The array key for the current element. * @param array An array of values for the current section. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_settings_view' ) ) { function ot_settings_view( $name, $key, $setting = array() ) { $child = ( strpos( $name, '][settings]') !== false ) ? true : false; $type = isset( $setting['type'] ) ? $setting['type'] : ''; $std = isset( $setting['std'] ) ? $setting['std'] : ''; $operator = isset( $setting['operator'] ) ? esc_attr( $setting['operator'] ) : 'and'; // Serialize the standard value just incase if ( is_array( $std ) ) { $std = maybe_serialize( $std ); } if ( in_array( $type, array( 'css', 'javascript', 'textarea', 'textarea-simple' ) ) ) { $std_form_element = '<textarea class="textarea" rows="10" cols="40" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][std]">' . esc_html( $std ) . '</textarea>'; } else { $std_form_element = '<input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][std]" value="' . esc_attr( $std ) . '" class="widefat option-tree-ui-input" autocomplete="off" />'; } return ' <div class="option-tree-setting"> <div class="open">' . ( isset( $setting['label'] ) ? esc_attr( $setting['label'] ) : 'Setting ' . ( $key + 1 ) ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'Edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body"> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Label</strong>: Displayed as the label of a form element on the Theme Options page.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][label]" value="' . ( isset( $setting['label'] ) ? esc_attr( $setting['label'] ) : '' ) . '" class="widefat option-tree-ui-input option-tree-setting-title" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>ID</strong>: A unique lower case alphanumeric string, underscores allowed.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][id]" value="' . ( isset( $setting['id'] ) ? esc_attr( $setting['id'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-select wide-desc"> <div class="description">' . esc_html__( '<strong>Type</strong>: Choose one of the available option types from the dropdown.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <select name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][type]" value="' . esc_attr( $type ) . '" class="option-tree-ui-select"> ' . ot_loop_through_option_types( $type, $child ) . ' </select> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-textarea wide-desc"> <div class="description">' . esc_html__( '<strong>Description</strong>: Enter a detailed description for the users to read on the Theme Options page, HTML is allowed. This is also where you enter content for both the Textblock & Textblock Titled option types.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <textarea class="textarea" rows="10" cols="40" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][desc]">' . ( isset( $setting['desc'] ) ? esc_html( $setting['desc'] ) : '' ) . '</textarea> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-textblock wide-desc"> <div class="description">' . esc_html__( '<strong>Choices</strong>: This will only affect the following option types: Checkbox, Radio, Select & Select Image.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <ul class="option-tree-setting-wrap option-tree-sortable" data-name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . ']"> ' . ( isset( $setting['choices'] ) ? ot_loop_through_choices( $name . '[' . $key . ']', $setting['choices'] ) : '' ) . ' </ul> <a href="javascript:void(0);" class="option-tree-choice-add option-tree-ui-button button hug-left">' . esc_html__( 'Add Choice', 'uncode-core' ) . '</a> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-textblock wide-desc"> <div class="description">' . esc_html__( '<strong>Settings</strong>: This will only affect the List Item option type.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <ul class="option-tree-setting-wrap option-tree-sortable" data-name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . ']"> ' . ( isset( $setting['settings'] ) ? ot_loop_through_sub_settings( $name . '[' . $key . '][settings]', $setting['settings'] ) : '' ) . ' </ul> <a href="javascript:void(0);" class="option-tree-list-item-setting-add option-tree-ui-button button hug-left">' . esc_html__( 'Add Setting', 'uncode-core' ) . '</a> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Standard</strong>: Setting the standard value for your option only works for some option types. Read the <code>OptionTree->Documentation</code> for more information on which ones.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> ' . $std_form_element . ' </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Rows</strong>: Enter a numeric value for the number of rows in your textarea. This will only affect the following option types: CSS, Textarea, & Textarea Simple.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][rows]" value="' . ( isset( $setting['rows'] ) ? esc_attr( $setting['rows'] ) : '' ) . '" class="widefat option-tree-ui-input" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Post Type</strong>: Add a comma separated list of post type like \'post,page\'. This will only affect the following option types: Custom Post Type Checkbox, & Custom Post Type Select.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][post_type]" value="' . ( isset( $setting['post_type'] ) ? esc_attr( $setting['post_type'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Taxonomy</strong>: Add a comma separated list of any registered taxonomy like \'category,post_tag\'. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][taxonomy]" value="' . ( isset( $setting['taxonomy'] ) ? esc_attr( $setting['taxonomy'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>Min, Max, & Step</strong>: Add a comma separated list of options in the following format <code>0,100,1</code> (slide from <code>0-100</code> in intervals of <code>1</code>). The three values represent the minimum, maximum, and step options and will only affect the Numeric Slider option type.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][min_max_step]" value="' . ( isset( $setting['min_max_step'] ) ? esc_attr( $setting['min_max_step'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . esc_html__( '<strong>CSS Class</strong>: Add and optional class to this option type.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][class]" value="' . ( isset( $setting['class'] ) ? esc_attr( $setting['class'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text wide-desc"> <div class="description">' . sprintf( wp_kses(__( '<strong>Condition</strong>: Add a comma separated list (no spaces) of conditions in which the field will be visible, leave this setting empty to always show the field. In these examples, <code>value</code> is a placeholder for your condition, which can be in the form of %s.', 'uncode-core' ), array( 'code' => array(), 'strong' => array() ) ), '<code>field_id:is(value)</code>, <code>field_id:not(value)</code>, <code>field_id:contains(value)</code>, <code>field_id:less_than(value)</code>, <code>field_id:less_than_or_equal_to(value)</code>, <code>field_id:greater_than(value)</code>, or <code>field_id:greater_than_or_equal_to(value)</code>' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][condition]" value="' . ( isset( $setting['condition'] ) ? esc_attr( $setting['condition'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-select wide-desc"> <div class="description">' . esc_html__( '<strong>Operator</strong>: Choose the logical operator to compute the result of the conditions.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <select name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][operator]" value="' . $operator . '" class="option-tree-ui-select"> <option value="and" ' . selected( $operator, 'and', false ) . '>' . esc_html__( 'and', 'uncode-core' ) . '</option> <option value="or" ' . selected( $operator, 'or', false ) . '>' . esc_html__( 'or', 'uncode-core' ) . '</option> </select> </div> </div> </div> </div> </div> ' . ( ! $child ? '<input type="hidden" class="hidden-section" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][section]" value="' . ( isset( $setting['section'] ) ? esc_attr( $setting['section'] ) : '' ) . '" />' : '' ); } } /** * Helper function to display setting choices. * * This function is used in AJAX to add a new choice * and when choices have already been added and saved. * * @param string $name The form element name. * @param array $key The array key for the current element. * @param array An array of values for the current choice. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_choices_view' ) ) { function ot_choices_view( $name, $key, $choice = array() ) { return ' <div class="option-tree-setting"> <div class="open">' . ( isset( $choice['label'] ) ? esc_attr( $choice['label'] ) : 'Choice ' . ( $key + 1 ) ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'Edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body"> <div class="format-settings"> <div class="format-setting-label"> <h5>' . esc_html__( 'Label', 'uncode-core' ) . '</h5> </div> <div class="format-setting type-text wide-desc"> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[choices][' . esc_attr( $key ) . '][label]" value="' . ( isset( $choice['label'] ) ? esc_attr( $choice['label'] ) : '' ) . '" class="widefat option-tree-ui-input option-tree-setting-title" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting-label"> <h5>' . esc_html__( 'Value', 'uncode-core' ) . '</h5> </div> <div class="format-setting type-text wide-desc"> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[choices][' . esc_attr( $key ) . '][value]" value="' . ( isset( $choice['value'] ) ? esc_attr( $choice['value'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting-label"> <h5>' . esc_html__( 'Image Source (Radio Image only)', 'uncode-core' ) . '</h5> </div> <div class="format-setting type-text wide-desc"> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[choices][' . esc_attr( $key ) . '][src]" value="' . ( isset( $choice['src'] ) ? esc_attr( $choice['src'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> </div>'; } } /** * Helper function to display sections. * * This function is used in AJAX to add a new section * and when section have already been added and saved. * * @param int $key The array key for the current element. * @param array An array of values for the current section. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_contextual_help_view' ) ) { function ot_contextual_help_view( $name, $key, $content = array() ) { return ' <div class="option-tree-setting"> <div class="open">' . ( isset( $content['title'] ) ? esc_attr( $content['title'] ) : 'Content ' . ( $key + 1 ) ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'Edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body"> <div class="format-settings"> <div class="format-setting type-text no-desc"> <div class="description">' . esc_html__( '<strong>Title</strong>: Displayed as a contextual help menu item on the Theme Options page.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][title]" value="' . ( isset( $content['title'] ) ? esc_attr( $content['title'] ) : '' ) . '" class="widefat option-tree-ui-input option-tree-setting-title" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-text no-desc"> <div class="description">' . esc_html__( '<strong>ID</strong>: A unique lower case alphanumeric string, underscores allowed.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][id]" value="' . ( isset( $content['id'] ) ? esc_attr( $content['id'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" /> </div> </div> </div> <div class="format-settings"> <div class="format-setting type-textarea no-desc"> <div class="description">' . esc_html__( '<strong>Content</strong>: Enter the HTML content about this contextual help item displayed on the Theme Option page for end users to read.', 'uncode-core' ) . '</div> <div class="format-setting-inner"> <textarea class="textarea" rows="15" cols="40" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][content]">' . ( isset( $content['content'] ) ? esc_html( $content['content'] ) : '' ) . '</textarea> </div> </div> </div> </div> </div>'; } } /** * Helper function to display sections. * * @param string $key * @param string $data * @param string $active_layout * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_layout_view' ) ) { function ot_layout_view( $key, $data = '', $active_layout = '' ) { return ' <div class="option-tree-setting"> <div class="open">' . ( isset( $key ) ? esc_attr( $key ) : esc_html__( 'Layout', 'uncode-core' ) ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-layout-activate option-tree-ui-button button left-item' . ( $active_layout == $key ? ' active' : '' ) . '" title="' . esc_html__( 'Activate', 'uncode-core' ) . '"> <span class="icon ot-icon-square-o"></span>' . esc_html__( 'Activate', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="'. esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <input type="hidden" name="' . ot_layouts_id() . '[' . esc_attr( $key ) . ']" value="' . $data . '" /> </div>'; } } /** * Helper function to display list items. * * This function is used in AJAX to add a new list items * and when they have already been added and saved. * * @param string $name The form field name. * @param int $key The array key for the current element. * @param array An array of values for the current list item. * * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_list_item_view' ) ) { function ot_list_item_view( $name, $key, $list_item = array(), $post_id = 0, $get_option = '', $settings = array(), $type = '' ) { /* required title setting */ $required_setting = array( array( 'id' => 'title', 'label' => esc_html__( 'Title', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'class' => 'option-tree-setting-title', 'post_type' => '', 'choices' => array() ) ); /* load the old filterable slider settings */ if ( 'slider' == $type ) { $settings = ot_slider_settings( $name ); } /* if no settings array load the filterable list item settings */ if ( empty( $settings ) ) { $settings = ot_list_item_settings( $name ); } /* merge the two settings array */ $settings = array_merge( $required_setting, $settings ); echo ' <div class="option-tree-setting"> <div class="open">' . ( isset( $list_item['title'] ) ? esc_attr( $list_item['title'] ) : '' ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'Edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body">'; foreach( $settings as $field ) { // Set field value $field_value = isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : ''; /* set default to standard value */ if ( isset( $field['std'] ) ) { $field_value = ot_filter_std_value( $field_value, $field['std'] ); } // filter the title label and description if ( $field['id'] == 'title' ) { // filter the label $field['label'] = apply_filters( 'ot_list_item_title_label', $field['label'], $name ); // filter the description $field['desc'] = apply_filters( 'ot_list_item_title_desc', $field['desc'], $name ); } /* make life easier */ $_field_name = $get_option ? $get_option . '[' . $name . ']' : $name; /* build the arguments array */ $_args = array( 'type' => $field['type'], 'field_id' => $name . '_' . $field['id'] . '_' . $key, 'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']', 'field_value' => $field_value, 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '', 'field_std' => isset( $field['std'] ) ? $field['std'] : '', 'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10, 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post', 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category', 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1', 'field_class' => isset( $field['class'] ) ? $field['class'] : '', 'field_condition' => isset( $field['condition'] ) ? $field['condition'] : '', 'field_operator' => isset( $field['operator'] ) ? $field['operator'] : 'and', 'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(), 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(), 'post_id' => $post_id, 'get_option' => $get_option ); $conditions = ''; /* setup the conditions */ if ( isset( $field['condition'] ) && ! empty( $field['condition'] ) ) { /* doing magic on the conditions so they work in a list item */ $conditionals = explode( ',', $field['condition'] ); foreach( $conditionals as $condition ) { $parts = explode( ':', $condition ); if ( isset( $parts[0] ) ) { $field['condition'] = str_replace( $condition, $name . '_' . $parts[0] . '_' . $key . ':' . $parts[1], $field['condition'] ); } } $conditions = ' data-condition="' . $field['condition'] . '"'; $conditions.= isset( $field['operator'] ) && in_array( $field['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['operator'] . '"' : ''; } // Build the setting CSS class if ( ! empty( $_args['field_class'] ) ) { $classes = explode( ' ', $_args['field_class'] ); foreach( $classes as $_key => $value ) { $classes[$_key] = $value . '-wrap'; } $class = 'format-settings ' . implode( ' ', $classes ); } else { $class = 'format-settings'; } /* option label */ echo '<div id="setting_' . $_args['field_id'] . '" class="' . $class . '"' . $conditions . '>'; /* don't show title with textblocks */ if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) { echo '<div class="format-setting-label">'; echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>'; echo '</div>'; } /* only allow simple textarea inside a list-item due to known DOM issues with wp_editor() */ if ( apply_filters( 'ot_override_forced_textarea_simple', false, $field['id'] ) == false && $_args['type'] == 'textarea' ) $_args['type'] = 'textarea-simple'; /* option body, list-item is not allowed inside another list-item */ if ( $_args['type'] !== 'list-item' && $_args['type'] !== 'slider' ) { echo ot_display_by_type( $_args ); } echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Helper function to display social links. * * This function is used in AJAX to add a new list items * and when they have already been added and saved. * * @param string $name The form field name. * @param int $key The array key for the current element. * @param array An array of values for the current list item. * * @return void * * @access public * @since 2.4.0 */ if ( ! function_exists( 'ot_social_links_view' ) ) { function ot_social_links_view( $name, $key, $list_item = array(), $post_id = 0, $get_option = '', $settings = array(), $type = '' ) { /* if no settings array load the filterable social links settings */ if ( empty( $settings ) ) { $settings = ot_social_links_settings( $name ); } echo ' <div class="option-tree-setting"> <div class="open">' . ( isset( $list_item['name'] ) ? esc_attr( $list_item['name'] ) : '' ) . '</div> <div class="button-section"> <a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button button left-item" title="' . esc_html__( 'Edit', 'uncode-core' ) . '"> <span class="icon ot-icon-pencil"></span>' . esc_html__( 'Edit', 'uncode-core' ) . ' </a> <a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button button button-secondary light right-item" title="' . esc_html__( 'Delete', 'uncode-core' ) . '"> <span class="icon ot-icon-trash-o"></span>' . esc_html__( 'Delete', 'uncode-core' ) . ' </a> </div> <div class="option-tree-setting-body">'; foreach( $settings as $field ) { // Set field value $field_value = isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : ''; /* set default to standard value */ if ( isset( $field['std'] ) ) { $field_value = ot_filter_std_value( $field_value, $field['std'] ); } /* make life easier */ $_field_name = $get_option ? $get_option . '[' . $name . ']' : $name; /* build the arguments array */ $_args = array( 'type' => $field['type'], 'field_id' => $name . '_' . $field['id'] . '_' . $key, 'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']', 'field_value' => $field_value, 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '', 'field_std' => isset( $field['std'] ) ? $field['std'] : '', 'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10, 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post', 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category', 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1', 'field_class' => isset( $field['class'] ) ? $field['class'] : '', 'field_condition' => isset( $field['condition'] ) ? $field['condition'] : '', 'field_operator' => isset( $field['operator'] ) ? $field['operator'] : 'and', 'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(), 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(), 'post_id' => $post_id, 'get_option' => $get_option ); $conditions = ''; /* setup the conditions */ if ( isset( $field['condition'] ) && ! empty( $field['condition'] ) ) { /* doing magic on the conditions so they work in a list item */ $conditionals = explode( ',', $field['condition'] ); foreach( $conditionals as $condition ) { $parts = explode( ':', $condition ); if ( isset( $parts[0] ) ) { $field['condition'] = str_replace( $condition, $name . '_' . $parts[0] . '_' . $key . ':' . $parts[1], $field['condition'] ); } } $conditions = ' data-condition="' . $field['condition'] . '"'; $conditions.= isset( $field['operator'] ) && in_array( $field['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['operator'] . '"' : ''; } /* option label */ echo '<div id="setting_' . $_args['field_id'] . '" class="format-settings"' . $conditions . '>'; /* don't show title with textblocks */ if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) { echo '<div class="format-setting-label">'; echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>'; echo '</div>'; } /* only allow simple textarea inside a list-item due to known DOM issues with wp_editor() */ if ( $_args['type'] == 'textarea' ) $_args['type'] = 'textarea-simple'; /* option body, list-item is not allowed inside another list-item */ if ( $_args['type'] !== 'list-item' && $_args['type'] !== 'slider' && $_args['type'] !== 'social-links' ) { echo ot_display_by_type( $_args ); } echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Helper function to display Theme Options layouts form. * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) { function ot_theme_options_layouts_form( $active = false ) { echo '<form method="post" id="option-tree-options-layouts-form">'; /* form nonce */ wp_nonce_field( 'option_tree_modify_layouts_form', 'option_tree_modify_layouts_nonce' ); /* get the saved layouts */ $layouts = get_option( ot_layouts_id() ); /* set active layout */ $active_layout = isset( $layouts['active_layout'] ) ? $layouts['active_layout'] : ''; if ( is_array( $layouts ) && count( $layouts ) > 1 ) { $active_layout = esc_attr( $layouts['active_layout'] ); echo '<input type="hidden" id="the_current_layout" value="' . $active_layout . '" />'; echo '<div class="option-tree-active-layout">'; echo '<select name="' . ot_layouts_id() . '[active_layout]" class="option-tree-ui-select">'; ksort($layouts); foreach( $layouts as $key => $data ) { if ( $key == 'active_layout' ) continue; echo '<option' . selected( $key, $active_layout, false ) . ' value="' . esc_attr( $key ) . '">' . esc_attr( $key ) . '</option>'; } echo '</select>'; echo '</div>'; foreach( $layouts as $key => $data ) { if ( $key == 'active_layout' ) continue; echo '<input type="hidden" name="' . ot_layouts_id() . '[' . $key . ']" value="' . ( isset( $data ) ? $data : '' ) . '" />'; } } /* new layout wrapper */ echo '<div class="option-tree-save-layout' . ( ! empty( $active_layout ) ? ' active-layout' : '' ) . '">'; /* add new layout */ echo '<input type="text" name="' . ot_layouts_id() . '[_add_new_layout_]" value="" class="widefat option-tree-ui-input" autocomplete="off" placeholder="' . esc_html__( 'Enter a Layout Name', 'uncode-core' ) . '" />'; echo '<button type="submit" class="option-tree-ui-button button button-primary save-layout" title="' . esc_html__( 'Save New Layout', 'uncode-core' ) . '">' . esc_html__( 'Save New Layout', 'uncode-core' ) . '</button>'; echo '</div>'; echo '</form>'; } } /** * Helper function to validate option ID's * * @param string $input The string to sanitize. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_sanitize_option_id' ) ) { function ot_sanitize_option_id( $input ) { return preg_replace( '/[^a-z0-9]/', '_', trim( strtolower( $input ) ) ); } } /** * Helper function to validate layout ID's * * @param string $input The string to sanitize. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_sanitize_layout_id' ) ) { function ot_sanitize_layout_id( $input ) { return preg_replace( '/[^a-z0-9]/', '-', trim( strtolower( $input ) ) ); } } /** * Convert choices array to string * * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_convert_array_to_string' ) ) { function ot_convert_array_to_string( $input ) { if ( is_array( $input ) ) { foreach( $input as $k => $choice ) { $choices[$k] = $choice['value'] . '|' . $choice['label']; if ( isset( $choice['src'] ) ) $choices[$k].= '|' . $choice['src']; } return implode( ',', $choices ); } return false; } } /** * Convert choices string to array * * @return array * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_convert_string_to_array' ) ) { function ot_convert_string_to_array( $input ) { if ( '' !== $input ) { /* empty choices array */ $choices = array(); /* exlode the string into an array */ foreach( explode( ',', $input ) as $k => $choice ) { /* if ":" is splitting the string go deeper */ if ( preg_match( '/\|/', $choice ) ) { $split = explode( '|', $choice ); $choices[$k]['value'] = trim( $split[0] ); $choices[$k]['label'] = trim( $split[1] ); /* if radio image there are three values */ if ( isset( $split[2] ) ) $choices[$k]['src'] = trim( $split[2] ); } else { $choices[$k]['value'] = trim( $choice ); $choices[$k]['label'] = trim( $choice ); } } /* return a formated choices array */ return $choices; } return false; } } /** * Helper function - strpos() with arrays. * * @param string $haystack * @param array $needles * @return bool * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_strpos_array' ) ) { function ot_strpos_array( $haystack, $needles = array() ) { foreach( $needles as $needle ) { $pos = strpos( $haystack, $needle ); if ( $pos !== false ) { return true; } } return false; } } /** * Helper function - strpos() with arrays. * * @param string $haystack * @param array $needles * @return bool * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_array_keys_exists' ) ) { function ot_array_keys_exists( $array, $keys ) { foreach($keys as $k) { if ( isset($array[$k]) ) { return true; } } return false; } } /** * Custom stripslashes from single value or array. * * @param mixed $input * @return mixed * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_stripslashes' ) ) { function ot_stripslashes( $input ) { if ( is_array( $input ) ) { foreach( $input as &$val ) { if ( is_array( $val ) ) { $val = ot_stripslashes( $val ); } else { $val = stripslashes( trim( $val ) ); } } } else { $input = stripslashes( trim( $input ) ); } return $input; } } /** * Reverse wpautop. * * @param string $string The string to be filtered * @return string * * @access public * @since 2.0.9 */ if ( ! function_exists( 'ot_reverse_wpautop' ) ) { function ot_reverse_wpautop( $string = '' ) { /* return if string is empty */ if ( trim( $string ) === '' ) return ''; /* remove all new lines & <p> tags */ $string = str_replace( array( "\n", "<p>" ), "", $string ); /* replace <br /> with \r */ $string = str_replace( array( "<br />", "<br>", "<br/>" ), "\r", $string ); /* replace </p> with \r\n */ $string = str_replace( "</p>", "\r\n", $string ); /* return clean string */ return trim( $string ); } } /** * Returns an array of elements from start to limit, inclusive. * * Occasionally zero will be some impossibly large number to * the "E" power when creating a range from negative to positive. * This function attempts to fix that by setting that number back to "0". * * @param string $start First value of the sequence. * @param string $limit The sequence is ended upon reaching the limit value. * @param string $step If a step value is given, it will be used as the increment * between elements in the sequence. step should be given as a * positive number. If not specified, step will default to 1. * @return array * * @access public * @since 2.0.12 */ function ot_range( $start, $limit, $step = 1 ) { if ( $step < 0 ) $step = 1; $range = range( $start, $limit, $step ); foreach( $range as $k => $v ) { if ( strpos( $v, 'E' ) ) { $range[$k] = 0; } } return $range; } /** * Helper function to return encoded strings * * @return string * * @access public * @since 2.0.13 */ function ot_encode( $value ) { $func = 'base64' . '_encode'; return $func( $value ); } /** * Helper function to return decoded strings * * @return string * * @access public * @since 2.0.13 */ function ot_decode( $value ) { $func = 'base64' . '_decode'; return $func( $value ); } /** * Helper function to open a file * * @access public * @since 2.0.13 */ function ot_file_open( $handle, $mode ) { $func = 'f' . 'open'; return @$func( $handle, $mode ); } /** * Helper function to close a file * * @access public * @since 2.0.13 */ function ot_file_close( $handle ) { $func = 'f' . 'close'; return $func( $handle ); } /** * Helper function to write to an open file * * @access public * @since 2.0.13 */ function ot_file_write( $handle, $string ) { $func = 'f' . 'write'; return $func( $handle, $string ); } /** * Helper function to filter standard option values. * * @param mixed $value Saved string or array value * @param mixed $std Standard string or array value * @return mixed String or array * * @access public * @since 2.0.15 */ function ot_filter_std_value( $value = '', $std = '' ) { $std = maybe_unserialize( $std ); if ( is_array( $value ) && is_array( $std ) ) { foreach( $value as $k => $v ) { if ( '' == $value[$k] && isset( $std[$k] ) ) { $value[$k] = $std[$k]; } } } else if ( '' == $value && ! empty( $std ) ) { $value = $std; } return $value; } /** * Helper function to register a WPML string * * @access public * @since 2.1 */ function ot_wpml_register_string( $id, $value ) { if ( function_exists( 'icl_register_string' ) ) { // icl_register_string( 'Theme Options', $id, $value ); } } /** * Helper function to unregister a WPML string * * @access public * @since 2.1 */ function ot_wpml_unregister_string( $id ) { if ( function_exists( 'icl_unregister_string' ) ) { icl_unregister_string( 'Theme Options', $id ); } } /** * Returns the option type by ID. * * @param string $option_id The option ID * @return string $settings_id The settings array ID * @return string The option type. * * @access public * @since 2.4.2 */ if ( ! function_exists( 'ot_get_option_type_by_id' ) ) { function ot_get_option_type_by_id( $option_id, $settings_id = '' ) { if ( empty( $settings_id ) ) { $settings_id = ot_settings_id(); } $settings = get_option( $settings_id, array() ); if ( isset( $settings['settings'] ) ) { foreach( $settings['settings'] as $value ) { if ( $option_id == $value['id'] && isset( $value['type'] ) ) { return $value['type']; } } } return false; } } /** * Build an array of potential Theme Options that could share terms * * @return array * * @access private * @since 2.5.4 */ function _ot_settings_potential_shared_terms() { $options = array(); $settings = get_option( ot_settings_id(), array() ); $option_types = array( 'category-checkbox', 'category-select', 'tag-checkbox', 'tag-select', 'taxonomy-checkbox', 'taxonomy-select' ); if ( isset( $settings['settings'] ) ) { foreach( $settings['settings'] as $value ) { if ( isset( $value['type'] ) ) { if ( $value['type'] == 'list-item' && isset( $value['settings'] ) ) { $saved = ot_get_option( $value['id'] ); foreach( $value['settings'] as $item ) { if ( isset( $value['id'] ) && isset( $item['type'] ) && in_array( $item['type'], $option_types ) ) { $sub_options = array(); foreach( $saved as $sub_key => $sub_value ) { if ( isset( $sub_value[$item['id']] ) ) { $sub_options[$sub_key] = $sub_value[$item['id']]; } } if ( ! empty( $sub_options ) ) { $options[] = array( 'id' => $item['id'], 'taxonomy' => $value['taxonomy'], 'parent' => $value['id'], 'value' => $sub_options ); } } } } if ( in_array( $value['type'], $option_types ) ) { $saved = ot_get_option( $value['id'] ); if ( ! empty( $saved ) ) { $options[] = array( 'id' => $value['id'], 'taxonomy' => $value['taxonomy'], 'value' => $saved ); } } } } } return $options; } /** * Build an array of potential Meta Box options that could share terms * * @return array * * @access private * @since 2.5.4 */ function _ot_meta_box_potential_shared_terms() { global $ot_meta_boxes; $options = array(); $settings = $ot_meta_boxes; $option_types = array( 'category-checkbox', 'category-select', 'tag-checkbox', 'tag-select', 'taxonomy-checkbox', 'taxonomy-select' ); foreach( $settings as $setting ) { if ( isset( $setting['fields'] ) ) { foreach( $setting['fields'] as $value ) { if ( isset( $value['type'] ) ) { if ( $value['type'] == 'list-item' && isset( $value['settings'] ) ) { $children = array(); foreach( $value['settings'] as $item ) { if ( isset( $value['id'] ) && isset( $item['type'] ) && in_array( $item['type'], $option_types ) ) { $children[$value['id']][] = $item['id']; } } if ( ! empty( $children[$value['id']] ) ) { $options[] = array( 'id' => $value['id'], 'children' => $children[$value['id']], 'taxonomy' => $value['taxonomy'], ); } } if ( in_array( $value['type'], $option_types ) ) { $options[] = array( 'id' => $value['id'], 'taxonomy' => $value['taxonomy'], ); } } } } } return $options; } /** * Update terms when a term gets split. * * @param int $term_id ID of the formerly shared term. * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. * @param string $taxonomy Taxonomy for the split term. * @return void * * @access public * @since 2.5.4 */ function ot_split_shared_term( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { // Process the Theme Options $settings = _ot_settings_potential_shared_terms(); $old_options = get_option( ot_options_id(), array() ); $new_options = $old_options; // Process the saved settings if ( ! empty( $settings ) && ! empty( $old_options ) ) { // Loop over the Theme Options foreach( $settings as $option ) { if ( ! is_array( $option['taxonomy'] ) ) { $option['taxonomy'] = explode( ',', $option['taxonomy'] ); } if ( ! in_array( $taxonomy, $option['taxonomy'] ) ) { continue; } // The option ID was found if ( array_key_exists( $option['id'], $old_options ) || ( isset( $option['parent'] ) && array_key_exists( $option['parent'], $old_options ) ) ) { // This is a list item, we have to go deeper if ( isset( $option['parent'] ) ) { // Loop over the array foreach( $option['value'] as $key => $value ) { // The value is an array of IDs if ( is_array( $value ) ) { // Loop over the sub array foreach( $value as $sub_key => $sub_value ) { if ( $sub_value == $term_id ) { unset( $new_options[$option['parent']][$key][$option['id']][$sub_key] ); $new_options[$option['parent']][$key][$option['id']][$new_term_id] = $new_term_id; } } } else if ( $value == $term_id ) { unset( $new_options[$option['parent']][$key][$option['id']] ); $new_options[$option['parent']][$key][$option['id']] = $new_term_id; } } } else { // The value is an array of IDs if ( is_array( $option['value'] ) ) { // Loop over the array foreach( $option['value'] as $key => $value ) { // It's a single value, just replace it if ( $value == $term_id ) { unset( $new_options[$option['id']][$key] ); $new_options[$option['id']][$new_term_id] = $new_term_id; } } // It's a single value, just replace it } else if ( $option['value'] == $term_id ) { $new_options[$option['id']] = $new_term_id; } } } } } // Options need to be updated if ( $old_options !== $new_options ) { update_option( ot_options_id(), $new_options ); } // Process the Meta Boxes $meta_settings = _ot_meta_box_potential_shared_terms(); $option_types = array( 'category-checkbox', 'category-select', 'tag-checkbox', 'tag-select', 'taxonomy-checkbox', 'taxonomy-select' ); if ( ! empty( $meta_settings ) ) { $old_meta = array(); foreach( $meta_settings as $option ) { if ( ! is_array( $option['taxonomy'] ) ) { $option['taxonomy'] = explode( ',', $option['taxonomy'] ); } if ( ! in_array( $taxonomy, $option['taxonomy'] ) ) { continue; } if ( isset( $option['children'] ) ) { $post_ids = get_posts( array( 'fields' => 'ids', 'meta_key' => $option['id'], ) ); if ( $post_ids ) { foreach( $post_ids as $post_id ) { // Get the meta $old_meta = get_post_meta( $post_id, $option['id'], true ); $new_meta = $old_meta; // Has a saved value if ( ! empty( $old_meta ) && is_array( $old_meta ) ) { // Loop over the array foreach( $old_meta as $key => $value ) { foreach( $value as $sub_key => $sub_value ) { if ( in_array( $sub_key, $option['children'] ) ) { // The value is an array of IDs if ( is_array( $sub_value ) ) { // Loop over the array foreach( $sub_value as $sub_sub_key => $sub_sub_value ) { // It's a single value, just replace it if ( $sub_sub_value == $term_id ) { unset( $new_meta[$key][$sub_key][$sub_sub_key] ); $new_meta[$key][$sub_key][$new_term_id] = $new_term_id; } } // It's a single value, just replace it } else if ( $sub_value == $term_id ) { $new_meta[$key][$sub_key] = $new_term_id; } } } } // Update if ( $old_meta !== $new_meta ) { update_post_meta( $post_id, $option['id'], $new_meta, $old_meta ); } } } } } else { $post_ids = get_posts( array( 'fields' => 'ids', 'meta_query' => array( 'key' => $option['id'], 'value' => $term_id, 'compare' => 'IN' ), ) ); if ( $post_ids ) { foreach( $post_ids as $post_id ) { // Get the meta $old_meta = get_post_meta( $post_id, $option['id'], true ); $new_meta = $old_meta; // Has a saved value if ( ! empty( $old_meta ) ) { // The value is an array of IDs if ( is_array( $old_meta ) ) { // Loop over the array foreach( $old_meta as $key => $value ) { // It's a single value, just replace it if ( $value == $term_id ) { unset( $new_meta[$key] ); $new_meta[$new_term_id] = $new_term_id; } } // It's a single value, just replace it } else if ( $old_meta == $term_id ) { $new_meta = $new_term_id; } // Update if ( $old_meta !== $new_meta ) { update_post_meta( $post_id, $option['id'], $new_meta, $old_meta ); } } } } } } } } add_action( 'split_shared_term', 'ot_split_shared_term', 10, 4 ); /* End of file ot-functions-admin.php */ /* Location: ./includes/ot-functions-admin.php */ includes/theme-options/includes/ot-functions-option-types.php 0000644 00000301650 15174671607 0020607 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * Functions used to build each option type. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman * @since 2.0 */ /** * Builds the HTML for each of the available option types by calling those * function with call_user_func and passing the arguments to the second param. * * All fields are required! * * @param array $args The array of arguments are as follows: * @param string $type Type of option. * @param string $field_id The field ID. * @param string $field_name The field Name. * @param mixed $field_value The field value is a string or an array of values. * @param string $field_desc The field description. * @param string $field_std The standard value. * @param string $field_class Extra CSS classes. * @param array $field_choices The array of option choices. * @param array $field_settings The array of settings for a list item. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_display_by_type' ) ) { function ot_display_by_type( $args = array() ) { /* allow filters to be executed on the array */ $args = apply_filters( 'ot_display_by_type', $args ); /* build the function name */ $function_name_by_type = str_replace( '-', '_', 'ot_type_' . $args['type'] ); /* call the function & pass in arguments array */ if ( function_exists( $function_name_by_type ) ) { call_user_func( $function_name_by_type, $args ); } else { echo '<p>' . esc_html__( 'Sorry, this function does not exist', 'uncode-core' ) . '</p>'; } } } /** * Background option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_background' ) ) { function ot_type_background( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* If an attachment ID is stored here fetch its URL and replace the value */ if ( isset( $field_value['background-image'] ) && wp_attachment_is_image( $field_value['background-image'] ) ) { $attachment_data = wp_get_attachment_image_src( $field_value['background-image'], 'original' ); /* check for attachment data */ if ( $attachment_data ) { $field_src = $attachment_data[0]; } } /* format setting outer wrapper */ echo '<div class="format-setting type-background ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* allow fields to be filtered */ $ot_recognized_background_fields = apply_filters( 'ot_recognized_background_fields', array( 'background-color', 'background-repeat', 'background-attachment', 'background-position', 'background-size', 'background-image' ), $field_id ); echo '<div class="ot-background-group">'; /* build background color */ if ( in_array( 'background-color', $ot_recognized_background_fields ) ) { echo '<div class="option-tree-ui-colorpicker-input-wrap">'; /* colorpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_colorpicker("' . esc_attr( $field_id ) . '-picker"); });</script>'; /* set background color */ $background_color = isset( $field_value['background-color'] ) ? esc_attr( $field_value['background-color'] ) : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '[background-color]" id="' . $field_id . '-picker" value="' . $background_color . '" class="hide-color-picker ' . esc_attr( $field_class ) . '" />'; echo '</div>'; } /* build background repeat */ if ( in_array( 'background-repeat', $ot_recognized_background_fields ) ) { $background_repeat = isset( $field_value['background-repeat'] ) ? esc_attr( $field_value['background-repeat'] ) : ''; echo '<select name="' . esc_attr( $field_name ) . '[background-repeat]" id="' . esc_attr( $field_id ) . '-repeat" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="">' . esc_html__( 'background-repeat', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_background_repeat( $field_id ) as $key => $value ) { echo '<option value="' . esc_attr( $key ) . '" ' . selected( $background_repeat, $key, false ) . '>' . esc_attr( $value ) . '</option>'; } echo '</select>'; } /* build background attachment */ if ( in_array( 'background-attachment', $ot_recognized_background_fields ) ) { $background_attachment = isset( $field_value['background-attachment'] ) ? esc_attr( $field_value['background-attachment'] ) : ''; echo '<select name="' . esc_attr( $field_name ) . '[background-attachment]" id="' . esc_attr( $field_id ) . '-attachment" class="option-tree-ui-select ' . $field_class . '">'; echo '<option value="">' . esc_html__( 'background-attachment', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_background_attachment( $field_id ) as $key => $value ) { echo '<option value="' . esc_attr( $key ) . '" ' . selected( $background_attachment, $key, false ) . '>' . esc_attr( $value ) . '</option>'; } echo '</select>'; } /* build background position */ if ( in_array( 'background-position', $ot_recognized_background_fields ) ) { $background_position = isset( $field_value['background-position'] ) ? esc_attr( $field_value['background-position'] ) : ''; echo '<select name="' . esc_attr( $field_name ) . '[background-position]" id="' . esc_attr( $field_id ) . '-position" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="">' . esc_html__( 'background-position', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_background_position( $field_id ) as $key => $value ) { echo '<option value="' . esc_attr( $key ) . '" ' . selected( $background_position, $key, false ) . '>' . esc_attr( $value ) . '</option>'; } echo '</select>'; } /* Build background size */ if ( in_array( 'background-size', $ot_recognized_background_fields ) ) { /** * Use this filter to create a select instead of an text input. * Be sure to return the array in the correct format. Add an empty * value to the first choice so the user can leave it blank. * array( array( 'label' => 'background-size', 'value' => '' ), array( 'label' => 'cover', 'value' => 'cover' ), array( 'label' => 'contain', 'value' => 'contain' ) ) * */ $choices = apply_filters( 'ot_type_background_size_choices', '', $field_id ); if ( is_array( $choices ) && ! empty( $choices ) ) { /* build select */ echo '<select name="' . esc_attr( $field_name ) . '[background-size]" id="' . esc_attr( $field_id ) . '-size" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; foreach ( (array) $choices as $choice ) { if ( isset( $choice['value'] ) && isset( $choice['label'] ) ) { echo '<option value="' . esc_attr( $choice['value'] ) . '"' . selected( ( isset( $field_value['background-size'] ) ? $field_value['background-size'] : '' ), $choice['value'], false ) . '>' . esc_attr( $choice['label'] ) . '</option>'; } } echo '</select>'; } else { echo '<input type="text" name="' . esc_attr( $field_name ) . '[background-size]" id="' . esc_attr( $field_id ) . '-size" value="' . ( isset( $field_value['background-size'] ) ? esc_attr( $field_value['background-size'] ) : '' ) . '" class="widefat ot-background-size-input option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'background-size', 'uncode-core' ) . '" />'; } } echo '</div>'; /* build background image */ if ( in_array( 'background-image', $ot_recognized_background_fields ) ) { echo '<div class="option-tree-ui-upload-parent">'; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '[background-image]" id="' . esc_attr( $field_id ) . '" value="' . ( isset( $field_value['background-image'] ) ? esc_attr( $field_value['background-image'] ) : '' ) . '" class="widefat option-tree-ui-upload-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'background-image', 'uncode-core' ) . '" />'; /* add media button */ echo '<a href="javascript:void(0);" class="ot_upload_media option-tree-ui-button button button-primary light" rel="' . $post_id . '" title="' . esc_html__( 'Add Media', 'uncode-core' ) . '"><span class="icon ot-icon-plus-circle"></span>' . esc_html__( 'Add Media', 'uncode-core' ) . '</a>'; echo '</div>'; /* media */ if ( isset( $field_value['background-image'] ) && $field_value['background-image'] !== '' ) { /* replace image src */ if ( isset( $field_src ) ) $field_value['background-image'] = $field_src; echo '<div class="option-tree-ui-media-wrap" id="' . esc_attr( $field_id ) . '_media">'; if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value['background-image'] ) ) echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value['background-image'] ) . '" alt="" /></div>'; echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button button button-secondary light" title="' . esc_html__( 'Remove Media', 'uncode-core' ) . '"><span class="icon ot-icon-minus-circle"></span>' . esc_html__( 'Remove Media', 'uncode-core' ) . '</a>'; echo '</div>'; } } echo '</div>'; echo '</div>'; } } /** * Border Option Type * * See @ot_display_by_type to see the full list of available arguments. * * @param array The options arguments * @return string The markup. * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_border' ) ) { function ot_type_border( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-border ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* allow fields to be filtered */ $ot_recognized_border_fields = apply_filters( 'ot_recognized_border_fields', array( 'width', 'unit', 'style', 'color' ), $field_id ); /* build border width */ if ( in_array( 'width', $ot_recognized_border_fields ) ) { $width = isset( $field_value['width'] ) ? esc_attr( $field_value['width'] ) : ''; echo '<div class="ot-option-group ot-option-group--one-sixth"><input type="text" name="' . esc_attr( $field_name ) . '[width]" id="' . esc_attr( $field_id ) . '-width" value="' . esc_attr( $width ) . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'width', 'uncode-core' ) . '" /></div>'; } /* build unit dropdown */ if ( in_array( 'unit', $ot_recognized_border_fields ) ) { echo '<div class="ot-option-group ot-option-group--one-fourth">'; echo '<select name="' . esc_attr( $field_name ) . '[unit]" id="' . esc_attr( $field_id ) . '-unit" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="">' . esc_html__( 'unit', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_border_unit_types( $field_id ) as $unit ) { echo '<option value="' . esc_attr( $unit ) . '"' . ( isset( $field_value['unit'] ) ? selected( $field_value['unit'], $unit, false ) : '' ) . '>' . esc_attr( $unit ) . '</option>'; } echo '</select>'; echo '</div>'; } /* build style dropdown */ if ( in_array( 'style', $ot_recognized_border_fields ) ) { echo '<div class="ot-option-group ot-option-group--one-fourth">'; echo '<select name="' . esc_attr( $field_name ) . '[style]" id="' . esc_attr( $field_id ) . '-style" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="">' . esc_html__( 'style', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_border_style_types( $field_id ) as $key => $style ) { echo '<option value="' . esc_attr( $key ) . '"' . ( isset( $field_value['style'] ) ? selected( $field_value['style'], $key, false ) : '' ) . '>' . esc_attr( $style ) . '</option>'; } echo '</select>'; echo '</div>'; } /* build color */ if ( in_array( 'color', $ot_recognized_border_fields ) ) { echo '<div class="option-tree-ui-colorpicker-input-wrap">'; /* colorpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_colorpicker("' . esc_attr( $field_id ) . '-picker"); });</script>'; /* set color */ $color = isset( $field_value['color'] ) ? esc_attr( $field_value['color'] ) : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '[color]" id="' . $field_id . '-picker" value="' . $color . '" class="hide-color-picker ' . esc_attr( $field_class ) . '" />'; echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Box Shadow Option Type * * See @ot_display_by_type to see the full list of available arguments. * * @param array The options arguments * @return string The markup. * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_box_shadow' ) ) { function ot_type_box_shadow( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-box-shadow ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* allow fields to be filtered */ $ot_recognized_box_shadow_fields = apply_filters( 'ot_recognized_box_shadow_fields', array( 'inset', 'offset-x', 'offset-y', 'blur-radius', 'spread-radius', 'color' ), $field_id ); /* build inset */ if ( in_array( 'inset', $ot_recognized_box_shadow_fields ) ) { echo '<div class="ot-option-group ot-option-group--checkbox"><p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[inset]" id="' . esc_attr( $field_id ) . '-inset" value="inset" ' . ( isset( $field_value['inset'] ) ? checked( $field_value['inset'], 'inset', false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-inset">inset</label>'; echo '</p></div>'; } /* build horizontal offset */ if ( in_array( 'offset-x', $ot_recognized_box_shadow_fields ) ) { $offset_x = isset( $field_value['offset-x'] ) ? esc_attr( $field_value['offset-x'] ) : ''; echo '<div class="ot-option-group ot-option-group--one-fifth"><span class="ot-icon-arrows-h ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[offset-x]" id="' . esc_attr( $field_id ) . '-offset-x" value="' . $offset_x . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'offset-x', 'uncode-core' ) . '" /></div>'; } /* build vertical offset */ if ( in_array( 'offset-y', $ot_recognized_box_shadow_fields ) ) { $offset_y = isset( $field_value['offset-y'] ) ? esc_attr( $field_value['offset-y'] ) : ''; echo '<div class="ot-option-group ot-option-group--one-fifth"><span class="ot-icon-arrows-v ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[offset-y]" id="' . esc_attr( $field_id ) . '-offset-y" value="' . $offset_y . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'offset-y', 'uncode-core' ) . '" /></div>'; } /* build blur-radius radius */ if ( in_array( 'blur-radius', $ot_recognized_box_shadow_fields ) ) { $blur_radius = isset( $field_value['blur-radius'] ) ? esc_attr( $field_value['blur-radius'] ) : ''; echo '<div class="ot-option-group ot-option-group--one-fifth"><span class="ot-icon-circle ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[blur-radius]" id="' . esc_attr( $field_id ) . '-blur-radius" value="' . $blur_radius . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'blur-radius', 'uncode-core' ) . '" /></div>'; } /* build spread-radius radius */ if ( in_array( 'spread-radius', $ot_recognized_box_shadow_fields ) ) { $spread_radius = isset( $field_value['spread-radius'] ) ? esc_attr( $field_value['spread-radius'] ) : ''; echo '<div class="ot-option-group ot-option-group--one-fifth"><span class="ot-icon-arrows-alt ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[spread-radius]" id="' . esc_attr( $field_id ) . '-spread-radius" value="' . $spread_radius . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'spread-radius', 'uncode-core' ) . '" /></div>'; } /* build color */ if ( in_array( 'color', $ot_recognized_box_shadow_fields ) ) { echo '<div class="option-tree-ui-colorpicker-input-wrap">'; /* colorpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_colorpicker("' . esc_attr( $field_id ) . '-picker"); });</script>'; /* set color */ $color = isset( $field_value['color'] ) ? esc_attr( $field_value['color'] ) : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '[color]" id="' . esc_attr( $field_id ) . '-picker" value="' . $color . '" class="hide-color-picker ' . esc_attr( $field_class ) . '" />'; echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Category Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_category_checkbox' ) ) { function ot_type_category_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-category-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* get category array */ $categories = get_categories( apply_filters( 'ot_type_category_checkbox_query', array( 'hide_empty' => false ), $field_id ) ); /* build categories */ if ( ! empty( $categories ) ) { foreach ( $categories as $category ) { echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $category->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $category->term_id ) . '" value="' . esc_attr( $category->term_id ) . '" ' . ( isset( $field_value[$category->term_id] ) ? checked( $field_value[$category->term_id], $category->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $category->term_id ) . '">' . esc_attr( $category->name ) . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Categories Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Category Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_category_select' ) ) { function ot_type_category_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-category-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build category */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* get category array */ $categories = get_categories( apply_filters( 'ot_type_category_select_query', array( 'hide_empty' => false ), $field_id ) ); /* has cats */ if ( ! empty( $categories ) ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach ( $categories as $category ) { echo '<option value="' . esc_attr( $category->term_id ) . '"' . selected( $field_value, $category->term_id, false ) . '>' . esc_attr( $category->name ) . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Categories Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_checkbox' ) ) { function ot_type_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build checkbox */ foreach ( (array) $field_choices as $key => $choice ) { if ( isset( $choice['value'] ) && isset( $choice['label'] ) ) { echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $key ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '" ' . ( isset( $field_value[$key] ) ? checked( $field_value[$key], $choice['value'], false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label>'; echo '</p>'; } } echo '</div>'; echo '</div>'; } } /** * Colorpicker option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 * @updated 2.2.0 */ if ( ! function_exists( 'ot_type_colorpicker' ) ) { function ot_type_colorpicker( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-colorpicker ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build colorpicker */ echo '<div class="option-tree-ui-colorpicker-input-wrap">'; if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) { /* colorpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_colorpicker("' . esc_attr( $field_id ) . '"); });</script>'; } /* set the default color */ $std = $field_std ? 'data-default-color="' . $field_std . '"' : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" value="' . esc_attr( $field_value ) . '" class="hide-color-picker ' . esc_attr( $field_class ) . '" ' . $std . ' />'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * Gradientpicker option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 * @updated 2.2.0 */ if ( ! function_exists( 'ot_type_gradientpicker' ) ) { function ot_type_gradientpicker( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-gradientpicker ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build gradientpicker */ echo '<div class="option-tree-ui-gradientpicker-input-wrap">'; /* colorpicker JS */ $gradient_id = 'gradient-' . filter_var($field_id, FILTER_SANITIZE_NUMBER_INT); echo '<div id="'.$gradient_id.'" class="gradient-picker"></div>'; /* gradientpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_gradientpicker("' . esc_attr( $gradient_id ) . '"); });</script>'; /* set the default color */ $std = $field_std ? 'data-default-color="' . $field_std . '"' : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" value="' . esc_attr( str_replace('\n', '', $field_value )) . '" class="hide-color-picker input-gradient ' . esc_attr( $field_class ) . '" ' . $std . ' />'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * Colorpicker Opacity option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_colorpicker_opacity' ) ) { function ot_type_colorpicker_opacity( $args = array() ) { $args['field_class'] = isset( $args['field_class'] ) ? $args['field_class'] . ' ot-colorpicker-opacity' : 'ot-colorpicker-opacity'; ot_type_colorpicker( $args ); } } /** * CSS option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_css' ) ) { function ot_type_css( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-css simple ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build textarea for CSS */ echo '<textarea class="hidden" id="textarea_' . esc_attr( $field_id ) . '" name="' . esc_attr( $field_name ) .'">' . esc_attr( $field_value ) . '</textarea>'; /* build pre to convert it into ace editor later */ echo '<pre class="ot-css-editor ' . esc_attr( $field_class ) . '" id="' . esc_attr( $field_id ) . '">' . esc_textarea( $field_value ) . '</pre>'; echo '</div>'; echo '</div>'; } } /** * JS option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_js' ) ) { function ot_type_js( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-js simple ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build textarea for JS */ echo '<textarea class="hidden" id="textarea_' . esc_attr( $field_id ) . '" name="' . esc_attr( $field_name ) .'">' . esc_attr( $field_value ) . '</textarea>'; /* build pre to convert it into ace editor later */ echo '<pre class="ot-js-editor ' . esc_attr( $field_class ) . '" id="' . esc_attr( $field_id ) . '">' . esc_textarea( $field_value ) . '</pre>'; echo '</div>'; echo '</div>'; } } /** * Custom Post Type Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_custom_post_type_checkbox' ) ) { function ot_type_custom_post_type_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-custom-post-type-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ if ($has_desc) '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* setup the post types */ $post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' ); /* query posts array */ $my_posts = get_posts( apply_filters( 'ot_type_custom_post_type_checkbox_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has posts */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $my_post->ID ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '" value="' . esc_attr( $my_post->ID ) . '" ' . ( isset( $field_value[$my_post->ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '">' . $post_title . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Posts Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Custom Post Type Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_custom_post_type_select_2' ) ) { function ot_type_custom_post_type_select_2( $args = array() ) { $args['none'] = true; ot_type_custom_post_type_select( $args ); } } if ( ! function_exists( 'ot_type_custom_post_type_select' ) ) { function ot_type_custom_post_type_select( $args = array() ) { $post_active = ''; /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; $vc_editable = false; if ( class_exists( 'Vc_Roles' ) ) { $vc_roles = new Vc_Roles(); $vc_post_types = $vc_roles->getPostTypes(); foreach ($vc_post_types as $key => $value) { if ( isset( $field_post_type ) && $field_post_type == $value[0] ) { $vc_editable = true; break; } } } /* format setting outer wrapper */ echo '<div class="format-setting type-custom-post-type-select select-with-switching-button ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build category */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* setup the post types */ $post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' ); /* query posts array */ $my_posts = get_posts( apply_filters( 'ot_type_custom_post_type_select_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has posts */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { if ( !isset( $field_choices ) || $field_choices === '' || !is_array( $field_choices ) || empty( $field_choices ) ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; if ( isset($args['none']) && $args['none']==true ) { echo '<option value="none">' . esc_html__( 'None', 'uncode-core' ) . '</option>'; } } else { foreach ( (array) $field_choices as $choice ) { if ( isset( $choice['value'] ) && isset( $choice['label'] ) ) { $post_link = (isset( $choice['postlink'] )) ? ' data-link="'. esc_url( $choice['postlink'] ) . '"' : ''; if ( function_exists( 'vc_frontend_editor' ) && $vc_editable ) { $post_link .= ' data-frontend-link="' . esc_url( vc_frontend_editor()->getInlineUrl( '', $choice['value']) ) . '"'; } if ($post_link !== '') { $posts = true; } echo '<option value="' . esc_attr( $choice['value'] ) . '"' . selected( $field_value, $choice['value'], false ) . $post_link . '>' . esc_attr( $choice['label'] ) . '</option>'; } } } foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; $post_link = get_edit_post_link($my_post->ID); if (($field_value == $my_post->ID) && $post_link !== '') { $post_active = $post_link; if ( function_exists( 'vc_frontend_editor' ) ) { $post_active_frontend = esc_url( vc_frontend_editor()->getInlineUrl( '', $my_post->ID) ); } } $post_link = ($post_link !== '') ? ' data-link="'. $post_link . '"' : ''; if ( function_exists( 'vc_frontend_editor' ) ) { $post_link .= ' data-frontend-link="' . esc_url( vc_frontend_editor()->getInlineUrl( '', $my_post->ID) ) . '"'; } echo '<option value="' . esc_attr( $my_post->ID ) . '"' . selected( $field_value, $my_post->ID, false ) . $post_link . '>' . $post_title . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Posts Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '<div class="link-button">'; echo '<div class="option-tree-ui-button-switch hidden">'; if ($post_active !== '') { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="'.$post_active.'" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="'.$post_active_frontend.'" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } else { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * JavaScript option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_javascript' ) ) { function ot_type_javascript( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-javascript simple ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build textarea for CSS */ echo '<textarea class="hidden" id="textarea_' . esc_attr( $field_id ) . '" name="' . esc_attr( $field_name ) .'">' . esc_attr( $field_value ) . '</textarea>'; /* build pre to convert it into ace editor later */ echo '<pre class="ot-javascript-editor ' . esc_attr( $field_class ) . '" id="' . esc_attr( $field_id ) . '">' . esc_textarea( $field_value ) . '</pre>'; echo '</div>'; echo '</div>'; } } /** * Link Color option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array The options arguments * @return string The markup. * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_link_color' ) ) { function ot_type_link_color( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-link-color ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* allow fields to be filtered */ $ot_recognized_link_color_fields = apply_filters( 'ot_recognized_link_color_fields', array( 'link' => _x( 'Standard', 'color picker', 'uncode-core' ), 'hover' => _x( 'Hover', 'color picker', 'uncode-core' ), 'active' => _x( 'Active', 'color picker', 'uncode-core' ), 'visited' => _x( 'Visited', 'color picker', 'uncode-core' ), 'focus' => _x( 'Focus', 'color picker', 'uncode-core' ) ), $field_id ); /* build link color fields */ foreach( $ot_recognized_link_color_fields as $type => $label ) { if ( array_key_exists( $type, $ot_recognized_link_color_fields ) ) { echo '<div class="option-tree-ui-colorpicker-input-wrap">'; echo '<label for="' . esc_attr( $field_id ) . '-picker-' . $type . '" class="option-tree-ui-colorpicker-label">' . esc_attr( $label ) . '</label>'; /* colorpicker JS */ echo '<script>jQuery(document).ready(function($) { OT_UI.bind_colorpicker("' . esc_attr( $field_id ) . '-picker-' . $type . '"); });</script>'; /* set color */ $color = isset( $field_value[ $type ] ) ? esc_attr( $field_value[ $type ] ) : ''; /* set default color */ $std = isset( $field_std[ $type ] ) ? 'data-default-color="' . $field_std[ $type ] . '"' : ''; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '[' . $type . ']" id="' . esc_attr( $field_id ) . '-picker-' . $type . '" value="' . $color . '" class="hide-color-picker ' . esc_attr( $field_class ) . '" ' . $std . ' />'; echo '</div>'; } } echo '</div>'; echo '</div>'; } } /** * List Item option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_list_item' ) ) { function ot_type_list_item( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; // Default $sortable = true; // Check if the list can be sorted if ( ! empty( $field_class ) ) { $classes = explode( ' ', $field_class ); if ( in_array( 'not-sortable', $classes ) ) { $sortable = false; str_replace( 'not-sortable', '', $field_class ); } } /* format setting outer wrapper */ echo '<div class="format-setting type-list-item ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* pass the settings array arround */ echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . ot_encode( serialize( $field_settings ) ) . '" />'; /** * settings pages have array wrappers like 'option_tree'. * So we need that value to create a proper array to save to. * This is only for NON metabox settings. */ if ( ! isset( $get_option ) ) $get_option = ''; /* build list items */ echo '<ul class="option-tree-setting-wrap' . ( $sortable ? ' option-tree-sortable' : '' ) .'" data-name="' . esc_attr( $field_id ) . '" data-id="' . esc_attr( $post_id ) . '" data-get-option="' . esc_attr( $get_option ) . '" data-type="' . esc_attr( $type ) . '">'; if ( is_array( $field_value ) && ! empty( $field_value ) ) { foreach( $field_value as $key => $list_item ) { echo '<li class="ui-state-default list-list-item">'; ot_list_item_view( $field_id, $key, $list_item, $post_id, $get_option, $field_settings, $type ); echo '</li>'; } } echo '</ul>'; /* button */ echo '<a href="javascript:void(0);" class="option-tree-list-item-add option-tree-ui-button button right hug-right" title="' . esc_html__( 'Add New', 'uncode-core' ) . '">' . esc_html__( 'Add New', 'uncode-core' ) . '</a>'; /* description */ $list_desc = $sortable ? esc_html__( 'You can re-order with drag & drop, the order will update after saving.', 'uncode-core' ) : ''; echo '<div class="list-item-description">' . apply_filters( 'ot_list_item_description', $list_desc, $field_id ) . '</div>'; echo '</div>'; echo '</div>'; } } /** * Measurement option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_measurement' ) ) { function ot_type_measurement( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-measurement ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; echo '<div class="option-tree-ui-measurement-input-wrap">'; echo '<input type="text" name="' . esc_attr( $field_name ) . '[0]" id="' . esc_attr( $field_id ) . '-0" value="' . ( isset( $field_value[0] ) ? esc_attr( $field_value[0] ) : '' ) . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" />'; echo '</div>'; /* build measurement */ echo '<select name="' . esc_attr( $field_name ) . '[1]" id="' . esc_attr( $field_id ) . '-1" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="" disabled>' . esc_html__( 'unit', 'uncode-core' ) . '</option>'; foreach ( ot_measurement_unit_types( $field_id ) as $unit ) { echo '<option value="' . esc_attr( $unit ) . '"' . ( isset( $field_value[1] ) ? selected( $field_value[1], $unit, false ) : '' ) . '>' . esc_attr( $unit ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * Numeric Slider option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_type_numeric_slider' ) ) { function ot_type_numeric_slider( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; $_options = explode( ',', $field_min_max_step ); $min = isset( $_options[0] ) ? $_options[0] : 0; $max = isset( $_options[1] ) ? $_options[1] : 100; $step = isset( $_options[2] ) ? $_options[2] : 1; /* format setting outer wrapper */ echo '<div class="format-setting type-numeric-slider ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; echo '<div class="ot-numeric-slider-wrap">'; echo '<input type="hidden" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="ot-numeric-slider-hidden-input" value="' . esc_attr( $field_value ) . '" data-min="' . esc_attr( $min ) . '" data-max="' . esc_attr( $max ) . '" data-step="' . esc_attr( $step ) . '">'; echo '<input type="text" class="ot-numeric-slider-helper-input widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" value="' . esc_attr( $field_value ) . '" readonly>'; echo '<div id="ot_numeric_slider_' . esc_attr( $field_id ) . '" class="ot-numeric-slider"></div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * On/Off option type * * See @ot_display_by_type to see the full list of available arguments. * * @param array The options arguments * @return string The gallery metabox markup. * * @access public * @since 2.2.0 */ if ( ! function_exists( 'ot_type_on_off' ) ) { function ot_type_on_off( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-radio ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* Force only two choices, and allowing filtering on the choices value & label */ $field_choices = array( array( /** * Filter the value of the On button. * * @since 2.5.0 * * @param string The On button value. Default 'on'. * @param string $field_id The field ID. * @param string $filter_id For filtering both on/off value with one function. */ 'value' => apply_filters( 'ot_on_off_switch_on_value', 'on', $field_id, 'on' ), /** * Filter the label of the On button. * * @since 2.5.0 * * @param string The On button label. Default 'On'. * @param string $field_id The field ID. * @param string $filter_id For filtering both on/off label with one function. */ 'label' => apply_filters( 'ot_on_off_switch_on_label', esc_html__( 'On', 'uncode-core' ), $field_id, 'on' ) ), array( /** * Filter the value of the Off button. * * @since 2.5.0 * * @param string The Off button value. Default 'off'. * @param string $field_id The field ID. * @param string $filter_id For filtering both on/off value with one function. */ 'value' => apply_filters( 'ot_on_off_switch_off_value', 'off', $field_id, 'off' ), /** * Filter the label of the Off button. * * @since 2.5.0 * * @param string The Off button label. Default 'Off'. * @param string $field_id The field ID. * @param string $filter_id For filtering both on/off label with one function. */ 'label' => apply_filters( 'ot_on_off_switch_off_label', esc_html__( 'Off', 'uncode-core' ), $field_id, 'off' ) ) ); /** * Filter the width of the On/Off switch. * * @since 2.5.0 * * @param string The switch width. Default '100px'. * @param string $field_id The field ID. */ $switch_width = apply_filters( 'ot_on_off_switch_width', '100px', $field_id ); echo '<div class="on-off-switch"' . ( $switch_width != '100px' ? sprintf( ' style="width:%s"', $switch_width ) : '' ) . '>'; /* build radio */ foreach ( (array) $field_choices as $key => $choice ) { echo ' <input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="radio option-tree-ui-radio ' . esc_attr( $field_class ) . '" /> <label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" onclick="">' . esc_attr( $choice['label'] ) . '</label>'; } echo '<span class="slide-button"></span>'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * Page Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_page_checkbox' ) ) { function ot_type_page_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-page-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* query pages array */ $my_posts = get_posts( apply_filters( 'ot_type_page_checkbox_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has pages */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $my_post->ID ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '" value="' . esc_attr( $my_post->ID ) . '" ' . ( isset( $field_value[$my_post->ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '">' . $post_title . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Pages Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Page Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_page_select' ) ) { function ot_type_page_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; $post_active = ''; /* format setting outer wrapper */ echo '<div class="format-setting type-page-select select-with-switching-button ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build page select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* query pages array */ $my_posts = get_posts( apply_filters( 'ot_type_page_select_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has pages */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; $post_link = get_edit_post_link($my_post->ID); if (($field_value == $my_post->ID) && $post_link !== '') { $post_active = $post_link; if ( function_exists( 'vc_frontend_editor' ) ) { $post_active_frontend = esc_url( vc_frontend_editor()->getInlineUrl( '', $my_post->ID) ); } } $post_link = ($post_link !== '') ? ' data-link="'. $post_link . '"' : ''; if ( function_exists( 'vc_frontend_editor' ) ) { $post_link .= ' data-frontend-link="' . esc_url( vc_frontend_editor()->getInlineUrl( '', $my_post->ID) ) . '"'; } echo '<option value="' . esc_attr( $my_post->ID ) . '"' . selected( $field_value, $my_post->ID, false ) . $post_link . '>' . $post_title . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Pages Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '<div class="link-button">'; echo '<div class="option-tree-ui-button-switch hidden">'; if ($post_active !== '') { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="'.$post_active.'" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="'.$post_active_frontend.'" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } else { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * Post Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_post_checkbox' ) ) { function ot_type_post_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-post-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* query posts array */ $my_posts = get_posts( apply_filters( 'ot_type_post_checkbox_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has posts */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $my_post->ID ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '" value="' . esc_attr( $my_post->ID ) . '" ' . ( isset( $field_value[$my_post->ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $my_post->ID ) . '">' . $post_title . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Posts Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Post Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_post_select' ) ) { function ot_type_post_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-post-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build page select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* query posts array */ $my_posts = get_posts( apply_filters( 'ot_type_post_select_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); /* has posts */ if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach( $my_posts as $my_post ) { $post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled'; echo '<option value="' . esc_attr( $my_post->ID ) . '"' . selected( $field_value, $my_post->ID, false ) . '>' . $post_title . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Posts Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * Radio option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_radio' ) ) { function ot_type_radio( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-radio ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build radio */ foreach ( (array) $field_choices as $key => $choice ) { echo '<p><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="radio option-tree-ui-radio ' . esc_attr( $field_class ) . '" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>'; } echo '</div>'; echo '</div>'; } } /** * Radio Images option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_radio_image' ) ) { function ot_type_radio_image( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-radio-image ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /** * load the default filterable images if nothing * has been set in the choices array. */ if ( empty( $field_choices ) ) $field_choices = ot_radio_images( $field_id ); /* build radio image */ foreach ( (array) $field_choices as $key => $choice ) { $src = str_replace( 'OT_URL', OT_URL, $choice['src'] ); $src = str_replace( 'OT_THEME_URL', OT_THEME_URL, $src ); /* make radio image source filterable */ $src = apply_filters( 'ot_type_radio_image_src', $src, $field_id ); /** * Filter the image attributes. * * @since 2.5.3 * * @param string $attributes The image attributes. * @param string $field_id The field ID. * @param array $choice The choice. */ $attributes = apply_filters( 'ot_type_radio_image_attributes', '', $field_id, $choice ); echo '<div class="option-tree-ui-radio-images">'; echo '<p style="display:none"><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="option-tree-ui-radio option-tree-ui-images" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>'; echo '<img ' . $attributes . ' src="' . esc_url( $src ) . '" alt="' . esc_attr( $choice['label'] ) .'" title="' . esc_attr( $choice['label'] ) .'" class="option-tree-ui-radio-image ' . esc_attr( $field_class ) . ( $field_value == $choice['value'] ? ' option-tree-ui-radio-image-selected' : '' ) . '" />'; echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_select' ) ) { function ot_type_select( $args = array() ) { $posts = false; $post_active = ''; /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-custom-post-type-select select-with-switching-button ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* filter choices array */ $field_choices = apply_filters( 'ot_type_select_choices', $field_choices, $field_id ); /* is it is editable in VC */ $vc_editable = false; if ( class_exists( 'Vc_Roles' ) ) { $vc_roles = new Vc_Roles(); $vc_post_types = $vc_roles->getPostTypes(); foreach ($vc_post_types as $key => $value) { if ( isset( $field_post_type ) && $field_post_type == $value[0] ) { $vc_editable = true; break; } } } // $field_post_type /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; foreach ( (array) $field_choices as $choice ) { if ( isset( $choice['value'] ) && isset( $choice['label'] ) ) { $post_link = (isset( $choice['postlink'] )) ? ' data-link="'. esc_url( $choice['postlink'] ) . '"' : ''; if ( function_exists( 'vc_frontend_editor' ) && $vc_editable ) { $post_link .= ' data-frontend-link="' . esc_url( vc_frontend_editor()->getInlineUrl( '', $choice['value']) ) . '"'; } if ($post_link !== '') { $posts = true; } echo '<option value="' . esc_attr( $choice['value'] ) . '"' . selected( $field_value, $choice['value'], false ) . $post_link . '>' . esc_attr( $choice['label'] ) . '</option>'; } } echo '</select>'; echo '<div class="link-button">'; echo '<div class="option-tree-ui-button-switch hidden">'; if ($posts && $post_active !== '') { if ( $vc_editable ) { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="'.$post_active.'" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="'.$post_active_frontend.'" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } else { echo '<a class="option-tree-ui-button button" data-action="edit" href="'.$post_active.'" target="_blank">' . esc_html__('Edit','uncode-core') . '</a>'; } } else { if ( $vc_editable ) { echo '<a class="option-tree-ui-button button" data-action="edit-backend" href="" target="_blank">' . esc_html__('Edit backend','uncode-core') . '</a>'; if ( function_exists( 'vc_frontend_editor' ) ) { echo '<a class="option-tree-ui-button button" data-action="edit-frontend" href="" target="_blank">' . esc_html__('Edit frontend','uncode-core') . '</a><span class="fa fa-caret-down dropdown"></span>'; } } else { echo '<a class="option-tree-ui-button button" data-action="edit" href="" target="_blank">' . esc_html__('Edit','uncode-core') . '</a>'; } } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } /** * Sidebar Select option type. * * This option type makes it possible for users to select a WordPress registered sidebar * to use on a specific area. By using the two provided filters, 'ot_recognized_sidebars', * and 'ot_recognized_sidebars_{$field_id}' we can be selective about which sidebars are * available on a specific content area. * * For example, if we create a WordPress theme that provides the ability to change the * Blog Sidebar and we don't want to have the footer sidebars available on this area, * we can unset those sidebars either manually or by using a regular expression if we * have a common name like footer-sidebar-$i. * * @param array An array of arguments. * @return string * * @access public * @since 2.1 */ if ( ! function_exists( 'ot_type_sidebar_select' ) ) { function ot_type_sidebar_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-sidebar-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build page select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* get the registered sidebars */ global $wp_registered_sidebars; $sidebars = array(); foreach( $wp_registered_sidebars as $id=>$sidebar ) { $sidebars[ $id ] = $sidebar[ 'name' ]; } /* filters to restrict which sidebars are allowed to be selected, for example we can restrict footer sidebars to be selectable on a blog page */ $sidebars = apply_filters( 'ot_recognized_sidebars', $sidebars ); $sidebars = apply_filters( 'ot_recognized_sidebars_' . $field_id, $sidebars ); /* has sidebars */ if ( count( $sidebars ) ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach ( $sidebars as $id => $sidebar ) { echo '<option value="' . esc_attr( $id ) . '"' . selected( $field_value, $id, false ) . '>' . esc_attr( $sidebar ) . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Sidebars', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * List Item option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_slider' ) ) { function ot_type_slider( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-slider ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* pass the settings array arround */ echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . ot_encode( serialize( $field_settings ) ) . '" />'; /** * settings pages have array wrappers like 'option_tree'. * So we need that value to create a proper array to save to. * This is only for NON metabox settings. */ if ( ! isset( $get_option ) ) $get_option = ''; /* build list items */ echo '<ul class="option-tree-setting-wrap option-tree-sortable" data-name="' . esc_attr( $field_id ) . '" data-id="' . esc_attr( $post_id ) . '" data-get-option="' . esc_attr( $get_option ) . '" data-type="' . esc_attr( $type ) . '">'; if ( is_array( $field_value ) && ! empty( $field_value ) ) { foreach( $field_value as $key => $list_item ) { echo '<li class="ui-state-default list-list-item">'; ot_list_item_view( $field_id, $key, $list_item, $post_id, $get_option, $field_settings, $type ); echo '</li>'; } } echo '</ul>'; /* button */ echo '<a href="javascript:void(0);" class="option-tree-list-item-add option-tree-ui-button button right hug-right" title="' . esc_html__( 'Add New', 'uncode-core' ) . '">' . esc_html__( 'Add New', 'uncode-core' ) . '</a>'; /* description */ echo '<div class="list-item-description">' . esc_html__( 'You can re-order with drag & drop, the order will update after saving.', 'uncode-core' ) . '</div>'; echo '</div>'; echo '</div>'; } } /** * Social Links option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.4.0 */ if ( ! function_exists( 'ot_type_social_links' ) ) { function ot_type_social_links( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* Load the default social links */ if ( empty( $field_value ) && apply_filters( 'ot_type_social_links_load_defaults', true, $field_id ) ) { $field_value = apply_filters( 'ot_type_social_links_defaults', array( array( 'name' => esc_html__( 'Facebook', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Twitter', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Google+', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'LinkedIn', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Pinterest', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'YouTube', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Dribbble', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Github', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Forrst', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Digg', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Delicious', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Tumblr', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Skype', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'SoundCloud', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Vimeo', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'Flickr', 'uncode-core' ), 'title' => '', 'href' => '' ), array( 'name' => esc_html__( 'VK.com', 'uncode-core' ), 'title' => '', 'href' => '' ) ), $field_id ); } /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-social-list-item ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* pass the settings array arround */ echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . ot_encode( serialize( $field_settings ) ) . '" />'; /** * settings pages have array wrappers like 'option_tree'. * So we need that value to create a proper array to save to. * This is only for NON metabox settings. */ if ( ! isset( $get_option ) ) $get_option = ''; /* build list items */ echo '<ul class="option-tree-setting-wrap option-tree-sortable" data-name="' . esc_attr( $field_id ) . '" data-id="' . esc_attr( $post_id ) . '" data-get-option="' . esc_attr( $get_option ) . '" data-type="' . esc_attr( $type ) . '">'; if ( is_array( $field_value ) && ! empty( $field_value ) ) { foreach( $field_value as $key => $link ) { echo '<li class="ui-state-default list-list-item">'; ot_social_links_view( $field_id, $key, $link, $post_id, $get_option, $field_settings, $type ); echo '</li>'; } } echo '</ul>'; /* button */ echo '<a href="javascript:void(0);" class="option-tree-social-links-add option-tree-ui-button button button-primary right hug-right" title="' . esc_html__( 'Add New', 'uncode-core' ) . '">' . esc_html__( 'Add New', 'uncode-core' ) . '</a>'; /* description */ echo '<div class="list-item-description">' . apply_filters( 'ot_social_links_description', esc_html__( 'You can re-order with drag & drop, the order will update after saving.', 'uncode-core' ), $field_id ) . '</div>'; echo '</div>'; echo '</div>'; } } /** * Spacing Option Type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.5.0 */ if ( ! function_exists( 'ot_type_spacing' ) ) { function ot_type_spacing( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-spacing ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* allow fields to be filtered */ $ot_recognized_spacing_fields = apply_filters( 'ot_recognized_spacing_fields', array( 'top', 'right', 'bottom', 'left', 'unit' ), $field_id ); /* build top spacing */ if ( in_array( 'top', $ot_recognized_spacing_fields ) ) { $top = isset( $field_value['top'] ) ? esc_attr( $field_value['top'] ) : ''; echo '<div class="ot-option-group"><span class="ot-icon-arrow-up ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[top]" id="' . esc_attr( $field_id ) . '-top" value="' . $top . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'top', 'uncode-core' ) . '" /></div>'; } /* build right spacing */ if ( in_array( 'right', $ot_recognized_spacing_fields ) ) { $right = isset( $field_value['right'] ) ? esc_attr( $field_value['right'] ) : ''; echo '<div class="ot-option-group"><span class="ot-icon-arrow-right ot-option-group--icon"></span></span><input type="text" name="' . esc_attr( $field_name ) . '[right]" id="' . esc_attr( $field_id ) . '-right" value="' . $right . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'right', 'uncode-core' ) . '" /></div>'; } /* build bottom spacing */ if ( in_array( 'bottom', $ot_recognized_spacing_fields ) ) { $bottom = isset( $field_value['bottom'] ) ? esc_attr( $field_value['bottom'] ) : ''; echo '<div class="ot-option-group"><span class="ot-icon-arrow-down ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[bottom]" id="' . esc_attr( $field_id ) . '-bottom" value="' . $bottom . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'bottom', 'uncode-core' ) . '" /></div>'; } /* build left spacing */ if ( in_array( 'left', $ot_recognized_spacing_fields ) ) { $left = isset( $field_value['left'] ) ? esc_attr( $field_value['left'] ) : ''; echo '<div class="ot-option-group"><span class="ot-icon-arrow-left ot-option-group--icon"></span><input type="text" name="' . esc_attr( $field_name ) . '[left]" id="' . esc_attr( $field_id ) . '-left" value="' . $left . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" placeholder="' . esc_html__( 'left', 'uncode-core' ) . '" /></div>'; } /* build unit dropdown */ if ( in_array( 'unit', $ot_recognized_spacing_fields ) ) { echo '<div class="ot-option-group ot-option-group--is-last">'; echo '<select name="' . esc_attr( $field_name ) . '[unit]" id="' . esc_attr( $field_id ) . '-unit" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">'; echo '<option value="">' . esc_html__( 'unit', 'uncode-core' ) . '</option>'; foreach ( ot_recognized_spacing_unit_types( $field_id ) as $unit ) { echo '<option value="' . esc_attr( $unit ) . '"' . ( isset( $field_value['unit'] ) ? selected( $field_value['unit'], $unit, false ) : '' ) . '>' . esc_attr( $unit ) . '</option>'; } echo '</select>'; echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Tab option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.3.0 */ if ( ! function_exists( 'ot_type_tab' ) ) { function ot_type_tab( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* format setting outer wrapper */ echo '<div class="format-setting type-tab">'; echo '<br />'; echo '</div>'; } } /** * Tag Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_tag_checkbox' ) ) { function ot_type_tag_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-tag-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* get tags */ $tags = get_tags( array( 'hide_empty' => false ) ); /* has tags */ if ( $tags ) { foreach( $tags as $tag ) { echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $tag->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $tag->term_id ) . '" value="' . esc_attr( $tag->term_id ) . '" ' . ( isset( $field_value[$tag->term_id] ) ? checked( $field_value[$tag->term_id], $tag->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $tag->term_id ) . '">' . esc_attr( $tag->name ) . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Tags Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Tag Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_tag_select' ) ) { function ot_type_tag_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-tag-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build tag select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* get tags */ $tags = get_tags( array( 'hide_empty' => false ) ); /* has tags */ if ( $tags ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach( $tags as $tag ) { echo '<option value="' . esc_attr( $tag->term_id ) . '"' . selected( $field_value, $tag->term_id, false ) . '>' . esc_attr( $tag->name ) . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Tags Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * Taxonomy Checkbox option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_taxonomy_checkbox' ) ) { function ot_type_taxonomy_checkbox( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-taxonomy-checkbox type-checkbox ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* setup the taxonomy */ $taxonomy = isset( $field_taxonomy ) ? explode( ',', $field_taxonomy ) : array( 'category' ); /* get taxonomies */ $taxonomies = get_categories( apply_filters( 'ot_type_taxonomy_checkbox_query', array( 'hide_empty' => false, 'taxonomy' => $taxonomy ), $field_id ) ); /* has tags */ if ( $taxonomies ) { foreach( $taxonomies as $taxonomy ) { echo '<p>'; echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $taxonomy->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $taxonomy->term_id ) . '" value="' . esc_attr( $taxonomy->term_id ) . '" ' . ( isset( $field_value[$taxonomy->term_id] ) ? checked( $field_value[$taxonomy->term_id], $taxonomy->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $taxonomy->term_id ) . '">' . esc_attr( $taxonomy->name ) . '</label>'; echo '</p>'; } } else { echo '<p>' . esc_html__( 'No Taxonomies Found', 'uncode-core' ) . '</p>'; } echo '</div>'; echo '</div>'; } } /** * Taxonomy Select option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_taxonomy_select' ) ) { function ot_type_taxonomy_select( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-tag-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build tag select */ echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">'; /* setup the taxonomy */ $taxonomy = isset( $field_taxonomy ) ? explode( ',', $field_taxonomy ) : array( 'category' ); /* get taxonomies */ $taxonomies = get_categories( apply_filters( 'ot_type_taxonomy_select_query', array( 'hide_empty' => false, 'taxonomy' => $taxonomy ), $field_id ) ); /* has tags */ if ( $taxonomies ) { echo '<option value="">' . esc_html__( 'Select...', 'uncode-core' ) . '</option>'; foreach( $taxonomies as $taxonomy ) { echo '<option value="' . esc_attr( $taxonomy->term_id ) . '"' . selected( $field_value, $taxonomy->term_id, false ) . '>' . esc_attr( $taxonomy->name ) . '</option>'; } } else { echo '<option value="">' . esc_html__( 'No Taxonomies Found', 'uncode-core' ) . '</option>'; } echo '</select>'; echo '</div>'; echo '</div>'; } } /** * Text option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_text' ) ) { function ot_type_text( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-text ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build text input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" value="' . esc_attr( $field_value ) . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" />'; echo '</div>'; echo '</div>'; } } /** * Number option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_number' ) ) { function ot_type_number( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-text ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build text input */ echo '<input type="number" min="0" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" value="' . esc_attr( $field_value ) . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" />'; echo '</div>'; echo '</div>'; } } /** * Textarea option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_textarea' ) ) { function ot_type_textarea( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-textarea ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . ' fill-area">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build textarea */ wp_editor( $field_value, esc_attr( $field_id ), array( 'editor_class' => esc_attr( $field_class ), 'wpautop' => apply_filters( 'ot_wpautop', false, $field_id ), 'media_buttons' => apply_filters( 'ot_media_buttons', true, $field_id ), 'textarea_name' => esc_attr( $field_name ), 'textarea_rows' => esc_attr( $field_rows ), 'tinymce' => apply_filters( 'ot_tinymce', true, $field_id ), 'quicktags' => apply_filters( 'ot_quicktags', array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ), $field_id ) ) ); echo '</div>'; echo '</div>'; } } /** * Textarea Simple option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_textarea_simple' ) ) { function ot_type_textarea_simple( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-textarea simple ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* filter to allow wpautop */ $wpautop = apply_filters( 'ot_wpautop', false, $field_id ); /* wpautop $field_value */ if ( $wpautop == true ) $field_value = wpautop( $field_value ); /* build textarea simple */ echo '<textarea class="textarea ' . esc_attr( $field_class ) . '" rows="' . esc_attr( $field_rows ) . '" cols="40" name="' . esc_attr( $field_name ) .'" id="' . esc_attr( $field_id ) . '">' . esc_textarea( $field_value ) . '</textarea>'; echo '</div>'; echo '</div>'; } } /** * Textblock option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_textblock' ) ) { function ot_type_textblock( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* format setting outer wrapper */ echo '<div class="format-setting type-textblock wide-desc">'; /* description */ //echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; echo '</div>'; } } /** * Textblock Titled option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_textblock_titled' ) ) { function ot_type_textblock_titled( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* format setting outer wrapper */ echo '<div class="format-setting type-textblock titled wide-desc">'; /* description */ //echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; echo '</div>'; } } /** * Upload option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_upload' ) ) { function ot_type_upload( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* If an attachment ID is stored here fetch its URL and replace the value */ if ( $field_value && wp_attachment_is_image( $field_value ) ) { $attachment_data = wp_get_attachment_image_src( $field_value, 'original' ); /* check for attachment data */ if ( $attachment_data ) { $field_src = $attachment_data[0]; } } /* format setting outer wrapper */ echo '<div class="format-setting type-upload ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; /* build upload */ echo '<div class="option-tree-ui-upload-parent">'; /* input */ echo '<input type="text" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" value="' . esc_attr( $field_value ) . '" class="widefat option-tree-ui-upload-input ' . esc_attr( $field_class ) . '" />'; /* add media button */ echo '<a href="javascript:void(0);" class="ot_upload_media option-tree-ui-button button button-primary light" rel="' . $post_id . '" title="' . esc_html__( 'Add Media', 'uncode-core' ) . '"><span class="icon ot-icon-plus-circle"></span>' . esc_html__( 'Add Media', 'uncode-core' ) . '</a>'; echo '</div>'; /* media */ if ( $field_value ) { echo '<div class="option-tree-ui-media-wrap" id="' . esc_attr( $field_id ) . '_media">'; /* replace image src */ if ( isset( $field_src ) ) $field_value = $field_src; if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value ) ) echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value ) . '" alt="" /></div>'; echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button button button-secondary light" title="' . esc_html__( 'Remove Media', 'uncode-core' ) . '"><span class="icon ot-icon-minus-circle"></span>' . esc_html__( 'Remove Media', 'uncode-core' ) . '</a>'; echo '</div>'; } echo '</div>'; echo '</div>'; } } /** * Multi Text option type. * * See @ot_display_by_type to see the full list of available arguments. * * @param array An array of arguments. * @return string * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_type_multitext' ) ) { function ot_type_multitext( $args = array() ) { /* turns arguments array into variables */ extract( $args ); /* verify a description */ $has_desc = $field_desc ? true : false; /* format setting outer wrapper */ echo '<div class="format-setting type-text ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">'; /* description */ //if ($has_desc) echo '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>'; /* format setting inner wrapper */ echo '<div class="format-setting-inner">'; echo '<div class="format-setting-inner--multitext">'; if ( is_array( $field_choices ) ) { $i = 0; $columns = count( $field_choices ); foreach ( $field_choices as $option_key => $option_value ) { echo '<div class="option-tree-ui-multitext-wrapper option-tree-ui-multitext-wrapper--columns-' . $columns . '">'; echo '<label for="' . esc_attr( $field_id ) . '-' . $i . '" class="option-tree-ui-multitext-label">' . $option_value . '</label>'; echo '<input type="text" name="' . esc_attr( $field_name ) . '[' . $i . ']" id="' . esc_attr( $field_id ) . '-' . $i . '" value="" class="widefat option-tree-ui-input option-tree-ui-multitext' . esc_attr( $field_class ) . '" />'; echo '</div>'; // echo '<input type="text" name="' . esc_attr( $field_name ) . '[' . $i . ']" id="' . esc_attr( $field_id ) . '-' . $i . '" value="' . esc_attr( $field_value ) . '" class="widefat option-tree-ui-input ' . esc_attr( $field_class ) . '" />'; $i++; } } echo '</div>'; echo '</div>'; echo '</div>'; } } /* End of file ot-functions-option-types.php */ /* Location: ./includes/ot-functions-option-types.php */ includes/theme-options/includes/ot-meta-box-api.php 0000755 00000027716 15174671607 0016425 0 ustar 00 <?php if ( ! defined( 'OT_VERSION' ) ) exit( 'No direct script access allowed' ); /** * OptionTree Meta Box API * * This class loads all the methods and helpers specific to build a meta box. * * @package OptionTree * @author Derek Herman <derek@valendesigns.com> * @copyright Copyright (c) 2013, Derek Herman */ if ( ! class_exists( 'OT_Meta_Box' ) ) { class OT_Meta_Box { /* variable to store the meta box array */ private $meta_box; /** * PHP5 constructor method. * * This method adds other methods of the class to specific hooks within WordPress. * * @uses add_action() * * @return void * * @access public * @since 1.0 */ function __construct( $meta_box ) { if ( ! is_admin() ) return; global $ot_meta_boxes; if ( ! isset( $ot_meta_boxes ) ) { $ot_meta_boxes = array(); } $ot_meta_boxes[] = $meta_box; $this->meta_box = $meta_box; add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); add_action( 'save_post', array( $this, 'save_meta_box' ), 1, 2 ); } /** * Adds meta box to any post type * * @uses add_meta_box() * * @return void * * @access public * @since 1.0 */ function add_meta_boxes() { foreach ( (array) $this->meta_box['pages'] as $page ) { add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array( $this, 'build_meta_box' ), $page, $this->meta_box['context'], $this->meta_box['priority'], $this->meta_box['fields'] ); } } /** * Meta box view * * @return string * * @access public * @since 1.0 */ function build_meta_box( $post, $metabox ) { echo '<div class="ot-metabox-wrapper uncode-admin-panel">'; /* Use nonce for verification */ echo '<input type="hidden" name="' . $this->meta_box['id'] . '_nonce" value="' . wp_create_nonce( $this->meta_box['id'] ) . '" />'; /* meta box description */ echo isset( $this->meta_box['desc'] ) && ! empty( $this->meta_box['desc'] ) ? '<div class="description" style="padding-top:10px;">' . htmlspecialchars_decode( $this->meta_box['desc'] ) . '</div>' : ''; /* loop through meta box fields */ foreach ( $this->meta_box['fields'] as $field ) { /* get current post meta data */ $field_value = get_post_meta( $post->ID, $field['id'], true ); /* set standard value */ if ( isset( $field['std'] ) ) { $field_value = ot_filter_std_value( $field_value, $field['std'] ); } /* build the arguments array */ $_args = array( 'type' => $field['type'], 'field_id' => $field['id'], 'field_name' => $field['id'], 'field_value' => $field_value, 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '', 'field_std' => isset( $field['std'] ) ? $field['std'] : '', 'field_rows' => isset( $field['rows'] ) && ! empty( $field['rows'] ) ? $field['rows'] : 10, 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post', 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category', 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1', 'field_class' => isset( $field['class'] ) ? $field['class'] : '', 'field_condition' => isset( $field['condition'] ) ? $field['condition'] : '', 'field_operator' => isset( $field['operator'] ) ? $field['operator'] : 'and', 'field_choices' => isset( $field['choices'] ) ? $field['choices'] : array(), 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(), 'post_id' => $post->ID, 'meta' => true ); $conditions = ''; /* setup the conditions */ if ( isset( $field['condition'] ) && ! empty( $field['condition'] ) ) { $conditions = ' data-condition="' . $field['condition'] . '"'; $conditions.= isset( $field['operator'] ) && in_array( $field['operator'], array( 'and', 'AND', 'or', 'OR' ) ) ? ' data-operator="' . $field['operator'] . '"' : ''; } /* only allow simple textarea due to DOM issues with wp_editor() */ if ( apply_filters( 'ot_override_forced_textarea_simple', false, $field['id'] ) == false && $_args['type'] == 'textarea' ) $_args['type'] = 'textarea-simple'; // Build the setting CSS class if ( ! empty( $_args['field_class'] ) ) { $classes = explode( ' ', $_args['field_class'] ); foreach( $classes as $key => $value ) { $classes[$key] = $value . '-wrap'; } $class = 'format-settings ' . implode( ' ', $classes ); } else { $class = 'format-settings'; } /* option label */ echo '<div id="setting_' . $field['id'] . '" class="' . $class . '"' . $conditions . '>'; echo '<div class="format-setting-wrap">'; /* don't show title with textblocks */ if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) { echo '<div class="format-setting-label">'; $for_att = $_args['type'] !== 'uncode_colors_w_transp' ? ' for="' . $field['id'] . '"' : ''; echo '<label' . $for_att . ' class="label">' . $field['label']; if ( isset($field['desc']) && $field['desc'] !== '' ) echo '<span class="toggle-description"></span>'; echo '</label>'; if ( isset($field['desc']) && $field['desc'] !== '' ) echo '<small class="description">' . htmlspecialchars_decode( $field['desc'] ) . '</small>'; echo '</div>'; } /* get the option HTML */ echo ot_display_by_type( $_args ); echo '</div>'; echo '</div>'; } echo '<div class="clear"></div>'; echo '</div>'; } /** * Saves the meta box values * * @return void * * @access public * @since 1.0 */ function save_meta_box( $post_id, $post_object ) { global $pagenow; /* don't save if $_POST is empty */ if ( empty( $_POST ) || ( isset( $_POST['vc_inline'] ) && $_POST['vc_inline'] == true ) ) return $post_id; /* don't save during quick edit */ if ( $pagenow == 'admin-ajax.php' ) return $post_id; /* don't save during autosave */ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return $post_id; /* don't save if viewing a revision */ if ( $post_object->post_type == 'revision' || $pagenow == 'revision.php' ) return $post_id; /* verify nonce */ if ( isset( $_POST[ $this->meta_box['id'] . '_nonce'] ) && ! wp_verify_nonce( $_POST[ $this->meta_box['id'] . '_nonce'], $this->meta_box['id'] ) ) return $post_id; /* check permissions */ if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) { if ( ! current_user_can( 'edit_page', $post_id ) ) return $post_id; } else { if ( ! current_user_can( 'edit_post', $post_id ) ) return $post_id; } foreach ( $this->meta_box['fields'] as $field ) { $old = get_post_meta( $post_id, $field['id'], true ); $new = ''; /* there is data to validate */ if ( isset($field['id']) && isset( $_POST[$field['id']] ) ) { /* slider and list item */ if ( in_array( $field['type'], array( 'list-item', 'slider' ) ) ) { /* required title setting */ $required_setting = array( array( 'id' => 'title', 'label' => esc_html__( 'Title', 'uncode-core' ), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'class' => 'option-tree-setting-title', 'post_type' => '', 'choices' => array() ) ); /* get the settings array */ $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array(); /* settings are empty for some odd ass reason get the defaults */ if ( empty( $settings ) ) { $settings = 'slider' == $field['type'] ? ot_slider_settings( $field['id'] ) : ot_list_item_settings( $field['id'] ); } /* merge the two settings array */ $settings = array_merge( $required_setting, $settings ); foreach( $_POST[$field['id']] as $k => $setting_array ) { foreach( $settings as $sub_setting ) { /* verify sub setting has a type & value */ if ( isset( $sub_setting['type'] ) && isset( $_POST[$field['id']][$k][$sub_setting['id']] ) ) { $_POST[$field['id']][$k][$sub_setting['id']] = ot_validate_setting( $_POST[$field['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] ); } } } /* set up new data with validated data */ $new = $_POST[$field['id']]; } else if ( $field['type'] == 'social-links' ) { /* get the settings array */ $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? uncode_core_safe_unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array(); /* settings are empty get the defaults */ if ( empty( $settings ) ) { $settings = ot_social_links_settings( $field['id'] ); } foreach( $_POST[$field['id']] as $k => $setting_array ) { foreach( $settings as $sub_setting ) { /* verify sub setting has a type & value */ if ( isset( $sub_setting['type'] ) && isset( $_POST[$field['id']][$k][$sub_setting['id']] ) ) { $_POST[$field['id']][$k][$sub_setting['id']] = ot_validate_setting( $_POST[$field['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] ); } } } /* set up new data with validated data */ $new = $_POST[$field['id']]; } else { /* run through validattion */ $new = ot_validate_setting( $_POST[$field['id']], $field['type'], $field['id'] ); } /* insert CSS */ if ( $field['type'] == 'css' ) { /* insert CSS into dynamic.css */ if ( '' !== $new ) { ot_insert_css_with_markers( $field['id'], $new, true ); /* remove old CSS from dynamic.css */ } else { ot_remove_old_css( $field['id'] ); } } } if ( isset( $new ) && $new !== $old ) { update_post_meta( $post_id, $field['id'], $new ); } else if ( '' == $new && $old ) { delete_post_meta( $post_id, $field['id'], $old ); } } } } } /** * This method instantiates the meta box class & builds the UI. * * @uses OT_Meta_Box() * * @param array Array of arguments to create a meta box * @return void * * @access public * @since 2.0 */ if ( ! function_exists( 'ot_register_meta_box' ) ) { function ot_register_meta_box( $args ) { if ( ! $args ) return; $ot_meta_box = new OT_Meta_Box( $args ); } } /* End of file ot-meta-box-api.php */ /* Location: ./includes/ot-meta-box-api.php */ includes/theme-options/license.txt 0000755 00000104512 15174671607 0013354 0 ustar 00 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. includes/theme-options/languages/option-tree.mo 0000755 00000001470 15174671607 0015740 0 ustar 00 �� $ , 8 � 9 Project-Id-Version: OptionTree POT-Creation-Date: 2018-02-08 10:25+0100 PO-Revision-Date: 2018-02-08 10:25+0100 Last-Translator: Manuel Masia | Pixedelic <manu@pixedelic.com> Language-Team: Valen Designs Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.0.6 X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c X-Poedit-Basepath: . Plural-Forms: nplurals=2; plural=n != 1; X-Poedit-SearchPath-0: .. X-Poedit-SearchPathExcluded-0: ../.git X-Poedit-SearchPathExcluded-1: ../composer.json X-Poedit-SearchPathExcluded-2: ../assets includes/theme-options/languages/option-tree-et.po 0000755 00000340732 15174671607 0016360 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: OptionTree\n" "POT-Creation-Date: 2015-04-21 22:11-0800\n" "PO-Revision-Date: 2015-04-21 22:11-0800\n" "Last-Translator: Derek Herman <derek@valendesigns.com>\n" "Language-Team: Valen Designs\n" "Language: et_EE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.7.6\n" "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" "_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-SearchPath-0: ..\n" "X-Poedit-SearchPathExcluded-0: ../.git\n" "X-Poedit-SearchPathExcluded-1: ../composer.json\n" "X-Poedit-SearchPathExcluded-2: ../assets\n" #: ../includes/ot-cleanup-api.php:84 ../includes/ot-cleanup-api.php:101 #: ../includes/ot-cleanup-api.php:130 msgid "OptionTree Cleanup" msgstr "OptionTree puhastus" #: ../includes/ot-cleanup-api.php:101 #, php-format msgid "" "OptionTree has outdated data that should be removed. Please go to %s for " "more information." msgstr "" "OptionTreel on aegunud andmeid, mis tuleks eemaldada. Lisainformatsiooni " "saamiseks mine palun %s." #: ../includes/ot-cleanup-api.php:136 msgid "Multiple Media Posts" msgstr "Mitme meediaga postitused" #: ../includes/ot-cleanup-api.php:138 #, php-format msgid "" "There are currently %s OptionTree media posts in your database. At some " "point in the past, a version of OptionTree added multiple %s media post " "objects cluttering up your %s table. There is no associated risk or harm " "that these posts have caused other than to add size to your overall " "database. Thankfully, there is a way to remove all these orphaned media " "posts and get your database cleaned up." msgstr "" "Sul on hetkel %s OptionTree meedia postitust andmebaasis. Millalgi varem " "lisas OptionTree mitu %s meedia postitust, risustades %s tabelit. Nende " "postitustega ei kaasne mingeid riske või kahju peale selle, et andmebaasi " "maht on suurem. Õnneks on nende orbudeks jäänud postituste eemaldamiseks " "moodus olemas, nii et saab andmebaasi jälle puhtaks." #: ../includes/ot-cleanup-api.php:140 #, php-format msgid "" "By clicking the button below, OptionTree will delete %s records and " "consolidate them into one single OptionTree media post for uploading " "attachments to. Additionally, the attachments will have their parent ID " "updated to the correct media post." msgstr "" "Vajutades allolevat nuppu, kustutab OptionTree %s kirjet ning ühendab nad " "ainsasse OptionTree meedia postitusse, kuhu manuseid üles laaditakse. Lisaks " "määratakse nende manuste vanema ID-le õige väärtus." #: ../includes/ot-cleanup-api.php:142 msgid "" "This could take a while to fully process depending on how many records you " "have in your database, so please be patient and wait for the script to " "finish." msgstr "" "See protsess võtab aega sõltuvalt andmebaasis olevate kirjete arvust, seega " "palun olge kannatlikud ja laske skriptil oma töö lõpetada." #: ../includes/ot-cleanup-api.php:144 #, php-format msgid "" "%s Your server is running in safe mode. Which means this page will " "automatically reload after deleting %s posts, you can filter this number " "using %s if your server is having trouble processing that many at one time." msgstr "" "%s Sinu server töötab turvarežiimis, mistõttu see lehekülg laetakse peale %s " "postituse kustutamist uuesti. Kui serveril on nii korraga nii mitme " "postituse töötlemisega probleeme, siis on seda numbrit võimalik %s filtriga " "muuta." #: ../includes/ot-cleanup-api.php:146 msgid "Consolidate Posts" msgstr "Konsolideeri postitused" #: ../includes/ot-cleanup-api.php:174 msgid "Reloading..." msgstr "Värskendame..." #: ../includes/ot-cleanup-api.php:210 msgid "Clean up script has completed, the page will now reload..." msgstr "Puhastusskript on töö lõpetanud, leht laeb end kohe uuesti..." #: ../includes/ot-cleanup-api.php:230 msgid "Outdated Table" msgstr "Aegunud tabel" #: ../includes/ot-cleanup-api.php:232 #, php-format msgid "" "If you have upgraded from an old 1.x version of OptionTree at some point, " "you have an extra %s table in your database that can be removed. It's not " "hurting anything, but does not need to be there. If you want to remove it. " "Click the button below." msgstr "" "Kui oled millalgi OptionTreed uuendanud vanalt 1.x versioonilt, on sul " "andmebaasis üleliigne tabel %s, mille saaks eemaldada. See ei tee midagi " "halba ning ei pea seal olema. Eemaldamiseks vajuta allolevat nuppu." #: ../includes/ot-cleanup-api.php:234 msgid "Drop Table" msgstr "Eemalda tabel" #: ../includes/ot-cleanup-api.php:238 #, php-format msgid "Deleting the outdated and unused %s table..." msgstr "Kustutan aegunud ja kasutamata tabeli %s..." #: ../includes/ot-cleanup-api.php:244 #, php-format msgid "The %s table has been successfully deleted. The page will now reload..." msgstr "Tabel %s kustutatu edukalt. Leht laetakse kohe uuesti..." #: ../includes/ot-cleanup-api.php:256 #, php-format msgid "Something went wrong. The %s table was not deleted." msgstr "Midagi läks valesti. Tabelit %s ei kustutatud." #: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51 #: ../includes/ot-functions-admin.php:169 #: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:363 msgid "Theme Options" msgstr "Teema seaded" #: ../includes/ot-functions-admin.php:56 #: ../includes/ot-functions-admin.php:126 #: ../includes/ot-functions-admin.php:220 msgid "Theme Options updated." msgstr "Teema seaded on uuendatud." #: ../includes/ot-functions-admin.php:57 #: ../includes/ot-functions-admin.php:127 #: ../includes/ot-functions-admin.php:221 msgid "Theme Options reset." msgstr "Teema valikute algseadistamine." #: ../includes/ot-functions-admin.php:58 #: ../includes/ot-functions-settings-page.php:94 #: ../includes/ot-functions-settings-page.php:133 msgid "Save Changes" msgstr "Salvesta muudatused" #: ../includes/ot-functions-admin.php:97 msgid "" "The Theme Options UI Builder is being overridden by a custom file in your " "theme. Any changes you make via the UI Builder will not be saved." msgstr "" "Teema kaustas on kohandatud fail, mistõttu Teema Valikute ehitaja " "kasutajaliideses tehtud muudatused ei salvestu." #: ../includes/ot-functions-admin.php:109 #: ../includes/ot-functions-admin.php:110 #: ../includes/ot-functions-docs-page.php:821 msgid "OptionTree" msgstr "OptionTree" #: ../includes/ot-functions-admin.php:120 #: ../includes/ot-functions-admin.php:121 #: ../includes/ot-functions-admin.php:163 #: ../includes/ot-functions-admin.php:187 #: ../includes/ot-functions-docs-page.php:49 msgid "Settings" msgstr "Seaded" #: ../includes/ot-functions-admin.php:128 #: ../includes/ot-functions-admin.php:222 msgid "Save Settings" msgstr "Salvesta seaded" #: ../includes/ot-functions-admin.php:133 msgid "Theme Options UI" msgstr "Teema valikute kasutajaliides" #: ../includes/ot-functions-admin.php:137 msgid "Import" msgstr "Impordi" #: ../includes/ot-functions-admin.php:141 msgid "Export" msgstr "Ekspordi" #: ../includes/ot-functions-admin.php:145 #: ../includes/ot-functions-admin.php:175 #: ../includes/ot-functions-admin.php:199 msgid "Layouts" msgstr "Paigutused" #: ../includes/ot-functions-admin.php:151 msgid "Theme Options UI Builder" msgstr "Teema valikute kasutajaliidese ehitaja" #: ../includes/ot-functions-admin.php:157 msgid "Settings XML" msgstr "Seadete XML" #: ../includes/ot-functions-admin.php:181 msgid "Settings PHP File" msgstr "Seadete PHP fail" #: ../includes/ot-functions-admin.php:205 msgid "Layout Management" msgstr "Paigutuste haldus" #: ../includes/ot-functions-admin.php:214 #: ../includes/ot-functions-admin.php:215 msgid "Documentation" msgstr "Dokumentatsioon" #: ../includes/ot-functions-admin.php:227 msgid "Creating Options" msgstr "Seadete loomine" #: ../includes/ot-functions-admin.php:231 msgid "Option Types" msgstr "Valikute tüübid" #: ../includes/ot-functions-admin.php:235 msgid "Function References" msgstr "Funktsioonide ülevaade" #: ../includes/ot-functions-admin.php:239 #: ../includes/ot-functions-admin.php:281 #: ../includes/ot-functions-settings-page.php:366 msgid "Theme Mode" msgstr "Teema režiim" #: ../includes/ot-functions-admin.php:243 #: ../includes/ot-functions-admin.php:287 msgid "Meta Boxes" msgstr "Meta kastid" #: ../includes/ot-functions-admin.php:247 msgid "Code Examples" msgstr "Koodinäited" #: ../includes/ot-functions-admin.php:251 msgid "Layouts Overview" msgstr "Paigutuste ülevaade" #: ../includes/ot-functions-admin.php:257 msgid "Overview of available Theme Option fields." msgstr "Võimalike teema valikute väljade ülevaade." #: ../includes/ot-functions-admin.php:263 msgid "Option types in alphabetical order & hooks to filter them." msgstr "" "Valikutüübid tähestikulises järjekorras ja konksud nende filtreerimiseks." #: ../includes/ot-functions-admin.php:269 msgid "Function Reference:ot_get_option()" msgstr "Funktsiooni ülevaade:ot_get_option()" #: ../includes/ot-functions-admin.php:275 msgid "Function Reference:get_option_tree()" msgstr "Funktsiooni ülevaade:get_option_tree()" #: ../includes/ot-functions-admin.php:293 msgid "Code examples for front-end development." msgstr "Koodinäited veebilehe välise poole arenduseks." #: ../includes/ot-functions-admin.php:299 msgid "What's a layout anyhow?" msgstr "Mis siis ikkagi on paigutus?" #: ../includes/ot-functions-admin.php:502 #: ../includes/ot-functions-admin.php:604 #: ../includes/ot-functions-admin.php:673 #, php-format msgid "The %s input field for %s only allows numeric values." msgstr "%s sisendväli %s jaoks lubab vaid numbrilisi väärtusi." #: ../includes/ot-functions-admin.php:563 #, php-format msgid "The %s Colorpicker only allows valid hexadecimal or rgba values." msgstr "%s värvi valija lubab väärtuseid vaid kuueteistkümnendiksüsteemis." #: ../includes/ot-functions-admin.php:846 #: ../includes/ot-functions-docs-page.php:398 #: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:782 msgid "Send to OptionTree" msgstr "Saada OptionTree-le" #: ../includes/ot-functions-admin.php:847 #: ../includes/ot-functions-option-types.php:257 #: ../includes/ot-functions-option-types.php:3218 msgid "Remove Media" msgstr "Eemalda meedia" #: ../includes/ot-functions-admin.php:848 msgid "Are you sure you want to reset back to the defaults?" msgstr "Kas olete kindel, et soovite taastada algseaded?" #: ../includes/ot-functions-admin.php:849 msgid "You can't remove this! But you can edit the values." msgstr "Te ei saa seda eemaldada! Väärtuste muutmine on lubatud." #: ../includes/ot-functions-admin.php:850 msgid "Are you sure you want to remove this?" msgstr "Kas olete kindel, et soovite seda eemaldada?" #: ../includes/ot-functions-admin.php:851 msgid "Are you sure you want to activate this layout?" msgstr "Kas olete kindel, et soovite seda paigutust aktiveerida?" #: ../includes/ot-functions-admin.php:852 msgid "Sorry, you can't have settings three levels deep." msgstr "Kahjuks ei saa sätteid määrata kolmanda taseme sügavusega." #: ../includes/ot-functions-admin.php:853 #: ../includes/ot-functions-option-types.php:1159 msgid "Delete Gallery" msgstr "Kustuta galerii" #: ../includes/ot-functions-admin.php:854 #: ../includes/ot-functions-option-types.php:1160 msgid "Edit Gallery" msgstr "Muuda galeriid" #: ../includes/ot-functions-admin.php:855 #: ../includes/ot-functions-option-types.php:1167 msgid "Create Gallery" msgstr "Loo galerii" #: ../includes/ot-functions-admin.php:856 msgid "Are you sure you want to delete this Gallery?" msgstr "Kas olete kindel, et soovite seda galeriid kustutada?" #: ../includes/ot-functions-admin.php:857 msgid "Today" msgstr "Täna" #: ../includes/ot-functions-admin.php:858 msgid "Now" msgstr "Praegu" #: ../includes/ot-functions-admin.php:859 msgid "Close" msgstr "Sulge" #: ../includes/ot-functions-admin.php:860 msgid "Featured Image" msgstr "Tunuuspilt" #: ../includes/ot-functions-admin.php:861 #: ../includes/ot-functions-admin.php:3250 #: ../includes/ot-functions-admin.php:3311 msgid "Image" msgstr "Pilt" #: ../includes/ot-functions-admin.php:929 msgid "Option Tree" msgstr "Option Tree" #: ../includes/ot-functions-admin.php:1067 msgid "General" msgstr "Üldseaded" #: ../includes/ot-functions-admin.php:1073 msgid "Sample Text Field Label" msgstr "Tekstisisendi nimetuse näide" #: ../includes/ot-functions-admin.php:1074 msgid "Description for the sample text field." msgstr "Tekstisisendi kirjelduse näide" #: ../includes/ot-functions-admin.php:2316 msgid "Settings updated." msgstr "Seaded on uuendatud." #: ../includes/ot-functions-admin.php:2320 msgid "Settings could not be saved." msgstr "Seadeid ei suudetud uuendada." #: ../includes/ot-functions-admin.php:2328 msgid "Settings Imported." msgstr "Seaded on imporditud." #: ../includes/ot-functions-admin.php:2332 msgid "Settings could not be imported." msgstr "Seadeid ei suudetud importida." #: ../includes/ot-functions-admin.php:2339 msgid "Data Imported." msgstr "Andmed on imporditud." #: ../includes/ot-functions-admin.php:2343 msgid "Data could not be imported." msgstr "Andmeid ei suudetud importida." #: ../includes/ot-functions-admin.php:2351 msgid "Layouts Imported." msgstr "Paigutused on imporditud." #: ../includes/ot-functions-admin.php:2355 msgid "Layouts could not be imported." msgstr "Paigutusi ei suudetud importida." #: ../includes/ot-functions-admin.php:2363 msgid "Layouts Updated." msgstr "Paigutused on uuendatud." #: ../includes/ot-functions-admin.php:2367 msgid "Layouts could not be updated." msgstr "Paigutusi ei suudetud uuendada." #: ../includes/ot-functions-admin.php:2371 msgid "Layouts have been deleted." msgstr "Paigutused on kustutatud." #: ../includes/ot-functions-admin.php:2377 msgid "Layout activated." msgstr "Paigutus on aktiveeritud." #: ../includes/ot-functions-admin.php:2416 #: ../includes/ot-functions-docs-page.php:110 msgid "Background" msgstr "Taust" #: ../includes/ot-functions-admin.php:2417 #: ../includes/ot-functions-docs-page.php:113 msgid "Border" msgstr "Ääris" #: ../includes/ot-functions-admin.php:2418 #: ../includes/ot-functions-docs-page.php:116 msgid "Box Shadow" msgstr "Kasti vari" #: ../includes/ot-functions-admin.php:2419 #: ../includes/ot-functions-docs-page.php:119 msgid "Category Checkbox" msgstr "Kategooriate valikkastid" #: ../includes/ot-functions-admin.php:2420 #: ../includes/ot-functions-docs-page.php:122 msgid "Category Select" msgstr "Kategooria rippvalik" #: ../includes/ot-functions-admin.php:2421 #: ../includes/ot-functions-docs-page.php:125 msgid "Checkbox" msgstr "Valikkastid" #: ../includes/ot-functions-admin.php:2422 #: ../includes/ot-functions-docs-page.php:128 msgid "Colorpicker" msgstr "Värvivalik" #: ../includes/ot-functions-admin.php:2423 #: ../includes/ot-functions-docs-page.php:131 msgid "Colorpicker Opacity" msgstr "Värvivalija läbipaistmatus" #: ../includes/ot-functions-admin.php:2424 #: ../includes/ot-functions-docs-page.php:134 msgid "CSS" msgstr "CSS" #: ../includes/ot-functions-admin.php:2425 #: ../includes/ot-functions-docs-page.php:153 msgid "Custom Post Type Checkbox" msgstr "Enda loodud postitüübi valikkastid" #: ../includes/ot-functions-admin.php:2426 #: ../includes/ot-functions-docs-page.php:156 msgid "Custom Post Type Select" msgstr "Enda loodud postitüübi rippvalik" #: ../includes/ot-functions-admin.php:2427 #: ../includes/ot-functions-docs-page.php:159 msgid "Date Picker" msgstr "Kuupäev valija" #: ../includes/ot-functions-admin.php:2428 #: ../includes/ot-functions-docs-page.php:162 msgid "Date Time Picker" msgstr "Kuupäeva ja kellaaja valija" #: ../includes/ot-functions-admin.php:2429 #: ../includes/ot-functions-docs-page.php:165 msgid "Dimension" msgstr "Mõõtmed" #: ../includes/ot-functions-admin.php:2430 #: ../includes/ot-functions-admin.php:5464 #: ../includes/ot-functions-docs-page.php:168 msgid "Gallery" msgstr "Galerii" #: ../includes/ot-functions-admin.php:2431 #: ../includes/ot-functions-docs-page.php:171 msgid "Google Fonts" msgstr "Google Fondid" #: ../includes/ot-functions-admin.php:2432 #: ../includes/ot-functions-docs-page.php:174 msgid "JavaScript" msgstr "JavaScript" #: ../includes/ot-functions-admin.php:2433 #: ../includes/ot-functions-docs-page.php:177 msgid "Link Color" msgstr "Lingi värv" #: ../includes/ot-functions-admin.php:2434 #: ../includes/ot-functions-docs-page.php:180 msgid "List Item" msgstr "Nimekirja element" #: ../includes/ot-functions-admin.php:2435 #: ../includes/ot-functions-docs-page.php:183 msgid "Measurement" msgstr "Mõõt" #: ../includes/ot-functions-admin.php:2436 #: ../includes/ot-functions-docs-page.php:214 msgid "Numeric Slider" msgstr "Numbriskaala" #: ../includes/ot-functions-admin.php:2437 #: ../includes/ot-functions-docs-page.php:217 msgid "On/Off" msgstr "Sees/väljas" #: ../includes/ot-functions-admin.php:2438 #: ../includes/ot-functions-docs-page.php:220 msgid "Page Checkbox" msgstr "Lehekülgede valikkastid" #: ../includes/ot-functions-admin.php:2439 #: ../includes/ot-functions-docs-page.php:223 msgid "Page Select" msgstr "Lehekülje rippvalik" #: ../includes/ot-functions-admin.php:2440 #: ../includes/ot-functions-docs-page.php:226 msgid "Post Checkbox" msgstr "Postituste valikkastid" #: ../includes/ot-functions-admin.php:2441 #: ../includes/ot-functions-docs-page.php:229 msgid "Post Select" msgstr "Postituse rippvalik" #: ../includes/ot-functions-admin.php:2442 #: ../includes/ot-functions-docs-page.php:232 msgid "Radio" msgstr "Raadiokastid" #: ../includes/ot-functions-admin.php:2443 #: ../includes/ot-functions-docs-page.php:235 msgid "Radio Image" msgstr "Pildiga raadiokastid" #: ../includes/ot-functions-admin.php:2444 #: ../includes/ot-functions-docs-page.php:262 msgid "Select" msgstr "Rippvalik" #: ../includes/ot-functions-admin.php:2445 #: ../includes/ot-functions-docs-page.php:265 msgid "Sidebar Select" msgstr "Küljeriba rippvalik" #: ../includes/ot-functions-admin.php:2446 #: ../includes/ot-functions-docs-page.php:269 msgid "Slider" msgstr "Slaidiesitaja" #: ../includes/ot-functions-admin.php:2447 #: ../includes/ot-functions-docs-page.php:272 msgid "Social Links" msgstr "Sotsiaalmeedia" #: ../includes/ot-functions-admin.php:2448 #: ../includes/ot-functions-docs-page.php:275 msgid "Spacing" msgstr "Vahed" #: ../includes/ot-functions-admin.php:2449 #: ../includes/ot-functions-docs-page.php:278 msgid "Tab" msgstr "Sakk" #: ../includes/ot-functions-admin.php:2450 #: ../includes/ot-functions-docs-page.php:281 msgid "Tag Checkbox" msgstr "Sildi valikkastid" #: ../includes/ot-functions-admin.php:2451 #: ../includes/ot-functions-docs-page.php:284 msgid "Tag Select" msgstr "Sildi rippvalik" #: ../includes/ot-functions-admin.php:2452 #: ../includes/ot-functions-docs-page.php:287 msgid "Taxonomy Checkbox" msgstr "Taksonoomia valikkastid" #: ../includes/ot-functions-admin.php:2453 #: ../includes/ot-functions-docs-page.php:290 msgid "Taxonomy Select" msgstr "Taksonoomia rippvalik" #: ../includes/ot-functions-admin.php:2454 #: ../includes/ot-functions-docs-page.php:293 msgid "Text" msgstr "Tekstisisend" #: ../includes/ot-functions-admin.php:2455 #: ../includes/ot-functions-docs-page.php:296 msgid "Textarea" msgstr "Tekstiväli" #: ../includes/ot-functions-admin.php:2456 #: ../includes/ot-functions-docs-page.php:355 msgid "Textarea Simple" msgstr "Lihtne tekstiväli" #: ../includes/ot-functions-admin.php:2457 #: ../includes/ot-functions-docs-page.php:371 msgid "Textblock" msgstr "Tekstiblokk" #: ../includes/ot-functions-admin.php:2458 #: ../includes/ot-functions-docs-page.php:374 msgid "Textblock Titled" msgstr "Pealkirjaga tekstiblokk" #: ../includes/ot-functions-admin.php:2459 #: ../includes/ot-functions-docs-page.php:377 msgid "Typography" msgstr "Tüpograafia" #: ../includes/ot-functions-admin.php:2460 #: ../includes/ot-functions-docs-page.php:397 msgid "Upload" msgstr "Lae üles" #: ../includes/ot-functions-admin.php:3195 msgid "Left Sidebar" msgstr "Vasak küljendusmenüü" #: ../includes/ot-functions-admin.php:3200 msgid "Right Sidebar" msgstr "Parem küljendusmenüü" #: ../includes/ot-functions-admin.php:3205 msgid "Full Width (no sidebar)" msgstr "Täies pikkuses (ilma küljendusmenüüta)" #: ../includes/ot-functions-admin.php:3210 msgid "Dual Sidebar" msgstr "Topelt küljendusmenüü" #: ../includes/ot-functions-admin.php:3215 msgid "Left Dual Sidebar" msgstr "Kaks küljendusmenüüd vasakul" #: ../includes/ot-functions-admin.php:3220 msgid "Right Dual Sidebar" msgstr "Kaks küljendusmenüüd paremal" #: ../includes/ot-functions-admin.php:3261 #: ../includes/ot-functions-admin.php:3317 #: ../includes/ot-functions-admin.php:5504 msgid "Link" msgstr "Viide" #: ../includes/ot-functions-admin.php:3272 #: ../includes/ot-functions-admin.php:3323 #: ../includes/ot-functions-docs-page.php:43 #: ../includes/ot-functions-docs-page.php:428 #: ../includes/ot-functions-docs-page.php:478 msgid "Description" msgstr "Kirjeldus" #: ../includes/ot-functions-admin.php:3387 msgid "Name" msgstr "Nimetus" #: ../includes/ot-functions-admin.php:3388 msgid "Enter the name of the social website." msgstr "Sisesta sotsiaalmeedia veebilehe nimi." #: ../includes/ot-functions-admin.php:3396 msgid "Enter the text shown in the title attribute of the link." msgstr "Sisesta tekst, mida näidatakse lingi pealkirja atribuudis." #: ../includes/ot-functions-admin.php:3402 #, php-format msgid "" "Enter a link to the profile or page on the social website. Remember to add " "the %s part to the front of the link." msgstr "" "Sisesta link profiilile või lehele sellel sotsiaalmeedia veebilehel. Ära " "unusta lisada lingi ette %s osa." #: ../includes/ot-functions-admin.php:3754 #, php-format msgid "Unable to write to file %s." msgstr "" #: ../includes/ot-functions-admin.php:4024 msgid "edit" msgstr "muuda" #: ../includes/ot-functions-admin.php:4025 #: ../includes/ot-functions-admin.php:4093 #: ../includes/ot-functions-admin.php:4094 #: ../includes/ot-functions-admin.php:4256 #: ../includes/ot-functions-admin.php:4257 #: ../includes/ot-functions-admin.php:4322 #: ../includes/ot-functions-admin.php:4323 #: ../includes/ot-functions-admin.php:4450 #: ../includes/ot-functions-admin.php:4451 #: ../includes/ot-functions-admin.php:4603 #: ../includes/ot-functions-admin.php:4604 msgid "Edit" msgstr "Muuda" #: ../includes/ot-functions-admin.php:4027 #: ../includes/ot-functions-admin.php:4028 #: ../includes/ot-functions-admin.php:4096 #: ../includes/ot-functions-admin.php:4097 #: ../includes/ot-functions-admin.php:4259 #: ../includes/ot-functions-admin.php:4260 #: ../includes/ot-functions-admin.php:4325 #: ../includes/ot-functions-admin.php:4326 #: ../includes/ot-functions-admin.php:4384 #: ../includes/ot-functions-admin.php:4385 #: ../includes/ot-functions-admin.php:4453 #: ../includes/ot-functions-admin.php:4454 #: ../includes/ot-functions-admin.php:4606 #: ../includes/ot-functions-admin.php:4607 msgid "Delete" msgstr "Kustuta" #: ../includes/ot-functions-admin.php:4034 msgid "" "<strong>Section Title</strong>: Displayed as a menu item on the Theme " "Options page." msgstr "" "<strong>Sektsiooni pealkiri</strong>: Näidatakse menüü elemendina teema " "valikute lehel." #: ../includes/ot-functions-admin.php:4042 msgid "" "<strong>Section ID</strong>: A unique lower case alphanumeric string, " "underscores allowed." msgstr "" "<strong>Sektsiooni ID</strong>: unikaalne väiketähtedega tähtnumbriline " "string, alakriipsud lubatud." #: ../includes/ot-functions-admin.php:4103 msgid "" "<strong>Label</strong>: Displayed as the label of a form element on the " "Theme Options page." msgstr "" "<strong>Nimetus</strong>: Näidatakse kui vormi elemendi nimetust teema " "valikute lehel." #: ../includes/ot-functions-admin.php:4111 #: ../includes/ot-functions-admin.php:4340 msgid "" "<strong>ID</strong>: A unique lower case alphanumeric string, underscores " "allowed." msgstr "" "<strong>ID</strong>: unikaalne väiketähtedega tähtnumbriline string, " "alakriipsud lubatud." #: ../includes/ot-functions-admin.php:4119 msgid "" "<strong>Type</strong>: Choose one of the available option types from the " "dropdown." msgstr "" "<strong>Tüüp</strong>: vali rippmenüüst üks pakutavatest valiku tüüpidest." #: ../includes/ot-functions-admin.php:4130 msgid "" "<strong>Description</strong>: Enter a detailed description for the users to " "read on the Theme Options page, HTML is allowed. This is also where you " "enter content for both the Textblock & Textblock Titled option types." msgstr "" "<strong>Kirjeldus</strong>: sisesta detailne kirjeldus, mida kasutajad " "saavad lugeda teema valikute lehel. HTML on lubatud. See on ühtlasi ka koht, " "kuhu sisestada tekstibloki ja pealkirjaga tekstibloki valikutüüpide sisu." #: ../includes/ot-functions-admin.php:4138 msgid "" "<strong>Choices</strong>: This will only affect the following option types: " "Checkbox, Radio, Select & Select Image." msgstr "" "<strong>Valikud</strong>: mõjutab vaid järgnevaid valikutüüpe: valikkastid, " "raadiokastid, rippvalik ja pildi valik." #: ../includes/ot-functions-admin.php:4143 msgid "Add Choice" msgstr "Lisa valik" #: ../includes/ot-functions-admin.php:4149 msgid "" "<strong>Settings</strong>: This will only affect the List Item option type." msgstr "<strong>Sätted</strong>: mõjutab vaid nimekirja elemendi valikutüüpi." #: ../includes/ot-functions-admin.php:4154 #: ../includes/ot-functions-settings-page.php:93 msgid "Add Setting" msgstr "Lisa säte" #: ../includes/ot-functions-admin.php:4160 msgid "" "<strong>Standard</strong>: Setting the standard value for your option only " "works for some option types. Read the <code>OptionTree->Documentation</code> " "for more information on which ones." msgstr "" "<strong>Standard</strong>. standardväärtuse määramine mõjub vaid mõnele " "valikutüübile. Lisainfot leiad <code>OptionTree->Dokumentatsioon</code> " "lehelt." #: ../includes/ot-functions-admin.php:4168 msgid "" "<strong>Rows</strong>: Enter a numeric value for the number of rows in your " "textarea. This will only affect the following option types: CSS, Textarea, & " "Textarea Simple." msgstr "" "<strong>Ridu</strong>: sisesta numbriline väärtus, mis määrab ridade arvu " "tekstiväljal. Mõjutab vaid järgnevaid valikutüüpe: CSS, tekstiväli ja lihtne " "tekstiväli." #: ../includes/ot-functions-admin.php:4176 msgid "" "<strong>Post Type</strong>: Add a comma separated list of post type like " "'post,page'. This will only affect the following option types: Custom Post " "Type Checkbox, & Custom Post Type Select." msgstr "" "<strong>Postituse tüüp</strong>: lisa siia komaga eraldatud loend " "postitüüpidest - näiteks 'post,page'. See mõjutab vaid järgnevaid " "valikutüüpe: enda loodud postitüübi valikkastid ja enda loodud postitüübi " "rippvalik." #: ../includes/ot-functions-admin.php:4184 msgid "" "<strong>Taxonomy</strong>: Add a comma separated list of any registered " "taxonomy like 'category,post_tag'. This will only affect the following " "option types: Taxonomy Checkbox, & Taxonomy Select." msgstr "" "<strong>Taksonoomia</strong>: lisa komaga eraldatud loend registreeritud " "taksonoomiatest nagu 'category,post_tag'. See mõjutab vaid järgnevaid " "valikutüüpe: taksonoomia valikukastid & taksonoomia rippvalik." #: ../includes/ot-functions-admin.php:4192 msgid "" "<strong>Min, Max, & Step</strong>: Add a comma separated list of options in " "the following format <code>0,100,1</code> (slide from <code>0-100</code> in " "intervals of <code>1</code>). The three values represent the minimum, " "maximum, and step options and will only affect the Numeric Slider option " "type." msgstr "" "<strong>min, max & aste</strong>: lisa komaga eraldatud loend valikutest " "järgnevas formaadis: <code>0,100,1</code> ( liugle vahemikus <code>0-100</" "code> intervalliga <code>1</code> ). Need kolm väärtust näitavad miinimumi, " "maksimumi ja astme valikuid ning mõjutavad vaid numbriliuguri valikutüüpi." #: ../includes/ot-functions-admin.php:4200 msgid "<strong>CSS Class</strong>: Add and optional class to this option type." msgstr "" "<strong>CSS klass</strong>: Soovi korral lisa sellele valikutüübile klass." #: ../includes/ot-functions-admin.php:4208 #, php-format msgid "" "<strong>Condition</strong>: Add a comma separated list (no spaces) of " "conditions in which the field will be visible, leave this setting empty to " "always show the field. In these examples, <code>value</code> is a " "placeholder for your condition, which can be in the form of %s." msgstr "" "<strong>Tingimus</strong>: lisa komaga eraldatud loend ( ilma tühikuteta ) " "tingimustest, mille korral see väli on nähtav. Välja alati näitamiseks jäta " "tühjaks. Nendes näidetes on <code>value</code> kohahoidja teie tingimustele, " "mis võivad olla kujul %s." #: ../includes/ot-functions-admin.php:4216 msgid "" "<strong>Operator</strong>: Choose the logical operator to compute the result " "of the conditions." msgstr "" "<strong>Operaator</strong>: vali loogiline operaator, millega arvutada välja " "tingimuste tulemus." #: ../includes/ot-functions-admin.php:4219 #: ../includes/ot-functions-docs-page.php:111 #: ../includes/ot-functions-docs-page.php:378 msgid "and" msgstr "ja" #: ../includes/ot-functions-admin.php:4220 msgid "or" msgstr "või" #: ../includes/ot-functions-admin.php:4266 #: ../includes/ot-functions-docs-page.php:29 msgid "Label" msgstr "Nimetus" #: ../includes/ot-functions-admin.php:4276 msgid "Value" msgstr "Väärtus" #: ../includes/ot-functions-admin.php:4286 msgid "Image Source (Radio Image only)" msgstr "Pildi allikas ( ainult pildiga raadiovaliku jaoks )" #: ../includes/ot-functions-admin.php:4332 msgid "" "<strong>Title</strong>: Displayed as a contextual help menu item on the " "Theme Options page." msgstr "" "<strong>Pealkiri</strong>: kuvatakse kui kontekstipõhine abimenüü element " "teema valikute lehel." #: ../includes/ot-functions-admin.php:4348 msgid "" "<strong>Content</strong>: Enter the HTML content about this contextual help " "item displayed on the Theme Option page for end users to read." msgstr "" "<strong>Sisu</strong>: sisesta HTML sisu selle kontekstipõhise elemendi " "kohta. Näidatakse teema valikute lehel lõppkasutajatele." #: ../includes/ot-functions-admin.php:4379 msgid "Layout" msgstr "Paigutus" #: ../includes/ot-functions-admin.php:4381 #: ../includes/ot-functions-admin.php:4382 msgid "Activate" msgstr "Aktiveeri" #: ../includes/ot-functions-admin.php:4418 ../includes/ot-meta-box-api.php:231 #: ../includes/ot-settings-api.php:610 msgid "Title" msgstr "Pealkiri" #: ../includes/ot-functions-admin.php:4758 msgid "New Layout" msgstr "Uus paigutus" #: ../includes/ot-functions-admin.php:5513 msgid "Link URL" msgstr "Viide" #: ../includes/ot-functions-admin.php:5520 msgid "Link Title" msgstr "Lingi pealkiri" #: ../includes/ot-functions-admin.php:5550 msgid "Quote" msgstr "Tsitaat" #: ../includes/ot-functions-admin.php:5559 msgid "Source Name (ex. author, singer, actor)" msgstr "Allika nimi (nt autor, laulja, näitleja)" #: ../includes/ot-functions-admin.php:5566 msgid "Source URL" msgstr "Allika URL" #: ../includes/ot-functions-admin.php:5573 msgid "Source Title (ex. book, song, movie)" msgstr "Allika pealkiri (nt raamat, laul, film)" #: ../includes/ot-functions-admin.php:5580 msgid "Source Date" msgstr "Allika kuupäev" #: ../includes/ot-functions-admin.php:5610 msgid "Video" msgstr "Video" #: ../includes/ot-functions-admin.php:5619 #, php-format msgid "" "Embed video from services like Youtube, Vimeo, or Hulu. You can find a list " "of supported oEmbed sites in the %1$s. Alternatively, you could use the " "built-in %2$s shortcode." msgstr "" "Lisa video välisest allikast, nagu näiteks Youtube, Vimeo või Hulu. " "Nimekirja toetatud oEmbed veebilehtedest leiad %1$s. Teine variant oleks " "kasutada sisse ehitatud lühikoodi %2$s." #: ../includes/ot-functions-admin.php:5619 #: ../includes/ot-functions-admin.php:5658 msgid "Wordpress Codex" msgstr "Wordpress Codex" #: ../includes/ot-functions-admin.php:5649 msgid "Audio" msgstr "Audio" #: ../includes/ot-functions-admin.php:5658 #, php-format msgid "" "Embed audio from services like SoundCloud and Rdio. You can find a list of " "supported oEmbed sites in the %1$s. Alternatively, you could use the built-" "in %2$s shortcode." msgstr "" "Lisa heli teenustest SoundCloud, Rdio või teistest sarnastest. Nimekirja " "toetatud oEmbed veebilehtedest leiad %1$s. Teine variant oleks kasutada " "sisse ehitatud lühikoodi %2$s." #: ../includes/ot-functions-docs-page.php:30 msgid "" "The Label field should be a short but descriptive block of text 100 " "characters or less with no HTML." msgstr "" "Nimetuse väli peaks olema lühike kuid kirjeldav tekstiblokk, mis on kuni 100 " "tähemärki pikk ja ei sisalda HTML-i." #: ../includes/ot-functions-docs-page.php:32 msgid "ID" msgstr "ID" #: ../includes/ot-functions-docs-page.php:33 msgid "" "The ID field is a unique alphanumeric key used to differentiate each theme " "option (underscores are acceptable). Also, the plugin will change all text " "you write in this field to lowercase and replace spaces and special " "characters with an underscore automatically." msgstr "" "ID väli on unikaalne tähtnumbriline võti eristamaks teema valikuid " "( alakriipsud on lubatud ). Lisaks muudetakse kõik siia välja kirjutatav " "tekst väiketähtedeks ning erimärgid asendatakse automaatselt alakriipsudega." #: ../includes/ot-functions-docs-page.php:35 msgid "Type" msgstr "Tüüp" #: ../includes/ot-functions-docs-page.php:36 msgid "" "You are required to choose one of the supported option types when creating a " "new option. Here is a list of the available option types. For more " "information about each type click the <code>Option Types</code> tab to the " "left." msgstr "" "Uue valiku loomisel peate valima mõne toetatud valikutüüpidest. Siin on " "nimekiri saadaolevatest valikutüüpidest. Lisainfo igaühe kohta neist on " "saadaval vajutades vasakul olevat <code>Valiku tüüp</code> sakki." #: ../includes/ot-functions-docs-page.php:44 msgid "" "Enter a detailed description for the users to read on the Theme Options " "page, HTML is allowed. This is also where you enter content for both the " "Textblock & Textblock Titled option types." msgstr "" "Sisesta detailne kirjeldus, mida kasutajad saavad lugeda teema valikute " "lehel. HTML on lubatud. See on ka koht sisu sisestamiseks tekstibloki ja " "pealkirjaga tekstibloki valikutüüpide jaoks." #: ../includes/ot-functions-docs-page.php:46 msgid "Choices" msgstr "Valikud" #: ../includes/ot-functions-docs-page.php:47 msgid "" "Click the \"Add Choice\" button to add an item to the choices array. This " "will only affect the following option types: Checkbox, Radio, Select & " "Select Image." msgstr "" "Elemendi lisamiseks valikute massiivi vajuta \"Lisa valik\" nuppu. See " "mõjutab järgnevaid valikutüüpe: valikkastid, raadiokastid, rippvalik ja " "pildivalik." #: ../includes/ot-functions-docs-page.php:50 msgid "" "Click the \"Add Setting\" button found inside a newly created setting to add " "an item to the settings array. This will only affect the List Item type." msgstr "" "Elemendi lisamiseks sätete massiivi vajuta vastloodud sättes asuvat \"Lisa " "säte\" nuppu. See mõjutab vaid nimekirja elemendi tüüpi." #: ../includes/ot-functions-docs-page.php:52 msgid "Standard" msgstr "Standartne" #: ../includes/ot-functions-docs-page.php:53 msgid "" "Setting the standard value for your option only works for some option types. " "Those types are one that have a single string value saved to them and not an " "array of values." msgstr "" "Standard väärtuse määramine oma valikule töötab vaid mõnede valikutüüpidega. " "Need tüübid on sellised, kus hoitakse vaid ühte väärtust stringi kujul, " "mitte väärtuste massiivi." #: ../includes/ot-functions-docs-page.php:55 msgid "Rows" msgstr "Ridasid" #: ../includes/ot-functions-docs-page.php:56 msgid "" "Enter a numeric value for the number of rows in your textarea. This will " "only affect the following option types: CSS, Textarea, & Textarea Simple." msgstr "" "Sisesta numbriline väärtus, mis määrab ridade arvu tekstialas. See mõjutab " "vaid järgnevaid valikutüüpe: CSS, tekstiala & lihtne tekstiala." #: ../includes/ot-functions-docs-page.php:58 msgid "Post Type" msgstr "Postitüüp" #: ../includes/ot-functions-docs-page.php:59 msgid "" "Add a comma separated list of post type like <code>post,page</code>. This " "will only affect the following option types: Custom Post Type Checkbox, & " "Custom Post Type Select. Below are the default post types available with " "WordPress and that are also compatible with OptionTree. You can also add " "your own custom <code>post_type</code>. At this time <code>any</code> does " "not seem to return results properly and is something I plan on looking into." msgstr "" "Lisa komaga eraldatud loetelu postitüüpidest, näiteks <code>post,page</" "code>. See mõjutab vaid järgnevaid valikutüüpe: kohandatud postitüübi " "valikkastid ja kohandatud postitüübi rippmenüü. All on vaikimisi Wordpressis " "saadaval postitüübid, mis on OptionTreega kokkusobivad. Saad kasutada ka " "enda loodud <code>post_type</code>. Hetkel <code>any</code> ei tagasta " "õigeid väärtusi." #: ../includes/ot-functions-docs-page.php:67 msgid "Taxonomy" msgstr "Taksonoomia" #: ../includes/ot-functions-docs-page.php:68 msgid "" "Add a comma separated list of any registered taxonomy like <code>category," "post_tag</code>. This will only affect the following option types: Taxonomy " "Checkbox, & Taxonomy Select." msgstr "" "Lisa komaga eraldatud loend registreeritud taksonoomiatest nagu 'category," "post_tag'. See mõjutab vaid järgnevaid valikutüüpe: taksonoomia valikukastid " "& taksonoomia rippvalik." #: ../includes/ot-functions-docs-page.php:70 msgid "Min, Max, & Step" msgstr "Miinimum, maksimum ning aste" #: ../includes/ot-functions-docs-page.php:71 msgid "" "Add a comma separated list of options in the following format <code>0,100,1</" "code> (slide from <code>0-100</code> in intervals of <code>1</code>). The " "three values represent the minimum, maximum, and step options and will only " "affect the Numeric Slider option type." msgstr "" "Lisa komaga eraldatud loend valikutest järgnevas formaadis: <code>0,100,1</" "code> ( liugle vahemikus <code>0-100</code> intervalliga <code>1</code> ). " "Need kolm väärtust näitavad miinimumi, maksimumi ja astme valikuid ning " "mõjutavad vaid numbriliuguri valikutüüpi." #: ../includes/ot-functions-docs-page.php:73 msgid "CSS Class" msgstr "CSS klass" #: ../includes/ot-functions-docs-page.php:74 msgid "Add and optional class to any option type." msgstr "Soovi korral lisa klassi-atribuut ükskõik millisele valikutüübile." #: ../includes/ot-functions-docs-page.php:76 msgid "Condition" msgstr "Tingimus" #: ../includes/ot-functions-docs-page.php:77 #, php-format msgid "" "Add a comma separated list (no spaces) of conditions in which the field will " "be visible, leave this setting empty to always show the field. In these " "examples, %s is a placeholder for your condition, which can be in the form " "of %s." msgstr "" "Lisa komaga eraldatud loend ( ilma tühikuteta ) tingimustest, mille korral " "see väli on nähtav. Tühjaks jättes on väli alati nähtav. Nendes näidetes on " "%s tingimuse kohahoidjaks, mis tohib olla kujul %s." #: ../includes/ot-functions-docs-page.php:79 msgid "Operator" msgstr "Operaator" #: ../includes/ot-functions-docs-page.php:80 #, php-format msgid "" "Choose the logical operator to compute the result of the conditions. Your " "options are %s and %s." msgstr "" "Vali loogiline operaator, millega arvutada tingimuste tulemus. Sinu " "valikuteks on %s ja %s." #: ../includes/ot-functions-docs-page.php:111 #, php-format msgid "" "The Background option type is for adding background styles to your theme " "either dynamically via the CSS option type below or manually with %s. The " "Background option type has filters that allow you to remove fields or change " "the defaults. For example, you can filter %s to remove unwanted fields from " "all Background options or an individual one. You can also filter %s. These " "filters allow you to fine tune the select lists for your specific needs." msgstr "" "Tausta valikutüüpi kasutatakse teemasse tausta stiilide lisamiseks " "dünaamiliselt alloleva CSS valikutüübiga või käsitsi kasutades %s. Tausta " "valikutüübil on filtrid, mis võimaldavad eemaldada välju või muuta " "vaikeväärtusi. Näiteks saab filtreerida %s eemaldamaks soovimatuid välju " "kõikidelt tausta valikutelt või ainult ühelt neist. Saab filtreerida ka %s. " "Need filtrid võimaldavad sul sättida valikute nimekirja täpselt oma " "vajadustele vastavaks." #: ../includes/ot-functions-docs-page.php:114 #, php-format msgid "" "The Border option type is used to set width, unit, style, and color values. " "The text input excepts a numerical value and the unit select lets you choose " "the unit of measurement to add to that value. Currently the default units " "are %s, %s, %s, and %s. However, you can change them with the %s filter. The " "style select lets you choose the border style. The default styles are %s, " "%s, %s, %s, %s, %s, %s, and %s. However, you can change them with the %s " "filter. The colorpicker saves a hexadecimal color code." msgstr "" "Äärise valikutüüp kasutatakse laiuse, ühiku, stiili ja värvi määramiseks. " "Tekstisisendisse saab kirjutada numbrilise väärtuse ning rippmenüü laseb " "valida talle mõõtühiku. Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid " "saab muuta %s filtriga. Stiili rippmenüü laseb valida äärise stiili. " "Vaikimisi stiilid on %s, %s, %s, %s, %s, %s, %s ja %s. Neid saab muuta %s " "filtriga. Värvivalija salvestab värvikoodi kuueteistkümnendiksüsteemis." #: ../includes/ot-functions-docs-page.php:117 #, php-format msgid "" "The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values." msgstr "" "Kasti varju valikutüüpi kasutatakse %s, %s, %s, %s, %s ja %s väärtuse " "määramiseks." #: ../includes/ot-functions-docs-page.php:120 msgid "" "The Category Checkbox option type displays a list of category IDs. It allows " "the user to check multiple category IDs and will return that value as an " "array for use in a custom function or loop." msgstr "" "Kategooria valikkastide valikutüüp näitab loendit kategooriate ID-dest. See " "laseb kasutajal märkida mitu kategooria ID-d ja tagastab selle väärtuse " "massiivina, enda funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:123 msgid "" "The Category Select option type displays a list of category IDs. It allows " "the user to select only one category ID and will return that value for use " "in a custom function or loop." msgstr "" "Kategooria rippvaliku valikutüüp näitab loendit kategooriate ID-dest. See " "laseb kasutajal märkida üks kategooria ID ja tagastab selle väärtuse enda " "funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:126 msgid "" "The Checkbox option type displays a group of choices. It allows the user to " "check multiple choices and will return that value as an array for use in a " "custom function or loop." msgstr "" "Valikkastide valikutüüp kuvab valikute grupi. See laseb kasutajal märkida " "mitu valikut ning tagastab selle väärtuse massiivina enda funktsioonis või " "tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:129 msgid "" "The Colorpicker option type saves a hexadecimal color code for use in CSS. " "Use it to modify the color of something in your theme." msgstr "" "Värvi valija valikutüüp salvestab värvikoodi kuueteistkümnendiksüsteemis, " "mida saab kasutada CSS-is. Kasuta seda millegi värvi muutmiseks enda teemas." #: ../includes/ot-functions-docs-page.php:132 #, php-format msgid "" "The Colorpicker Opacity option type saves a hexadecimal color code with an " "opacity value from %s to %s in increments of %s. Though the value is saved " "as hexadecimal, if used within the CSS option type the color and opacity " "values will be converted into a valid RGBA CSS value." msgstr "" "Värvivalija läbipaistmatuse valikutüüp salvestab värvikoodi " "kuueteistkümnendiksüsteemis läbipaistmatuse väärtusega %s kuni %s sammuga " "%s. Kuigi väärtus salvestatakse kuueteistkümnendiksüsteemis, kasutades teda " "koos CSS valikutüübiga teisendatakse ja korrektseks RGBA CSS väärtuseks." #: ../includes/ot-functions-docs-page.php:135 #, php-format msgid "" "The CSS option type is a textarea that when used properly can add dynamic " "CSS to your theme from within OptionTree. Unfortunately, due server " "limitations you will need to create a file named %s at the root level of " "your theme and change permissions using %s so the server can write to the " "file. I have had the most success setting this single file to %s but feel " "free to play around with permissions until everything is working. A good " "starting point is %s. When the server can save to the file, CSS will " "automatically be updated when you save your Theme Options." msgstr "" "CSS valikutüüp on tekstiväli, mille õigel kasutamisel saab teemale lisada " "dünaamiliselt genereeritud CSS-i OptionTree kaudu. Serveri piirangute tõttu " "peate selleks looma teema juurkausta faili nimega %s ning muutma õiguseid " "kasutades %s, et server saaks faili kirjutada. Mul on tulnud parimad " "tulemused siis, kui muutsin selle ainsa faili õiguste väärtuseks %s, kuid " "katsetage teisi variante, kuni kõik toimib nagu vaja. Hea alguspunkt on %s. " "Kui server saab edukalt faili salvestada. siis uuendatakse CSS automaatselt " "teema salvestamisel." #: ../includes/ot-functions-docs-page.php:137 #, php-format msgid "" "This example assumes you have an option with the ID of %1$s. Which means " "this option will automatically insert the value of %1$s into the %2$s when " "the Theme Options are saved." msgstr "" "See näide eeldab, et sul on valik ID-ga %1$s. See tähendab, et teema " "valikute salvestamisel sisestatakse %1$s väärtus automaatselt %2$s külge." #: ../includes/ot-functions-docs-page.php:139 msgid "Input" msgstr "Sisend" #: ../includes/ot-functions-docs-page.php:145 msgid "Output" msgstr "Väljund" #: ../includes/ot-functions-docs-page.php:154 #, php-format msgid "" "The Custom Post Type Select option type displays a list of IDs from any " "available WordPress post type or custom post type. It allows the user to " "check multiple post IDs for use in a custom function or loop. Requires at " "least one valid %1$s in the %1$s field." msgstr "" "Enda loodud postitüübi rippvaliku valikutüüp kuvab nimekirja kõikidest " "WordPressi postitüüpide või enda loodud postitüüpide ID-dest. See võimaldab " "kasutajal märgistada mitu postituse ID-d, mida kasutada enda funktsioonis " "või tsüklis. Vajab vähemalt ühte sobivat %1$s väljal %1$s." #: ../includes/ot-functions-docs-page.php:157 #, php-format msgid "" "The Custom Post Type Select option type displays a list of IDs from any " "available WordPress post type or custom post type. It will return a single " "post ID for use in a custom function or loop. Requires at least one valid " "%1$s in the %1$s field." msgstr "" "Enda loodud postitüübi rippvaliku valikutüüp kuvab nimekirja kõikidest " "WordPressi postitüüpide või enda loodud postitüüpide ID-dest. See tagastab " "ühe postituse ID, mida kasutada enda funktsioonis või tsüklis. Vajab " "vähemalt ühte sobivat %1$s väljal %1$s." #: ../includes/ot-functions-docs-page.php:160 msgid "" "The Date Picker option type is tied to a standard form input field which " "displays a calendar pop-up that allow the user to pick any date when focus " "is given to the input field. The returned value is a date formatted string." msgstr "" "Kuupäeva valiku valikutüüp on seotud standartse vormi sisendväljaga. Kui " "sellele antakse fookus, siis kuvatakse kalendri aken, mis laseb kasutajal " "valida suvalise kuupäeva. Tagastatav väärtus on kuupäeva formaadis string." #: ../includes/ot-functions-docs-page.php:163 msgid "" "The Date Time Picker option type is tied to a standard form input field " "which displays a calendar pop-up that allow the user to pick any date and " "time when focus is given to the input field. The returned value is a date " "and time formatted string." msgstr "" "Kuupäeva ja aja valiku valikutüüp on seotud standartse vormi sisendväljaga. " "Kui sellele antakse fookus, siis kuvatakse kalendri aken, mis laseb " "kasutajal valida suvalise kuupäeva ja kellaaja. Tagastatav väärtus on " "kuupäeva ja kellaaja formaadis string." #: ../includes/ot-functions-docs-page.php:166 #, php-format msgid "" "The Dimension option type is used to set width and height values. The text " "inputs except numerical values and the select lets you choose the unit of " "measurement to add to that value. Currently the default units are %s, %s, " "%s, and %s. However, you can change them with the %s filter." msgstr "" "Mõõtme valikutüüpi kasutatakse laiuse ja kõrguse väärtuste jaoks. " "Tekstisisendisse saab kirjutada numbrilise väärtuse ning rippmenüü laseb " "valida talle mõõtühiku. Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid " "saab muuta %s filtriga." #: ../includes/ot-functions-docs-page.php:169 msgid "" "The Gallery option type saves a comma separated list of image attachment " "IDs. You will need to create a front-end function to display the images in " "your theme." msgstr "" "Galerii valikutüüp salvestab komaga eraldatud loendi pildi tüüpi manuste ID-" "dest. Nende piltide teemas näitamiseks tuleb luua kuvatava lehe jaoks " "funktsioon." #: ../includes/ot-functions-docs-page.php:172 #, php-format msgid "" "The Google Fonts option type will dynamically enqueue any number of Google " "Web Fonts into the document %1$s. As well, once the option has been saved " "each font family will automatically be inserted into the %2$s array for the " "Typography option type. You can further modify the font stack by using the " "%3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s " "parameter is being passed from %7$s, so it will be the ID of a Typography " "option type. This will allow you to add additional web safe fonts to " "individual font families on an as-need basis." msgstr "" "Google Fontide valikutüüp kaasab dokumendi %1$s dünaamiliselt soovitud hulga " "Google veebifonte. Lisaks salvestub iga valitud fondi perekond automaatselt " "%2$s massiivi tüpograafia valikutüübis. Fondi salve saab veel rohkem " "modifitseerida %3$s filtriga, mis saab kaasa %4$s, %5$s ja %6$s parameetrid. " "%6$s parameeter antakse %7$s, nii et ta on tüpograafia valikutüübi ID. See " "võimaldab lisada veebis kasutamiseks sobilikke fonte erinevatele fondi " "perekondadele vastavalt vajadusele." #: ../includes/ot-functions-docs-page.php:175 #, php-format msgid "" "The JavaScript option type is a textarea that uses the %s code editor to " "highlight your JavaScript and display errors as you type." msgstr "" "JavaScript valikutüüp on tekstiväli, mis kasutab %s koodi redaktorit sinu " "kirjutatava JavaScripti süntaksi esile toomiseks ning vigade näitamiseks " "kirjutamise ajal." #: ../includes/ot-functions-docs-page.php:178 msgid "The Link Color option type is used to set all link color states." msgstr "" "Lingi värvi valikutüüpi kasutatakse kõikide linkide värviolekute määramiseks." #: ../includes/ot-functions-docs-page.php:181 msgid "" "The List Item option type replaced the Slider option type and allows for a " "great deal of customization. You can add settings to the List Item and those " "settings will be displayed to the user when they add a new List Item. " "Typical use is for creating sliding content or blocks of code for custom " "layouts." msgstr "" "Nimekirja valikutüüp vahetas välja slaidiesitaja valikutüübi ning võimaldab " "põhjalikku kohandamist. Nimekirja elementidele saab lisada sätteid, mida " "näidatakse kasutajale uue elemendi lisamisel. Tüüpiline kasutusjuht on " "liugleva sisu või koodiblokkide loomiseks." #: ../includes/ot-functions-docs-page.php:184 #, php-format msgid "" "The Measurement option type is a mix of input and select fields. The text " "input excepts a value and the select lets you choose the unit of measurement " "to add to that value. Currently the default units are %s, %s, %s, and %s. " "However, you can change them with the %s filter." msgstr "" "Mõõdu valikutüüp on segu sisendväljast ja valikuväljast. Tekstisisend eeldab " "väärtust ning rippvalik laseb valida mõõduühiku sellele väärtusele. Hetkel " "on vaikimisi ühikuteks %s, %s, %s ja %s. Neid saab muuta %s filtriga." #: ../includes/ot-functions-docs-page.php:186 #, php-format msgid "" "Example filter to add new units to the Measurement option type. Added to %s." msgstr "Näidisfilter mõõdu valikutüüpi ühikute lisamiseks. Lisatakse %s faili." #: ../includes/ot-functions-docs-page.php:199 msgid "" "Example filter to completely change the units in the Measurement option " "type. Added to <code>functions.php</code>." msgstr "" "Näidisfilter, mis muudab mõõdu valikutüübi ühikud täiesti teistsugusteks. " "Lisatakse <code>functions.php</code> faili." #: ../includes/ot-functions-docs-page.php:215 msgid "" "The Numeric Slider option type displays a jQuery UI slider. It will return a " "single numerical value for use in a custom function or loop." msgstr "" "Numbriliuguri valikutüüp kuvab jQuery UI liuguri. See tagastab ühe " "numbrilise väärtuse enda funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:218 #, php-format msgid "" "The On/Off option type displays a simple switch that can be used to turn " "things on or off. The saved return value is either %s or %s." msgstr "" "Sees/väljas valikutüüp kuvab lihtsa lüliti, millega saab asju sisse või " "välja lülitada. Salvestatud väärtus on kas %s või %s." #: ../includes/ot-functions-docs-page.php:221 msgid "" "The Page Checkbox option type displays a list of page IDs. It allows the " "user to check multiple page IDs for use in a custom function or loop." msgstr "" "Lehe valikkastide valikutüüp kuvab nimekirja kõikidest lehtede ID-dest. See " "võimaldab kasutajal märgistada mitu lehe ID-d, mida kasutada enda " "funktsioonis või tsüklis." #: ../includes/ot-functions-docs-page.php:224 msgid "" "The Page Select option type displays a list of page IDs. It will return a " "single page ID for use in a custom function or loop." msgstr "" "Lehe rippvaliku valikutüüp kuvab nimekirja kõikidest lehtede ID-dest. See " "tagastab ühe lehe ID, mida kasutada enda funktsioonis või tsüklis." #: ../includes/ot-functions-docs-page.php:227 msgid "" "The Post Checkbox option type displays a list of post IDs. It allows the " "user to check multiple post IDs for use in a custom function or loop." msgstr "" "Postituse valikkastid valikutüüp kuvab nimekirja kõikidest postituste ID-" "dest. See võimaldab kasutajal märgistada mitu postituse ID-d, mida kasutada " "enda funktsioonis või tsüklis." #: ../includes/ot-functions-docs-page.php:230 msgid "" "The Post Select option type displays a list of post IDs. It will return a " "single post ID for use in a custom function or loop." msgstr "" "Postituse rippvaliku valikutüüp kuvab nimekirja kõikidest postituste ID-" "dest. See tagastab ühe postituse ID, mida kasutada enda funktsioonis või " "tsüklis." #: ../includes/ot-functions-docs-page.php:233 msgid "" "The Radio option type displays a group of choices. It allows the user to " "choose one and will return that value as a string for use in a custom " "function or loop." msgstr "" "Raadiovaliku valikutüüp näitab valikute gruppi. See laseb kasutajal valida " "neist ühe ning tagastab selle väärtuse string-ina enda funktsioonis või " "tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:236 #, php-format msgid "" "the Radio Images option type is primarily used for layouts. However, you can " "filter the image list using %s. As well, you can add your own custom images " "using the choices array." msgstr "" "Piltidega raadiovaliku valikutüüpi kasutatakse peamiselt paigutuste jaoks. " "Piltide loendit saab filtreerida %s abil. Valikute massiivi saab lisada enda " "pilte." #: ../includes/ot-functions-docs-page.php:238 msgid "" "This example executes the <code>ot_radio_images</code> filter on layout " "images attached to the <code>my_radio_images</code> field. Added to " "<code>functions.php</code>." msgstr "" "See näide käivitab <code>ot_radio_images</code> filtri " "<code>my_radio_images</code> väljale lisatud paigutuse piltidel. Lisatakse " "<code>functions.php</code> faili." #: ../includes/ot-functions-docs-page.php:263 msgid "" "The Select option type is used to list anything you want that would be " "chosen from a select list." msgstr "" "Rippvaliku valikutüüpi saab kasutada ükskõik mille loendamiseks, mida saab " "valida rippmenüüst." #: ../includes/ot-functions-docs-page.php:266 #, php-format msgid "" "This option type makes it possible for users to select a WordPress " "registered sidebar to use on a specific area. By using the two provided " "filters, %s, and %s we can be selective about which sidebars are available " "on a specific content area." msgstr "" "See valikutüüp võimaldab kasutajatel valida WordPressis registreeritud " "küljeriba, kasutamaks seda kindlas kohas. Kahe kaasa antud filtri, %s ja %s " "abil saab määrata, millist küljeriba millises sisuosas näidata." #: ../includes/ot-functions-docs-page.php:267 #, php-format msgid "" "For example, if we create a WordPress theme that provides the ability to " "change the Blog Sidebar and we don't want to have the footer sidebars " "available on this area, we can unset those sidebars either manually or by " "using a regular expression if we have a common name like %s." msgstr "" "Näiteks kui luua WordPressi teema, mis võimaldab muuta blogi küljeriba ning " "me ei soovi siin alas näha jaluse küljeribasid, siis saame need küljeribad " "ära võtta kas käsitsi või kasutades regulaaravaldist, nagu näiteks %s." #: ../includes/ot-functions-docs-page.php:270 msgid "" "The Slider option type is technically deprecated. Use the List Item option " "type instead, as it's infinitely more customizable. Typical use is for " "creating sliding image content." msgstr "" "Tehniliselt on slaidiesitaja valikutüübi kasutamine taunitud. Kasutage parem " "nimekirja elemendi valikutüüpi, kuna see on lõpmatult kohandatav. Tüüpiline " "kasutusjuht on libisevate piltidega sisu jaoks." #: ../includes/ot-functions-docs-page.php:273 #, php-format msgid "" "The Social Links option type utilizes a drag & drop interface to create a " "list of social links. There are a few filters that make extending this " "option type easy. You can set the %s filter to %s and turn off loading " "default values. Use the %s filter to change the default values that are " "loaded. To filter the settings array use the %s filter." msgstr "" "Sotsiaalmeedia linkide valikutüübis kasutatakse nimekirja loomiseks tiri-ja-" "pilla liidest. On loodud mõned filtrid, mis teevad selle valikutüübi " "täiendamise kergeks. Filter %s väärtuseks saab määrata %s, et lülitada välja " "vaikimisi väärtuste laadimine. %s filtriga saab muuta vaikeväärtuseid. " "Sätete massiivi filtreerimiseks on %s." #: ../includes/ot-functions-docs-page.php:276 #, php-format msgid "" "The Spacing option type is used to set spacing values such as padding or " "margin in the form of top, right, bottom, and left. The text inputs except " "numerical values and the select lets you choose the unit of measurement to " "add to that value. Currently the default units are %s, %s, %s, and %s. " "However, you can change them with the %s filter." msgstr "" "Vahede valikutüüpi kasutatakse \"padding\" ja \"margin\" väärtuste jaoks " "kujul \"top\", \"right\", \"bottom\", \"left\". Tekstisisendisse saab " "kirjutada numbrilise väärtuse ning rippmenüü laseb valida talle mõõtühiku. " "Hetkel on vaikimisi ühikuteks %s, %s, %s ja %s. Neid saab muuta %s filtriga." #: ../includes/ot-functions-docs-page.php:279 msgid "" "The Tab option type will break a section or metabox into tabbed content." msgstr "" "Saki valikutüüp muudab sektsiooni või meta-kasti sakkidega sisuelemendiks." #: ../includes/ot-functions-docs-page.php:282 msgid "" "The Tag Checkbox option type displays a list of tag IDs. It allows the user " "to check multiple tag IDs and will return that value as an array for use in " "a custom function or loop." msgstr "" "Sildi valikukasti valikutüüp kuvab loendi siltide ID-dega. See laseb " "kasutajal märkida mitu sildi ID-d ning tagastab selle väärtuse massiivina " "enda funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:285 msgid "" "The Tag Select option type displays a list of tag IDs. It allows the user to " "select only one tag ID and will return that value for use in a custom " "function or loop." msgstr "" "Sildi rippvaliku valikutüüp kuvab loendi siltide ID-dega. See laseb " "kasutajal märkida ainult ühe sildi ID ning tagastab selle väärtuse enda " "funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:288 msgid "" "The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows " "the user to check multiple taxonomy IDs and will return that value as an " "array for use in a custom function or loop." msgstr "" "Taksonoomia valikukasti valikutüüp kuvab loendi taksonoomiate ID-dega. See " "laseb kasutajal märkida mitu taksonoomia ID-d ning tagastab selle väärtuse " "massiivina enda funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:291 msgid "" "The Taxonomy Select option type displays a list of taxonomy IDs. It allows " "the user to select only one taxonomy ID and will return that value for use " "in a custom function or loop." msgstr "" "Taksonoomia rippvaliku valikutüüp kuvab loendi taksonoomiate ID-dega. See " "laseb kasutajal märkida ainult ühe taksonoomia ID ning tagastab selle " "väärtuse enda funktsioonis või tsüklis kasutamiseks." #: ../includes/ot-functions-docs-page.php:294 msgid "" "The Text option type is used to save string values. For example, any " "optional or required text that is of reasonably short character length." msgstr "" "Teksti valikutüüpi kasutatakse väärtuste salvestamiseks stringi kujul. " "Näiteks mõni valikuline või nõutud tekst, mis on piisavalt lühike." #: ../includes/ot-functions-docs-page.php:297 #, php-format msgid "" "The Textarea option type is a large string value used for custom code or " "text in the theme and has a WYSIWYG editor that can be filtered to change " "the how it is displayed. For example, you can filter %s, %s, %s, and %s." msgstr "" "Tekstivälja valikutüüp on suur väärtus stringi kujul salvestamiseks, millel " "on WYSIWYG toimetaja, mida saab filtreerida muutmaks tema kuvamist. Näiteks " "saab filtreerida %s, %s, %s ja %s." #: ../includes/ot-functions-docs-page.php:299 msgid "" "Example filters to alter the Textarea option type. Added to <code>functions." "php</code>." msgstr "" "Näidisfiltrid, millega muuta tekstivälja valikutüüpi. Lisatakse " "<code>functions.php</code> faili." #: ../includes/ot-functions-docs-page.php:301 msgid "" "This example keeps WordPress from executing the <code>wpautop</code> filter " "on the line breaks. The default is <code>true</code> which means it wraps " "line breaks with an HTML <code>p</code> tag." msgstr "" "See näide takistab Wordpressil kasutada <code>wpautop</code> filtrit " "reavahetustel. Vaikeväärtus on <code>true</code>, mis tähendab, et " "reavahtused mähitakse HTML <code>p</code> elemendiga." #: ../includes/ot-functions-docs-page.php:314 msgid "" "This example keeps WordPress from executing the <code>media_buttons</code> " "filter on the textarea WYSIWYG. The default is <code>true</code> which means " "show the buttons." msgstr "" "See näide takistab Wordpressil kasutada <code>media_buttons</code> filtrit " "tekstivälja WYSIWYG toimetajas. Vaikeväärtus on <code>true</code>, mis " "tähendab, et nuppe näidatakse." #: ../includes/ot-functions-docs-page.php:327 msgid "" "This example keeps WordPress from executing the <code>tinymce</code> filter " "on the textarea WYSIWYG. The default is <code>true</code> which means show " "the tinymce." msgstr "" "See näide takistab Wordpressil kasutada <code>tinymce</code> filtrit " "tekstivälja WYSIWYG toimetajas. Vaikeväärtus on <code>true</code>, mis " "tähendab, et tinymce on nähtaval." #: ../includes/ot-functions-docs-page.php:340 msgid "" "This example alters the <code>quicktags</code> filter on the textarea " "WYSIWYG. The default is <code>array( 'buttons' => 'strong,em,link,block,del," "ins,img,ul,ol,li,code,spell,close' )</code> which means show those " "quicktags. It also means you can filter in your own custom quicktags." msgstr "" "See näide muudab <code>quicktags</code> filtrit tekstivälja WYSIWYG " "toimetajas. Vaikeväärtus on <code>array('buttons' => 'strong,em,link,block," "del,ins,img,ul,ol,li,code,spell,close')</code>, mis tähendab, et neid " "elemente näidatakse. Siitkaudu saad kaasata endale sobivaid elemente." #: ../includes/ot-functions-docs-page.php:356 msgid "" "The Textarea Simple option type is a large string value used for custom code " "or text in the theme. The Textarea Simple does not have a WYSIWYG editor." msgstr "" "Lihtsa tekstivälja valikutüüp on suur string-tüüpi väärtus teemas oleva " "kohandatud koodi või teksti jaoks. Lihtsal tekstiväljal ei ole WYSIWYG " "toimetajat." #: ../includes/ot-functions-docs-page.php:358 #, php-format msgid "" "This example tells WordPress to execute the %s filter on the line breaks. " "The default is %s which means it does not wraps line breaks with an HTML %s " "tag. Added to %s." msgstr "" "See näide ütleb Wordpressile, et reavahetuste korral kasutada %s filtrit. " "Vaikeväärtus on %s, mis tähendab, et reavahetusi ei mähita HTML %s " "elemendiga. Lisatakse %s faili." #: ../includes/ot-functions-docs-page.php:372 msgid "" "The Textblock option type is used only on the Theme Option page. It will " "allow you to create & display HTML, but has no title above the text block. " "You can then use the Textblock to add a more detailed set of instruction on " "how the options are used in your theme. You would never use this in your " "themes template files as it does not save a value." msgstr "" "Tekstibloki valikutüüpi kasutatakse teema valikute lehel. See võimaldab luua " "ja kuvada HTML-i, kuid tal puudub pealkiri. Sellega saab lisada detailsemaid " "kirjeldusi teemas kasutatavate valikute jaoks. Seda ei kasutata teema " "mallifailides, kuna ta ei salvesta mingit väärtust." #: ../includes/ot-functions-docs-page.php:375 msgid "" "The Textblock Titled option type is used only on the Theme Option page. It " "will allow you to create & display HTML, and has a title above the text " "block. You can then use the Textblock Titled to add a more detailed set of " "instruction on how the options are used in your theme. You would never use " "this in your themes template files as it does not save a value." msgstr "" "Pealkirjaga tekstibloki valikutüüpi kasutatakse teema valikute lehel. See " "võimaldab luua ja kuvada HTML-i ning tema kohal on pealkiri. Sellega saab " "lisada detailsemaid kirjeldusi teemas kasutatavate valikute jaoks. Seda ei " "kasutata teema mallifailides, kuna ta ei salvesta mingit väärtust." #: ../includes/ot-functions-docs-page.php:378 #, php-format msgid "" "The Typography option type is for adding typography styles to your theme " "either dynamically via the CSS option type above or manually with %s. The " "Typography option type has filters that allow you to remove fields or change " "the defaults. For example, you can filter %s to remove unwanted fields from " "all Background options or an individual one. You can also filter %s. These " "filters allow you to fine tune the select lists for your specific needs." msgstr "" "Tüpograafia valikutüübiga saab teemale lisada stiile, kas dünaamiliselt ülal " "oleva CSS valikutüübiga või käsitsi %s abil. Tüpograafia valikutüübil on " "filtrid, mis lasevad välju eemaldada või vaikimisi välju muuta. Näiteks saab " "filtreerida %s, eemaldamaks soovimatuid välju kõikidelt tausta valikutelt " "või mõnelt neist. Saab filtreerida ka %s. Need filtrid aitavad valikute " "nimekirja täpselt oma vajaduste järgi häälestada." #: ../includes/ot-functions-docs-page.php:380 msgid "" "This example would filter <code>ot_recognized_font_families</code> to build " "your own font stack. Added to <code>functions.php</code>." msgstr "" "See näide filtreerib <code>ot_recognized_font_families</code> loomaks enda " "fondipinu. Lisatakse <code>functions.php</code> faili." #: ../includes/ot-functions-docs-page.php:398 #, php-format msgid "" "The Upload option type is used to upload any WordPress supported media. " "After uploading, users are required to press the \"%s\" button in order to " "populate the input with the URI of that media. There is one caveat of this " "feature. If you import the theme options and have uploaded media on one site " "the old URI will not reflect the URI of your new site. You will have to re-" "upload or %s any media to your new server and change the URIs if necessary." msgstr "" "Üleslaadimise valikutüüp kasutatakse suvalise Wordpressi toetatava meedia " "üles laadimiseks. Peale üleslaadimist peab kasutaja vajutama \"%s\" nuppu, " "et täita sisend selle meediaelemendi URI-ga. Selle omadusega kaasneb üks " "probleem - kui importida teema valikuid teistsuguse aadressiga veebilehelt, " "siis URI-d automaatselt ei uuene. Meediafailid tuleb kas uuesti üles laadida " "või %s, vajadusel muutes URI-sid." #: ../includes/ot-functions-docs-page.php:430 msgid "" "This function returns a value from the \"option_tree\" array of saved values " "or the default value supplied. The returned value would be mixed. Meaning it " "could be a string, integer, boolean, or array." msgstr "" "See funktsioon tagastab või vajadusel trükib väärtuse \"option_tree\" " "massiivi salvestatud väärtustest või kaasaantud vaikeväärtuse. Tagastatud " "väärtus tüüp on segunenud. See tähendab, et ta võib olla string, integer, " "boolean või massiiv." #: ../includes/ot-functions-docs-page.php:432 #: ../includes/ot-functions-docs-page.php:482 msgid "Usage" msgstr "Kasutus" #: ../includes/ot-functions-docs-page.php:436 #: ../includes/ot-functions-docs-page.php:486 msgid "Parameters" msgstr "Parameetrid" #: ../includes/ot-functions-docs-page.php:440 #: ../includes/ot-functions-docs-page.php:444 #: ../includes/ot-functions-docs-page.php:490 msgid "string" msgstr "string" #: ../includes/ot-functions-docs-page.php:440 #: ../includes/ot-functions-docs-page.php:490 msgid "required" msgstr "nõutud" #: ../includes/ot-functions-docs-page.php:440 msgid "Enter the options unique identifier." msgstr "Sisesta valikule unikaalne identifikaator." #: ../includes/ot-functions-docs-page.php:440 #: ../includes/ot-functions-docs-page.php:490 msgid "Default:" msgstr "Vaikimisi:" #: ../includes/ot-functions-docs-page.php:440 #: ../includes/ot-functions-docs-page.php:444 #: ../includes/ot-functions-docs-page.php:490 #: ../includes/ot-functions-docs-page.php:494 msgid "None" msgstr "Puudub" #: ../includes/ot-functions-docs-page.php:444 #: ../includes/ot-functions-docs-page.php:494 #: ../includes/ot-functions-docs-page.php:498 #: ../includes/ot-functions-docs-page.php:502 #: ../includes/ot-functions-docs-page.php:506 msgid "optional" msgstr "valikuline" #: ../includes/ot-functions-docs-page.php:444 msgid "" "Enter a default return value. This is just incase the request returns null." msgstr "Sisesta vaikeväärtus. See on vajalik juhul, kui päring tagastab nulli." #: ../includes/ot-functions-docs-page.php:444 #: ../includes/ot-functions-docs-page.php:494 #: ../includes/ot-functions-docs-page.php:498 #: ../includes/ot-functions-docs-page.php:502 #: ../includes/ot-functions-docs-page.php:506 msgid "Default" msgstr "Vaikimisi" #: ../includes/ot-functions-docs-page.php:474 msgid "" "This function has been deprecated. That means it has been replaced by a new " "function or is no longer supported, and may be removed from future versions. " "All code that uses this function should be converted to use its replacement." msgstr "" "Selle funktsiooni kasutamist taunitakse. See tähendab, et ta on asendatud " "uue funktsiooniga või teda ei toetata enam ning ta võidakse tulevastest " "versioonidest välja jätta. Kõik seda funktsiooni kasutav kood tuleks ümber " "muuta kasutamaks tema asendust." #: ../includes/ot-functions-docs-page.php:476 msgid "Use" msgstr "Kasuta" #: ../includes/ot-functions-docs-page.php:476 msgid "instead" msgstr "asemel" #: ../includes/ot-functions-docs-page.php:480 msgid "" "This function returns, or echos if asked, a value from the \"option_tree\" " "array of saved values." msgstr "" "See funktsioon tagastab või vajadusel trükib väärtuse \"option_tree\" " "massiivi salvestatud väärtustest." #: ../includes/ot-functions-docs-page.php:490 msgid "Enter a unique Option Key to get a returned value or array." msgstr "Sisesta unikaalne valiku võti saamaks väärtust või massiivi." #: ../includes/ot-functions-docs-page.php:494 msgid "array" msgstr "array" #: ../includes/ot-functions-docs-page.php:494 msgid "Used to cut down on database queries in template files." msgstr "Kasutatakse andmebaasi päringute vähendamiseks mallifailides." #: ../includes/ot-functions-docs-page.php:498 #: ../includes/ot-functions-docs-page.php:502 msgid "boolean" msgstr "boolean" #: ../includes/ot-functions-docs-page.php:498 msgid "Echo the output." msgstr "Trüki väljund." #: ../includes/ot-functions-docs-page.php:502 msgid "Used to indicate the $item_id is an array of values." msgstr "Kasutatakse märkimaks, et $item_id on väärtuste massiiv." #: ../includes/ot-functions-docs-page.php:506 msgid "integer" msgstr "integer" #: ../includes/ot-functions-docs-page.php:506 msgid "" "Numeric offset key for the $item_id array, -1 will return all values (an " "array starts at 0)." msgstr "" "Numbriline nihkevõti $item_id massiivi jaoks, -1 tagastab kõik väärtused " "( massiiv algab 0-st )." #: ../includes/ot-functions-docs-page.php:534 msgid "" "If you're using the plugin version of OptionTree it is highly recommended to " "include a <code>function_exists</code> check in your code, as described in " "the examples below. If you've integrated OptionTree directly into your " "themes root directory, you will <strong>not</strong> need to wrap your code " "with <code>function_exists</code>, as you're guaranteed to have the " "<code>ot_get_option()</code> function available." msgstr "" "Kui kasutate OptionTree mooduli versiooni, siis on soovitatav oma koodi " "lisada <code>function_exists</code> kontroll, nagu kirjeldatud allpool " "toodud näidetes. Kui olete OptionTree otse oma teema juurkataloogi sisse " "ehitanud, siis teil <strong>ei ole</strong> vaja mähkida oma koodi " "<code>function_exists</code> kontrolliga, sest teil on " "<code>ot_get_option()</code> funktsiooni saadavus garanteeritud." #: ../includes/ot-functions-docs-page.php:536 msgid "String Examples" msgstr "<em>String-i</em> näited" #: ../includes/ot-functions-docs-page.php:538 msgid "Returns the value of <code>test_input</code>." msgstr "Tagastab <code>test_input</code> väärtuse." #: ../includes/ot-functions-docs-page.php:544 msgid "" "Returns the value of <code>test_input</code>, but also has a default value " "if it returns empty." msgstr "" "Tagastab <code>test_input</code> väärtuse või vaikeväärtuse, kui tagastatud " "väärtus on tühi." #: ../includes/ot-functions-docs-page.php:550 msgid "Array Examples" msgstr "<em>Array</em> näited" #: ../includes/ot-functions-docs-page.php:552 msgid "" "Assigns the value of <code>navigation_ids</code> to the variable <code>$ids</" "code>. It then echos an unordered list of links (navigation) using " "<code>wp_list_pages()</code>." msgstr "" "Omistab <code>navigation_ids</code> väärtuse <code>$ids</code> muutujale. " "See trükib välja järjestamata loetelu ( navigatsiooni ) linkidest, kasutades " "<code>wp_list_pages()</code>." #: ../includes/ot-functions-docs-page.php:572 msgid "" "The next two examples demonstrate how to use the <strong>Measurement</" "strong> option type. The Measurement option type is an array with two key/" "value pairs. The first is the value of measurement and the second is the " "unit of measurement." msgstr "" "Järgnevad kaks näidet demonstreerivad, kuidas kasutada <strong>mõõdu</" "strong> valikutüüpi. Mõõdu valikutüüp on massiiv kahe võti-väärtus paariga. " "Esimene on mõõdu väärtus ning teine on mõõduühik." #: ../includes/ot-functions-docs-page.php:598 msgid "This example displays a very basic slider loop." msgstr "See näide kuvab väga algelise slaidi esitleja tsükli." #: ../includes/ot-functions-docs-page.php:643 msgid "It's Super Simple" msgstr "See on imelihtne" #: ../includes/ot-functions-docs-page.php:645 msgid "" "Layouts make your theme awesome! With theme options data that you can save/" "import/export you can package themes with different color variations, or " "make it easy to do A/B testing on text and so much more. Basically, you save " "a snapshot of your data as a layout." msgstr "" "Paigutused teevad su teema aukartust äratavaks! Teema valikute infoga, mida " "saad salvestada/importida/eksportida, saad pakendada teemasid erinevate " "värvivariatsioonidega või kergelt teostada A/B testimist tekstiosadel ning " "palju muud. Põhimõtteliselt on paigutus sinu andmete ülesvõtte salvestus." #: ../includes/ot-functions-docs-page.php:647 msgid "" "Once you have created all your different layouts, or theme variations, you " "can save them to a separate text file for repackaging with your theme. " "Alternatively, you could just make different variations for yourself and " "change your theme with the click of a button, all without deleting your " "previous options data." msgstr "" "Peale kõikide erinevate paigutuste või teema variatsioonide loomist saab nad " "salvestada eraldi tekstifaili, mida teemaga kaasa pakendada. Teine " "kasutusviis oleks teha enda jaoks erinevad variatsioonid ja muuta oma teemat " "ainsa nupuvajutusega, ilma eelnevate andmete kustutamiseta." #: ../includes/ot-functions-docs-page.php:649 msgid "" " Adding a layout is ridiculously easy, follow these steps and you'll be on " "your way to having a WordPress super theme." msgstr "" "Paigutuse lisamine on naeruväärselt lihtne. Järgi neid samme ning oled teel " "WordPressi superteema omamisele." #: ../includes/ot-functions-docs-page.php:651 msgid "For Developers" msgstr "Arendajatele" #: ../includes/ot-functions-docs-page.php:653 #: ../includes/ot-functions-docs-page.php:682 msgid "Creating a Layout" msgstr "Paigutuse loomine" #: ../includes/ot-functions-docs-page.php:655 #: ../includes/ot-functions-docs-page.php:662 #: ../includes/ot-functions-docs-page.php:668 msgid "Go to the <code>OptionTre->Settings->Layouts</code> tab." msgstr "Mine <code>OptionTree->Sätted->Paigutused</code> sakile." #: ../includes/ot-functions-docs-page.php:656 msgid "" "Enter a name for your layout in the text field and hit \"Save Layouts\", " "you've created your first layout." msgstr "" "Sisesta tekstivälja oma paigutuse nimi ja vajuta \"Salvesta paigutused\" " "nuppu. Oled loonud oma esimese paigutuse." #: ../includes/ot-functions-docs-page.php:657 #: ../includes/ot-functions-docs-page.php:686 msgid "Adding a new layout is as easy as repeating the steps above." msgstr "Uue paigutuse lisamine on lihtne, kui järgid ülaltoodud samme." #: ../includes/ot-functions-docs-page.php:660 #: ../includes/ot-functions-docs-page.php:689 msgid "Activating a Layout" msgstr "Paigutuse aktiveerimine" #: ../includes/ot-functions-docs-page.php:663 msgid "Click on the activate layout button in the actions list." msgstr "Vajuta paigutuse aktiveerimise nupul tegevuste nimekirjas." #: ../includes/ot-functions-docs-page.php:666 #: ../includes/ot-functions-docs-page.php:695 msgid "Deleting a Layout" msgstr "Paigutuse kustutamine" #: ../includes/ot-functions-docs-page.php:669 msgid "Click on the delete layout button in the actions list." msgstr "Vajuta paigutuse kustutamise nupul tegevuste nimekirjas." #: ../includes/ot-functions-docs-page.php:672 #: ../includes/ot-functions-docs-page.php:700 msgid "Edit Layout Data" msgstr "Muuda paigutuse andmeid" #: ../includes/ot-functions-docs-page.php:674 #: ../includes/ot-functions-docs-page.php:684 #: ../includes/ot-functions-docs-page.php:691 msgid "Go to the <code>Appearance->Theme Options</code> page." msgstr "Mine <code>Välimus->Teema valikud</code> lehele." #: ../includes/ot-functions-docs-page.php:675 #: ../includes/ot-functions-docs-page.php:703 msgid "" "Modify and save your theme options and the layout will be updated " "automatically." msgstr "" "Muuda ja salvesta oma teema valikuid ning paigutust uuendatakse automaatselt." #: ../includes/ot-functions-docs-page.php:676 #: ../includes/ot-functions-docs-page.php:704 msgid "" "Saving theme options data will update the currently active layout, so before " "you start saving make sure you want to modify the current layout." msgstr "" "Teema valikute andmete salvestamine uuendab hetkel aktiivset paigutust, " "seega enne salvestamist veendu, et soovid muuta hetkel kasutuses olevat " "paigutust." #: ../includes/ot-functions-docs-page.php:677 msgid "" "If you want to edit a new layout, first create it then save your theme " "options." msgstr "" "Kui soovid muuta uut paigutust, tuleb see kõigepealt luua ja seejärel teema " "valikud salvestada." #: ../includes/ot-functions-docs-page.php:680 msgid "End-Users Mode" msgstr "Lõppkasutaja režiim" #: ../includes/ot-functions-docs-page.php:685 msgid "" "Enter a name for your layout in the text field and hit \"New Layout\", " "you've created your first layout." msgstr "" "Sisesta tekstivälja oma uue paigutuse nimi ja vajuta nuppu \"Uus paigutus\". " "Oled loonud oma esimese paigutuse." #: ../includes/ot-functions-docs-page.php:692 msgid "" "Choose a layout from the select list and click the \"Activate Layout\" " "button." msgstr "Vali rippmenüüst paigutus ja vajuta \"Aktiveeri paigutus\" nuppu." #: ../includes/ot-functions-docs-page.php:697 msgid "End-Users mode does not allow deleting layouts." msgstr "Lõppkasutaja režiim ei luba paigutusi kustutada." #: ../includes/ot-functions-docs-page.php:702 msgid "Go to the <code>Appearance->Theme Options</code> tab." msgstr "Mine <code>Välimus->Teema valikud</code> sakile." #: ../includes/ot-functions-docs-page.php:733 #: ../includes/ot-functions-docs-page.php:815 msgid "How-to-guide" msgstr "Õpetus" #: ../includes/ot-functions-docs-page.php:735 msgid "" "There are a few simple steps you need to take in order to use OptionTree's " "built in Meta Box API. In the code below I'll show you a basic demo of how " "to create your very own custom meta box using any number of the option types " "you have at your disposal. If you would like to see some demo code, there is " "a directory named <code>theme-mode</code> inside the <code>assets</code> " "directory that contains a file named <code>demo-meta-boxes.php</code> you " "can reference." msgstr "" "OptionTreele sisse ehitatud Meta Box API kasutamiseks on vaja paari lihtsat " "toimingut. Allolevas koodis demonstreeritakse meta kasti loomist suvalise " "hulga saadaolevate valikutüüpidega. Koodinäiteid leiab ka failist <code>demo-" "meta-boxes.php</code>, mis asub kaustas <code>theme-mode</code>, mis " "omakorda asub kaustas <code>assets</code>." #: ../includes/ot-functions-docs-page.php:737 msgid "" "It's important to note that Meta Boxes do not support WYSIWYG editors at " "this time and if you set one of your options to Textarea it will " "automatically revert to a Textarea Simple until a valid solution is found. " "WordPress released this statement regarding the wp_editor() function:" msgstr "" "Tähtis märkus: meta kastid ei toeta hetkel WYSIWYG redaktoreid. Kui määrata " "mõne valiku tüübiks tekstiala, muudetakse see automaatselt lihtsustatud " "tekstialaks, kuni leitakse töötav lahendus. Wordpress väljastas järgneva " "teadaande wp_editor() funktsiooni kohta:" #: ../includes/ot-functions-docs-page.php:739 msgid "" "Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. " "What this means in practical terms, is that you cannot put it in meta-boxes " "that can be dragged and placed elsewhere on the page." msgstr "" "Korra loodud WYSIWYG toimetajat ei saa DOM-is ringi liigutada. Praktikas " "tähendab see, et teda ei saa panna meta-kastidesse, mida on võimalik " "leheküljel ringi liigutada." #: ../includes/ot-functions-docs-page.php:741 msgid "Create and include your custom meta boxes file." msgstr "Loo ja kaasa oma kohandatud meta kastide fail." #: ../includes/ot-functions-docs-page.php:743 msgid "" "Create a file and name it anything you want, maybe <code>meta-boxes.php</" "code>." msgstr "" "Loo fail ja anna talle meelepärane nimi, näiteks <code>meta-boxes.php</code>." #: ../includes/ot-functions-docs-page.php:744 msgid "" "As well, you'll probably want to create a directory named <code>includes</" "code> to put your <code>meta-boxes.php</code> into which will help keep you " "file structure nice and tidy." msgstr "" "Tõenäoliselt soovid luua kausta nimega <code>includes</code>, kuhu panna oma " "<code>meta-boxes.php</code> fail, hoidmaks oma failistruktuuri ilusa ja " "puhtana." #: ../includes/ot-functions-docs-page.php:745 #: ../includes/ot-functions-docs-page.php:845 msgid "Add the following code to your <code>functions.php</code>." msgstr "Lisa järgnev kood oma <code>functions.php</code> faili." #: ../includes/ot-functions-docs-page.php:755 msgid "" "Add a variation of the following code to your <code>meta-boxes.php</code>. " "You'll obviously need to fill it in with all your custom array values. It's " "important to note here that we use the <code>admin_init</code> filter " "because if you were to call the <code>ot_register_meta_box</code> function " "before OptionTree was loaded the sky would fall on your head." msgstr "" "Lisa variatsioon järgnevast koodist oma <code>meta-boxes.php</code> faili. " "Loomulikult tuleb see täita enda kohandatud massiivi väärtustega. Oluline " "märkus: kasutame <code>admin_init</code> filtrit, sest kui kutsuda " "<code>ot_register_meta_box</code> funktsiooni enne OptionTree laadimist, " "kukuks taevas kaela." #: ../includes/ot-functions-docs-page.php:817 msgid "" "There are a few simple steps you need to take in order to use OptionTree as " "a theme included module. In the code below I'll show you a basic demo of how " "to include the entire plugin as a module, which will allow you to have the " "most up-to-date version of OptionTree without ever needing to hack the core " "of the plugin. If you would like to see some demo code, there is a directory " "named <code>theme-mode</code> inside the <code>assets</code> directory that " "contains a file named <code>demo-theme-options.php</code> you can reference." msgstr "" "Paari lihtsa sammuga saab Optiontreed kasutada teemasse kaasatud moodulina. " "Allolevas koodis näidatakse lihtsat demonstratsiooni, kuidas kaasata terve " "moodul moodulina. Sellisel moel on sul kõige uuem versioon OptionTreest, " "ilma et peaks mooduli tuuma häkkima. Näidiskoodi leiab failist <code>demo-" "theme-options.php</code>, mis asub kaustas <code>theme-mode</code>, mis " "omakorda asub kaustas <code>assets</code>." #: ../includes/ot-functions-docs-page.php:819 msgid "Step 1: Include the plugin & turn on theme mode." msgstr "Samm 1: kaasa moodul ja lülita sisse teemarežiim." #: ../includes/ot-functions-docs-page.php:821 #, php-format msgid "Download the latest version of %s and unarchive the %s directory." msgstr "Lae alla viimane %s versioon ja paki ta lahti %s kausta." #: ../includes/ot-functions-docs-page.php:822 #, php-format msgid "" "Put the %s directory in the root of your theme. For example, the server path " "would be %s." msgstr "Pane %s kaust oma teema juurkausta. Serveri rada oleks näiteks %s." #: ../includes/ot-functions-docs-page.php:823 #, php-format msgid "Add the following code to the beginning of your %s." msgstr "Lisa järgnev kood oma %s algusesse." #: ../includes/ot-functions-docs-page.php:837 #, php-format msgid "" "For a list of all the OptionTree UI display filters refer to the %s file " "found in the %s directory of this plugin. This file is the starting point " "for developing themes with Theme Mode." msgstr "" "Täieliku OptionTree UI kuvamise filtrite nimekirja leiad selle plugina %s " "failist %s kaustast. See fail on teemarežiimis teemade arenduse " "alguspunktiks." #: ../includes/ot-functions-docs-page.php:839 msgid "" "You now have OptionTree built into your theme and anytime an update is " "available replace the old version with the new one." msgstr "" "Sul on nüüd OptionTree teemasse sisse ehitatud. Iga kord, kui saadaval on " "uus versioon, vaheta oma vana versioon uue vastu välja." #: ../includes/ot-functions-docs-page.php:841 msgid "Step 2: Create Theme Options without using the UI Builder." msgstr "Samm 2: loo teema valikud ilma UI ehitajata." #: ../includes/ot-functions-docs-page.php:843 msgid "" "Create a file and name it anything you want, maybe <code>theme-options.php</" "code>, or use the built in file export to create it for you. Remember, you " "should always check the file for errors before including it in your theme." msgstr "" "Loo fail ja anna talle suvaline nimi, näiteks <code>theme-options.php</" "code>, või kasuta selle loomiseks sisse ehitatud faili eksporti. Enne teemas " "kasutamist tuleks failile kindlasti vigade kontroll teha." #: ../includes/ot-functions-docs-page.php:844 msgid "" "As well, you'll probably want to create a directory named <code>includes</" "code> to put your <code>theme-options.php</code> into which will help keep " "you file structure nice and tidy." msgstr "" "Tõenäoliselt soovid luua ka kausta <code>includes</code>, kuhu oma " "<code>theme-options.php</code> fail panna. See hoiab failistruktuuri ilusa " "ja puhtana." #: ../includes/ot-functions-docs-page.php:855 msgid "" "Add a variation of the following code to your <code>theme-options.php</" "code>. You'll obviously need to fill it in with all your custom array values " "for contextual help (optional), sections (required), and settings (required)." msgstr "" "Lisa oma <code>theme-options.php</code> faili mingi variatsioon järgnevast " "koodist. Loomulikult tuleb see täita enda massiiviväärtustega " "kontekstipõhise abi ( valikuline ), sektsioonide ( nõutud ) ja sätete " "( nõutud ) jaoks." #: ../includes/ot-functions-docs-page.php:858 msgid "" "The code below is a boilerplate to get your started. For a full list of the " "available option types click the \"Option Types\" tab above. Also a quick " "note, you don't need to put OptionTree in theme mode to manually create " "options but you will want to hide the docs and settings as each time you " "load the admin area the settings be written over with the code below if " "they've changed in any way. However, this ensures your settings do not get " "tampered with by the end-user." msgstr "" "Allolev kood on stereotüüp, millega saad alustada. Saadaolevate " "valikutüüpide täieliku nimekirja saad ülalolevast \"Valikutüübid\" sakist. " "Kiire vahemärkus: käsitsi valikute loomiseks ei pea OptionTree olema " "teemarežiimis, kuid sel juhul tuleks peita ära dokumentatsioon ja sätted, " "sest iga kord kui haldusliides laaditakse kirjutatakse sätted üle alloleva " "koodiga. Samas see kindlustab, et lõppkasutaja ei saa sätteid näppida." #: ../includes/ot-functions-option-types.php:46 msgid "Sorry, this function does not exist" msgstr "Kahjuks sellist funktsiooni pole." #: ../includes/ot-functions-option-types.php:134 msgid "background-repeat" msgstr "background-repeat" #: ../includes/ot-functions-option-types.php:152 msgid "background-attachment" msgstr "background-attachment" #: ../includes/ot-functions-option-types.php:171 msgid "background-position" msgstr "background-position" #: ../includes/ot-functions-option-types.php:224 msgid "background-size" msgstr "background-size" #: ../includes/ot-functions-option-types.php:238 msgid "background-image" msgstr "background-image" #: ../includes/ot-functions-option-types.php:241 #: ../includes/ot-functions-option-types.php:3202 msgid "Add Media" msgstr "Lisa meediat" #: ../includes/ot-functions-option-types.php:316 #: ../includes/ot-functions-option-types.php:1045 msgid "width" msgstr "width" #: ../includes/ot-functions-option-types.php:327 #: ../includes/ot-functions-option-types.php:1065 #: ../includes/ot-functions-option-types.php:1550 #: ../includes/ot-functions-option-types.php:2506 msgid "unit" msgstr "ühik" #: ../includes/ot-functions-option-types.php:346 msgid "style" msgstr "style" #: ../includes/ot-functions-option-types.php:439 msgid "offset-x" msgstr "offset-x" #: ../includes/ot-functions-option-types.php:448 msgid "offset-y" msgstr "offset-y" #: ../includes/ot-functions-option-types.php:457 msgid "blur-radius" msgstr "blur-radius" #: ../includes/ot-functions-option-types.php:466 msgid "spread-radius" msgstr "spread-radius" #: ../includes/ot-functions-option-types.php:538 #: ../includes/ot-functions-option-types.php:592 msgid "No Categories Found" msgstr "Kategooriaid ei leitud" #: ../includes/ot-functions-option-types.php:587 #: ../includes/ot-functions-option-types.php:870 #: ../includes/ot-functions-option-types.php:1819 #: ../includes/ot-functions-option-types.php:1930 #: ../includes/ot-functions-option-types.php:2646 #: ../includes/ot-functions-option-types.php:2761 msgid "Choose One" msgstr "Valik üks" #: ../includes/ot-functions-option-types.php:818 #: ../includes/ot-functions-option-types.php:876 #: ../includes/ot-functions-option-types.php:1881 #: ../includes/ot-functions-option-types.php:1936 msgid "No Posts Found" msgstr "Postitusi ei leitud" #: ../includes/ot-functions-option-types.php:1054 msgid "height" msgstr "height" #: ../includes/ot-functions-option-types.php:1232 #: ../includes/ot-functions-option-types.php:1275 msgid "Remove Google Font" msgstr "Eemalda Google Font" #: ../includes/ot-functions-option-types.php:1234 #: ../includes/ot-functions-option-types.php:1277 msgid "-- Choose One --" msgstr "-- Vali üks --" #: ../includes/ot-functions-option-types.php:1298 msgid "Add Google Font" msgstr "Lisa Google Font" #: ../includes/ot-functions-option-types.php:1384 msgctxt "color picker" msgid "Standard" msgstr "Standard" #: ../includes/ot-functions-option-types.php:1385 msgctxt "color picker" msgid "Hover" msgstr "Hõljudes" #: ../includes/ot-functions-option-types.php:1386 msgctxt "color picker" msgid "Active" msgstr "Aktiivne" #: ../includes/ot-functions-option-types.php:1387 msgctxt "color picker" msgid "Visited" msgstr "Külastatud" #: ../includes/ot-functions-option-types.php:1388 msgctxt "color picker" msgid "Focus" msgstr "Fookus" #: ../includes/ot-functions-option-types.php:1497 #: ../includes/ot-functions-option-types.php:2246 #: ../includes/ot-functions-option-types.php:2411 msgid "Add New" msgstr "Lisa uus" #: ../includes/ot-functions-option-types.php:1500 #: ../includes/ot-functions-option-types.php:2249 #: ../includes/ot-functions-option-types.php:2414 msgid "You can re-order with drag & drop, the order will update after saving." msgstr "" "Lohistades saab elemente ümber paigutada. Järjekord uueneb peale " "salvestamist." #: ../includes/ot-functions-option-types.php:1670 msgid "On" msgstr "Sees" #: ../includes/ot-functions-option-types.php:1692 msgid "Off" msgstr "Väljas" #: ../includes/ot-functions-option-types.php:1770 #: ../includes/ot-functions-option-types.php:1825 msgid "No Pages Found" msgstr "Lehekülgi ei leitud" #: ../includes/ot-functions-option-types.php:2169 msgid "Choose Sidebar" msgstr "Vali küljendusmenüü" #: ../includes/ot-functions-option-types.php:2174 msgid "No Sidebars" msgstr "Küljendusmenüüd puuduvad" #: ../includes/ot-functions-option-types.php:2282 msgid "Facebook" msgstr "Facebook" #: ../includes/ot-functions-option-types.php:2287 msgid "Twitter" msgstr "Twitter" #: ../includes/ot-functions-option-types.php:2292 msgid "Google+" msgstr "Google+" #: ../includes/ot-functions-option-types.php:2297 msgid "LinkedIn" msgstr "LinkedIn" #: ../includes/ot-functions-option-types.php:2302 msgid "Pinterest" msgstr "Pinterest" #: ../includes/ot-functions-option-types.php:2307 msgid "Youtube" msgstr "Youtube" #: ../includes/ot-functions-option-types.php:2312 msgid "Dribbble" msgstr "Dribbble" #: ../includes/ot-functions-option-types.php:2317 msgid "Github" msgstr "Github" #: ../includes/ot-functions-option-types.php:2322 msgid "Forrst" msgstr "Forrst" #: ../includes/ot-functions-option-types.php:2327 msgid "Digg" msgstr "Digg" #: ../includes/ot-functions-option-types.php:2332 msgid "Delicious" msgstr "Delicious" #: ../includes/ot-functions-option-types.php:2337 msgid "Tumblr" msgstr "Tumblr" #: ../includes/ot-functions-option-types.php:2342 msgid "Skype" msgstr "Skype" #: ../includes/ot-functions-option-types.php:2347 msgid "SoundCloud" msgstr "SoundCloud" #: ../includes/ot-functions-option-types.php:2352 msgid "Vimeo" msgstr "Vimeo" #: ../includes/ot-functions-option-types.php:2357 msgid "Flickr" msgstr "Flickr" #: ../includes/ot-functions-option-types.php:2362 msgid "VK.com" msgstr "VK.com" #: ../includes/ot-functions-option-types.php:2468 msgid "top" msgstr "top" #: ../includes/ot-functions-option-types.php:2477 msgid "right" msgstr "right" #: ../includes/ot-functions-option-types.php:2486 msgid "bottom" msgstr "bottom" #: ../includes/ot-functions-option-types.php:2495 msgid "left" msgstr "left" #: ../includes/ot-functions-option-types.php:2597 #: ../includes/ot-functions-option-types.php:2651 msgid "No Tags Found" msgstr "Märksõnu ei leitud" #: ../includes/ot-functions-option-types.php:2709 #: ../includes/ot-functions-option-types.php:2766 msgid "No Taxonomies Found" msgstr "Taksonoomiaid ei leitud" #: ../includes/ot-functions-settings-page.php:35 msgid "Warning!" msgstr "Hoiatus!" #: ../includes/ot-functions-settings-page.php:36 #, php-format msgid "" "Go to the %s page if you want to save data, this page is for adding settings." msgstr "Info salvestamiseks on %s leht, see leht siin on sätete lisamiseks." #: ../includes/ot-functions-settings-page.php:37 #, php-format msgid "" "If you're unsure or not completely positive that you should be editing these " "settings, you should read the %s first." msgstr "Kui kahtled, kas peaksid neid sätteid muutma, loe kõigepealt %s." #: ../includes/ot-functions-settings-page.php:38 msgid "" "Things could break or be improperly displayed to the end-user if you do one " "of the following:" msgstr "" "Kui teed ühte järgnevatest, võivad asjad katki minna või olla lõpp-" "kasutajale valesti kuvatud:" #: ../includes/ot-functions-settings-page.php:39 msgid "" "Give two sections the same ID, give two settings the same ID, give two " "contextual help content areas the same ID, don't create any settings, or " "have a section at the end of the settings list." msgstr "" "annad kahele sektsioonile sama ID, annad kahele sättele sama ID, annad " "kahele kontekstipõhise abi alale sama ID, ei loo ühtegi sätet või jätad " "sektsiooni sätete nimekirja lõppu." #: ../includes/ot-functions-settings-page.php:40 msgid "" "You can create as many settings as your project requires and use them how " "you see fit. When you add a setting here, it will be available on the Theme " "Options page for use in your theme. To separate your settings into sections, " "click the \"Add Section\" button, fill in the input fields, and a new " "navigation menu item will be created." msgstr "" "Sätteid saab luua nii palju kui vaja ning kasutada oma parema äranägemise " "järgi. Siia sätte lisamisel tekib see teema valikute lehele oma teemas " "kasutamiseks. Sätete sektsioonidesse eraldamiseks vajuta \"Lisa sektsioon\" " "nupule, täida sisendväljad ning uus navigatsioonimenüü element on loodud." #: ../includes/ot-functions-settings-page.php:41 msgid "" "All of the settings can be sorted and rearranged to your liking with Drag & " "Drop. Don't worry about the order in which you create your settings, you can " "always reorder them." msgstr "" "Kõiki sätteid saab sorteerida ja ümber paigutada lohistamise abil. Sätete " "loomise järjekorra üle ei pea muretsema, sest neid saab alati ümber " "järjestada." #: ../includes/ot-functions-settings-page.php:92 msgid "Add Section" msgstr "Lisa sektsioon" #: ../includes/ot-functions-settings-page.php:99 msgid "Contextual Help" msgstr "Konteksti põhine abi" #: ../includes/ot-functions-settings-page.php:103 msgid "Contextual Help Sidebar" msgstr "Konteksti põhise abi küljeriba" #: ../includes/ot-functions-settings-page.php:103 msgid "" "If you decide to add contextual help to the Theme Option page, enter the " "optional \"Sidebar\" HTML here. This would be an extremely useful place to " "add links to your themes documentation or support forum. Only after you've " "added some content below will this display to the user." msgstr "" "Kui soovida lisada kontekstipõhist abiteksti, sisesta \"Küljeriba\" HTML " "siia. See oleks väga hea koht, kuhu lisada linke oma teema " "dokumentatsioonile või kasutajatoe foorumile. Seda näidatakse kasutajale " "vaid juhul, kui allpool on mingi sisu lisatud." #: ../includes/ot-functions-settings-page.php:132 msgid "Add Contextual Help Content" msgstr "Lisa konteksti põhine abitekst" #: ../includes/ot-functions-settings-page.php:168 msgid "" "This import method has been deprecated. That means it has been replaced by a " "new method and is no longer supported, and may be removed from future " "versions. All themes that use this import method should be converted to use " "its replacement below." msgstr "" "Impordi meetodit taunitakse. See tähendab, et teda asendab uuem meetod ja " "enam teda ei toetata. Ta võidakse tulevastes versioonides eemaldada. Kõik " "teemad, mis seda impordi meetodit kasutavad, tuleks ümber muuta allolevat " "asendust kasutama." #: ../includes/ot-functions-settings-page.php:170 #, php-format msgid "" "If you were given a Theme Options XML file with a premium or free theme, " "locate it on your hard drive and upload that file by clicking the upload " "button. A popup window will appear, upload the XML file and click \"%s\". " "The file URL should be in the upload input, if it is click \"Import XML\"." msgstr "" "Kui sulle anti teemaga kaasa valikute XML fail, leia see oma kõvakettalt " "ning vajuta üleslaadimise nuppu. Avanevas aknas lae üles XML fail ja vajuta " "\"%s\". Faili URL peaks olema üleslaadimise sisendis. Kui see seal on, " "vajuta nuppu \"Impordi XML\"." #: ../includes/ot-functions-settings-page.php:173 msgid "Import XML" msgstr "Impordi XML" #: ../includes/ot-functions-settings-page.php:189 msgid "Add XML" msgstr "Lisa XML" #: ../includes/ot-functions-settings-page.php:226 msgid "" "To import your Settings copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Settings" "\" button." msgstr "" "Sätete importimiseks kopeeri ja kleebi näiliselt juhuslik string tähtedest " "ja numbritest siia tekstialasse ning vajuta \"Impordi sätted\" nuppu." #: ../includes/ot-functions-settings-page.php:229 msgid "Import Settings" msgstr "Impordi seaded" #: ../includes/ot-functions-settings-page.php:271 msgid "" "Only after you've imported the Settings should you try and update your Theme " "Options." msgstr "Enne teema valikute uuendamist impordi sätted." #: ../includes/ot-functions-settings-page.php:273 msgid "" "To import your Theme Options copy and paste what appears to be a random " "string of alpha numeric characters into this textarea and press the \"Import " "Theme Options\" button." msgstr "" "Teema valikute importimiseks kopeeri ja kleebi näiliselt juhuslik string " "tähtedest ja numbritest siia tekstialasse ning vajuta \"Impordi teema valikud" "\" nuppu." #: ../includes/ot-functions-settings-page.php:276 msgid "Import Theme Options" msgstr "Impordi teema valikud" #: ../includes/ot-functions-settings-page.php:318 msgid "" "Only after you've imported the Settings should you try and update your " "Layouts." msgstr "Enne paigutuste uuendamist impordi sätted." #: ../includes/ot-functions-settings-page.php:320 msgid "" "To import your Layouts copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Layouts\" " "button. Keep in mind that when you import your layouts, the active layout's " "saved data will write over the current data set for your Theme Options." msgstr "" "Paigutuste importimiseks kopeeri ja kleebi näiliselt juhuslik string " "tähtedest ja numbritest siia tekstialasse ning vajuta \"Impordi paigutus\" " "nuppu. Arvesta, et aktiivse paigutuse salvestatud andmed kirjutavad " "hetkeandmed üle." #: ../includes/ot-functions-settings-page.php:323 msgid "Import Layouts" msgstr "Impordi paigutused" #: ../includes/ot-functions-settings-page.php:366 #, php-format msgid "" "Export your Settings into a fully functional %s file. If you want to add " "your own custom %s text domain to the file, enter it into the text field " "before exporting. For more information on how to use this file read the " "documentation on %s. Remember, you should always check the file for errors " "before including it in your theme." msgstr "" "Ekspordi oma sätted täisfunktsionaalsesse %s faili. Kui soovid failile " "lisada enda kohandatud %s tekstidomeeni, sisesta see tekstivälja enne " "eksportimist. Lisainformatsiooni selle faili kasutamise kohta leiad " "dokumentatsioonis %s. Pea meeles, et failile tuleks teha vigade kontroll " "enne teemasse kaasamist." #: ../includes/ot-functions-settings-page.php:375 msgid "Export Settings File" msgstr "Ekspordi seadete fail" #: ../includes/ot-functions-settings-page.php:405 msgid "" "Export your Settings by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>OptionTree->Settings->Import</code> <strong>Settings</strong> textarea " "on another web site." msgstr "" "Ekspordi oma sätted, markeerides see tekst ja kopeerides ta tühja .txt " "faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi " "installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe " "<code>OptionTree->Sätted->Import</code> <strong>Sätted</strong> tekstialasse." #: ../includes/ot-functions-settings-page.php:441 msgid "" "Export your Theme Options data by highlighting this text and doing a copy/" "paste into a blank .txt file. Then save the file for importing into another " "install of WordPress later. Alternatively, you could just paste it into the " "<code>OptionTree->Settings->Import</code> <strong>Theme Options</strong> " "textarea on another web site." msgstr "" "Ekspordi oma teema valikud, markeerides see tekst ja kopeerides ta tühja ." "txt faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi " "installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe " "<code>OptionTree->Sätted->Import</code> <strong>Teema valikud</strong> " "tekstialasse." #: ../includes/ot-functions-settings-page.php:477 msgid "" "Export your Layouts by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>OptionTree->Settings->Import</code> <strong>Layouts</strong> textarea " "on another web site." msgstr "" "Ekspordi oma paigutused, markeerides see tekst ja kopeerides ta tühja .txt " "faili. Seejärel salvesta fail hilisemaks importimiseks teise WordPressi " "installatsiooni. Alternatiivina võib selle kleepida otse teise veebilehe " "<code>OptionTree->Sätted->Import</code> <strong>Paigutused</strong> " "tekstialasse." #: ../includes/ot-functions-settings-page.php:519 msgid "" "To add a new layout enter a unique lower case alphanumeric string (dashes " "allowed) in the text field and click \"Save Layouts\"." msgstr "" "Uue paigutuse lisamiseks sisestage tekstivälja unikaalne väiketähtedega " "alfanumbriline string ( sidekriipsud lubatud ) ning vajutage \"Salvesta " "paigutused\" nupul." #: ../includes/ot-functions-settings-page.php:520 msgid "" "As well, you can activate, remove, and drag & drop the order; all situations " "require you to click \"Save Layouts\" for the changes to be applied." msgstr "" "Saate ka aktiveerida, eemaldada ning lohistades järjekorda muuta. Muudatused " "ei mõju enne, kui vajutate \"Salvesta paigutused\" nuppu." #: ../includes/ot-functions-settings-page.php:521 msgid "" "When you create a new layout it will become active and any changes made to " "the Theme Options will be applied to it. If you switch back to a different " "layout immediately after creating a new layout that new layout will have a " "snapshot of the current Theme Options data attached to it." msgstr "" "Uue paigutuse loomisel muudetakse see aktiivseks ning edasised muudatused " "teema valikutes mõjuvad talle. Kui peale uue paigutuse loomist kohe mõne muu " "paigutuse peale vahetada, siis uue paigutuse külge jääb teema valikute " "andmete hetkeseis paigutuse loomisel." #: ../includes/ot-functions-settings-page.php:522 msgid "" "Visit <code>OptionTree->Documentation->Layouts Overview</code> to see a more " "in-depth description of what layouts are and how to use them." msgstr "" "Lehel <code>OptionTree->Dokumentatsioon->Paigutuste ülevaade</code> leiad " "põhjalikuma paigutuste kirjelduse ja kasutusjuhendi." #: ../includes/ot-functions-settings-page.php:559 msgid "Save Layouts" msgstr "Salvesta paigutused" #: ../includes/ot-settings-api.php:364 msgid "Reset Options" msgstr "Algseadista seaded" #: ../ot-loader.php:21 msgid "" "OptionTree is installed as a plugin and also embedded in your current theme. " "Please deactivate the plugin to load the theme dependent version of " "OptionTree, and remove this warning." msgstr "" "OptionTree on paigaldatud nii moodulina kui ka kaasatud aktiivses teemas. " "Palun lülita moodul välja, et laetaks teemast sõltuv versioon OptionTreest " "ja see hoiatus kaoks." #~ msgid "The Colorpicker only allows valid hexadecimal values." #~ msgstr "" #~ "Värvi valija lubab vaid sobivaid kuueteistkümnendiksüsteemis väärtuseid." #~ msgid "Congratulations! You have a clean install." #~ msgstr "Õnnitlused! Sul on puhas paigaldus." #~ msgid "" #~ "Your version of OptionTree does not have any outdated data. If there was " #~ "outdated data, you would be presented with options to clean it up." #~ msgstr "" #~ "Sinu OptionTree versioonis ei ole aegunud andmeid. Kui neid oleks, siis " #~ "pakutaks võimalust puhastamiseks." #~ msgid "Hide This Page" #~ msgstr "Peida lehekülg" #~ msgid "Demo Meta Box" #~ msgstr "Näidis meta kast" #~ msgid "Conditions" #~ msgstr "Tingimused" #~ msgid "Show Gallery" #~ msgstr "Näita galeriid" #~ msgid "Shows the Gallery when set to %s." #~ msgstr "Näitab galeriid, kui on määratud asendisse %s" #~ msgid "Congratulations, you created a gallery!" #~ msgstr "Õnnitlused, lõite just galerii!" #~ msgid "This is a Gallery option type. It displays when %s." #~ msgstr "See on galerii valikutüüp. Nähtaval, kui ta on %s" #~ msgid "More Options" #~ msgstr "Rohkem seadeid" #~ msgid "This is a demo Text field." #~ msgstr "See on näidis tekstisisend." #~ msgid "This is a demo Textarea field." #~ msgstr "See on näidis tekstiväli." #~ msgid "Help content goes here!" #~ msgstr "Siia lähevad abitekstid!" #~ msgid "Sidebar content goes here!" #~ msgstr "Siia läheb küljeriba sisu!" #~ msgid "No" #~ msgstr "Ei" #~ msgid "Yes" #~ msgstr "Jah" #~ msgid "Gallery Shortcode" #~ msgstr "Galerii lühikood" #~ msgid "" #~ "The Gallery option type can also be saved as a shortcode by adding %s to " #~ "the class attribute. Using the Gallery option type in this manner will " #~ "result in a better user experience as you're able to save the link, " #~ "column, and order settings." #~ msgstr "" #~ "Lisades %s klassiatribuudiks saab galerii valikutüübi salvestada ka " #~ "lühikoodina. Sellisel moel galerii valikutüüpi kasutades on tulemuseks " #~ "parem kasutajakogemus, kuna saad salvestada lingi, tulba ja järjekorra " #~ "sätteid." #~ msgid "" #~ "The List Item option type allows for a great deal of customization. You " #~ "can add settings to the List Item and those settings will be displayed to " #~ "the user when they add a new List Item. Typical use is for creating " #~ "sliding content or blocks of code for custom layouts." #~ msgstr "" #~ "Nimekirja elemendi valikutüüpi on väga hästi kohandatav. Nimekirja " #~ "elementidele saab lisada sätteid ning neid näidatakse kasutajale uue " #~ "elemendi lisamisel. Tüüpiline kasutus on liugleva sisu jaoks või " #~ "kohandatud paigutuse koodiblokkide tarvis." #~ msgid "Content" #~ msgstr "Sisu" #~ msgid "Maybe" #~ msgstr "Võib-olla" #~ msgid "Upload Attachment ID" #~ msgstr "Üles laetud manuse ID" #~ msgid "" #~ "The Upload option type can also be saved as an attachment ID by adding %s " #~ "to the class attribute." #~ msgstr "" #~ "Üleslaadimise valikutüüpi saab salvestada ka manuse ID-na, lisades %s " #~ "klassi atribuudile." #~ msgid "Color Picker" #~ msgstr "Värvi valija" includes/theme-options/languages/option-tree.po 0000755 00000110323 15174671607 0015741 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: OptionTree\n" "POT-Creation-Date: 2018-02-08 10:25+0100\n" "PO-Revision-Date: 2018-02-08 10:25+0100\n" "Last-Translator: Undsgn Team <info@undsgn.com>\n" "Language-Team: Undsgn <info@undsgn.com>\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.6\n" "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" "_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-SearchPath-0: ..\n" "X-Poedit-SearchPathExcluded-0: ../.git\n" "X-Poedit-SearchPathExcluded-1: ../composer.json\n" "X-Poedit-SearchPathExcluded-2: ../assets\n" #: ../includes/ot-cleanup-api.php:84 ../includes/ot-cleanup-api.php:101 #: ../includes/ot-cleanup-api.php:130 msgid "OptionTree Cleanup" msgstr "" #: ../includes/ot-cleanup-api.php:101 #, php-format msgid "" "OptionTree has outdated data that should be removed. Please go to %s for " "more information." msgstr "" #: ../includes/ot-cleanup-api.php:136 msgid "Multiple Media Posts" msgstr "" #: ../includes/ot-cleanup-api.php:138 #, php-format msgid "" "There are currently %s OptionTree media posts in your database. At some " "point in the past, a version of OptionTree added multiple %s media post " "objects cluttering up your %s table. There is no associated risk or harm " "that these posts have caused other than to add size to your overall " "database. Thankfully, there is a way to remove all these orphaned media " "posts and get your database cleaned up." msgstr "" #: ../includes/ot-cleanup-api.php:140 #, php-format msgid "" "By clicking the button below, OptionTree will delete %s records and " "consolidate them into one single OptionTree media post for uploading " "attachments to. Additionally, the attachments will have their parent ID " "updated to the correct media post." msgstr "" #: ../includes/ot-cleanup-api.php:142 msgid "" "This could take a while to fully process depending on how many records you " "have in your database, so please be patient and wait for the script to " "finish." msgstr "" #: ../includes/ot-cleanup-api.php:144 #, php-format msgid "" "%s Your server is running in safe mode. Which means this page will " "automatically reload after deleting %s posts, you can filter this number " "using %s if your server is having trouble processing that many at one time." msgstr "" #: ../includes/ot-cleanup-api.php:146 msgid "Consolidate Posts" msgstr "" #: ../includes/ot-cleanup-api.php:174 msgid "Reloading..." msgstr "" #: ../includes/ot-cleanup-api.php:210 msgid "Clean up script has completed, the page will now reload..." msgstr "" #: ../includes/ot-cleanup-api.php:230 msgid "Outdated Table" msgstr "" #: ../includes/ot-cleanup-api.php:232 #, php-format msgid "" "If you have upgraded from an old 1.x version of OptionTree at some point, " "you have an extra %s table in your database that can be removed. It's not " "hurting anything, but does not need to be there. If you want to remove it. " "Click the button below." msgstr "" #: ../includes/ot-cleanup-api.php:234 msgid "Drop Table" msgstr "" #: ../includes/ot-cleanup-api.php:238 #, php-format msgid "Deleting the outdated and unused %s table..." msgstr "" #: ../includes/ot-cleanup-api.php:244 #, php-format msgid "The %s table has been successfully deleted. The page will now reload..." msgstr "" #: ../includes/ot-cleanup-api.php:256 #, php-format msgid "Something went wrong. The %s table was not deleted." msgstr "" #: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51 #: ../includes/ot-functions-admin.php:169 #: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:363 #: ../includes/ot-settings-api.php:265 msgid "Theme Options" msgstr "" #: ../includes/ot-functions-admin.php:56 ../includes/ot-functions-admin.php:126 #: ../includes/ot-functions-admin.php:220 msgid "Theme Options updated." msgstr "" #: ../includes/ot-functions-admin.php:57 ../includes/ot-functions-admin.php:127 #: ../includes/ot-functions-admin.php:221 msgid "Theme Options reset." msgstr "" #: ../includes/ot-functions-admin.php:58 #: ../includes/ot-functions-settings-page.php:94 msgid "Save Changes" msgstr "" #: ../includes/ot-functions-admin.php:97 msgid "" "The Theme Options UI Builder is being overridden by a custom file in your " "theme. Any changes you make via the UI Builder will not be saved." msgstr "" #: ../includes/ot-functions-admin.php:109 #: ../includes/ot-functions-admin.php:110 msgid "OptionTree" msgstr "" #: ../includes/ot-functions-admin.php:120 #: ../includes/ot-functions-admin.php:121 msgid "Settings" msgstr "" #: ../includes/ot-functions-admin.php:128 #: ../includes/ot-functions-admin.php:222 msgid "Save Settings" msgstr "" #: ../includes/ot-functions-admin.php:133 msgid "Theme Options UI" msgstr "" #: ../includes/ot-functions-admin.php:137 msgid "Export" msgstr "" #: ../includes/ot-functions-admin.php:141 msgid "Import" msgstr "" #: ../includes/ot-functions-admin.php:145 #: ../includes/ot-functions-admin.php:175 #: ../includes/ot-functions-admin.php:199 msgid "Layouts" msgstr "" #: ../includes/ot-functions-admin.php:205 msgid "Layout Management" msgstr "" #: ../includes/ot-functions-admin.php:214 #: ../includes/ot-functions-admin.php:215 msgid "Documentation" msgstr "" #: ../includes/ot-functions-admin.php:227 msgid "Creating Options" msgstr "" #: ../includes/ot-functions-admin.php:231 msgid "Option Types" msgstr "" #: ../includes/ot-functions-admin.php:235 msgid "Function References" msgstr "" #: ../includes/ot-functions-admin.php:239 #: ../includes/ot-functions-admin.php:281 #: ../includes/ot-functions-settings-page.php:366 msgid "Theme Mode" msgstr "" #: ../includes/ot-functions-admin.php:243 #: ../includes/ot-functions-admin.php:287 msgid "Meta Boxes" msgstr "" #: ../includes/ot-functions-admin.php:247 msgid "Code Examples" msgstr "" #: ../includes/ot-functions-admin.php:251 msgid "Layouts Overview" msgstr "" #: ../includes/ot-functions-admin.php:257 msgid "Overview of available Theme Option fields." msgstr "" #: ../includes/ot-functions-admin.php:263 msgid "Option types in alphabetical order & hooks to filter them." msgstr "" #: ../includes/ot-functions-admin.php:269 msgid "Function Reference:ot_get_option()" msgstr "" #: ../includes/ot-functions-admin.php:275 msgid "Function Reference:get_option_tree()" msgstr "" #: ../includes/ot-functions-admin.php:293 msgid "Code examples for front-end development." msgstr "" #: ../includes/ot-functions-admin.php:299 msgid "What's a layout anyhow?" msgstr "" #: ../includes/ot-functions-admin.php:502 #: ../includes/ot-functions-admin.php:604 #: ../includes/ot-functions-admin.php:673 #, php-format msgid "The %s input field for %s only allows numeric values." msgstr "" #: ../includes/ot-functions-admin.php:563 #, php-format msgid "The %s Colorpicker only allows valid hexadecimal or rgba values." msgstr "" #: ../includes/ot-functions-admin.php:840 #: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:785 msgid "Send to OptionTree" msgstr "" #: ../includes/ot-functions-admin.php:841 #: ../includes/ot-functions-option-types.php:257 #: ../includes/ot-functions-option-types.php:3299 msgid "Remove Media" msgstr "" #: ../includes/ot-functions-admin.php:842 msgid "Are you sure you want to reset back to the defaults?" msgstr "" #: ../includes/ot-functions-admin.php:843 msgid "You can't remove this! But you can edit the values." msgstr "" #: ../includes/ot-functions-admin.php:844 msgid "Are you sure you want to remove this?" msgstr "" #: ../includes/ot-functions-admin.php:845 msgid "Are you sure you want to activate this layout?" msgstr "" #: ../includes/ot-functions-admin.php:846 msgid "Sorry, you can't have settings three levels deep." msgstr "" #: ../includes/ot-functions-admin.php:847 #: ../includes/ot-functions-option-types.php:1227 msgid "Delete Gallery" msgstr "" #: ../includes/ot-functions-admin.php:848 #: ../includes/ot-functions-option-types.php:1228 msgid "Edit Gallery" msgstr "" #: ../includes/ot-functions-admin.php:849 #: ../includes/ot-functions-option-types.php:1235 msgid "Create Gallery" msgstr "" #: ../includes/ot-functions-admin.php:850 msgid "Are you sure you want to delete this Gallery?" msgstr "" #: ../includes/ot-functions-admin.php:851 msgid "Today" msgstr "" #: ../includes/ot-functions-admin.php:852 msgid "Now" msgstr "" #: ../includes/ot-functions-admin.php:853 msgid "Close" msgstr "" #: ../includes/ot-functions-admin.php:854 msgid "Featured Image" msgstr "" #: ../includes/ot-functions-admin.php:855 #: ../includes/ot-functions-admin.php:3303 #: ../includes/ot-functions-admin.php:3364 msgid "Image" msgstr "" #: ../includes/ot-functions-admin.php:923 msgid "Option Tree" msgstr "" #: ../includes/ot-functions-admin.php:1061 msgid "General" msgstr "" #: ../includes/ot-functions-admin.php:1067 msgid "Sample Text Field Label" msgstr "" #: ../includes/ot-functions-admin.php:1068 msgid "Description for the sample text field." msgstr "" #: ../includes/ot-functions-admin.php:2312 #: ../includes/ot-functions-admin.php:2314 msgid "Settings updated." msgstr "" #: ../includes/ot-functions-admin.php:2320 #: ../includes/ot-functions-admin.php:2322 msgid "Settings could not be saved." msgstr "" #: ../includes/ot-functions-admin.php:2332 #: ../includes/ot-functions-admin.php:2334 msgid "Settings Imported." msgstr "" #: ../includes/ot-functions-admin.php:2340 #: ../includes/ot-functions-admin.php:2342 msgid "Settings could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2351 #: ../includes/ot-functions-admin.php:2353 msgid "Data Imported." msgstr "" #: ../includes/ot-functions-admin.php:2359 #: ../includes/ot-functions-admin.php:2361 msgid "Data could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2371 #: ../includes/ot-functions-admin.php:2373 msgid "Layouts Imported." msgstr "" #: ../includes/ot-functions-admin.php:2379 #: ../includes/ot-functions-admin.php:2381 msgid "Layouts could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2391 #: ../includes/ot-functions-admin.php:2393 msgid "Layouts Updated." msgstr "" #: ../includes/ot-functions-admin.php:2399 #: ../includes/ot-functions-admin.php:2401 msgid "Layouts could not be updated." msgstr "" #: ../includes/ot-functions-admin.php:2407 #: ../includes/ot-functions-admin.php:2409 msgid "Layouts have been deleted." msgstr "" #: ../includes/ot-functions-admin.php:2417 #: ../includes/ot-functions-admin.php:2419 msgid "Layout activated." msgstr "" #: ../includes/ot-functions-admin.php:2467 msgid "Background" msgstr "" #: ../includes/ot-functions-admin.php:2468 msgid "Border" msgstr "" #: ../includes/ot-functions-admin.php:2469 msgid "Box Shadow" msgstr "" #: ../includes/ot-functions-admin.php:2470 msgid "Category Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2471 msgid "Category Select" msgstr "" #: ../includes/ot-functions-admin.php:2472 msgid "Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2473 msgid "Colorpicker" msgstr "" #: ../includes/ot-functions-admin.php:2474 msgid "Gradientpicker" msgstr "" #: ../includes/ot-functions-admin.php:2475 msgid "Colorpicker Opacity" msgstr "" #: ../includes/ot-functions-admin.php:2476 msgid "CSS" msgstr "" #: ../includes/ot-functions-admin.php:2477 msgid "Custom Post Type Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2478 msgid "Custom Post Type Select" msgstr "" #: ../includes/ot-functions-admin.php:2479 msgid "Date Picker" msgstr "" #: ../includes/ot-functions-admin.php:2480 msgid "Date Time Picker" msgstr "" #: ../includes/ot-functions-admin.php:2481 msgid "Dimension" msgstr "" #: ../includes/ot-functions-admin.php:2482 #: ../includes/ot-functions-admin.php:5524 msgid "Gallery" msgstr "" #: ../includes/ot-functions-admin.php:2483 msgid "Google Fonts" msgstr "" #: ../includes/ot-functions-admin.php:2484 msgid "JavaScript" msgstr "" #: ../includes/ot-functions-admin.php:2485 msgid "Link Color" msgstr "" #: ../includes/ot-functions-admin.php:2486 msgid "List Item" msgstr "" #: ../includes/ot-functions-admin.php:2487 msgid "Measurement" msgstr "" #: ../includes/ot-functions-admin.php:2488 msgid "Numeric Slider" msgstr "" #: ../includes/ot-functions-admin.php:2489 msgid "On/Off" msgstr "" #: ../includes/ot-functions-admin.php:2490 msgid "Page Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2491 msgid "Page Select" msgstr "" #: ../includes/ot-functions-admin.php:2492 msgid "Post Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2493 msgid "Post Select" msgstr "" #: ../includes/ot-functions-admin.php:2494 msgid "Radio" msgstr "" #: ../includes/ot-functions-admin.php:2495 msgid "Radio Image" msgstr "" #: ../includes/ot-functions-admin.php:2496 msgid "Select" msgstr "" #: ../includes/ot-functions-admin.php:2497 msgid "Sidebar Select" msgstr "" #: ../includes/ot-functions-admin.php:2498 msgid "Slider" msgstr "" #: ../includes/ot-functions-admin.php:2499 msgid "Social Links" msgstr "" #: ../includes/ot-functions-admin.php:2500 msgid "Spacing" msgstr "" #: ../includes/ot-functions-admin.php:2501 msgid "Tab" msgstr "" #: ../includes/ot-functions-admin.php:2502 msgid "Tag Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2503 msgid "Tag Select" msgstr "" #: ../includes/ot-functions-admin.php:2504 msgid "Taxonomy Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2505 msgid "Taxonomy Select" msgstr "" #: ../includes/ot-functions-admin.php:2506 msgid "Text" msgstr "" #: ../includes/ot-functions-admin.php:2507 msgid "Textarea" msgstr "" #: ../includes/ot-functions-admin.php:2508 msgid "Textarea Simple" msgstr "" #: ../includes/ot-functions-admin.php:2509 msgid "Textblock" msgstr "" #: ../includes/ot-functions-admin.php:2510 msgid "Textblock Titled" msgstr "" #: ../includes/ot-functions-admin.php:2511 msgid "Typography" msgstr "" #: ../includes/ot-functions-admin.php:2512 msgid "Upload" msgstr "" #: ../includes/ot-functions-admin.php:3248 msgid "Left Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3253 msgid "Right Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3258 msgid "Full Width (no sidebar)" msgstr "" #: ../includes/ot-functions-admin.php:3263 msgid "Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3268 msgid "Left Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3273 msgid "Right Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3314 #: ../includes/ot-functions-admin.php:3370 #: ../includes/ot-functions-admin.php:5564 msgid "Link" msgstr "" #: ../includes/ot-functions-admin.php:3325 #: ../includes/ot-functions-admin.php:3376 msgid "Description" msgstr "" #: ../includes/ot-functions-admin.php:3440 msgid "Name" msgstr "" #: ../includes/ot-functions-admin.php:3441 msgid "Enter the name of the social website." msgstr "" #: ../includes/ot-functions-admin.php:3449 msgid "Enter the text shown in the title attribute of the link." msgstr "" #: ../includes/ot-functions-admin.php:3455 #, php-format msgid "" "Enter a link to the profile or page on the social website. Remember to add " "the %s part to the front of the link." msgstr "" #: ../includes/ot-functions-admin.php:3812 #, php-format msgid "Unable to write to file %s." msgstr "" #: ../includes/ot-functions-admin.php:4082 msgid "edit" msgstr "" #: ../includes/ot-functions-admin.php:4083 #: ../includes/ot-functions-admin.php:4151 #: ../includes/ot-functions-admin.php:4152 #: ../includes/ot-functions-admin.php:4314 #: ../includes/ot-functions-admin.php:4315 #: ../includes/ot-functions-admin.php:4380 #: ../includes/ot-functions-admin.php:4381 #: ../includes/ot-functions-admin.php:4508 #: ../includes/ot-functions-admin.php:4509 #: ../includes/ot-functions-admin.php:4661 #: ../includes/ot-functions-admin.php:4662 #: ../includes/ot-functions-option-types.php:944 #: ../includes/ot-functions-option-types.php:945 #: ../includes/ot-functions-option-types.php:2182 #: ../includes/ot-functions-option-types.php:2183 msgid "Edit" msgstr "" #: ../includes/ot-functions-admin.php:4085 #: ../includes/ot-functions-admin.php:4086 #: ../includes/ot-functions-admin.php:4154 #: ../includes/ot-functions-admin.php:4155 #: ../includes/ot-functions-admin.php:4317 #: ../includes/ot-functions-admin.php:4318 #: ../includes/ot-functions-admin.php:4383 #: ../includes/ot-functions-admin.php:4384 #: ../includes/ot-functions-admin.php:4442 #: ../includes/ot-functions-admin.php:4443 #: ../includes/ot-functions-admin.php:4511 #: ../includes/ot-functions-admin.php:4512 #: ../includes/ot-functions-admin.php:4664 #: ../includes/ot-functions-admin.php:4665 msgid "Delete" msgstr "" #: ../includes/ot-functions-admin.php:4092 msgid "" "<strong>Section Title</strong>: Displayed as a menu item on the Theme " "Options page." msgstr "" #: ../includes/ot-functions-admin.php:4100 msgid "" "<strong>Section ID</strong>: A unique lower case alphanumeric string, " "underscores allowed." msgstr "" #: ../includes/ot-functions-admin.php:4161 msgid "" "<strong>Label</strong>: Displayed as the label of a form element on the " "Theme Options page." msgstr "" #: ../includes/ot-functions-admin.php:4169 #: ../includes/ot-functions-admin.php:4398 msgid "" "<strong>ID</strong>: A unique lower case alphanumeric string, underscores " "allowed." msgstr "" #: ../includes/ot-functions-admin.php:4177 msgid "" "<strong>Type</strong>: Choose one of the available option types from the " "dropdown." msgstr "" #: ../includes/ot-functions-admin.php:4188 msgid "" "<strong>Description</strong>: Enter a detailed description for the users to " "read on the Theme Options page, HTML is allowed. This is also where you " "enter content for both the Textblock & Textblock Titled option types." msgstr "" #: ../includes/ot-functions-admin.php:4196 msgid "" "<strong>Choices</strong>: This will only affect the following option types: " "Checkbox, Radio, Select & Select Image." msgstr "" #: ../includes/ot-functions-admin.php:4201 msgid "Add Choice" msgstr "" #: ../includes/ot-functions-admin.php:4207 msgid "" "<strong>Settings</strong>: This will only affect the List Item option type." msgstr "" #: ../includes/ot-functions-admin.php:4212 #: ../includes/ot-functions-settings-page.php:93 msgid "Add Setting" msgstr "" #: ../includes/ot-functions-admin.php:4218 msgid "" "<strong>Standard</strong>: Setting the standard value for your option only " "works for some option types. Read the <code>OptionTree->Documentation</code> " "for more information on which ones." msgstr "" #: ../includes/ot-functions-admin.php:4226 msgid "" "<strong>Rows</strong>: Enter a numeric value for the number of rows in your " "textarea. This will only affect the following option types: CSS, Textarea, & " "Textarea Simple." msgstr "" #: ../includes/ot-functions-admin.php:4234 msgid "" "<strong>Post Type</strong>: Add a comma separated list of post type like " "'post,page'. This will only affect the following option types: Custom Post " "Type Checkbox, & Custom Post Type Select." msgstr "" #: ../includes/ot-functions-admin.php:4242 msgid "" "<strong>Taxonomy</strong>: Add a comma separated list of any registered " "taxonomy like 'category,post_tag'. This will only affect the following " "option types: Taxonomy Checkbox, & Taxonomy Select." msgstr "" #: ../includes/ot-functions-admin.php:4250 msgid "" "<strong>Min, Max, & Step</strong>: Add a comma separated list of options in " "the following format <code>0,100,1</code> (slide from <code>0-100</code> in " "intervals of <code>1</code>). The three values represent the minimum, " "maximum, and step options and will only affect the Numeric Slider option " "type." msgstr "" #: ../includes/ot-functions-admin.php:4258 msgid "<strong>CSS Class</strong>: Add and optional class to this option type." msgstr "" #: ../includes/ot-functions-admin.php:4266 #, php-format msgid "" "<strong>Condition</strong>: Add a comma separated list (no spaces) of " "conditions in which the field will be visible, leave this setting empty to " "always show the field. In these examples, <code>value</code> is a " "placeholder for your condition, which can be in the form of %s." msgstr "" #: ../includes/ot-functions-admin.php:4274 msgid "" "<strong>Operator</strong>: Choose the logical operator to compute the result " "of the conditions." msgstr "" #: ../includes/ot-functions-admin.php:4277 msgid "and" msgstr "" #: ../includes/ot-functions-admin.php:4278 msgid "or" msgstr "" #: ../includes/ot-functions-admin.php:4324 msgid "Label" msgstr "" #: ../includes/ot-functions-admin.php:4334 msgid "Value" msgstr "" #: ../includes/ot-functions-admin.php:4344 msgid "Image Source (Radio Image only)" msgstr "" #: ../includes/ot-functions-admin.php:4390 msgid "" "<strong>Title</strong>: Displayed as a contextual help menu item on the " "Theme Options page." msgstr "" #: ../includes/ot-functions-admin.php:4406 msgid "" "<strong>Content</strong>: Enter the HTML content about this contextual help " "item displayed on the Theme Option page for end users to read." msgstr "" #: ../includes/ot-functions-admin.php:4437 msgid "Layout" msgstr "" #: ../includes/ot-functions-admin.php:4439 #: ../includes/ot-functions-admin.php:4440 msgid "Activate" msgstr "" #: ../includes/ot-functions-admin.php:4476 ../includes/ot-meta-box-api.php:235 #: ../includes/ot-settings-api.php:755 msgid "Title" msgstr "" #: ../includes/ot-functions-admin.php:4816 msgid "Enter a Layout Name" msgstr "" #: ../includes/ot-functions-admin.php:4818 msgid "Save New Layout" msgstr "" #: ../includes/ot-functions-admin.php:5573 msgid "Link URL" msgstr "" #: ../includes/ot-functions-admin.php:5580 msgid "Link Title" msgstr "" #: ../includes/ot-functions-admin.php:5610 msgid "Quote" msgstr "" #: ../includes/ot-functions-admin.php:5619 msgid "Source Name (ex. author, singer, actor)" msgstr "" #: ../includes/ot-functions-admin.php:5626 msgid "Source URL" msgstr "" #: ../includes/ot-functions-admin.php:5633 msgid "Source Title (ex. book, song, movie)" msgstr "" #: ../includes/ot-functions-admin.php:5640 msgid "Source Date" msgstr "" #: ../includes/ot-functions-admin.php:5670 msgid "Video" msgstr "" #: ../includes/ot-functions-admin.php:5679 #, php-format msgid "" "Embed video from services like Youtube, Vimeo, or Hulu. You can find a list " "of supported oEmbed sites in the %1$s. Alternatively, you could use the " "built-in %2$s shortcode." msgstr "" #: ../includes/ot-functions-admin.php:5679 #: ../includes/ot-functions-admin.php:5718 msgid "WordPress Codex" msgstr "" #: ../includes/ot-functions-admin.php:5709 msgid "Audio" msgstr "" #: ../includes/ot-functions-admin.php:5718 #, php-format msgid "" "Embed audio from services like SoundCloud and Rdio. You can find a list of " "supported oEmbed sites in the %1$s. Alternatively, you could use the built-" "in %2$s shortcode." msgstr "" #: ../includes/ot-functions-option-types.php:46 msgid "Sorry, this function does not exist" msgstr "" #: ../includes/ot-functions-option-types.php:134 msgid "background-repeat" msgstr "" #: ../includes/ot-functions-option-types.php:152 msgid "background-attachment" msgstr "" #: ../includes/ot-functions-option-types.php:171 msgid "background-position" msgstr "" #: ../includes/ot-functions-option-types.php:224 msgid "background-size" msgstr "" #: ../includes/ot-functions-option-types.php:238 msgid "background-image" msgstr "" #: ../includes/ot-functions-option-types.php:241 #: ../includes/ot-functions-option-types.php:3283 msgid "Add Media" msgstr "" #: ../includes/ot-functions-option-types.php:316 #: ../includes/ot-functions-option-types.php:1113 msgid "width" msgstr "" #: ../includes/ot-functions-option-types.php:327 #: ../includes/ot-functions-option-types.php:1133 #: ../includes/ot-functions-option-types.php:1618 #: ../includes/ot-functions-option-types.php:2587 msgid "unit" msgstr "" #: ../includes/ot-functions-option-types.php:346 msgid "style" msgstr "" #: ../includes/ot-functions-option-types.php:439 msgid "offset-x" msgstr "" #: ../includes/ot-functions-option-types.php:448 msgid "offset-y" msgstr "" #: ../includes/ot-functions-option-types.php:457 msgid "blur-radius" msgstr "" #: ../includes/ot-functions-option-types.php:466 msgid "spread-radius" msgstr "" #: ../includes/ot-functions-option-types.php:538 #: ../includes/ot-functions-option-types.php:592 msgid "No Categories Found" msgstr "" #: ../includes/ot-functions-option-types.php:587 #: ../includes/ot-functions-option-types.php:928 #: ../includes/ot-functions-option-types.php:1887 #: ../includes/ot-functions-option-types.php:1998 #: ../includes/ot-functions-option-types.php:2727 #: ../includes/ot-functions-option-types.php:2842 msgid "Choose One" msgstr "" #: ../includes/ot-functions-option-types.php:874 #: ../includes/ot-functions-option-types.php:937 #: ../includes/ot-functions-option-types.php:1949 #: ../includes/ot-functions-option-types.php:2004 msgid "No Posts Found" msgstr "" #: ../includes/ot-functions-option-types.php:1122 msgid "height" msgstr "" #: ../includes/ot-functions-option-types.php:1300 #: ../includes/ot-functions-option-types.php:1343 msgid "Remove Google Font" msgstr "" #: ../includes/ot-functions-option-types.php:1302 #: ../includes/ot-functions-option-types.php:1345 msgid "-- Choose One --" msgstr "" #: ../includes/ot-functions-option-types.php:1366 msgid "Add Google Font" msgstr "" #: ../includes/ot-functions-option-types.php:1452 msgctxt "color picker" msgid "Standard" msgstr "" #: ../includes/ot-functions-option-types.php:1453 msgctxt "color picker" msgid "Hover" msgstr "" #: ../includes/ot-functions-option-types.php:1454 msgctxt "color picker" msgid "Active" msgstr "" #: ../includes/ot-functions-option-types.php:1455 msgctxt "color picker" msgid "Visited" msgstr "" #: ../includes/ot-functions-option-types.php:1456 msgctxt "color picker" msgid "Focus" msgstr "" #: ../includes/ot-functions-option-types.php:1565 #: ../includes/ot-functions-option-types.php:2327 #: ../includes/ot-functions-option-types.php:2492 msgid "Add New" msgstr "" #: ../includes/ot-functions-option-types.php:1568 #: ../includes/ot-functions-option-types.php:2330 #: ../includes/ot-functions-option-types.php:2495 msgid "You can re-order with drag & drop, the order will update after saving." msgstr "" #: ../includes/ot-functions-option-types.php:1738 msgid "On" msgstr "" #: ../includes/ot-functions-option-types.php:1760 msgid "Off" msgstr "" #: ../includes/ot-functions-option-types.php:1838 #: ../includes/ot-functions-option-types.php:1893 msgid "No Pages Found" msgstr "" #: ../includes/ot-functions-option-types.php:2250 msgid "Default Sidebar" msgstr "" #: ../includes/ot-functions-option-types.php:2255 msgid "No Sidebars" msgstr "" #: ../includes/ot-functions-option-types.php:2363 msgid "Facebook" msgstr "" #: ../includes/ot-functions-option-types.php:2368 msgid "Twitter" msgstr "" #: ../includes/ot-functions-option-types.php:2373 msgid "Google+" msgstr "" #: ../includes/ot-functions-option-types.php:2378 msgid "LinkedIn" msgstr "" #: ../includes/ot-functions-option-types.php:2383 msgid "Pinterest" msgstr "" #: ../includes/ot-functions-option-types.php:2388 msgid "Youtube" msgstr "" #: ../includes/ot-functions-option-types.php:2393 msgid "Dribbble" msgstr "" #: ../includes/ot-functions-option-types.php:2398 msgid "Github" msgstr "" #: ../includes/ot-functions-option-types.php:2403 msgid "Forrst" msgstr "" #: ../includes/ot-functions-option-types.php:2408 msgid "Digg" msgstr "" #: ../includes/ot-functions-option-types.php:2413 msgid "Delicious" msgstr "" #: ../includes/ot-functions-option-types.php:2418 msgid "Tumblr" msgstr "" #: ../includes/ot-functions-option-types.php:2423 msgid "Skype" msgstr "" #: ../includes/ot-functions-option-types.php:2428 msgid "SoundCloud" msgstr "" #: ../includes/ot-functions-option-types.php:2433 msgid "Vimeo" msgstr "" #: ../includes/ot-functions-option-types.php:2438 msgid "Flickr" msgstr "" #: ../includes/ot-functions-option-types.php:2443 msgid "VK.com" msgstr "" #: ../includes/ot-functions-option-types.php:2549 msgid "top" msgstr "" #: ../includes/ot-functions-option-types.php:2558 msgid "right" msgstr "" #: ../includes/ot-functions-option-types.php:2567 msgid "bottom" msgstr "" #: ../includes/ot-functions-option-types.php:2576 msgid "left" msgstr "" #: ../includes/ot-functions-option-types.php:2678 #: ../includes/ot-functions-option-types.php:2732 msgid "No Tags Found" msgstr "" #: ../includes/ot-functions-option-types.php:2790 #: ../includes/ot-functions-option-types.php:2847 msgid "No Taxonomies Found" msgstr "" #: ../includes/ot-functions-settings-page.php:35 msgid "Warning!" msgstr "" #: ../includes/ot-functions-settings-page.php:36 #, php-format msgid "" "Go to the %s page if you want to save data, this page is for adding settings." msgstr "" #: ../includes/ot-functions-settings-page.php:37 #, php-format msgid "" "If you're unsure or not completely positive that you should be editing these " "settings, you should read the %s first." msgstr "" #: ../includes/ot-functions-settings-page.php:38 msgid "" "Things could break or be improperly displayed to the end-user if you do one " "of the following:" msgstr "" #: ../includes/ot-functions-settings-page.php:39 msgid "" "Give two sections the same ID, give two settings the same ID, give two " "contextual help content areas the same ID, don't create any settings, or " "have a section at the end of the settings list." msgstr "" #: ../includes/ot-functions-settings-page.php:40 msgid "" "You can create as many settings as your project requires and use them how " "you see fit. When you add a setting here, it will be available on the Theme " "Options page for use in your theme. To separate your settings into sections, " "click the \"Add Section\" button, fill in the input fields, and a new " "navigation menu item will be created." msgstr "" #: ../includes/ot-functions-settings-page.php:41 msgid "" "All of the settings can be sorted and rearranged to your liking with Drag & " "Drop. Don't worry about the order in which you create your settings, you can " "always reorder them." msgstr "" #: ../includes/ot-functions-settings-page.php:92 msgid "Add Section" msgstr "" #: ../includes/ot-functions-settings-page.php:99 msgid "Contextual Help" msgstr "" #: ../includes/ot-functions-settings-page.php:103 msgid "Contextual Help Sidebar" msgstr "" #: ../includes/ot-functions-settings-page.php:103 msgid "" "If you decide to add contextual help to the Theme Option page, enter the " "optional \"Sidebar\" HTML here. This would be an extremely useful place to " "add links to your themes documentation or support forum. Only after you've " "added some content below will this display to the user." msgstr "" #: ../includes/ot-functions-settings-page.php:132 msgid "Add Contextual Help Content" msgstr "" #: ../includes/ot-functions-settings-page.php:168 msgid "" "This import method has been deprecated. That means it has been replaced by a " "new method and is no longer supported, and may be removed from future " "versions. All themes that use this import method should be converted to use " "its replacement below." msgstr "" #: ../includes/ot-functions-settings-page.php:170 #, php-format msgid "" "If you were given a Theme Options XML file with a premium or free theme, " "locate it on your hard drive and upload that file by clicking the upload " "button. A popup window will appear, upload the XML file and click \"%s\". " "The file URL should be in the upload input, if it is click \"Import XML\"." msgstr "" #: ../includes/ot-functions-settings-page.php:173 msgid "Import XML" msgstr "" #: ../includes/ot-functions-settings-page.php:189 msgid "Add XML" msgstr "" #: ../includes/ot-functions-settings-page.php:226 msgid "" "To import your Settings copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Settings" "\" button." msgstr "" #: ../includes/ot-functions-settings-page.php:229 msgid "Import Settings" msgstr "" #: ../includes/ot-functions-settings-page.php:271 msgid "" "Only after you've imported the Settings should you try and update your Theme " "Options." msgstr "" #: ../includes/ot-functions-settings-page.php:273 msgid "" "To import your Theme Options copy and paste what appears to be a random " "string of alpha numeric characters into this textarea and press the \"Import " "Theme Options\" button." msgstr "" #: ../includes/ot-functions-settings-page.php:276 msgid "Import Theme Options" msgstr "" #: ../includes/ot-functions-settings-page.php:318 msgid "" "Only after you've imported the Settings should you try and update your " "Layouts." msgstr "" #: ../includes/ot-functions-settings-page.php:320 msgid "" "To import your Layouts copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Layouts\" " "button. Keep in mind that when you import your layouts, the active layout's " "saved data will write over the current data set for your Theme Options." msgstr "" #: ../includes/ot-functions-settings-page.php:323 msgid "Import Layouts" msgstr "" #: ../includes/ot-functions-settings-page.php:366 #, php-format msgid "" "Export your Settings into a fully functional %s file. If you want to add " "your own custom %s text domain to the file, enter it into the text field " "before exporting. For more information on how to use this file read the " "documentation on %s. Remember, you should always check the file for errors " "before including it in your theme." msgstr "" #: ../includes/ot-functions-settings-page.php:375 msgid "Export Settings File" msgstr "" #: ../includes/ot-functions-settings-page.php:405 msgid "" "Export your Settings by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>Options Utils->Settings->Import</code> <strong>Settings</strong> " "textarea on another web site." msgstr "" #: ../includes/ot-functions-settings-page.php:441 msgid "" "You can export or back up your Theme Options data by highlighting this text, " "copying it, and pasting it into a blank text file. Then you can simply paste " "it into the Options Utils > Import Theme Options text area on another " "website. This is also a way to create manual backups of your Theme Options " "quickly." msgstr "" #: ../includes/ot-functions-settings-page.php:477 msgid "" "Export your Layouts by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>Options Utils->Settings->Import</code> <strong>Layouts</strong> " "textarea on another web site." msgstr "" #: ../includes/ot-functions-settings-page.php:519 msgid "" "To add a new layout enter a unique lower case alphanumeric string (dashes " "allowed) in the text field and click \"Save Layouts\"." msgstr "" #: ../includes/ot-functions-settings-page.php:520 msgid "" "As well, you can activate, remove, and drag & drop the order; all situations " "require you to click \"Save Layouts\" for the changes to be applied." msgstr "" #: ../includes/ot-functions-settings-page.php:521 msgid "" "When you create a new layout it will become active and any changes made to " "the Theme Options will be applied to it. If you switch back to a different " "layout immediately after creating a new layout that new layout will have a " "snapshot of the current Theme Options data attached to it." msgstr "" #: ../includes/ot-functions-settings-page.php:522 msgid "" "Visit <code>Options Utils->Documentation->Layouts Overview</code> to see a " "more in-depth description of what layouts are and how to use them." msgstr "" #: ../includes/ot-functions-settings-page.php:559 msgid "Save Layouts" msgstr "" #: ../includes/ot-settings-api.php:266 msgid "" "Theme Options are the backbone of Uncode. They are logically organised and " "give you full control over your website design and settings." msgstr "" #: ../includes/ot-settings-api.php:374 msgid "Options" msgstr "" #: ../includes/ot-settings-api.php:470 msgid "Reset Options" msgstr "" #: ../includes/ot-settings-api.php:480 msgid "Disable AJAX Saving" msgstr "" #: ../includes/ot-settings-api.php:480 msgid "Enable AJAX Saving" msgstr "" #: ../ot-loader.php:21 msgid "" "OptionTree is installed as a plugin and also embedded in your current theme. " "Please deactivate the plugin to load the theme dependent version of " "OptionTree, and remove this warning." msgstr "" includes/theme-options/languages/option-tree.pot 0000755 00000110354 15174671607 0016131 0 ustar 00 #, fuzzy msgid "" msgstr "" "Project-Id-Version: OptionTree\n" "POT-Creation-Date: 2018-03-13 11:57+0100\n" "PO-Revision-Date: 2018-02-08 10:25+0100\n" "Last-Translator: Undsgn Team <info@undsgn.com>\n" "Language-Team: Undsgn <info@undsgn.com>\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.6\n" "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" "_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-SearchPath-0: ..\n" "X-Poedit-SearchPathExcluded-0: ../.git\n" "X-Poedit-SearchPathExcluded-1: ../composer.json\n" "X-Poedit-SearchPathExcluded-2: ../assets\n" #: ../includes/ot-cleanup-api.php:84 ../includes/ot-cleanup-api.php:101 #: ../includes/ot-cleanup-api.php:130 msgid "OptionTree Cleanup" msgstr "" #: ../includes/ot-cleanup-api.php:101 #, php-format msgid "" "OptionTree has outdated data that should be removed. Please go to %s for " "more information." msgstr "" #: ../includes/ot-cleanup-api.php:136 msgid "Multiple Media Posts" msgstr "" #: ../includes/ot-cleanup-api.php:138 #, php-format msgid "" "There are currently %s OptionTree media posts in your database. At some " "point in the past, a version of OptionTree added multiple %s media post " "objects cluttering up your %s table. There is no associated risk or harm " "that these posts have caused other than to add size to your overall " "database. Thankfully, there is a way to remove all these orphaned media " "posts and get your database cleaned up." msgstr "" #: ../includes/ot-cleanup-api.php:140 #, php-format msgid "" "By clicking the button below, OptionTree will delete %s records and " "consolidate them into one single OptionTree media post for uploading " "attachments to. Additionally, the attachments will have their parent ID " "updated to the correct media post." msgstr "" #: ../includes/ot-cleanup-api.php:142 msgid "" "This could take a while to fully process depending on how many records you " "have in your database, so please be patient and wait for the script to " "finish." msgstr "" #: ../includes/ot-cleanup-api.php:144 #, php-format msgid "" "%s Your server is running in safe mode. Which means this page will " "automatically reload after deleting %s posts, you can filter this number " "using %s if your server is having trouble processing that many at one time." msgstr "" #: ../includes/ot-cleanup-api.php:146 msgid "Consolidate Posts" msgstr "" #: ../includes/ot-cleanup-api.php:174 msgid "Reloading..." msgstr "" #: ../includes/ot-cleanup-api.php:210 msgid "Clean up script has completed, the page will now reload..." msgstr "" #: ../includes/ot-cleanup-api.php:230 msgid "Outdated Table" msgstr "" #: ../includes/ot-cleanup-api.php:232 #, php-format msgid "" "If you have upgraded from an old 1.x version of OptionTree at some point, " "you have an extra %s table in your database that can be removed. It's not " "hurting anything, but does not need to be there. If you want to remove it. " "Click the button below." msgstr "" #: ../includes/ot-cleanup-api.php:234 msgid "Drop Table" msgstr "" #: ../includes/ot-cleanup-api.php:238 #, php-format msgid "Deleting the outdated and unused %s table..." msgstr "" #: ../includes/ot-cleanup-api.php:244 #, php-format msgid "The %s table has been successfully deleted. The page will now reload..." msgstr "" #: ../includes/ot-cleanup-api.php:256 #, php-format msgid "Something went wrong. The %s table was not deleted." msgstr "" #: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51 #: ../includes/ot-functions-admin.php:169 #: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:363 #: ../includes/ot-settings-api.php:265 msgid "Theme Options" msgstr "" #: ../includes/ot-functions-admin.php:56 ../includes/ot-functions-admin.php:126 #: ../includes/ot-functions-admin.php:220 msgid "Theme Options updated." msgstr "" #: ../includes/ot-functions-admin.php:57 ../includes/ot-functions-admin.php:127 #: ../includes/ot-functions-admin.php:221 msgid "Theme Options reset." msgstr "" #: ../includes/ot-functions-admin.php:58 #: ../includes/ot-functions-settings-page.php:94 #, fuzzy msgid "Save Changes" msgstr "Salvami" #: ../includes/ot-functions-admin.php:97 msgid "" "The Theme Options UI Builder is being overridden by a custom file in your " "theme. Any changes you make via the UI Builder will not be saved." msgstr "" #: ../includes/ot-functions-admin.php:109 #: ../includes/ot-functions-admin.php:110 msgid "OptionTree" msgstr "" #: ../includes/ot-functions-admin.php:120 #: ../includes/ot-functions-admin.php:121 msgid "Settings" msgstr "" #: ../includes/ot-functions-admin.php:128 #: ../includes/ot-functions-admin.php:222 msgid "Save Settings" msgstr "" #: ../includes/ot-functions-admin.php:133 msgid "Theme Options UI" msgstr "" #: ../includes/ot-functions-admin.php:137 msgid "Export" msgstr "" #: ../includes/ot-functions-admin.php:141 msgid "Import" msgstr "" #: ../includes/ot-functions-admin.php:145 #: ../includes/ot-functions-admin.php:175 #: ../includes/ot-functions-admin.php:199 msgid "Layouts" msgstr "" #: ../includes/ot-functions-admin.php:205 msgid "Layout Management" msgstr "" #: ../includes/ot-functions-admin.php:214 #: ../includes/ot-functions-admin.php:215 msgid "Documentation" msgstr "" #: ../includes/ot-functions-admin.php:227 msgid "Creating Options" msgstr "" #: ../includes/ot-functions-admin.php:231 msgid "Option Types" msgstr "" #: ../includes/ot-functions-admin.php:235 msgid "Function References" msgstr "" #: ../includes/ot-functions-admin.php:239 #: ../includes/ot-functions-admin.php:281 #: ../includes/ot-functions-settings-page.php:366 msgid "Theme Mode" msgstr "" #: ../includes/ot-functions-admin.php:243 #: ../includes/ot-functions-admin.php:287 msgid "Meta Boxes" msgstr "" #: ../includes/ot-functions-admin.php:247 msgid "Code Examples" msgstr "" #: ../includes/ot-functions-admin.php:251 msgid "Layouts Overview" msgstr "" #: ../includes/ot-functions-admin.php:257 msgid "Overview of available Theme Option fields." msgstr "" #: ../includes/ot-functions-admin.php:263 msgid "Option types in alphabetical order & hooks to filter them." msgstr "" #: ../includes/ot-functions-admin.php:269 msgid "Function Reference:ot_get_option()" msgstr "" #: ../includes/ot-functions-admin.php:275 msgid "Function Reference:get_option_tree()" msgstr "" #: ../includes/ot-functions-admin.php:293 msgid "Code examples for front-end development." msgstr "" #: ../includes/ot-functions-admin.php:299 msgid "What's a layout anyhow?" msgstr "" #: ../includes/ot-functions-admin.php:502 #: ../includes/ot-functions-admin.php:604 #: ../includes/ot-functions-admin.php:673 #, php-format msgid "The %s input field for %s only allows numeric values." msgstr "" #: ../includes/ot-functions-admin.php:563 #, php-format msgid "The %s Colorpicker only allows valid hexadecimal or rgba values." msgstr "" #: ../includes/ot-functions-admin.php:840 #: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:785 msgid "Send to OptionTree" msgstr "" #: ../includes/ot-functions-admin.php:841 #: ../includes/ot-functions-option-types.php:257 #: ../includes/ot-functions-option-types.php:3299 msgid "Remove Media" msgstr "" #: ../includes/ot-functions-admin.php:842 msgid "Are you sure you want to reset back to the defaults?" msgstr "" #: ../includes/ot-functions-admin.php:843 msgid "You can't remove this! But you can edit the values." msgstr "" #: ../includes/ot-functions-admin.php:844 msgid "Are you sure you want to remove this?" msgstr "" #: ../includes/ot-functions-admin.php:845 msgid "Are you sure you want to activate this layout?" msgstr "" #: ../includes/ot-functions-admin.php:846 msgid "Sorry, you can't have settings three levels deep." msgstr "" #: ../includes/ot-functions-admin.php:847 #: ../includes/ot-functions-option-types.php:1227 msgid "Delete Gallery" msgstr "" #: ../includes/ot-functions-admin.php:848 #: ../includes/ot-functions-option-types.php:1228 msgid "Edit Gallery" msgstr "" #: ../includes/ot-functions-admin.php:849 #: ../includes/ot-functions-option-types.php:1235 msgid "Create Gallery" msgstr "" #: ../includes/ot-functions-admin.php:850 msgid "Are you sure you want to delete this Gallery?" msgstr "" #: ../includes/ot-functions-admin.php:851 msgid "Today" msgstr "" #: ../includes/ot-functions-admin.php:852 msgid "Now" msgstr "" #: ../includes/ot-functions-admin.php:853 msgid "Close" msgstr "" #: ../includes/ot-functions-admin.php:854 msgid "Featured Image" msgstr "" #: ../includes/ot-functions-admin.php:855 #: ../includes/ot-functions-admin.php:3303 #: ../includes/ot-functions-admin.php:3364 msgid "Image" msgstr "" #: ../includes/ot-functions-admin.php:923 msgid "Option Tree" msgstr "" #: ../includes/ot-functions-admin.php:1061 msgid "General" msgstr "" #: ../includes/ot-functions-admin.php:1067 msgid "Sample Text Field Label" msgstr "" #: ../includes/ot-functions-admin.php:1068 msgid "Description for the sample text field." msgstr "" #: ../includes/ot-functions-admin.php:2312 #: ../includes/ot-functions-admin.php:2314 msgid "Settings updated." msgstr "" #: ../includes/ot-functions-admin.php:2320 #: ../includes/ot-functions-admin.php:2322 msgid "Settings could not be saved." msgstr "" #: ../includes/ot-functions-admin.php:2332 #: ../includes/ot-functions-admin.php:2334 msgid "Settings Imported." msgstr "" #: ../includes/ot-functions-admin.php:2340 #: ../includes/ot-functions-admin.php:2342 msgid "Settings could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2351 #: ../includes/ot-functions-admin.php:2353 msgid "Data Imported." msgstr "" #: ../includes/ot-functions-admin.php:2359 #: ../includes/ot-functions-admin.php:2361 msgid "Data could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2371 #: ../includes/ot-functions-admin.php:2373 msgid "Layouts Imported." msgstr "" #: ../includes/ot-functions-admin.php:2379 #: ../includes/ot-functions-admin.php:2381 msgid "Layouts could not be imported." msgstr "" #: ../includes/ot-functions-admin.php:2391 #: ../includes/ot-functions-admin.php:2393 msgid "Layouts Updated." msgstr "" #: ../includes/ot-functions-admin.php:2399 #: ../includes/ot-functions-admin.php:2401 msgid "Layouts could not be updated." msgstr "" #: ../includes/ot-functions-admin.php:2407 #: ../includes/ot-functions-admin.php:2409 msgid "Layouts have been deleted." msgstr "" #: ../includes/ot-functions-admin.php:2417 #: ../includes/ot-functions-admin.php:2419 msgid "Layout activated." msgstr "" #: ../includes/ot-functions-admin.php:2467 msgid "Background" msgstr "" #: ../includes/ot-functions-admin.php:2468 msgid "Border" msgstr "" #: ../includes/ot-functions-admin.php:2469 msgid "Box Shadow" msgstr "" #: ../includes/ot-functions-admin.php:2470 msgid "Category Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2471 msgid "Category Select" msgstr "" #: ../includes/ot-functions-admin.php:2472 msgid "Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2473 msgid "Colorpicker" msgstr "" #: ../includes/ot-functions-admin.php:2474 msgid "Gradientpicker" msgstr "" #: ../includes/ot-functions-admin.php:2475 msgid "Colorpicker Opacity" msgstr "" #: ../includes/ot-functions-admin.php:2476 msgid "CSS" msgstr "" #: ../includes/ot-functions-admin.php:2477 msgid "Custom Post Type Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2478 msgid "Custom Post Type Select" msgstr "" #: ../includes/ot-functions-admin.php:2479 msgid "Date Picker" msgstr "" #: ../includes/ot-functions-admin.php:2480 msgid "Date Time Picker" msgstr "" #: ../includes/ot-functions-admin.php:2481 msgid "Dimension" msgstr "" #: ../includes/ot-functions-admin.php:2482 #: ../includes/ot-functions-admin.php:5524 msgid "Gallery" msgstr "" #: ../includes/ot-functions-admin.php:2483 msgid "Google Fonts" msgstr "" #: ../includes/ot-functions-admin.php:2484 msgid "JavaScript" msgstr "" #: ../includes/ot-functions-admin.php:2485 msgid "Link Color" msgstr "" #: ../includes/ot-functions-admin.php:2486 msgid "List Item" msgstr "" #: ../includes/ot-functions-admin.php:2487 msgid "Measurement" msgstr "" #: ../includes/ot-functions-admin.php:2488 msgid "Numeric Slider" msgstr "" #: ../includes/ot-functions-admin.php:2489 msgid "On/Off" msgstr "" #: ../includes/ot-functions-admin.php:2490 msgid "Page Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2491 msgid "Page Select" msgstr "" #: ../includes/ot-functions-admin.php:2492 msgid "Post Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2493 msgid "Post Select" msgstr "" #: ../includes/ot-functions-admin.php:2494 msgid "Radio" msgstr "" #: ../includes/ot-functions-admin.php:2495 msgid "Radio Image" msgstr "" #: ../includes/ot-functions-admin.php:2496 msgid "Select" msgstr "" #: ../includes/ot-functions-admin.php:2497 msgid "Sidebar Select" msgstr "" #: ../includes/ot-functions-admin.php:2498 msgid "Slider" msgstr "" #: ../includes/ot-functions-admin.php:2499 msgid "Social Links" msgstr "" #: ../includes/ot-functions-admin.php:2500 msgid "Spacing" msgstr "" #: ../includes/ot-functions-admin.php:2501 msgid "Tab" msgstr "" #: ../includes/ot-functions-admin.php:2502 msgid "Tag Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2503 msgid "Tag Select" msgstr "" #: ../includes/ot-functions-admin.php:2504 msgid "Taxonomy Checkbox" msgstr "" #: ../includes/ot-functions-admin.php:2505 msgid "Taxonomy Select" msgstr "" #: ../includes/ot-functions-admin.php:2506 msgid "Text" msgstr "" #: ../includes/ot-functions-admin.php:2507 msgid "Textarea" msgstr "" #: ../includes/ot-functions-admin.php:2508 msgid "Textarea Simple" msgstr "" #: ../includes/ot-functions-admin.php:2509 msgid "Textblock" msgstr "" #: ../includes/ot-functions-admin.php:2510 msgid "Textblock Titled" msgstr "" #: ../includes/ot-functions-admin.php:2511 msgid "Typography" msgstr "" #: ../includes/ot-functions-admin.php:2512 msgid "Upload" msgstr "" #: ../includes/ot-functions-admin.php:3248 msgid "Left Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3253 msgid "Right Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3258 msgid "Full Width (no sidebar)" msgstr "" #: ../includes/ot-functions-admin.php:3263 msgid "Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3268 msgid "Left Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3273 msgid "Right Dual Sidebar" msgstr "" #: ../includes/ot-functions-admin.php:3314 #: ../includes/ot-functions-admin.php:3370 #: ../includes/ot-functions-admin.php:5564 msgid "Link" msgstr "" #: ../includes/ot-functions-admin.php:3325 #: ../includes/ot-functions-admin.php:3376 msgid "Description" msgstr "" #: ../includes/ot-functions-admin.php:3440 msgid "Name" msgstr "" #: ../includes/ot-functions-admin.php:3441 msgid "Enter the name of the social website." msgstr "" #: ../includes/ot-functions-admin.php:3449 msgid "Enter the text shown in the title attribute of the link." msgstr "" #: ../includes/ot-functions-admin.php:3455 #, php-format msgid "" "Enter a link to the profile or page on the social website. Remember to add " "the %s part to the front of the link." msgstr "" #: ../includes/ot-functions-admin.php:3812 #, php-format msgid "Unable to write to file %s." msgstr "" #: ../includes/ot-functions-admin.php:4082 msgid "edit" msgstr "" #: ../includes/ot-functions-admin.php:4083 #: ../includes/ot-functions-admin.php:4151 #: ../includes/ot-functions-admin.php:4152 #: ../includes/ot-functions-admin.php:4314 #: ../includes/ot-functions-admin.php:4315 #: ../includes/ot-functions-admin.php:4380 #: ../includes/ot-functions-admin.php:4381 #: ../includes/ot-functions-admin.php:4508 #: ../includes/ot-functions-admin.php:4509 #: ../includes/ot-functions-admin.php:4661 #: ../includes/ot-functions-admin.php:4662 #: ../includes/ot-functions-option-types.php:944 #: ../includes/ot-functions-option-types.php:945 #: ../includes/ot-functions-option-types.php:2182 #: ../includes/ot-functions-option-types.php:2183 msgid "Edit" msgstr "" #: ../includes/ot-functions-admin.php:4085 #: ../includes/ot-functions-admin.php:4086 #: ../includes/ot-functions-admin.php:4154 #: ../includes/ot-functions-admin.php:4155 #: ../includes/ot-functions-admin.php:4317 #: ../includes/ot-functions-admin.php:4318 #: ../includes/ot-functions-admin.php:4383 #: ../includes/ot-functions-admin.php:4384 #: ../includes/ot-functions-admin.php:4442 #: ../includes/ot-functions-admin.php:4443 #: ../includes/ot-functions-admin.php:4511 #: ../includes/ot-functions-admin.php:4512 #: ../includes/ot-functions-admin.php:4664 #: ../includes/ot-functions-admin.php:4665 msgid "Delete" msgstr "" #: ../includes/ot-functions-admin.php:4092 msgid "" "<strong>Section Title</strong>: Displayed as a menu item on the Theme " "Options page." msgstr "" #: ../includes/ot-functions-admin.php:4100 msgid "" "<strong>Section ID</strong>: A unique lower case alphanumeric string, " "underscores allowed." msgstr "" #: ../includes/ot-functions-admin.php:4161 msgid "" "<strong>Label</strong>: Displayed as the label of a form element on the " "Theme Options page." msgstr "" #: ../includes/ot-functions-admin.php:4169 #: ../includes/ot-functions-admin.php:4398 msgid "" "<strong>ID</strong>: A unique lower case alphanumeric string, underscores " "allowed." msgstr "" #: ../includes/ot-functions-admin.php:4177 msgid "" "<strong>Type</strong>: Choose one of the available option types from the " "dropdown." msgstr "" #: ../includes/ot-functions-admin.php:4188 msgid "" "<strong>Description</strong>: Enter a detailed description for the users to " "read on the Theme Options page, HTML is allowed. This is also where you " "enter content for both the Textblock & Textblock Titled option types." msgstr "" #: ../includes/ot-functions-admin.php:4196 msgid "" "<strong>Choices</strong>: This will only affect the following option types: " "Checkbox, Radio, Select & Select Image." msgstr "" #: ../includes/ot-functions-admin.php:4201 msgid "Add Choice" msgstr "" #: ../includes/ot-functions-admin.php:4207 msgid "" "<strong>Settings</strong>: This will only affect the List Item option type." msgstr "" #: ../includes/ot-functions-admin.php:4212 #: ../includes/ot-functions-settings-page.php:93 msgid "Add Setting" msgstr "" #: ../includes/ot-functions-admin.php:4218 msgid "" "<strong>Standard</strong>: Setting the standard value for your option only " "works for some option types. Read the <code>OptionTree->Documentation</code> " "for more information on which ones." msgstr "" #: ../includes/ot-functions-admin.php:4226 msgid "" "<strong>Rows</strong>: Enter a numeric value for the number of rows in your " "textarea. This will only affect the following option types: CSS, Textarea, & " "Textarea Simple." msgstr "" #: ../includes/ot-functions-admin.php:4234 msgid "" "<strong>Post Type</strong>: Add a comma separated list of post type like " "'post,page'. This will only affect the following option types: Custom Post " "Type Checkbox, & Custom Post Type Select." msgstr "" #: ../includes/ot-functions-admin.php:4242 msgid "" "<strong>Taxonomy</strong>: Add a comma separated list of any registered " "taxonomy like 'category,post_tag'. This will only affect the following " "option types: Taxonomy Checkbox, & Taxonomy Select." msgstr "" #: ../includes/ot-functions-admin.php:4250 msgid "" "<strong>Min, Max, & Step</strong>: Add a comma separated list of options in " "the following format <code>0,100,1</code> (slide from <code>0-100</code> in " "intervals of <code>1</code>). The three values represent the minimum, " "maximum, and step options and will only affect the Numeric Slider option " "type." msgstr "" #: ../includes/ot-functions-admin.php:4258 msgid "<strong>CSS Class</strong>: Add and optional class to this option type." msgstr "" #: ../includes/ot-functions-admin.php:4266 #, php-format msgid "" "<strong>Condition</strong>: Add a comma separated list (no spaces) of " "conditions in which the field will be visible, leave this setting empty to " "always show the field. In these examples, <code>value</code> is a " "placeholder for your condition, which can be in the form of %s." msgstr "" #: ../includes/ot-functions-admin.php:4274 msgid "" "<strong>Operator</strong>: Choose the logical operator to compute the result " "of the conditions." msgstr "" #: ../includes/ot-functions-admin.php:4277 msgid "and" msgstr "" #: ../includes/ot-functions-admin.php:4278 msgid "or" msgstr "" #: ../includes/ot-functions-admin.php:4324 msgid "Label" msgstr "" #: ../includes/ot-functions-admin.php:4334 msgid "Value" msgstr "" #: ../includes/ot-functions-admin.php:4344 msgid "Image Source (Radio Image only)" msgstr "" #: ../includes/ot-functions-admin.php:4390 msgid "" "<strong>Title</strong>: Displayed as a contextual help menu item on the " "Theme Options page." msgstr "" #: ../includes/ot-functions-admin.php:4406 msgid "" "<strong>Content</strong>: Enter the HTML content about this contextual help " "item displayed on the Theme Option page for end users to read." msgstr "" #: ../includes/ot-functions-admin.php:4437 msgid "Layout" msgstr "" #: ../includes/ot-functions-admin.php:4439 #: ../includes/ot-functions-admin.php:4440 msgid "Activate" msgstr "" #: ../includes/ot-functions-admin.php:4476 ../includes/ot-meta-box-api.php:235 #: ../includes/ot-settings-api.php:755 msgid "Title" msgstr "" #: ../includes/ot-functions-admin.php:4816 msgid "Enter a Layout Name" msgstr "" #: ../includes/ot-functions-admin.php:4818 msgid "Save New Layout" msgstr "" #: ../includes/ot-functions-admin.php:5573 msgid "Link URL" msgstr "" #: ../includes/ot-functions-admin.php:5580 msgid "Link Title" msgstr "" #: ../includes/ot-functions-admin.php:5610 msgid "Quote" msgstr "" #: ../includes/ot-functions-admin.php:5619 msgid "Source Name (ex. author, singer, actor)" msgstr "" #: ../includes/ot-functions-admin.php:5626 msgid "Source URL" msgstr "" #: ../includes/ot-functions-admin.php:5633 msgid "Source Title (ex. book, song, movie)" msgstr "" #: ../includes/ot-functions-admin.php:5640 msgid "Source Date" msgstr "" #: ../includes/ot-functions-admin.php:5670 msgid "Video" msgstr "" #: ../includes/ot-functions-admin.php:5679 #, php-format msgid "" "Embed video from services like Youtube, Vimeo, or Hulu. You can find a list " "of supported oEmbed sites in the %1$s. Alternatively, you could use the " "built-in %2$s shortcode." msgstr "" #: ../includes/ot-functions-admin.php:5679 #: ../includes/ot-functions-admin.php:5718 msgid "WordPress Codex" msgstr "" #: ../includes/ot-functions-admin.php:5709 msgid "Audio" msgstr "" #: ../includes/ot-functions-admin.php:5718 #, php-format msgid "" "Embed audio from services like SoundCloud and Rdio. You can find a list of " "supported oEmbed sites in the %1$s. Alternatively, you could use the built-" "in %2$s shortcode." msgstr "" #: ../includes/ot-functions-option-types.php:46 msgid "Sorry, this function does not exist" msgstr "" #: ../includes/ot-functions-option-types.php:134 msgid "background-repeat" msgstr "" #: ../includes/ot-functions-option-types.php:152 msgid "background-attachment" msgstr "" #: ../includes/ot-functions-option-types.php:171 msgid "background-position" msgstr "" #: ../includes/ot-functions-option-types.php:224 msgid "background-size" msgstr "" #: ../includes/ot-functions-option-types.php:238 msgid "background-image" msgstr "" #: ../includes/ot-functions-option-types.php:241 #: ../includes/ot-functions-option-types.php:3283 msgid "Add Media" msgstr "" #: ../includes/ot-functions-option-types.php:316 #: ../includes/ot-functions-option-types.php:1113 msgid "width" msgstr "" #: ../includes/ot-functions-option-types.php:327 #: ../includes/ot-functions-option-types.php:1133 #: ../includes/ot-functions-option-types.php:1618 #: ../includes/ot-functions-option-types.php:2587 msgid "unit" msgstr "" #: ../includes/ot-functions-option-types.php:346 msgid "style" msgstr "" #: ../includes/ot-functions-option-types.php:439 msgid "offset-x" msgstr "" #: ../includes/ot-functions-option-types.php:448 msgid "offset-y" msgstr "" #: ../includes/ot-functions-option-types.php:457 msgid "blur-radius" msgstr "" #: ../includes/ot-functions-option-types.php:466 msgid "spread-radius" msgstr "" #: ../includes/ot-functions-option-types.php:538 #: ../includes/ot-functions-option-types.php:592 msgid "No Categories Found" msgstr "" #: ../includes/ot-functions-option-types.php:587 #: ../includes/ot-functions-option-types.php:928 #: ../includes/ot-functions-option-types.php:1887 #: ../includes/ot-functions-option-types.php:1998 #: ../includes/ot-functions-option-types.php:2727 #: ../includes/ot-functions-option-types.php:2842 msgid "Choose One" msgstr "" #: ../includes/ot-functions-option-types.php:874 #: ../includes/ot-functions-option-types.php:937 #: ../includes/ot-functions-option-types.php:1949 #: ../includes/ot-functions-option-types.php:2004 msgid "No Posts Found" msgstr "" #: ../includes/ot-functions-option-types.php:1122 msgid "height" msgstr "" #: ../includes/ot-functions-option-types.php:1300 #: ../includes/ot-functions-option-types.php:1343 msgid "Remove Google Font" msgstr "" #: ../includes/ot-functions-option-types.php:1302 #: ../includes/ot-functions-option-types.php:1345 msgid "-- Choose One --" msgstr "" #: ../includes/ot-functions-option-types.php:1366 msgid "Add Google Font" msgstr "" #: ../includes/ot-functions-option-types.php:1452 msgctxt "color picker" msgid "Standard" msgstr "" #: ../includes/ot-functions-option-types.php:1453 msgctxt "color picker" msgid "Hover" msgstr "" #: ../includes/ot-functions-option-types.php:1454 msgctxt "color picker" msgid "Active" msgstr "" #: ../includes/ot-functions-option-types.php:1455 msgctxt "color picker" msgid "Visited" msgstr "" #: ../includes/ot-functions-option-types.php:1456 msgctxt "color picker" msgid "Focus" msgstr "" #: ../includes/ot-functions-option-types.php:1565 #: ../includes/ot-functions-option-types.php:2327 #: ../includes/ot-functions-option-types.php:2492 msgid "Add New" msgstr "" #: ../includes/ot-functions-option-types.php:1568 #: ../includes/ot-functions-option-types.php:2330 #: ../includes/ot-functions-option-types.php:2495 msgid "You can re-order with drag & drop, the order will update after saving." msgstr "" #: ../includes/ot-functions-option-types.php:1738 msgid "On" msgstr "" #: ../includes/ot-functions-option-types.php:1760 msgid "Off" msgstr "" #: ../includes/ot-functions-option-types.php:1838 #: ../includes/ot-functions-option-types.php:1893 msgid "No Pages Found" msgstr "" #: ../includes/ot-functions-option-types.php:2250 msgid "Default Sidebar" msgstr "" #: ../includes/ot-functions-option-types.php:2255 msgid "No Sidebars" msgstr "" #: ../includes/ot-functions-option-types.php:2363 msgid "Facebook" msgstr "" #: ../includes/ot-functions-option-types.php:2368 msgid "Twitter" msgstr "" #: ../includes/ot-functions-option-types.php:2373 msgid "Google+" msgstr "" #: ../includes/ot-functions-option-types.php:2378 msgid "LinkedIn" msgstr "" #: ../includes/ot-functions-option-types.php:2383 msgid "Pinterest" msgstr "" #: ../includes/ot-functions-option-types.php:2388 msgid "Youtube" msgstr "" #: ../includes/ot-functions-option-types.php:2393 msgid "Dribbble" msgstr "" #: ../includes/ot-functions-option-types.php:2398 msgid "Github" msgstr "" #: ../includes/ot-functions-option-types.php:2403 msgid "Forrst" msgstr "" #: ../includes/ot-functions-option-types.php:2408 msgid "Digg" msgstr "" #: ../includes/ot-functions-option-types.php:2413 msgid "Delicious" msgstr "" #: ../includes/ot-functions-option-types.php:2418 msgid "Tumblr" msgstr "" #: ../includes/ot-functions-option-types.php:2423 msgid "Skype" msgstr "" #: ../includes/ot-functions-option-types.php:2428 msgid "SoundCloud" msgstr "" #: ../includes/ot-functions-option-types.php:2433 msgid "Vimeo" msgstr "" #: ../includes/ot-functions-option-types.php:2438 msgid "Flickr" msgstr "" #: ../includes/ot-functions-option-types.php:2443 msgid "VK.com" msgstr "" #: ../includes/ot-functions-option-types.php:2549 msgid "top" msgstr "" #: ../includes/ot-functions-option-types.php:2558 msgid "right" msgstr "" #: ../includes/ot-functions-option-types.php:2567 msgid "bottom" msgstr "" #: ../includes/ot-functions-option-types.php:2576 msgid "left" msgstr "" #: ../includes/ot-functions-option-types.php:2678 #: ../includes/ot-functions-option-types.php:2732 msgid "No Tags Found" msgstr "" #: ../includes/ot-functions-option-types.php:2790 #: ../includes/ot-functions-option-types.php:2847 msgid "No Taxonomies Found" msgstr "" #: ../includes/ot-functions-settings-page.php:35 msgid "Warning!" msgstr "" #: ../includes/ot-functions-settings-page.php:36 #, php-format msgid "" "Go to the %s page if you want to save data, this page is for adding settings." msgstr "" #: ../includes/ot-functions-settings-page.php:37 #, php-format msgid "" "If you're unsure or not completely positive that you should be editing these " "settings, you should read the %s first." msgstr "" #: ../includes/ot-functions-settings-page.php:38 msgid "" "Things could break or be improperly displayed to the end-user if you do one " "of the following:" msgstr "" #: ../includes/ot-functions-settings-page.php:39 msgid "" "Give two sections the same ID, give two settings the same ID, give two " "contextual help content areas the same ID, don't create any settings, or " "have a section at the end of the settings list." msgstr "" #: ../includes/ot-functions-settings-page.php:40 msgid "" "You can create as many settings as your project requires and use them how " "you see fit. When you add a setting here, it will be available on the Theme " "Options page for use in your theme. To separate your settings into sections, " "click the \"Add Section\" button, fill in the input fields, and a new " "navigation menu item will be created." msgstr "" #: ../includes/ot-functions-settings-page.php:41 msgid "" "All of the settings can be sorted and rearranged to your liking with Drag & " "Drop. Don't worry about the order in which you create your settings, you can " "always reorder them." msgstr "" #: ../includes/ot-functions-settings-page.php:92 msgid "Add Section" msgstr "" #: ../includes/ot-functions-settings-page.php:99 msgid "Contextual Help" msgstr "" #: ../includes/ot-functions-settings-page.php:103 msgid "Contextual Help Sidebar" msgstr "" #: ../includes/ot-functions-settings-page.php:103 msgid "" "If you decide to add contextual help to the Theme Option page, enter the " "optional \"Sidebar\" HTML here. This would be an extremely useful place to " "add links to your themes documentation or support forum. Only after you've " "added some content below will this display to the user." msgstr "" #: ../includes/ot-functions-settings-page.php:132 msgid "Add Contextual Help Content" msgstr "" #: ../includes/ot-functions-settings-page.php:168 msgid "" "This import method has been deprecated. That means it has been replaced by a " "new method and is no longer supported, and may be removed from future " "versions. All themes that use this import method should be converted to use " "its replacement below." msgstr "" #: ../includes/ot-functions-settings-page.php:170 #, php-format msgid "" "If you were given a Theme Options XML file with a premium or free theme, " "locate it on your hard drive and upload that file by clicking the upload " "button. A popup window will appear, upload the XML file and click \"%s\". " "The file URL should be in the upload input, if it is click \"Import XML\"." msgstr "" #: ../includes/ot-functions-settings-page.php:173 msgid "Import XML" msgstr "" #: ../includes/ot-functions-settings-page.php:189 msgid "Add XML" msgstr "" #: ../includes/ot-functions-settings-page.php:226 msgid "" "To import your Settings copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Settings" "\" button." msgstr "" #: ../includes/ot-functions-settings-page.php:229 msgid "Import Settings" msgstr "" #: ../includes/ot-functions-settings-page.php:271 msgid "" "Only after you've imported the Settings should you try and update your Theme " "Options." msgstr "" #: ../includes/ot-functions-settings-page.php:273 msgid "" "To import your Theme Options copy and paste what appears to be a random " "string of alpha numeric characters into this textarea and press the \"Import " "Theme Options\" button." msgstr "" #: ../includes/ot-functions-settings-page.php:276 msgid "Import Theme Options" msgstr "" #: ../includes/ot-functions-settings-page.php:318 msgid "" "Only after you've imported the Settings should you try and update your " "Layouts." msgstr "" #: ../includes/ot-functions-settings-page.php:320 msgid "" "To import your Layouts copy and paste what appears to be a random string of " "alpha numeric characters into this textarea and press the \"Import Layouts\" " "button. Keep in mind that when you import your layouts, the active layout's " "saved data will write over the current data set for your Theme Options." msgstr "" #: ../includes/ot-functions-settings-page.php:323 msgid "Import Layouts" msgstr "" #: ../includes/ot-functions-settings-page.php:366 #, php-format msgid "" "Export your Settings into a fully functional %s file. If you want to add " "your own custom %s text domain to the file, enter it into the text field " "before exporting. For more information on how to use this file read the " "documentation on %s. Remember, you should always check the file for errors " "before including it in your theme." msgstr "" #: ../includes/ot-functions-settings-page.php:375 msgid "Export Settings File" msgstr "" #: ../includes/ot-functions-settings-page.php:405 msgid "" "Export your Settings by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>Options Utils->Settings->Import</code> <strong>Settings</strong> " "textarea on another web site." msgstr "" #: ../includes/ot-functions-settings-page.php:441 msgid "" "You can export or back up your Theme Options data by highlighting this text, " "copying it, and pasting it into a blank text file. Then you can simply paste " "it into the Options Utils > Import Theme Options text area on another " "website. This is also a way to create manual backups of your Theme Options " "quickly." msgstr "" #: ../includes/ot-functions-settings-page.php:477 msgid "" "Export your Layouts by highlighting this text and doing a copy/paste into a " "blank .txt file. Then save the file for importing into another install of " "WordPress later. Alternatively, you could just paste it into the " "<code>Options Utils->Settings->Import</code> <strong>Layouts</strong> " "textarea on another web site." msgstr "" #: ../includes/ot-functions-settings-page.php:519 msgid "" "To add a new layout enter a unique lower case alphanumeric string (dashes " "allowed) in the text field and click \"Save Layouts\"." msgstr "" #: ../includes/ot-functions-settings-page.php:520 msgid "" "As well, you can activate, remove, and drag & drop the order; all situations " "require you to click \"Save Layouts\" for the changes to be applied." msgstr "" #: ../includes/ot-functions-settings-page.php:521 msgid "" "When you create a new layout it will become active and any changes made to " "the Theme Options will be applied to it. If you switch back to a different " "layout immediately after creating a new layout that new layout will have a " "snapshot of the current Theme Options data attached to it." msgstr "" #: ../includes/ot-functions-settings-page.php:522 msgid "" "Visit <code>Options Utils->Documentation->Layouts Overview</code> to see a " "more in-depth description of what layouts are and how to use them." msgstr "" #: ../includes/ot-functions-settings-page.php:559 msgid "Save Layouts" msgstr "" #: ../includes/ot-settings-api.php:266 msgid "" "Theme Options are the backbone of Uncode. They are logically organised and " "give you full control over your website design and settings." msgstr "" #: ../includes/ot-settings-api.php:374 msgid "Options" msgstr "" #: ../includes/ot-settings-api.php:470 msgid "Reset Options" msgstr "" #: ../includes/ot-settings-api.php:480 msgid "Disable AJAX Saving" msgstr "" #: ../includes/ot-settings-api.php:480 msgid "Enable AJAX Saving" msgstr "" #: ../ot-loader.php:21 msgid "" "OptionTree is installed as a plugin and also embedded in your current theme. " "Please deactivate the plugin to load the theme dependent version of " "OptionTree, and remove this warning." msgstr "" includes/theme-options/languages/option-tree-et.mo 0000755 00000240536 15174671607 0016356 0 ustar 00 �� � � A , 0$ v 1$ � �$ �% G �% s �% M&