I’m trying to reorder the way metadata and files appear on the Items page. I have discovered that I can use
echo get_specific_plugin_hook_output('Geolocation', 'public_items_show', array('view' => $this, 'item' => $item));
to move the Geolocation plugin (found that info in the old forums), but I can’t seem to make the PDF Embed or Docs Viewer move in the same way. Additionally, when I insert
<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>
in the code, then the Geolocations box is duplicated. Any way to rearrange these plugins independently?
PDF Embed doesn’t use the
public_items_show hook to print its output, it overrides the display of
files_for_item) for PDF files.
As for rearranging, the only real way to do it is with
get_specific_plugin_hook_output and specifying all the plugins you want to show in the order you want them. There’s no version of
fire_plugin_hook that will skip over the ones that you’ve already fired manually.
Oh, interesting. Then my next problem is that PDF Embed isn’t displaying in place of files_for_item.
Here is what my first div looks like:
<?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
<?php echo files_for_item(array('imageSize' => 'fullsize')); ?>
<?php endif; ?>
I have ended up using the universal viewer plugin instead. Since I have PDFs and Images it has worked out so far!
Is there a list of the proper wording of names of plugins for the ‘get_specific_plugin_hook_output’? I am trying to move my social bookmarking output and I have used Social_Bookmarking and social_bookmarking and Bookmarking but none seem to work.
The correct name of the plugin to use there is the name of the plugin’s folder. Usually that means capitalized words, with no spaces (so, “SocialBookmarking”).