Skip to content

Instantly share code, notes, and snippets.

Zen mode 🙏🏻

Mel Macaluso MelMacaluso

Zen mode 🙏🏻
Block or report user

Report or block MelMacaluso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MelMacaluso / expose_ACF_fields_to_REST.php
Created Jun 4, 2019
Automatically expose all the ACF fields to the Wordpress REST API in Pages and in your custom post types.
View expose_ACF_fields_to_REST.php
function create_ACF_meta_in_REST() {
$postypes_to_exclude = ['acf-field-group','acf-field'];
$extra_postypes_to_include = ["page"];
$post_types = array_diff(get_post_types(["_builtin" => false], 'names'),$postypes_to_exclude);
array_push($post_types, $extra_postypes_to_include);
foreach ($post_types as $post_type) {
register_rest_field( $post_type, 'ACF', [
MelMacaluso / index.html
Created Feb 18, 2019
intersection Observer Scrolling
View index.html
<link href="" rel="stylesheet">
<link rel="stylesheet" href="">
<main data-mhm-scroll-sections>
<section class="bg-center bg-cover" data-mhm-scroll-section="0">
<h2>Section 1</h2>
MelMacaluso / default.conf
Created Dec 4, 2018 — forked from szarapka/default.conf
NGiNX Configuration for Vue-Router in HTML5 Mode
View default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
MelMacaluso / StringToValidCssClass.js
Last active Aug 22, 2018 — forked from dbowling/gist:2589645
Convert text to a valid CSS class name
View StringToValidCssClass.js
string = 'Invalid C$$ class name';
// Actually delete the spaces too...
string.replace(/[!\"#$%&'\(\)\*\+,\.\/:;<=>\?\@\[\\\]\^`\{\|\}|\s~]/g, '').toLowerCase();
You can’t perform that action at this time.