- VirtualBox - Virtualization software for running local operating systems within your computer. This allows us have a full version of linux within our computers that better match how a live webserver works.
- Vagrant - A tool for provisioning (creating) virtual machines.
- VVV - A pre-built, community-supported Vagrant configuration for WordPress development.
- Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
- SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
- Github.com - A website that provides free Git repositories for both open source and private projects.
- SASS - (SCSS) A CSS preprocessing implementation that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.
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 Template - a very simple PHP class for rendering PHP templates | |
*/ | |
class Template { | |
/** | |
* Location of expected template | |
* |
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 Drupal\ocf_integration_webform\Plugin\WebformElement; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\webform\Element\WebformAjaxElementTrait; | |
use Drupal\webform\Plugin\WebformElementBase; | |
use Symfony\Component\HttpFoundation\Request; | |
/** |
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
<IfModule mod_rewrite.c> | |
# enable rewriting | |
RewriteEngine on | |
# don't rewrite files that exist in the file system | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# don't rewrite directories that exist in the file system | |
RewriteCond %{REQUEST_FILENAME} !-d |
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 | |
// pick a hook from the wp-login.php file that best our needs. I chose the filter: wp_login_errors | |
add_filter( 'wp_login_errors', 'my_login_form_lock_down', 90, 2 ); | |
/** | |
* Completely lock down the WordPress login form by hijacking the page | |
* and only executing the the login header, footer, and necessary | |
* closing tags. | |
* | |
* Provide a secret way to show the login form as a url variable 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 | |
/** | |
* Recursively get taxonomy and its children | |
* | |
* @param string $taxonomy | |
* @param int $parent - parent term id | |
* @return array | |
*/ | |
function get_taxonomy_hierarchy( $taxonomy, $parent = 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
/** | |
* Very simple non-hierarchical templating engine | |
* | |
* @param name | |
* @param data | |
* | |
* @returns string | |
*/ |
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
name: "Setup Runner" | |
description: "Provides SSH, PHP, Terminus as a composite action" | |
inputs: | |
pantheon_ssh_key: | |
description: 'Pantheon SSH Private key in the PEM format.' | |
required: true | |
ssh_config: | |
description: 'Contents of the ssh/config file.' | |
required: true |
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 | |
/** | |
* Simple PHP Templating function | |
* | |
* @param $names - string|array Template names | |
* @param $args - Associative array of variables to pass to the template file. | |
* @return string - Output of the template file. Likely HTML. | |
*/ | |
function template( $names, $args ){ | |
// allow for single file names |
NewerOlder