WP怎样修改maximum upload file size等参数

有三种方法可以修改。

通过.htaccess文件:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
//php_value max_excecution_time 300
//php_value max_input_time 300

通过wp-config.php文件:


@ini_set('upload_max_filesize','128M');
@ini_set('post_max_size','128M');
@ini_set('memory_limit','256M');
@ini_set('max_execution_time','300');
@ini_set('max_input_time','300');

通过插件:

https://import.wp-migration.com

WP超强免费后台框架kirki详细解说

WordPress后台框架有很多,如codestar之类的。虽然说本身theme option和metabox 也不是很难,但是用框架的话开发会迅速很多。

我们一个博客主题的自带后台框架开发功能非常全面,下次我们会进行详细解释,本次我们来介绍wordpress一个功能全面的customize api框架,也叫toolkit。官网是https://kirki.org/

kirki简化了wp的customizer api, 并自带30多个控制器。

要使用kirki,首先去官网上下载。目前kirki没有收费版,点击免费版,随便填写注册信息即可。

集成主题方式

Kirki有二种方式可以集成到你的主题当中。一种是作为插件,一种是与主题并入。

如果你用tgmpa或者merlinwp来创建引导页的话,你可以把kirki的插件安装到推荐必须的插件里面去。如果你没用上面的脚本的话,你可以把这段脚本添加到你的网站中来来要求主题强制安装kirki.

脚本用法:从这段脚本复制出来然后创建inc/class-kirki-installer-section.php,然后在functions.php里面加上这段:

include_once get_theme_file_path( 'inc/class-kirki-installer-section.php' );

如何并入到你的主题当中

把kirki文件夹安装到你的主题文件夹当中,然后在functions.php里面引入kirki文件夹下面的插件主要文件kirki.php就可以了。这种方式的话缺少了灵活性。

接下来我们要进行kirki的配置。

当你创建了一个项目之后,你第一件事情要做的就是创建一个配置文件。配置文件允许每一个项目可以使用不一样的设置就像标识符一样。属于配置的字段将继承配置属性。

Kirki::add_config( $config_id, $args );

例子:

Kirki::add_config( 'theme_config_id', array(
	'capability'    => 'edit_theme_options',
	'option_type'   => 'theme_mod',
) );

字段解释:

Arguments

  • capability: any valid WordPress capability. See the WordPress Codex for details.
  • option_type: can be either option or theme_mod. We recommend using theme_mod. If however you choose to use option you need to understand how your data will be saved, and in most cases you will also have to use the option_name argument as well.
  • option_name: If you’re using options instead of theme mods then you can use this to specify an option name. All your fields will then be saved as an array under that option in the WordPress database.
  • disable_output: Set to true if you don’t want Kirki to automatically output any CSS for your config (defaults to false).

创建属于这个配置的字段的方式:

Kirki::add_field( 'theme_config_id', $field_args );

创建panel和section的方式

panel是section的容器,可以群组section,点击这里查看customizer api的介绍。

用kirki创建panel的方式:

Kirki::add_panel( 'panel_id', array(
    'priority'    => 10,
    'title'       => esc_html__( 'My Panel', 'kirki' ),
    'description' => esc_html__( 'My panel description', 'kirki' ),
) );

Kirki::add_panel()method函数跟customizer api的add panel一样的时态。

Section是controls的wrapper,用来群组各类controls. 所有的字段一定要属于这个section.

Kirki::add_section( 'section_id', array(
    'title'          => esc_html__( 'My Section', 'kirki' ),
    'description'    => esc_html__( 'My section description.', 'kirki' ),
    'panel'          => 'panel_id',
    'priority'       => 160,
) );

Kirki::add_section()method函数跟customizer api里面是一样的时态。

Controls

kirki目前提供了30多个controls可以进行创建,是以add field形式。详细点击这里。https://kirki.org/docs/controls/

Kirki创建实例

1、将kirki文件夹复制到你自定义主题的文件夹下,然后在functions.php里面引入 kirki/kirki.php。

2、然后在inc文件夹下创建属于自定义class的文件,例如theme-customizer.php。 添加以下代码:并在functions.php里面引入


// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
  exit;
}

/**
 * This is a wrapper class for Kirki.
 * If the Kirki plugin is installed, then all CSS & Google fonts
 * will be handled by the plugin.
 * In case the plugin is not installed, this acts as a fallback
 * ensuring that all CSS & fonts still work.
 * It does not handle the customizer options, simply the frontend CSS.
 */
class Abt_Option {

  /**
   * @static
   * @access protected
   * @var array
   */
  protected static $config = array();

  /**
   * @static
   * @access protected
   * @var array
   */
  protected static $fields = array();

  /**
   * The class constructor
   */
  public function __construct() {
    // If Kirki exists then there's no reason to procedd
    if ( class_exists( 'Kirki' ) ) {
      return;
    }
  }

  /**
   * Create a new panel
   *
   * @param   string      the ID for this panel
   * @param   array       the panel arguments
   */
  public static function add_panel( $id = '', $args = array() ) {


    if ( class_exists( 'Kirki' ) ) {
      Kirki::add_panel( $id, $args );
    }
    // If Kirki does not exist then there's no reason to add any panels.
  }

  /**
   * Create a new section
   *
   * @param   string      the ID for this section
   * @param   array       the section arguments
   */
  public static function add_section( $id, $args ) {

    if ( class_exists( 'Kirki' ) ) {
      Kirki::add_section( $id, $args );
    }
    // If Kirki does not exist then there's no reason to add any sections.
  }


  /**
   * Sets the configuration options.
   *
   * @param    string    $config_id    The configuration ID
   * @param    array     $args         The configuration arguments
   */
  public static function add_config( $config_id, $args = array() ) {
    if ( class_exists( 'Kirki' ) ) {
      Kirki::add_config( $config_id, $args );
      return;
    }
  }

  /**
   * Create a new field
   *
   * @param    string    $config_id    The configuration ID
   * @param    array     $args         The field's arguments
   */
  public static function add_field( $config_id, $args ) {
    if($config_id == '') $config_id = $args['settings'];
    
    // if Kirki exists, use it.
    if ( class_exists( 'Kirki' ) ) {
      Kirki::add_field( $config_id, $args );
      return;
    }
  }
}
new Abt_Option();

3、然后创建customizer文件夹,名字可以自定义,存放每个部位的自定义文件。如header、style、fonts、css等。

4、然后创建options-panel.php文件,导入你创建的各个部分的自定义样式php文件,最后在functions.php里面导入options-panel.php文件。

section和control创建实例:

Abt_Option::add_panel( 'other_options_extra', array(
  'title'       => __( 'Other Options', 'Abt' ),
  'description' => __( 'Abt Other Options.', 'Abt' ),
  'priority' => '9',
) );

Abt_Option::add_section( 'social_options_all', array(
  'title'       => __( 'Social Options', 'Abt' ),
  'panel'       => 'other_options_extra',

) );

Abt_Option::add_section( 'disable_extra_features', array(
  'title'       => __( 'Advanced Features', 'Abt' ),
  'panel'       => 'other_options_extra',

) );

Abt_Option::add_section( 'sticky_notification_bar', array(
  'title'       => __( 'Sticky Notification Bar', 'Abt' ),
  'panel'       => 'other_options_extra',

) );



Abt_Option::add_field( 'mayo_config',  array(
  'type'     => 'link',
  'settings' => 'facebook_url',
  'label'    => __( 'Facebook URL', 'Abt' ),
  'section'  => 'social_options_all',
  'default'  => 'https://facebook.com/',
));

5、如果要去除掉原先存在的theme_mod,将下面的代码粘贴到functions.php就可以:

function mayosis_customize_register( $wp_customize ) {
    //All our sections, settings, and controls will be added here

    $wp_customize->remove_section( 'title_tagline');
    $wp_customize->remove_section( 'colors');
    $wp_customize->remove_section( 'header_image');
    $wp_customize->remove_section( 'background_image');
    $wp_customize->remove_section( 'static_front_page');


}
add_action( 'customize_register', 'mayosis_customize_register',50 );


/**
 * Removes the core 'Menus' panel from the Customizer.
 *
 * @param array $components Core Customizer components list.
 * @return array (Maybe) modified components list.
 */
function mayosis_remove_nav_menus_panel( $components ) {
    $i = array_search( 'nav_menus', $components );
    if ( false !== $i ) {
        unset( $components[ $i ] );
    }
    return $components;
}
add_filter( 'customize_loaded_components', 'mayosis_remove_nav_menus_panel' );

WordPress免费插件实现付费阅读功能

WP付费阅读的功能无需付费购买国内的各种插件,其实利用woocommerce就可以实现。

首先我们下载woocommerce插件,并配置好货币以及付款方式,需要支付宝支付的需要单独安装woocommerce的支付宝网关插件。

然后我们在插件市场搜索pay per post插件,这个是woocommerce基础上的衍生插件,可以实现post和page以及任何custom post type的付费阅读。

点击左侧菜单栏上的pay per post 管理面板,可以在setting那里添加需要付费阅读时候的提示语以及短代码。

然后,去woocomerce的product类型当中新增产品,设置为虚拟产品,添加标题,和任何你想要的内容,添加价格,保存。

然后新增post,在post下面的字段里,选择product为你新增的那个虚拟物品即可。接下来是和woo一样的操作。

PHP应知必会的提示和技巧系列

Whenever it comes to web development, many developers want tips to improve the website. Web development in PHP is pretty easy for newbies. All you need is PHP tutorials for beginners and the easiest way to optimize PHP website.

PHP is one of the most loved and widely used languages that developers loves to build their website from. The best part of PHP development is that developers can find Guide for PHP developers and best PHP tips and tricks on the official site of PHP. Another advantage of PHP is that as a PHP developer you can find good frameworks and CMSs to work on. Many people tend to ask, ‘how can I improve my PHP code?’ The answer to this lies in practice and being capable of build your own confidence in creating a project and releasing it. You can also learn PHP by building web applications

This blog post is all about the best PHP tips and tricks for Web development in PHP so that you can develop your website in PHP without any hassle and you can enjoy your professional life.

Develop with error reporting enabled

Error reporting feature, an important feature in PHP website, is one of the best Useful PHP trick for Developers. The best thing to cope with errors is to set the system to display errors. To set the settings you have to alter the php.ini file when you develop your site. Include these two lines in the beginning.

error_reporting ( E_ALL ) ;
ini_set ( 'display_errors' , 1 ) ;

The following code helps you to see both types of errors whether the fatal errors that produce the dreaded white screen as warnings and notices that may be bugs to fix.

Prevents SQL injection

Security holes are the biggest cause of the bad reputation of PHP but PHP tips for website development are here.

There are many ways to avoid SQL injection but the simplest one escapes any variable that we will use in the database. The code should look like this:

$query_result = mysql_query ( "SELECT * FROM WHERE Ex_table ex_field = \" " . mysql_real_escape_string( $ ex_field ) . " \ " " ) ;

Use the _once() function with caution

PHP developers prefer using include() or function require() to call other files, libraries or classes, but using the  include_eleven() and require_eleven(), are the  PHP tricks for web developer.  Both the functions have the same functionality but the advantage is that it prevents the files, classes or loaded libraries to be loaded again which causes duplication and undesired states in the code.

Learn to handle ternary operators

The best PHP tips and trick for good performance is to use ternary operators as an alternative to simple IF constructions. For instance:

$age = ( !empty ( $ _ GET [ 'age ] ) ? $ _ GET [ 'age' ] : 58 ) ;

This would help your code to get lighter and can be nested without problems.

Retire the MySQL driver

This is 2017 and the technology that we are using is advanced now this is the time for PHP7. A high time to retire your MySQL database and start using PDO. A PHP extension that helps you to connect with different other managers databases.

A very important feature of MySQL driver is MySQL Connector/Python that supports almost all features provided by MySQL version 5.7. Designed specifically to MySQL, MySQL Connector/Python lets you translate the parameter’s value between Python and MySQL data types. Obviously, PHP works other than MySQL too. As a PHP web developer, this tip is one of the best PHP tips and tricks for me for website development with PHP. The code to connect with databases is:

try {
$conn = new PDO ( "mysql: host = localhost; dbname = database ' , $ user , $ pass ) ;
$conn -> setAttribute ( PDO :: ATTR_ERRMODE , PDO :: ERRMODE_EXCEPTION ) ;
} Catch ( PDOException $e ) {
Echo "ERROR:" . $e -> getMessage ( ) ;
}

Use single quotes rather than double

Are you a speedy programmer who can type code fastly?

Well here’s a trick for you! Just use single quote (“) other than double (” “). Trust me! it saves you a lot of time and the performance of your server. Best PHP tips and tricks code! ha?

Clean URLs quickly with .htaccess

The file .htaccess – the best yet simple way to make the URLs more simpler for human eye as well as for SEO. A hidden file that serves a lot with Apache directives. The services that this file provides are performing redirection and clean URLs do not cease to be redirected to after all. One of the best tip and trick for PHP based application improvements.

RewriteEngine On
RewriteRule ^ ( [ a - zA - Z0 - 9 ] + ) $ index . Php? Page = $ 1

This code is the life saver for many PHP developers that can prevent horrible URLs and make it sleek and simple, phew!

Know all the Problems of isset()

One of the PHP tricks for web developer is to understand what isset() function do. Make sure that you know at what time isset() function returns false and on which time it answers true. This function returns True if the variable is not NULL. Yes you read it not NULL.

Just like so, if NULL can be a valid value of the variable,We surely have a problem sire!

$foo = null ;
if ( isset( $ foo ) ) // returns false
And the solution is: Use  get_defined_vars( );
$foo = NULL ;
$vars = get_defined_vars( );
if ( array_key_exists ( 'foo' , $ vars ) ) // returns True

Use a switch instead of stringing If Statements

The useful PHP trick for Developers- use Switch instead of crazy Ifs. Advantage? The code will execute faster thus performance is increased. The usage of Switch statements allows you to go beyond the use of if-else if-else chains.

switch ($color ) {
case 'white' :
echo "The color is White" ;
break ;
case 'blue' :
echo "The color is Blue" ;
break ;
case 'green' :
echo "The color is Green" ;
break ;
case 'black' :
echo "Color is black" ;
break ;
}

Take up cURL

The method to retrieve a file from another server is to use the powerful way cURL, instead of using file_get_contents() function which is easy to use but come on, it’s like having death on your computer. The following code is the example of the use cURL:

$c = curl_init ( ) ;
curl_setopt ( $c , CURLOPT_URL , $URL ) ;
curl_setopt ( $c , CURLOPT_TIMEOUT , 15 ) ;
curl_setopt ( $c , CURLOPT_RETURNTRANSFER , true ) ;
$content = curl_exec ( $c ) ;
$status = curl_getinfo ( $c , CURLINFO_HTTP_CODE ) ;
curl_close ( $c ) ;

Password Encryption

Often developers ask Tips to improve the website, well here is one, PHP is always on your side and it encrypts your passwords for you. I am talking about the PHP 5.5+ versions, Just store the passwords in your database as.

$enc_pass = password_hash ( $submitted_pass , PASSWORD_DEFAULT ) ;

To check if password is correct or not:

if ( password_verify ( $submitted_pass , $stored_pass ) )
{ 
// User successfully authenticated
}

Advanced PHP Tips to Improve Your Programming

Typically used for web development, PHP is the server-side scripting language. Invented in 1994 by Rasmus Lerdorf, PHP has done a remarkable job in the technology-based world and made the whole work of web development extremely easy for developers.

There’s little doubt that working knowledge of PHP is too important to sustain in today’s cut-throat technology sphere. Here are the 5 advanced PHP tips to learn PHP programming.

I. Object-Oriented Programming (OOP) is the Rudimentary Requirement

OOP is the basic requirement of PHP that every developer should know. PHP follows object-oriented programming and therefore items and programs link things together for developing a program. Using OOP approaches, you can skip the replication of code and can complete the code in a much simpler way. Objects are demarcated under the programs and then you can reclaim this purpose again and again in the whole programming. OOP is faster, easy to correct, and uses slighter server resources, less code and quicker loading process to evade long events. Going with OOP, you can make your coding style more effective and simpler.

II. Intrinsic Functions of PHP are Extremely Usable

PHP language is extremely easy to learn and adjustable for a developer to develop the best websites. Using the inbuilt advanced PHP techniques, you will get the concealed benefits which are very valuable throughout the coding process. If you are doing a custom PHP development or web development, the need for displays and functions is very significant. For example, if you want to count the numbers then you can use count() and like that PHP has a number of built-in functions that are very beneficial for making the coding procedure easy and quick.

III. Keep the Database Secure

The first thing prior to starting any PHP project is that you should use mysl_real_escape_string() for all the database. Doing this will help you keep all the strings safe from any kind of unwelcome threats that may have some malicious code. This should be your first step to protect your database. The other vital thing is that never use $_REQUEST – instead, go with POST or GET strings for submitting the data into the database query.

IV. Always Use POST and Never GET

A good programmer is well aware of the difference between these two. Get method displays the address in the URL and gives simpler ways for the hacker to totally hack your entire project. Going with POST, you can face a secure journey throughout your coding and development procedure.

V. Make a Copy Before Going for CODE

Before you explore the real platform, just stop for a few minutes and make a coarse draught of your whole coding. This will give you better comprehension and will clear your opinions for developing the website. Also, you will discover the main glitches that you will face in the future journey of the coding.

Wrapping things Up

One of the best programming language to develop websites is PHP, which is open-source. Although it is easy to use it’s normal when it takes the time to learn but if you know all the advanced PHP tips and tricks for good performance and for Website development in PHP then you are a champ!

Whatever it takes you to use PHP based frameworks and CMSs consider, use it over Core PHP, as it can give a better performance, a lightweight website and yes you can develop your website in PHP more faster.

设置自定义分类为默认分类就像普通文章的未分类一样

在注册的时候添加default_term就好了。

function abt_register_taxonomy() {
  $args = array(
    'labels' => array(
      'name'  => 'Product Categories',
      'singular_name'  => 'Product Category',
      'all_items'  => 'All Categories',
      'edit_item'  => 'Edit Category',
      'view_item'  => 'View Category',
      'add_new_item'  => 'Add new category',

    ),
    'public'  => true,
    'show_in_rest'  => true,
    'hierarchical'  => true,
    'show_admin_column'  => true,
    'rewrite' => array(
      'slug'  => 'categories'
    ),
    'default_term'  => 'All'
  );
  register_taxonomy('product_category','products',$args);

然后在分类创建All的分类,下次发布的时候会自动选中

WP函数介绍:get_page_by_title和path的区别

get_page_by_title( ‘about’ );
get_page_by_path(‘workflow’);

get_page_by_title是通过页面的title来获取到页面的wp_post对象(object),获取到id,post_title,post_name,post_excerpt,post_content等。当多个页面使用同一个title的话,这个函数获取的则是id最小的那个。title的话区分大小写。

get_page_by_path则是通过url或者url slug来获取页面,比方说你url slug是workflow的话, 就可以通过get_page_by_path(‘workflow’); 获取到这个页面的wp_post对象。 如果是子页面的话,要加上父级页面的slug.

WP的自定义文章分类archive页面的分页方式

当你创建如archive-posttyps.php 之类的自定义文章类型的archive的时候,你要调用这个文章分类的内容,你就无需用自定义的wp_query, 默认的query已经随着文件名字给到了网站。所以依然是默认的写法。

但是你想调整下文章显示数量怎么办?

你可以有两种方式,一种仍然是默认的query, 在archive-pottypes.php 里, 你通过默认的while来调出文章,然后你在functions.php通过函数来重新调整posts_per_page:

function set_posts_per_page_for_portfolios($query) {
  if (!is_admin() && $query->is_main_query() && is_post_type_archive( 'portfolios' )) {
    $query->set('posts_per_page','9');
  }
}

然后添加pre_get_posts的钩子,add_action(‘pre_get_posts’,’set_posts_per_page_for_portfolios’); 这种方法对于想要调整任何类型的任何参数都通用。当你想要调整其他的参数的时候,你只需添加多条$query->set(‘order’,’ASC’); 并修改参数即可。

第二种方法就是要创建页面的模板,在页面的模板,通过自定义的wp_query:new WP_Query来调用,在参数里面就可以设置 ‘posts_per_page’为9 。

关于分页:分页设计到很多query的问题,分页本身也是查询,第二页的话分页函数会查询到底该分到哪里去。

在页面模板要调用自定义的wp_query的话,首先在参数里要设置 ‘paged’ .

$query = new WP_Query(array(
	'post_type'  => 'slides',
	'posts_per_page'  => 9,
	'paged'  => (get_query_var('paged')) ? get_query_var('paged') : 1

然后在需要分页的地方,添加

paginate_links( [‘total’ => $query->max_num_pages] );

WP获取后台option的image的id并通过wp_get_attachment_image来获取不同尺寸

涉及函数:add_image_size() 、 get_option() 、attachment_url_to_postid() 、wp_get_attachment_image() 、 wp_get_attachment_image_url().

首先在functions.php里添加你自定义的Image的siez, add_image_size(‘banner1’,926,300,true);

当你添加了Image的option后,通过get_option(你的field)函数来获取图片,但是通过这个函数获取的图片是原始图片url地址,要如何获取他的不同尺寸的地址呢?

首先我们获取到url,比方说你设置的image的option字段是banner,那么通过get_option(‘banner’)可以获取到你这个图片的原始地址,然后你获取image id, 通过attachment_url_to_postid函数,$image_id = attachment_url_to_postid(get_option(‘banner’)), 然后你用到wp_get_attachment_image($image_id,’banner1)来获取 banner1尺寸的图片地址并输出img的Html。 wp_get_attachment_image_url($image_size,’banner1)则是获取到当前尺寸的image的url地址。

Theme Option进阶版–Wp高级教程

wordpress高级主题文件基本结构:admin面板类、自定义Blocks类、自定义函数类、自定义loop类、自定义片段parts类、plugins导入类、短代码类、自定义小工具类。注册widgets的话可以单独建立一个widgets.php文件。注册blocks的话可以单独创建一个blocks的文件。我们在主题下面创建framework文件夹,然后每个类单独建立一个文件夹,最终效果如图:

在functions文件夹创建theme-functions.php文件,存放函数,并创建必须的常量,如主题名字和版本等。在admin文件夹创建framework.php文件,存放和导入admin面板需要的文件以及存放admin需要的自定义函数;创建theme-panel.php文件,存放面板函数及UI,创建framework-options.php文件,存放option样式。

admin文件夹需要创建的文件如图:

创建options

首先创建函数:把option写入数组,从而实现以数组形式来读取options值:此函数放入theme-functions.php

function tie_get_option( $name ) {
	$get_options = get_option( 'tie_options' );

	if( !empty( $get_options[$name] ))
		 return $get_options[$name];

	return false ;
}

创建面板:theme-panel.php 并添加jquery来启用选择的样式:

function tie_add_admin() {

	$current_page = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : '';

	$icon = get_template_directory_uri().'/framework/admin/images/tie.png';
	add_menu_page( THEME_NAME , THEME_NAME ,'switch_themes', 'panel' , 'tie_panel_options', $icon  );
	$theme_page = add_submenu_page('panel', __( 'Theme Settings', 'tie' ), __( 'Theme Settings', 'tie' ) ,'switch_themes', 'panel' , 'tie_panel_options');
	add_submenu_page('panel',  __( 'Import Demo Data', 'tie' ), __( 'Import Demo Data', 'tie' ),'switch_themes', 'tie_demo_installer' , 'tie_demo_installer');
	//add_submenu_page('panel', __( 'Documentation', 'tie' ), __( 'Documentation', 'tie' ) ,'switch_themes', 'docs' , 'redirect_docs');
	//add_submenu_page('panel', __( 'Support', 'tie' ), __( 'Support', 'tie' ) ,'switch_themes', 'support' , 'tie_get_support');


	//function tie_get_support(){
		//echo "<script type='text/javascript'>window.location='http://tielabs.com/help/';</script>";
	//}

	//function redirect_docs(){
		//echo "<script type='text/javascript'>window.location='".DOCUMENTATION_URL."';</script>";
	//}

	add_action( 'admin_head-'. $theme_page, 'tie_admin_head' );
	function tie_admin_head(){

	?>
	
	<script type="text/javascript">
		var emptyImg = '<?php echo get_template_directory_uri(); ?>/framework/admin/images/empty.png';

		jQuery(document).ready(function($) {
		  jQuery('.on-of').checkbox({empty: emptyImg});

		  jQuery('form#tie_form').submit(function() {

		  	/* Disable Empty options */
			  jQuery('form#tie_form input, form#tie_form textarea, form#tie_form select').each(function() {
					if (!jQuery(this).val()) jQuery(this).attr("disabled", true );
			  });
			   jQuery('#typography_test-item input, #typography_test-item select').attr("disabled", true );

				var data = jQuery(this).serialize().replace( /%3C/g, '%3Ctie-open-tag' );

			/* Enable Empty options */
			  jQuery('form#tie_form input:disabled, form#tie_form textarea:disabled, form#tie_form select:disabled').attr("disabled", false );

			  jQuery.post(ajaxurl, data, function(response) {
				  if(response == 1) {
					  jQuery('#save-alert').addClass('save-done');
					  t = setTimeout('fade_message()', 1000);
				  }
				else if( response == 2 ){
					location.reload();
				}
				else {
					 jQuery('#save-alert').addClass('save-error');
					  t = setTimeout('fade_message()', 1000);
				  }
			  });
			  return false;
		  });

		});

		function fade_message() {
			jQuery('#save-alert').fadeOut(function() {
				jQuery('#save-alert').removeClass('save-done');
			});
			clearTimeout(t);
		}

		jQuery(function() {
			jQuery( "#customList"   ).sortable({placeholder: "ui-state-highlight"});
		});
	</script>
	<?php
		wp_enqueue_media();
	}
	if( isset( $_REQUEST['action'] ) ){
		if( 'reset' == $_REQUEST['action']  && $current_page == 'panel' && check_admin_referer('reset-action-code' , 'resetnonce') ) {
			global $default_data;
			tie_save_settings( $default_data );
			header("Location: admin.php?page=panel&reset=true");
			die;
		}
	}
}

获取panel的options:theme-panel.php

function tie_options ( $value ){
	$data = false;
	if( tie_get_option( $value['id'] ) ) $data = tie_get_option( $value['id'] );

	tie_options_build ( $value, 'tie_options['.$value["id"].']', $data );
}

单独创建一个framework-options.php来创建tie_options_build函数,来根据option循环循环出不同的输入样式:

创建panel的UI table布局:

function tie_panel_options() {

	//Categories
	$categories_obj = get_categories('hide_empty=0');
	$categories = array();
	foreach ($categories_obj as $pn_cat) {
		$categories[$pn_cat->cat_ID] = $pn_cat->cat_name;
	}

	$checked = 'checked="checked"';

$save='
	<div class="mpanel-submit">
		<input type="hidden" name="action" value="test_theme_data_save" />
        <input type="hidden" name="security" value="'. wp_create_nonce("test-theme-data").'" />
		<input name="save" class="mpanel-save button button-primary button-large" type="submit" value="'.__( "Save Changes", 'tie' ).'" />
	</div>';
?>


<div id="save-alert"></div>

	<?php do_action( 'tie_before_theme_panel' );?>

<div class="mo-panel">
	<div class="mo-panel-tabs">
		<a href="http://tielabs.com/" target="_blank" class="tie-logo"></a>
		<ul>
			<li class="tie-tabs general"><a href="#tab1"><span class="dashicons-before dashicons-admin-settings tie-icon-menu"></span><?php _e( 'General Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs header"><a href="#tab9"><span class="dashicons-before dashicons-schedule tie-icon-menu"></span><?php _e( 'Header Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs archives"><a href="#tab12"><span class="dashicons-before dashicons-exerpt-view tie-icon-menu"></span><?php _e( 'Archives Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs article"><a href="#tab6"><span class="dashicons-before dashicons-media-text tie-icon-menu"></span><?php _e( 'Posts Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs sidebars"><a href="#tab11"><span class="dashicons-before dashicons-slides tie-icon-menu"></span><?php _e( 'Sidebars', 'tie' ) ?></a></li>
			<li class="tie-tabs footer"><a href="#tab7"><span class="dashicons-before dashicons-editor-insertmore tie-icon-menu"></span><?php _e( 'Footer Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs banners"><a href="#tab8"><span class="dashicons-before dashicons-megaphone tie-icon-menu"></span><?php _e( 'Ads Settings', 'tie' ) ?></a></li>
			<li class="tie-tabs styling"><a href="#tab13"><span class="dashicons-before dashicons-admin-appearance tie-icon-menu"></span><?php _e( 'Styling', 'tie' ) ?></a></li>
			<li class="tie-tabs typography"><a href="#tab14"><span class="dashicons-before dashicons-editor-italic tie-icon-menu"></span><?php _e( 'Typography', 'tie' ) ?></a></li>
			<li class="tie-tabs translations"><a href="#tab20"><span class="dashicons-before dashicons-editor-textcolor tie-icon-menu"></span><?php _e( 'Translations', 'tie' ) ?></a></li>
			<li class="tie-tabs Social"><a href="#tab4"><span class="dashicons-before dashicons-networking tie-icon-menu"></span><?php _e( 'Social Networking', 'tie' ) ?></a></li>
			<li class="tie-tabs advanced"><a href="#tab10"><span class="dashicons-before dashicons-admin-tools tie-icon-menu"></span><?php _e( 'Advanced', 'tie' ) ?></a></li>
			<li class="tie-tabs tie-rate tie-not-tab"><a target="_blank" href="http://themeforest.net/downloads/"><span class="dashicons-before dashicons-star-filled tie-icon-menu"></span><?php _e( 'Rate', 'tie' ) ?> <?php echo THEME_NAME ?></a></li>
			<li class="tie-tabs tie-more tie-not-tab"><a target="_blank" href="https://tielabs.com/buy/portfolio-envato-1"><span class="dashicons-before dashicons-art tie-icon-menu"></span><?php _e( 'More Themes', 'tie' ) ?></a></li>
		</ul>
		<div class="clear"></div>
	</div> <!-- .mo-panel-tabs -->


	<div class="mo-panel-content">
	<form action="/" name="tie_form" id="tie_form">
		<div id="tab1" class="tabs-wrap">
			<h2><?php _e( 'General Settings', 'tie' ) ?></h2> <?php echo $save ?>
			<?php if( class_exists( 'bbPress' ) ): ?>
			<div class="tiepanel-item">
				<h3><?php _e( 'bbPress Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'bbPress Full width', 'tie' ),
								"id"	=> "bbpress_full",
								"type"	=> "checkbox"));
				?>
			</div>
			<?php endif; ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Theme Layout', 'tie' ) ?></h3>
				<div class="option-item">
					<?php
						$tie_theme_layout = tie_get_option('theme_layout');
					?>
					<ul id="tie_theme_layout" class="tie-options">
						<li>
							<input id="tie_theme_layout" name="tie_options[theme_layout]" type="radio" value="boxed" <?php if($tie_theme_layout == 'boxed' || !$tie_theme_layout ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/boxed.png" /></a>
						</li>
						<li>
							<input id="tie_theme_layout" name="tie_options[theme_layout]" type="radio" value="boxed-all" <?php if($tie_theme_layout == 'boxed-all') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/boxed-all.png" /></a>
						</li>
						<li>
							<input id="tie_theme_layout" name="tie_options[theme_layout]" type="radio" value="full" <?php if($tie_theme_layout == 'full') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/full.png" /></a>
						</li>
					</ul>
				</div>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Favicon', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Custom Favicon', 'tie' ),
								"id"	=> "favicon",
								"type"	=> "upload"));
				?>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Gravatar', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Custom Gravatar', 'tie' ),
								"id"	=> "gravatar",
								"type"	=> "upload"));
				?>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Apple Icons', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"			=> __( 'Apple iPhone Icon', 'tie' ),
								"id"			=> "apple_iphone",
								"type"			=> "upload",
								"extra_text"	=> __( 'Icon for Apple iPhone (57px x 57px)', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Apple iPhone Retina Icon', 'tie' ),
								"id"			=> "apple_iphone_retina",
								"type"			=> "upload",
								"extra_text"	=> __( 'Icon for Apple iPhone Retina Version (120px x 120px)', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Apple iPad Icon', 'tie' ),
								"id"			=> "apple_iPad",
								"type"			=> "upload",
								"extra_text"	=> __( 'Icon for Apple iPhone (72px x 72px)', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Apple iPad Retina Icon', 'tie' ),
								"id"			=> "apple_iPad_retina",
								"type"			=> "upload",
								"extra_text"	=> __( 'Icon for Apple iPad Retina Version (144px x 144px)', 'tie' ) ));

				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Time format', 'tie' ) ?></h3>
				<?php
					tie_options(
						array( 	"name"		=> __( 'Time format for blog posts', 'tie' ),
								"id"		=> "time_format",
								"type"		=> "radio",
								"options"	=> array(	"traditional"	=> __( 'Traditional', 'tie' ) ,
														"modern"		=> __( 'Time Ago Format', 'tie' ),
														"none"			=> __( 'Disable all', 'tie' ) )));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Lightbox Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"			=> __( 'Enable Lightbox Automatically', 'tie' ),
								"extra_text"	=> __( 'Enable Lightbox automatically for all images linked to an image file in the post content area', 'tie' ),
								"id"			=> "lightbox_all",
								"type"			=> "checkbox"));

					tie_options(
						array(	"name"			=> __( 'Enable Lightbox for WordPress Galleries', 'tie' ),
								"extra_text"	=> __( 'Enable Lightbox automatically for all images added via [gallery] shortcode in the content area', 'tie' ),
								"id"			=> "lightbox_gallery",
								"type"			=> "checkbox"));

					tie_options(
						array(	"name"			=> __( 'Lightbox Skin', 'tie' ),
								"id"			=> "lightbox_skin",
								"type"			=> "select",
								"options"		=> array(
													'dark'			=> 'dark',
													'light'			=> 'light',
													'smooth'		=> 'smooth',
													'metro-black'	=> 'metro-black',
													'metro-white'	=> 'metro-white',
													'mac'			=> 'mac')));

					tie_options(
						array( 	"name"			=> __( 'Lightbox Thumbnail Position', 'tie' ),
								"id"			=> "lightbox_thumbs",
								"type"			=> "radio",
								"options"		=> array(	"vertical"		=> __( 'Vertical', 'tie' ) ,
															"horizontal"	=> __( 'Horizontal', 'tie' ) )));

					tie_options(
						array(	"name"			=> __( 'Show Lightbox Arrows', 'tie' ),
								"id"			=> "lightbox_arrows",
								"type" 			=> "checkbox"));
				?>
			</div>



			<div class="tiepanel-item">
				<h3><?php _e( 'Breadcrumbs Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Breadcrumbs', 'tie' ),
								"id"	=> "breadcrumbs",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Breadcrumbs Delimiter', 'tie' ),
								"id"	=> "breadcrumbs_delimiter",
								"type"	=> "short-text"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Header Code', 'tie' ) ?></h3>
				<div class="option-item">
					<small><?php _e( 'The following code will add to the &lt;head&gt; tag. Useful if you need to add additional codes such as CSS or JS.', 'tie' ) ?></small>
					<textarea id="header_code" name="tie_options[header_code]" style="width:100%" rows="7"><?php echo htmlspecialchars_decode(tie_get_option('header_code'));  ?></textarea>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Footer Code', 'tie' ) ?></h3>
				<div class="option-item">
					<small><?php _e( 'The following code will add to the footer before the closing  &lt;/body&gt; tag. Useful if you need to add Javascript or tracking code.', 'tie' ) ?></small>
					<textarea id="footer_code" name="tie_options[footer_code]" style="width:100%" rows="7"><?php echo htmlspecialchars_decode(tie_get_option('footer_code'));  ?></textarea>
				</div>
			</div>

		</div>

		<div id="tab9" class="tabs-wrap">
			<h2><?php _e( 'Header Settings', 'tie' ) ?></h2> <?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Logo', 'tie' ) ?></h3>
				<?php
					tie_options(
						array( 	"name"		=> __( 'Logo Settings', 'tie' ),
								"id"		=> "logo_setting",
								"type"		=> "radio",
								"options"	=> array(	"logo"	=> __( 'Custom Image Logo', 'tie' ) ,
														"title"	=> __( 'Display Site Title', 'tie' ) )));

					tie_options(
						array(	"name"			=> __( 'Logo Image', 'tie' ),
								"id"			=> "logo",
								"help"			=> __( 'Upload a logo image, or enter URL to an image if it is already uploaded. the theme default logo gets applied if the input field is left blank.', 'tie' ),
								"type"			=> "upload",
								"extra_text"	=> __( 'Recommended size (MAX) : 190px x 60px', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Logo Image (Retina Version @2x)', 'tie' ),
								"id"			=> "logo_retina",
								"type"			=> "upload",
								"extra_text"	=> __( 'Please choose an image file for the retina version of the logo. It should be 2x the size of main logo.', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Standard Logo Width for Retina Logo', 'tie' ),
								"id"			=> "logo_retina_width",
								"type"			=> "short-text",
								"extra_text"	=> __( 'If retina logo is uploaded, please enter the standard logo (1x) version width, do not enter the retina logo width.', 'tie' ) ));

					tie_options(
						array(	"name"			=> __( 'Standard Logo Height for Retina Logo', 'tie' ),
								"id"			=> "logo_retina_height",
								"type"			=> "short-text",
								"extra_text"	=> __( 'If retina logo is uploaded, please enter the standard logo (1x) version height, do not enter the retina logo height.', 'tie' ) ));

					tie_options(
						array(	"name"	=> __( 'Logo Margin Top', 'tie' ),
								"id"	=> "logo_margin",
								"type"	=> "slider",
								"help"	=> __( 'Input number to set the top space of the logo.', 'tie' ),
								"unit"	=> "px",
								"max"	=> 100,
								"min"	=> 0 ));

					tie_options(
						array(	"name"	=> __( 'Logo Margin Bottom', 'tie' ),
								"id"	=> "logo_margin_bottom",
								"type"	=> "slider",
								"help"	=> __( 'Input number to set the bottom space of the logo.', 'tie' ),
								"unit"	=> "px",
								"max"	=> 100,
								"min"	=> 0 ));

					tie_options(
						array(	"name"		=> __( 'Full Width Logo', 'tie' ),
								"id"		=> "full_logo",
								"type"		=> "checkbox",
								"extra_text"	=> __( 'Recommended logo width : 1045px', 'tie' ) ));

					tie_options(
						array(	"name"	=> __( 'Center the Logo', 'tie' ),
								"id"	=> "center_logo",
								"type"	=> "checkbox"));
				?>

			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Header Top area Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Top menu', 'tie' ),
								"id"	=> "top_menu",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( "Today's Date", 'tie' ),
								"id"	=> "top_date",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"			=> __( "Today's Date Format", 'tie' ),
								"id"			=> "todaydate_format",
								"type"			=> "text",
								"extra_text"	=> '<a target="_blank" href="http://codex.wordpress.org/Formatting_Date_and_Time">'.__( 'Documentation on date and time formatting' , 'tie' ).'</a>'));

					tie_options(
						array(	"name"	=> __( 'Search', 'tie' ),
								"id"	=> "top_search",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Live Search', 'tie' ),
								"id"	=> "live_search",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Social Icons', 'tie' ),
								"id"	=> "top_social",
								"type"	=> "checkbox"));
				?>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Main Nav Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Main Nav', 'tie' ),
								"id"	=> "main_nav",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Random Article Button', 'tie' ),
								"id"	=> "random_article",
								"type"	=> "checkbox"));

				if (class_exists('Woocommerce'))
					tie_options(
						array(	"name"	=> __( 'Shopping Cart', 'tie' ),
								"id"	=> "shopping_cart",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Stick The Navigation menu', 'tie' ),
								"id"	=> "stick_nav",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Logo in the sticky Navigation menu', 'tie' ),
								"id"	=> "nav_logo",
								"type"	=> "upload" ));

				?>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Responsive Mobile Menu Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Enable the Mobile Menu', 'tie' ),
								"id"	=> "mobile_menu_active",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Search', 'tie' ),
								"id"	=> "mobile_menu_search",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Social Icons', 'tie' ),
								"id"	=> "mobile_menu_social",
								"type"	=> "checkbox" ));

					tie_options(
						array(	"name"	=> __( 'Show the Top Menu items in the Mobile Menu below the Main Menu items ?', 'tie' ),
								"id"	=> "mobile_menu_top",
								"type"	=> "checkbox" ));

					tie_options(
						array(	"name"	=> __( 'Enable Mobile Menu Items Icons', 'tie' ),
								"id"	=> "mobile_menu_hide_icons",
								"type"	=> "checkbox" ));


				?>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Breaking News', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Enable', 'tie' ),
								"id"	=> "breaking_news",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Show in Homepage Only', 'tie' ),
								"id"	=> "breaking_home",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"		=> __( 'Animation Effect', 'tie' ),
								"id"		=> "breaking_effect",
								"type"		=> "select",
								"options"	=> array(
												'fade'	=> __( 'Fade', 'tie' ),
												'slide'	=> __( 'Slide', 'tie' ),
												'ticker'=> __( 'Ticker', 'tie' ))));

					tie_options(
						array(	"name"	=> __( 'Animation Speed', 'tie' ),
								"id"	=> "breaking_speed",
								"type"	=> "slider",
								"unit"	=> "ms",
								"max"	=> 40000,
								"min"	=> 100 ));


					tie_options(
						array(	"name"	=> __( 'Time between the fades', 'tie' ),
								"id"	=> "breaking_time",
								"type"	=> "slider",
								"unit"	=> "ms",
								"max"	=> 40000,
								"min"	=> 100 ));


					tie_options(
						array(	"name"		=> __( 'Breaking News Query Type', 'tie' ),
								"id"		=> "breaking_type",
								"type"		=> "radio",
								"options"	=> array(	"category"	=>	__( 'Categories', 'tie' ) ,
														"tag"		=>	__( 'Tags', 'tie' ),
														"custom"	=>	__( 'Custom Text', 'tie' ))));


					tie_options(
						array(	"name"	=> __( 'Number of posts to show', 'tie' ),
								"id"	=> "breaking_number",
								"type"	=> "short-text"));

					tie_options(
						array(	"name"	=> __( 'Breaking News Tags', 'tie' ),
								"help"	=> __( 'Enter a tag name, or names separated by comma.', 'tie' ),
								"id"	=> "breaking_tag",
								"type"	=> "text"));

				?>

					<div class="option-item" id="breaking_cat-item">
						<span class="label"><?php _e( 'Breaking News Categories', 'tie' ) ?>
						<br /><small><?php _e( 'Hold CTRL while selecting to select multiple categories.', 'tie' ) ?></small>
						</span>
							<select multiple="multiple" name="tie_options[breaking_cat][]" id="tie_breaking_cat">
							<?php foreach ($categories as $key => $option) { ?>
								<option value="<?php echo $key ?>" <?php if ( @in_array( $key , tie_get_option('breaking_cat') ) ) { echo ' selected="selected"' ; } ?>><?php echo $option; ?></option>
							<?php } ?>
						</select>
					</div>

			</div>

			<div class="tiepanel-item" id="breaking_custom-item">
				<h3><?php _e( 'Breaking News Custom Text', 'tie' ) ?></h3>
					<div class="option-item" >

						<span class="label" style="width:40px"><?php _e( 'Text', 'tie' ) ?></span>
						<input id="custom_text" type="text" size="56" style="direction:ltr; text-laign:left; width:200px; float:left" name="custom_text" value="" />
						<span class="label" style="width:40px; margin-left:10px;"><?php _e( 'Link', 'tie' ) ?></span>
						<input id="custom_link" type="text" size="56" style="direction:ltr; text-laign:left; width:200px; float:left" name="custom_link" value="" />
						<input id="TextAdd"  class="button" type="button" value="Add" />

						<ul id="customList" style="margin-top:15px;">
						<?php $breaking_custom = tie_get_option( 'breaking_custom' ) ;
							$custom_count = 0 ;
							if($breaking_custom){
								foreach ($breaking_custom as $custom_text) { $custom_count++; ?>
							<li>
								<div class="widget-head">
									<a href="<?php echo $custom_text['link'] ?>" target="_blank"><?php echo $custom_text['text'] ?></a>
									<input name="tie_options[breaking_custom][<?php echo $custom_count ?>][link]" type="hidden" value="<?php echo $custom_text['link'] ?>" />
									<input name="tie_options[breaking_custom][<?php echo $custom_count ?>][text]" type="hidden" value="<?php echo $custom_text['text'] ?>" />
									<a class="del-custom-text"></a></div>
							</li>
								<?php }
							}
						?>
						</ul>
						<script>
							var customnext = <?php echo $custom_count+1 ?> ;
						</script>
					</div>
				</div>
		</div> <!-- Header Settings -->


		<div id="tab4" class="tabs-wrap">
			<h2><?php _e( 'Social Networking', 'tie' ) ?></h2> <?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Feed URL', 'tie' ) ?></h3>

				<?php
					tie_options(
						array(	"name"	=> __( 'RSS Icon', 'tie' ),
								"id"	=> "rss_icon",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Custom Feed URL', 'tie' ),
								"id"	=> "rss_url",
								"help"	=> "e.g. http://feedburner.com/userid",
								"type"	=> "text"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Social Networking', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Facebook URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "facebook",
								"type"	=> "arrayText"));
					tie_options(
						array(	"name"	=> __( 'Twitter URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "twitter",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Dribbble URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "dribbble",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'LinkedIn URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "linkedin",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Evernote URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "evernote",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Dropbox URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "dropbox",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Flickr URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "flickr",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Picasa Web URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "picasa",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'DeviantArt URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "deviantart",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'YouTube URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "youtube",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Grooveshark URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "grooveshark",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Vimeo URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "vimeo",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'ShareThis URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "sharethis",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( '500px URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "px500",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Skype URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "skype",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Digg URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "digg",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Reddit URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "reddit",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Delicious URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "delicious",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'StumbleUpon  URL', 'tie' ),
								"key"	=> "stumbleupon",
								"id"	=> "social",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Tumblr URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "tumblr",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Blogger URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "blogger",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'WordPress URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "wordpress",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Yelp URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "yelp",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Last.fm URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "lastfm",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Apple URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "apple",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'FourSquare URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "foursquare",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Github URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "github",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'SoundCloud URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "soundcloud",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'XING URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "xing",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Google Play URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "google_play",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Pinterest URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "Pinterest",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Instagram URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "instagram",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Spotify URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "spotify",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'PayPal URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "paypal",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Forrst URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "forrst",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Behance URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "behance",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Viadeo URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "viadeo",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'VK.com URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "vk",
								"type"	=> "arrayText"));

					tie_options(
						array(	"name"	=> __( 'Snapchat URL', 'tie' ),
								"id"	=> "social",
								"key"	=> "snapchat",
								"type"	=> "arrayText"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Social Network', 'tie' ) ?> #1</h3>
					<?php
						tie_options(
							array(	"name"	=> __( 'Title', 'tie' ),
									"id"	=> "custom_social_title_1",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Icon (use full Font Awesome name)', 'tie' ),
									"id"	=> "custom_social_icon_1",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'URL', 'tie' ),
									"id"	=> "custom_social_url_1",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Color', 'tie' ),
									"id"	=> "custom_social_color_1",
									"type"	=> "color"));
					?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Social Network', 'tie' ) ?> #2</h3>
					<?php
						tie_options(
							array(	"name"	=> __( 'Title', 'tie' ),
									"id"	=> "custom_social_title_2",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Icon (use full Font Awesome name)', 'tie' ),
									"id"	=> "custom_social_icon_2",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'URL', 'tie' ),
									"id"	=> "custom_social_url_2",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Color', 'tie' ),
									"id"	=> "custom_social_color_2",
									"type"	=> "color"));
					?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Social Network', 'tie' ) ?> #3</h3>
					<?php
						tie_options(
							array(	"name"	=> __( 'Title', 'tie' ),
									"id"	=> "custom_social_title_3",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Icon (use full Font Awesome name)', 'tie' ),
									"id"	=> "custom_social_icon_3",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'URL', 'tie' ),
									"id"	=> "custom_social_url_3",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Color', 'tie' ),
									"id"	=> "custom_social_color_3",
									"type"	=> "color"));
					?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Social Network', 'tie' ) ?> #4</h3>
					<?php
						tie_options(
							array(	"name"	=> __( 'Title', 'tie' ),
									"id"	=> "custom_social_title_4",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Icon (use full Font Awesome name)', 'tie' ),
									"id"	=> "custom_social_icon_4",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'URL', 'tie' ),
									"id"	=> "custom_social_url_4",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Color', 'tie' ),
									"id"	=> "custom_social_color_4",
									"type"	=> "color"));
					?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom Social Network', 'tie' ) ?> #5</h3>
					<?php
						tie_options(
							array(	"name"	=> __( 'Title', 'tie' ),
									"id"	=> "custom_social_title_5",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Icon (use full Font Awesome name)', 'tie' ),
									"id"	=> "custom_social_icon_5",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'URL', 'tie' ),
									"id"	=> "custom_social_url_5",
									"type"	=> "text"));

						tie_options(
							array(	"name"	=> __( 'Color', 'tie' ),
									"id"	=> "custom_social_color_5",
									"type"	=> "color"));
					?>
			</div>

		</div><!-- Social Networking -->


		<div id="tab6" class="tab_content tabs-wrap">
			<h2><?php _e( 'Posts Settings', 'tie' ) ?></h2> <?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Posts Settings', 'tie' ) ?></h3>
				<?php

					tie_options(
						array(	"name"	=> __( 'Show Featured Image By Default', 'tie' ),
								"id"	=> "post_featured",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Post Author Box', 'tie' ),
								"id"	=> "post_authorbio",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Next/Prev Articles', 'tie' ),
								"id"	=> "post_nav",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'OG Meta', 'tie' ),
								"id"	=> "post_og_cards",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Reading Position Indicator', 'tie' ),
								"id"	=> "reading_indicator",
								"type"	=> "checkbox"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Structure Data', 'tie' ) ?></h3>
				<?php

					tie_options(
						array(
							'name' => esc_html__( 'Enable', 'tie' ),
							'id'   => 'structure_data',
							'type' => 'checkbox'
					));

					tie_options(
						array(
							'name'    => esc_html__( 'Default Schema type', 'tie' ),
							'id'      => 'schema_type',
							'type'    => 'radio',
							'options' => array(
								'Article'      => esc_html__( 'Article',      'tie' ),
								'NewsArticle'  => esc_html__( 'NewsArticle',  'tie' ),
								'BlogPosting'  => esc_html__( 'BlogPosting',  'tie' ),
							)
					));

				?>
			</div>

			<div class="tiepanel-item">

				<h3><?php _e( 'Post Meta Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Post Meta', 'tie' ),
								"id"	=> "post_meta",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Author Meta', 'tie' ),
								"id"	=> "post_author",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Date Meta', 'tie' ),
								"id"	=> "post_date",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Categories Meta', 'tie' ),
								"id"	=> "post_cats",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Comments Meta', 'tie' ),
								"id"	=> "post_comments",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Tags Meta', 'tie' ),
								"id"	=> "post_tags",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Views Meta', 'tie' ),
								"id"	=> "post_views",
								"type"	=> "checkbox"));


				?>
			</div>


			<div class="tiepanel-item">

				<h3><?php _e( 'Share Post Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Bottom Share Post Buttons', 'tie' ),
								"id"	=> "share_post",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Top Share Post Buttons', 'tie' ),
								"id"	=> "share_post_top",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Share Buttons for Pages', 'tie' ),
								"id"	=> "share_buttons_pages",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"		=> __( 'Share Buttons type', 'tie' ),
								"id"		=> "share_post_type",
								"type"		=> "radio",
								"options"	=> array(	"counters"	=> __( 'Buttons with counters', 'tie' ) ,
														"flat"	=> __( 'Flat Buttons', 'tie' ) )));

					tie_options(
						array(	"name"	=> __( "Use the post's Short Link", 'tie' ),
								"id"	=> "share_shortlink",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Tweet Button', 'tie' ),
								"id"	=> "share_tweet",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Twitter Username <small>(optional)</small>', 'tie' ),
								"id"	=> "share_twitter_username",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Facebook Like Button', 'tie' ),
								"id"	=> "share_facebook",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'LinkedIn Button', 'tie' ),
								"id"	=> "share_linkdin",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'StumbleUpon Button', 'tie' ),
								"id"	=> "share_stumble",
								"type"	=> "checkbox"));


					tie_options(
						array(	"name"	=> __( 'Pinterest Button', 'tie' ),
								"id"	=> "share_pinterest",
								"type"	=> "checkbox"));

				?>
			</div>


			<div class="tiepanel-item">

				<h3><?php _e( 'Related Posts Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Related Posts', 'tie' ),
								"id"	=> "related",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"		=> __( 'Related Posts Position', 'tie' ),
								"id"		=> "related_position",
								"type"		=> "radio",
								"options"	=> array(	"in"	=> __( 'In the post content area', 'tie' ) ,
														"below"	=> __( 'Below the post area', 'tie' ) )));

					tie_options(
						array(	"name"	=> __( 'Number of posts to show', 'tie' ),
								"id"	=> "related_number",
								"type"	=> "short-text"));

					tie_options(
						array(	"name"	=> __( 'Number of posts to show in Full width pages', 'tie' ),
								"id"	=> "related_number_full",
								"type"	=> "short-text"));

					tie_options(
						array(	"name"		=> __( 'Query Type', 'tie' ),
								"id"		=> "related_query",
								"type"		=> "radio",
								"options"	=> array(	"category"	=> __( 'Posts in the same Categories', 'tie' ) ,
														"tag"		=> __( 'Posts in the same Tags', 'tie' ),
														"author"	=> __( 'Posts by the same Author', 'tie' ) )));
				?>
			</div>


			<div class="tiepanel-item">

				<h3><?php _e( 'Fly Check Also Box', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Check Also Box', 'tie' ),
								"id"	=> "check_also",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"		=> __( 'Check Also Box Position', 'tie' ),
								"id"		=> "check_also_position",
								"type"		=> "radio",
								"options"	=> array(	"right"	=> __( 'Right', 'tie' ) ,
														"left"	=> __( 'Left', 'tie' ) )));

					tie_options(
						array(	"name"	=> __( 'Number of posts to show', 'tie' ),
								"id"	=> "check_also_number",
								"type"	=> "short-text"));

					tie_options(
						array(	"name"		=> __( 'Query Type', 'tie' ),
								"id"		=> "check_also_query",
								"type"		=> "radio",
								"options"	=> array(	"category"	=> __( 'Posts in the same Categories', 'tie' ) ,
														"tag"		=> __( 'Posts in the same Tags', 'tie' ),
														"author"	=> __( 'Posts by the same Author', 'tie' ) )));
				?>
			</div>


			<div class="tiepanel-item">

				<h3><?php _e( 'jQuery Comments Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Adding Comment Validation' , 'tie' ),
								"id"	=> "comment_validation",
								"type"	=> "checkbox"));
				?>
			</div>
		</div> <!-- Article Settings -->


		<div id="tab7" class="tabs-wrap">
			<h2><?php _e( 'Footer Settings', 'tie' ) ?></h2> <?php echo $save ?>

			<div class="tiepanel-item">

				<h3><?php _e( 'Footer Elements', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Go To Top Button', 'tie' ),
								"id"	=> "footer_top",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Social Icons', 'tie' ),
								"id"	=> "footer_social",
								"type"	=> "checkbox"));

				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Footer Widgets layout', 'tie' ) ?></h3>
					<?php
						tie_options(
						array(	"name"	=> __( 'Footer Widgets', 'tie' ),
								"id"	=> "footer_widgets_enable",
								"type"	=> "checkbox"));

					?>
					<div class="option-item">
					<?php
						$tie_footer_widgets = tie_get_option('footer_widgets');
					?>
					<ul id="footer-widgets-options" class="tie-options">
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="footer-1c" <?php if($tie_footer_widgets == 'footer-1c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-1c.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="footer-2c" <?php if($tie_footer_widgets == 'footer-2c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-2c.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="narrow-wide-2c" <?php if($tie_footer_widgets == 'narrow-wide-2c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-2c-narrow-wide.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="wide-narrow-2c" <?php if($tie_footer_widgets == 'wide-narrow-2c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-2c-wide-narrow.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="footer-3c" <?php if($tie_footer_widgets == 'footer-3c' || !$tie_footer_widgets ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-3c.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="wide-left-3c" <?php if($tie_footer_widgets == 'wide-left-3c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-3c-wide-left.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="wide-right-3c" <?php if($tie_footer_widgets == 'wide-right-3c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-3c-wide-right.png" /></a>
						</li>
						<li>
							<input id="tie_footer_widgets"  name="tie_options[footer_widgets]" type="radio" value="footer-4c" <?php if($tie_footer_widgets == 'footer-4c') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/footer-4c.png" /></a>
						</li>
					</ul>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Footer Text One', 'tie' ) ?></h3>
				<div class="option-item">
					<textarea id="tie_footer_one" name="tie_options[footer_one]" style="width:100%" rows="4"><?php echo htmlspecialchars_decode(tie_get_option('footer_one'));  ?></textarea>
					<span style="padding:0" class="extra-text"><strong style="font-size: 12px;"><?php _e( 'Variables', 'tie' ) ?></strong>
						<?php _e( 'These tags can be included in the textarea above and will be replaced when a page is displayed.', 'tie' ) ?>
						<br />
						<strong>%year%</strong> : <em><?php _e( 'Replaced with the current year.', 'tie' ) ?></em><br />
						<strong>%site%</strong> : <em><?php _e( "Replaced with The site's name.", 'tie' ) ?></em><br />
						<strong>%url%</strong>  : <em><?php _e( "Replaced with The site's URL.", 'tie' ) ?></em>
					</span>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Footer Text Two', 'tie' ) ?></h3>
				<div class="option-item">
					<textarea id="tie_footer_two" name="tie_options[footer_two]" style="width:100%" rows="4"><?php echo htmlspecialchars_decode(tie_get_option('footer_two'));  ?></textarea>
					<span style="padding:0" class="extra-text"><strong style="font-size: 12px;"><?php _e( 'Variables', 'tie' ) ?></strong>
						<?php _e( 'These tags can be included in the textarea above and will be replaced when a page is displayed.', 'tie' ) ?>
						<br />
						<strong>%year%</strong> : <em><?php _e( 'Replaced with the current year.', 'tie' ) ?></em><br />
						<strong>%site%</strong> : <em><?php _e( "Replaced with The site's name.", 'tie' ) ?></em><br />
						<strong>%url%</strong>  : <em><?php _e( "Replaced with The site's URL.", 'tie' ) ?></em>
					</span>
				</div>
			</div>

		</div><!-- Footer Settings -->


		<div id="tab8" class="tab_content tabs-wrap">
			<h2><?php _e( 'Banners Settings', 'tie' ) ?></h2> <?php echo $save ?>
			<div class="tiepanel-item">
				<h3><?php _e( 'Background Image ADS', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Enable Background Image ADS', 'tie' ),
								"id"	=> "banner_bg",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Background Image ADS Link', 'tie' ),
								"id"	=> "banner_bg_url",
								"type"	=> "text"));
				?>
				<p class="tie_message_hint">
					<?php _e( 'Go to Styling tab and set Background Type to Custom Background then upload your custom image and enable Full Screen Background option.', 'tie' ) ?>
				</p>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Top Banner Area', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Top Banner', 'tie' ),
								"id"	=> "banner_top",
								"type"	=> "checkbox"));
				?>
				<div class="tie-accordion">
					<h4 class="accordion-head"><a href=""><?php _e( 'Image Ad', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"	=> __( 'Top Banner Image', 'tie' ),
								"id"	=> "banner_top_img",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'Top Banner Link', 'tie' ),
								"id"	=> "banner_top_url",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Alternative Text For The image', 'tie' ),
								"id"	=> "banner_top_alt",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Open The Link In a new Tab', 'tie' ),
								"id"	=> "banner_top_tab",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Nofollow', 'tie' ),
								"id"	=> "banner_top_nofollow",
								"type"	=> "checkbox"));
				?>
					</div>

					<?php if( tie_get_option( 'banner_top_publisher' ) || tie_get_option( 'banner_top_728' ) ): ?>
						<h4 class="accordion-head"><a href=""><?php _e( 'Responsive Google AdSense', 'tie' ) ?> <small style="color: red; font-weight: normal;"><br /><em><?php _e( 'Deprecated: Will be removed from future versions, use AdSense Responsive ad units instead.', 'tie' ) ?></em></small></a></h4>
						<div class="tie-accordion-contnet">
							<?php
								tie_options(
									array(	"name"	=> __( 'Publisher ID', 'tie' ),
											"id"	=> "banner_top_publisher",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '728x90 (Leaderboard) - ad ID', 'tie' ),
											"id"	=> "banner_top_728",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '468x60 (Banner) - ad ID', 'tie' ),
											"id"	=> "banner_top_468",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '320x100 (Large Mobile Banner) - ad ID', 'tie' ),
											"id"	=> "banner_top_300",
											"type"	=> "text"));

							?>
						</div>
					<?php endif; ?>

					<h4 class="accordion-head"><a href=""><?php _e( 'Custom Code', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"			=> __( 'Custom Ad Code', 'tie' ),
								"id"			=> "banner_top_adsense",
								"extra_text"	=> __( 'Supports: Text, HTML and Shortcodes.', 'tie' ),
								"type"			=> "textarea"));
				?>
					</div>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Bottom Banner Area', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Bottom Banner', 'tie' ),
								"id"	=> "banner_bottom",
								"type"	=> "checkbox"));
				?>
				<div class="tie-accordion">
					<h4 class="accordion-head"><a href=""><?php _e( 'Image Ad', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"	=> __( 'Bottom Banner Image', 'tie' ),
								"id"	=> "banner_bottom_img",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'Bottom Banner Link', 'tie' ),
								"id"	=> "banner_bottom_url",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Alternative Text For The image', 'tie' ),
								"id"	=> "banner_bottom_alt",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Open The Link In a new Tab', 'tie' ),
								"id"	=> "banner_bottom_tab",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Nofollow', 'tie' ),
								"id"	=> "banner_bottom_nofollow",
								"type"	=> "checkbox"));
				?>
					</div>


					<?php if( tie_get_option( 'banner_bottom_publisher' ) || tie_get_option( 'banner_bottom_728' ) ): ?>
						<h4 class="accordion-head"><a href=""><?php _e( 'Responsive Google AdSense', 'tie' ) ?> <small style="color: red; font-weight: normal;"><br /><em><?php _e( 'Deprecated: Will be removed from future versions, use AdSense Responsive ad units instead.', 'tie' ) ?></em></small></a></h4>
						<div class="tie-accordion-contnet">
							<?php
								tie_options(
									array(	"name"	=> __( 'Publisher ID', 'tie' ),
											"id"	=> "banner_bottom_publisher",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '728x90 (Leaderboard) - ad ID', 'tie' ),
											"id"	=> "banner_bottom_728",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '468x60 (Banner) - ad ID', 'tie' ),
											"id"	=> "banner_bottom_468",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '320x100 (Large Mobile Banner) - ad ID', 'tie' ),
											"id"	=> "banner_bottom_300",
											"type"	=> "text"));

							?>
						</div>
					<?php endif; ?>

					<h4 class="accordion-head"><a href=""><?php _e( 'Custom Code', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"			=> __( 'Custom Ad Code', 'tie' ),
								"id"			=> "banner_bottom_adsense",
								"extra_text"	=> __( 'Supports: Text, HTML and Shortcodes.', 'tie' ),
								"type"			=> "textarea"));
				?>
					</div>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Below Header Banner Area', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Below Header Banner', 'tie' ),
								"id"	=> "banner_below_header",
								"type"	=> "checkbox"));
				?>
				<div class="tie-accordion">
					<h4 class="accordion-head"><a href=""><?php _e( 'Image Ad', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"	=> __( 'Bottom Banner Image', 'tie' ),
								"id"	=> "banner_below_header_img",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'Bottom Banner Link', 'tie' ),
								"id"	=> "banner_below_header_url",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Alternative Text For The image', 'tie' ),
								"id"	=> "banner_below_header_alt",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Open The Link In a new Tab', 'tie' ),
								"id"	=> "banner_below_header_tab",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Nofollow', 'tie' ),
								"id"	=> "banner_below_header_nofollow",
								"type"	=> "checkbox"));
				?>
					</div>

					<?php if( tie_get_option( 'banner_below_header_publisher' ) || tie_get_option( 'banner_below_header_728' ) ): ?>
						<h4 class="accordion-head"><a href=""><?php _e( 'Responsive Google AdSense', 'tie' ) ?> <small style="color: red; font-weight: normal;"><br /><em><?php _e( 'Deprecated: Will be removed from future versions, use AdSense Responsive ad units instead.', 'tie' ) ?></em></small></a></h4>
						<div class="tie-accordion-contnet">
							<?php
								tie_options(
									array(	"name"	=> __( 'Publisher ID', 'tie' ),
											"id"	=> "banner_below_header_publisher",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '728x90 (Leaderboard) - ad ID', 'tie' ),
											"id"	=> "banner_below_header_728",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '468x60 (Banner) - ad ID', 'tie' ),
											"id"	=> "banner_below_header_468",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '320x100 (Large Mobile Banner) - ad ID', 'tie' ),
											"id"	=> "banner_below_header_300",
											"type"	=> "text"));

							?>
						</div>
					<?php endif; ?>


					<h4 class="accordion-head"><a href=""><?php _e( 'Custom Code', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"			=> __( 'Custom Ad Code', 'tie' ),
								"id"			=> "banner_below_header_adsense",
								"extra_text"	=> __( 'Supports: Text, HTML and Shortcodes.', 'tie' ),
								"type"			=> "textarea"));
				?>
					</div>
				</div>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Above Article Banner Area', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Above Article Banner', 'tie' ),
								"id"	=> "banner_above",
								"type"	=> "checkbox"));
				?>
				<div class="tie-accordion">
					<h4 class="accordion-head"><a href=""><?php _e( 'Image Ad', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"	=> __( 'Above Article Banner Image', 'tie' ),
								"id"	=> "banner_above_img",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'Above Article Banner Link', 'tie' ),
								"id"	=> "banner_above_url",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Alternative Text For The image', 'tie' ),
								"id"	=> "banner_above_alt",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Open The Link In a new Tab', 'tie' ),
								"id"	=> "banner_above_tab",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Nofollow', 'tie' ),
								"id"	=> "banner_above_nofollow",
								"type"	=> "checkbox"));
				?>
					</div>


					<?php if( tie_get_option( 'banner_above_publisher' ) || tie_get_option( 'banner_above_468' ) ): ?>
						<h4 class="accordion-head"><a href=""><?php _e( 'Responsive Google AdSense', 'tie' ) ?> <small style="color: red; font-weight: normal;"><br /><em><?php _e( 'Deprecated: Will be removed from future versions, use AdSense Responsive ad units instead.', 'tie' ) ?></em></small></a></h4>
						<div class="tie-accordion-contnet">
							<?php
								tie_options(
									array(	"name"	=> __( 'Publisher ID', 'tie' ),
											"id"	=> "banner_above_publisher",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '468x60 (Banner) - ad ID', 'tie' ),
											"id"	=> "banner_above_468",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '320x100 (Large Mobile Banner) - ad ID', 'tie' ),
											"id"	=> "banner_above_300",
											"type"	=> "text"));

							?>
						</div>
					<?php endif; ?>


					<h4 class="accordion-head"><a href=""><?php _e( 'Custom Code', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"			=> __( 'Custom Ad Code', 'tie' ),
								"id"			=> "banner_above_adsense",
								"extra_text"	=> __( 'Supports: Text, HTML and Shortcodes.', 'tie' ),
								"type"			=> "textarea"));
				?>
					</div>
				</div>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Below Article Banner Area', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Below Article Banner', 'tie' ),
								"id"	=> "banner_below",
								"type"	=> "checkbox"));
				?>
				<div class="tie-accordion">
					<h4 class="accordion-head"><a href=""><?php _e( 'Image Ad', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"	=> __( 'Below Article Banner Image', 'tie' ),
								"id"	=> "banner_below_img",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'Below Article Banner Link', 'tie' ),
								"id"	=> "banner_below_url",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Alternative Text For The image', 'tie' ),
								"id"	=> "banner_below_alt",
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Open The Link In a new Tab', 'tie' ),
								"id"	=> "banner_below_tab",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Nofollow', 'tie' ),
								"id"	=> "banner_below_nofollow",
								"type"	=> "checkbox"));
				?>
					</div>

					<?php if( tie_get_option( 'banner_below_publisher' ) || tie_get_option( 'banner_below_468' ) ): ?>
						<h4 class="accordion-head"><a href=""><?php _e( 'Responsive Google AdSense', 'tie' ) ?> <small style="color: red; font-weight: normal;"><br /><em><?php _e( 'Deprecated: Will be removed from future versions, use AdSense Responsive ad units instead.', 'tie' ) ?></em></small></a></h4>
						<div class="tie-accordion-contnet">
							<?php
								tie_options(
									array(	"name"	=> __( 'Publisher ID', 'tie' ),
											"id"	=> "banner_below_publisher",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '468x60 (Banner) - ad ID', 'tie' ),
											"id"	=> "banner_below_468",
											"type"	=> "text"));

								tie_options(
									array(	"name"	=> __( '320x100 (Large Mobile Banner) - ad ID', 'tie' ),
											"id"	=> "banner_below_300",
											"type"	=> "text"));

							?>
						</div>
					<?php endif; ?>

					<h4 class="accordion-head"><a href=""><?php _e( 'Custom Code', 'tie' ) ?></a></h4>
					<div class="tie-accordion-contnet">
				<?php
					tie_options(
						array(	"name"			=> __( 'Custom Ad Code', 'tie' ),
								"id"			=> "banner_below_adsense",
								"extra_text"	=> __( 'Supports: Text, HTML and Shortcodes.', 'tie' ),
								"type"			=> "textarea"));
				?>
					</div>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Shortcode ADS', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( '[ads1] Shortcode Banner', 'tie' ),
								"id"	=> "ads1_shortcode",
								"type"	=> "textarea"));

					tie_options(
						array(	"name"	=> __( '[ads2] Shortcode Banner', 'tie' ),
								"id"	=> "ads2_shortcode",
								"type"	=> "textarea"));
				?>
			</div>
		</div> <!-- Banners Settings -->



		<div id="tab11" class="tab_content tabs-wrap">
			<h2><?php _e( 'Sidebars', 'tie' ) ?></h2>	<?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Default Sidebar Position', 'tie' ) ?></h3>
				<div class="option-item">
					<?php
						$tie_sidebar_pos = tie_get_option('sidebar_pos');
					?>
					<ul id="sidebar-position-options" class="tie-options">
						<li>
							<input name="tie_options[sidebar_pos]" type="radio" value="right" <?php if($tie_sidebar_pos == 'right' || !$tie_sidebar_pos ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/sidebar-right.png" /></a>
						</li>
						<li>
							<input name="tie_options[sidebar_pos]" type="radio" value="left" <?php if($tie_sidebar_pos == 'left') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/sidebar-left.png" /></a>
						</li>
					</ul>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Sticky Sidebars', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Sticky Sidebar', 'tie' ),
								"id"	=> "sticky_sidebar",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable on the homepage', 'tie' ),
								"id"	=> "sticky_sidebar_disable_homepage",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable on category pages', 'tie' ),
								"id"	=> "sticky_sidebar_disable_cat",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable on tag pages', 'tie' ),
								"id"	=> "sticky_sidebar_disable_tag",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable on pages', 'tie' ),
								"id"	=> "sticky_sidebar_disable_pages",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable on posts', 'tie' ),
								"id"	=> "sticky_sidebar_disable_posts",
								"type"	=> "checkbox"));


				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Add Sidebar', 'tie' ) ?></h3>
				<div class="option-item">
					<span class="label"><?php _e( 'Sidebar Name', 'tie' ) ?></span>

					<input id="sidebarName" type="text" size="56" style="direction:ltr; text-laign:left" name="sidebarName" value="" />
					<input id="sidebarAdd"  class="button" type="button" value="<?php _e( 'Add', 'tie' ) ?>" />

					<ul id="sidebarsList">
					<?php $sidebars = tie_get_option( 'sidebars' ) ;
						if($sidebars){
							foreach ($sidebars as $sidebar) { ?>
						<li>
							<div class="widget-head"><?php echo $sidebar ?>  <input id="tie_sidebars" name="tie_options[sidebars][]" type="hidden" value="<?php echo $sidebar ?>" /><a class="del-sidebar"></a></div>
						</li>
							<?php }
						}
					?>
					</ul>
				</div>
			</div>

			<div class="tiepanel-item" id="custom-sidebars">
				<h3><?php _e( 'Custom Sidebars', 'tie' ) ?></h3>
				<?php

				$new_sidebars = array(''=> __( 'Default' , 'tie' ));
				if (class_exists('Woocommerce'))
					$new_sidebars ['shop-widget-area'] = __( 'Shop - For WooCommerce Pages', 'tie' ) ;

				if($sidebars){
					foreach ($sidebars as $sidebar) {
						$new_sidebars[$sidebar] = $sidebar;
					}
				}


				tie_options(
					array(	"name"		=> __( 'Home Sidebar', 'tie' ),
							"id"		=> "sidebar_home",
							"type"		=> "select",
							"options"	=> $new_sidebars ));

				tie_options(
					array(	"name"		=> __( 'Single Page Sidebar', 'tie' ),
							"id"		=> "sidebar_page",
							"type"		=> "select",
							"options"	=> $new_sidebars ));

				tie_options(
					array(	"name"		=> __( 'Single Article Sidebar', 'tie' ),
							"id"		=> "sidebar_post",
							"type"		=> "select",
							"options"	=> $new_sidebars ));

				tie_options(
					array(	"name"		=> __( 'Archives Sidebar', 'tie' ),
							"id"		=> "sidebar_archive",
							"type"		=> "select",
							"options"	=> $new_sidebars ));

				if(class_exists( 'bbPress' ))
				tie_options(
					array(	"name"		=> __( 'bbPress Sidebar', 'tie' ),
							"id"		=> "sidebar_bbpress",
							"type"		=> "select",
							"options"	=> $new_sidebars ));

				?>
			</div>
		</div> <!-- Sidebars -->


		<div id="tab12" class="tab_content tabs-wrap">
			<h2><?php _e( 'Archives Settings', 'tie' ) ?></h2>	<?php echo $save ?>


			<div class="tiepanel-item">
				<h3><?php _e( 'General Settings', 'tie' ) ?></h3>
				<?php

					tie_options(
						array(	"name"	=> __( 'Show Social Buttons', 'tie' ),
								"id"	=> "archives_socail",
								"type"	=> "checkbox" ));

					tie_options(
						array( 	"name"	=> __( 'Excerpt Length', 'tie' ),
								"id"	=> "exc_length",
								"type"	=> "short-text"));

					tie_options(
						array(	"name"	=> __( 'Review Score', 'tie' ),
								"id"	=> "arc_meta_score",
								"type"	=> "checkbox" ));

					tie_options(
						array(	"name"	=> __( 'Author Meta', 'tie' ),
								"id"	=> "arc_meta_author",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Date Meta', 'tie' ),
								"id"	=> "arc_meta_date",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Categories Meta', 'tie' ),
								"id"	=> "arc_meta_cats",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Comments Meta', 'tie' ),
								"id"	=> "arc_meta_comments",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Views Meta', 'tie' ),
								"id"	=> "arc_meta_views",
								"type"	=> "checkbox"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Default layout settings', 'tie' ) ?></h3>

				<?php
					$tie_blog_display = tie_get_option('blog_display');
				?>
				<div class="option-item">
					<span class="label"><?php _e( 'Choose the default layout', 'tie' ) ?></span>
					<ul id="tie_blog_display" class="tie-options tie-archives-options">
						<li>
							<input name="tie_options[blog_display]" type="radio" value="excerpt" <?php if($tie_blog_display == 'excerpt' || !$tie_blog_display ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-1.png" /></a>
						</li>
						<li>
							<input name="tie_options[blog_display]" type="radio" value="full_thumb" <?php if($tie_blog_display == 'full_thumb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-2.png" /></a>
						</li>
						<li>
							<input name="tie_options[blog_display]" type="radio" value="content" <?php if($tie_blog_display == 'content') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-3.png" /></a>
						</li>
						<li>
							<input name="tie_options[blog_display]" type="radio" value="masonry" <?php if($tie_blog_display == 'masonry') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-4.png" /></a>
						</li>
						<li>
							<input name="tie_options[blog_display]" type="radio" value="timeline" <?php if($tie_blog_display == 'timeline') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-6.png" /></a>
						</li>
					</ul>
					<p class="tie_message_hint"><?php _e( 'These settings will applies on all pages with blog List template.', 'tie' ) ?></p>
				</div>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Category Page Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Category Description', 'tie' ),
								"id"	=> "category_desc",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'RSS Icon', 'tie' ),
								"id"	=> "category_rss",
								"type"	=> "checkbox"));

					$tie_category_layout = tie_get_option('category_layout');
				?>
				<div class="option-item">
					<span class="label"><?php _e( 'Choose Default Categories page layout', 'tie' ) ?></span>
					<ul id="tie_category_layout" class="tie-options tie-archives-options">
						<li>
							<input name="tie_options[category_layout]" type="radio" value="excerpt" <?php if($tie_category_layout == 'excerpt' || !$tie_category_layout ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-1.png" /></a>
						</li>
						<li>
							<input name="tie_options[category_layout]" type="radio" value="full_thumb" <?php if($tie_category_layout == 'full_thumb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-2.png" /></a>
						</li>
						<li>
							<input name="tie_options[category_layout]" type="radio" value="content" <?php if($tie_category_layout == 'content') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-3.png" /></a>
						</li>
						<li>
							<input name="tie_options[category_layout]" type="radio" value="masonry" <?php if($tie_category_layout == 'masonry') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-4.png" /></a>
						</li>
						<li>
							<input name="tie_options[category_layout]" type="radio" value="timeline" <?php if($tie_category_layout == 'timeline') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-6.png" /></a>
						</li>
					</ul>
				</div>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Tag Page Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Tag Description', 'tie' ),
								"id"	=> "tag_desc",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'RSS Icon', 'tie' ),
								"id"	=> "tag_rss",
								"type"	=> "checkbox"));
				?>
				<?php
					$tie_tag_layout = tie_get_option('tag_layout');
				?>
				<div class="option-item">
					<span class="label"><?php _e( 'Choose Tags page layout', 'tie' ) ?></span>
					<ul id="tie_tag_layout" class="tie-options tie-archives-options">
						<li>
							<input name="tie_options[tag_layout]" type="radio" value="excerpt" <?php if($tie_tag_layout == 'excerpt' || !$tie_tag_layout ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-1.png" /></a>
						</li>
						<li>
							<input name="tie_options[tag_layout]" type="radio" value="full_thumb" <?php if($tie_tag_layout == 'full_thumb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-2.png" /></a>
						</li>
						<li>
							<input name="tie_options[tag_layout]" type="radio" value="content" <?php if($tie_tag_layout == 'content') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-3.png" /></a>
						</li>
						<li>
							<input name="tie_options[tag_layout]" type="radio" value="masonry" <?php if($tie_tag_layout == 'masonry') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-4.png" /></a>
						</li>
						<li>
							<input name="tie_options[tag_layout]" type="radio" value="timeline" <?php if($tie_tag_layout == 'timeline') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-6.png" /></a>
						</li>
					</ul>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Author Page Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Author Bio', 'tie' ),
								"id"	=> "author_bio",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'RSS Icon', 'tie' ),
								"id"	=> "author_rss",
								"type"	=> "checkbox"));

					$tie_author_layout = tie_get_option('author_layout');
				?>
				<div class="option-item">
					<span class="label"><?php _e( 'Choose Author page layout', 'tie' ) ?></span>
					<ul id="tie_author_layout" class="tie-options tie-archives-options">
						<li>
							<input name="tie_options[author_layout]" type="radio" value="excerpt" <?php if($tie_author_layout == 'excerpt' || !$tie_author_layout ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-1.png" /></a>
						</li>
						<li>
							<input name="tie_options[author_layout]" type="radio" value="full_thumb" <?php if($tie_author_layout == 'full_thumb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-2.png" /></a>
						</li>
						<li>
							<input name="tie_options[author_layout]" type="radio" value="content" <?php if($tie_author_layout == 'content') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-3.png" /></a>
						</li>
						<li>
							<input name="tie_options[author_layout]" type="radio" value="masonry" <?php if($tie_author_layout == 'masonry') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-4.png" /></a>
						</li>
						<li>
							<input name="tie_options[author_layout]" type="radio" value="timeline" <?php if($tie_author_layout == 'timeline') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-6.png" /></a>
						</li>
					</ul>
				</div>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Search Page Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Search in Category IDs', 'tie' ),
								"id"	=> "search_cats",
								"help" => __( 'Use minus sign (-) to exclude categories. Example: (1,4,-7) = search only in Category 1 & 4, and exclude Category 7.', 'tie' ),
								"type"	=> "text"));

					tie_options(
						array(	"name"	=> __( 'Exclude Pages in results', 'tie' ),
								"id"	=> "search_exclude_pages",
								"type"	=> "checkbox"));

					$tie_search_layout = tie_get_option('search_layout');
				?>
				<div class="option-item">
					<span class="label"><?php _e( 'Choose Search results page layout', 'tie' ) ?></span>
					<ul id="tie_search_layout" class="tie-options tie-archives-options">
						<li>
							<input name="tie_options[search_layout]" type="radio" value="excerpt" <?php if($tie_search_layout == 'excerpt' || !$tie_search_layout ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-1.png" /></a>
						</li>
						<li>
							<input name="tie_options[search_layout]" type="radio" value="full_thumb" <?php if($tie_search_layout == 'full_thumb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-2.png" /></a>
						</li>
						<li>
							<input name="tie_options[search_layout]" type="radio" value="content" <?php if($tie_search_layout == 'content') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-3.png" /></a>
						</li>
						<li>
							<input name="tie_options[search_layout]" type="radio" value="masonry" <?php if($tie_search_layout == 'masonry') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-4.png" /></a>
						</li>
						<li>
							<input name="tie_options[search_layout]" type="radio" value="timeline" <?php if($tie_search_layout == 'timeline') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/arc-6.png" /></a>
						</li>
					</ul>
				</div>
			</div>
		</div> <!-- Archives -->


		<div id="tab13" class="tab_content tabs-wrap">
			<h2><?php _e( 'Styling', 'tie' ) ?></h2>	<?php echo $save ?>
			<div class="tiepanel-item">
				<h3><?php _e( 'Theme Color and Settings', 'tie' ) ?></h3>

				<div class="option-item">
					<span class="label"><?php _e( 'Choose Theme Color', 'tie' ) ?></span>

					<?php
						$theme_color = tie_get_option('theme_skin');
					?>
					<ul style="clear:both" id="theme-skins" class="tie-options">
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="0" <?php if(!$theme_color) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-none.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#ef3636" <?php if($theme_color == '#ef3636' ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-red.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#37b8eb" <?php if($theme_color == '#37b8eb') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-blue.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#81bd00" <?php if($theme_color == '#81bd00') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-green.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#e95ca2" <?php if($theme_color == '#e95ca2') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-pink.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#000" <?php if($theme_color == '#000') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-black.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#ffbb01" <?php if($theme_color == '#ffbb01' ) echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-yellow.png" /></a>
						</li>
						<li>
							<input id="tie_theme_skin"  name="tie_options[theme_skin]" type="radio" value="#7b77ff" <?php if($theme_color == '#7b77ff') echo $checked; ?> />
							<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/skin-purple.png" /></a>
						</li>
					</ul>
				</div>

				<?php
					tie_options(
						array(	"name"	=> __( 'Custom Theme Color', 'tie' ),
								"id"	=> "global_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Dark Skin', 'tie' ),
								"id"	=> "dark_skin",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"			=> __( 'Modern Colored Scrollbar', 'tie' ),
								"id"			=> "modern_scrollbar",
								"type"			=> "checkbox",
								"extra_text"	=> __( 'For Chrome and Safari only.', 'tie' ) ));

					tie_options(
						array(	"name"	=> __( 'Apply Categories Colors on News blocks', 'tie' ),
								"id"	=> "homepage_cats_colors",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Lazy Load For Images', 'tie' ),
								"id"	=> "lazy_load",
								"type"	=> "checkbox" ));
				?>
			</div>
			<div class="tiepanel-item">

				<h3><?php _e( 'Background Type', 'tie' ) ?></h3>
				<?php
					tie_options(
						array( 	"name"		=> __( 'Background Type', 'tie' ),
								"id"		=> "background_type",
								"type"		=> "radio",
								"options"	=> array(	"pattern"	=> __( 'Pattern', 'tie' ) ,
														"custom"	=> __( 'Custom Background', 'tie' ) )));
				?>
			</div>

			<div class="tiepanel-item" id="pattern-settings">
				<h3><?php _e( 'Choose Pattern', 'tie' ) ?></h3>

				<?php
					tie_options(
						array( 	"name"	=> __( 'Background Color', 'tie' ),
								"id"	=> "background_pattern_color",
								"type"	=> "color" ));

					$theme_pattern = tie_get_option('background_pattern');
				?>
				<ul id="theme-pattern" class="tie-options">
					<?php for($i=1 ; $i<=46 ; $i++ ){
					 $pattern = 'body-bg'.$i; ?>
					<li>
						<input id="tie_background_pattern"  name="tie_options[background_pattern]" type="radio" value="<?php echo $pattern ?>" <?php if($theme_pattern == $pattern ) echo $checked; ?> />
						<a class="checkbox-select" href="#"><img src="<?php echo get_template_directory_uri(); ?>/framework/admin/images/pattern<?php echo $i ?>.png" /></a>
					</li>
					<?php } ?>
				</ul>
			</div>

			<div class="tiepanel-item" id="bg_image_settings">
				<h3><?php _e( 'Custom Background', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Custom Background', 'tie' ),
								"id"	=> "background",
								"type"	=> "background"));

					tie_options(
						array(	"name"	=> __( 'Full Screen Background', 'tie' ),
								"id"	=> "background_full",
								"type"	=> "checkbox"));
				?>

			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Body Styling', 'tie' ) ?></h3>
				<?php

					tie_options(
						array(	"name"	=> __( 'Highlighted Text Color', 'tie' ),
								"id"	=> "highlighted_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color', 'tie' ),
								"id"	=> "links_color",
								"type"	=> "color"));
					tie_options(
						array(	"name"		=> __( 'Links Decoration', 'tie' ),
								"id"		=> "links_decoration",
								"type"		=> "select",
								"options"	=> array(	""				=> __( 'Default', 'tie' ),
														"none"			=> __( 'none', 'tie' ),
														"underline"		=> __( 'underline', 'tie' ),
														"overline"		=> __( 'overline', 'tie' ),
														"line-through"	=> __( 'line-through', 'tie' ) )));

					tie_options(
						array(	"name"	=> __( 'Links Color on mouse over', 'tie' ),
								"id"	=> "links_color_hover",
								"type"	=> "color"));

					tie_options(
						array(	"name"		=> __( 'Links Decoration on mouse over', 'tie' ),
								"id"		=> "links_decoration_hover",
								"type"		=> "select",
								"options"	=> array(	""				=> __( 'Default', 'tie' ),
														"none"			=> __( 'none', 'tie' ),
														"underline"		=> __( 'underline', 'tie' ),
														"overline"		=> __( 'overline', 'tie' ),
														"line-through"	=> __( 'line-through', 'tie' ) )));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Top Navigation Styling', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Background', 'tie' ),
								"id"	=> "topbar_background",
								"type"	=> "background"));

					tie_options(
						array(	"name"	=> __( 'Links Color', 'tie' ),
								"id"	=> "topbar_links_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color on mouse over', 'tie' ),
								"id"	=> "topbar_links_color_hover",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( "Today's Date text color", "tie" ),
								"id"	=> "todaydate_color",
								"type"	=> "color"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Header Background', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Background', 'tie' ),
								"id"	=> "header_background",
								"type"	=> "background"));
				?>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Main Navigation Styling', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Main Navigation Background', 'tie' ),
								"id"	=> "main_nav_background",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Main Navigation inner bottom border color', 'tie' ),
								"id"	=> "main_nav_border",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Sub Menu Background', 'tie' ),
								"id"	=> "sub_nav_background",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color', 'tie' ),
								"id"	=> "nav_links_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color on mouse over', 'tie' ),
								"id"	=> "nav_links_color_hover",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Current Item Link Color', 'tie' ),
								"id"	=> "nav_current_links_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Separator Line1 color', 'tie' ),
								"id"	=> "nav_sep1",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Separator Line2 color', 'tie' ),
								"id"	=> "nav_sep2",
								"type"	=> "color"));
				?>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'Breaking News Styling', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Breaking News Text Background', 'tie' ),
								"id"	=> "breaking_title_bg",
								"type"	=> "color"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Content Styling', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Main Content Background', 'tie' ),
								"id"	=> "main_content_bg",
								"type"	=> "background"));

					tie_options(
						array(	"name"	=> __( 'Blocks / Widgets Background', 'tie' ),
								"id"	=> "boxes_bg",
								"type"	=> "background"));

				?>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Post Styling', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Post Links Color', 'tie' ),
								"id"	=> "post_links_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"		=> __( 'Post Links Decoration', 'tie' ),
								"id"		=> "post_links_decoration",
								"type"		=> "select",
								"options"	=> array(	""				=> __( 'Default', 'tie' ),
														"none"			=> __( 'none', 'tie' ),
														"underline"		=> __( 'underline', 'tie' ),
														"overline"		=> __( 'overline', 'tie' ),
														"line-through"	=> __( 'line-through', 'tie' ) )));

					tie_options(
						array(	"name"	=> __( 'Post Links Color on mouse over', 'tie' ),
								"id"	=> "post_links_color_hover",
								"type"	=> "color"));

					tie_options(
						array(	"name"		=> __( 'Post Links Decoration on mouse over', 'tie' ),
								"id"		=> "post_links_decoration_hover",
								"type"		=> "select",
								"options"	=> array(	""				=> __( 'Default', 'tie' ),
														"none"			=> __( 'none', 'tie' ),
														"underline"		=> __( 'underline', 'tie' ),
														"overline"		=> __( 'overline', 'tie' ),
														"line-through"	=> __( 'line-through', 'tie' ) )));
				?>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Footer Background', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Background', 'tie' ),
								"id"	=> "footer_background",
								"type"	=> "background"));

					tie_options(
						array(	"name"	=> __( 'Footer Widget Title color', 'tie' ),
								"id"	=> "footer_title_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color', 'tie' ),
								"id"	=> "footer_links_color",
								"type"	=> "color"));

					tie_options(
						array(	"name"	=> __( 'Links Color on mouse over', 'tie' ),
								"id"	=> "footer_links_color_hover",
								"type"	=> "color"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Custom CSS', 'tie' ) ?></h3>
				<div class="option-item">
					<p><strong><?php _e( 'Global CSS :', 'tie' ) ?></strong></p>
					<textarea id="tie_css" name="tie_options[css]" class="code tie-css" style="width:100%" rows="7"><?php echo tie_get_option('css');  ?></textarea>
				</div>
				<div class="option-item">
					<p><strong><?php _e( 'Tablets:', 'tie' ) ?></strong><?php _e( '768 - 985px', 'tie' ) ?> </p>
					<textarea id="tie_css_tablets" name="tie_options[css_tablets]" class="code tie-css"  style="width:100%" rows="7"><?php echo tie_get_option('css_tablets');  ?></textarea>
				</div>
				<div class="option-item">
					<p><strong><?php _e( 'Wide Phones:', 'tie' ) ?></strong><?php _e( '480 - 767px', 'tie' ) ?></p>
					<textarea id="tie_css_wphones" name="tie_options[css_wide_phones]" class="code tie-css"  style="width:100%" rows="7"><?php echo tie_get_option('css_wide_phones');  ?></textarea>
				</div>
				<div class="option-item">
					<p><strong><?php _e( 'Phones:', 'tie' ) ?></strong><?php _e( '320 - 479px', 'tie' ) ?></p>
					<textarea id="tie_css_phones" name="tie_options[css_phones]" class="code tie-css"  style="width:100%" rows="7"><?php echo tie_get_option('css_phones');  ?></textarea>
				</div>
			</div>

		</div> <!-- Styling -->



		<div id="tab14" class="tab_content tabs-wrap">
			<h2><?php _e( 'Typography', 'tie' ) ?></h2>	<?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Character sets', 'tie' ) ?></h3>
				<p class="tie_message_hint"><strong><?php _e( 'Tip:', 'tie' ) ?></strong><?php _e( "If you choose only the languages that you need, you'll help prevent slowness on your webpage.", 'tie' ) ?></p>
				<?php
					tie_options(
						array(	"name"	=> __( 'Latin Extended', 'tie' ),
								"id"	=> "typography_latin_extended",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Cyrillic', 'tie' ),
								"id"	=> "typography_cyrillic",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Cyrillic Extended', 'tie' ),
								"id"	=> "typography_cyrillic_extended",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Greek', 'tie' ),
								"id"	=> "typography_greek",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Greek Extended', 'tie' ),
								"id"	=> "typography_greek_extended",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Khmer', 'tie' ),
								"id"	=> "typography_khmer",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Vietnamese', 'tie' ),
								"id"	=> "typography_vietnamese",
								"type"	=> "checkbox"));
				?>
			</div>

			<div class="tiepanel-item">
				<h3><?php _e( 'Live typography preview', 'tie' ) ?></h3>
					<?php
					tie_options(
						array( 	"name"	=> "",
								"id"	=> "typography_test",
								"type"	=> "typography"));
					?>

				<div id="font-preview" class="option-item"><?php _e( 'Grumpy wizards make toxic brew for the evil Queen and Jack.', 'tie' ) ?></div>

			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Main Typography', 'tie' ) ?></h3>
				<?php
					tie_options(
						array( 	"name"	=> __( 'General Typography', 'tie' ),
								"id"	=> "typography_general",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Site Title In Header', 'tie' ),
								"id"	=> "typography_site_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Tagline In Header', 'tie' ),
								"id"	=> "typography_tagline",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Top Menu', 'tie' ),
								"id"	=> "typography_top_menu",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Main Navigation', 'tie' ),
								"id"	=> "typography_main_nav",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Breaking News Label', 'tie' ),
								"id"	=> "typography_breaking_news",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Grid Slider Post Title', 'tie' ),
								"id"	=> "typography_grid_slider_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Slider Post Title', 'tie' ),
								"id"	=> "typography_slider_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Page Title', 'tie' ),
								"id"	=> "typography_page_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Single Post Title', 'tie' ),
								"id"	=> "typography_post_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Post Title in Homepage Blocks and Post Titles in Blog Layout', 'tie' ),
								"id"	=> "typography_post_title_boxes",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Small Post Title in Homepage Blocks', 'tie' ),
								"id"	=> "typography_post_title2_boxes",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Post Meta', 'tie' ),
								"id"	=> "typography_post_meta",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Post Entry', 'tie' ),
								"id"	=> "typography_post_entry",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Blockquotes', 'tie' ),
								"id"	=> "typography_blockquotes",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Blocks Titles', 'tie' ),
								"id"	=> "typography_boxes_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Widgets Titles', 'tie' ),
								"id"	=> "typography_widgets_title",
								"type"	=> "typography"));

					tie_options(
						array( 	"name"	=> __( 'Footer Widgets Titles', 'tie' ),
								"id"	=> "typography_footer_widgets_title",
								"type"	=> "typography"));
				?>
			</div>
		</div> <!-- Typography -->


		<div id="tab20" class="tab_content tabs-wrap">
			<h2><?php _e( 'Translations', 'tie' ) ?></h2>	<?php echo $save ?>

			<div>
			<?php
				global $tie_default_texts;
				foreach ( $tie_default_texts as $value ) {
					if( is_array( $value ) ){
						?>
					</div> <!--tie-panel-item -->
					<div class="tiepanel-item">
						<h3><?php echo $value[ 'text' ] ?></h3>
						<?php
					}
					else{
						$value = htmlspecialchars( $value );
						tie_options( array(  "id"=> tie_sanitize_title($value), "name"=> $value, "type"=> "text") );
					}
				}
				?>
			</div> <!--tie-panel-item -->
		</div> <!-- Translations -->


		<div id="tab10" class="tab_content tabs-wrap">
			<h2><?php _e( 'Advanced Settings', 'tie' ) ?></h2>	<?php echo $save ?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Advanced Settings', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'Disable Arqam Lite', 'tie' ),
								"id"	=> "disable_arqam_lite",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Notify on theme updates', 'tie' ),
								"id"	=> "notify_theme",
								"type"	=> "checkbox"));

					tie_options(
						array(	"name"	=> __( 'Disable the Responsiveness', 'tie' ),
								"id"	=> "disable_responsive",
								"type"	=> "checkbox"));
				?>
				<p class="tie_message_hint"><?php _e( 'This option works only on Tablets and Phones .. to disable the responsiveness action on the desktop .. edit style.css file and remove all Media Queries from the end of the file .', 'tie' ) ?></p>
			</div>


			<div class="tiepanel-item">
				<h3><?php _e( 'WordPress Login page Logo', 'tie' ) ?></h3>
				<?php
					tie_options(
						array(	"name"	=> __( 'WordPress Login page Logo', 'tie' ),
								"id"	=> "dashboard_logo",
								"type"	=> "upload"));

					tie_options(
						array(	"name"	=> __( 'WordPress Login page Logo URL', 'tie' ),
								"id"	=> "dashboard_logo_url",
								"type"	=> "text"));
				?>

			</div>
			<?php
				global $array_options ;

				$current_options = array();
				foreach( $array_options as $option ){
					if( get_option( $option ) )
						$current_options[$option] =  get_option( $option ) ;
				}
			?>

			<div class="tiepanel-item">
				<h3><?php _e( 'Export', 'tie' ) ?></h3>
				<div class="option-item">
					<textarea style="width:100%" rows="7"><?php echo $currentsettings = base64_encode( serialize( $current_options )); ?></textarea>
				</div>
			</div>
			<div class="tiepanel-item">
				<h3><?php _e( 'Import', 'tie' ) ?></h3>
				<div class="option-item">
					<textarea id="tie_import" name="tie_import" style="width:100%" rows="7"></textarea>
				</div>
			</div>


		</div> <!-- Advanced -->


		<div class="mo-footer">
			<?php echo $save; ?>
		</form>

			<form method="post">
				<div class="mpanel-reset">
					<input type="hidden" name="resetnonce" value="<?php echo wp_create_nonce('reset-action-code'); ?>" />
					<input name="reset" class="mpanel-reset-button button button-primary button-large" type="submit" onClick="if(confirm('<?php _e( 'All settings will be rest .. Are you sure ?', 'tie' ) ?>')) return true ; else return false; " value="<?php _e( 'Reset All Settings', 'tie' ) ?>" />
					<input type="hidden" name="action" value="reset" />
				</div>
			</form>
		</div>

	</div><!-- .mo-panel-content -->
	<div class="clear"></div>
</div><!-- .mo-panel -->
<?php
}

在admin文件夹下面创建update.php文件,通过update_option( ‘tie_options’ , $theme_options );来更新并options.

最近学习笔记walker.theme option还有无限加载按钮

一:如何创建walker函数:

walker函数是用在wp_nav_menu子级ul菜单的函数,由四个method函数组成,分别是start_lvl() 方法函数,end_lvl() 函数, 是用在<ul>标签上,生成ul的output, 也就是html的样式的。start_el() 和end_el() 函数,是生成li\a\span的output规则的。

贰:如何创建自定义css

首先创建自定义css的sub admin page,然后创建 字段,添加css的输入框。

然后去下载ace.js,网址是:ace.c9.io, 后端代码编辑器插件,整合到后台里。要注意要下载无冲突的版本,noncflict版本。不然无法起作用。添加自定义输入的css的theme option后,在header里面添加style标签,然后在里面调用get_option,就可以实现。

叁:如何创建无限加载按钮

首先创建按钮的Html,在while循环下面,然后添加ajax代码:

$(document).on(‘click’,’.abt-load-more’,function(){
var page = $(this).data(‘page’);

var ajaxurl = $(this).data('url');

$.ajax({
  url: ajaxurl,
  data: {
    page: page,
    action: 'abt_load_more',
  },
  error : function( response ){
    console.log(response);
  },
  success : function( response ){
    $('.abt-post-container').append(response);
  }

});

然后在inc文件夹创建ajax.php