Skip to content

Instantly share code, notes, and snippets.

@BoDonkey
BoDonkey / functions.php
Last active March 7, 2019 11:29
Remove the 'Divi' post status
/**
* Remove 'Divi' from post states.
*
* @param array $post_states Existing post states.
* @param object $post Current post object.
*
* @return array
*/
function divi_removal_filter( $post_states, $post ){
// Make sure that $post_states is an array. Third party plugin might modify $post_states and makes it null which can create issues
@BoDonkey
BoDonkey / check.jsx
Created September 29, 2018 13:42
jsx for detecting change in checkbox
/ External Dependencies
import React, { Component } from 'react';
// Internal Dependencies
import './style.css';
class HelloWorld extends Component {
static slug = 'adna_hello_world';
<?php
class ADNA_HelloWorld extends ET_Builder_Module {
public $slug = 'adna_hello_world';
public $vb_support = 'on';
protected $module_credits = array(
'module_uri' => '',
'author' => '',
@BoDonkey
BoDonkey / module.php
Created May 8, 2018 20:38
Responsive field code
//field
'horizontal_line_width' => array(
'label' => esc_html__('Horizontal Line Width', 'diti-divi-timeline'),
'type' => 'range',
'option_category' => 'layout',
'description' => esc_html__('Here you can set a width for the Horizontal Line.', 'diti-divi-timeline'),
'toggle_slug' => 'main_settings',
'mobile_options' => true,
'responsive' => true,
@BoDonkey
BoDonkey / SCSS.md
Created July 17, 2017 10:23 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@BoDonkey
BoDonkey / demo.css
Created July 9, 2017 12:35 — forked from CodeMyUI/demo.css
SVG CSS3 Menu / Burger Button
*, *:before, *:after {
box-sizing: border-box;
}
body {
background: #158fef;
padding: 40px;
}
h4 {
@BoDonkey
BoDonkey / Contract Killer 3.md
Created June 11, 2017 15:08 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@BoDonkey
BoDonkey / index.html
Created June 4, 2017 09:37
foundation sticky nav example for assistance
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.min.css" />
<link rel="stylesheet" href="/main.css" />
</head>
<body>
@BoDonkey
BoDonkey / wp-config.php
Created May 14, 2017 12:01 — forked from indikatordesign/wp-config.php
Allows you to write the error.log right into the wp-content-folder. You can also use something like this to var_dump to your error log: - idWriteLog( $myVar, 'varName' ); - or - idWriteLog( myFunc(), 'funcName' ); - It is especially useful to var_dump ajax requests and will also show you on which filter your current dump is hooked.
<?php
// Add the snippet below in the file wp-config.php right above: /* That's all, stop editing! Happy blogging. */
define('WP_DEBUG', true );
if ( WP_DEBUG )
{
define('SAVEQUERIES', true );
@BoDonkey
BoDonkey / add_apache_brew.md
Created April 23, 2017 10:43 — forked from vitorbritto/add_apache_brew.md
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"

and install Apache 2.2 with the event MPM, and we'll use Homebrew's OpenSSL library