Changeset 11400 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
- Timestamp:
- 12/22/2021 06:17:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
r11384 r11400 226 226 */ 227 227 function wporg_learn_get_lesson_plan_taxonomy_data( $post_id, $context ) { 228 returnarray(228 $data = array( 229 229 array( 230 230 'icon' => 'clock', … … 252 252 ), 253 253 ); 254 255 $versions = wporg_learn_get_taxonomy_terms( $post_id, 'wporg_wp_version', $context ); 256 if ( $versions ) { 257 $data[] = array( 258 'icon' => 'wordpress', 259 'slug' => 'wp_version', 260 'label' => wporg_label_with_colon( get_taxonomy_labels( get_taxonomy( 'wporg_wp_version' ) )->singular_name ), 261 'value' => $versions, 262 ); 263 } 264 265 return $data; 254 266 } 255 267 … … 449 461 INPUT_GET, 450 462 array( 451 'search' => FILTER_SANITIZE_STRING,452 'captions' => FILTER_SANITIZE_STRING,453 'language' => FILTER_SANITIZE_STRING,454 'audience' => array(463 'search' => FILTER_SANITIZE_STRING, 464 'captions' => FILTER_SANITIZE_STRING, 465 'language' => FILTER_SANITIZE_STRING, 466 'audience' => array( 455 467 'filter' => FILTER_VALIDATE_INT, 456 468 'flags' => FILTER_REQUIRE_ARRAY, 457 469 ), 458 'duration' => array(470 'duration' => array( 459 471 'filter' => FILTER_VALIDATE_INT, 460 472 'flags' => FILTER_REQUIRE_ARRAY, 461 473 ), 462 'level' => array(474 'level' => array( 463 475 'filter' => FILTER_VALIDATE_INT, 464 476 'flags' => FILTER_REQUIRE_ARRAY, 465 477 ), 466 'series' => FILTER_VALIDATE_INT,467 'topic' => FILTER_VALIDATE_INT,468 'type' => array(478 'series' => FILTER_VALIDATE_INT, 479 'topic' => FILTER_VALIDATE_INT, 480 'type' => array( 469 481 'filter' => FILTER_VALIDATE_INT, 470 482 'flags' => FILTER_REQUIRE_ARRAY, 471 483 ), 484 'wp_version' => array( 485 'filter' => FILTER_VALIDATE_INT, 486 'flags' => FILTER_FORCE_ARRAY, 487 ), 472 488 ), 473 489 false … … 475 491 476 492 $entity_map = array( 477 'captions' => 'video_caption_language', 478 'language' => 'video_language', 479 'audience' => 'audience', 480 'duration' => 'duration', 481 'level' => 'level', 482 'topic' => 'topic', 483 'type' => 'instruction_type', 493 'captions' => 'video_caption_language', 494 'language' => 'video_language', 495 'audience' => 'audience', 496 'duration' => 'duration', 497 'level' => 'level', 498 'topic' => 'topic', 499 'type' => 'instruction_type', 500 'wp_version' => 'wporg_wp_version', 484 501 ); 485 502 … … 536 553 case 'topic': 537 554 case 'type': 555 case 'wp_version': 538 556 if ( ! empty( $tax_query ) ) { 539 557 $tax_query['relation'] = 'AND';
Note: See TracChangeset
for help on using the changeset viewer.