array(), 'insights' => array(), 'notes' => '', 'pdf_attached' => false, 'pdf_error' => '', 'share_url' => '', 'share_expires' => 0, ); $tly_d = $args['data']; $tly_color = $args['color']; $tly_font = 'font-family:-apple-system,BlinkMacSystemFont,\'Segoe UI\',Roboto,Helvetica,Arial,sans-serif;'; /** * Prints a section heading, with an optional hint on the right. * * @param string $title Title. * @param string $hint Hint. */ $tly_h = static function ( $title, $hint = '' ) use ( $tly_font ) { ?>
0 ? '▲ ' : ( $dir < 0 ? '▼ ' : '' ) ) . ReportCards::unsigned( $change['text'] ); printf( '%5$s', esc_attr( $tly_font ), esc_attr( Document::tint( $change['color'], 0.88 ) ), esc_attr( $change['color'] ), (int) $size, esc_html( $text ) ); }; /** * Prints a small tinted pill, e.g. "10 improved". * * @param string $text Text. * @param string $color Colour. */ $tly_pill = static function ( $text, $color ) { printf( '%3$s', esc_attr( Document::tint( $color, 0.88 ) ), esc_attr( $color ), esc_html( $text ) ); }; /** * Prints a horizontal bar on a grey track. * * @param float $share 0–1. * @param string $color Colour. */ $tly_bar = static function ( $share, $color ) { $pct = (int) round( max( 0, min( 1, (float) $share ) ) * 100 ); $pct = $share > 0 ? max( 3, $pct ) : 0; echo ''; if ( $pct > 0 ) { printf( '', (int) $pct, esc_attr( $color ) ); } if ( $pct < 100 ) { echo ''; } echo '
  
'; }; /** * Opens a white card with a title (and a colour mark and hint). * * @param string $title Title. * @param string $hint Hint on the right. * @param string|null $mark Colour of the small square before the title. * @param int $top Space above. */ $tly_card_open = static function ( $title, $hint = '', $mark = null, $top = 12 ) use ( $tly_font ) { ?>
  <?php echo esc_html( $args['site']->display_name() . ' · ' . $args['label'] ); ?>
email['note'] ) : ?> Format::GOOD, Insights::DECLINED => Format::BAD, Insights::ACTION => $tly_color, ); $tly_card_open( __( 'Highlights', 'turtlereport' ), __( 'What changed this period, then suggested next steps', 'turtlereport' ), null, 18 ); $tly_first = true; foreach ( Insights::headings() as $tly_kind => $tly_heading ) : if ( ! $tly_groups[ $tly_kind ] ) { continue; } ?>
● 
$tly_s ) : $tly_card_open( $tly_s['title'], $tly_s['hint'], $tly_s['color'], 0 === $tly_i ? 0 : 12 ); ?>
<?php echo esc_attr( $args['brand'] ); ?>
display_name() ); ?>
•
email['note'] ) ); ?>
$tly_r ) : ?>
0 ? abs( (float) $tly_b['value'] ) / $tly_max : 0, $tly_s['color'] ); ?>
__( 'Search performance', 'turtlereport' ), /* translators: %s: what the site calls its conversions, e.g. Leads. */ 'conversions' => sprintf( __( '%s from organic search', 'turtlereport' ), $args['site']->conversion_label() ), 'traffic' => __( 'Website traffic', 'turtlereport' ), 'ai' => __( 'AI assistant traffic', 'turtlereport' ), 'business' => __( 'Google Business Profile', 'turtlereport' ), ) as $tly_key => $tly_title ) : if ( isset( $tly_d[ $tly_key ]['error'] ) ) : $tly_card_open( $tly_title, '', '#c03a2b', 12 ); ?>
0 ? abs( (float) $tly_m['delta'] ) / $tly_max : 0, $tly_list[2] ); ?> 0 ? '+' : '−' ) . Format::number( abs( $tly_m['delta'] ) ) ); ?>