38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
||
/**
|
||
* User center profile posts part (orchestrator).
|
||
*
|
||
* @package AKSRT
|
||
*/
|
||
|
||
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 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>
|