feat(user-center): upgrade posts panel to creator center
This commit is contained in:
1 parent
7891ce7096
commit
2f9384f368
7 files changed
+123
-36
No files matched your search
@@ -9,16 +9,29 @@ defined('ABSPATH') || exit;
|
||||
|
||||
$context = is_array($args['context'] ?? null) ? $args['context'] : [];
|
||||
extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
|
||||
$can_submit_posts = class_exists('\\AKSRT\\Core\\FrontSubmit')
|
||||
&& \AKSRT\Core\FrontSubmit::get_instance()->can_submit((int) $user_id);
|
||||
?>
|
||||
<div class="widget-card">
|
||||
<div class="profile-list-header">
|
||||
<h3 class="widget-title widget-title--inline">
|
||||
<?php
|
||||
/* translators: %d: post count */
|
||||
printf(esc_html__('我的文章(%d 篇)', 'aksrt'), $post_count);
|
||||
?>
|
||||
</h3>
|
||||
<?php require __DIR__ . '/posts-status-filter.php'; ?>
|
||||
<div class="profile-list-header creator-center-header">
|
||||
<div class="creator-center-heading">
|
||||
<h2 class="widget-title widget-title--inline"><?php esc_html_e('创作中心', 'aksrt'); ?></h2>
|
||||
<p class="creator-center-heading__summary">
|
||||
<?php
|
||||
/* translators: %d: total post count */
|
||||
printf(esc_html__('管理你的文章、草稿和审核状态(共 %d 篇)', 'aksrt'), $post_count);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="creator-center-actions">
|
||||
<?php if (!empty($new_post_url) && $can_submit_posts) : ?>
|
||||
<a class="btn-primary btn-sm" href="<?php echo esc_url($new_post_url); ?>">
|
||||
<span aria-hidden="true">+</span>
|
||||
<?php esc_html_e('新建文章', 'aksrt'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php require __DIR__ . '/posts-status-filter.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php require __DIR__ . '/posts-list.php'; ?>
|
||||
</div>
|
||||
Reference in new issue
Block a user