Changeset 43842 for branches/5.0/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php
- Timestamp:
- 10/30/2018 02:13:07 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php
r43808 r43842 5 5 * @package WordPress 6 6 * @subpackage Twenty_Nineteen 7 * @since 1.0.0 7 8 */ 8 9 … … 33 34 } 34 35 if ( array_key_exists( $icon, $arr ) ) { 35 $repl = sprintf( '<svg id="%s-icon-%s" class="svg-icon" width="%d" height="%d" aria-hidden="true" role="img" ', $group, $icon, $size, $size );36 $repl = sprintf( '<svg class="svg-icon" width="%d" height="%d" aria-hidden="true" role="img" focusable="false" ', $size, $size ); 36 37 $svg = preg_replace( '/^<svg /', $repl, trim( $arr[ $icon ] ) ); // Add extra attributes to SVG code. 37 38 $svg = preg_replace( "/([\n\t]+)/", ' ', $svg ); // Remove newlines & tabs. … … 71 72 */ 72 73 static $ui_icons = array( 73 'link' => /* material-design – link */ '74 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">74 'link' => /* material-design – link */ ' 75 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 75 76 <path d="M0 0h24v24H0z" fill="none"/> 76 77 <path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/> 77 78 </svg>', 78 79 79 'watch' => /* material-design – watch-later */ '80 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">80 'watch' => /* material-design – watch-later */ ' 81 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 81 82 <defs> 82 83 <path id="a" d="M0 0h24v24H0V0z"/> … … 88 89 </svg>', 89 90 90 'archive' => /* material-design – folder */ '91 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">91 'archive' => /* material-design – folder */ ' 92 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 92 93 <path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/> 93 94 <path d="M0 0h24v24H0z" fill="none"/> 94 95 </svg>', 95 96 96 'tag' => /* material-design – local_offer */ '97 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">97 'tag' => /* material-design – local_offer */ ' 98 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 98 99 <path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"/> 99 100 <path d="M0 0h24v24H0z" fill="none"/> 100 101 </svg>', 101 102 102 'comment' => /* material-design – comment */ '103 'comment' => /* material-design – comment */ ' 103 104 <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 104 105 <path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/> … … 106 107 </svg>', 107 108 108 'person' => /* material-design – person */ '109 'person' => /* material-design – person */ ' 109 110 <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 110 111 <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/> … … 112 113 </svg>', 113 114 114 'edit' => /* material-design – edit */ '115 'edit' => /* material-design – edit */ ' 115 116 <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 116 117 <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/> … … 118 119 </svg>', 119 120 120 'chevron_left' => /* material-design – chevron_left */ '121 'chevron_left' => /* material-design – chevron_left */ ' 121 122 <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 122 123 <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/> … … 124 125 </svg>', 125 126 126 'chevron_right' => /* material-design – chevron_right */ '127 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">127 'chevron_right' => /* material-design – chevron_right */ ' 128 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 128 129 <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/> 129 130 <path d="M0 0h24v24H0z" fill="none"/> 130 131 </svg>', 131 132 132 'check' => /* material-design – check */ '133 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">133 'check' => /* material-design – check */ ' 134 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 134 135 <path d="M0 0h24v24H0z" fill="none"/> 135 136 <path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/> … … 137 138 138 139 'arrow_drop_down_circle' => /* material-design – arrow_drop_down_circle */ ' 139 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">140 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 140 141 <path d="M0 0h24v24H0z" fill="none"/> 141 142 <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/> 142 143 </svg>', 143 144 144 'keyboard_arrow_down' => /* material-design – keyboard_arrow_down */ '145 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">145 'keyboard_arrow_down' => /* material-design – keyboard_arrow_down */ ' 146 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 146 147 <path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/> 147 148 <path fill="none" d="M0 0h24v24H0V0z"/> 148 149 </svg>', 149 150 150 'keyboard_arrow_right' => /* material-design – keyboard_arrow_right */ '151 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"viewBox="0 0 24 24">151 'keyboard_arrow_right' => /* material-design – keyboard_arrow_right */ ' 152 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 152 153 <path d="M10 17l5-5-5-5v10z"/> 153 154 <path fill="none" d="M0 24V0h24v24H0z"/> 155 </svg>', 156 157 'keyboard_arrow_left' => /* material-design – keyboard_arrow_left */ ' 158 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> 159 <path d="M14 7l-5 5 5 5V7z"/> 160 <path fill="none" d="M24 0v24H0V0h24z"/> 154 161 </svg>', 155 162
Note: See TracChangeset
for help on using the changeset viewer.