} } ?> </div> </div> </div> </div> </div> <hr/> <?php $gmCore->gmedia_custom_meta_box($term->term_id, $meta_type = 'gmedia_term'); do_action('gmedia_term_edit_form'); ?> </form> <form style="display:none;" id="gmedia-assign-term" autocomplete="off" method="post" action="<?php echo gm_get_admin_url(); ?> "> <input type="hidden" name="cat_names" value="<?php esc_attr_e($term->name); ?> "> <input type="hidden" name="cookie_key" value="gmedia_library:frame"> <input type="hidden" name="assign_category"/> <?php wp_nonce_field('gmedia_action'); ?> </form> <div class="modal fade gmedia-modal" id="newCustomFieldModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog">
<span class="sr-only"><?php _e('Toggle Dropdown', 'grand-media'); ?> </span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="<?php echo add_query_arg(array('page' => 'GrandMedia', 'gallery' => $term->term_id), $gmProcessor->url); ?> "><?php _e('Show in Gmedia Library', 'grand-media'); ?> </a></li> <?php echo '<li' . ('draft' !== $term->status ? '' : ' class="disabled"') . '><a target="_blank" class="share-modal" data-target="#shareModal" data-share="' . $term->term_id . '" data-gmediacloud="' . $term->cloud_link . '" href="' . $term->post_link . '">' . __('Share', 'grand-media') . '</a></li>'; echo '<li' . ($term->allow_delete ? '' : ' class="disabled"') . '><a href="' . wp_nonce_url(gm_get_admin_url(array('do_gmedia_terms' => 'delete', 'ids' => $term->term_id), array('edit_term'), $gmProcessor->url), 'gmedia_delete') . '" data-confirm="' . __("You are about to permanently delete the selected items.\n\r'Cancel' to stop, 'OK' to delete.", "grand-media") . '">' . __('Delete', 'grand-media') . '</a></li>'; ?> </ul> </div> <?php } ?> <?php if ($term_id) { ?> <div class="term-shortcode pull-left"><input type="text" title="<?php _e('Shortcode'); ?> " class="form-control pull-left" value="<?php echo "[gmedia id={$term_id}]"; ?>
function gmedia_item_actions($item) { global $gmCore, $gmProcessor; if (!in_array($gmProcessor->mode, array('select_single', 'select_multiple'))) { $share_icon = '<span class="glyphicon glyphicon-share"></span>'; if ('draft' !== $item->status) { if (!empty($item->post_id)) { $cloud_link = get_permalink($item->post_id); } else { $cloud_link = $gmCore->gmcloudlink($item->ID, 'single'); } $share = '<a target="_blank" data-target="#shareModal" data-share="' . $item->ID . '" class="share-modal" title="' . __('Share Gmedia Post', 'grand-media') . '" href="' . $cloud_link . '">' . $share_icon . '</a>'; } else { $share = "<span class='action-inactive'>{$share_icon}</span>"; } $edit_icon = '<span class="glyphicon glyphicon-edit"></span>'; if (gm_user_can('edit_media')) { if ((int) $item->author == get_current_user_id() || gm_user_can('edit_others_media')) { $edit_data_data = $gmProcessor->gmediablank ? '' : ' data-target="#previewModal" data-width="1200" data-height="500" data-cls="edit_gmedia_item" class="preview-modal"'; $edit_data = '<a href="' . add_query_arg(array('page' => 'GrandMedia', 'mode' => 'edit', 'gmediablank' => 'library', 'gmedia__in' => $item->ID), $gmProcessor->url) . '"' . $edit_data_data . ' id="gmdataedit' . $item->ID . '" title="' . __('Edit Data', 'grand-media') . '">' . $edit_icon . '</a>'; } } else { $edit_data = "<span class='action-inactive'>{$edit_icon}</span>"; } $info_icon = '<span class="glyphicon glyphicon-info-sign"></span>'; $metainfo = $gmCore->metadata_text($item->ID); if ($metainfo) { $info = '<a href="#metaInfo" data-target="#previewModal" data-metainfo="' . $item->ID . '" class="preview-modal" title="' . __('Exif/Meta Info', 'grand-media') . '">' . $info_icon . '</a>'; $info .= '<div class="metainfo hidden" id="metainfo_' . $item->ID . '">' . nl2br($metainfo) . '</div>'; } else { $info = "<span class='action-inactive'>{$info_icon}</span>"; } $delete_icon = '<span class="glyphicon glyphicon-trash"></span>'; if (gm_user_can('delete_media') && (int) $item->author == get_current_user_id() || gm_user_can('delete_others_media')) { $delete = '<a class="text-danger" href="' . wp_nonce_url(gm_get_admin_url(array('do_gmedia' => 'delete', 'ids' => $item->ID)), 'gmedia_delete') . '" data-confirm="' . sprintf(__("You are about to permanently delete %s file.\n\r'Cancel' to stop, 'OK' to delete.", "grand-media"), $item->gmuid) . '" title="' . __('Delete', 'grand-media') . '">' . $delete_icon . '</a>'; if ($gmCore->_get('showmore')) { $erase_icon = '<span class="glyphicon glyphicon-erase"></span>'; $db_delete = '<a class="text-danger" href="' . wp_nonce_url(gm_get_admin_url(array('do_gmedia' => 'delete__save_original', 'ids' => $item->ID)), 'gmedia_delete') . '" data-confirm="' . sprintf(__("You are about to delete record from DB for %s file.\n\r'Cancel' to stop, 'OK' to delete.", "grand-media"), $item->gmuid) . '" title="' . __('Delete DB record (leave file on the server)', 'grand-media') . '">' . $erase_icon . '</a>'; } } else { $delete = "<span class='action-inactive'>{$delete_icon}</span>"; } } if ('image' == $item->type) { $edit_image_icon = '<span class="glyphicon glyphicon-adjust"></span>'; if (gm_user_can('edit_media') && (int) $item->author == get_current_user_id() || gm_user_can('edit_others_media')) { $edit_image = '<a href="' . add_query_arg(array('page' => 'GrandMedia', 'gmediablank' => 'image_editor', 'id' => $item->ID), $gmProcessor->url) . '" data-target="#gmeditModal" class="gmedit-modal" id="gmimageedit' . $item->ID . '" title="' . __('Edit Image', 'grand-media') . '">' . $edit_image_icon . '</a>'; } else { $edit_image = "<span class='action-inactive'>{$edit_image_icon}</span>"; } $show_icon = '<span class="glyphicon glyphicon-fullscreen"></span>'; $show = '<a href="' . $gmCore->gm_get_media_image($item, 'web') . '" data-target="#previewModal" data-width="' . $item->msize['width'] . '" data-height="' . $item->msize['height'] . '" class="preview-modal" title="' . esc_attr(__('Show', 'grand-media') . ' ' . $item->title) . '">' . $show_icon . '</a>'; } elseif (in_array($item->ext, array('mp3', 'ogg', 'wav', 'ogg', 'mp4', 'mpeg', 'webm'))) { $show_icon = '<span class="glyphicon glyphicon-play"></span>'; $show = '<a href="' . $item->url . '" data-target="#previewModal" data-width="' . $item->msize['width'] . '" data-height="' . $item->msize['height'] . '" class="preview-modal" title="' . esc_attr(__('Play', 'grand-media') . ' ' . $item->title) . '">' . $show_icon . '</a>'; } else { $show_icon = '<span class="glyphicon glyphicon-cloud-download"></span>'; $show = '<a href="' . $item->url . '" title="' . __('Download', 'grand-media') . '" download="' . $item->gmuid . '">' . $show_icon . '</a>'; } $duplicate_icon = '<span class="glyphicon glyphicon-duplicate"></span>'; $duplicate = '<a href="' . wp_nonce_url(gm_get_admin_url(array('do_gmedia' => 'duplicate', 'ids' => $item->ID)), 'gmedia_action') . '" title="' . __('Duplicate', 'grand-media') . '">' . $duplicate_icon . '</a>'; $actions = compact('share', 'edit_data', 'edit_image', 'show', 'info', 'duplicate', 'delete', 'db_delete'); return apply_filters('gmedia_item_actions', $actions); }
?> " href="<?php echo gm_get_admin_url(array(), array('import'), $url); ?> "><?php _e('Upload Files', 'grand-media'); ?> </a> <?php if (gm_user_can('import')) { ?> <a class="btn btn<?php echo $import ? '-primary active' : '-default'; ?> " href="<?php echo gm_get_admin_url(array('import' => 1), array(), $url); ?> "><?php _e('Import', 'grand-media'); ?> </a> <?php } ?> </div> <?php if ($import && gm_user_can('import')) { ?> <a class="btn btn-default" href="<?php echo admin_url('admin.php?page=GrandMedia_WordpressLibrary'); ?>
_libstack" class="gmedia-modal"><?php _e('Quick Gallery from Stack', 'grand-media'); ?> </a> </li> </ul> </form> <?php if ($gmProcessor->mode != 'select_single') { ?> <form class="btn-group<?php echo $filter_selected ? ' gm-active' : ''; ?> " id="gm-selected-btn" name="gm-selected-form" action="<?php echo gm_get_admin_url(array('stack' => $filter_stack, 'filter' => $filter_selected_arg), array(), $gmedia_url); ?> " method="post"> <button type="submit" class="btn btn<?php echo 'selected' == $filter_selected ? '-success' : '-info'; ?> "><?php printf(__('%s selected', 'grand-media'), '<span id="gm-selected-qty">' . count($gmProcessor->selected_items) . '</span>'); ?> </button> <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> <span class="sr-only"><?php _e('Toggle Dropdown', 'grand-media'); ?> </span></button> <input type="hidden" id="gm-selected" data-userid="<?php
$taxterm = $term->taxterm; if ('album' == $taxterm) { $add_args['album__in'] = 0; } elseif ('category' == $taxterm) { $add_args['category__not_in'] = $gmProcessor->edit_term; } echo '<a href="' . $gmCore->get_admin_url($add_args, array(), true) . '" class="btn btn-success preview-modal pull-left" data-target="#previewModal" data-width="1200" data-height="500" data-cls="select_gmedia assign_gmedia_term" data-title="' . __('Add from Library', 'grand-media') . '"><span class="glyphicon glyphicon-plus"></span> ' . __('Add from Library', 'grand-media') . '</a>'; if (gm_user_can('upload') && !$gmProcessor->gmediablank) { $args = array('page' => 'GrandMedia_AddMedia'); if ($gmProcessor->edit_term) { $taxterm = $term->taxterm; $args[$taxterm] = $gmProcessor->edit_term; } ?> <a href="<?php echo gm_get_admin_url($args, array(), true); ?> " class="btn btn-success pull-left"> <span class="glyphicon glyphicon-upload" style="font-size: 130%;line-height: 0;vertical-align: sub;"></span> <?php _e('Upload', 'grand-media'); ?> </a> <?php } ?> </div> <div class="term-shortcode pull-left"><input type="text" title="<?php _e('Shortcode'); ?> " class="form-control pull-left" value="<?php