Skip to content

Instantly share code, notes, and snippets.

View creative-andrew's full-sized avatar

Andres creative-andrew

View GitHub Profile
@TeemuSuoranta
TeemuSuoranta / fix-acf-menu-fields-to-polylang.php
Created March 11, 2021 13:51
Fix ACF menu location rules to work on all Polylang locales
<?php
/**
* Fix ACF menu location rules to work on all Polylang locales
*
* Polylang registers localized variations to menu locations and by default
* ACF cannot hook to all of them unless they are manually all picked.
* Polylang separates location with three undescores (eaxmple: primary___en).
*
* This hook automatically applies all menu location rules to all languages.
* Works for both nav_menu and nav_menu_item related fields.
@felipeelia
felipeelia / woocommerce-orderby-featured-products.php
Last active August 3, 2023 13:47
Bring featured products first in a WP_Query
@nerdyman
nerdyman / resolve-tsconfig-path-to-webpack-alias.js
Last active June 7, 2024 17:16
Convert TypeScript tsconfig paths to webpack alias paths
const { resolve } = require('path');
/**
* Resolve tsconfig.json paths to Webpack aliases
* @param {string} tsconfigPath - Path to tsconfig
* @param {string} webpackConfigBasePath - Path from tsconfig to Webpack config to create absolute aliases
* @return {object} - Webpack alias config
*/
function resolveTsconfigPathsToAlias({
tsconfigPath = './tsconfig.json',
@stevekinney
stevekinney / front-end-curriculum.md
Created August 9, 2015 00:47
Front-end Curriculum Draft

Module 1

  • Semantic markup
  • HTML standards mode and quirks mode
  • HTML fundamentals
    • Classes and IDs
  • CSS fundamentals
    • Selectors
    • Resets and normalizers
    • The box model