以下是一个简单的WordPress示例插件:

Options updated.

'; } // 获取当前选项 $options = get_option( 'myplugin_option', '' ); ?>
<div class="wrap">
    <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
    <form method="post">
        <label for="myplugin_options">Options:</label>
        <textarea id="myplugin_options" name="myplugin_options"><?php echo esc_textarea( $options ); ?></textarea>
        <?php submit_button(); ?>
    </form>
</div>
<?php

}

写一段Wordpress的示例插件

原文地址: https://www.cveoy.top/t/topic/b58h 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录