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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using TMPro; | |
using UnityEngine.UI; | |
using System; | |
public class PlayerHealth : MonoBehaviour | |
{ | |
[Header("Health Attributes")] |
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: Import Plugin | |
* Description: Wholegrain Starter plugin for developer test | |
* Version: 0.1 | |
* Author: Wholegrain Digital | |
*/ | |
namespace WGD; | |
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
add_action( 'wp_enqueue_scripts', 'enqueue_child_styles', 50 ); | |
function enqueue_child_styles() { | |
wp_enqueue_style( 'child-theme-styles', get_stylesheet_directory_uri() . '/assets/css/child-styles.css', '', wp_get_theme()->get( 'Version' ) ); | |
wp_enqueue_style( 'child-theme-fonts', 'https://use.typekit.net/drh6edk.css', '', wp_get_theme()->get( 'Version' ) ); | |
} |
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
<div class="container"> | |
{!! App\show_last_updated() !!} | |
</div> |
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
"gutenberg": [ | |
"./styles/gutenberg.scss" | |
], |
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
if (function_exists('acf_add_options_sub_page')) { | |
acf_add_options_sub_page(array( | |
'page_title' => 'Actiss Options', | |
'menu_title' => 'Actiss Options', | |
'menu_slug' => 'actiss-options', | |
'capability' => 'manage_options', | |
'redirect' => false, | |
'position' => 1, | |
'parent_slug' => 'woocommerce', // add the options page to woocommerce menu | |
)); |
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 | |
// original date format is YYYY-mm-dd | |
$date = $post->event_start_date; | |
// new format is dd-Month-YYYY | |
$newDate = date('d F Y', strtotime($post->event_start_date)); | |
echo $newDate; |
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
/* GUEST CHECKOUT SHORTCODE */ | |
add_shortcode( 'cameron_guest_checkout', function( $atts, $content = null ) { | |
$atts = shortcode_atts( array(), $atts ); | |
$output = ''; | |
$current_user = wp_get_current_user(); | |
if(is_user_logged_in()){ |
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
add_action( 'pre_get_posts', 'my_change_sort_order'); | |
function my_change_sort_order($query){ | |
if(is_archive()): | |
//If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type ) | |
//Set the order ASC or DESC | |
$query->set( 'order', 'ASC' ); | |
//Set the orderby | |
$query->set( 'orderby', 'title' ); | |
endif; | |
}; |
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 | |
$post_cats = get_the_category( get_the_ID() ); | |
$cat_ids = array(); | |
foreach($post_cats as $cat){ | |
array_push($cat_ids, $cat->term_id); | |
} |