/** * Post Row Actions * * @since 1.0.0 * @access public * @param array $actions * @return array */ public function post_row_actions($actions) { global $post; if ($this->post_type == $post->post_type) { $actions['tf-edit-theme'] = sprintf('<a href="#" class="tf_lightbox_edit" data-type="theme" data-post-id="%d">%s</a>', $post->ID, __('Edit', 'themify-flow')); if (!TF_Model::is_theme_activate($post->ID)) { $actions['tf-activate-theme'] = sprintf('<a href="%s">%s</a>', wp_nonce_url(add_query_arg(array('post' => $post->ID, 'action' => 'activate_tf_theme'), admin_url('post.php')), 'tf_theme_nonce'), __('Activate', 'themify-flow')); } else { unset($actions['trash']); } $actions['tf-export-theme'] = sprintf('<a href="%s">%s</a>', wp_nonce_url(admin_url('post.php?post=' . $post->ID . '&action=export_tf_theme'), 'export_tf_nonce'), __('Export', 'themify-flow')); $actions['tf-duplicate-theme'] = sprintf('<a href="#" class="tf_lightbox_duplicate" data-type="theme" data-post-id="%d">%s</a>', $post->ID, __('Duplicate', 'themify-flow')); $actions['tf-replace-theme'] = sprintf('<a href="#" class="tf_lightbox_replace" data-type="theme" data-post-id="%d">%s</a>', $post->ID, __('Replace', 'themify-flow')); if (isset($actions['inline hide-if-no-js'])) { unset($actions['inline hide-if-no-js']); } if (isset($actions['edit'])) { unset($actions['edit']); } } return $actions; }