This commit is contained in:
2026-05-06 23:16:47 +02:00
parent ea77c8ea35
commit c4a485e530
23 changed files with 2141 additions and 1772 deletions

View File

@@ -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 ) );
}
/**