Products
GG网络技术分享 2025-03-18 16:12 1
I am developing a wordpress plugin using OOPS concept with classes.
I want to use namespace in them.
Does anyone has any idea how to implement that in my plugin ?
Thanks图片转代码服务由CSDN问答提供
感谢您的意见,我们尽快改进~
功能建议我正在使用带有类的OOPS概念开发一个wordpress插件。
我想在其中使用命名空间。
任何人 有任何想法如何在我的插件中实现它?
谢谢</ p>
</ div>
Please define namespace with first line and use like we do it below.
<?php
namespace Appsense\\popop;
class shortcode{
public function gernerateShortcode(){
add_shortcode(\'appsense_popop\',array(\'Appsense\\popop\\shortcode\',\'popop_shortcode\'));
}
public function popop_shortcode(){
$output = \\\"Hello world!\\\";
return $output;
}
}
Demand feedback