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 | |
$GLOBALS['wp_filter'] = array( | |
'enable_wp_debug_mode_checks' => array( | |
10 => array( | |
array( | |
'accepted_args' => 0, | |
'function' => function () { | |
return 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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, git, subversion, composer, curl and wget | |
# | |
# WordPress and the WP_UnitTestCase are installed in the /tmp directory | |
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: GPL | |
* Text Domain: plugin_unique_name |
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
parameters: | |
git_dir: . | |
bin_dir: path_to_global_composer_bin_dir | |
# For example: /Users/********/.composer/vendor/bin | |
tasks: | |
git_blacklist: | |
keywords: | |
- error_log( | |
- var_dump( | |
#- console.log( |
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
Step 1: | |
Go to: \etc\hosts | |
And add this to the bottom of the file: | |
============= | |
127.0.0.1 your.domain.com | |
============= | |
Step 2: | |
Go to [your XAMPP directory]/apache/conf/httpd.conf |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#<type>(<scope>): <subject> | |
#<BLANK LINE> | |
#<body> | |
#<BLANK LINE> | |
#<footer> |
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
/** | |
* Reorder widget areas under admin | |
*/ | |
add_action( 'admin_head', function () { | |
global $wp_registered_sidebars; | |
if ( array_key_exists( 'first', $wp_registered_sidebars ) ) { |
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 gravity forms to acf gravityform select field | |
* | |
* @param array $field field data. | |
* | |
* @return mixed | |
*/ | |
function acf_load_color_field_choices( $field ) { | |
// Reset choices. |
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 property attribute to gravity form link tags | |
* | |
* @param array $handle style imfo | |
* | |
* @return mixed | |
*/ | |
function pos_gform_edit_link_tag( $link, $handle ) { | |
global $is_style_in_queue; |
NewerOlder