mardi 26 janvier 2016

Adding Wordpress "Add Media" Button to form in own Plugin

I am trying to add my own "Add Media" Button in my own plugin form pages, I created a plugin and I have a form in add-new.php file here is the code:

  <div class="wrap">
<h1><?php _e( 'Add Deal', 'webdevs' ); ?></h1>

<form action="" method="post">
                    <!-- I NEED TO CHANGE THIS TO SHOW "ADD MEDIA BUTTON" -->
                     <input id="upload_image" type="text" size="36" name="upload_image" value="" />
        <input id="upload_image_button" type="button" value="Upload Image" />

      <?php wp_nonce_field( 'deal-new' ); ?>
        <?php submit_button( __( 'Add Deal', 'webdevs' ), 'primary', 'submit_deal' ); ?>

  </form>

How to add the html code and handle it in php

please help

Thnaks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire