WordPress maintenance or security needs? Reach out!
TLDWP

Plugin: mb-youtube-videos (Used by 10 domains)

(MB) YouTube Widget

The YouTube videos widget lets you quickly and easily display your most recent YouTube videos in your blog’s sidebar.

Features

  • The YouTube videos widget is fully-based on the WordPress Plugin API.
  • Uses hooks and filters to allow for maximum hackability by theme designers and developers.
  • Organized straightforwardly so that it’s easy to modify and style.

Usage

The YouTube videos widget is ready to use as-is, although you can easily customize it to your liking with a bit of code.

You can also insert a plain list of your recent videos into posts and pages with the shortcode mechabyte_youtube. For example, to load 5 videos from freddiew that open in new tabs, you’d use [mechabyte_youtube username="freddiew" videos="5" tab="true"].

Custom Styles

The YouTube videos widget loads it styles by hooking into WordPress’ wp_enqueue_scripts action. To remove the default styling you need to remove the our enqueue_scripts function from the hook.

    remove_action( 'wp_enqueue_scripts', array( 'mechabyteYouTube', 'enqueue_scripts' ) );

Custom Output

The end user has two options of displaying their YouTube videos: in plain or decorated lists. When modifying the output of the plugin you must use one of two filters that this plugin uses: mbYT_construct_plain and mbYT_construct_decorated. Before you add your own functions to either filter, you must remove the default ones that are used automatically: mbYT_construct_plain_default and mbYT_construct_decorated_default.

    remove_filter( 'mbYT_construct_plain', array( 'mechabyteYouTube', 'mbYT_construct_plain_default'), 10, 3  );
    remove_filter( 'mbYT_construct_decorated', array( 'mechabyteYouTube', 'mbYT_construct_decorated_default'), 10, 3  );

Now it’s time to get creative. When creating a function that will loop through the videos you have complete control over how you want to display the content. Just keep in mind that in the end, you should be outputting

  • elements. When filters are being applied to the YouTube content, there are three arguments that are being passed through: $youtube_videos (array, the array of videos), $number (integer, the number of videos the user wishes to display), and $tab (boolean, a true/false value of whether or not the user wants to open video links in a new tab).
    Keep in mind that you have access to the following pieces of information when creating your video loop:

        $item['title'] // Video title
        $item['videoID'] // Video ID
        $item['viewCount'] // Video view count
        $item['published'] // Video publish date -- UNIX
        $item['duration'] // Video duration in hh:mm:ss
        $item['numLikes'] // Video likes count
        $item['link'] // Video link
        $item['image']['default'] // 'Default' thumbnail (low quality)
        $item['image']['mqdefault'] // Medium quality thumbnail
        $item['image']['hqdefault'] // High quality thumbnail
    

    Here’s an example of some code that adds a custom function to our mb_construct_plain filter (assuming we’ve already removed the default functions). Keep in mind the 3 at the end. That lets WordPress expect our three arguments that will be passed through. Check out WordPress’ add_filter() page for more info.

        add_filter( 'mb_construct_plain', 'construct_plain_example', 10, 3 );
    
        function construct_plain_example( $youtube_videos, $number, $tab ) {
            $output = '';
            foreach( $youtube_videos as $youtube_video ) {
                // If we've reached the user's display limit, end the loop
                if( $i == $number )
                  break;
                $output .= '
  • '; $output .= '
  • Pretty basic, but it allows you to see a general example of how to loop through the objects and return the modified data.
    The above code will produce a list element like this one:

        
  • Real Life Portal Gun
  • DomainExposuresHeadersLast Checked
    a*a*a*e*d*s.com (WP 7.1) F Aug 30, 2026
    b*c*s*u*n*i*e*a*d.com (WP 4.9.26) F Aug 27, 2026
    s*-*t*i*h*r*t*l*b*n*.de (WP 7.1) F Aug 24, 2026
    c*s*h*m*.se (WP 4.4) F Aug 14, 2026
    t*e*r*t*t*l*v*s*o*.com F Aug 1, 2026
    m*l*e*c*i*a*o*e*l*s*a*e.com (WP 7.0.2) F Aug 1, 2026
    a*e*i*a*f*e*d*m*a*c*n*e*.org (WP 5.5.18) F Jul 20, 2026
    s*o*s*i*a*a*o*.c*m.mk F Jul 19, 2026
    f*s*a*i*e*a*t*m*b*l*.fr F Jul 16, 2026
    r*d*a*d*h*r*f.com (WP 4.6.12) F Jul 15, 2026

    Top 50 Plugins

    Plugin Count
    elementor 1,732,950
    contact-form-7 1,722,959
    elementor-pro 1,032,190
    woocommerce 800,396
    revslider 592,861
    jetpack 440,773
    js_composer 409,056
    wp-rocket 328,329
    essential-addons-for-elementor-lite 258,054
    gravityforms 253,018
    complianz-gdpr 252,334
    google-site-kit 246,822
    cookie-law-info 223,721
    instagram-feed 220,210
    sitepress-multilingual-cms 206,677
    header-footer-elementor 200,836
    google-analytics-for-wordpress 199,774
    bluehost-wordpress-plugin 189,526
    elementskit-lite 174,459
    gutenberg 165,291
    litespeed-cache 145,261
    cookie-notice 144,931
    gutenberg-core 143,410
    gtranslate 121,067
    the-events-calendar 120,684
    wpforms-lite 118,887
    astra-sites 108,981
    popup-maker 107,044
    woocommerce-payments 106,429
    tablepress 101,348
    honeypot 96,702
    coblocks 95,414
    astra-addon 91,607
    duracelltomi-google-tag-manager 88,558
    wp-smushit 88,424
    layerslider 86,569
    all-in-one-seo-pack 86,461
    bb-plugin 84,853
    akismet 82,829
    ml-slider 82,091
    premium-addons-for-elementor 81,040
    cleantalk-spam-protect 80,411
    mailchimp-for-wp 79,083
    megamenu 78,716
    ewww-image-optimizer 76,908
    jet-engine 76,636
    wp-pagenavi 76,564
    fusion-builder 75,520
    smart-slider-3 74,381
    gravityformsrecaptcha 72,878

    Top 50 Themes

    Theme Count
    hello-elementor 610,429
    Divi 484,432
    astra 403,631
    flatsome 145,009
    Avada 118,544
    generatepress 112,382
    pub 99,293
    oceanwp 78,268
    kadence 77,738
    enfold 67,042
    salient 63,513
    twentyseventeen 53,140
    twentytwentyfour 52,111
    bb-theme 51,761
    betheme 51,550
    cocoon-master 50,077
    blocksy 49,916
    h4 49,901
    twentytwentyfive 45,534
    woodmart 44,746
    dt-the7 44,533
    neve 37,128
    Avada-Child-Theme 36,468
    gox 36,026
    lightning 30,695
    bridge 30,377
    twentytwentyone 29,480
    swell 29,188
    twentytwenty 28,075
    bricks 26,781
    Impreza 25,594
    Newspaper 23,683
    twentytwentythree 21,457
    epik-redesign 18,874
    twentytwentytwo 18,277
    uncode 18,039
    twentysixteen 17,350
    pro 17,291
    storefront 15,811
    sydney 15,754
    Total 14,109
    factory-templates-4 13,871
    hello-theme-child-master 13,669
    themify-ultra 12,714
    hestia 12,307
    yootheme 12,280
    yith-wonder 11,748
    jupiter 11,606
    porto 11,598
    twentyfifteen 11,509