Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了计算站点视图的函数,我调用了add_action('init', 'wp125_adview');,但是当我在仪表板函数中时,一个问题也计算了我的视图,我希望这个函数只计算站点中的视图而不是管理面板中的视图,也许是add_action它的一些参数不会从仪表板进行 cal 功能吗?
add_action('init', 'wp125_adview');
add_action
I found it's add_action('wp', 'wp125_adview'); , when I'm in dashboard wordpess not call function wp125_adview();
add_action('wp', 'wp125_adview');
wp125_adview();