Improves section metadata usage of filter.
This commit is contained in:
parent
20489230a5
commit
5bdc5230bc
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* The new metadata sections function makes it a bit more complicated to add
|
||||
* the thumbnail and share buttons in the middle of the metadata.
|
||||
* So we have some logic that is only needed if they are set.
|
||||
* The following uses a filter to add them right above the first metadatum in the first section.
|
||||
**/
|
||||
if (
|
||||
( has_post_thumbnail() && get_theme_mod( 'tainacan_single_item_display_thumbnail', true ) ) ||
|
||||
( !get_theme_mod('tainacan_single_item_collection_header', false) && get_theme_mod( 'tainacan_single_item_display_share_buttons', true ) )
|
||||
) {
|
||||
// Gets collection so we can obtain firtst metadata
|
||||
$collection = tainacan_get_collection();
|
||||
|
||||
|
@ -94,6 +103,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$metadata_args = array(
|
||||
'display_slug_as_class' => true,
|
||||
|
|
Loading…
Reference in New Issue