Giter Site home page Giter Site logo

media-modal-demo's Introduction

WP Media Modal Demo Plugin

Introduction

A sample plugin which will demonstrate different ways on how the new media workflow can be embedded in your plugin.

Work in progress.

Screenshot

Screenshot of the plugin

Changelog

1.0

  • Changed plugin structur
    • Demos are located in /demos/
    • Each demo has its own class, which extends Media_Modal_Demo_Page_Abstract
    • The custom JavaScript stuff is stored into the global var ds.media
  • Moved demo page menu from settings to plugins
  • Docs, a lot of docs

0.3

  • Added fifth demo

0.3

  • Added third and fourth demo

0.2

  • Added second demo

0.1

  • Initial release

media-modal-demo's People

Contributors

ocean90 avatar

Stargazers

 avatar  avatar Vitaliy Ralle avatar Yi (Flora) Liu avatar Cat  avatar 那罗虫 avatar Jess Green avatar Jesse Graupmann avatar Resa Rahman avatar Takayuki Miyauchi avatar Adriano Monecchi avatar Mahafuzur Rahaman avatar Henrique Silvério avatar Noah Halstead avatar Tom Soler avatar Thomas avatar Steve D avatar Gautam Thapar avatar  avatar David Romsey avatar Zach Green avatar Andrei Lupu avatar Rahul Prajapati avatar Truong Giang avatar Phi Phan avatar Emran Ahmed avatar Xavier Zalawa avatar Taija Mertanen avatar  avatar Marc Wieland avatar Nasser Rafie avatar Aaron Holbrook avatar Sun Feng avatar Devon Mather avatar Sabatino Masala avatar Brad Vincent avatar Roberto Entringer avatar tak avatar Φίλιππος Α. Γράψας avatar Angus H. avatar  avatar Franklin Gitonga avatar  avatar  avatar Austin Passy avatar Jacob Schweitzer avatar Joel Garcia Jr avatar Kosinix avatar  avatar Oleksandr Parkhomenko avatar  avatar Riccardo D'Angelo avatar Josh Levinson avatar Ravinder Kumar avatar Sami El avatar Alessandro Tesoro avatar  avatar Towfiq I. avatar Jonathan Daggerhart avatar Julien Lambé avatar Fredrik Forsmo avatar Valeriu Zdrobău avatar David Fuchs avatar Dinesh Kesarwani avatar Tom Hermans avatar Hullen Gonzales avatar Roman Ožana avatar Li Haitao avatar Phil Wylie avatar Gino avatar Caio Vaccaro avatar Mark Babič avatar Mandi Wise avatar Rafał Osiński avatar Jonathan Kovis avatar Travis Arnold avatar Richard Thiel avatar Chandler avatar Woody Hayday avatar NhanHuynh avatar David Biňovec avatar Jamal Jama avatar Barry Ceelen avatar Kostas Minaidis avatar David Cavins avatar Maxim Orlovsky avatar Sebastian Troć avatar Daniel McClure avatar Christian Foellmann avatar Eric Dowell avatar Faisal Muhammad avatar Kira Schroder avatar Piotr Łepkowski avatar Felipe Lavín Z. avatar BogdanFix avatar Tom J Nowell avatar  avatar Micah Ernst avatar Frank McCoy avatar Jason Davis avatar

Watchers

Markus Drubba avatar Fuxia  Scholz avatar Nasser Rafie avatar Pete Mall avatar  avatar  avatar Charlie Merland avatar Matty Cohen avatar Andrei Lupu avatar Stephen Harris avatar  avatar  avatar

media-modal-demo's Issues

Is it possible to show these button in one page?

Thank you so much Dominik Schilling! This tutorial is very useful! But one thing I would like to ask: In your demo code in GIT HUB, there is per button in per page, it's possible to merge all button in one page? Because I'm modifying this section: I have an editor (Should not modify anything). A custom field (Video field): Only uploading OR Insert from URL ( as the built in of Wordpress)

frame: 'post' documentation

Can you please add a demo showing how to receive the send-to-editor markup? I.e. if I wanted to use frame: 'post' and mimick the behavior that is seen when inserting media in a post, likewise how you could create a gallery and receive the [gallery ids=""] markup that is sent to tinyMCE when editing a post.

Thanks!

Demo on Front End

@ocean90

Hi there,
is it possible to run the demos also on the front end within a post or a form? Trying to get my head around how to call the media manager on the front end....
Thanks,
Sascha

Gutenberg update?

Hi ocean90, do you plan on updating this demo for Gutenberg?

Thanks for all you do!

JavaScript error with Demo 2

I'm getting a weird JS console error when I press the button in demo 2:

Uncaught ReferenceError: wpActiveEditor is not defined load-scripts.php:6
wp.media.editor.id load-scripts.php:6
wp.media.editor.open load-scripts.php:6
mediaUploaderDemo.openMediaDialog media-modal-demo-2.js:17
v.event.dispatch load-scripts.php:2
o.handle.u

Adding gallery via DEMO2 method fails

When I try to inset a gallery via the method used in DEMO-2 it seems like the attachment info is not getting parsed by the javascript.

I tried to access the wp.media.gallery.attachments and that seems to return the IDs of the photos selected, but I can't wrap my head around saving the IDs and remembering them when wanting to edit the "gallery" selection of photos.

Do you know of any workaround to get this newer gallery function to work with this?

Wordpress version: 3.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.