feat(front-submit): 1:1 写文章/投稿页对齐 zibll newposts
Register AKSRT 写文章/投稿 page template, wire header publish entry to front submit URL, rewrite page-submit as dual-column TinyMCE compose with featured cover, multi-category/topics/filters, pay box, drafts, and capability-gated FrontSubmit AJAX (pay/featured traits).
This commit is contained in:
1 parent
cd4b1a73dc
commit
518e825bdd
25 files changed
+3029
-982
No files matched your search
@@ -32,6 +32,34 @@ function aksrt_get_user_center_url(string $tab = ''): string {
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_new_post_url')) :
|
||||
/**
|
||||
* 前台写文章/投稿页 URL(模板 templates/pages/page-submit.php)。
|
||||
*
|
||||
* @param int $edit_id 编辑中的文章 ID;0 表示新建。
|
||||
* @return string 未指派页面时返回空串。
|
||||
*/
|
||||
function aksrt_get_new_post_url(int $edit_id = 0): string {
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$submit = \AKSRT\Settings\Settings::get_submit_settings();
|
||||
if (isset($submit['enabled']) && empty($submit['enabled'])) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$url = function_exists('aksrt_get_page_url_by_template')
|
||||
? aksrt_get_page_url_by_template('templates/pages/page-submit.php')
|
||||
: '';
|
||||
if ($url === '') {
|
||||
return '';
|
||||
}
|
||||
if ($edit_id > 0) {
|
||||
$url = add_query_arg('edit', $edit_id, $url);
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
endif;
|
||||
|
||||
if (!function_exists('aksrt_get_orders_page_url')) :
|
||||
/**
|
||||
* 订单中心页面 URL(模板 templates/pages/page-orders.php)。
|
||||
|
||||
Reference in new issue
Block a user