%' => '', '%%term404%%' => '', '%%ct_desc_[^%]*%%' => '' */ ]; if ( $postType ) { $postType = get_post_type_object( $postType ); if ( ! empty( $postType ) ) { $macros += [ '%%pt_single%%' => $postType->labels->singular_name, '%%pt_plural%%' => $postType->labels->name, ]; } } switch ( $pageType ) { case 'archive': $macros['%%title%%'] = '#archive_title'; break; case 'term': $macros['%%title%%'] = '#taxonomy_title'; break; default: $macros['%%title%%'] = '#post_title'; break; } // Strip all other tags. $macros['%%[^%]*%%'] = ''; return $macros; } }