public function saveAddLocations()
    {
        if (is_array($this->additional_locations) && !empty($this->additional_locations)) {
            foreach ($this->additional_locations as &$location) {
                if (!empty($location['parent']) && $location['parent']['id'] > 0) {
                    $location['title'] = $location['parent']['title'].', '.$location['title'];
                }
            }
            update_post_meta($this->ID, 'additional_locations', $this->additional_locations);
        }
    }
public function saveAddLocations()
    {
        if (is_array($this->additional_locations) && !empty($this->additional_locations)) {
            foreach ($this->additional_locations as &$location) {
                if (!empty($location['parent']) && $location['parent']['id'] > 0) {
                    $location['title'] = $location['parent']['title'].', '.$location['title'];
                }
            }
            update_post_meta($this->ID, 'additional_locations', $this->additional_locations);
        }
    }
public function saveAddLocations ( ) { if ( is_array ( $ this -> additional_locations ) && ! empty ( $ this -> additional_locations ) ) { foreach ( $ this -> additional_locations as & $ location ) { if ( ! empty ( $ location [ 'parent' ] ) && $ location [ 'parent' ] [ 'id' ] > 0 ) { $ location [ 'title' ] = $ location [ 'parent' ] [ 'title' ] . ', ' . $ location [ 'title' ] ; } } update_post_meta ( $ this -> ID , 'additional_locations' , $ this -> additional_locations ) ; } }
Saves additional locations as meta data
@return void
Saves additional locations as meta data