• Resolved imjscn

    (@imjscn)


    I need to remove the function save(),
    but this function is used by another function data_remove(),

    I don’t understand this line:
    return ( $save === true ) ? $this->save() : true;

    If I removed save() function, how can I modify this line to keep the data_remove() working?

    The 2 functions currently working in a plugin as following:

    function data_remove( $save = false ) {
            $this->_data_obj = null;
            return ( $save === true ) ? $this->save() : true;
        }
    
        function save(){
            // some codes here to save all data into database table
            return true;
        }

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘need help in understanding one line code’ is closed to new replies.