Skip to content

Instantly share code, notes, and snippets.

@MilenFrom
MilenFrom / metabox_integration.php
Last active Aug 31, 2019
Oxygen builder function - data output made easy
View metabox_integration.php
<?php
function show_meta_boxes($mb_info){
// Get our repeater elements so we can do the foreach in the switch later
$repeater_1 = rwmb_meta('repeater_field_1_id');
$repeater_2 = rwmb_meta('repeater_field_2_id');
// Initialize our return value used to return the data we want depending on the case
$return_data = '';
@MilenFrom
MilenFrom / regex.js
Last active Aug 8, 2017
Regex patterns (facebook profile, vimeo, youtube etc..)
View regex.js
/*
Facebook - /((http|https):\/\/|)(www\.|)facebook\.com\/[a-zA-Z0-9.]{1,}/
Twitter - /((http|https):\/\/|)(www\.|)twitter\.com\/[a-zA-Z0-9.]{1,}/
Instagram - /((http|https):\/\/|)(www\.|)instagram\.com\/[a-zA-Z0-9.]{1,}/
IMDB url - /((http|https):\/\/|)(www\.|)imdb\.com\/[a-zA-Z0-9.]{1,}/
@MilenFrom
MilenFrom / debug.css
Created Jul 3, 2017
Code used to debug Horizontal scrolling issues
View debug.css
* {
background: #000 !important;
color: #0f0 !important;
outline: solid #f00 1px !important;
}