Add a code instance to the editor background of WordPress to share, _php tutorial

Source: Internet
Author: User

Add a code instance to the editor background of WordPress to share,


WordPress 3.5 New added a ToolTip function, you can create a prompt box, and then point to any element, such as the following example:

This article will teach you how to create a prompt box like this.

The first step is to add a script to the cue box so that you can use the JS method of the Cue box.

Mount the Cue box script function bing_admin_pointer_enqueue_scripts () {  wp_enqueue_style (' Wp-pointer ');  Wp_enqueue_script (' Wp-pointer ');} Add_action (' admin_enqueue_scripts ', ' bing_admin_pointer_enqueue_scripts ');

Then use the pointer () method to create a simple prompt box:

/**  *wordpress Add a hint box  *http://www.endskin.com/admin-help-box/*/function bing_add_pointer_scripts () {  $content = '

Please set a theme

'; $content. = '

Please make a simple configuration for the new theme! ';? > <?php}add_action (' admin_print_footer_scripts ', ' bing_add_pointer_scripts ');

Comprehensive Code:

/**  *wordpress Add a hint box  *http://www.endskin.com/admin-help-box/*/function bing_add_pointer_scripts () {  $content = '

Please set a theme

'; $content. = '

Please make a simple configuration for the new theme! ';? > <?php}add_action (' admin_print_footer_scripts ', ' bing_add_pointer_scripts '); Mount the Cue box script function bing_admin_pointer_enqueue_scripts () { wp_enqueue_style (' Wp-pointer '); Wp_enqueue_script (' Wp-pointer ');} Add_action (' admin_enqueue_scripts ', ' bing_admin_pointer_enqueue_scripts ');


Articles you may be interested in:

    • WordPress to determine whether the user is logged in the code
    • Detailed description of WordPress in the reminder to install plug-ins and hidden plug-in function implementation
    • A detailed description of the filter properties in WordPress development and the use of SQL statements function
    • PHP function parsing for writing custom storage fields in WordPress
    • A detailed description of the PHP functions used to create user roles in WordPress

http://www.bkjia.com/PHPjc/1084525.html www.bkjia.com true http://www.bkjia.com/PHPjc/1084525.html techarticle to the WordPress edit background add a hint box code instance sharing, WordPress 3.5 New Added a prompt box function, you can create a prompt box, and then point to any element, such as the next ...

  • 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.