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 | |
namespace q\theme\child\context; | |
use q\theme\core\helper as h; | |
// register class to willow ## | |
\q\theme\child\context\ui::__run(); | |
class ui { |
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
git submodule deinit -f wp-content/plugins/REPO | |
rm -rf .git/modules/wp-content/plugins/REPO/ | |
git rm -r --cached wp-content/plugins/REPO | |
rm -rf wp-content/plugins/REPO/ | |
git commit -m "Removed PLUGIN REPO" | |
git submodule add -f https://github.com/USER/REPO wp-content/plugins/REPO | |
git commit -m "Added PLUGIN REPO" |
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 form inputs ## | |
function add_honey( e ) { | |
jQuery( '.form' ).append( '<input type="text" name="honey" id="honey" data-form-mel-input tabindex="-1" autocomplete="false" data-form-required value="" />' ); | |
} | |
// scan for forms to validate ## | |
[ "DOMContentLoaded" ].forEach(function(e){ | |
window.addEventListener( e, add_honey, false ); | |
}); |
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
// return an array ## | |
return [ 'post' => [ | |
'config' => [ | |
// run context->task ## | |
'run' => true, | |
// context->task debugging ## | |
'debug' => false, |
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 | |
/** | |
* The main template file | |
* | |
* This is the most generic template file in a WordPress theme | |
* and one of the two required files for a theme (the other being style.css). | |
* It is used to display a page when nothing more specific matches a query. | |
* E.g., it puts together the home page when no home.php file exists. | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
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 | |
if ( have_posts() ) : | |
while ( have_posts() ) : the_post(); | |
the_title( '<h2>', '</h2>' ); | |
the_post_thumbnail(); | |
the_excerpt(); | |
endwhile; | |
else: | |
_e( 'Sorry, no posts matched your criteria.', 'textdomain' ); | |
endif; |
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
{~ ui~header ~} | |
{~ ui~open ~} | |
<div class="col-12 col-lg-8"> | |
<div class="row"> | |
{~ post~title {+ "<h1 class='col-12'>{{ title }}</h1>" +} ~} | |
{~ post~excerpt ~} |
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 | |
// hook into the script_loader_tag filter, but not in the admin ## | |
if ( ! \is_admin() ) { | |
\add_filter( 'style_loader_tag', 'q_script_loader_tag', 0, 3 ); | |
} | |
// add the filter function - passing 4 params ## |
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 | |
// hook into the style_loader_tag filter, but not in the admin ## | |
if ( ! \is_admin() ) { | |
\add_filter( 'style_loader_tag', 'q_style_loader_tag', 0, 4 ); | |
} | |
// add the filter function - passing 4 params ## |
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'; | |
module.exports = function(grunt) { | |
// root path to mode_modules - crude, but stable ## | |
var $root_path = '../../../'; | |
// Load Tasks ## | |
grunt.loadTasks( $root_path+'node_modules/grunt-contrib-uglify/tasks'); // UGLIFY / Minify JS ## |