This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.1.0", | |
"info": { | |
"title": "OpenWeatherMap One Call API", | |
"description": "Provides access to current weather, hourly forecast, and daily forecast data.", | |
"version": "v1.0.0" | |
}, | |
"servers": [ | |
{ | |
"url": "https://api.openweathermap.org" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WP_Rig\WP_Rig\Customizer\Component class | |
* | |
* @package wp_rig | |
*/ | |
namespace WP_Rig\WP_Rig\Customizer; | |
use WP_Rig\WP_Rig\Component_Interface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pin declarations | |
int potPinR= A0; // Declare potPinR to be analog pin A0 | |
int potPinG= A1; // Declare potPinG to be analog pin A1 | |
int potPinB= A2; // Declare potPinB to be analog pin A2 | |
int LEDPinR= 9; // Declare LEDPinR to be arduino pin 9 | |
int LEDPinG= 10; // Declare LEDPinR to be arduino pin 10 | |
int LEDPinB= 11; // Declare LEDPinR to be arduino pin 11 | |
// Variables | |
int readValueR; // Use to store value from red potentiometer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include Lecture post type in the main and search queries | |
*/ | |
function wpcampuscpt_query_filter( $query ) { | |
if ( !is_admin() && $query->is_main_query() ) { | |
if ( $query->is_search() || $query->is_home() ) { | |
$query->set('post_type', array( 'post', 'lecture' ) ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WPCampus Functionality | |
Plugin URI: https://2016.wpcampus.org/schedule/wordpress-masterclass/ | |
Description: Adds custom post types and taxonomies | |
Version: 1.0.0 | |
Author: Morten Rand-Hendriksen | |
Author URI: https://lynda.com/mor10 | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Make sure the plugin is active | |
if ( function_exists( 'get_field' ) ) { | |
$lecture_video = get_field('lecture_video'); | |
} | |
// If the current post is a Lecture post and we have a lecture video URL, use oEmbed | |
if ( 'lecture' === get_post_type() ) { | |
if ( $lecture_video ) { | |
echo wp_oembed_get( $lecture_video ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prints HTML with category and tags for current post. | |
* Augmented from the Twenty Sixteen original, found in inc/template-tags.php | |
*/ | |
function twentysixteen_entry_taxonomies() { | |
// Display Class taxonomy when available | |
$tax_class_title = '<span class="tax-title">' . __( 'Class:', 'wpcampus' ) . '</span> '; | |
$class_list = get_the_term_list( $post->ID, 'class', $tax_class_title, _x( ', ', 'Used between list items, there is a space after the comma.', 'wpcampus' ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prints HTML with meta information for the categories, tags, etc. | |
* Augmented from the Twenty Sixteen original, found in inc/template-tags.php | |
*/ | |
function twentysixteen_entry_meta() { | |
if ( 'post' === get_post_type() || 'lecture' === get_post_type() ) { | |
$author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 ); | |
printf( '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>', | |
get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create two taxonomies, Class and Year, for the post type "Lecture" | |
function wpcampuscpt_lecture_taxonomies() { | |
// Add Class taxonomy, make it hierarchical (like categories) | |
$labels = array( | |
'name' => _x( 'Classs', 'taxonomy general name' ), | |
'singular_name' => _x( 'Class', 'taxonomy singular name' ), | |
'search_items' => __( 'Search Classes' ), | |
'all_items' => __( 'All Classes' ), | |
'parent_item' => __( 'Parent Class' ), |
NewerOlder