This file contains 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 | |
// Enqueue the parent theme stylesheet, then the child theme stylesheet. | |
// Used in place of @import rule in child theme style.css | |
function child_theme_name_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'child_theme_name_enqueue_styles' ); |
This file contains 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 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 | |
/** | |
* Adds custom classes to the array of body classes. | |
* | |
* @param array $classes Classes for the body element. | |
* @return array (Maybe) filtered body classes. | |
*/ | |
function wpcampus_body_classes( $classes ) { | |
// Adds a class of no-sidebar to custom no-sidebar page template. | |
if ( is_page_template('page-no-sidebar.php') ) { |
This file contains 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 | |
/** | |
* Custom header for the WPCampus child theme. | |
* Moves the header image to the top. | |
* | |
* The template for displaying the header | |
* | |
* Displays all of the head element and everything up until the "site-content" div. | |
* | |
* @package WordPress |
This file contains 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 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' ), |
This file contains 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 function my_responsive_thumbnail() to output responsive featured image | |
* Function can be called from within the loop of any template file using my_responsive_thumbnail(get_the_ID()); | |
*/ | |
function my_responsive_thumbnail($post_id){ | |
// Get the featured image ID | |
$attachment_id = get_post_thumbnail_id($post_id); | |
// Get the alt text or set the $alt_text variable to the post title if no alt text exists |
This file contains 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 | |
// Override the parent theme fonts | |
function twentysixteen_fonts_url() { | |
$fonts_url = 'https://fonts.googleapis.com/css?family=Playfair+Display:400,400i,700,700i,900,900i|Roboto+Slab:400,700'; | |
return $fonts_url; | |
} | |
?> |
This file contains 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" |
OlderNewer