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 | |
// Increment used to store xprofile data for a user ID that's unlikely to exist. | |
const GROUP_USER_ID_INCREMENT = 1000000; | |
/** | |
* Add xprofile profile fields to a BuddyPress Group. | |
*/ | |
class Groups_Extension_Profile_Fields extends \BP_Group_Extension | |
{ |
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
<div {...useBlockProps()}> | |
<Disabled> | |
<ServerSideRender | |
skipBlockSupportAttributes | |
block="my/nlock" | |
attributes={attributes} | |
/> | |
</Disabled> | |
</div> |
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
export default { | |
async fetch(request, env, ctx) { | |
return handleRequest(request) | |
} | |
} | |
async function handleRequest(request) { | |
const url = new URL(request.url) | |
if (url.pathname.startsWith('/app2/')) { |
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: Run Lighthouse checks | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "12 2 * * *" |
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 pggh_post_type_filter( $use_block_editor, $post_type ) { | |
if ( 'page' === $post_type ) { | |
return false; | |
} | |
return $use_block_editor; | |
} | |
add_filter( 'use_block_editor_for_post_type', 'pggh_post_type_filter', 10, 2 ); |
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
cy | |
.window() | |
.its('wp') | |
.then(wp => { | |
wp.blocks.getBlockTypes().forEach(({ name }) => { | |
wp.data.dispatch('core/editor').insertBlocks( wp.blocks.createBlock(name, {}) ); | |
}); | |
}); |
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 | |
/** | |
* Plugin Name: Paul Test | |
*/ | |
namespace PaulGibbs; | |
use Generator; | |
use WP_Query; |
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 | |
/** | |
* Plugin Name: Render a specific Post on a Taxonomy archive page. | |
* Plugin Author: Paul Gibbs. | |
* License: public domain | |
*/ | |
namespace paul; | |
use WP_Post; |
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
{"version":1,"resource":"file:///Users/paulgibbs/Sites/platform/my-platform/.gitignore","entries":[{"id":"TIY3","timestamp":1650021010387}]} |
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 | |
/** | |
* Hello World. | |
*/ | |
namespace HelloWorld; | |
$_tests_dir = getenv( 'WP_TESTS_DIR' ) ?: getenv( 'WP_PHPUNIT__DIR' ); | |
require_once $_tests_dir . '/includes/functions.php'; |
NewerOlder