K
K
kolibry12014-12-10 17:29:29
PHP
kolibry1, 2014-12-10 17:29:29

How to add title attribute to WordPress uploader?

By default, the WP uploader will allow you to add "a href", "alt" and "rel" to the photo. how to add title attribute padding to the right panel?
and the second question - how to change the dimensions of the image specified in the loader? 150x150, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2014-12-10
@kolibry1

2.

add_image_size( 'slider', 105, 105, true ); // the_post_thumbnail( 'slider' );

add_filter( 'image_size_names_choose', 'image_sizes' );
function image_sizes( $sizes ) {
  $addsizes = array(
    'slider' => 'Слайдер'
  );
  $newsizes = array_merge( $sizes, $addsizes );
  return $newsizes;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question