source/php/Editor.php
public function save()
    {
        if (!$this->isValidPostSave()) {
            return;
        }

        // Check if post id is valid
        if (!isset($_REQUEST['id']) || empty($_REQUEST['id'])) {
            return trigger_error('Invalid post id. Please contact system administrator.');
        }

        $this->savePost();

        // If this is an ajax post, return "success" as plain text
        if (defined('DOING_AJAX') && DOING_AJAX) {
            echo "success";
            wp_die();
        }

        $this->notice(__('Modules saved', 'modularity'), ['updated']);
    }
public function save()
    {
        if (!$this->isValidPostSave()) {
            return;
        }

        // Check if post id is valid
        if (!isset($_REQUEST['id']) || empty($_REQUEST['id'])) {
            return trigger_error('Invalid post id. Please contact system administrator.');
        }

        $this->savePost();

        // If this is an ajax post, return "success" as plain text
        if (defined('DOING_AJAX') && DOING_AJAX) {
            echo "success";
            wp_die();
        }

        $this->notice(__('Modules saved', 'modularity'), ['updated']);
    }
public function save ( ) { if ( ! $ this -> isValidPostSave ( ) ) { return ; } // Check if post id is valid if ( ! isset ( $ _REQUEST [ 'id' ] ) || empty ( $ _REQUEST [ 'id' ] ) ) { return trigger_error ( 'Invalid post id. Please contact system administrator.' ) ; } $ this -> savePost ( ) ; // If this is an ajax post, return "success" as plain text if ( defined ( 'DOING_AJAX' ) && DOING_AJAX ) { echo "success" ; wp_die ( ) ; } $ this -> notice ( __ ( 'Modules saved' , 'modularity' ) , [ 'updated' ] ) ; }
Saves the selected modules
@return void
Saves the selected modules