This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'et_builder_ready', function () { | |
class MyCustomModule extends ET_Builder_Module { | |
function init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Quick PHP interpolation example... | |
class Person { | |
public $name = ''; | |
public function getName() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'utility-class.php'; | |
include 'utility-functions.php'; | |
// using a static class method | |
$processed = UtilityClass::methodOne( 'some data' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Post{} | |
.Post__title{} | |
.Post__content{} | |
.Post--is-highlighted .Post__title{} // now we are using the cascade to override styling when that block is at a particular state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "books", | |
"relationship": { | |
"type": "post", | |
"post_type": "book" | |
}, | |
"columns": [ | |
{ | |
"name": "author", | |
"acf_field_name": "author" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the iFrame | |
var iFrame = document.createElement('iframe'); | |
// set iFrame's source | |
iFrame.src = "javascript:false"; // add some URL here | |
// inject iFrame into current (parent) doc before first script tag | |
var where = document.getElementsByTagName('script')[0]; | |
where.parentNode.insertBefore(iFrame, where); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "post_metadata", | |
"columns": [ | |
"post_layout", | |
"read_time", | |
"show_stats" | |
] | |
} | |
OlderNewer