Make the image optional for WordPress posts too
Some blog posts just don't have one. WordPressPublisher no longer rejects publishing a type=blog post without image_url — it uploads and attaches it as the featured image when present, and simply skips that step (no featured_media set) otherwise. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
<td class="p-3">
|
||||
@if ($post->image_url)
|
||||
<img src="{{ $post->image_url }}" alt="" class="w-10 h-10 object-cover rounded">
|
||||
@elseif ($post->type === 'blog')
|
||||
<span class="text-xs text-amber-600">missing</span>
|
||||
@else
|
||||
<span class="text-gray-400">—</span>
|
||||
@endif
|
||||
@@ -118,7 +116,7 @@
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium">
|
||||
Image URL {{ $type === 'blog' ? '(required to publish to WordPress)' : '(optional)' }}
|
||||
Image URL (optional{{ $type === 'blog' ? ' — used as the featured image on WordPress if set' : '' }})
|
||||
</label>
|
||||
<input type="url" wire:model="imageUrl" placeholder="https://..." class="w-full border rounded p-2">
|
||||
@error('imageUrl') <span class="text-red-600 text-sm">{{ $message }}</span> @enderror
|
||||
|
||||
Reference in New Issue
Block a user