Plugin Directory

Changeset 451426


Ignore:
Timestamp:
10/15/2011 08:01:15 PM (14 years ago)
Author:
greuben
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bookshelf/trunk/includes/metabox.php

    r363557 r451426  
    5454            </td>
    5555        </tr>
     56
     57        <tr>
     58            <td colspan="2"><hr /></td>
     59        </tr>
     60
     61        <tr>   
     62            <th scope="row"><h2><label for="bookshelf_price"><?php _e( 'Product Price', 'bookshelf' ); ?></label></h2></th>
     63           
     64            <td>
     65                <input type="text" name="bookshelf_price" value="<?php echo get_post_meta( $post->ID, 'price', true ); ?>" id="bookshelf_price" /> <?php echo get_option( 'bookshelf_currency' ); ?>
     66                <p class="howot"><?php _e( 'Enter the price of the product without curreny symbols', 'bookshelf' ); ?></p>
     67            </td>
     68        </tr>
    5669    </table>
    5770
     
    8194    }
    8295
     96    $price = $_POST['bookshelf_price'];
     97    if ( $price ) {
     98        update_post_meta( $post_id, 'price', esc_attr( $price ) );
     99    } else {
     100        delete_post_meta( $post_id, 'price' );
     101    }
     102
    83103    return $post_id;
    84104}
Note: See TracChangeset for help on using the changeset viewer.