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
#!/bin/bash | |
for branch in trunk 6.2 6.1 6.0 5.9 | |
do | |
for theme in twentytwentytwo | |
do | |
for url in http://localhost:8889/ | |
do | |
cd wordpress-develop > /dev/null 2>&1; | |
npm run env:start > /dev/null 2>&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 | |
/** | |
* | |
* @link https://www.spacedmonkey.co.uk | |
* @since 1.0.0 | |
* @package Style_Splitter | |
* | |
* @wordpress-plugin | |
* Plugin Name: Block style splitter |
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
$post_type_taxonomies = array(); | |
$term_ids = array(); | |
$prime_post_terms = array(); | |
foreach ( $posts as $post ) { | |
if ( ! ( $post instanceof WP_Post ) ) { | |
continue; | |
} | |
if ( ! isset( $post_type_taxonomies[ $post->post_type ] ) ) { | |
$post_type_taxonomies[ $post->post_type ] = get_object_taxonomies( $post->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
function hasAudio(video) { | |
return ( | |
video.mozHasAudio || | |
Boolean(video.webkitAudioDecodedByteCount) || | |
Boolean(video.audioTracks?.length) | |
); | |
} | |
function hasVideoGotAudio(src) { | |
const video = document.createElement('video'); | |
video.muted = 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
add_filter( 'get_image_tag', function( $html, $id, $alt, $title, $align, $size ){ | |
$original_url = $this->get_original_url( $id ); | |
if ( ! $original_url ) { | |
return $html; | |
} | |
list( $img_src, $width, $height ) = image_downsize( $id, $size ); | |
$hwstring = image_hwstring( $width, $height ); | |
$html = '<img src="' . $img_src . '" alt="' . esc_attr( $alt ) . '" ' . $title . $hwstring . 'class="' . $class . '" />'; | |
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
Functions | |
startElement | |
endElement | |
_wp_menu_output | |
_add_themes_utility_last | |
_wp_ajax_delete_comment_response | |
_wp_ajax_add_hierarchical_term | |
wp_link_manager_disabled_message | |
_wp_credits_add_profile_link |
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
public function get_item_permissions_check( $request ) { | |
$post = $this->get_post( $request['id'] ); | |
if ( is_wp_error( $post ) ) { | |
return $post; | |
} | |
if ( $post && ! $this->check_update_permission( $post ) ) { | |
return false; | |
} | |
return parent::get_item_permissions_check( $request ); |
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
wp.apiFetch( { path: '/wp/v2/types' } ).then( ( post_types ) => { | |
for ( let post_type in post_types ){ | |
let {rest_base} = post_types[post_type]; | |
wp.apiFetch( { path: '/wp/v2/' + rest_base } ).then( ( posts ) => { | |
console.log(posts); | |
}); | |
} | |
} ); |
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 | |
add_action( 'rest_api_init', function () { | |
$types = get_post_types( | |
[ | |
'show_in_rest' => true, | |
], | |
'names' | |
); |
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
Changes to 5.1 | |
Multisite | |
https://core.trac.wordpress.org/ticket/37923 | |
https://core.trac.wordpress.org/ticket/40364 | |
https://core.trac.wordpress.org/ticket/44368 | |
https://core.trac.wordpress.org/ticket/41333 | |
https://core.trac.wordpress.org/ticket/40647 |
NewerOlder