WordPress Theme Chinese: Background option name modification error problem

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Often in the Chinese WordPress friends will often encounter such problems, in the Chinese background after the name of the option, there is no way to switch options, such as the following figure theme of the background

If the article theme-options.php directly from the background configuration of the topic the name value in the direct Chinese $options[] Value:

$options [] = Array ("name" => "General Options", "type" => "heading");

So after the Chinese, you this backstage is no way to switch, in fact, this reason is because JS can not find a matching option caused, we could see in the source ha, the following figure:

The solution is as follows:

Add the original English name to the theme-options.php $options[] value in the subject, as follows:

$options [] = Array ("name" => "General Options", "E_name" => "Generic Settings",//English name, for switching JS call "type" => "heading");

Then find your background settings php file, such as this topic is admin-interface.php, in the JS call place to modify the specified label, the code is as follows:

$jquery _click_hook = ereg_replace ("[^a-za-z0-9]", "", Strtolower ($value [' e_name ']), or $value [' name '] instead $value [' E_ Name ']

$jquery _click_hook = "of-option-". $jquery _click_hook;

The above modified code to be based on your actual code location to modify, this article provides an example of a topic, but the method is the same, and finally we look at the source code, the label came out:

Reprint Please specify: http://www.54ux.com/a-2016.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.