Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Requests and Feedback’ is closed to new topics and replies.
Forum closed. Use forum at Wordpress.org: Gmedia Support
Forum
Tagged: database, metadata, phantom module
I was able to make custom field values to appear in Phantom module lightbox view, but now have another problem.
That is that i need to be able to show only specific values in lightbox, not all. I am able to do that if i change meta_visibility(new field in _gmedia_meta table manually to “Enable”, or to not show with “Disable”). And i am able to read the value of meta_visible and based on it show only values i want.
And now i need to be able to do it dynamically from from admin view. So would not have to go database every time i add new image to database and add new custom field to it.
Question is: which functions are related to adding/updating value of database so would be able to change value of meta_visible?
In /inc/db.connect.php file you can find methods for adding and updating meta data:
add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false);
update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = ”);
update_metadata_by_mid($meta_type, $meta_id, $meta_value, $meta_key = false);
That is a good idea to add visibility for custom fields in current gallery modules. I’ll look how it can be implemented in future Gmedia versions.