admin管理员组文章数量:1333451
I was following a tutorial, but when they have done it, there was an option for the plugin and the form page was showing, but in my case it did not work. Do I need to add action hook?
The code is as follows:
/*
Plugin Name: Login Form Plugin
Author: Mitaly
version: 0.0.3
Description: This is a custom plugin
*/
<?php
//add custom page fanction
function DBP_add_front_page(){
//include insertion code
include_once("form_template.php");
DBP_insert_data();
}
//define absolute path to avoid direct ArrayAccess
if(!defined('ABSPATH'))
{
define('ABSPATH',dirname(__FILE__) . '/');
}
//including database files
include_once("employess-form.php");
//register hook
register_activation_hook(__FILE__,"DBP_tb_create");
//filter
add_filter('page_template','DBP_add_front_page');
?>
本文标签: Creating template page for my plugin in WordPress
版权声明:本文标题:Creating template page for my plugin in WordPress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742351142a2458517.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论