get_compose_view($current_user_id, ['board_id' => $board_id]) : [ 'boards' => [], 'selected_board_id' => 0, 'visibility_options' => [], 'publish_mode' => 'pending', 'draft_count' => 0, 'drafts' => [], 'capabilities' => [], ]; $forum_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_forum_settings() : []; $title_placeholder = $forum_settings['other']['t_placeholder'] ?? __('请输入标题', 'aksrt'); $content_placeholder = $forum_settings['other']['c_placeholder'] ?? __('请输入内容', 'aksrt'); $title_maxlen = max(5, min(100, (int) ($forum_settings['other']['title_strlen_limit'] ?? 30))); $vote_max = (int) ($forum_settings['other']['vote_max'] ?? 8); $forum_name = $forum_settings['names']['forum'] ?? __('论坛', 'aksrt'); $boards = $view['boards'] ?? []; $visibility_options = $view['visibility_options'] ?? []; $publish_mode = (string) ($view['publish_mode'] ?? 'pending'); $draft_count = (int) ($view['draft_count'] ?? 0); $drafts = $view['drafts'] ?? []; $caps = $view['capabilities'] ?? []; $nonce = wp_create_nonce('aksrt_forum_compose'); // Load draft data if resuming $draft_data = null; if ($draft_id > 0 && $forum) { $draft_data = $forum->load_draft_data($current_user_id, $draft_id); if ($draft_data) { $board_id = (int) ($draft_data['board_id'] ?? 0); } } $initial_content = $draft_data ? $draft_data['content'] : ''; ?>
0) : ?>
/
'content', 'textarea_rows' => 18, 'media_buttons' => !empty($caps['can_upload_image']) || !empty($caps['can_upload_video']) || !empty($caps['can_upload_file']), 'teeny' => false, 'quicktags' => true, 'tinymce' => [ 'toolbar1' => 'formatselect,bold,italic,underline,strikethrough,blockquote,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,wp_more,fullscreen', 'toolbar2' => 'pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help', 'plugins' => 'paste,link,lists,fullscreen,wordpress,wplink,charmap', ], ]; if (empty($caps['can_upload_image']) && empty($caps['can_upload_video']) && empty($caps['can_upload_file'])) { $editor_settings['tinymce']['toolbar1'] = str_replace(',wp_more', '', $editor_settings['tinymce']['toolbar1']); } wp_editor($initial_content, 'compose-content', $editor_settings); ?>

>