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: Filter language attribute to force fr-CH. | |
* Author: Jb Audras | |
* Author URI: https://jeanbaptisteaudras.com | |
* License: GPLv2 or later | |
* Version: 1.0.0 | |
*/ | |
function jba_language_attributes() { |
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 | |
/** | |
* Retrieves how much available entries are available for a given form. | |
* | |
* @param int|false $form_id The ID of the form. | |
*/ | |
function jba_display_available_seats( $form_id = false ) { | |
if ( ! $form_id ) { return; } | |
$form = GFAPI::get_form( $form_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
<?php | |
/** | |
* Adds <body> custom classes relative to browsers and device types. | |
* | |
* Note: These classes are obtained via WordPress Core Globals and via the wp_is_mobile | |
* function which both rely on the user agent. wp_is_mobile() is obviously NOT a substitute | |
* to CSS media queries, but may be used for device specific features or debugging. | |
* | |
* @see https://developer.wordpress.org/apis/global-variables/#browser-detection-booleans | |
* @see https://developer.wordpress.org/reference/functions/wp_is_mobile/ |
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
/** | |
* Filters the_content to automatically add unique ID to headings. | |
* | |
* Note: Change the regex to modify the related heading levels. | |
* Defaults to levels 2 and 3. | |
*/ | |
function who_automatic_heading_ids( $content ) { | |
$pattern = "~<h(2|3)[^>]*>(.*?)</h(2|3)>~"; | |
$content = preg_replace_callback( $pattern, function ( $matches ) { | |
$title = $matches[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 | |
/** | |
* Filters blocks to automatically add aria-label to links that open in a new tab. | |
* | |
* @param string $block_content The block content. | |
* @param array $block The full block, including name and attributes. | |
*/ | |
function who_accessible_external_links( $block_content, $block ) { | |
$blocklist = array( | |
'core/button', |
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
{ | |
"landingPage": "/wp-admin/", | |
"login": true, | |
"plugins": [ | |
"https://jeanbaptisteaudras.com/plugins/who-opquast-widgets.zip" | |
], | |
"siteOptions": { | |
"blogname": "Le joli widget Opquast" | |
} | |
} |
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: Remove default theme patterns. | |
* Author: Jb Audras | |
* Version: 0.1 | |
* Author URI: https://whodunit.fr | |
*/ | |
/** | |
* Unregisters default patterns from TT5. |
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: Add Yoast reading time post meta before posts content. | |
* Author: Jb Audras | |
* Version: 0.1 | |
* Author URI: https://whodunit.fr | |
*/ | |
/** | |
* Gets Yoast reading time and add it before the content. |
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
{ | |
"$schema": "https://playground.wordpress.net/blueprint-schema.json", | |
"meta": { | |
"title": "Yoast reading time post meta", | |
"description": "Add Yoast reading time post meta before posts content", | |
"author": "audrasjb", | |
}, | |
"steps": [ | |
{ | |
"step": "installPlugin", |
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
{ | |
"landingPage": "/wp-admin/", | |
"login": true, | |
"plugins": [ | |
"https://jeanbaptisteaudras.com/playground/2025-core-admin-colors.zip" | |
], | |
"siteOptions": { | |
"blogname": "White Admin Scheme" | |
} | |
} |