Skip to content

Delete /templates endpoint #721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 26, 2025
Merged

Delete /templates endpoint #721

merged 4 commits into from
May 26, 2025

Conversation

oguzkocer
Copy link
Contributor

@oguzkocer oguzkocer commented May 11, 2025

Implements delete & trash /templates endpoint following the existing conventions.

@oguzkocer oguzkocer added this to the 0.2 milestone May 11, 2025
@oguzkocer oguzkocer marked this pull request as ready for review May 22, 2025 00:32
@oguzkocer oguzkocer enabled auto-merge (squash) May 22, 2025 00:32
@oguzkocer oguzkocer requested a review from a team May 22, 2025 00:32
@@ -160,7 +161,7 @@ pub struct SparseTemplate {
#[WpContext(edit, embed, view)]
pub author: Option<UserId>,
#[WpContext(edit, view)]
pub modified: Option<bool>,
pub modified: Option<BoolOrWpGmtDateTime>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the API doc, it looks like we should treat boolean values (which I assume are always false) as an Option<WpGmtDateTime>.none.

The date the template was last modified, in the site's timezone.
JSON data type: string,
Format: datetime (details)

@oguzkocer oguzkocer requested a review from crazytonyli May 24, 2025 02:58
@oguzkocer oguzkocer merged commit 24452bd into trunk May 26, 2025
20 checks passed
@oguzkocer oguzkocer deleted the delete-templates branch May 26, 2025 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants