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 ( ! empty( $_SERVER['REQUEST_URI'] ) && | |
| strpos( $_SERVER['REQUEST_URI'], '/content/uploads' ) === 0 ) { | |
| http_response_code(404); | |
| exit; | |
| } |
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 | |
| function pmpro_fix_username_issue( $pmpro_continue_registration ) { | |
| if (!$pmpro_continue_registration) { | |
| return $pmpro_continue_registration; | |
| } | |
| global $username, $pmpro_error_fields; | |
| $safe_username = sanitize_user($username, 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
| <?php | |
| function console_log(){ | |
| $log = array(); | |
| foreach( func_get_args() as $arg ){ | |
| $_arg = is_object( $arg ) && get_class( $arg ) != "stdClass" ? "[Class: ".get_class( $arg ). "]" : $arg; | |
| $log[] = json_encode( $_arg ); | |
| } |
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
| # ---------------------------------------------------------------------- | |
| # | Filename-based cache busting | | |
| # ---------------------------------------------------------------------- | |
| # If you're not using a build process to manage your filename version | |
| # revving, you might want to consider enabling the following directives | |
| # to route all requests such as `/style.12345.css` to `/style.css`. | |
| # | |
| # To understand why this is important and even a better solution than |
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 | |
| $uk_phone = '/(\+44|0[0-9]|0044[0-9]?)[ |-]?([0-9])?[ |-]?([0-9]{2,3}[ |-]?){2,3}([0-9]{2,3})/'; | |
| $test_string = " | |
| Uk format recognised: | |
| +44 7 909 987 987 or | |
| 02987765543 or | |
| 00447 987 654 432 or | |
| 07-908-908-908"; |
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
| var module = require('./module'); | |
| // ..... // | |
| app.use( express.methodOverride() ); | |
| app.use( module.setup ); | |
| app.use( app.router ); | |
| // ..... // | |
| io.on('connection', module.process ); |