WordPress: How to enable customers to enable the theme I developed

Source: Internet
Author: User

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

Small V in helping customers to develop WordPress theme or plug-in after the general theme or plug-in in the background to prepare a use of the documentation, but some customers careless, unable to find the documentation, the results will run back to ask Little V, Sometimes I get bored. Just recently in the local test plug-in found a control plug-in enabled to jump to the description page code, small V to dig out the code.

To jump code after a theme is enabled:

Global $pagenow;

if (Is_admin () && isset ($_get[' activated ']) && $pagenow = = ' themes.php ')

{

Wp_redirect (Admin_url (' mypage.php ')); Mypage.php can be changed to the address of the page you want to jump

Exit;

}

To enable a plugin to jump code:

Global $pagenow;

if (Is_admin () && isset ($_get[' activated ']) && $pagenow = = ' plugins.php ')

{

Wp_redirect (Admin_url (' mypage.php ')); Usage ditto

Exit;

}

Add the above code to the functions.php file.

This article link: http://v7v3.com/wpjiaocheng/20130699.html reproduced please specify the source, thank you for your cooperation!

Related Article

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.