<div class="rtmedia-container rtmedia-single-container rtmedia-media-edit"> <?php if (have_rtmedia()) { rtmedia(); if (rtmedia_edit_allowed()) { global $rtmedia_media; ?> <div class="rtmedia-single-edit-title-container"> <h2 class="rtmedia-title"><?php echo __('Edit Media', 'rtmedia'); ?> </h2> </div> <form method="post" action="" name="rtmedia_media_single_edit" id="rtmedia_media_single_edit" class="rtm-form"> <div class="rtmedia-editor-main"> <ul class="rtm-tabs clearfix"> <li class="active"> <a href="#panel1"> <i class='dashicons dashicons-edit rtmicon'></i> <?php _e('Details', 'rtmedia'); ?> </a> </li> <!-- use this hook to add title of a new tab--> <?php do_action('rtmedia_add_edit_tab_title', rtmedia_type()); ?> </ul> <div class="rtm-tabs-content"> <div class="content" id="panel1">
/** * */ function rtmedia_actions() { $actions = array(); if (is_user_logged_in() && rtmedia_edit_allowed()) { $edit_button = '<button type="submit" class="rtmedia-edit rtmedia-action-buttons button" >' . __('Edit', 'rtmedia') . '</button>'; $edit_button = apply_filters('rtmedia_edit_button_filter', $edit_button); $actions[] = '<form action="' . get_rtmedia_permalink(rtmedia_id()) . 'edit/">' . $edit_button . "</form>"; } $actions = apply_filters('rtmedia_action_buttons_before_delete', $actions); foreach ($actions as $action) { echo $action; } $actions = array(); if (rtmedia_delete_allowed()) { //add_filter('rtmedia_addons_action_buttons','rtmedia_delete_action_button',10,1); $actions[] = rtmedia_delete_form($echo = false); } $actions = apply_filters('rtmedia_action_buttons_after_delete', $actions); foreach ($actions as $action) { echo $action; } do_action("after_rtmedia_action_buttons"); }
/** * list of actions might be performed on media */ function rtmedia_actions() { $actions = array(); if (is_user_logged_in() && rtmedia_edit_allowed()) { $edit_button = '<button type="submit" class="rtmedia-edit rtmedia-action-buttons button" >' . esc_html__('Edit', 'buddypress-media') . '</button>'; $edit_button = apply_filters('rtmedia_edit_button_filter', $edit_button); $actions[] = '<form action="' . esc_url(get_rtmedia_permalink(rtmedia_id())) . 'edit/">' . $edit_button . '</form>'; } $actions = apply_filters('rtmedia_action_buttons_before_delete', $actions); foreach ($actions as $action) { echo $action; // @codingStandardsIgnoreLine } $actions = array(); if (rtmedia_delete_allowed()) { $actions[] = rtmedia_delete_form($echo = false); } $actions = apply_filters('rtmedia_action_buttons_after_delete', $actions); foreach ($actions as $action) { echo $action; // @codingStandardsIgnoreLine } do_action('after_rtmedia_action_buttons'); }