Skip to content

Instantly share code, notes, and snippets.


Benjamin Intal bfintal

Block or report user

Report or block bfintal

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
View gist:d711cd81b36a41cd4d25a1012eeb3a82
.ugb-image-upload-has-placeholder[data-is-placeholder-visible="true"] {
display: flex !important;
View gist:b653fa49d2c7b2c8ff11d21f029390ec
setTimeout( function() {
var ttes = document.querySelectorAll( '.tte_wrapper' ); ttes, function( el ) {
var typeAttr = el.getAttribute( 'data-effect' );
// Make the element visible and remove original text.
// Original text is for SEO.
var mid = el.querySelector( '.tte_mid' );
mid.innerHTML = ''; = '';
bfintal / cheatsheet.js
Created Feb 6, 2019
Gutenberg Cheat Sheet
View cheatsheet.js
// Get the data of a block 'core/editor' ).getBlocks()[0]
// Update attributes of another block
// 'core/editor' ).updateBlockAttributes( clientID, attributes ) 'core/editor' ).updateBlockAttributes( '10d88a6d-95d6-4e07-8293-5f59c83a26c0', { heading: 'New Heading' } )
// Get currently selected block. 'core/editor' ).getBlockSelectionStart()
bfintal /
Last active Apr 8, 2019
Creating a Custom Client WordPress Website from A PSD Design - A Gambit Technologies, Inc. Developer Guide

Creating a Custom Client WordPress Website from A PSD Design

(This is a Gambit Technologies, Inc. Developer Guide)

Development of a website from scratch is done by:

  1. Creating a customized WordPress theme using Sage by Roots,
  2. Creating the pages then creating the content either using a page builder, or by adding pure HTML content, then adding styles into the customized theme,
  3. Installing plugins from the WordPress plugin directory for added functionality, configuring them and customizing their styles.

We will use the following tools/projects/code bases:

bfintal /
Last active Apr 6, 2018
Frontly Toolbar API

Toolbar API

Create toolbar buttons which can be assigned to elements. Toolbars appear when elements are hovered on.

Table of Contents

View fix_ampersand_permalink.php
View add_my_templates.php
add_action( 'wp_footer', 'add_my_templates', 11 );
function add_my_templates() {
if ( ! class_exists( 'PageBuilderSandwich' ) ) {
if ( PageBuilderSandwich::is_editable_by_user() ) {
View gulpfile.js
// Copy all project files into the build directory for packaging
gulp.task( 'buildFiles', [ 'updatePageTemplateSamples', 'premium-lite', 'buildStart', 'styles', 'scripts', 'styles-inc', 'scripts-inc', 'translations', 'translations-update', 'icons', 'google-font-update-list' ], function() { // 'standards-phpcs',
return gulp.src( buildInclude, { base: './' } )
.pipe( gulp.dest( 'dist/' + folderName ) )
.pipe( notify( { message: 'Copy build files complete', onLast: true } ) );
} );
gulp.task( 'buildOtherStuff', ['buildFiles'], function( callback ) {
} );
View gulpfile.js
gulp.task( 'icon-font', function() {
return gulp.src( ['page_builder_sandwich/assets/editor-icons/*.svg'] )
.pipe( iconfont( {
fontName: 'pbs', // Required
appendUnicode: true, // Recommended option
formats: ['ttf', 'eot', 'woff'], // Default, 'woff2' and 'svg' are available
timestamp: runTimestamp, // Recommended to get consistent builds when watching files
fontHeight: 1001
} ) )
View gist:422e0146d6f7b91e9c77880c2ac09266
gulp.task( 'google-font-download-list', function() {
var url = '';
return download( url )
.pipe( rename( {
basename: 'google-fonts',
extname: '.json'
} ) )
.pipe( gulp.dest( '.' ) );
} );
gulp.task( 'google-font-update-list', ['google-font-download-list'], function() {
You can’t perform that action at this time.