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
.PHONY: install | |
install: clean wordpress phpunit wp-cli | |
git submodule init; | |
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:" | |
@echo " mysql -u root -p;" | |
@echo " CREATE DATABASE example_site; \n" | |
wordpress: latest.tar.gz | |
tar -zxvf latest.tar.gz; |
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
[opensalt@devlosiapp01 2os]$ make force-build | |
touch -c composer.lock | |
touch -c yarn.lock | |
bin/composer install --no-interaction | |
Cannot create cache directory /composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache | |
Cannot create cache directory /composer/cache/files/, or directory is not writable. Proceeding without cache | |
Loading composer repositories with package information | |
Installing dependencies (including require-dev) from lock file | |
Package operations: 235 installs, 0 updates, 0 removals | |
- Installing ocramius/package-versions (1.5.1): Downloading (100%) |
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
<div class="slider-nav"> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=1" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=2" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=3" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=4" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=5" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=6" alt=""></div> | |
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=7" alt=""></div> | |
</div> |
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 ( username identified in system ) { | |
// Do things for an identified user | |
} else { | |
echo "Looks like you aren't logged in!"; | |
} |
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( $person is in group Van and in group Musical ) { | |
echo "Well, hello, Eddie!"; | |
} else { | |
// This block of code could address Vans who aren't Musical, | |
// Musical people who aren't Vans, and all Europeans. | |
// | |
// That's a very big, not very specific list! | |
echo "Hello, stranger!"; | |
} |
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 | |
// Assuming the equation: 2 + 2 = $x | |
if( $x == 4 ) { | |
echo "Hurray! You win a thing!"; | |
} else { | |
error_log( "Boo, dude. You screwed that up." ); | |
} |
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 | |
// Integrating Advanced Custom Fields: | |
remove_filter( 'acf/settings/save_json', 'settings_save_json' ); | |
add_filter( 'acf/settings/save_json', function() { | |
return get_stylesheet_directory() . '/Library/Acf-Json'; | |
} ); | |
remove_filter( 'acf/settings/load_json', 'settings_load_json' ); | |
add_filter( 'acf/settings/load_json', function( $paths ) { | |
array_push( | |
$paths, |
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 | |
// Integrating Advanced Custom Fields: | |
add_filter( 'acf/settings/save_json', function() { | |
return get_stylesheet_directory() . '/Library/Acf-Json'; | |
} ); | |
add_filter( 'acf/settings/load_json', function( $paths ) { | |
unset( $paths[0] ); | |
$paths[] = get_template_directory() . '/Library/Acf-Json'; | |
$paths[] = get_stylesheet_directory() . '/Library/Acf-Json'; | |
return $paths; |
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
SYR-TBELKNAP-MAC18:source tbelknap$ npm install | |
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. | |
> node-sass@3.13.1 install /Applications/MAMP/htdocs/InFocusTheme/source/node_modules/node-sass | |
> node scripts/install.js | |
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/darwin-x64-57_binding.node | |
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/darwin-x64-57_binding.node": | |
HTTP error 404 Not Found |
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
/** | |
* On Customizer save, checks for and sets a few | |
* default settings. | |
* @param \WP_Customize_Manager $wpcustomizer | |
*/ | |
public function set_defaults( \WP_Customize_Manager $wpcustomizer ) { | |
$mod = get_theme_mod( 'my_theme_mod_name' ); | |
if( empty( $mod ) ) { | |
set_theme_mod( 'my_theme_mod_name', 'x' ); | |
} |
NewerOlder