Media Library Explorer
Version 1.0.1 added 1 year ago by smilkobuta
HOW TO INSTALL: To install this package, copy the following code and paste it into your Pods >> Package Manager under the Import tab and follow instructions there.
1.0.1 Notes
* Fix IE7 bug.
About this Package
This plugin helps the selection of the image from the media library.
It stores the ID of the media so you can use it like below.
----
$uploads = wp_upload_dir();
while ($pods->fetchRecord()) {
if ($pods->get_field("image")) {
$photo = get_post_meta($pods->get_field("image"), '_wp_attached_file', true);
$photo_url = $uploads['baseurl'] . '/' . $photo;
print '<img src="' . $photo_url . '">';
}
}
----
It stores the ID of the media so you can use it like below.
----
$uploads = wp_upload_dir();
while ($pods->fetchRecord()) {
if ($pods->get_field("image")) {
$photo = get_post_meta($pods->get_field("image"), '_wp_attached_file', true);
$photo_url = $uploads['baseurl'] . '/' . $photo;
print '<img src="' . $photo_url . '">';
}
}
----
