Title: Advanced plugin usage
Last modified: April 27, 2018

---

# Advanced plugin usage

 *  Resolved [Dima Stefantsov](https://wordpress.org/support/users/dima-stefantsov/)
 * (@dima-stefantsov)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/advanced-plugin-usage/)
 * Hi. Can not say too much about how great your youtuwp is. The best I could find
   for actually watching the videos. It’s simply too enjoyable.
 * I’ve decided I want my own mini collection of videos on site, with seo and own
   descriptions, that’s why I have custom taxonomies, using your shortcode to render
   beautiful UI.
 * I’m yet to solve all the complications, but I’m getting there. I’ll report what
   need to be fixed in your code 🙂
 * 1. You have `add_action( 'wp_enqueue_scripts', array(&$this, 'enqueue_script'),
   10 );`, which does not enqueue, it just registers. Thats too late to register.
   For my custom archive page I want your styles to be in header, not footer to 
   prevent the flickering / thumbnails reorganizing. But I can’t simply
 *     ```
       wp_enqueue_style('yotu-style');
       wp_enqueue_style('yotu-icons');
       wp_enqueue_style('yotupro');
       wp_enqueue_script('yotu-script');
       wp_enqueue_script('yotupro');
       ```
   
 * before `get_header();`, it’s not registered yet. And after `get_header();` it’s
   too late. A fix would be something like `add_action('wp', ..)` instead.
 * Could also use some public helper methods for enqueueing and rendering, to make
   sure I will not have to change my template once you decide to include one more
   style. I’d like to use something like
 *     ```
       global $yotuwp;
       $yotuwp->enqueue_frontent_scripts_and_styles();
       ```
   
    -  This topic was modified 8 years, 1 month ago by [Dima Stefantsov](https://wordpress.org/support/users/dima-stefantsov/).

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

 *  Thread Starter [Dima Stefantsov](https://wordpress.org/support/users/dima-stefantsov/)
 * (@dima-stefantsov)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/advanced-plugin-usage/#post-10226957)
 * 2. `$width = $player['width'] . 'px';` should be `$width = 'width: '.$player['
   width'].'px;';`, it’s rendered as `style="<?php echo $width;?>"`, a bug.
 *  Thread Starter [Dima Stefantsov](https://wordpress.org/support/users/dima-stefantsov/)
 * (@dima-stefantsov)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/advanced-plugin-usage/#post-10227175)
 * 3. It is an opinion, but since you are good at coding, you might consider automate
   trimming whitespaces. Working with your code, and this is what I see in git: 
   [http://4.stefantsov.com/s/2018.04.28_5.50.02_kmx6614a.png](http://4.stefantsov.com/s/2018.04.28_5.50.02_kmx6614a.png)
 * Text editors should have an option to do it. For example Sublime Text has it
 *     ```
       "trim_trailing_white_space_on_save": true,
       "translate_tabs_to_spaces": true, // ;)
       "ensure_newline_at_eof_on_save": true,
       ```
   
 * _(Or maybe I should consider disabling it x\_x)_
 *  Plugin Author [yotuwp](https://wordpress.org/support/users/yotuwp/)
 * (@yotuwp)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/advanced-plugin-usage/#post-10229620)
 * Hi Dima,
 * Many thank you for suggestions.
 * I will review then adding to the plugin.
 * I am glad to discuss with our about plugin development. I will contact you soon.
 * Many thank you again!
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This reply was modified 8 years, 1 month ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

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

The topic ‘Advanced plugin usage’ is closed to new replies.

 * ![](https://ps.w.org/yotuwp-easy-youtube-embed/assets/icon-256x256.png?rev=2869253)
 * [Video Gallery - YouTube Playlist, Channel Gallery by YotuWP](https://wordpress.org/plugins/yotuwp-easy-youtube-embed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yotuwp-easy-youtube-embed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/)
 * [Active Topics](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [yotuwp](https://wordpress.org/support/users/yotuwp/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/advanced-plugin-usage/#post-10229620)
 * Status: resolved