function gs_bars_shortcode($atts) { $GS = get_gs(); // if no type defined if (array_key_exists('app', $atts) && (is_single() || is_page())) { return $GS->getCode($atts['app']); } else { return ""; } }
function gs_bars_shortcode($atts) { global $wp_query; $post = $wp_query->post; $GS = get_gs(); if (function_exists('is_shop')) { $shop_page = is_shop(); } else { $shop_page = false; } // if no type defined if ($atts['app'] == 'follow_bar' || array_key_exists('app', $atts) && (is_single() || is_page() || $shop_page)) { return $GS->getCode($atts['app'], get_permalink(), get_the_title(), wp_get_attachment_url(get_post_thumbnail_id($post->ID))); } else { return ""; } }