GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — develop (#41)
by Chris
07:09
created

namespace.php ➔ get_players()   B

Complexity

Conditions 3
Paths 2

Size

Total Lines 43
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 3.0067

Importance

Changes 0
Metric Value
cc 3
eloc 17
nc 2
nop 1
dl 0
loc 43
ccs 10
cts 11
cp 0.9091
crap 3.0067
rs 8.8571
c 0
b 0
f 0
1
<?php
2
/**
3
 * Games Collector Display.
4
 *
5
 * All the front-facing code.
6
 *
7
 * @package GC\GamesCollector\Display
8
 * @since   0.2
9
 */
10
11
namespace GC\GamesCollector\Display;
12
use GC\GamesCollector\Game;
13
use GC\GamesCollector\Attributes;
14
15
/**
16
 * Return the game title. With link if a link was saved.
17
 *
18
 * @since  1.0.0
19
 * @param  object $game The game WP_Post object.
20
 * @return string       The HTML markup for the game title.
21
 */
22
function get_game_title( $game ) {
23 2
	$before = '';
24 2
	$after  = '';
25
26
	// Output a link if one was saved.
27 2
	if ( $link = get_post_meta( $game->ID, '_gc_link', true ) ) {
28
		$before = '<a href="' . esc_url( $link ) . '">';
29
		$after  = '</a>';
30
	}
31
32
	// 1: Game ID, 2: Game title, 3: Link <a> tag, 4: Closing </a>.
33 2
	$output = sprintf( '%3$s<span class="game-title" id="game-%1$d-title">%2$s</span>%4$s',
34 2
		absint( $game->ID ),
35 2
		wp_kses_post( $game->post_title ),
36 2
		$before,
37 2
		$after
38
	);
39
40
	/**
41
	 * Allow game title to be filtered.
42
	 *
43
	 * @since 1.0.0
44
	 * @param string $output  The HTML markup for the game title.
45
	 * @param int    $game_id The game's post ID.
46
	 */
47 2
	return apply_filters( 'gc_filter_game_title', $output, $game->ID );
48
}
49
50
/**
51
 * Return the game info (post meta and taxonomies).
52
 *
53
 * @since  1.0.0
54
 * @param  int $game_id The game's post ID.
55
 * @return string       The HTML markup for the game information.
56
 */
57
function get_game_info( $game_id ) {
58
	ob_start(); ?>
59
60
		<div class="game-info" id="game-<?php echo absint( $game_id ); ?>-info">
61
			<?php
62 2
			echo get_players( $game_id );      // WPCS: XSS ok, already sanitized.
63 2
			echo get_playing_time( $game_id ); // WPCS: XSS ok, already sanitized.
64 2
			echo get_age( $game_id );          // WPCS: XSS ok, already sanitized.
65 2
			echo get_difficulty( $game_id );   // WPCS: XSS ok, already sanitized.
66 2
			echo get_attributes( $game_id );   // WPCS: XSS ok, already sanitized.
67
			?>
68 2
		</div>
69
70
	<?php return ob_get_clean();
71
}
72
73
/**
74
 * Return the markup for the buttons for filtering game lists.
75
 *
76
 * @since  1.0.0
77
 * @return string The markup for the buttons.
78
 */
79
function get_buttons() {
80 2
	$terms = get_terms( 'gc_attribute' );
81
82 2
	$show_all    = '<button data-filter="*">' . esc_html__( 'Show All', 'games-collector' ) . '</button>';
83 2
	$short_games = '<button data-filter=".short">' . esc_html__( 'Short Games', 'games-collector' ) . '</button>';
84 2
	$long_games  = '<button data-filter = ".long">' . esc_html__( 'Long Games', 'games-collector' ) . '</button>';
85 2
	$kids_games  = '<button data-filter = ".4-and-up,.5-and-up,.6-and-up,.7-and-up,.8-and-up,.9-and-up">' . esc_html__( 'Good for Kids', 'games-collector' ) . '</button>';
86 2
	$adult_games = '<button data-filter=".mature">' . esc_html__( 'Adult Games', 'games-collector' ) . '</button>';
87
88
	// Loop through terms to generate all those buttons. These won't be filterable.
89 2
	$terms_buttons = '';
90 2
	foreach ( $terms as $term ) {
91 2
		$terms_buttons .= '<button data-filter=".gc_attribute-' . esc_attr( $term->slug ) . '">' . esc_attr( $term->name ) . '</button>';
92
	}
93
94
	/**
95
	 * Allow Show All button to be filtered. Can be hooked to __return_null to disable.
96
	 *
97
	 * @since 1.1.0
98
	 * @var   string HTML markup for Show All button.
99
	 */
100 2
	$show_all = apply_filters( 'gc_filter_button_show_all', $show_all );
101
102
	/**
103
	 * Allow the attribute term buttons to be filtered. This will filter _all_ the term buttons. Can be hooked to __return_null to disable term buttons.
104
	 *
105
	 * @since 1.1.0
106
	 * @var   string HTML markup for all attribute term buttons.
107
	 */
108 2
	$terms_buttons = apply_filters( 'gc_filter_term_buttons', $terms_buttons );
109
110
	/**
111
	 * Allow Short Games button to be filtered. Can be hooked to __return_null to disable.
112
	 *
113
	 * @since 1.1.0
114
	 * @var   string HTML markup for Short Games button.
115
	 */
116 2
	$short_games = apply_filters( 'gc_filter_button_short_games', $short_games );
117
118
	/**
119
	 * Allow Long Games button to be filtered. Can be hooked to __return_null to disable.
120
	 *
121
	 * @since 1.1.0
122
	 * @var   string HTML markup for Long Games button.
123
	 */
124 2
	$long_games = apply_filters( 'gc_filter_button_long_games', $long_games );
125
126
	/**
127
	 * Allow Kids Games button to be filtered. Can be hooked to __return_null to disable.
128
	 *
129
	 * @since 1.1.0
130
	 * @var   string HTML markup for Kids Games button.
131
	 */
132 2
	$kids_games = apply_filters( 'gc_filter_button_kids_games', $kids_games );
133
134
	/**
135
	 * Allow Adults Games button to be filtered. Can be hooked to __return_null to disable.
136
	 *
137
	 * @since 1.1.0
138
	 * @var   string HTML markup for Adults Games button.
139
	 */
140 2
	$adult_games = apply_filters( 'gc_filter_button_adult_games', $adult_games );
141
142 2
	$output = $show_all . $terms_buttons . $short_games . $long_games . $kids_games . $adult_games;
143
144
	/**
145
	 * Allow entire output to be filtered.
146
	 *
147
	 * @since 1.0.0
148
	 * @var   string HTML markup for buttons.
149
	 */
150 2
	return apply_filters( 'gc_filter_buttons', $output );
151
}
152
153
/**
154
 * Return the HTML markup for the other game filters.
155
 *
156
 * @since  1.0.0
157
 * @return string Select markup for filters.
158
 */
159
function get_filters() {
160 2
	$player_filter     = '<div class="player-filter"><label for="players-filter-select">' . esc_html__( 'How many players?', 'games-collector' ) . ':</label>
161
		<select class="players-filter-select">
162 2
			<option selected>- ' . esc_html__( 'Select one', 'games-collector' ) . ' -</option>
163 2
			<option value=".2-players,.min-2-players,.max-2-players,.max-3-players,.max-4-players,.max-5-players,.max-6-players,.max-7-players,.8-or-more-players">' . esc_html__( '2+ players', 'games-collector' ) . '</option>
164 2
			<option value=".4-players,.min-4-players,.max-4-players,.max-5-players,.max-6-players,.max-7-players,.8-or-more-players">' . esc_html__( '4+ players', 'games-collector' ) . '</option>
165 2
			<option value=".5-players,.min-5-players,.max-5-players,.max-6-players,.max-7-players,.8-or-more-players">' . esc_html__( '5+ players', 'games-collector' ) . '</option>
166 2
			<option value=".6-players,.min-6-players,.max-6-players,.max-7-players,.8-or-more-players">' . esc_html__( '6+ players', 'games-collector' ) . '</option>
167 2
			<option value=".8-players,.min-8-players,.8-or-more-players">' . esc_html__( '8+ players', 'games-collector' ) . '</option>
168
		</select>
169
	</div>';
170
171 2
	$game_difficulties = '';
172
173 2
	foreach ( Game\get_difficulties() as $key => $value ) {
174 2
		$game_difficulties .= '<option value=".' . esc_html( $key ) . '">' . esc_html( $value ) . '</option>';
175
	}
176
177
	/**
178
	 * Allow game difficulties select options to be filtered.
179
	 *
180
	 * @since 1.1.0
181
	 * @var   string HTML markup of <option> tags for difficulties select input.
182
	 */
183 2
	$game_difficulties = apply_filters( 'gc_filter_options_difficulties', $game_difficulties );
184
185 2
	$difficulty_filter = '<div class="difficulty-filter"><label for="difficulty-filter-select">' . esc_html__( 'Difficulty', 'games-collector' ) . ':</label>
186
		<select class="difficulty-filter-select">
187 2
			<option selected>- ' . esc_html__( 'Select one', 'games-collector' ) . ' -</option>' . $game_difficulties . '
188
		</select>
189
	</div>';
190
191
	/**
192
	 * Allow the player filter to be filtered. Can be disabled entirely by hooking to __return_null.
193
	 *
194
	 * @since 1.1.0
195
	 * @var   string HTML markup for player filter.
196
	 */
197 2
	$player_filter = apply_filters( 'gc_filter_player_filter', $player_filter );
198
199
	/**
200
	 * Allow the difficulty filter to be filtered. Can be disabled entirely by hooking to __return_null.
201
	 *
202
	 * @since 1.1.0
203
	 * @var   string HTML markup for difficulty filter.
204
	 */
205 2
	$difficulty_filter = apply_filters( 'gc_filter_difficulty_filter', $difficulty_filter );
206
207 2
	$output = $player_filter . $difficulty_filter;
208
209
	/**
210
	 * Allow the filters to be customized.
211
	 *
212
	 * @since 1.0.0
213
	 * @var   string HTML markup for the filters.
214
	 */
215 2
	return apply_filters( 'gc_filter_game_filters', $output );
216
}
217
218
/**
219
 * Return a list of game attributes.
220
 *
221
 * @since  1.0.0
222
 * @param  int $game_id The game's post ID.
223
 * @return string       The HTML markup for the game attributes.
224
 * @uses                Attributes\get_the_attribute_list
225
 */
226
function get_attributes( $game_id ) {
227 2
	$attribute_list = Attributes\get_the_attribute_list(
228 2
		$game_id,
229 2
		'<div class="game-attributes"><span class="gc-icon icon-game-attributes">' . get_svg( 'tags', false ) . '</span><span class="game-attributes" id="game-' . absint( $game_id ) . '-attributes">', // Before.
230 2
		', ',                                       // Seperator.
231 2
		'</span></div>'                             // After.
232
	);
233
234
	/**
235
	 * Allow the attribute list to be filtered.
236
	 *
237
	 * @since 1.0.0
238
	 * @var   string The HTML markup for the attribute list.
239
	 * @uses  Attributes\get_the_attribute_list
240
	 */
241 2
	return apply_filters( 'gc_filter_attribute_list', $attribute_list );
242
}
243
244
/**
245
 * Return the number of players.
246
 *
247
 * @since  1.0.0
248
 * @param  int $game_id The game's post ID.
249
 * @return mixed        The HTML markup for number of players or false if not set.
250
 * @uses                Game\get_players_min_max
251
 */
252
function get_players( $game_id ) {
253 3
	$players_min_max = Game\get_players_min_max( $game_id );
254
255 3
	if ( isset( $players_min_max['min'] ) ) {
256
		/**
257
		 * Allow the # of players to be filtered (but only if there actually are players).
258
		 *
259
		 * @since 1.0.0
260
		 * @var   $game_id         int    The game's post ID.
261
		 * @var   $players_min_max array  The minimum & maximum # of players.
262
		 * @var   $output          string The filtered # of players.
263
		 * @uses                          Game\get_players_min_max
264
		 */
265 3
		$num_players = apply_filters( 'gc_filter_players', $game_id, $players_min_max, sprintf(
266
			// Translators: 1: Minimum number of players, 2: Maximum number of players.
267 3
			__( '%1$d %2$s players', 'games-collector' ),
268 3
			absint( $players_min_max['min'] ),
269 3
			isset( $players_min_max['max'] ) ? sprintf( '- %d', absint( $players_min_max['max'] ) ) : '+'
270
		) );
271
272 3
		ob_start();
273
		?>
274
275
		<span class="gc-icon icon-game-players"><?php the_svg( 'players', false ); ?></span><span class="game-num-players" id="game-<?php echo absint( $game_id ); ?>-num-players">
276
			<?php echo esc_attr( $num_players ); ?>
277 3
		</span>
278
		<?php
279 3
		$output = ob_get_clean();
280
281
		/**
282
		 * Allow the full output for the # of players to be filtered (but only if there actually are players).
283
		 *
284
		 * @since 1.0.0
285
		 * @var   $output      string The HTML markup for # of players.
286
		 * @var   $game_id     int    The game's post ID.
287
		 * @var   $num_players string The number of players (filtered from above).
288
		 * @uses                          Game\get_players_min_max
289
		 */
290 3
		return apply_filters( 'gc_filter_players_output', $output, $game_id, $num_players );
291
	}
292
293
	return false;
294
}
295
296
/**
297
 * Return the game difficulty.
298
 *
299
 * @since  1.0.0
300
 * @param  int $game_id The game's post ID.
301
 * @return mixed        The HTML markup for difficulty or false if not set.
302
 * @uses                Game\get_difficulties
303
 */
304 View Code Duplication
function get_difficulty( $game_id ) {
305 2
	if ( $difficulty = get_post_meta( $game_id, '_gc_difficulty', true ) ) {
306
		ob_start(); ?>
307
		<span class="gc-icon icon-game-difficulty"><?php the_svg( 'difficulty', false ); ?></span><span class="game-difficulty" id="game-<?php echo absint( $game_id ); ?>-difficulty"><?php echo esc_html( Game\get_difficulties( $difficulty ) ); ?></span>
308
309
		<?php $output = ob_get_clean();
310
311
		/**
312
		 * Allow the difficulty output to be filtered (but only if it has been set).
313
		 *
314
		 * @since 1.0.0
315
		 * @var   string The HTML markup for difficulty.
316
		 * @uses         Game\get_difficulties
317
		 */
318 2
		return apply_filters( 'gc_filter_difficulty', $output );
319
	}
320
321
	return false;
322
}
323
324
/**
325
 * Return the game playing time.
326
 *
327
 * @since  1.0.0
328
 * @param  int $game_id The game's post ID.
329
 * @return mixed        The HTML markup for playing time or false if not set.
330
 */
331 View Code Duplication
function get_playing_time( $game_id ) {
332 2
	if ( $playing_time = get_post_meta( $game_id, '_gc_time', true ) ) {
333
		ob_start(); ?>
334
		<span class="gc-icon icon-game-time"><?php the_svg( 'time', false ); ?></span><span class="game-playing-time" id="game-<?php echo absint( $game_id ); ?>-playing-time"><?php echo esc_html( sprintf( __( '%s minutes', 'games-collector' ), $playing_time ) ); ?></span>
335
336
		<?php $output = ob_get_clean();
337
338
		/**
339
		 * Allow the playing time output to be filtered (but only if it has been set).
340
		 *
341
		 * @since 1.0.0
342
		 * @var   string The HTML markup for playing time.
343
		 */
344 2
		return apply_filters( 'gc_filter_playing_time', $output );
345
	}
346
347
	return false;
348
}
349
350
/**
351
 * Return the game age.
352
 *
353
 * @since  1.0.0
354
 * @param  int $game_id The game's post ID.
355
 * @return mixed        The HTML markup for age or false if not set.
356
 */
357 View Code Duplication
function get_age( $game_id ) {
358 2
	if ( $age = get_post_meta( $game_id, '_gc_age', true ) ) {
359
		ob_start(); ?>
360
		<span class="gc-icon icon-game-age"><?php the_svg( 'age', false ); ?></span><span class="game-age" id="game-<?php echo absint( $game_id ); ?>-age"><?php echo esc_html( sprintf( '%d+', $age ) ); ?></span>
361
362
		<?php $output = ob_get_clean();
363
364
		/**
365
		 * Allow the age output to be filtered (but only if it has been set).
366
		 *
367
		 * @since 1.0.0
368
		 * @var   string The HTML markup for age.
369
		 */
370 2
		return apply_filters( 'gc_filter_age', $output );
371
	}
372
373 1
	return false;
374
}
375
376
/**
377
 * Enqueue front end styles and scripts.
378
 *
379
 * @since 0.2
380
 */
381
function enqueue_scripts() {
382
	// Don't load in the admin.
383
	if ( is_admin() ) {
384
		return;
385
	}
386
387
	wp_enqueue_style( 'games-collector', dirname( dirname( plugin_dir_url( __FILE__ ) ) ) . '/assets/css/games-collector.css', [], '1.1.0-r2' );
388
	wp_enqueue_script( 'isotope', dirname( dirname( plugin_dir_url( __FILE__ ) ) ) . '/assets/js/isotope.pkgd.min.js', [ 'jquery' ], '3.0.1', true );
389
	wp_enqueue_script( 'games-collector', dirname( dirname( plugin_dir_url( __FILE__ ) ) ) . '/assets/js/games-collector.js', [ 'jquery', 'isotope' ], '0.2' );
390
}
391
392
/**
393
 * Get a SVG icon by name.
394
 *
395
 * @since  0.2
396
 * @param  string $name    An icon name.
397
 * @param  bool   $encoded Whether to return the svg as a base64 encoded image (for background images) or the raw SVG XML.
398
 * @return string          The svg.
399
 */
400
function get_svg( $name = '', $encoded = true ) {
401
	// Bail if nothing was passed.
402 3
	if ( '' === $name ) {
403
		return;
404
	}
405
406 3
	if ( $encoded ) {
407
		$icons = [
408
			'dice'       => 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KPHBhdGggZmlsbD0iI2EwYTVhYSIgZD0iTTI3IDZoLTE2Yy0yLjc1IDAtNSAyLjI1LTUgNXYxNmMwIDIuNzUgMi4yNSA1IDUgNWgxNmMyLjc1IDAgNS0yLjI1IDUtNXYtMTZjMC0yLjc1LTIuMjUtNS01LTV6TTEzIDI4Yy0xLjY1NyAwLTMtMS4zNDMtMy0zczEuMzQzLTMgMy0zIDMgMS4zNDMgMyAzLTEuMzQzIDMtMyAzek0xMyAxNmMtM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IDAuNTc4LTEuNDIyIDAuNTc4LTAuODEyIDAtMS4yMTktMC4zNzUtMS43NS0wLjkyMmw3LjM0NC03LjM0NGMwLjM1OS0wLjM1OSAwLjU3OC0wLjg3NSAwLjU3OC0xLjQwNnMtMC4yMTktMS4wNDctMC41NzgtMS40MjJsLTExLjE3Mi0xMS4xNTZjLTAuNzk3LTAuNzk3LTIuMzEyLTEuNDIyLTMuNDIyLTEuNDIyaDMuNWMxLjEwOSAwIDIuNjI1IDAuNjI1IDMuNDIyIDEuNDIybDExLjE3MiAxMS4xNTZjMC4zNTkgMC4zNzUgMC41NzggMC44OTEgMC41NzggMS40MjJ6Ij48L3BhdGg+Cjwvc3ZnPgo=',
415
		];
416
417
		/**
418
		 * Allow base64-encoded icons to be filtered.
419
		 *
420
		 * @var array
421
		 */
422
		$icons = apply_filters( 'gc_filter_svg_base64', $icons );
423
	} else {
424
		$icons = [
425 3
			'dice'       => '<svg class="gc-icon svg gc-icon-dice" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32">
426
<title>dice</title>
427
<path fill="#a0a5aa" d="M27 6h-16c-2.75 0-5 2.25-5 5v16c0 2.75 2.25 5 5 5h16c2.75 0 5-2.25 5-5v-16c0-2.75-2.25-5-5-5zM13 28c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zM13 16c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zM19 22c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zM25 28c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zM25 16c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zM25.899 4c-0.467-2.275-2.491-4-4.899-4h-16c-2.75 0-5 2.25-5 5v16c0 2.408 1.725 4.432 4 4.899v-19.899c0-1.1 0.9-2 2-2h19.899z"></path>
428
</svg>
429
></path>
430
</svg>',
431
			'dice-alt'   => '<svg class="gc-icon svg gc-icon-dice-alt" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="1024" viewBox="0 0 1024 1024">
432
<title>dice-alt</title>
433
<path d="M688 352h-256c-44 0-80 36-80 80v256c0 44 36 80 80 80h256c44 0 80-36 80-80v-256c0-44-36-80-80-80zM464 704c-26.508 0-48-21.492-48-48s21.492-48 48-48 48 21.492 48 48-21.492 48-48 48zM464 512c-26.508 0-48-21.492-48-48s21.492-48 48-48 48 21.492 48 48-21.492 48-48 48zM560 608c-26.508 0-48-21.492-48-48s21.492-48 48-48 48 21.492 48 48-21.492 48-48 48zM656 704c-26.508 0-48-21.492-48-48s21.492-48 48-48 48 21.492 48 48-21.492 48-48 48zM656 512c-26.508 0-48-21.492-48-48s21.492-48 48-48 48 21.492 48 48-21.492 48-48 48zM670.375 320c-7.465-36.404-39.854-64-78.375-64h-256c-44 0-80 36-80 80v256c0 38.519 27.596 70.918 64 78.375v-318.375c0-17.6 14.4-32 32-32h318.375z"></path>
434
</svg>',
435
			'age'        => '<svg class="gc-icon svg gc-icon-age" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="28" viewBox="0 0 20 28">
436
<title>age</title>
437
<path d="M18.562 8.563l-4.562 4.562v12.875c0 0.969-0.781 1.75-1.75 1.75s-1.75-0.781-1.75-1.75v-6h-1v6c0 0.969-0.781 1.75-1.75 1.75s-1.75-0.781-1.75-1.75v-12.875l-4.562-4.562c-0.578-0.594-0.578-1.531 0-2.125 0.594-0.578 1.531-0.578 2.125 0l3.563 3.563h5.75l3.563-3.563c0.594-0.578 1.531-0.578 2.125 0 0.578 0.594 0.578 1.531 0 2.125zM13.5 6c0 1.937-1.563 3.5-3.5 3.5s-3.5-1.563-3.5-3.5 1.563-3.5 3.5-3.5 3.5 1.563 3.5 3.5z"></path>
438
</svg>',
439
			'time'       => '<svg class="gc-icon svg gc-icon-time" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="28" viewBox="0 0 24 28">
440
<title>time</title>
441
<path d="M14 8.5v7c0 0.281-0.219 0.5-0.5 0.5h-5c-0.281 0-0.5-0.219-0.5-0.5v-1c0-0.281 0.219-0.5 0.5-0.5h3.5v-5.5c0-0.281 0.219-0.5 0.5-0.5h1c0.281 0 0.5 0.219 0.5 0.5zM20.5 14c0-4.688-3.813-8.5-8.5-8.5s-8.5 3.813-8.5 8.5 3.813 8.5 8.5 8.5 8.5-3.813 8.5-8.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"></path>
442
</svg>',
443
			'players'    => '<svg class="gc-icon svg gc-icon-players" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="28" viewBox="0 0 30 28">
444
<title>players</title>
445
<path d="M9.266 14c-1.625 0.047-3.094 0.75-4.141 2h-2.094c-1.563 0-3.031-0.75-3.031-2.484 0-1.266-0.047-5.516 1.937-5.516 0.328 0 1.953 1.328 4.062 1.328 0.719 0 1.406-0.125 2.078-0.359-0.047 0.344-0.078 0.688-0.078 1.031 0 1.422 0.453 2.828 1.266 4zM26 23.953c0 2.531-1.672 4.047-4.172 4.047h-13.656c-2.5 0-4.172-1.516-4.172-4.047 0-3.531 0.828-8.953 5.406-8.953 0.531 0 2.469 2.172 5.594 2.172s5.063-2.172 5.594-2.172c4.578 0 5.406 5.422 5.406 8.953zM10 4c0 2.203-1.797 4-4 4s-4-1.797-4-4 1.797-4 4-4 4 1.797 4 4zM21 10c0 3.313-2.688 6-6 6s-6-2.688-6-6 2.688-6 6-6 6 2.688 6 6zM30 13.516c0 1.734-1.469 2.484-3.031 2.484h-2.094c-1.047-1.25-2.516-1.953-4.141-2 0.812-1.172 1.266-2.578 1.266-4 0-0.344-0.031-0.688-0.078-1.031 0.672 0.234 1.359 0.359 2.078 0.359 2.109 0 3.734-1.328 4.062-1.328 1.984 0 1.937 4.25 1.937 5.516zM28 4c0 2.203-1.797 4-4 4s-4-1.797-4-4 1.797-4 4-4 4 1.797 4 4z"></path>
446
</svg>',
447
			'difficulty' => '<svg class="gc-icon svg gc-icon-difficulty" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26" height="28" viewBox="0 0 26 28">
448
<title>difficulty</title>
449
<path d="M26 17.156c0 1.609-0.922 2.953-2.625 2.953-1.906 0-2.406-1.734-4.125-1.734-1.25 0-1.719 0.781-1.719 1.937 0 1.219 0.5 2.391 0.484 3.594v0.078c-0.172 0-0.344 0-0.516 0.016-1.609 0.156-3.234 0.469-4.859 0.469-1.109 0-2.266-0.438-2.266-1.719 0-1.719 1.734-2.219 1.734-4.125 0-1.703-1.344-2.625-2.953-2.625-1.641 0-3.156 0.906-3.156 2.703 0 1.984 1.516 2.844 1.516 3.922 0 0.547-0.344 1.031-0.719 1.391-0.484 0.453-1.172 0.547-1.828 0.547-1.281 0-2.562-0.172-3.828-0.375-0.281-0.047-0.578-0.078-0.859-0.125l-0.203-0.031c-0.031-0.016-0.078-0.016-0.078-0.031v-16c0.063 0.047 0.984 0.156 1.141 0.187 1.266 0.203 2.547 0.375 3.828 0.375 0.656 0 1.344-0.094 1.828-0.547 0.375-0.359 0.719-0.844 0.719-1.391 0-1.078-1.516-1.937-1.516-3.922 0-1.797 1.516-2.703 3.172-2.703 1.594 0 2.938 0.922 2.938 2.625 0 1.906-1.734 2.406-1.734 4.125 0 1.281 1.156 1.719 2.266 1.719 1.797 0 3.578-0.406 5.359-0.5v0.031c-0.047 0.063-0.156 0.984-0.187 1.141-0.203 1.266-0.375 2.547-0.375 3.828 0 0.656 0.094 1.344 0.547 1.828 0.359 0.375 0.844 0.719 1.391 0.719 1.078 0 1.937-1.516 3.922-1.516 1.797 0 2.703 1.516 2.703 3.156z"></path>
450
</svg>',
451
			'tags'       => '<svg class="gc-icon svg gc-icon-tags" aria-labelledby="title-ID" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="28" viewBox="0 0 30 28">
452
<title>tags</title>
453
<path d="M7 7c0-1.109-0.891-2-2-2s-2 0.891-2 2 0.891 2 2 2 2-0.891 2-2zM23.672 16c0 0.531-0.219 1.047-0.578 1.406l-7.672 7.688c-0.375 0.359-0.891 0.578-1.422 0.578s-1.047-0.219-1.406-0.578l-11.172-11.188c-0.797-0.781-1.422-2.297-1.422-3.406v-6.5c0-1.094 0.906-2 2-2h6.5c1.109 0 2.625 0.625 3.422 1.422l11.172 11.156c0.359 0.375 0.578 0.891 0.578 1.422zM29.672 16c0 0.531-0.219 1.047-0.578 1.406l-7.672 7.688c-0.375 0.359-0.891 0.578-1.422 0.578-0.812 0-1.219-0.375-1.75-0.922l7.344-7.344c0.359-0.359 0.578-0.875 0.578-1.406s-0.219-1.047-0.578-1.422l-11.172-11.156c-0.797-0.797-2.312-1.422-3.422-1.422h3.5c1.109 0 2.625 0.625 3.422 1.422l11.172 11.156c0.359 0.375 0.578 0.891 0.578 1.422z"></path>
454
</svg>',
455
		];
456
457
		/**
458
		 * Allow svg icons to be filtered.
459
		 *
460
		 * @var array
461
		 */
462 3
		$icons = apply_filters( 'gc_filter_svg_xml', $icons );
463
	} // End if().
464
465 3
	return $icons[ $name ];
466
}
467
468
/**
469
 * Get a SVG icon by name. Wrapper for get_svg.
470
 *
471
 * @since  1.1.0
472
 * @param  string $name    An icon name.
473
 * @param  bool   $encoded Whether to return the svg as a base64 encoded image (for background images) or the raw SVG XML.
474
 */
475
function the_svg( $name = '', $encoded = true ) {
476 3
	echo get_svg( $name, $encoded ); // WPCS: XSS ok.
477
}
478