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
$spaceamounts: ('none', 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 75, 80, 100, 150); // Adjust this to include the pixel amounts you need. | |
$sides: (top, bottom, left, right); // Leave this variable alone | |
@each $space in $spaceamounts { | |
@each $side in $sides { | |
.m-#{str-slice($side, 0, 1)}-#{$space} { | |
@if $space == 'none' { | |
margin-#{$side}: 0px !important; | |
} @else { | |
margin-#{$side}: #{$space}px !important; |
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
/** | |
* First of all change prefix if you have different one. As default WordPress has `wp_` | |
*/ | |
// Update home and siteurl. | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
// Update posts guid. | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); |
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
function fa_icons() { | |
return array ( | |
'fab fa-500px' => __( '500px', 'buildr' ), | |
'fab fa-accessible-icon' => __( 'accessible-icon', 'buildr' ), | |
'fab fa-accusoft' => __( 'accusoft', 'buildr' ), | |
'fas fa-address-book' => __( 'address-book', 'buildr' ), | |
'far fa-address-book' => __( 'address-book', 'buildr' ), | |
'fas fa-address-card' => __( 'address-card', 'buildr' ), | |
'far fa-address-card' => __( 'address-card', 'buildr' ), |
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 strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
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
$fullsize_path = get_attached_file( 40 ); | |
echo "<pre>"; | |
$csv_stream = new CSVStream($fullsize_path, array(), array('header_rows' => 1)); | |
for ($index=0; $index < $csv_stream->computeCount(); $index++) { | |
$csv_stream_data = $csv_stream->getNextRow(); | |
if ( email_exists( $csv_stream_data->email ) ) { | |
$user = get_user_by( 'email', $csv_stream_data->email ); |
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
/** | |
* First of all change prefix if you have different one. As default WordPress has `wp_` | |
*/ | |
# Update post meta to another meta key | |
# Transfer one post meta to another meta key | |
UPDATE wp_postmeta SET meta_key = 'new_key_name' WHERE meta_key = 'old_key_name'; | |
// Update home and siteurl. | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; |
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 | |
class CSVStream { | |
/** | |
* List of available source fields. | |
* | |
* @var array | |
*/ | |
protected $fields = array(); |
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
// This example will add a custom "select" drop down to the "Image Box" | |
// This will change the class="" on the rendered image box so we can style the Image Box differently | |
// based on the selected option from the editor. | |
// The class will be "my-image-box-style-blue" or "my-image-box-style-green" based on the selected option. | |
add_action('elementor/element/before_section_end', function( $section, $section_id, $args ) { | |
if( $section->get_name() == 'image-box' && $section_id == 'section_image' ){ | |
// we are at the end of the "section_image" area of the "image-box" | |
$section->add_control( |