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
const faceDetector = new window.FaceDetector(); | |
const video = document.querySelector('video.webcam'); | |
const canvas = document.querySelector('canvas.video'); | |
const ctx = canvas.getContext('2d'); | |
const faceCanvas = document.querySelector('canvas.face'); | |
const faceCtx = faceCanvas.getContext('2d'); | |
const SIZE = 10; | |
const SCALE = 1.2; | |
//write a function that will populate the user's video |
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 | |
/** | |
* 'THEME' functions and definitions | |
* | |
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | |
* | |
* @package 'YOUR NAMESPACE HERE' | |
*/ | |
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 | |
/** | |
* The header for our theme. | |
* | |
* This is the template that displays all of the <head> section and everything up until <div id="content"> | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials | |
* | |
* @package Collage Creative Gallery 2016 | |
*/ |
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 | |
/** | |
* Template Name: Civi Form Page | |
* | |
* 1/3, 2/3 page template | |
* | |
* @package MRG Theme | |
*/ | |
get_header(); ?> |
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 | |
// this will output like so: Taxonomy Term Name (19) <- where '19' is the number of posts with that taxo term. | |
?> | |
<h1 class="page-title"> | |
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?> | |
(<?php global $wp_query; | |
echo $wp_query->found_posts; ?>) | |
</h1> |
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 | |
/* | |
Plugin Name: Remove WC Product Tabs | |
Description: Plugin to remove the tabs on single product pages, for WooCommerce. | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab |
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
// put uploaded files into filetype based directories | |
add_filter('wp_handle_upload_prefilter', 'wpse_25894_handle_upload_prefilter'); | |
add_filter('wp_handle_upload', 'wpse_25894_handle_upload'); | |
function wpse_25894_handle_upload_prefilter( $file ) | |
{ | |
add_filter('upload_dir', 'wpse_25894_custom_upload_dir'); | |
return $file; | |
} |