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
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;
}
}