Skip to content

Instantly share code, notes, and snippets.

Miguel Estrada mae829

Block or report user

Report or block mae829

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
jeromecoupe / webstoemp-gulpfile.js
Last active Feb 23, 2020
Gulp 4 sample gulpfile.js. For a full explanation, have a look at
View webstoemp-gulpfile.js
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
andrewlimaza / jquery-datepicker-wp-admin
Created Jul 24, 2017 — forked from slushman/jquery-datepicker-wp-admin
How to Add the jQuery UI Datepicker to the WordPress Admin
View jquery-datepicker-wp-admin
* Adds the datepicker settings to the admin footer.
* Only loads on the plugin-name settings page
function admin_footer() {
$screen = get_current_screen();
if ( $screen->id == 'settings_page_plugin-name' ) {

Custom Gutenberg Block

This is a basic custom Gutenberg block. Files explained below.

  • block.js — We register Custom Gutenberg block here.
  • editor.css _ Block CSS for the editor.
  • style.css — Block CSS for the front end.
  • index.php — Enqueue block's assets for editor and the front end.
View multidimensional repeaters in ACF throwing warnings
global $post;
if ( function_exists( 'acf_add_local_field_group' ) ) :
'key' => 'group_58bff7f25c321',
'title' => 'Garderobsbyggaren',
'fields' => array(),
'location' => array(
nickdavis / acf-fields-repeater.php
Created Nov 10, 2016
Advanced Custom Fields > Repeater field example (set programatically)
View acf-fields-repeater.php
add_action( 'acf/init', 'nd_acf_add_local_field_groups' );
* Add Advanced Custom Fields programatically (Repeater field).
* @link
* @link
* @link
anttiviljami / wp-admin-modal-dialog.php
Last active Feb 2, 2020
WordPress admin modal dialog example
View wp-admin-modal-dialog.php
// enqueue these scripts and styles before admin_head
wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though...
wp_enqueue_style( 'wp-jquery-ui-dialog' );
<!-- The modal / dialog box, hidden somewhere near the footer -->
<div id="my-dialog" class="hidden" style="max-width:800px">
<h3>Dialog content</h3>
<p>This is some terribly exciting content inside this dialog. Don't you agree?</p>
ajskelton / WP Customizer - Dropdown-pages
Last active Jan 7, 2020
Add a Dropdown-pages field to the WordPress Customizer.
View WP Customizer - Dropdown-pages
$wp_customize->add_setting( 'themeslug_dropdownpages_setting_id', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'themeslug_sanitize_dropdown_pages',
) );
$wp_customize->add_control( 'themeslug_dropdownpages_setting_id', array(
'type' => 'dropdown-pages',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Dropdown Pages' ),
'description' => __( 'This is a custom dropdown pages option.' ),
igorbenic / code.php
Last active Apr 4, 2019
How to create WordPress Metaboxes with OOP
View code.php
class IBenic_WordPress_Metabox extends WordPressSettings {
protected $title = '';
protected $slug = '';
protected $post_types = array();
ms-studio / add-term-to-custom-taxonomy.php
Created Dec 15, 2015
add term metabox to custom taxonomy - using WP 4.4 term meta functions
View add-term-to-custom-taxonomy.php
// source:
// code authored by jgraup -
add_action( 'init', '___create_my_custom_tax' );
zach-adams / vagrant_halt_custom
Created Jul 15, 2015
A copy of the db_backup script that automatically copies the backups to the sync folder
View vagrant_halt_custom
# Create individual SQL files for each database. These files
# are imported automatically during an initial provision if
# the databases exist per the process.
mysql -e 'show databases' | \
grep -v -F "information_schema" | \
grep -v -F "performance_schema" | \
grep -v -F "mysql" | \
grep -v -F "test" | \
You can’t perform that action at this time.