Přiřazení stejného obrázku více příspěvkům (opakované použití)

If you use the library and use a lot of pictures in the posts, the following small link in the library will surely help you. Thus, images can be easily reused. A link will be created so you can access the image directly and there is no need to upload the image again to your new post.

[* http://wpengineer.com/wp-content/uploads/medialibrary3.png 645×316 *]

/—code php
function upload_columns($columns) {
unset($columns[‚parent‘]);
$columns[‚better_parent‘] = __( ‚Parent‘ );
return $columns;
}

function media_custom_columns($column_name, $id) {
$post = get_post($id);

if ( $column_name != ‚better_parent‘ )
return;

if ( $post->post_parent > 0 ) {
if ( get_post($post->post_parent) )
$title = _draft_or_post_title($post->post_parent);
?>