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
Array | |
( | |
[payment_method] => invoice | |
[currency] => nok | |
[invoice_address_1] => Mistelteinen 31 | |
[invoice_zipcode] => 3154 | |
[invoice_city] => Tønsberg | |
[invoice_email] => [email protected] | |
[invoice_firstname] => Michaeli | |
[invoice_lastname] => Wilhelmsenia |
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 | |
add_filter('acf/load_field/name=font_size_gutenberg', 'sp_acf_dynamic_fontsizes_load'); | |
function sp_acf_dynamic_fontsizes_load($field) { | |
// get array of colors created using editor-color-palette | |
$font_sizes = wp_get_global_settings()['typography']['fontSizes']['theme']; | |
// if this array is empty, continue | |
if (!empty($font_sizes)) { |
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
# custom rules for loading server images or any other uploaded media files | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
RewriteRule ^(.*)$ https://site.com/$1 [QSA,L] |
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
document.addEventListener("touchstart", function() {}, false); |
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
extends Camera2D | |
var _duration = 0.0 | |
var _period_in_ms = 0.0 | |
var _amplitude = 0.0 | |
var _timer = 0.0 | |
var _last_shook_timer = 0 | |
var _previous_x = 0.0 | |
var _previous_y = 0.0 | |
var _last_offset = Vector2(0, 0) |
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 | |
add_action( 'wp_enqueue_scripts', 'sp_register_acf_field_scripts', 5 ); | |
function sp_register_acf_field_scripts() { | |
// Plugin file | |
wp_register_script( 'siema-js', get_stylesheet_directory_uri() . '/bower_components/siema/dist/siema.min.js', array(), '', true ); | |
// Custom functionality | |
wp_register_script( 'siema-init-js', get_stylesheet_directory_uri() . '/library/js/siema-init.js', array(), '', true ); | |
} |
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
jQuery(document).ready(function($) { | |
// If #agecheck exists | |
if ($('#agecheck').length) { | |
function isOverEighteen() { | |
// Define cookie | |
Cookies.set('over-eighteen'); | |
// Open popup if cookie value is set to "no" or if cookie is undefined | |
if (Cookies.get('over-eighteen') == 'no' || Cookies.get('over-eighteen') == undefined) { | |
var ageCheckLity = lity($('#agecheck'), { |
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
/********************* | |
HEADER STYLES | |
*********************/ | |
.header { | |
#inner-header { | |
justify-content: space-between; | |
} | |
} |
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
// FILTERING IN ADMIN | |
function sp_add_taxonomy_filters() { | |
global $typenow; | |
// an array of all the taxonomies you want to display. Use the taxonomy name or slug | |
$taxonomies = array('publikasjoner_category'); | |
// must set this to the post type you want the filter(s) displayed on | |
if( $typenow == 'publikasjoner' ){ |
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('template_redirect', 'sp_add_last_modified_header'); | |
function sp_add_last_modified_header($headers) { | |
//Check if we are in a single post of any type (archive pages has not modified date) | |
if( is_singular() ) { | |
$post_id = get_queried_object_id(); | |
if( $post_id ) { | |
header("Last-Modified: " . get_the_modified_time("D, d M Y H:i:s", $post_id) ); | |
} | |
} | |
} |
NewerOlder