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($){ | |
//Modify select2 ajax request to include a parent_id parameter, used by custom_acf_taxonomy_hierarchy() | |
acf.add_filter('select2_ajax_data', function( data, args, $input, field, instance ){ | |
var target_field_key = 'field_5c7634ca3413f'; //YOUR TARGET FIELD KEY HERE | |
if(data.field_key == target_field_key){ | |
var parent_id = 0; //by default we want terms with parent of 0 (top level) |
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 | |
//When registering styles and scripts in WordPress, you can specify a 'version' parameter which is appended to the file's URL. | |
//This is fine, but it's inconvenient having to bump the version number whenever you make a change. So why not do it automatically? | |
//Note we use get_stylesheet_directory() instead of get_stylesheet_directory_uri(), so we get an absolute file path for filemtime() | |
$mtime = filemtime(get_stylesheet_directory() .'/js/script.js'); | |
wp_register_script( 'theme-js', get_stylesheet_directory_uri() .'/js/script.js', array( 'jquery' ), $mtime, true ); | |
wp_enqueue_script( 'theme-js' ); |
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 header('Content-Type: text/html; charset=utf-8'); ?> | |
<html> | |
<head> | |
<title>Fix wrong encoded UTF8 characters</title> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
</head> | |
<body> | |
<pre> | |
<?php | |
/* Problem description: |