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 | |
add_action( 'the_content', 'test_add_query_arg_output' ); | |
function test_add_query_arg_output( $content ) { | |
return add_query_arg( | |
array( | |
'var_key' => 'key_value', | |
'another_var' => 'My Value' | |
), | |
home_url() |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20180808 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the 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
How to use | |
[button link='http://linktosomething.com' color='orange']My Button Text![/button] |
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
{ | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "package", | |
"package": { | |
"name": "WebDevStudios/Hash-Link-Scroll-Offset", |
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
{ | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "vcs", | |
"url": "https://github.com/WebDevStudios/Hash-Link-Scroll-Offset" | |
} |
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
{ | |
"repositories":[ | |
{ | |
"type":"composer", | |
"url":"http://wpackagist.org" | |
}, | |
{ | |
"type": "package", | |
"package": { | |
"name": "WebDevStudios/Hash-Link-Scroll-Offset", |
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 | |
global $wp_version; | |
if ( version_compare( $wp_version, '4.2', '<=' ) ) { | |
add_filter( 'comments_open', '__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
curl -sS https://getcomposer.org/installer | php;\ | |
mkdir -p /usr/local/bin;\ | |
mv composer.phar /usr/local/bin/composer |
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 | |
/** | |
* Test dbDelta() | |
* | |
* @group upgrade | |
* @group dbdelta | |
*/ | |
class Tests_dbDelta extends WP_UnitTestCase { |
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
// filter post_info to use 'Last updated' date | |
add_filter( 'genesis_post_info', 'fe_genesis_post_info_add_last_mod' ); | |
/** | |
* Change Genesis Post Info date to last modified date | |
* | |
* @since 0.1.0 | |
* | |
* @param string $post_info, string (with shortcodes) for post info | |
* @return string Genesis default post info with modified instead of publish date |