mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-06-05 15:08:20 +09:00
change new term description
This commit is contained in:
@@ -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>';
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user