PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.7
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.7
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / src / class-admin-chrome-logo.php

class-admin-chrome-logo.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.7, at src/class-admin-chrome-logo.php

44 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Jetpack logo mark shared by the admin chrome.
4 *
5 * @package automattic/jetpack
6 */
7
8 namespace Automattic\Jetpack\Plugin;
9
10 /**
11 * Renders the green Jetpack mark used by the admin masthead and footers.
12 *
13 * In `src/` rather than on `Jetpack_Admin_Page` for the reason `Footer_Links` documents.
14 */
15 class Admin_Chrome_Logo {
16
17 /**
18 * Render the green Jetpack mark.
19 *
20 * Pass a label only where the mark is the element's accessible name. Beside visible
21 * "Jetpack" text it is decorative, and a second announcement is noise.
22 *
23 * @since 16.3
24 *
25 * @param int $height Pixel height.
26 * @param string $class Optional class attribute.
27 * @param string $label Optional accessible name. Empty renders the mark as decorative.
28 * @return string SVG markup.
29 */
30 public static function render( $height, $class = '', $label = '' ) {
31 $attributes = ' height="' . (int) $height . '"';
32
33 if ( '' !== $class ) {
34 $attributes .= ' class="' . esc_attr( $class ) . '"';
35 }
36
37 $attributes .= '' !== $label
38 ? ' role="img" aria-label="' . esc_attr( $label ) . '"'
39 : ' aria-hidden="true"';
40
41 return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"' . $attributes . '><path fill="#069e08" d="M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"></path></svg>';
42 }
43 }
44