imazzara
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress redefine class or class method on child themeExtend:
On the contrusct of the class I have :
class MyClass extends ANOTHERCLASS
{
function __construct($post_type = ‘project’) {
$this->mail = new Fre_Mailing();
$this->post_type = PROJECT;
$this->disable_plan = ae_get_option(‘disable_plan’, false);
$this->add_ajax(‘ae-fetch-projects’, ‘fetch_post’);
$this->add_ajax(‘ae-project-sync’, ‘post_sync’); // post_sync is my method1()}
}Forum: Fixing WordPress
In reply to: WordPress redefine class or class method on child themeThe class is used to create a project and if is OK the method1() return the ajax call.
Because of that I need to redefined the method1() because I need the some vars that has value inside this method.
I don’t know if I’ve been clear of what I need to do.
On the method1() there is :
if ($this->disable_plan && $request[‘method’] == ‘create’) {
// disable plan, free to post place
$response = array(
‘success’ => true,
‘data’ => array(// set redirect url
‘redirect_url’ => $result->permalink
) ,
‘msg’ => __(“Submit place successfull.”, ET_DOMAIN)
);// send response
wp_send_json($response);
}I need to add one line after the wp_send_json($response) because I need some $request and $this stuffs