} $tag_html = ''; if (isset($extension['tags'])) { foreach ($extension['tags'] as $tag) { $classes .= ' ' . $tag; $tag_html .= '<span class="tag ' . $tag . '">' . $tag . '</span>'; } } foreach ($extension['categories'] as $category) { $classes .= ' ' . foo_convert_to_key($category); } if (isset($extension['css_class'])) { $classes .= ' ' . $extension['css_class']; } $thumbnail = $extension['thumbnail']; if (foo_starts_with($thumbnail, '/')) { $thumbnail = rtrim(FOOGALLERY_URL, '/') . $thumbnail; } $base_url = add_query_arg('extension', $slug); $download_url = add_query_arg('action', 'download', $base_url); $activate_url = add_query_arg('action', 'activate', $base_url); $deactivate_url = add_query_arg('action', 'deactivate', $base_url); $download_button_html = ''; //check if we want to override the download button if (isset($extension['download_button'])) { $download_button = $extension['download_button']; $download_button_href = esc_url(isset($download_button['href']) ? $download_button['href'] : $download_url); $download_button_target = isset($download_button['target']) ? ' target="' . $download_button['target'] . '" ' : ''; $download_button_text = isset($download_button['text']) ? __($download_button['text'], 'foogallery') : ''; $download_button_confirm = isset($download_button['confirm']) ? ' data-confirm="' . $download_button['confirm'] . '" ' : ''; $download_button_html = "<a class=\"ext_action button button-primary download\" {$download_button_target}href=\"{$download_button_href}\" >{$download_button_text}</a>";
function apply_filters($tag, $value) { if (!foo_starts_with($tag, $this->plugin_slug)) { $tag = $this->plugin_slug . '-' . $tag; } return apply_filters($tag, $value); }