Skip to content

Instantly share code, notes, and snippets.

@Wooody82
Wooody82 / FallbackAliasStorage.php
Last active January 24, 2019 09:43 — forked from mohit-rocks/FallbackAliasStorage.php
Multilingual URL Alias Fallback.. Move FallbackAliasStorage.php inside src folder
<?php
namespace Drupal\my_module;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Path\AliasStorageInterface;
class FallbackAliasStorage implements AliasStorageInterface {
@Wooody82
Wooody82 / functions.php
Created March 30, 2017 08:40 — forked from Bobz-zg/functions.php
Filter WordPress posts by custom taxonomy term with AJAX
<?php
/**
* AJAC filter posts by taxonomy term
*/
function vb_filter_posts() {
if( !isset( $_POST['nonce'] ) || !wp_verify_nonce( $_POST['nonce'], 'bobz' ) )
die('Permission denied');
/**
@Wooody82
Wooody82 / main.js
Created March 30, 2017 08:39 — forked from Bobz-zg/main.js
Filter WordPress posts by custom taxonomy term with AJAX - Javscript
(function($) {
$doc = $(document);
$doc.ready( function() {
/**
* Retrieve posts
*/
function get_posts($params) {