Created
April 10, 2015 23:15
-
-
Save dknauss/db442ba3546663c201ca to your computer and use it in GitHub Desktop.
Hack the flickr-pick-a-picture plugin media button to work like unsplash-wp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Adds the pick a pic icon to the media bar. | |
| * | |
| * @param it editor_id. | |
| * @return noting. | |
| **/ | |
| function pac_pickapic_media_buttons($editor_id = '') { | |
| echo '<a href="#TB_inline?width=1200&height=800%&inlineId=popup_container" | |
| class="button thickbox unsplash" title="Flickr - Click photos to upload directly to your media library" | |
| // id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Flickr', 'pickapic' ) . '" onclick="return false;"> | |
| <span class="dashicons dashicons-camera"></span> Flickr</a>'; | |
| } | |
| add_action( 'media_buttons', 'pac_pickapic_media_buttons', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment