feat(creator-studio): centered paper layout and scheduled publishing
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
384d2b7aa0
commit
7bdf7cf018
20 files changed
+549
-308
No files matched your search
@@ -187,11 +187,11 @@ final class CreatorRest {
|
||||
$payload = [
|
||||
'title' => (string) $request->get_param('title'),
|
||||
'content' => (string) $request->get_param('content'),
|
||||
'excerpt' => (string) $request->get_param('excerpt'),
|
||||
'categories' => (array) $request->get_param('categories'),
|
||||
'tags' => (array) $request->get_param('tags'),
|
||||
'custom' => (array) $request->get_param('custom'),
|
||||
'featured' => (array) $request->get_param('featured'),
|
||||
'schedule' => (array) $request->get_param('schedule'),
|
||||
'pay' => (array) $request->get_param('pay'),
|
||||
];
|
||||
|
||||
@@ -199,7 +199,6 @@ final class CreatorRest {
|
||||
$result = SubmissionVersion::get_instance()->save_working($post_id, $user_id, [
|
||||
'title' => $payload['title'] !== '' ? $payload['title'] : null,
|
||||
'content' => $payload['content'],
|
||||
'excerpt' => $payload['excerpt'],
|
||||
'base_rev' => absint($request->get_param('rev')),
|
||||
'snapshot' => $this->snapshot_from_payload($payload),
|
||||
], false);
|
||||
@@ -215,10 +214,10 @@ final class CreatorRest {
|
||||
'posts_id' => $post_id,
|
||||
'post_title' => $payload['title'],
|
||||
'post_content' => $payload['content'],
|
||||
'excerpt' => $payload['excerpt'],
|
||||
'category' => $payload['categories'],
|
||||
'tags' => implode(',', array_map('strval', $payload['tags'])),
|
||||
'featured_data'=> $payload['featured'],
|
||||
'schedule' => $payload['schedule'],
|
||||
];
|
||||
foreach ($payload['custom'] as $key => $value) {
|
||||
$data['cf_' . sanitize_key((string) $key)] = $value;
|
||||
@@ -259,11 +258,11 @@ final class CreatorRest {
|
||||
$payload = [
|
||||
'title' => (string) $request->get_param('title'),
|
||||
'content' => (string) $request->get_param('content'),
|
||||
'excerpt' => (string) $request->get_param('excerpt'),
|
||||
'categories' => (array) $request->get_param('categories'),
|
||||
'tags' => (array) $request->get_param('tags'),
|
||||
'custom' => (array) $request->get_param('custom'),
|
||||
'featured' => (array) $request->get_param('featured'),
|
||||
'schedule' => (array) $request->get_param('schedule'),
|
||||
'pay' => (array) $request->get_param('pay'),
|
||||
];
|
||||
|
||||
@@ -275,7 +274,6 @@ final class CreatorRest {
|
||||
$version = SubmissionVersion::get_instance()->save_working($post_id, $user_id, [
|
||||
'title' => $payload['title'],
|
||||
'content' => $payload['content'],
|
||||
'excerpt' => $payload['excerpt'],
|
||||
'base_rev' => absint($request->get_param('rev')),
|
||||
'snapshot' => $this->snapshot_from_payload($payload),
|
||||
], true);
|
||||
@@ -299,10 +297,10 @@ final class CreatorRest {
|
||||
'posts_id' => $post_id,
|
||||
'post_title' => $payload['title'],
|
||||
'post_content' => $payload['content'],
|
||||
'excerpt' => $payload['excerpt'],
|
||||
'category' => $payload['categories'],
|
||||
'tags' => implode(',', array_map('strval', $payload['tags'])),
|
||||
'featured_data' => $payload['featured'],
|
||||
'schedule' => $payload['schedule'],
|
||||
];
|
||||
foreach ($payload['custom'] as $key => $value) {
|
||||
$data['cf_' . sanitize_key((string) $key)] = $value;
|
||||
@@ -691,6 +689,8 @@ final class CreatorRest {
|
||||
'canPay' => $cap('new_post_pay'),
|
||||
'canPayDownload' => $cap('new_post_pay_download'),
|
||||
'canPublishNow' => $cap('new_post_audit_no'),
|
||||
// 定时发布只有能直接发布的账号可用;其余账号提交后仍走审核队列。
|
||||
'canSchedule' => $cap('new_post_audit_no'),
|
||||
'canEdit' => $post_id > 0 ? $front->can_edit_post($post_id, $user_id) : $front->can_submit($user_id),
|
||||
'isLoggedIn' => $user_id > 0,
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user