WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #22891, comment 3


Ignore:
Timestamp:
12/12/2012 07:12:55 PM (5 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22891, comment 3

    v1 v2  
    11My problem has been solved by using the action 'media_buttons' instead of 'media_buttons_context' [[BR]]
    22New codes are bellow.
    3 
    4 <?php[[BR]]
    5 
     3{{{
     4<?php
    65function wp_myplugin_media_button() {
    76        echo '<a href="media-upload.php?type=upload&TB_iframe=true&tab=upload" class="thickbox"><img src="http://onetarek.com/wp-content/uploads/2012/12/shortcode_btn.png"  width=15 height=15 /></a>';
    8 }[[BR]]
    9 add_action( 'media_buttons', 'wp_myplugin_media_button',100);[[BR]]
    10 
    11 ?>[[BR]]
     7}
     8add_action( 'media_buttons', 'wp_myplugin_media_button',100);
     9?>
     10}}}
    1211Thanks Helenyhou