change new term description

This commit is contained in:
Robin Cornett
2015-04-07 12:22:14 -04:00
parent df97e4c214
commit 96ca5e7ecb
2 changed files with 6 additions and 4 deletions
@@ -14,12 +14,14 @@ class Display_Featured_Image_Genesis_Taxonomies {
*/
public function add_taxonomy_meta_fields() {
$tax = get_current_screen()->taxonomy;
echo '<div class="form-field term-image-wrap">';
echo '<label for="displayfeaturedimagegenesis[term_image]">' . __( 'Featured Image', 'display-featured-image-genesis' ) . '</label>';
echo '<input type="hidden" class="upload_image_url" id="default_image_url" name="displayfeaturedimagegenesis[term_image]" />';
echo '<input id="upload_default_image" type="button" class="upload_default_image button-secondary" value="' . __( 'Select Image', 'display-featured-image-genesis' ) . '" />';
echo '<input type="button" class="delete_image button-secondary" value="' . __( 'Delete Image', 'display-featured-image-genesis' ) . '" />';
echo '<p class="description">' . __( 'Set Featured Image for Taxonomy','display-featured-image-genesis' ) . '</p>';
echo '<p class="description">' . sprintf( __( 'Set Featured Image for new %s','display-featured-image-genesis' ), $tax ) . '</p>';
echo '</div>';
}
+3 -3
View File
@@ -26,12 +26,12 @@ jQuery(document).ready(function($){
});
//When a file is selected, grab the URL and set it as the text field's value
custom_uploader.on('select', function() {
custom_uploader.on( 'select', function() {
attachment = custom_uploader.state().get('selection').first().toJSON();
attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
preview = $( target_input ).prevAll( '#upload_logo_preview' );
previewImage = $( '<div id="upload_logo_preview"><img width="300" src="' + attachment.url + '" /></div>' );
$( target_input ).val(attachment.id);
$( target_input ).val( attachment.id );
if ( $( preview ).length ) {
$( preview ).remove();
}