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
using UnityEngine; | |
using System.Collections; | |
public class Ball : MonoBehaviour { | |
public bool debug = false; | |
private Paddle paddle; | |
private bool hasStarted = false; | |
private string[] makeHitSounds = new string[6] {"Paddle", "LeftWall", "RightWall", "TopWall", "BottomWall", "Invincible"}; |
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
function miunus6db_youtube_nocookie( $post_id ) { | |
if( get_field('video', $post_id) ) { | |
$url = get_field('video', $post_id, false); | |
$url = str_replace( 'youtube.com/watch?v=', 'youtube-nocookie.com/embed/', get_field('video', $post_id, false)); | |
update_field('video', $url, $post_id); | |
} |
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
function enzothecat_add_lazy_loading($content) { | |
$content = preg_replace('/src="/', 'loading="lazy" src="', $content); | |
return $content; | |
} | |
add_filter('the_content', 'enzothecat_add_lazy_loading'); |
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
function custom_main_scripts() { | |
// Enqueue plugin here, if needed, including array('jquery') as the 3rd argument as a dependency (see below) | |
// Enqueue custom javascript file | |
wp_register_script( 'my-scripts', get_stylesheet_directory_uri() . '/myfile.js', array('jquery'), filemtime( get_template_directory() . '/myfile.js' ), true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_main_scripts' ); |