Changeset 2906436
- Timestamp:
- 05/01/2023 05:09:26 AM (3 years ago)
- Location:
- multi-image-posts/trunk
- Files:
-
- 2 edited
-
js/admin_script.js (modified) (1 diff)
-
mutli-image-posts.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multi-image-posts/trunk/js/admin_script.js
r2906386 r2906436 21 21 22 22 //added template into preview div 23 myTemplate +="<table><tr><td rowspan='9'><img src='"+attachment.url+"' id='blah-"+k+"' width='250' height='300' /></td><td colspan='2'> </td><td></td></tr><tr><td colspan='8' rowspan='8'> </td><td><strong>File Name:</strong></td><td colspan='8' rowspan='8'> </td><td><input id='url-"+k+"' class='url mip_input' name='url[]' type='text' disabled='disabled' value='"+attachment.name+"' /><input id='url_id-"+k+"' name='url_id[]' type='hidden' value='"+attachment.id+"' /></td></tr><tr><td><strong>Image Title:</strong></td><td><input id='title-"+k+"' class='mip_input' name='title[]' type='text' value='"+attachment.title+"' required='required'/></td></tr><tr><td><strong>Alt Text:</strong></td><td><input id='alt_text-"+k+"' class='mip_input' name='alt_text[]' type='text' value='"+attachment.alt+"' required='required'/></td></tr><tr><td><strong>Post Title:</strong></td><td><input id='post_title-"+k+"' class='mip_input' name='post_title[]' type='text' value='"+attachment.title+"' required='required'/></td></tr><tr><td><strong>Caption:</strong></td><td><input id='caption-"+k+"' class='mip_input' name='caption[]' type='text' value='"+attachment.caption+"' required='required'/></td></tr><tr><td><strong>Tags:</strong></td><td><input id='tag-"+k+"' class='mip_input' name='tags[]' type='text' placeholder='Enter comma(,) separated tags here' required='required'/></td></tr><tr><td><strong>Categories:</strong></td><td>"+mip_getcategories( k )+"</td></tr></table><br><br>";23 myTemplate +="<table><tr><td rowspan='9'><img src='"+attachment.url+"' id='blah-"+k+"' width='250' height='300' /></td><td colspan='2'> </td><td></td></tr><tr><td colspan='8' rowspan='8'> </td><td><strong>File Name:</strong></td><td colspan='8' rowspan='8'> </td><td><input id='url-"+k+"' class='url mip_input' name='url[]' type='text' disabled='disabled' value='"+attachment.name+"' /><input id='url_id-"+k+"' name='url_id[]' type='hidden' value='"+attachment.id+"' /></td></tr><tr><td><strong>Image Title:</strong></td><td><input id='title-"+k+"' class='mip_input' name='title[]' type='text' value='"+attachment.title+"' required='required'/></td></tr><tr><td><strong>Alt Text:</strong></td><td><input id='alt_text-"+k+"' class='mip_input' name='alt_text[]' type='text' value='"+attachment.alt+"' required='required'/></td></tr><tr><td><strong>Post Title:</strong></td><td><input id='post_title-"+k+"' class='mip_input' name='post_title[]' type='text' value='"+attachment.title+"' required='required'/></td></tr><tr><td><strong>Caption:</strong></td><td><input id='caption-"+k+"' class='mip_input' name='caption[]' type='text' value='"+attachment.caption+"' required='required'/></td></tr><tr><td><strong>Tags:</strong></td><td><input id='tag-"+k+"' class='mip_input' name='tags[]' type='text' placeholder='Enter comma(,) separated tags here' /></td></tr><tr><td><strong>Categories:</strong></td><td>"+mip_getcategories( k )+"</td></tr></table><br><br>"; 24 24 //End template into preview div 25 25 -
multi-image-posts/trunk/mutli-image-posts.php
r2906386 r2906436 90 90 91 91 $post_id = wp_insert_post($postData); 92 // Add post tags 93 wp_add_post_tags($post_id,$tags); 92 if(!empty($tags)){ 93 // Add post tags 94 wp_add_post_tags($post_id,$tags); 95 } 94 96 //set image title as a tag 95 97 wp_set_post_tags( $post_id, array($image_title), true ); … … 153 155 <li>Set Image TITLE as Post(s) Title.</li> 154 156 <li>Set Image TITLE as "FOCUS KEYWORD" field of the plugin Yoast SEO.</li> 155 <li>Set Image TITLE as a Tagfor the post(s).</li>157 <li>Set Tags with user entered data and image title for the post(s).</li> 156 158 <li>Set Image as a Ping for the post(s).</li> 157 159 <li>Set Image Caption as a excerpt for the post(s).</li>
Note: See TracChangeset
for help on using the changeset viewer.