Hi,
Sorry I did not come back to you earlier… I just saw this message.
It should be fairly easy, yes. As you probably know, you can set this in the general admin options.
In order to have this done also in the shortcode itself, would be probably pretty simple.
I will try to do this in the next weeks, but if you can’t wait, I think you should simply add a parameter to the display_zenodo_data
function (let’s call it $attr
, so: function display_zenodo_data( $attr ) { ... }
) and use it like this (in here):
if( is_array( $attr ) ) {
//Of course you should add some specific checks here so it does not break or hurt your website
$shortcode_specific_keyword = $attr['keyword'];
}
Then send this variable to the zp_retrieve_json
function (in here), so you have to modify a bit the call and the function itself. And finally inside that zp_retrieve_json
function, do something like (in here)
if( $shortcode_specific_keyword ) {
$extra_keyword = $shortcode_specific_keyword;
} elseif( array_key_exists( 'extra_keyword', $display_your_zenodo_community_options ) ) {
$extra_keyword = $display_your_zenodo_community_options['extra_keyword'];
}
That should be it, but I haven’t tested anything here…
I hope it helps.
Best,
Yoann
-
This reply was modified 2 years, 11 months ago by
yoannspace. Reason: typo
-
This reply was modified 2 years, 11 months ago by
yoannspace. Reason: typo