This file contains hidden or 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
Show hidden characters
| { | |
| "disallowKeywordsOnNewLine": ["else"], | |
| "disallowMixedSpacesAndTabs": "smart", | |
| "disallowNewlineBeforeBlockStatements": true, | |
| "disallowSpaceAfterObjectKeys": true, | |
| "disallowSpacesInAnonymousFunctionExpression": { | |
| "beforeOpeningRoundBrace": true | |
| }, | |
| "disallowTrailingWhitespace": true, | |
| "requireBlocksOnNewline": true, |
This file contains hidden or 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": "my-app", | |
| "version": "1.0.0", | |
| "description": "My test app", | |
| "main": "src/js/index.js", | |
| "scripts": { | |
| "jshint:dist": "jshint src/js/*.js", | |
| "jshint": "npm run jshint:dist", | |
| "jscs": "jscs src/*.js", | |
| "browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
This file contains hidden or 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 ( ! did_action( 'bbp_after_setup_actions' ) ) { | |
| add_action( 'bbp_after_setup_actions', 'n5n_after_bbPress_setup' ); | |
| } else { | |
| n5n_after_bbPress_setup(); | |
| } | |
| /** | |
| * After bbPress Setup. |
This file contains hidden or 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 | |
| /** You could put this in the bp-custom.php file | |
| * @see http://codex.buddypress.org/themes/bp-custom-php/ | |
| */ | |
| function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) { | |
| if ( function_exists( 'bbpress' ) && is_bbpress() ) { | |
| $retval = true; | |
| } | |
| return $retval; |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <ruleset name="phpmd.xml" | |
| xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
| xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
| <description>PHPMD Ruleset for a WordPress Theme</description> | |
| <rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" /> | |
| <rule ref="rulesets/cleancode.xml/ElseExpression" /> | |
| <rule ref="rulesets/cleancode.xml/StaticAccess" /> |
This file contains hidden or 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
| { | |
| "exclude": ["node_modules/**", "vendor/**"], | |
| "verbose": true, | |
| "always-semicolon": true, | |
| "block-indent": "\t", | |
| "colon-space": [0, 1], | |
| "color-case": "lower", | |
| "color-shorthand": true, | |
| "combinator-space": [1, 1], |
This file contains hidden or 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 | |
| /** | |
| * Post-style permalinks for your custom post types | |
| * e.g. %year%/%monthnum%/%day%/%postname% | |
| */ | |
| function dbx_get_post_types() { | |
| return array( | |
| // replace with your custom post types | |
| 'my-custom-post-type' | |
| ); |
This file contains hidden or 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 | |
| /** | |
| * Remove and add a custom function for bbPress' BuddyPress activity filter | |
| */ | |
| function custom_bbp_notifications_fix() { | |
| if ( !defined( 'BBPRESS_FORUMS_BLOG_ID' ) || !BBPRESS_FORUMS_BLOG_ID ) { | |
| return; | |
| } |
This file contains hidden or 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
| /** | |
| * Restrict bbPress Forum Points | |
| * If a forum has the custom field "NO_MYCRED_POINTS" set to "yes" | |
| * no points are awarded for any action taken in the forum. | |
| * @version 1.0 | |
| */ | |
| add_filter( 'mycred_add', 'mycred_disable_bbp_forum_points', 98, 3 ); | |
| function mycred_disable_bbp_forum_points( $reply, $request, $mycred ) { | |
| // If already declined or bbPress is not installed, bail. | |
| if ( $reply === false || ! function_exists( 'bbp_get_topic_forum_id' ) ) |
This file contains hidden or 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
| The regex patterns in this gist are intended only to match web URLs -- http, | |
| https, and naked domains like "example.com". For a pattern that attempts to | |
| match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
| License: https://opensource.org/license/bsd-3-clause | |
| # Single-line version: | |
| (?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps |