update
This commit is contained in:
@@ -92,16 +92,6 @@ class Yacht {
|
||||
return (float) get_post_meta( $yacht_id, '_yacht_price_per_day', true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get yacht Google Calendar ID
|
||||
*
|
||||
* @param int $yacht_id Yacht post ID.
|
||||
* @return string
|
||||
*/
|
||||
public static function get_gcal_id( $yacht_id ) {
|
||||
return get_post_meta( $yacht_id, '_yacht_gcal_id', true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get yacht features
|
||||
*
|
||||
@@ -134,13 +124,23 @@ class Yacht {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update yacht Google Calendar ID
|
||||
* Get yacht alias for Google Calendar global sync.
|
||||
*
|
||||
* @param int $yacht_id Yacht post ID.
|
||||
* @return string
|
||||
*/
|
||||
public static function get_gcal_alias( $yacht_id ) {
|
||||
return (string) get_post_meta( $yacht_id, '_yacht_gcal_alias', true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update yacht alias for Google Calendar global sync.
|
||||
*
|
||||
* @param int $yacht_id Yacht post ID.
|
||||
* @param string $gcal_id Google Calendar ID.
|
||||
* @param string $alias Alias.
|
||||
*/
|
||||
public static function update_gcal_id( $yacht_id, $gcal_id ) {
|
||||
update_post_meta( $yacht_id, '_yacht_gcal_id', sanitize_text_field( $gcal_id ) );
|
||||
public static function update_gcal_alias( $yacht_id, $alias ) {
|
||||
update_post_meta( $yacht_id, '_yacht_gcal_alias', sanitize_text_field( $alias ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user