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 simplywp_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 afterget_header();
it’s too late. A fix would be something likeadd_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();
- The topic ‘Advanced plugin usage’ is closed to new replies.