gain access to core WordPress functions

i created a wordpress plugin but they sent me back some problems i must repair. i used

<?php  
include '../../../wp-load.php';
?>  

to gain access to core WordPress, byt they told me:

It's best if you tie your processing functions into an action hook, such as "init" or "admin_init".

but i found no good information on the web. i tried this:

<?php  
add_action('get_header', 'my_function_init');
?>

and other things i found on the web but nothing works like wp-load.php.

any advice ?


WordPress won't let you get files from the system for that... it is a security breach. The best you can get is admin_init.

read more here: Plugin API/Action Reference/admin init

it gives you everything you need... what are the limits you are talking about?

链接地址: http://www.djcxy.com/p/57346.html

上一篇: WordPress的

下一篇: 可以访问核心WordPress功能