From https://stackoverflow.com/a/63603883/901680
- Go to settings. (Preferences -> Settings on Mac)
- Search "omnisharp".
- Find the section "Omnisharp: Use Global Mono".
- Set it to "always".
- Reload the window.
From https://stackoverflow.com/a/63603883/901680
- Go to settings. (Preferences -> Settings on Mac)
- Search "omnisharp".
- Find the section "Omnisharp: Use Global Mono".
- Set it to "always".
- Reload the window.
| <?php | |
| /** | |
| * From https://wp-graphql.slack.com/archives/C3NM1M291/p1592854006371300?thread_ts=1592852289.366600&cid=C3NM1M291 | |
| */ | |
| add_action( 'graphql_register_types', function() { | |
| register_graphql_interface_type( 'MyNewInterface', [ | |
| 'fields' => [ | |
| 'myNewField' => [ | |
| 'type' => 'String', |
| <?php | |
| /* | |
| Plugin Name: PHP - Strict Error Reporting | |
| Description: Enable strict error reporting for testing PHP. | |
| */ | |
| error_reporting(E_ERROR | E_WARNING | E_PARSE); |
List only SHA1 of commits in current branch.
$ git log --format=format:%H --walk-reflogs {branch name}
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <p>Click the button to get your coordinates.</p> | |
| <button onclick="getLocation()">Try It</button> | |
| <p id="demo"></p> |
| global $wp; | |
| $current_url = add_query_arg( array(), $wp->request ); | |
| // echo '<pre>' . print_r($wp->request, true) . '</pre>'; | |
| // Add logic here: | |
| $load = locate_template( 'archive-activity.php', true ); | |
| if ( $load ) { | |
| // just exit if template was found and loaded | |
| exit(); |
add_action(
'graphql_return_response', function( $filtered_response, $response, $schema, $operation, $query, $variables ) {
return $filtered_response;
}, 10, 6
);
add_action(
'do_graphql_request', function( $query, $operation, $variables, $params ) {
| // Returns first configured browser language. | |
| const lang = navigator.language || navigator.userLanguage; | |
| return lang.split('-').shift(); | |
| // Returns comma separated list of languages. | |
| let lang = (navigator.languages && 0 !== navigator.languages.length | |
| ? navigator.languages | |
| : [navigator.language || navigator.userLanguage || 'en']); |