Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,193,404 members, 7,950,886 topics. Date: Tuesday, 17 September 2024 at 04:11 AM |
Nairaland Forum / Science/Technology / Programming / How To Extend Wordpress Media Library [updated Version 2022] (316 Views)
Downgrade Flutter To Any Version - 2022 / Z-library Is Down. Since 2009 - 2022. Our Beloved Book Library Website Is Gone / Java JDBC Database Object Mysql Connection And Manipulation Library By Antware (2) (3) (4)
(1) (Reply)
How To Extend Wordpress Media Library [updated Version 2022] by adeleyeayodeji: 9:10pm On Sep 03, 2022 |
Have you been looking for a simple way to extend WP POP UP Media Library Upload Tabs? This video is for you. Copy the source code or watch my step-by-step video https://www.youtube.com/watch?v=LEr-WmVMkAQ var frame = wp.media.view.MediaFrame.Post; wp.media.view.MediaFrame.Post = frame.extend({ initialize: function () { frame.prototype.initialize.apply(this, arguments); var State = wp.media.controller.State.extend({ insert: function () { console.log("Something..." this.frame.close(); } }); this.states.add([ new State({ id: "ademedia", search: false, title: "Ade Media" }) ]); //on render this.on("content:render:ademedia", this.renderAdemediaContent, this); }, browseRouter: function (routerView) { routerView.set({ upload: { text: wp.media.view.l10n.uploadFilesTitle, priority: 20 }, ademedia: { text: "Ade Media", priority: 30 }, browse: { text: wp.media.view.l10n.mediaLibraryTitle, priority: 40 } }); }, renderAdemediaContent: function () { var AdemediaContent = wp.Backbone.View.extend({ tagName: "div", className: "ademediacontent", template: wp.template("ademedia", active: !1, toolbar: null, frame: null }); var view = new AdemediaContent(); this.content.set(view); } }); |
(1) (Reply)
Xtool X100 PAD2 Program Fiat Punto 2003 Key / Please Guys How Can I Make My Network Stronger / Curious
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8 |