Title: Classic editor implementation
Last modified: September 1, 2023

---

# Classic editor implementation

 *  Anonymous User 20443167
 * (@anonymized-20443167)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/classic-editor-implementation/)
 * Hello Jose.
   This plugin seems to be what I’m looking for. But it will need some
   tweaking to work with my setup.
 * I use [classic editor](https://wordpress.org/plugins/classic-editor/).
 * When I copy a YouTube link on it, it’s automatically picked up and embedded. 
   This is seen on **both** back end editor and front end.
 * I would need to first have a function/snippet that completely disable this feature.
   No longer loading any of the assets WP uses for embedding.
   _(Maybe your plugin
   already does this?_)
 * Second, I would need a code snippet to automatically add your short code to all
   YouTube links in the content. So I don’t have to manually type it every time.
   It will also take care of **old links**. Something like this:
 *     ```wp-block-code
       function modify_youtube_links($content) {
   
           $pattern = '/https:\/\/www\.youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/';
   
           $replacement = '<p>[load_video_on_click link="https://www.youtube.com/watch?v=$1"]</p>';
   
           $content = preg_replace_callback($pattern, function($matches) use ($replacement) {
               return preg_replace('/\$1/', $matches[1], $replacement);
           }, $content);
   
           return $content;
       }
   
       add_filter('the_content', 'modify_youtube_links');
       ```
   
 * I hope to hear from you to see if I’m in the right track and what’s your opinion
   on this.

The topic ‘Classic editor implementation’ is closed to new replies.

 * ![](https://ps.w.org/load-video-on-click/assets/icon-256x256.png?rev=2653796)
 * [Load Video On Click](https://wordpress.org/plugins/load-video-on-click/)
 * [Support Threads](https://wordpress.org/support/plugin/load-video-on-click/)
 * [Active Topics](https://wordpress.org/support/plugin/load-video-on-click/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/load-video-on-click/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/load-video-on-click/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: Anonymous User 20443167
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/classic-editor-implementation/)
 * Status: not resolved