Title: youtube short code somewhere within plugin?
Last modified: May 30, 2017

---

# youtube short code somewhere within plugin?

 *  Resolved [stelaras1](https://wordpress.org/support/users/stelaras1/)
 * (@stelaras1)
 * [9 years ago](https://wordpress.org/support/topic/youtube-short-code-somewhere-within-plugin/)
 * Hi quys,
    -  This topic was modified 9 years ago by [stelaras1](https://wordpress.org/support/users/stelaras1/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [stelaras1](https://wordpress.org/support/users/stelaras1/)
 * (@stelaras1)
 * [9 years ago](https://wordpress.org/support/topic/youtube-short-code-somewhere-within-plugin/#post-9188314)
 * Hi quys,
 * first of all let me thank you for this plugin!..
 * i’m struggling to solve an issue for a couple of days without any luck :/
 * So i would kindly request for your input..
 * i’m using Nextscripts plugin to publish to facebook.
    Auto post scheduler is 
   working perfectly. To be able to use Nextscripts with recycled posts i used the
   following code changes described at: [https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/](https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/)
 * The code is actually working but the problem is that the new code causes the 
   following behaviour with videos:
    Post that do have videos like youtube code 
   with iframe (example <iframe width=”560″ height=”315″ src=”[https://www.youtube.com/embed/xxxxx&#8221](https://www.youtube.com/embed/xxxxx&#8221);
   frameborder=”0″ allowfullscreen>) after autopost the video iframe is lost, there
   is no video any more. It seems that the video code has been stripped.
 * Tried to simulate the whole process that is implied by autopost new code ([https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/](https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/))
   
   what i did was to manually publish a draft article or change the status of an
   already publised post to draft and then published it again. The video code with
   iframe remained intact.
 * Only when auto-post schedules and publishes the post there is a problem.
 * How these 3 new lines caused all this trouble? Is it possible for auto-post to
   somehow calls something that strips video’s code when video iframe exists?
    *
   just realized that the same happens with any type of iframes (for instance iframe
   from an instagram photo)
 * These are the 3 new lines added to auto-post-scheduler
    $update[‘post_status’]
   = ‘draft wp_update_post($update); do_action(‘draft_to_publish’, $id
 * Thanks,
    Stelios
    -  This reply was modified 9 years ago by [stelaras1](https://wordpress.org/support/users/stelaras1/).
 *  Thread Starter [stelaras1](https://wordpress.org/support/users/stelaras1/)
 * (@stelaras1)
 * [9 years ago](https://wordpress.org/support/topic/youtube-short-code-somewhere-within-plugin/#post-9189702)
 * in a fresh clean wordpress installation just installed auto-post-scheduler with
   modified code from [https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/](https://wordpress.org/support/topic/using-auto-post-scheduler-with-snap-social-network-auto-poster/)
 * The behaviour was exactly the same.
    When pasted from drafts all embedded code(
   from videos, instagram photos etc) was stripped and replaced with [embedded code]

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘youtube short code somewhere within plugin?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/auto-post-scheduler_bfcacf.svg)
 * [Auto Post Scheduler](https://wordpress.org/plugins/auto-post-scheduler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auto-post-scheduler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auto-post-scheduler/)
 * [Active Topics](https://wordpress.org/support/plugin/auto-post-scheduler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auto-post-scheduler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auto-post-scheduler/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [stelaras1](https://wordpress.org/support/users/stelaras1/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/youtube-short-code-somewhere-within-plugin/#post-9189702)
 * Status: resolved