diff --git a/includes/block-functions.php b/includes/block-functions.php index d57dbb0..c609ad0 100644 --- a/includes/block-functions.php +++ b/includes/block-functions.php @@ -14,8 +14,8 @@ * * @return string Nothing, this is intentionally blank on the front-end. */ -add_shortcode( 'block_options', '__return_empty_string' ); -add_shortcode( 'block_hidden', '__return_empty_string' ); +add_shortcode( 'ttgarden_block_options', '__return_empty_string' ); +add_shortcode( 'ttgarden_block_hidden', '__return_empty_string' ); /** * Returns parsed content if the blog has more than one post author. @@ -43,7 +43,7 @@ function ttgarden_block_groupmembers( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_groupmembers', 'ttgarden_block_groupmembers' ); +add_shortcode( 'ttgarden_block_groupmembers', 'ttgarden_block_groupmembers' ); /** * Loops over all group members and parses shortcodes within the block. @@ -71,7 +71,7 @@ function ttgarden_block_groupmember( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_groupmember', 'ttgarden_block_groupmember' ); +add_shortcode( 'ttgarden_block_groupmember', 'ttgarden_block_groupmember' ); /** * Outputs content if the twitter username theme set is not empty. @@ -84,7 +84,7 @@ function ttgarden_block_groupmember( $atts, $content = '' ): string { function ttgarden_block_twitter( $atts, $content = '' ): string { return ( '' !== get_theme_mod( 'twitter_username', '' ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_twitter', 'ttgarden_block_twitter' ); +add_shortcode( 'ttgarden_block_twitter', 'ttgarden_block_twitter' ); /** * Boolean check for theme options. @@ -101,7 +101,7 @@ function ttgarden_block_if_theme_option( $atts, $content = '' ): string { 'name' => '', ), $atts, - 'block_if_theme_option' + 'ttgarden_block_if_theme_option' ); // Don't render if the name attribute is empty. @@ -111,7 +111,7 @@ function ttgarden_block_if_theme_option( $atts, $content = '' ): string { return ( get_theme_mod( $atts['name'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_if_theme_option', 'ttgarden_block_if_theme_option' ); +add_shortcode( 'ttgarden_block_if_theme_option', 'ttgarden_block_if_theme_option' ); /** * Boolean check for theme options. @@ -138,7 +138,7 @@ function ttgarden_block_ifnot_theme_option( $atts, $content = '' ): string { return ( ! get_theme_mod( $atts['name'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_ifnot_theme_option', 'ttgarden_block_ifnot_theme_option' ); +add_shortcode( 'ttgarden_block_ifnot_theme_option', 'ttgarden_block_ifnot_theme_option' ); /** * Conditional check for if we're in the loop. @@ -152,12 +152,12 @@ function ttgarden_block_ifnot_theme_option( $atts, $content = '' ): string { function ttgarden_block_body( $atts, $content = '' ): string { return ( in_the_loop() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_body', 'ttgarden_block_body' ); -add_shortcode( 'block_date', 'ttgarden_block_body' ); -add_shortcode( 'block_postsummary', 'ttgarden_block_body' ); -add_shortcode( 'block_excerpt', 'ttgarden_block_body' ); -add_shortcode( 'block_host', 'ttgarden_block_body' ); -add_shortcode( 'block_author', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_body', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_date', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_postsummary', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_excerpt', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_host', 'ttgarden_block_body' ); +add_shortcode( 'ttgarden_block_author', 'ttgarden_block_body' ); /** * Outputs content if we should stretch the header image. @@ -170,7 +170,7 @@ function ttgarden_block_body( $atts, $content = '' ): string { function ttgarden_block_stretchheaderimage( $atts, $content = '' ): string { return ( get_theme_mod( 'stretch_header_image', true ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_stretchheaderimage', 'ttgarden_block_stretchheaderimage' ); +add_shortcode( 'ttgarden_block_stretchheaderimage', 'ttgarden_block_stretchheaderimage' ); /** * Outputs content if we should not stretch the header image. @@ -183,7 +183,7 @@ function ttgarden_block_stretchheaderimage( $atts, $content = '' ): string { function ttgarden_block_nostretchheaderimage( $atts, $content = '' ): string { return ( get_theme_mod( 'stretch_header_image', true ) ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_nostretchheaderimage', 'ttgarden_block_nostretchheaderimage' ); +add_shortcode( 'ttgarden_block_nostretchheaderimage', 'ttgarden_block_nostretchheaderimage' ); /** * Output content if we've chosen to show the site avatar. @@ -196,7 +196,7 @@ function ttgarden_block_nostretchheaderimage( $atts, $content = '' ): string { function ttgarden_block_showavatar( $atts, $content = '' ): string { return ( get_theme_mod( 'show_avatar', true ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_showavatar', 'ttgarden_block_showavatar' ); +add_shortcode( 'ttgarden_block_showavatar', 'ttgarden_block_showavatar' ); /** * Output content if we've chosen to hide the site avatar. @@ -209,7 +209,7 @@ function ttgarden_block_showavatar( $atts, $content = '' ): string { function ttgarden_block_hideavatar( $atts, $content = '' ): string { return ( get_theme_mod( 'show_avatar', true ) ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_hideavatar', 'ttgarden_block_hideavatar' ); +add_shortcode( 'ttgarden_block_hideavatar', 'ttgarden_block_hideavatar' ); /** * Output content if we've chosen to show the site title and description. @@ -222,7 +222,7 @@ function ttgarden_block_hideavatar( $atts, $content = '' ): string { function ttgarden_block_showtitle( $atts, $content = '' ): string { return display_header_text() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_showtitle', 'ttgarden_block_showtitle' ); +add_shortcode( 'ttgarden_block_showtitle', 'ttgarden_block_showtitle' ); /** * Output content if we've chosen to hide the site title and description. @@ -235,7 +235,7 @@ function ttgarden_block_showtitle( $atts, $content = '' ): string { function ttgarden_block_hidetitle( $atts, $content = '' ): string { return display_header_text() ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_hidetitle', 'ttgarden_block_hidetitle' ); +add_shortcode( 'ttgarden_block_hidetitle', 'ttgarden_block_hidetitle' ); /** * Output content if we've chosen to show the site description. @@ -248,7 +248,7 @@ function ttgarden_block_hidetitle( $atts, $content = '' ): string { function ttgarden_block_showdescription( $atts, $content = '' ): string { return display_header_text() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_showdescription', 'ttgarden_block_showdescription' ); +add_shortcode( 'ttgarden_block_showdescription', 'ttgarden_block_showdescription' ); /** * Output content if we've chosen to hide the site description. @@ -261,7 +261,7 @@ function ttgarden_block_showdescription( $atts, $content = '' ): string { function ttgarden_block_hidedescription( $atts, $content = '' ): string { return display_header_text() ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_hidedescription', 'ttgarden_block_hidedescription' ); +add_shortcode( 'ttgarden_block_hidedescription', 'ttgarden_block_hidedescription' ); /** * Rendered on index pages for posts with Read More breaks. @@ -276,7 +276,7 @@ function ttgarden_block_hidedescription( $atts, $content = '' ): string { function ttgarden_block_more( $atts, $content = '' ): string { return in_the_loop() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_more', 'ttgarden_block_more' ); +add_shortcode( 'ttgarden_block_more', 'ttgarden_block_more' ); /** * Rendered if the post has an excerpt. @@ -289,7 +289,7 @@ function ttgarden_block_more( $atts, $content = '' ): string { function ttgarden_block_description( $atts, $content = '' ): string { return has_excerpt() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_description', 'ttgarden_block_description' ); +add_shortcode( 'ttgarden_block_description', 'ttgarden_block_description' ); /** * The main posts loop. @@ -316,7 +316,7 @@ function ttgarden_block_posts( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_posts', 'ttgarden_block_posts' ); +add_shortcode( 'ttgarden_block_posts', 'ttgarden_block_posts' ); /** * Conditional if there are no posts. @@ -329,7 +329,7 @@ function ttgarden_block_posts( $atts, $content = '' ): string { function ttgarden_block_noposts( $atts, $content = '' ): string { return have_posts() ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_noposts', 'ttgarden_block_noposts' ); +add_shortcode( 'ttgarden_block_noposts', 'ttgarden_block_noposts' ); /** * Post tags loop. @@ -352,7 +352,7 @@ function ttgarden_block_tags( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_tags', 'ttgarden_block_tags' ); +add_shortcode( 'ttgarden_block_tags', 'ttgarden_block_tags' ); /** * Rendered for each custom page. @@ -385,7 +385,7 @@ function ttgarden_block_pages( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_pages', 'ttgarden_block_pages' ); +add_shortcode( 'ttgarden_block_pages', 'ttgarden_block_pages' ); /** * Boolean check for if we're on a search page. @@ -398,7 +398,7 @@ function ttgarden_block_pages( $atts, $content = '' ): string { function ttgarden_block_searchpage( $atts, $content = '' ): string { return is_search() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_searchpage', 'ttgarden_block_searchpage' ); +add_shortcode( 'ttgarden_block_searchpage', 'ttgarden_block_searchpage' ); /** * Render content if there are no search results. @@ -413,7 +413,7 @@ function ttgarden_block_nosearchresults( $atts, $content = '' ): string { return ( is_search() && 0 === $wp_query->found_posts ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_nosearchresults', 'ttgarden_block_nosearchresults' ); +add_shortcode( 'ttgarden_block_nosearchresults', 'ttgarden_block_nosearchresults' ); /** * Render content if there are search results. @@ -428,7 +428,7 @@ function ttgarden_block_searchresults( $atts, $content = '' ): string { return ( is_search() && $wp_query->found_posts > 0 ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_searchresults', 'ttgarden_block_searchresults' ); +add_shortcode( 'ttgarden_block_searchresults', 'ttgarden_block_searchresults' ); /** * Render content if this site is not currently public. @@ -441,7 +441,7 @@ function ttgarden_block_searchresults( $atts, $content = '' ): string { function ttgarden_block_hidefromsearchenabled( $atts, $content = '' ): string { return ( '1' !== get_option( 'blog_public' ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_hidefromsearchenabled', 'ttgarden_block_hidefromsearchenabled' ); +add_shortcode( 'ttgarden_block_hidefromsearchenabled', 'ttgarden_block_hidefromsearchenabled' ); /** * Boolean check for if we're on a taxonomy page. @@ -454,7 +454,7 @@ function ttgarden_block_hidefromsearchenabled( $atts, $content = '' ): string { function ttgarden_block_tagpage( $atts, $content = '' ): string { return ( is_tag() || is_category() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_tagpage', 'ttgarden_block_tagpage' ); +add_shortcode( 'ttgarden_block_tagpage', 'ttgarden_block_tagpage' ); /** * Boolean check for if we're on a single post or page. @@ -467,8 +467,8 @@ function ttgarden_block_tagpage( $atts, $content = '' ): string { function ttgarden_block_permalinkpage( $atts, $content = '' ): string { return ( is_page() || is_single() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_permalinkpage', 'ttgarden_block_permalinkpage' ); -add_shortcode( 'block_permalink', 'ttgarden_block_permalinkpage' ); +add_shortcode( 'ttgarden_block_permalinkpage', 'ttgarden_block_permalinkpage' ); +add_shortcode( 'ttgarden_block_permalink', 'ttgarden_block_permalinkpage' ); /** * Boolean check for if we're on the home page. @@ -481,7 +481,7 @@ function ttgarden_block_permalinkpage( $atts, $content = '' ): string { function ttgarden_block_indexpage( $atts, $content = '' ): string { return is_home() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_indexpage', 'ttgarden_block_indexpage' ); +add_shortcode( 'ttgarden_block_indexpage', 'ttgarden_block_indexpage' ); /** * Boolean check for if we're on the "front page". @@ -495,7 +495,7 @@ function ttgarden_block_indexpage( $atts, $content = '' ): string { function ttgarden_block_homepage( $atts, $content = '' ): string { return is_front_page() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_homepage', 'ttgarden_block_homepage' ); +add_shortcode( 'ttgarden_block_homepage', 'ttgarden_block_homepage' ); /** * Sets the global parse context so we know we're outputting a post title. @@ -508,7 +508,7 @@ function ttgarden_block_homepage( $atts, $content = '' ): string { function ttgarden_block_title( $atts, $content = '' ): string { return ! empty( get_the_title() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_title', 'ttgarden_block_title' ); +add_shortcode( 'ttgarden_block_title', 'ttgarden_block_title' ); /** * If the current page is able to pagination, render the content. @@ -521,7 +521,7 @@ function ttgarden_block_title( $atts, $content = '' ): string { function ttgarden_block_pagination( $atts, $content = '' ): string { return ( get_next_posts_page_link() || get_previous_posts_page_link() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_pagination', 'ttgarden_block_pagination' ); +add_shortcode( 'ttgarden_block_pagination', 'ttgarden_block_pagination' ); /** * The Jump pagination block. @@ -538,7 +538,7 @@ function ttgarden_block_jumppagination( $atts, $content = '' ): string { 'length' => '5', ), $atts, - 'block_jumppagination' + 'ttgarden_block_jumppagination' ); $output = ''; @@ -554,7 +554,7 @@ function ttgarden_block_jumppagination( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_jumppagination', 'ttgarden_block_jumppagination' ); +add_shortcode( 'ttgarden_block_jumppagination', 'ttgarden_block_jumppagination' ); /** * The currentpage block inside jumppagination. @@ -572,7 +572,7 @@ function ttgarden_block_currentpage( $atts, $content = '' ): string { return ( isset( $context['jumppagination'] ) && $paged === $context['jumppagination'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_currentpage', 'ttgarden_block_currentpage' ); +add_shortcode( 'ttgarden_block_currentpage', 'ttgarden_block_currentpage' ); /** * The jumppage block inside jumppagination. @@ -590,7 +590,7 @@ function ttgarden_block_jumppage( $atts, $content = '' ): string { return ( isset( $context['jumppagination'] ) && $paged !== $context['jumppagination'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_jumppage', 'ttgarden_block_jumppage' ); +add_shortcode( 'ttgarden_block_jumppage', 'ttgarden_block_jumppage' ); /** * Boolean check for if we're on a single post or page. @@ -603,7 +603,7 @@ function ttgarden_block_jumppage( $atts, $content = '' ): string { function ttgarden_block_posttitle( $atts, $content = '' ): string { return is_single() ? ttgarden_block_title( $content ) : ''; } -add_shortcode( 'block_posttitle', 'ttgarden_block_posttitle' ); +add_shortcode( 'ttgarden_block_posttitle', 'ttgarden_block_posttitle' ); /** * Rendered if you have defined any custom pages. @@ -624,7 +624,7 @@ function ttgarden_block_haspages( $atts, $content = '' ): string { return ( ! empty( $pages_query ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_haspages', 'ttgarden_block_haspages' ); +add_shortcode( 'ttgarden_block_haspages', 'ttgarden_block_haspages' ); /** * Rendered if you have "Show header image" enabled. @@ -639,7 +639,7 @@ function ttgarden_block_showheaderimage( $atts, $content = '' ): string { 'remove-header' !== get_theme_mod( 'header_image', 'remove-header' ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_showheaderimage', 'ttgarden_block_showheaderimage' ); +add_shortcode( 'ttgarden_block_showheaderimage', 'ttgarden_block_showheaderimage' ); /** * Rendered if you have "Show header image" disabled. @@ -654,7 +654,7 @@ function ttgarden_block_hideheaderimage( $atts, $content = '' ): string { 'remove-header' === get_theme_mod( 'header_image', 'remove-header' ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_hideheaderimage', 'ttgarden_block_hideheaderimage' ); +add_shortcode( 'ttgarden_block_hideheaderimage', 'ttgarden_block_hideheaderimage' ); /** * If a post is not a reblog, render the content. @@ -669,7 +669,7 @@ function ttgarden_block_hideheaderimage( $atts, $content = '' ): string { function ttgarden_block_notreblog( $atts, $content = '' ): string { return ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_notreblog', 'ttgarden_block_notreblog' ); +add_shortcode( 'ttgarden_block_notreblog', 'ttgarden_block_notreblog' ); /** * Rendered if the post has tags. @@ -682,7 +682,7 @@ function ttgarden_block_notreblog( $atts, $content = '' ): string { function ttgarden_block_hastags( $atts, $content = '' ): string { return ( has_tag() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_hastags', 'ttgarden_block_hastags' ); +add_shortcode( 'ttgarden_block_hastags', 'ttgarden_block_hastags' ); /** * Rendered if the post has comments or comments open. @@ -695,7 +695,7 @@ function ttgarden_block_hastags( $atts, $content = '' ): string { function ttgarden_block_post_notes( $atts, $content = '' ): string { return ( is_single() || is_page() ) && ( get_comments_number() || comments_open() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_postnotes', 'ttgarden_block_post_notes' ); +add_shortcode( 'ttgarden_block_postnotes', 'ttgarden_block_post_notes' ); /** * Always rendered, but only outputs content if the post has comments or comments open. @@ -708,7 +708,7 @@ function ttgarden_block_post_notes( $atts, $content = '' ): string { function ttgarden_block_notecount( $atts, $content = '' ): string { return ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_notecount', 'ttgarden_block_notecount' ); +add_shortcode( 'ttgarden_block_notecount', 'ttgarden_block_notecount' ); /** * Rendered for legacy Text posts and NPF posts. @@ -721,8 +721,8 @@ function ttgarden_block_notecount( $atts, $content = '' ): string { function ttgarden_block_text( $atts, $content = '' ): string { return ( false === get_post_format() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_text', 'ttgarden_block_text' ); -add_shortcode( 'block_regular', 'ttgarden_block_text' ); +add_shortcode( 'ttgarden_block_text', 'ttgarden_block_text' ); +add_shortcode( 'ttgarden_block_regular', 'ttgarden_block_text' ); /** * Rendered for legacy quote posts, or the WordPress quote post format. @@ -807,7 +807,7 @@ function ttgarden_block_quote( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_quote', 'ttgarden_block_quote' ); +add_shortcode( 'ttgarden_block_quote', 'ttgarden_block_quote' ); /** * Tests for a source in the quote post format. @@ -828,7 +828,7 @@ function ttgarden_block_source( $atts, $content = '' ): string { // Return nothing if no source is found. return ''; } -add_shortcode( 'block_source', 'ttgarden_block_source' ); +add_shortcode( 'ttgarden_block_source', 'ttgarden_block_source' ); /** * Rendered for chat posts. @@ -870,8 +870,8 @@ function ttgarden_block_chat( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_chat', 'ttgarden_block_chat' ); -add_shortcode( 'block_conversation', 'ttgarden_block_chat' ); +add_shortcode( 'ttgarden_block_chat', 'ttgarden_block_chat' ); +add_shortcode( 'ttgarden_block_conversation', 'ttgarden_block_chat' ); /** * Legacy Chat Post rendered for each line of the post @@ -914,7 +914,7 @@ function ttgarden_block_lines( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_lines', 'ttgarden_block_lines' ); +add_shortcode( 'ttgarden_block_lines', 'ttgarden_block_lines' ); /** * Legacy Chat Post block:label @@ -933,7 +933,7 @@ function ttgarden_block_label( $atts, $content = '' ): string { return ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_label', 'ttgarden_block_label' ); +add_shortcode( 'ttgarden_block_label', 'ttgarden_block_label' ); /** * Rendered for link posts. @@ -977,7 +977,7 @@ function ttgarden_block_link( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_link', 'ttgarden_block_link' ); +add_shortcode( 'ttgarden_block_link', 'ttgarden_block_link' ); /** * Rendered for audio posts. @@ -1079,7 +1079,7 @@ function ttgarden_block_audio( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_audio', 'ttgarden_block_audio' ); +add_shortcode( 'ttgarden_block_audio', 'ttgarden_block_audio' ); /** * Rendered for audio posts with an audioplayer block. @@ -1094,8 +1094,8 @@ function ttgarden_block_audioplayer( $atts, $content = '' ): string { return ( isset( $context['audio']['player'] ) && ! empty( $context['audio']['player'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_audioplayer', 'ttgarden_block_audioplayer' ); -add_shortcode( 'block_audioembed', 'ttgarden_block_audioplayer' ); +add_shortcode( 'ttgarden_block_audioplayer', 'ttgarden_block_audioplayer' ); +add_shortcode( 'ttgarden_block_audioembed', 'ttgarden_block_audioplayer' ); /** * Rendered for audio posts with an external audio block. @@ -1111,7 +1111,7 @@ function ttgarden_block_externalaudio( $atts, $content = '' ): string { return ( isset( $context['audio']['media_id'] ) && 0 === $context['audio']['media_id'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_externalaudio', 'ttgarden_block_externalaudio' ); +add_shortcode( 'ttgarden_block_externalaudio', 'ttgarden_block_externalaudio' ); /** * Rendered for audio posts with a featured image set. @@ -1126,7 +1126,7 @@ function ttgarden_block_albumart( $atts, $content = '' ): string { return ( isset( $context['audio']['player'] ) && ! empty( $context['audio']['player'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_albumart', 'ttgarden_block_albumart' ); +add_shortcode( 'ttgarden_block_albumart', 'ttgarden_block_albumart' ); /** * Rendered for audio posts with a track name set. @@ -1141,7 +1141,7 @@ function ttgarden_block_trackname( $atts, $content = '' ): string { return ( isset( $context['audio']['trackname'] ) && '' !== $context['audio']['trackname'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_trackname', 'ttgarden_block_trackname' ); +add_shortcode( 'ttgarden_block_trackname', 'ttgarden_block_trackname' ); /** * Rendered for audio posts with an artist name set. @@ -1156,7 +1156,7 @@ function ttgarden_block_artist( $atts, $content = '' ): string { return ( isset( $context['audio']['artist'] ) && '' !== $context['audio']['artist'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_artist', 'ttgarden_block_artist' ); +add_shortcode( 'ttgarden_block_artist', 'ttgarden_block_artist' ); /** * Rendered for audio posts with an album name set. @@ -1171,7 +1171,7 @@ function ttgarden_block_album( $atts, $content = '' ): string { return ( isset( $context['audio']['album'] ) && '' !== $context['audio']['album'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_album', 'ttgarden_block_album' ); +add_shortcode( 'ttgarden_block_album', 'ttgarden_block_album' ); /** * Rendered for video posts. @@ -1282,7 +1282,7 @@ function ttgarden_block_video( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_video', 'ttgarden_block_video' ); +add_shortcode( 'ttgarden_block_video', 'ttgarden_block_video' ); /** * Rendered for video posts with a video player and video thumbnail. @@ -1297,8 +1297,8 @@ function ttgarden_block_videothumbnail( $atts, $content = '' ): string { return ( isset( $context['video']['thumbnail'] ) && ! empty( $context['video']['thumbnail'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_videothumbnail', 'ttgarden_block_videothumbnail' ); -add_shortcode( 'block_videothumbnails', 'ttgarden_block_videothumbnail' ); +add_shortcode( 'ttgarden_block_videothumbnail', 'ttgarden_block_videothumbnail' ); +add_shortcode( 'ttgarden_block_videothumbnails', 'ttgarden_block_videothumbnail' ); /** * Rendered for photo and panorama posts. @@ -1377,7 +1377,7 @@ function ttgarden_block_photo( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_photo', 'ttgarden_block_photo' ); +add_shortcode( 'ttgarden_block_photo', 'ttgarden_block_photo' ); /** * Render each photo in a photoset (gallery) post. @@ -1434,7 +1434,7 @@ function ttgarden_block_photos( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_photos', 'ttgarden_block_photos' ); +add_shortcode( 'ttgarden_block_photos', 'ttgarden_block_photos' ); /** * Rendered for photo and panorama posts which have a link set on the image. @@ -1453,7 +1453,7 @@ function ttgarden_block_linkurl( $atts, $content = '' ): string { return ( true === $context['image']['lightbox'] || 'none' !== $context['image']['link'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_linkurl', 'ttgarden_block_linkurl' ); +add_shortcode( 'ttgarden_block_linkurl', 'ttgarden_block_linkurl' ); /** * Rendered for photo and panorama posts which have the image size set as "large" or "fullsize". @@ -1468,7 +1468,7 @@ function ttgarden_block_highres( $atts, $content = '' ): string { return ( isset( $context['image']['highres'] ) && true === $context['image']['highres'] ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_highres', 'ttgarden_block_highres' ); +add_shortcode( 'ttgarden_block_highres', 'ttgarden_block_highres' ); /** * Rendered render content if the image has exif data. @@ -1483,7 +1483,7 @@ function ttgarden_block_exif( $atts, $content = '' ): string { return ( isset( $context['image']['data'] ) && ! empty( $context['image']['data']['image_meta'] ) ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_exif', 'ttgarden_block_exif' ); +add_shortcode( 'ttgarden_block_exif', 'ttgarden_block_exif' ); /** * Conditionally load content based on if the image has camera exif data. @@ -1504,7 +1504,7 @@ function ttgarden_block_camera( $atts, $content = '' ): string { return ( empty( $camera ) || '0' === $camera ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_camera', 'ttgarden_block_camera' ); +add_shortcode( 'ttgarden_block_camera', 'ttgarden_block_camera' ); /** * Conditionally load content based on if the image has lens exif data. @@ -1525,7 +1525,7 @@ function ttgarden_block_aperture( $atts, $content = '' ): string { return ( empty( $aperture ) || '0' === $aperture ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_aperture', 'ttgarden_block_aperture' ); +add_shortcode( 'ttgarden_block_aperture', 'ttgarden_block_aperture' ); /** * Conditionally load content based on if the image has focal length exif data. @@ -1546,7 +1546,7 @@ function ttgarden_block_exposure( $atts, $content = '' ): string { return ( empty( $exposure ) || '0' === $exposure ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_exposure', 'ttgarden_block_exposure' ); +add_shortcode( 'ttgarden_block_exposure', 'ttgarden_block_exposure' ); /** * Conditionally load content based on if the image has focal length exif data. @@ -1567,7 +1567,7 @@ function ttgarden_block_focallength( $atts, $content = '' ): string { return ( empty( $focal_length ) || '0' === $focal_length ) ? '' : ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_focallength', 'ttgarden_block_focallength' ); +add_shortcode( 'ttgarden_block_focallength', 'ttgarden_block_focallength' ); /** * Rendered for photoset (gallery) posts. @@ -1629,7 +1629,7 @@ function ttgarden_block_photoset( $atts, $content = '' ): string { return $content; } -add_shortcode( 'block_photoset', 'ttgarden_block_photoset' ); +add_shortcode( 'ttgarden_block_photoset', 'ttgarden_block_photoset' ); /** * Rendered for link posts with a thumbnail image set. @@ -1642,7 +1642,7 @@ function ttgarden_block_photoset( $atts, $content = '' ): string { function ttgarden_block_thumbnail( $atts, $content = '' ): string { return has_post_thumbnail() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_thumbnail', 'ttgarden_block_thumbnail' ); +add_shortcode( 'ttgarden_block_thumbnail', 'ttgarden_block_thumbnail' ); /** * Rendered for photoset (gallery) posts with caption content. @@ -1662,7 +1662,7 @@ function ttgarden_block_caption( $atts, $content = '' ): string { return ttgarden_do_shortcode( $content ); } -add_shortcode( 'block_caption', 'ttgarden_block_caption' ); +add_shortcode( 'ttgarden_block_caption', 'ttgarden_block_caption' ); /** * Rendered for legacy Text posts and NPF posts. @@ -1675,7 +1675,7 @@ function ttgarden_block_caption( $atts, $content = '' ): string { function ttgarden_block_daypage( $atts, $content = '' ): string { return ( is_day() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_daypage', 'ttgarden_block_daypage' ); +add_shortcode( 'ttgarden_block_daypage', 'ttgarden_block_daypage' ); /** * Rendered if older posts are available. @@ -1688,7 +1688,7 @@ function ttgarden_block_daypage( $atts, $content = '' ): string { function ttgarden_block_previouspage( $atts, $content = '' ): string { return ( get_previous_posts_link() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_previouspage', 'ttgarden_block_previouspage' ); +add_shortcode( 'ttgarden_block_previouspage', 'ttgarden_block_previouspage' ); /** * Rendered if newer posts are available. @@ -1701,7 +1701,7 @@ function ttgarden_block_previouspage( $atts, $content = '' ): string { function ttgarden_block_nextpage( $atts, $content = '' ): string { return ( get_next_posts_link() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_nextpage', 'ttgarden_block_nextpage' ); +add_shortcode( 'ttgarden_block_nextpage', 'ttgarden_block_nextpage' ); /** * Boolean check for if we're on a single post or page. @@ -1714,7 +1714,7 @@ function ttgarden_block_nextpage( $atts, $content = '' ): string { function ttgarden_block_permalinkpagination( $atts, $content = '' ): string { return is_single() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_permalinkpagination', 'ttgarden_block_permalinkpagination' ); +add_shortcode( 'ttgarden_block_permalinkpagination', 'ttgarden_block_permalinkpagination' ); /** * Check if there's a previous adjacent post. @@ -1727,7 +1727,7 @@ function ttgarden_block_permalinkpagination( $atts, $content = '' ): string { function ttgarden_block_previouspost( $atts, $content = '' ): string { return ( get_previous_post() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_previouspost', 'ttgarden_block_previouspost' ); +add_shortcode( 'ttgarden_block_previouspost', 'ttgarden_block_previouspost' ); /** * Check if there's a next adjacent post. @@ -1740,7 +1740,7 @@ function ttgarden_block_previouspost( $atts, $content = '' ): string { function ttgarden_block_nextpost( $atts, $content = '' ): string { return ( get_next_post() ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_nextpost', 'ttgarden_block_nextpost' ); +add_shortcode( 'ttgarden_block_nextpost', 'ttgarden_block_nextpost' ); /** * Rendered if the post has been marked as sticky. @@ -1753,7 +1753,7 @@ function ttgarden_block_nextpost( $atts, $content = '' ): string { function ttgarden_block_pinnedpostlabel( $atts, $content = '' ): string { return is_sticky() ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_pinnedpostlabel', 'ttgarden_block_pinnedpostlabel' ); +add_shortcode( 'ttgarden_block_pinnedpostlabel', 'ttgarden_block_pinnedpostlabel' ); /** * Render content if the current language is equal to the specified language. @@ -1767,42 +1767,42 @@ function ttgarden_block_pinnedpostlabel( $atts, $content = '' ): string { function ttgarden_block_language( $atts, $content, $shortcode_name ): string { // Map shortcodes to their respective locales $language_map = array( - 'block_english' => 'en_US', - 'block_german' => 'de_DE', - 'block_french' => 'fr_FR', - 'block_italian' => 'it_IT', - 'block_turkish' => 'tr_TR', - 'block_spanish' => 'es_ES', - 'block_russian' => 'ru_RU', - 'block_japanese' => 'ja_JP', - 'block_polish' => 'pl_PL', - 'block_portuguesept' => 'pt_PT', - 'block_portuguesebr' => 'pt_BR', - 'block_dutch' => 'nl_NL', - 'block_korean' => 'ko_KR', - 'block_chinesesimplified' => 'zh_CN', - 'block_chinesetraditional' => 'zh_TW', - 'block_chinesehk' => 'zh_HK', - 'block_indonesian' => 'id_ID', - 'block_hindi' => 'hi_IN', - 'block_notenglish' => 'en_US', - 'block_notgerman' => 'de_DE', - 'block_notfrench' => 'fr_FR', - 'block_notitalian' => 'it_IT', - 'block_notturkish' => 'tr_TR', - 'block_notspanish' => 'es_ES', - 'block_notrussian' => 'ru_RU', - 'block_notjapanese' => 'ja_JP', - 'block_notpolish' => 'pl_PL', - 'block_notportuguesept' => 'pt_PT', - 'block_notportuguesebr' => 'pt_BR', - 'block_notdutch' => 'nl_NL', - 'block_notkorean' => 'ko_KR', - 'block_notchinesesimplified' => 'zh_CN', - 'block_notchinesetraditional' => 'zh_TW', - 'block_notchinesehk' => 'zh_HK', - 'block_notindonesian' => 'id_ID', - 'block_nothindi' => 'hi_IN', + 'ttgarden_block_english' => 'en_US', + 'ttgarden_block_german' => 'de_DE', + 'ttgarden_block_french' => 'fr_FR', + 'ttgarden_block_italian' => 'it_IT', + 'ttgarden_block_turkish' => 'tr_TR', + 'ttgarden_block_spanish' => 'es_ES', + 'ttgarden_block_russian' => 'ru_RU', + 'ttgarden_block_japanese' => 'ja_JP', + 'ttgarden_block_polish' => 'pl_PL', + 'ttgarden_block_portuguesept' => 'pt_PT', + 'ttgarden_block_portuguesebr' => 'pt_BR', + 'ttgarden_block_dutch' => 'nl_NL', + 'ttgarden_block_korean' => 'ko_KR', + 'ttgarden_block_chinesesimplified' => 'zh_CN', + 'ttgarden_block_chinesetraditional' => 'zh_TW', + 'ttgarden_block_chinesehk' => 'zh_HK', + 'ttgarden_block_indonesian' => 'id_ID', + 'ttgarden_block_hindi' => 'hi_IN', + 'ttgarden_block_notenglish' => 'en_US', + 'ttgarden_block_notgerman' => 'de_DE', + 'ttgarden_block_notfrench' => 'fr_FR', + 'ttgarden_block_notitalian' => 'it_IT', + 'ttgarden_block_notturkish' => 'tr_TR', + 'ttgarden_block_notspanish' => 'es_ES', + 'ttgarden_block_notrussian' => 'ru_RU', + 'ttgarden_block_notjapanese' => 'ja_JP', + 'ttgarden_block_notpolish' => 'pl_PL', + 'ttgarden_block_notportuguesept' => 'pt_PT', + 'ttgarden_block_notportuguesebr' => 'pt_BR', + 'ttgarden_block_notdutch' => 'nl_NL', + 'ttgarden_block_notkorean' => 'ko_KR', + 'ttgarden_block_notchinesesimplified' => 'zh_CN', + 'ttgarden_block_notchinesetraditional' => 'zh_TW', + 'ttgarden_block_notchinesehk' => 'zh_HK', + 'ttgarden_block_notindonesian' => 'id_ID', + 'ttgarden_block_nothindi' => 'hi_IN', ); // Get the current locale @@ -1819,42 +1819,42 @@ function ttgarden_block_language( $atts, $content, $shortcode_name ): string { return ''; } -add_shortcode( 'block_english', 'ttgarden_block_language' ); -add_shortcode( 'block_german', 'ttgarden_block_language' ); -add_shortcode( 'block_french', 'ttgarden_block_language' ); -add_shortcode( 'block_italian', 'ttgarden_block_language' ); -add_shortcode( 'block_turkish', 'ttgarden_block_language' ); -add_shortcode( 'block_spanish', 'ttgarden_block_language' ); -add_shortcode( 'block_russian', 'ttgarden_block_language' ); -add_shortcode( 'block_japanese', 'ttgarden_block_language' ); -add_shortcode( 'block_polish', 'ttgarden_block_language' ); -add_shortcode( 'block_portuguesept', 'ttgarden_block_language' ); -add_shortcode( 'block_portuguesebr', 'ttgarden_block_language' ); -add_shortcode( 'block_dutch', 'ttgarden_block_language' ); -add_shortcode( 'block_korean', 'ttgarden_block_language' ); -add_shortcode( 'block_chinesesimplified', 'ttgarden_block_language' ); -add_shortcode( 'block_chinesetraditional', 'ttgarden_block_language' ); -add_shortcode( 'block_chinesehk', 'ttgarden_block_language' ); -add_shortcode( 'block_indonesian', 'ttgarden_block_language' ); -add_shortcode( 'block_hindi', 'ttgarden_block_language' ); -add_shortcode( 'block_notenglish', 'ttgarden_block_language' ); -add_shortcode( 'block_notgerman', 'ttgarden_block_language' ); -add_shortcode( 'block_notfrench', 'ttgarden_block_language' ); -add_shortcode( 'block_notitalian', 'ttgarden_block_language' ); -add_shortcode( 'block_notturkish', 'ttgarden_block_language' ); -add_shortcode( 'block_notspanish', 'ttgarden_block_language' ); -add_shortcode( 'block_notrussian', 'ttgarden_block_language' ); -add_shortcode( 'block_notjapanese', 'ttgarden_block_language' ); -add_shortcode( 'block_notpolish', 'ttgarden_block_language' ); -add_shortcode( 'block_notportuguesept', 'ttgarden_block_language' ); -add_shortcode( 'block_notportuguesebr', 'ttgarden_block_language' ); -add_shortcode( 'block_notdutch', 'ttgarden_block_language' ); -add_shortcode( 'block_notkorean', 'ttgarden_block_language' ); -add_shortcode( 'block_notchinesesimplified', 'ttgarden_block_language' ); -add_shortcode( 'block_notchinesetraditional', 'ttgarden_block_language' ); -add_shortcode( 'block_notchinesehk', 'ttgarden_block_language' ); -add_shortcode( 'block_notindonesian', 'ttgarden_block_language' ); -add_shortcode( 'block_nothindi', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_english', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_german', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_french', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_italian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_turkish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_spanish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_russian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_japanese', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_polish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_portuguesept', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_portuguesebr', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_dutch', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_korean', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_chinesesimplified', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_chinesetraditional', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_chinesehk', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_indonesian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_hindi', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notenglish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notgerman', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notfrench', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notitalian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notturkish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notspanish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notrussian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notjapanese', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notpolish', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notportuguesept', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notportuguesebr', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notdutch', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notkorean', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notchinesesimplified', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notchinesetraditional', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notchinesehk', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_notindonesian', 'ttgarden_block_language' ); +add_shortcode( 'ttgarden_block_nothindi', 'ttgarden_block_language' ); /** * Rendered if this is post number N (0 - 15) in the loop. @@ -1869,7 +1869,7 @@ function ttgarden_block_post_n( $atts, $content, $shortcode_name ): string { global $wp_query; // Extract the post number from the shortcode name (assuming 'block_postN' where N is a number) - if ( preg_match( '/block_post(\d+)/', $shortcode_name, $matches ) ) { + if ( preg_match( '/ttgarden_block_post(\d+)/', $shortcode_name, $matches ) ) { // Check if in the loop and if the current post is the post number N if ( in_the_loop() && absint( $matches[1] - 1 ) === $wp_query->current_post ) { @@ -1879,21 +1879,21 @@ function ttgarden_block_post_n( $atts, $content, $shortcode_name ): string { return ''; } -add_shortcode( 'block_post1', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post2', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post3', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post4', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post5', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post6', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post7', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post8', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post9', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post10', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post11', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post12', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post13', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post14', 'ttgarden_block_post_n' ); -add_shortcode( 'block_post15', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post1', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post2', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post3', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post4', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post5', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post6', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post7', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post8', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post9', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post10', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post11', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post12', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post13', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post14', 'ttgarden_block_post_n' ); +add_shortcode( 'ttgarden_block_post15', 'ttgarden_block_post_n' ); /** * Render content if the current post is an odd post in the loop. @@ -1909,7 +1909,7 @@ function ttgarden_block_odd( $atts, $content = '' ): string { // Check if in the loop and if the current post index is odd return ( in_the_loop() && ( $wp_query->current_post % 2 ) !== 0 ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_odd', 'ttgarden_block_odd' ); +add_shortcode( 'ttgarden_block_odd', 'ttgarden_block_odd' ); /** * Render content if the current post is an even post in the loop. @@ -1925,7 +1925,7 @@ function ttgarden_block_even( $atts, $content = '' ): string { // Check if in the loop and if the current post index is even return ( in_the_loop() && ( $wp_query->current_post % 2 ) === 0 ) ? ttgarden_do_shortcode( $content ) : ''; } -add_shortcode( 'block_even', 'ttgarden_block_even' ); +add_shortcode( 'ttgarden_block_even', 'ttgarden_block_even' ); /** * Test if the blog has featured tags available. @@ -1955,7 +1955,7 @@ function ttgarden_block_hasfeaturedtags( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_hasfeaturedtags', 'ttgarden_block_hasfeaturedtags' ); +add_shortcode( 'ttgarden_block_hasfeaturedtags', 'ttgarden_block_hasfeaturedtags' ); /** * If the blog has featured tags, render each of them. @@ -1984,4 +1984,4 @@ function ttgarden_block_featuredtags( $atts, $content = '' ): string { return $output; } -add_shortcode( 'block_featuredtags', 'ttgarden_block_featuredtags' ); +add_shortcode( 'ttgarden_block_featuredtags', 'ttgarden_block_featuredtags' ); diff --git a/includes/tag-functions.php b/includes/tag-functions.php index 56bdb82..7bd5448 100644 --- a/includes/tag-functions.php +++ b/includes/tag-functions.php @@ -24,7 +24,7 @@ function ttgarden_tag_lang( $atts ): string { 'value' => '', ), $atts, - 'tag_lang' + 'ttgarden_tag_lang' ); $plugin = ttgarden_get_plugin_instance(); @@ -72,7 +72,7 @@ function ( $callback ) { ) ); } -add_shortcode( 'tag_lang', 'ttgarden_tag_lang' ); +add_shortcode( 'ttgarden_tag_lang', 'ttgarden_tag_lang' ); /** * Outputs target attribute for links. @@ -82,7 +82,7 @@ function ( $callback ) { function ttgarden_tag_target(): string { return get_theme_mod( 'target_blank' ) ? 'target="_blank"' : ''; } -add_shortcode( 'tag_target', 'ttgarden_tag_target' ); +add_shortcode( 'ttgarden_tag_target', 'ttgarden_tag_target' ); /** * Returns the NPF JSON string of the current post. @@ -99,7 +99,7 @@ function ttgarden_tag_npf(): string { // Convert the content to NPF format return $converter->convert( $post_content ); } -add_shortcode( 'tag_npf', 'ttgarden_tag_npf' ); +add_shortcode( 'ttgarden_tag_npf', 'ttgarden_tag_npf' ); /** * The author name of the current post. @@ -109,8 +109,8 @@ function ttgarden_tag_npf(): string { function ttgarden_tag_postauthorname(): string { return get_the_author(); } -add_shortcode( 'tag_postauthorname', 'ttgarden_tag_postauthorname' ); -add_shortcode( 'tag_author', 'ttgarden_tag_postauthorname' ); +add_shortcode( 'ttgarden_tag_postauthorname', 'ttgarden_tag_postauthorname' ); +add_shortcode( 'ttgarden_tag_postauthorname', 'ttgarden_tag_postauthorname' ); /** * Returns the group member display name. @@ -126,7 +126,7 @@ function ttgarden_tag_groupmembername(): string { return ''; } -add_shortcode( 'tag_groupmembername', 'ttgarden_tag_groupmembername' ); +add_shortcode( 'ttgarden_tag_groupmembername', 'ttgarden_tag_groupmembername' ); /** * The URL of the group members posts page. @@ -142,7 +142,7 @@ function ttgarden_tag_groupmemberurl(): string { return ''; } -add_shortcode( 'tag_groupmemberurl', 'ttgarden_tag_groupmemberurl' ); +add_shortcode( 'ttgarden_tag_groupmemberurl', 'ttgarden_tag_groupmemberurl' ); /** * Gets the group member portrait URL. @@ -154,7 +154,7 @@ function ttgarden_tag_groupmemberurl(): string { * @return string The URL of the group member avatar. */ function ttgarden_tag_groupmemberportraiturl( $atts, $content, $shortcode_name ): string { - $size = str_replace( 'tag_groupmemberportraiturl-', '', $shortcode_name ); + $size = str_replace( 'ttgarden_tag_groupmemberportraiturl-', '', $shortcode_name ); $context = ttgarden_get_parse_context(); @@ -175,14 +175,14 @@ function ttgarden_tag_groupmemberportraiturl( $atts, $content, $shortcode_name ) return ''; } -add_shortcode( 'tag_groupmemberportraiturl-16', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-24', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-30', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-40', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-48', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-64', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-96', 'ttgarden_tag_groupmemberportraiturl' ); -add_shortcode( 'tag_groupmemberportraiturl-128', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-16', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-24', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-30', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-40', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-48', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-64', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-96', 'ttgarden_tag_groupmemberportraiturl' ); +add_shortcode( 'ttgarden_tag_groupmemberportraiturl-128', 'ttgarden_tag_groupmemberportraiturl' ); /** * The blog title of the post author. @@ -192,9 +192,9 @@ function ttgarden_tag_groupmemberportraiturl( $atts, $content, $shortcode_name ) function ttgarden_tag_postauthortitle(): string { return esc_attr( get_bloginfo( 'name' ) ); } -add_shortcode( 'tag_postauthortitle', 'ttgarden_tag_postauthortitle' ); -add_shortcode( 'tag_groupmembertitle', 'ttgarden_tag_postauthortitle' ); -add_shortcode( 'tag_postblogname', 'ttgarden_tag_postauthortitle' ); +add_shortcode( 'ttgarden_tag_postauthortitle', 'ttgarden_tag_postauthortitle' ); +add_shortcode( 'ttgarden_tag_groupmembertitle', 'ttgarden_tag_postauthortitle' ); +add_shortcode( 'ttgarden_tag_postblogname', 'ttgarden_tag_postauthortitle' ); /** * The URL of the post author. @@ -204,7 +204,7 @@ function ttgarden_tag_postauthortitle(): string { function ttgarden_tag_postauthorurl(): string { return esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); } -add_shortcode( 'tag_postauthorurl', 'ttgarden_tag_postauthorurl' ); +add_shortcode( 'ttgarden_tag_postauthorurl', 'ttgarden_tag_postauthorurl' ); /** * The portrait URL of the post author. @@ -216,7 +216,7 @@ function ttgarden_tag_postauthorurl(): string { * @return string The URL of the author portrait. */ function ttgarden_tag_postauthorportraiturl( $atts, $content, $shortcode_name ): string { - $size = str_replace( 'tag_postauthorportraiturl-', '', $shortcode_name ); + $size = str_replace( 'ttgarden_tag_postauthorportraiturl-', '', $shortcode_name ); $author_id = get_the_author_meta( 'ID' ); $author = get_user_by( 'ID', $author_id ); @@ -237,14 +237,14 @@ function ttgarden_tag_postauthorportraiturl( $atts, $content, $shortcode_name ): return esc_url( $author_avatar ); } -add_shortcode( 'tag_postauthorportraiturl-16', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-24', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-30', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-40', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-48', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-64', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-96', 'ttgarden_tag_postauthorportraiturl' ); -add_shortcode( 'tag_postauthorportraiturl-128', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-16', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-24', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-30', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-40', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-48', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-64', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-96', 'ttgarden_tag_postauthorportraiturl' ); +add_shortcode( 'ttgarden_tag_postauthorportraiturl-128', 'ttgarden_tag_postauthorportraiturl' ); /** * Outputs the twitter username theme option. @@ -254,7 +254,7 @@ function ttgarden_tag_postauthorportraiturl( $atts, $content, $shortcode_name ): function ttgarden_tag_twitterusername(): string { return esc_attr( get_theme_mod( 'twitter_username' ) ); } -add_shortcode( 'tag_twitterusername', 'ttgarden_tag_twitterusername' ); +add_shortcode( 'ttgarden_tag_twitterusername', 'ttgarden_tag_twitterusername' ); /** * The current state of a page in nav. @@ -265,8 +265,8 @@ function ttgarden_tag_twitterusername(): string { function ttgarden_tag_currentstate(): string { return get_the_permalink() === home_url( add_query_arg( null, null ) ) ? 'current-page' : ''; } -add_shortcode( 'tag_currentstate', 'ttgarden_tag_currentstate' ); -add_shortcode( 'tag_externalstate', 'ttgarden_tag_currentstate' ); +add_shortcode( 'ttgarden_tag_currentstate', 'ttgarden_tag_currentstate' ); +add_shortcode( 'ttgarden_tag_externalstate', 'ttgarden_tag_currentstate' ); /** * The display shape of your avatar ("circle" or "square"). @@ -278,7 +278,7 @@ function ttgarden_tag_currentstate(): string { function ttgarden_tag_avatarshape(): string { return esc_html( get_theme_mod( 'avatar_shape', 'circle' ) ); } -add_shortcode( 'tag_avatarshape', 'ttgarden_tag_avatarshape' ); +add_shortcode( 'ttgarden_tag_avatarshape', 'ttgarden_tag_avatarshape' ); /** * The background color of your blog. @@ -290,7 +290,7 @@ function ttgarden_tag_avatarshape(): string { function ttgarden_tag_backgroundcolor(): string { return '#' . sanitize_hex_color_no_hash( get_theme_mod( 'background_color', '#fff' ) ); } -add_shortcode( 'tag_backgroundcolor', 'ttgarden_tag_backgroundcolor' ); +add_shortcode( 'ttgarden_tag_backgroundcolor', 'ttgarden_tag_backgroundcolor' ); /** * The accent color of your blog. @@ -302,7 +302,7 @@ function ttgarden_tag_backgroundcolor(): string { function ttgarden_tag_accentcolor(): string { return '#' . sanitize_hex_color_no_hash( get_theme_mod( 'accent_color', '#0073aa' ) ); } -add_shortcode( 'tag_accentcolor', 'ttgarden_tag_accentcolor' ); +add_shortcode( 'ttgarden_tag_accentcolor', 'ttgarden_tag_accentcolor' ); /** * The title color of your blog. @@ -314,7 +314,7 @@ function ttgarden_tag_accentcolor(): string { function ttgarden_tag_titlecolor(): string { return '#' . sanitize_hex_color_no_hash( get_theme_mod( 'header_textcolor', '#000' ) ); } -add_shortcode( 'tag_titlecolor', 'ttgarden_tag_titlecolor' ); +add_shortcode( 'ttgarden_tag_titlecolor', 'ttgarden_tag_titlecolor' ); /** * Get the title font theme option. @@ -326,7 +326,7 @@ function ttgarden_tag_titlecolor(): string { function ttgarden_tag_titlefont(): string { return esc_html( get_theme_mod( 'title_font', 'Arial' ) ); } -add_shortcode( 'tag_titlefont', 'ttgarden_tag_titlefont' ); +add_shortcode( 'ttgarden_tag_titlefont', 'ttgarden_tag_titlefont' ); /** * The weight of your title font ("normal" or "bold"). @@ -338,7 +338,7 @@ function ttgarden_tag_titlefont(): string { function ttgarden_tag_titlefontweight(): string { return esc_html( get_theme_mod( 'title_font_weight', 'bold' ) ); } -add_shortcode( 'tag_titlefontweight', 'ttgarden_tag_titlefontweight' ); +add_shortcode( 'ttgarden_tag_titlefontweight', 'ttgarden_tag_titlefontweight' ); /** * Get the header image theme option. @@ -350,7 +350,7 @@ function ttgarden_tag_titlefontweight(): string { function ttgarden_tag_headerimage(): string { return get_theme_mod( 'header_image', 'remove-header' ); } -add_shortcode( 'tag_headerimage', 'ttgarden_tag_headerimage' ); +add_shortcode( 'ttgarden_tag_headerimage', 'ttgarden_tag_headerimage' ); /** * Get either a post title, or the blog title. @@ -365,8 +365,8 @@ function ttgarden_tag_title(): string { // Consume global context and return the appropriate title. return ( isset( $context['theme'] ) ) ? get_bloginfo( 'name' ) : get_the_title(); } -add_shortcode( 'tag_title', 'ttgarden_tag_title' ); -add_shortcode( 'tag_posttitle', 'ttgarden_tag_title' ); +add_shortcode( 'ttgarden_tag_title', 'ttgarden_tag_title' ); +add_shortcode( 'ttgarden_tag_posttitle', 'ttgarden_tag_title' ); /** * The post content. @@ -379,7 +379,7 @@ function ttgarden_tag_body(): string { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WP core function. return apply_filters( 'the_content', get_the_content() ); } -add_shortcode( 'tag_body', 'ttgarden_tag_body' ); +add_shortcode( 'ttgarden_tag_body', 'ttgarden_tag_body' ); /** * The post content. @@ -392,8 +392,8 @@ function ttgarden_tag_excerpt(): string { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WP core function. return wp_strip_all_tags( apply_filters( 'the_content', get_the_content() ) ); } -add_shortcode( 'tag_excerpt', 'ttgarden_tag_excerpt' ); -add_shortcode( 'tag_sharestring', 'ttgarden_tag_excerpt' ); +add_shortcode( 'ttgarden_tag_excerpt', 'ttgarden_tag_excerpt' ); +add_shortcode( 'ttgarden_tag_sharestring', 'ttgarden_tag_excerpt' ); /** * The blog description, or subtitle. @@ -425,7 +425,7 @@ function ttgarden_tag_description(): string { // We decode the HTML entities to allow for some allowed HTML tags to be rendered return wp_kses_post( wp_specialchars_decode( get_bloginfo( 'description' ) ) ); } -add_shortcode( 'tag_description', 'ttgarden_tag_description' ); +add_shortcode( 'ttgarden_tag_description', 'ttgarden_tag_description' ); /** * Attribute safe blog description. @@ -437,7 +437,7 @@ function ttgarden_tag_description(): string { function ttgarden_tag_metadescription(): string { return esc_attr( get_bloginfo( 'description' ) ); } -add_shortcode( 'tag_metadescription', 'ttgarden_tag_metadescription' ); +add_shortcode( 'ttgarden_tag_metadescription', 'ttgarden_tag_metadescription' ); /** * The homepage URL of the blog. @@ -449,7 +449,7 @@ function ttgarden_tag_metadescription(): string { function ttgarden_tag_blogurl(): string { return esc_url( home_url( '/' ) ); } -add_shortcode( 'tag_blogurl', 'ttgarden_tag_blogurl' ); +add_shortcode( 'ttgarden_tag_blogurl', 'ttgarden_tag_blogurl' ); /** * The RSS feed URL of the blog. @@ -461,7 +461,7 @@ function ttgarden_tag_blogurl(): string { function ttgarden_tag_rss(): string { return esc_url( get_feed_link() ); } -add_shortcode( 'tag_rss', 'ttgarden_tag_rss' ); +add_shortcode( 'ttgarden_tag_rss', 'ttgarden_tag_rss' ); /** * The site favicon image URL. @@ -473,7 +473,7 @@ function ttgarden_tag_rss(): string { function ttgarden_tag_favicon(): string { return esc_url( get_site_icon_url() ); } -add_shortcode( 'tag_favicon', 'ttgarden_tag_favicon' ); +add_shortcode( 'ttgarden_tag_favicon', 'ttgarden_tag_favicon' ); /** * The portrait URL of the blog, uses the custom logo if set. @@ -507,14 +507,14 @@ function ttgarden_tag_portraiturl( $atts, $content, $shortcode_name ): string { return esc_url( $custom_logo_src[0] ); } -add_shortcode( 'tag_portraiturl-16', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-24', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-30', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-40', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-48', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-64', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-96', 'ttgarden_tag_portraiturl' ); -add_shortcode( 'tag_portraiturl-128', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-16', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-24', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-30', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-40', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-48', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-64', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-96', 'ttgarden_tag_portraiturl' ); +add_shortcode( 'ttgarden_tag_portraiturl-128', 'ttgarden_tag_portraiturl' ); /** * Returns the custom CSS option of the theme. @@ -526,7 +526,7 @@ function ttgarden_tag_portraiturl( $atts, $content, $shortcode_name ): string { function ttgarden_tag_customcss(): string { return esc_html( wp_get_custom_css() ); } -add_shortcode( 'tag_customcss', 'ttgarden_tag_customcss' ); +add_shortcode( 'ttgarden_tag_customcss', 'ttgarden_tag_customcss' ); /** * Identical to {PostTitle}, but will automatically generate a summary if a title doesn't exist. @@ -539,7 +539,7 @@ function ttgarden_tag_postsummary(): string { $title = get_the_title(); return ( '' === $title ) ? $title : get_the_excerpt(); } -add_shortcode( 'tag_postsummary', 'ttgarden_tag_postsummary' ); +add_shortcode( 'ttgarden_tag_postsummary', 'ttgarden_tag_postsummary' ); /** * Character limited version of {PostSummary} that is suitable for Twitter. @@ -551,8 +551,8 @@ function ttgarden_tag_postsummary(): string { function ttgarden_tag_tweetsummary(): string { return esc_html( substr( ttgarden_tag_postsummary(), 0, 280 ) ); } -add_shortcode( 'tag_tweetsummary', 'ttgarden_tag_tweetsummary' ); -add_shortcode( 'tag_mailsummary', 'ttgarden_tag_tweetsummary' ); +add_shortcode( 'ttgarden_tag_tweetsummary', 'ttgarden_tag_tweetsummary' ); +add_shortcode( 'ttgarden_tag_mailsummary', 'ttgarden_tag_tweetsummary' ); /** * Various contextual uses, typically outputs a post permalink. @@ -576,11 +576,11 @@ function ttgarden_tag_url(): string { return get_permalink(); } -add_shortcode( 'tag_url', 'ttgarden_tag_url' ); -add_shortcode( 'tag_permalink', 'ttgarden_tag_url' ); -add_shortcode( 'tag_relativepermalink', 'ttgarden_tag_url' ); -add_shortcode( 'tag_shorturl', 'ttgarden_tag_url' ); -add_shortcode( 'tag_embedurl', 'ttgarden_tag_url' ); +add_shortcode( 'ttgarden_tag_url', 'ttgarden_tag_url' ); +add_shortcode( 'ttgarden_tag_permalink', 'ttgarden_tag_url' ); +add_shortcode( 'ttgarden_tag_relativepermalink', 'ttgarden_tag_url' ); +add_shortcode( 'ttgarden_tag_shorturl', 'ttgarden_tag_url' ); +add_shortcode( 'ttgarden_tag_embedurl', 'ttgarden_tag_url' ); /** * Typically a page title, used in a page loop e.g navigation. @@ -601,7 +601,7 @@ function ttgarden_tag_label(): string { return $context['chat']['label']; } -add_shortcode( 'tag_label', 'ttgarden_tag_label' ); +add_shortcode( 'ttgarden_tag_label', 'ttgarden_tag_label' ); /** * Current line of a legacy chat post. @@ -620,7 +620,7 @@ function ttgarden_tag_line(): string { return $context['chat']['line']; } -add_shortcode( 'tag_line', 'ttgarden_tag_line' ); +add_shortcode( 'ttgarden_tag_line', 'ttgarden_tag_line' ); /** * Tagsasclasses outputs the tags of a post as HTML-safe classes. @@ -643,7 +643,7 @@ function ttgarden_tagsasclasses(): string { return implode( ' ', $classes ); } -add_shortcode( 'tag_tagsasclasses', 'ttgarden_tagsasclasses' ); +add_shortcode( 'ttgarden_tag_tagsasclasses', 'ttgarden_tagsasclasses' ); /** * Label in post footer indicating this is a pinned post. @@ -655,7 +655,7 @@ function ttgarden_tagsasclasses(): string { function ttgarden_tag_pinnedpostlabel(): string { return esc_html( TTGARDEN_LANG['lang:pinned post'] ); } -add_shortcode( 'tag_pinnedpostlabel', 'ttgarden_tag_pinnedpostlabel' ); +add_shortcode( 'ttgarden_tag_pinnedpostlabel', 'ttgarden_tag_pinnedpostlabel' ); /** * Gets the previous post URL (single post pagination) @@ -667,7 +667,7 @@ function ttgarden_tag_pinnedpostlabel(): string { function ttgarden_tag_previouspost(): string { return untrailingslashit( esc_url( get_permalink( get_adjacent_post( false, '', true ) ) ) ); } -add_shortcode( 'tag_previouspost', 'ttgarden_tag_previouspost' ); +add_shortcode( 'ttgarden_tag_previouspost', 'ttgarden_tag_previouspost' ); /** * Gets the next post URL (single post pagination) @@ -679,7 +679,7 @@ function ttgarden_tag_previouspost(): string { function ttgarden_tag_nextpost(): string { return untrailingslashit( esc_url( get_permalink( get_adjacent_post( false, '', false ) ) ) ); } -add_shortcode( 'tag_nextpost', 'ttgarden_tag_nextpost' ); +add_shortcode( 'ttgarden_tag_nextpost', 'ttgarden_tag_nextpost' ); /** * Gets the previous posts page URL (pagination) @@ -691,7 +691,7 @@ function ttgarden_tag_nextpost(): string { function ttgarden_tag_previouspage(): string|null { return untrailingslashit( esc_url( get_previous_posts_page_link() ) ); } -add_shortcode( 'tag_previouspage', 'ttgarden_tag_previouspage' ); +add_shortcode( 'ttgarden_tag_previouspage', 'ttgarden_tag_previouspage' ); /** * Gets the next posts page URL (pagination) @@ -703,7 +703,7 @@ function ttgarden_tag_previouspage(): string|null { function ttgarden_tag_nextpage(): string|null { return untrailingslashit( esc_url( get_next_posts_page_link() ) ); } -add_shortcode( 'tag_nextpage', 'ttgarden_tag_nextpage' ); +add_shortcode( 'ttgarden_tag_nextpage', 'ttgarden_tag_nextpage' ); /** * Gets the current page value (pagination) @@ -716,7 +716,7 @@ function ttgarden_tag_currentpage(): string { $page = get_query_var( 'paged' ); return ( $page > 0 ) ? (string) $page : '1'; } -add_shortcode( 'tag_currentpage', 'ttgarden_tag_currentpage' ); +add_shortcode( 'ttgarden_tag_currentpage', 'ttgarden_tag_currentpage' ); /** * The pagenumber tag inside jump pagination. @@ -727,7 +727,7 @@ function ttgarden_tag_pagenumber(): string { $context = ttgarden_get_parse_context(); return isset( $context['jumppagination'] ) ? (string) $context['jumppagination'] : ''; } -add_shortcode( 'tag_pagenumber', 'ttgarden_tag_pagenumber' ); +add_shortcode( 'ttgarden_tag_pagenumber', 'ttgarden_tag_pagenumber' ); /** * Gets the query total pages (pagination) @@ -740,7 +740,7 @@ function ttgarden_tag_totalpages(): string { global $wp_query; return ( $wp_query->max_num_pages > 0 ) ? (string) $wp_query->max_num_pages : '1'; } -add_shortcode( 'tag_totalpages', 'ttgarden_tag_totalpages' ); +add_shortcode( 'ttgarden_tag_totalpages', 'ttgarden_tag_totalpages' ); /** * Displays the span of years your blog has existed. @@ -766,7 +766,7 @@ function ttgarden_tag_copyrightyears(): string { return get_the_date( 'Y', $oldest_post[0] ) . '-' . gmdate( 'Y' ); } -add_shortcode( 'tag_copyrightyears', 'ttgarden_tag_copyrightyears' ); +add_shortcode( 'ttgarden_tag_copyrightyears', 'ttgarden_tag_copyrightyears' ); /** * The numeric ID for a post. @@ -778,7 +778,7 @@ function ttgarden_tag_copyrightyears(): string { function ttgarden_tag_postid(): string { return esc_attr( get_the_ID() ); } -add_shortcode( 'tag_postid', 'ttgarden_tag_postid' ); +add_shortcode( 'ttgarden_tag_postid', 'ttgarden_tag_postid' ); /** * The name of the current legacy post type. @@ -791,7 +791,7 @@ function ttgarden_tag_posttype(): string { $format = get_post_format(); return ( $format ) ? $format : 'text'; } -add_shortcode( 'tag_posttype', 'ttgarden_tag_posttype' ); +add_shortcode( 'ttgarden_tag_posttype', 'ttgarden_tag_posttype' ); /** * Current tag name in a loop. @@ -810,7 +810,7 @@ function ttgarden_tag_tag(): string { return $context['term']->name; } -add_shortcode( 'tag_tag', 'ttgarden_tag_tag' ); +add_shortcode( 'ttgarden_tag_tag', 'ttgarden_tag_tag' ); /** * Current tag name in a loop. @@ -829,7 +829,7 @@ function ttgarden_tag_urlsafetag(): string { return rawurlencode( $context['term']->name ); } -add_shortcode( 'tag_urlsafetag', 'ttgarden_tag_urlsafetag' ); +add_shortcode( 'ttgarden_tag_urlsafetag', 'ttgarden_tag_urlsafetag' ); /** * Current tag url in a loop. @@ -848,8 +848,8 @@ function ttgarden_tag_tagurl(): string { return get_term_link( $context['term'] ); } -add_shortcode( 'tag_tagurl', 'ttgarden_tag_tagurl' ); -add_shortcode( 'tag_tagurlchrono', 'ttgarden_tag_tagurl' ); +add_shortcode( 'ttgarden_tag_tagurl', 'ttgarden_tag_tagurl' ); +add_shortcode( 'ttgarden_tag_tagurlchrono', 'ttgarden_tag_tagurl' ); /** * The total number of comments on a post. @@ -861,7 +861,7 @@ function ttgarden_tag_tagurl(): string { function ttgarden_tag_notecount(): int { return (int) get_comments_number(); } -add_shortcode( 'tag_notecount', 'ttgarden_tag_notecount' ); +add_shortcode( 'ttgarden_tag_notecount', 'ttgarden_tag_notecount' ); /** * The total number of comments on a post in text form. @@ -873,8 +873,8 @@ function ttgarden_tag_notecount(): int { function ttgarden_tag_notecountwithlabel(): string { return get_comments_number_text(); } -add_shortcode( 'tag_notecountwithlabel', 'ttgarden_tag_notecountwithlabel' ); -add_shortcode( 'tag_formattednotecount', 'ttgarden_tag_notecountwithlabel' ); +add_shortcode( 'ttgarden_tag_notecountwithlabel', 'ttgarden_tag_notecountwithlabel' ); +add_shortcode( 'ttgarden_tag_formattednotecount', 'ttgarden_tag_notecountwithlabel' ); /** * The post comments. @@ -904,9 +904,9 @@ function ttgarden_tag_postnotes( $atts ): string { return $comments; } -add_shortcode( 'tag_postnotes', 'ttgarden_tag_postnotes' ); -add_shortcode( 'tag_postnotes-16', 'ttgarden_tag_postnotes' ); -add_shortcode( 'tag_postnotes-64', 'ttgarden_tag_postnotes' ); +add_shortcode( 'ttgarden_tag_postnotes', 'ttgarden_tag_postnotes' ); +add_shortcode( 'ttgarden_tag_postnotes-16', 'ttgarden_tag_postnotes' ); +add_shortcode( 'ttgarden_tag_postnotes-64', 'ttgarden_tag_postnotes' ); /** * The current search query. @@ -918,7 +918,7 @@ function ttgarden_tag_postnotes( $atts ): string { function ttgarden_tag_searchquery(): string { return esc_html( get_search_query() ); } -add_shortcode( 'tag_searchquery', 'ttgarden_tag_searchquery' ); +add_shortcode( 'ttgarden_tag_searchquery', 'ttgarden_tag_searchquery' ); /** * The current search query URL encoded. @@ -930,7 +930,7 @@ function ttgarden_tag_searchquery(): string { function ttgarden_tag_urlsafesearchquery(): string { return rawurlencode( get_search_query() ); } -add_shortcode( 'tag_urlsafesearchquery', 'ttgarden_tag_urlsafesearchquery' ); +add_shortcode( 'ttgarden_tag_urlsafesearchquery', 'ttgarden_tag_urlsafesearchquery' ); /** * The found posts count of the search result. @@ -943,7 +943,7 @@ function ttgarden_tag_searchresultcount(): string { global $wp_query; return $wp_query->found_posts; } -add_shortcode( 'tag_searchresultcount', 'ttgarden_tag_searchresultcount' ); +add_shortcode( 'ttgarden_tag_searchresultcount', 'ttgarden_tag_searchresultcount' ); /** * Quote post content. @@ -963,7 +963,7 @@ function ttgarden_tag_quote(): string { // Empty string if no quote block is found. return ''; } -add_shortcode( 'tag_quote', 'ttgarden_tag_quote' ); +add_shortcode( 'ttgarden_tag_quote', 'ttgarden_tag_quote' ); /** * Quote post source. @@ -982,7 +982,7 @@ function ttgarden_tag_source(): string { return ''; } -add_shortcode( 'tag_source', 'ttgarden_tag_source' ); +add_shortcode( 'ttgarden_tag_source', 'ttgarden_tag_source' ); /** * Quote content length. @@ -1009,7 +1009,7 @@ function ttgarden_tag_length(): string { // Default to long. return 'long'; } -add_shortcode( 'tag_length', 'ttgarden_tag_length' ); +add_shortcode( 'ttgarden_tag_length', 'ttgarden_tag_length' ); /** * Audioplayer HTML. @@ -1028,15 +1028,15 @@ function ttgarden_tag_audioplayer(): string { return ''; } -add_shortcode( 'tag_audioplayer', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioembed', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioembed-640', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioembed-500', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioembed-400', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioembed-250', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioplayerblack', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioplayerwhite', 'ttgarden_tag_audioplayer' ); -add_shortcode( 'tag_audioplayergrey', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioplayer', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioembed', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioembed-640', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioembed-500', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioembed-400', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioembed-250', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioplayerblack', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioplayerwhite', 'ttgarden_tag_audioplayer' ); +add_shortcode( 'ttgarden_tag_audioplayergrey', 'ttgarden_tag_audioplayer' ); /** * Album art URL, uses the featured image if available. @@ -1055,7 +1055,7 @@ function ttgarden_tag_albumarturl(): string { return ''; } -add_shortcode( 'tag_albumarturl', 'ttgarden_tag_albumarturl' ); +add_shortcode( 'ttgarden_tag_albumarturl', 'ttgarden_tag_albumarturl' ); /** * Renders the audio player track name. @@ -1072,7 +1072,7 @@ function ttgarden_tag_trackname(): string { return ''; } -add_shortcode( 'tag_trackname', 'ttgarden_tag_trackname' ); +add_shortcode( 'ttgarden_tag_trackname', 'ttgarden_tag_trackname' ); /** * Renders the audio player artist name. @@ -1089,7 +1089,7 @@ function ttgarden_tag_artist(): string { return ''; } -add_shortcode( 'tag_artist', 'ttgarden_tag_artist' ); +add_shortcode( 'ttgarden_tag_artist', 'ttgarden_tag_artist' ); /** * Renders the audio player album name. @@ -1106,7 +1106,7 @@ function ttgarden_tag_album(): string { return ''; } -add_shortcode( 'tag_album', 'ttgarden_tag_album' ); +add_shortcode( 'ttgarden_tag_album', 'ttgarden_tag_album' ); /** * Renders the audio player media URL if it's external. @@ -1131,8 +1131,8 @@ function ttgarden_tag_externalaudiourl(): string { return ''; } -add_shortcode( 'tag_externalaudiourl', 'ttgarden_tag_externalaudiourl' ); -add_shortcode( 'tag_rawaudiourl', 'ttgarden_tag_externalaudiourl' ); +add_shortcode( 'ttgarden_tag_externalaudiourl', 'ttgarden_tag_externalaudiourl' ); +add_shortcode( 'ttgarden_tag_rawaudiourl', 'ttgarden_tag_externalaudiourl' ); /** * Renders the post gallery if one was found. @@ -1150,13 +1150,13 @@ function ttgarden_tag_photoset(): string { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WP core function. return apply_filters( 'the_content', $context['gallery']['gallery'] ); } -add_shortcode( 'tag_photoset', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-700', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-540', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-500', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-400', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-250', 'ttgarden_tag_photoset' ); -add_shortcode( 'tag_photoset-100', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-700', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-540', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-500', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-400', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-250', 'ttgarden_tag_photoset' ); +add_shortcode( 'ttgarden_tag_photoset-100', 'ttgarden_tag_photoset' ); /** * Renders the post gallery layout if one was found. @@ -1166,7 +1166,7 @@ function ttgarden_tag_photoset(): string { function ttgarden_tag_photosetlayout(): string { return ttgarden_tag_photocount(); } -add_shortcode( 'tag_photosetlayout', 'ttgarden_tag_photosetlayout' ); +add_shortcode( 'ttgarden_tag_photosetlayout', 'ttgarden_tag_photosetlayout' ); /** * Renders the post gallery photo count if one was found. @@ -1183,8 +1183,8 @@ function ttgarden_tag_photocount(): string { return esc_html( $context['gallery']['photocount'] ); } -add_shortcode( 'tag_photocount', 'ttgarden_tag_photocount' ); -add_shortcode( 'tag_photosetlayout', 'ttgarden_tag_photocount' ); +add_shortcode( 'ttgarden_tag_photocount', 'ttgarden_tag_photocount' ); +add_shortcode( 'ttgarden_tag_photosetlayout', 'ttgarden_tag_photocount' ); /** * Renders the post gallery caption if one was found. @@ -1202,7 +1202,7 @@ function ttgarden_tag_caption(): string { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WP core function. return apply_filters( 'the_content', $context[ $format ]['caption'] ); } -add_shortcode( 'tag_caption', 'ttgarden_tag_caption' ); +add_shortcode( 'ttgarden_tag_caption', 'ttgarden_tag_caption' ); /** * Renders the post image URL if one was found. @@ -1232,12 +1232,12 @@ function ttgarden_tag_photourl( $atts, $content, $shortcode_name ): string { return esc_url( $context['image']['image'] ); } -add_shortcode( 'tag_photourl-500', 'ttgarden_tag_photourl' ); -add_shortcode( 'tag_photourl-400', 'ttgarden_tag_photourl' ); -add_shortcode( 'tag_photourl-250', 'ttgarden_tag_photourl' ); -add_shortcode( 'tag_photourl-100', 'ttgarden_tag_photourl' ); -add_shortcode( 'tag_photourl-highres', 'ttgarden_tag_photourl' ); -add_shortcode( 'tag_photourl-75sq', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-500', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-400', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-250', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-100', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-highres', 'ttgarden_tag_photourl' ); +add_shortcode( 'ttgarden_tag_photourl-75sq', 'ttgarden_tag_photourl' ); /** * Renders the post image thumbnail URL if one was found. @@ -1250,14 +1250,14 @@ function ttgarden_tag_photourl( $atts, $content, $shortcode_name ): string { */ function ttgarden_tag_thumbnail( $atts, $content, $shortcode_name ): string { $sizes = array( - 'tag_thumbnail' => 'thumbnail', - 'tag_thumbnail-highres' => 'full', + 'ttgarden_tag_thumbnail' => 'thumbnail', + 'ttgarden_tag_thumbnail-highres' => 'full', ); return get_the_post_thumbnail_url( get_the_id(), $sizes[ $shortcode_name ] ); } -add_shortcode( 'tag_thumbnail', 'ttgarden_tag_thumbnail' ); -add_shortcode( 'tag_thumbnail-highres', 'ttgarden_tag_thumbnail' ); +add_shortcode( 'ttgarden_tag_thumbnail', 'ttgarden_tag_thumbnail' ); +add_shortcode( 'ttgarden_tag_thumbnail-highres', 'ttgarden_tag_thumbnail' ); /** * Renders the post image link URL if one was found. @@ -1290,7 +1290,7 @@ function ttgarden_tag_linkurl(): string { return ''; } -add_shortcode( 'tag_linkurl', 'ttgarden_tag_linkurl' ); +add_shortcode( 'ttgarden_tag_linkurl', 'ttgarden_tag_linkurl' ); /** * Renders the post image link open tag conditionally. @@ -1303,7 +1303,7 @@ function ttgarden_tag_linkopentag(): string { return ( isset( $context['image']['link'] ) && 'none' !== $context['image']['link'] ) ? '' : ''; } -add_shortcode( 'tag_linkopentag', 'ttgarden_tag_linkopentag' ); +add_shortcode( 'ttgarden_tag_linkopentag', 'ttgarden_tag_linkopentag' ); /** * Renders the post image link close tag conditionally. @@ -1315,7 +1315,7 @@ function ttgarden_tag_linkclosetag(): string { return ( isset( $context['image']['link'] ) && 'none' !== $context['image']['link'] ) ? '' : ''; } -add_shortcode( 'tag_linkclosetag', 'ttgarden_tag_linkclosetag' ); +add_shortcode( 'ttgarden_tag_linkclosetag', 'ttgarden_tag_linkclosetag' ); /** * Renders the post image camera exif data if found. @@ -1327,7 +1327,7 @@ function ttgarden_tag_camera(): string { return isset( $context['image']['data']['image_meta']['camera'] ) ? esc_html( $context['image']['data']['image_meta']['camera'] ) : ''; } -add_shortcode( 'tag_camera', 'ttgarden_tag_camera' ); +add_shortcode( 'ttgarden_tag_camera', 'ttgarden_tag_camera' ); /** * Renders the post image lens exif data if found. @@ -1339,7 +1339,7 @@ function ttgarden_tag_aperture(): string { return isset( $context['image']['data']['image_meta']['aperture'] ) ? esc_html( $context['image']['data']['image_meta']['aperture'] ) : ''; } -add_shortcode( 'tag_aperture', 'ttgarden_tag_aperture' ); +add_shortcode( 'ttgarden_tag_aperture', 'ttgarden_tag_aperture' ); /** * Renders the post image focal length exif data if found. @@ -1351,7 +1351,7 @@ function ttgarden_tag_focallength(): string { return isset( $context['image']['data']['image_meta']['focal_length'] ) ? esc_html( $context['image']['data']['image_meta']['focal_length'] ) : ''; } -add_shortcode( 'tag_focallength', 'ttgarden_tag_focallength' ); +add_shortcode( 'ttgarden_tag_focallength', 'ttgarden_tag_focallength' ); /** * Renders the post image shutter speed exif data if found. @@ -1363,7 +1363,7 @@ function ttgarden_tag_exposure(): string { return isset( $context['image']['data']['image_meta']['shutter_speed'] ) ? esc_html( $context['image']['data']['image_meta']['shutter_speed'] ) : ''; } -add_shortcode( 'tag_exposure', 'ttgarden_tag_exposure' ); +add_shortcode( 'ttgarden_tag_exposure', 'ttgarden_tag_exposure' ); /** * Renders the post image alt text if one was found. @@ -1379,7 +1379,7 @@ function ttgarden_tag_photoalt(): string { return esc_attr( get_post_meta( $context['image']['image'], '_wp_attachment_image_alt', true ) ); } -add_shortcode( 'tag_photoalt', 'ttgarden_tag_photoalt' ); +add_shortcode( 'ttgarden_tag_photoalt', 'ttgarden_tag_photoalt' ); /** * Renders the post image width if one was found. @@ -1395,11 +1395,11 @@ function ttgarden_tag_photowidth(): string { return (string) $context['image']['data']['width']; } -add_shortcode( 'tag_photowidth-500', 'ttgarden_tag_photowidth' ); -add_shortcode( 'tag_photowidth-400', 'ttgarden_tag_photowidth' ); -add_shortcode( 'tag_photowidth-250', 'ttgarden_tag_photowidth' ); -add_shortcode( 'tag_photowidth-100', 'ttgarden_tag_photowidth' ); -add_shortcode( 'tag_photowidth-highres', 'ttgarden_tag_photowidth' ); +add_shortcode( 'ttgarden_tag_photowidth-500', 'ttgarden_tag_photowidth' ); +add_shortcode( 'ttgarden_tag_photowidth-400', 'ttgarden_tag_photowidth' ); +add_shortcode( 'ttgarden_tag_photowidth-250', 'ttgarden_tag_photowidth' ); +add_shortcode( 'ttgarden_tag_photowidth-100', 'ttgarden_tag_photowidth' ); +add_shortcode( 'ttgarden_tag_photowidth-highres', 'ttgarden_tag_photowidth' ); /** * Renders the post image height if one was found. @@ -1415,11 +1415,11 @@ function ttgarden_tag_photoheight(): string { return (string) $context['image']['data']['height']; } -add_shortcode( 'tag_photoheight-500', 'ttgarden_tag_photoheight' ); -add_shortcode( 'tag_photoheight-400', 'ttgarden_tag_photoheight' ); -add_shortcode( 'tag_photoheight-250', 'ttgarden_tag_photoheight' ); -add_shortcode( 'tag_photoheight-100', 'ttgarden_tag_photoheight' ); -add_shortcode( 'tag_photoheight-highres', 'ttgarden_tag_photoheight' ); +add_shortcode( 'ttgarden_tag_photoheight-500', 'ttgarden_tag_photoheight' ); +add_shortcode( 'ttgarden_tag_photoheight-400', 'ttgarden_tag_photoheight' ); +add_shortcode( 'ttgarden_tag_photoheight-250', 'ttgarden_tag_photoheight' ); +add_shortcode( 'ttgarden_tag_photoheight-100', 'ttgarden_tag_photoheight' ); +add_shortcode( 'ttgarden_tag_photoheight-highres', 'ttgarden_tag_photoheight' ); /** * Renders the post video player. @@ -1436,15 +1436,15 @@ function ttgarden_tag_video(): string { return ''; } -add_shortcode( 'tag_video-700', 'ttgarden_tag_video' ); -add_shortcode( 'tag_video-540', 'ttgarden_tag_video' ); -add_shortcode( 'tag_video-500', 'ttgarden_tag_video' ); -add_shortcode( 'tag_video-400', 'ttgarden_tag_video' ); -add_shortcode( 'tag_video-250', 'ttgarden_tag_video' ); -add_shortcode( 'tag_videoembed-700', 'ttgarden_tag_video' ); -add_shortcode( 'tag_videoembed-500', 'ttgarden_tag_video' ); -add_shortcode( 'tag_videoembed-400', 'ttgarden_tag_video' ); -add_shortcode( 'tag_videoembed-250', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_video-700', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_video-540', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_video-500', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_video-400', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_video-250', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_videoembed-700', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_videoembed-500', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_videoembed-400', 'ttgarden_tag_video' ); +add_shortcode( 'ttgarden_tag_videoembed-250', 'ttgarden_tag_video' ); /** * Renders the post video thumbnail URL. @@ -1461,7 +1461,7 @@ function ttgarden_tag_videothumbnailurl(): string { return ''; } -add_shortcode( 'tag_videothumbnailurl', 'ttgarden_tag_videothumbnailurl' ); +add_shortcode( 'ttgarden_tag_videothumbnailurl', 'ttgarden_tag_videothumbnailurl' ); /** * The link post type title (This is also the link URL). @@ -1475,7 +1475,7 @@ function ttgarden_tag_name(): string { return get_the_author(); } -add_shortcode( 'tag_name', 'ttgarden_tag_name' ); +add_shortcode( 'ttgarden_tag_name', 'ttgarden_tag_name' ); /** * Renders the link post host url. @@ -1501,7 +1501,7 @@ function ttgarden_tag_host(): string { // Return the host of the URL. return esc_url( $parsed_url['host'] ); } -add_shortcode( 'tag_host', 'ttgarden_tag_host' ); +add_shortcode( 'ttgarden_tag_host', 'ttgarden_tag_host' ); /** * Returns the day of the month without leading zeros. @@ -1513,7 +1513,7 @@ function ttgarden_tag_host(): string { function ttgarden_tag_dayofmonth(): string { return get_the_date( 'j' ); } -add_shortcode( 'tag_dayofmonth', 'ttgarden_tag_dayofmonth' ); +add_shortcode( 'ttgarden_tag_dayofmonth', 'ttgarden_tag_dayofmonth' ); /** * Returns the day of the month with leading zeros. @@ -1525,7 +1525,7 @@ function ttgarden_tag_dayofmonth(): string { function ttgarden_tag_dayofmonthwithzero(): string { return get_the_date( 'd' ); } -add_shortcode( 'tag_dayofmonthwithzero', 'ttgarden_tag_dayofmonthwithzero' ); +add_shortcode( 'ttgarden_tag_dayofmonthwithzero', 'ttgarden_tag_dayofmonthwithzero' ); /** * Returns the full name of the day of the week. @@ -1537,7 +1537,7 @@ function ttgarden_tag_dayofmonthwithzero(): string { function ttgarden_tag_dayofweek(): string { return get_the_date( 'l' ); } -add_shortcode( 'tag_dayofweek', 'ttgarden_tag_dayofweek' ); +add_shortcode( 'ttgarden_tag_dayofweek', 'ttgarden_tag_dayofweek' ); /** * Returns the abbreviated name of the day of the week. @@ -1549,7 +1549,7 @@ function ttgarden_tag_dayofweek(): string { function ttgarden_tag_shortdayofweek(): string { return get_the_date( 'D' ); } -add_shortcode( 'tag_shortdayofweek', 'ttgarden_tag_shortdayofweek' ); +add_shortcode( 'ttgarden_tag_shortdayofweek', 'ttgarden_tag_shortdayofweek' ); /** * Returns the day of the week as a number (1 for Monday, 7 for Sunday). @@ -1561,7 +1561,7 @@ function ttgarden_tag_shortdayofweek(): string { function ttgarden_tag_dayofweeknumber(): string { return get_the_date( 'N' ); } -add_shortcode( 'tag_dayofweeknumber', 'ttgarden_tag_dayofweeknumber' ); +add_shortcode( 'ttgarden_tag_dayofweeknumber', 'ttgarden_tag_dayofweeknumber' ); /** * Returns the English ordinal suffix for the day of the month. @@ -1573,7 +1573,7 @@ function ttgarden_tag_dayofweeknumber(): string { function ttgarden_tag_dayofmonthsuffix(): string { return get_the_date( 'S' ); } -add_shortcode( 'tag_dayofmonthsuffix', 'ttgarden_tag_dayofmonthsuffix' ); +add_shortcode( 'ttgarden_tag_dayofmonthsuffix', 'ttgarden_tag_dayofmonthsuffix' ); /** * Returns the day of the month with the English ordinal suffix. @@ -1607,7 +1607,7 @@ function ttgarden_tag_formattedtime(): string { function ttgarden_tag_dayofyear(): string { return get_the_date( 'z' ) + 1; // Adding 1 because PHP date 'z' is zero-indexed } -add_shortcode( 'tag_dayofyear', 'ttgarden_tag_dayofyear' ); +add_shortcode( 'ttgarden_tag_dayofyear', 'ttgarden_tag_dayofyear' ); /** * Returns the week of the year (1 to 53). @@ -1619,7 +1619,7 @@ function ttgarden_tag_dayofyear(): string { function ttgarden_tag_weekofyear(): string { return get_the_date( 'W' ); } -add_shortcode( 'tag_weekofyear', 'ttgarden_tag_weekofyear' ); +add_shortcode( 'ttgarden_tag_weekofyear', 'ttgarden_tag_weekofyear' ); /** * Returns the full name of the current month. @@ -1631,7 +1631,7 @@ function ttgarden_tag_weekofyear(): string { function ttgarden_tag_month(): string { return get_the_date( 'F' ); } -add_shortcode( 'tag_month', 'ttgarden_tag_month' ); +add_shortcode( 'ttgarden_tag_month', 'ttgarden_tag_month' ); /** * Returns the abbreviated name of the current month. @@ -1643,7 +1643,7 @@ function ttgarden_tag_month(): string { function ttgarden_tag_shortmonth(): string { return get_the_date( 'M' ); } -add_shortcode( 'tag_shortmonth', 'ttgarden_tag_shortmonth' ); +add_shortcode( 'ttgarden_tag_shortmonth', 'ttgarden_tag_shortmonth' ); /** * Returns the numeric representation of the month without leading zeros. @@ -1655,7 +1655,7 @@ function ttgarden_tag_shortmonth(): string { function ttgarden_tag_monthnumber(): string { return get_the_date( 'n' ); } -add_shortcode( 'tag_monthnumber', 'ttgarden_tag_monthnumber' ); +add_shortcode( 'ttgarden_tag_monthnumber', 'ttgarden_tag_monthnumber' ); /** * Returns the numeric representation of the month with leading zeros. @@ -1667,7 +1667,7 @@ function ttgarden_tag_monthnumber(): string { function ttgarden_tag_monthnumberwithzero(): string { return get_the_date( 'm' ); } -add_shortcode( 'tag_monthnumberwithzero', 'ttgarden_tag_monthnumberwithzero' ); +add_shortcode( 'ttgarden_tag_monthnumberwithzero', 'ttgarden_tag_monthnumberwithzero' ); /** * Returns the full numeric representation of the year (e.g., 2024). @@ -1679,7 +1679,7 @@ function ttgarden_tag_monthnumberwithzero(): string { function ttgarden_tag_year(): string { return get_the_date( 'Y' ); } -add_shortcode( 'tag_year', 'ttgarden_tag_year' ); +add_shortcode( 'ttgarden_tag_year', 'ttgarden_tag_year' ); /** * Returns the last two digits of the year (e.g., 24 for 2024). @@ -1691,7 +1691,7 @@ function ttgarden_tag_year(): string { function ttgarden_tag_shortyear(): string { return get_the_date( 'y' ); } -add_shortcode( 'tag_shortyear', 'ttgarden_tag_shortyear' ); +add_shortcode( 'ttgarden_tag_shortyear', 'ttgarden_tag_shortyear' ); /** * Returns lowercase 'am' or 'pm' based on the time. @@ -1703,7 +1703,7 @@ function ttgarden_tag_shortyear(): string { function ttgarden_tag_ampm(): string { return get_the_date( 'a' ); } -add_shortcode( 'tag_ampm', 'ttgarden_tag_ampm' ); +add_shortcode( 'ttgarden_tag_ampm', 'ttgarden_tag_ampm' ); /** * Returns uppercase 'AM' or 'PM' based on the time. @@ -1715,7 +1715,7 @@ function ttgarden_tag_ampm(): string { function ttgarden_tag_capitalampm(): string { return get_the_date( 'A' ); } -add_shortcode( 'tag_capitalampm', 'ttgarden_tag_capitalampm' ); +add_shortcode( 'ttgarden_tag_capitalampm', 'ttgarden_tag_capitalampm' ); /** * Returns the hour in 12-hour format without leading zeros. @@ -1727,7 +1727,7 @@ function ttgarden_tag_capitalampm(): string { function ttgarden_tag_12hour(): string { return get_the_date( 'g' ); } -add_shortcode( 'tag_12hour', 'ttgarden_tag_12hour' ); +add_shortcode( 'ttgarden_tag_12hour', 'ttgarden_tag_12hour' ); /** * Returns the hour in 24-hour format without leading zeros. @@ -1739,7 +1739,7 @@ function ttgarden_tag_12hour(): string { function ttgarden_tag_24hour(): string { return get_the_date( 'G' ); } -add_shortcode( 'tag_24hour', 'ttgarden_tag_24hour' ); +add_shortcode( 'ttgarden_tag_24hour', 'ttgarden_tag_24hour' ); /** * Returns the hour in 12-hour format with leading zeros. @@ -1751,7 +1751,7 @@ function ttgarden_tag_24hour(): string { function ttgarden_tag_12hourwithzero(): string { return get_the_date( 'h' ); } -add_shortcode( 'tag_12hourwithzero', 'ttgarden_tag_12hourwithzero' ); +add_shortcode( 'ttgarden_tag_12hourwithzero', 'ttgarden_tag_12hourwithzero' ); /** * Returns the hour in 24-hour format with leading zeros. @@ -1763,7 +1763,7 @@ function ttgarden_tag_12hourwithzero(): string { function ttgarden_tag_24hourwithzero(): string { return get_the_date( 'H' ); } -add_shortcode( 'tag_24hourwithzero', 'ttgarden_tag_24hourwithzero' ); +add_shortcode( 'ttgarden_tag_24hourwithzero', 'ttgarden_tag_24hourwithzero' ); /** * Returns the minutes with leading zeros. @@ -1775,7 +1775,7 @@ function ttgarden_tag_24hourwithzero(): string { function ttgarden_tag_minutes(): string { return get_the_date( 'i' ); } -add_shortcode( 'tag_minutes', 'ttgarden_tag_minutes' ); +add_shortcode( 'ttgarden_tag_minutes', 'ttgarden_tag_minutes' ); /** * Returns the seconds with leading zeros. @@ -1787,7 +1787,7 @@ function ttgarden_tag_minutes(): string { function ttgarden_tag_seconds(): string { return get_the_date( 's' ); } -add_shortcode( 'tag_seconds', 'ttgarden_tag_seconds' ); +add_shortcode( 'ttgarden_tag_seconds', 'ttgarden_tag_seconds' ); /** * Returns the Swatch Internet Time (.beats). @@ -1799,7 +1799,7 @@ function ttgarden_tag_seconds(): string { function ttgarden_tag_beats(): string { return get_the_date( 'B' ); } -add_shortcode( 'tag_beats', 'ttgarden_tag_beats' ); +add_shortcode( 'ttgarden_tag_beats', 'ttgarden_tag_beats' ); /** * Returns the Unix timestamp of the post. @@ -1811,7 +1811,7 @@ function ttgarden_tag_beats(): string { function ttgarden_tag_timestamp(): string { return get_the_date( 'U' ); } -add_shortcode( 'tag_timestamp', 'ttgarden_tag_timestamp' ); +add_shortcode( 'ttgarden_tag_timestamp', 'ttgarden_tag_timestamp' ); /** * Returns the time difference between the post date and now, in human-readable format. @@ -1826,7 +1826,7 @@ function ttgarden_tag_timeago(): string { $time_diff = human_time_diff( $post_time, $current_time ); return sprintf( '%s ago', $time_diff ); } -add_shortcode( 'tag_timeago', 'ttgarden_tag_timeago' ); +add_shortcode( 'ttgarden_tag_timeago', 'ttgarden_tag_timeago' ); /** * Returns the noun of the current post type. @@ -1837,7 +1837,7 @@ function ttgarden_tag_posttypenoun(): string { $format = get_post_format(); return ucfirst( ( $format ) ? $format : 'post' ); } -add_shortcode( 'tag_posttypenoun', 'ttgarden_tag_posttypenoun' ); +add_shortcode( 'ttgarden_tag_posttypenoun', 'ttgarden_tag_posttypenoun' ); /** * Creates a WordPress.com reblog URL for the current post. @@ -1852,7 +1852,7 @@ function ttgarden_tag_reblogurl(): string { ) ); } -add_shortcode( 'tag_reblogurl', 'ttgarden_tag_reblogurl' ); +add_shortcode( 'ttgarden_tag_reblogurl', 'ttgarden_tag_reblogurl' ); /** * Creates a like iFrame for the current post. Relies on Jetpack's like button. @@ -1926,7 +1926,7 @@ public function __construct( $id ) { $data_title ); } -add_shortcode( 'tag_likebutton', 'ttgarden_tag_likebutton' ); +add_shortcode( 'ttgarden_tag_likebutton', 'ttgarden_tag_likebutton' ); /** * Returns a URL to the post comments HTML partial. @@ -1939,4 +1939,4 @@ function ttgarden_tag_postnotesurl(): string { get_the_ID() ); } -add_shortcode( 'tag_postnotesurl', 'ttgarden_tag_postnotesurl' ); +add_shortcode( 'ttgarden_tag_postnotesurl', 'ttgarden_tag_postnotesurl' ); diff --git a/includes/tumblr-theme-language/missing-blocks.php b/includes/tumblr-theme-language/missing-blocks.php index e2ba162..9509392 100644 --- a/includes/tumblr-theme-language/missing-blocks.php +++ b/includes/tumblr-theme-language/missing-blocks.php @@ -94,56 +94,56 @@ * @see https://www.tumblr.com/docs/en/custom_themes#content-sources */ return array( - 'block_playcount', - 'block_panorama', - 'block_sharefollowing', - 'block_followingpage', - 'block_following', - 'block_followed', - 'block_hashighlightedposts', - 'block_highlightedposts', - 'block_hasrelatedtags', - 'block_relatedtags', - 'block_relatedposts', - 'block_submissionsenabled', - 'block_submission', - 'block_submitpage', - 'block_submitenabled', - 'block_askenabled', - 'block_askpage', - 'block_answerer', - 'block_likes', - 'block_nolikes', - 'block_haslikedposts', - 'block_likedposts', - 'block_likespage', - 'block_reblog', - 'block_reblogs', - 'block_rebloggedfrom', - 'block_rebloggedfromreblog', - 'block_isoriginalentry', - 'block_isactive', - 'block_isdeactivated', - 'block_haspermalink', - 'block_hasnopermalink', - 'block_hasavatar', - 'block_daypagination', - 'block_previousdaypage', - 'block_nextdaypage', - 'block_newdaydate', - 'block_samedaydate', - 'block_contentsource', - 'block_sourcelogo', - 'block_nosourcelogo', - 'block_showadsonthispage', - 'block_newcta', - 'block_nuopticablogcardsenabled', - 'block_nuopticablogcardsdisabled', - 'block_supplylogging', - 'block_actions', - 'block_livephoto', - 'block_blogs', - 'block_nofollowing', - 'block_answer', - 'block_taggedpage', + 'ttgarden_block_playcount', + 'ttgarden_block_panorama', + 'ttgarden_block_sharefollowing', + 'ttgarden_block_followingpage', + 'ttgarden_block_following', + 'ttgarden_block_followed', + 'ttgarden_block_hashighlightedposts', + 'ttgarden_block_highlightedposts', + 'ttgarden_block_hasrelatedtags', + 'ttgarden_block_relatedtags', + 'ttgarden_block_relatedposts', + 'ttgarden_block_submissionsenabled', + 'ttgarden_block_submission', + 'ttgarden_block_submitpage', + 'ttgarden_block_submitenabled', + 'ttgarden_block_askenabled', + 'ttgarden_block_askpage', + 'ttgarden_block_answerer', + 'ttgarden_block_likes', + 'ttgarden_block_nolikes', + 'ttgarden_block_haslikedposts', + 'ttgarden_block_likedposts', + 'ttgarden_block_likespage', + 'ttgarden_block_reblog', + 'ttgarden_block_reblogs', + 'ttgarden_block_rebloggedfrom', + 'ttgarden_block_rebloggedfromreblog', + 'ttgarden_block_isoriginalentry', + 'ttgarden_block_isactive', + 'ttgarden_block_isdeactivated', + 'ttgarden_block_haspermalink', + 'ttgarden_block_hasnopermalink', + 'ttgarden_block_hasavatar', + 'ttgarden_block_daypagination', + 'ttgarden_block_previousdaypage', + 'ttgarden_block_nextdaypage', + 'ttgarden_block_newdaydate', + 'ttgarden_block_samedaydate', + 'ttgarden_block_contentsource', + 'ttgarden_block_sourcelogo', + 'ttgarden_block_nosourcelogo', + 'ttgarden_block_showadsonthispage', + 'ttgarden_block_newcta', + 'ttgarden_block_nuopticablogcardsenabled', + 'ttgarden_block_nuopticablogcardsdisabled', + 'ttgarden_block_supplylogging', + 'ttgarden_block_actions', + 'ttgarden_block_livephoto', + 'ttgarden_block_blogs', + 'ttgarden_block_nofollowing', + 'ttgarden_block_answer', + 'ttgarden_block_taggedpage', ); diff --git a/includes/tumblr-theme-language/missing-tags.php b/includes/tumblr-theme-language/missing-tags.php index 8e71353..9059f29 100644 --- a/includes/tumblr-theme-language/missing-tags.php +++ b/includes/tumblr-theme-language/missing-tags.php @@ -8,92 +8,92 @@ defined( 'ABSPATH' ) || exit; return array( - 'tag_playcount', - 'tag_formattedplaycount', - 'tag_playcountwithlabel', - 'tag_photourl-panorama', - 'tag_photowidth-panorama', - 'tag_photoheight-panorama', - 'tag_followedname', - 'tag_followedtitle', - 'tag_followedurl', - 'tag_followedportraiturl-16', - 'tag_followedportraiturl-24', - 'tag_followedportraiturl-30', - 'tag_followedportraiturl-40', - 'tag_followedportraiturl-48', - 'tag_followedportraiturl-64', - 'tag_followedportraiturl-96', - 'tag_followedportraiturl-128', - 'tag_submitlabel', - 'tag_submitter', - 'tag_submitterurl', - 'tag_submitterportraiturl-16', - 'tag_submitterportraiturl-24', - 'tag_submitterportraiturl-30', - 'tag_submitterportraiturl-40', - 'tag_submitterportraiturl-48', - 'tag_submitterportraiturl-64', - 'tag_submitterportraiturl-96', - 'tag_submitterportraiturl-128', - 'tag_question', - 'tag_asker', - 'tag_askerportraiturl-16', - 'tag_askerportraiturl-24', - 'tag_askerportraiturl-30', - 'tag_askerportraiturl-40', - 'tag_askerportraiturl-48', - 'tag_askerportraiturl-64', - 'tag_askerportraiturl-96', - 'tag_askerportraiturl-128', - 'tag_answerer', - 'tag_answererportraiturl-16', - 'tag_answererportraiturl-24', - 'tag_answererportraiturl-30', - 'tag_answererportraiturl-40', - 'tag_answererportraiturl-48', - 'tag_answererportraiturl-64', - 'tag_answererportraiturl-96', - 'tag_answererportraiturl-128', - 'tag_asklabel', - 'tag_answer', - 'tag_replies', - 'tag_likes', - 'tag_reblogparentname', - 'tag_reblogparenttitle', - 'tag_reblogparenturl', - 'tag_reblogparentportraiturl-16', - 'tag_reblogparentportraiturl-24', - 'tag_reblogparentportraiturl-30', - 'tag_reblogparentportraiturl-40', - 'tag_reblogparentportraiturl-48', - 'tag_reblogparentportraiturl-64', - 'tag_reblogparentportraiturl-96', - 'tag_reblogparentportraiturl-128', - 'tag_reblogrootname', - 'tag_reblogroottitle', - 'tag_reblogrooturl', - 'tag_reblogrootportraiturl-16', - 'tag_reblogrootportraiturl-24', - 'tag_reblogrootportraiturl-30', - 'tag_reblogrootportraiturl-40', - 'tag_reblogrootportraiturl-48', - 'tag_reblogrootportraiturl-64', - 'tag_reblogrootportraiturl-96', - 'tag_reblogrootportraiturl-128', - 'tag_reblogbutton', - 'tag_username', - 'tag_previousdaypage', - 'tag_nextdaypage', - 'tag_blacklogourl', - 'tag_logowidth', - 'tag_logoheight', - 'tag_sourceurl', - 'tag_sourcetitle', - 'tag_posttypographystyles', - 'tag_newpoststyles', - 'tag_mobileappheaders', - 'tag_positions', - 'tag_livephotourl', - 'tag_livephotostillimagetime', + 'ttgarden_tag_playcount', + 'ttgarden_tag_formattedplaycount', + 'ttgarden_tag_playcountwithlabel', + 'ttgarden_tag_photourl-panorama', + 'ttgarden_tag_photowidth-panorama', + 'ttgarden_tag_photoheight-panorama', + 'ttgarden_tag_followedname', + 'ttgarden_tag_followedtitle', + 'ttgarden_tag_followedurl', + 'ttgarden_tag_followedportraiturl-16', + 'ttgarden_tag_followedportraiturl-24', + 'ttgarden_tag_followedportraiturl-30', + 'ttgarden_tag_followedportraiturl-40', + 'ttgarden_tag_followedportraiturl-48', + 'ttgarden_tag_followedportraiturl-64', + 'ttgarden_tag_followedportraiturl-96', + 'ttgarden_tag_followedportraiturl-128', + 'ttgarden_tag_submitlabel', + 'ttgarden_tag_submitter', + 'ttgarden_tag_submitterurl', + 'ttgarden_tag_submitterportraiturl-16', + 'ttgarden_tag_submitterportraiturl-24', + 'ttgarden_tag_submitterportraiturl-30', + 'ttgarden_tag_submitterportraiturl-40', + 'ttgarden_tag_submitterportraiturl-48', + 'ttgarden_tag_submitterportraiturl-64', + 'ttgarden_tag_submitterportraiturl-96', + 'ttgarden_tag_submitterportraiturl-128', + 'ttgarden_tag_question', + 'ttgarden_tag_asker', + 'ttgarden_tag_askerportraiturl-16', + 'ttgarden_tag_askerportraiturl-24', + 'ttgarden_tag_askerportraiturl-30', + 'ttgarden_tag_askerportraiturl-40', + 'ttgarden_tag_askerportraiturl-48', + 'ttgarden_tag_askerportraiturl-64', + 'ttgarden_tag_askerportraiturl-96', + 'ttgarden_tag_askerportraiturl-128', + 'ttgarden_tag_answerer', + 'ttgarden_tag_answererportraiturl-16', + 'ttgarden_tag_answererportraiturl-24', + 'ttgarden_tag_answererportraiturl-30', + 'ttgarden_tag_answererportraiturl-40', + 'ttgarden_tag_answererportraiturl-48', + 'ttgarden_tag_answererportraiturl-64', + 'ttgarden_tag_answererportraiturl-96', + 'ttgarden_tag_answererportraiturl-128', + 'ttgarden_tag_asklabel', + 'ttgarden_tag_answer', + 'ttgarden_tag_replies', + 'ttgarden_tag_likes', + 'ttgarden_tag_reblogparentname', + 'ttgarden_tag_reblogparenttitle', + 'ttgarden_tag_reblogparenturl', + 'ttgarden_tag_reblogparentportraiturl-16', + 'ttgarden_tag_reblogparentportraiturl-24', + 'ttgarden_tag_reblogparentportraiturl-30', + 'ttgarden_tag_reblogparentportraiturl-40', + 'ttgarden_tag_reblogparentportraiturl-48', + 'ttgarden_tag_reblogparentportraiturl-64', + 'ttgarden_tag_reblogparentportraiturl-96', + 'ttgarden_tag_reblogparentportraiturl-128', + 'ttgarden_tag_reblogrootname', + 'ttgarden_tag_reblogroottitle', + 'ttgarden_tag_reblogrooturl', + 'ttgarden_tag_reblogrootportraiturl-16', + 'ttgarden_tag_reblogrootportraiturl-24', + 'ttgarden_tag_reblogrootportraiturl-30', + 'ttgarden_tag_reblogrootportraiturl-40', + 'ttgarden_tag_reblogrootportraiturl-48', + 'ttgarden_tag_reblogrootportraiturl-64', + 'ttgarden_tag_reblogrootportraiturl-96', + 'ttgarden_tag_reblogrootportraiturl-128', + 'ttgarden_tag_reblogbutton', + 'ttgarden_tag_username', + 'ttgarden_tag_previousdaypage', + 'ttgarden_tag_nextdaypage', + 'ttgarden_tag_blacklogourl', + 'ttgarden_tag_logowidth', + 'ttgarden_tag_logoheight', + 'ttgarden_tag_sourceurl', + 'ttgarden_tag_sourcetitle', + 'ttgarden_tag_posttypographystyles', + 'ttgarden_tag_newpoststyles', + 'ttgarden_tag_mobileappheaders', + 'ttgarden_tag_positions', + 'ttgarden_tag_livephotourl', + 'ttgarden_tag_livephotostillimagetime', ); diff --git a/src/Parser.php b/src/Parser.php index 3f083bc..d8756c3 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -204,7 +204,7 @@ function ( $matches ) use ( $tags, $blocks, $options, $modifiers ) { $block_parts = explode( ' ', trim( $raw_tag ) ); if ( in_array( ltrim( $block_parts[0], '/' ), $blocks, true ) ) { - return '[' . str_replace( 'block:', 'block_', $raw_tag ) . ']'; + return '[' . str_replace( 'block:', 'ttgarden_block_', $raw_tag ) . ']'; } // False positive. @@ -249,7 +249,7 @@ function ( $matches ) use ( $tags, $blocks, $options, $modifiers ) { // Verify the tag against our array of known tags. if ( in_array( ltrim( $trim_tag, '/' ), $tags, true ) ) { - $shortcode = 'tag_' . $trim_tag; + $shortcode = 'ttgarden_tag_' . $trim_tag; $attributes = $applied_modifier ? "modifier=\"$applied_modifier\"" : ''; return ( ! empty( $attributes ) ) ? "[{$shortcode} {$attributes}]" : "[{$shortcode}]"; @@ -318,12 +318,12 @@ public function language_helper( $key ): string { // Check if the key contains a supported keyword, if so, return the shortcode to process the keyword. foreach ( $this->supported_keywords as $keyword => $callback ) { if ( false !== strpos( $key, $keyword ) ) { - return '[tag_lang key="' . $key . '"]'; + return '[ttgarden_tag_lang key="' . $key . '"]'; } } // If no keywords are found, return the shortcode with a set value. - return '[tag_lang value="' . TTGARDEN_LANG[ $key ] . '"]'; + return '[ttgarden_tag_lang value="' . TTGARDEN_LANG[ $key ] . '"]'; } /** @@ -347,7 +347,7 @@ public function boolean_helper( $boolean ): string { ); // Create the shortcode name. - $shortcode = 'block_' . $condition . '_' . $normalized_attr; + $shortcode = 'ttgarden_block_' . $condition . '_' . $normalized_attr; // Register the new shortcode on the fly. add_shortcode( $shortcode, 'ttgarden_block_' . $condition . '_theme_option' );