'add-post', 'title' => 'Quick Add New Post', 'icon' => 'admin-post', 'aliases' => ['create article', 'write blog', 'one click', '1click', 'new draft', 'frontend', 'backend'], 'available' => $quick, 'modes' => ['backend' => $create, 'frontend' => $frontend], 'steps' => [ ['title' => 'Choose a topic', 'body' => 'Choose Topic list or Manual topic, then select or enter the article topic.', 'selector' => '.aismart-one-click-topic-area', 'route' => 'tool'], ['title' => 'Choose the post settings', 'body' => 'Select the article format and Draft, Publish now, or Schedule. Check the date before scheduling.', 'selector' => '.aismart-one-click-options', 'route' => 'tool'], ['title' => 'Generate when ready', 'body' => 'Review the topic and settings, then use the normal 1Click Generate button. Generation uses your existing credits.', 'selector' => '#aismart-one-click-submit', 'route' => 'tool'], ['title' => 'Review your post', 'body' => 'Open the created post and review its text, images, language, and publication status.', 'selector' => '#the-list', 'route' => 'posts'], ], ], [ 'id' => 'translate', 'title' => 'Quick Translate', 'icon' => 'translation', 'aliases' => ['language', 'multilingual', 'wpml', 'polylang', 'translate post', 'spanish', 'chinese'], 'available' => aismart_token_wp_ai_extension_enabled('post_list_translate'), 'url' => $posts, 'steps' => [ ['title' => 'Choose the source post', 'body' => 'Find the original post in Posts. Use its AISmart Translate control rather than creating an unrelated copy.', 'selector' => '#the-list', 'route' => 'posts'], ['title' => 'Review the translation setup', 'body' => 'Check the configured target languages and source post before using its AISmart Translate button. That button starts the normal translation operation.', 'selector' => '.aismart-post-list-translate', 'route' => 'posts'], ['title' => 'Translate and review', 'body' => 'Start translation yourself, wait for its real status, and review the translated post and its language link.', 'selector' => '#the-list', 'route' => 'posts'], ], ], [ 'id' => 'improve', 'title' => 'Quick Improve Content', 'icon' => 'edit', 'aliases' => ['rewrite', 'fix demo', 'text box', 'edit page', 'edit post', 'improve copy', 'content'], 'available' => aismart_token_wp_ai_extension_enabled('editor_content'), 'url' => $posts, 'steps' => [ ['title' => 'Open the content', 'body' => 'Open the post or page you want to edit. Keep existing unsaved work before moving to another page.', 'selector' => '#the-list, #post', 'route' => 'current'], ['title' => 'Choose the text and direction', 'body' => 'Select the intended text or box, then open its Studio text tool. Review the scope and enter the writing direction.', 'selector' => '#aismart-editor-content-form, .aismart-builder-tools, .aismart-elementor-text', 'route' => 'current'], ['title' => 'Review before saving', 'body' => 'Use the normal text generation control when ready. Review the replacement, preserve surrounding content, and save only when you approve it.', 'selector' => '#aismart-editor-content-form, #publish, .editor-post-publish-button', 'route' => 'current'], ], ], [ 'id' => 'media', 'title' => 'Quick Generate Media', 'icon' => 'format-image', 'aliases' => ['image', 'featured image', 'video', 'audio', 'voice', 'sound', 'picture', 'generate media'], 'available' => aismart_token_wp_ai_extension_enabled('editor_media') || aismart_token_wp_ai_extension_enabled('sound_engineer'), 'url' => $posts, 'steps' => [ ['title' => 'Open the destination', 'body' => 'Open the post or page where the media belongs, then open its Studio tools.', 'selector' => '#aismart-editor-ai, #the-list', 'route' => 'current'], ['title' => 'Choose the media tool', 'body' => 'Choose Image & Video or Voice & Sound. Enter the prompt and review the available settings and placement.', 'selector' => '#aismart-editor-ai-media-tab, #aismart-editor-ai-audio-tab', 'route' => 'current'], ['title' => 'Generate and inspect the result', 'body' => 'Start the normal operation yourself. Wait for the real result, inspect it, and choose its placement before saving.', 'selector' => '#aismart-editor-image-form, #aismart-editor-video-form, #aismart-editor-voice-form', 'route' => 'current'], ], ], [ 'id' => 'schedule', 'title' => 'Quick Schedule Post', 'icon' => 'calendar-alt', 'aliases' => ['publish later', 'date', 'time', 'schedule article', 'future publication'], 'available' => true, 'url' => $posts, 'steps' => [ ['title' => 'Open the post', 'body' => 'Open the draft you want to schedule. Review its content and current status first.', 'selector' => '#the-list, #post', 'route' => 'current'], ['title' => 'Set the publish time', 'body' => 'Open the native publish date controls and choose a future date and time in the site timezone.', 'selector' => '#timestampdiv, #misc-publishing-actions, .editor-post-publish-panel, .editor-post-schedule', 'route' => 'current'], ['title' => 'Confirm the schedule', 'body' => 'Use the native Schedule control yourself, then verify the saved date and Scheduled status in Posts.', 'selector' => '#publish, .editor-post-publish-button, #the-list', 'route' => 'current'], ], ], ]; } function aismart_external_guide_assets() { if (!aismart_external_guide_allowed()) { return; } $root = dirname(__DIR__); $url = plugin_dir_url($root . '/aismart-token.php'); wp_enqueue_style('dashicons'); wp_enqueue_style('aismart-external-guide', $url . 'assets/external-guide.css', [], (string) filemtime($root . '/assets/external-guide.css')); wp_enqueue_script('aismart-external-guide', $url . 'assets/external-guide.js', [], (string) filemtime($root . '/assets/external-guide.js'), true); wp_add_inline_script('aismart-external-guide', 'window.AISmartExternalGuide = ' . wp_json_encode([ 'catalog' => aismart_external_guide_catalog(), 'postsUrl' => admin_url('edit.php'), 'storageKey' => 'aismart-help-v1-' . get_current_blog_id() . '-' . get_current_user_id(), ]) . ';', 'before'); } add_action('admin_enqueue_scripts', 'aismart_external_guide_assets', 40); add_action('wp_enqueue_scripts', 'aismart_external_guide_assets', 40); add_action('elementor/editor/after_enqueue_scripts', 'aismart_external_guide_assets', 40); function aismart_external_guide_render() { static $rendered = false; if ($rendered || !aismart_external_guide_allowed()) { return; } $rendered = true; ?>