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
/** | |
* @param $block_content | |
* @param $block | |
* | |
* @return string | |
Surrounds block with html. | |
* Some blocks are too naked to work nicely like ul | |
*/ | |
function surround_block( $block_content, $block ) { | |
if ( empty( trim( $block_content ) ) ) { |
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 | |
/** | |
* @param $url url to upload | |
* @param int $post_id post to attach it to | |
* | |
* Add a url to the media library and attach it to a post if wanted | |
* @return bool|int|string|WP_Error | |
*/ |
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
#!/usr/bin/env node | |
const { spawn } = require('child_process') | |
const chalk = require('chalk') | |
const args = require('minimist')(process.argv) | |
let folder = args._[2] || './' | |
console.log(chalk.blue('Downloading Ignition Starter Theme')) |
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
//add the php spreadsheet library via composer interminal | |
composer require phpoffice/phpspreadsheet | |
//put function in theme in WP. Use the get_spreadsheet on a file to get the file like a csv. Works on xlsx | |
function get_spreadsheet($filepath) { | |
require get_template_directory() . '/vendor/autoload.php'; //if not using wp remove get_template_directory() | |
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filepath); | |
$worksheet = $spreadsheet->getActiveSheet(); | |
$worksheet = $spreadsheet->getActiveSheet(); |
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
add_filter( 'gform_validation', 'custom_validation' ); | |
function custom_validation( $validation_result ) { | |
$form = $validation_result['form']; | |
foreach ( $form['fields'] as $field ) { | |
if ( strpos( $field->cssClass, 'myfileclass' ) !== false ) { | |
$input = 'input_' . $field->id; | |
$uploaded_files = json_decode( rgpost( "gform_uploaded_files" ) ); | |
$is_file_uploaded = isset( $uploaded_files->$input ); | |
$filename = ''; |
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 | |
/** | |
* Icons Support with symbols to hold all icons in one file | |
* Simply add icons to the assets folder and run npm run icons | |
* This will create a symbol-defs.svg in dist with svg's | |
* symbol file will remove colors and fills. | |
* | |
* | |
* @package ignition | |
*/ |
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
html { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
font-size: 62.5%; | |
} | |
body { | |
font-size: 1.6rem; | |
-webkit-font-smoothing: antialiased; |
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
:root { | |
--fs-base: 1.6rem; | |
--fs-m: 1.8rem; | |
--fs-s: 1.4rem; | |
} | |
p { | |
margin: 1rem 0 0 0; | |
} |
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
/*------- Three types of Containers --------*/ | |
.container { | |
margin: auto; | |
max-width: var(--container); | |
padding-left: var(--container-padding); | |
padding-right: var(--container-padding); | |
width: 100%; | |
} | |
.container-fluid { |