View 0_reuse_code.js
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 |
View dabblet.css
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%; |
View dabblet.css
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%; |
View basic-custom-module-recipe.php
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() |
View interpolation-example.php
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() | |
{ |
View implementation.php
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' ); |
View generated-style.css
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 |
View book-cpt-test.json
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" |
View working-with-js.js
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); |
View example-table-definition-for-post-post-type.json
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