Discussion:
JavaScript events on media popup
Adam Silverstein
2013-11-26 18:29:53 UTC
Permalink
Currently WordPress does not offer a specific way to hook into JavaScript
events - this is being considered for a future release -
http://core.trac.wordpress.org/ticket/21170.

for now you will need to bind to specific DOM events, such as the same
event WordPress hooks into to open the media modal when you click on the
insert media button:

$(document.body).on( 'click', '.insert-media', function( event ) {
// Add your functionality here
});
Send wp-hackers mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.automattic.com/mailman/listinfo/wp-hackers
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of wp-hackers digest..."
1. Are there any events on media popup, that we could hook up
onto? (Davit Barbakadze)
2. Tracking memory usage without turning plugins on/off
one-by-one (David Anderson)
3. Re: Tracking memory usage without turning plugins on/off
one-by-one (Azizur Rahman)
----------------------------------------------------------------------
Message: 1
Date: Sun, 24 Nov 2013 16:51:57 +0400
Subject: [wp-hackers] Are there any events on media popup, that we
could hook up onto?
<
Content-Type: text/plain; charset=ISO-8859-1
Suppose we would like to run some JavaScript when media popup opens
up. Is there any way we could hook up onto it? onto an event of some
kind, like - open?
Davit Barbakadze
------------------------------
Message: 2
Date: Mon, 25 Nov 2013 07:40:21 +0000
Subject: [wp-hackers] Tracking memory usage without turning plugins
on/off one-by-one
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
Is there a good, efficient way to track the memory usage of
plugins/themes in WordPress other than "turn them on/off one by one"?
Not just final memory usage (after everything's loaded), but peak memory
usage too?
e.g. Can is there a good way to answer questions like "when the peak
memory usage during load is hit, which parts of WordPress were the main
culprits?"
Many thanks,
David
--
WordShell - WordPress fast from the CLI - www.wordshell.net
------------------------------
Message: 3
Date: Mon, 25 Nov 2013 09:16:46 +0000
Subject: Re: [wp-hackers] Tracking memory usage without turning
plugins on/off one-by-one
<CAAYGKatwmFRVjACQkRRjowt6V_X_Y76VWh0btWBU=
Content-Type: text/plain; charset=UTF-8
You can use PHP: Xhprof to profile everything and get some useful details.
http://us2.php.net/xhprof
Kind Regards,
Azizur Rahman
----
Do you need cost-effective web hosting solution and Domain name try
http://prodevstudio.com
Missed the last Friday Khutbah, try catchup a Khutbah on-line now at
http://fridaykhutbah.com
Hi,
Is there a good, efficient way to track the memory usage of
plugins/themes
in WordPress other than "turn them on/off one by one"? Not just final
memory usage (after everything's loaded), but peak memory usage too?
e.g. Can is there a good way to answer questions like "when the peak
memory usage during load is hit, which parts of WordPress were the main
culprits?"
Many thanks,
David
--
WordShell - WordPress fast from the CLI - www.wordshell.net
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
------------------------------
Subject: Digest Footer
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
------------------------------
End of wp-hackers Digest, Vol 106, Issue 36
*******************************************
--
Adam Silverstein
Website Development & Hosting
Earthbound.com * 970.872.4421 * 800.399.4085
Loading...