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');
?>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742351142a4427541.html
评论列表(0条)