WordPress core:
wget https://wordpress.org/latest.zip
unzip -l latest.zip | head
Archive: latest.zip
Length Date Time Name
--------- ---------- ----- ----
0 11-12-2024 22:43 wordpress/
<?php | |
$commit_message = file_get_contents( $argv[1] ); | |
$is_common_commit = preg_match( | |
'/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.,\|\:]+\))?(!)?:\s?([\w ])+([\s\S]*)/m', | |
$commit_message, | |
$matches | |
); |
<?php | |
/** | |
* Plugin Name: WP API Mirror Config | |
* | |
* Place this file in `wp-content/mu-plugins/wp-api-mirror.php` | |
* and it will be activated automatically. | |
* | |
* Note that most requests to api.wordpress.org contain dynamic payload | |
* such as list of activated plugins, themes and your site URLs. Some of | |
* them also use POST requests so be sure to configure heavy caching that |
See this guide for how to create a mirror of the WordPress.org SVN repositories.
WP.org hosts the API at api.wordpress.org
(documented in the old wiki) which is accessed by WP installations via HTTP
on older servers that can't do latest HTTPS crypto or upgraded to HTTPS
requests on all other server.
Only some of the API source code is available at:
<?php | |
/** | |
* Plugin Name: Multisite SSO Login | |
* Network: true | |
* | |
* @see https://x.com/konstruktors/status/1838956536049094659 | |
*/ | |
if ( ! is_multisite() ) { | |
return; |
<?php | |
function preseto_rest_with_extra_post_stati( $query, $request ) { | |
if ( current_user_can( 'read' ) ) { | |
$query['post_status'] = [ 'publish', 'private' ]; | |
} | |
return $query; | |
} |
<?php | |
/* | |
Plugin Name: Fix SSL Please | |
Plugin URI: https://github.com/kasparsd/ssl-fix | |
GitHub URI: https://github.com/kasparsd/ssl-fix | |
Description: Ensure that everything works over SSL | |
Version: 0.1.1 | |
Author: Kaspars Dambis | |
Author URI: http://kaspars.net | |
*/ |
<?php | |
/** | |
* Plugin Name: Admin PWA | |
*/ | |
namespace Preseto\Admin_PWA; | |
const ACTION_QUERY_VAR = 'admin-pwa'; | |
function manifest_url() { |
<?php // Run as `php zip-chunks.php path/to/directory`. | |
$chunk_limit = 1024 * 1024 * 1024; // 1 GB | |
function get_files( $path ) { | |
$files = glob( rtrim( $path, '\\/' ) . '/*' ); | |
foreach ( $files as $file ) { | |
if ( is_dir( $file ) ) { | |
$files = array_merge( $files, get_files( $file ) ); | |
} |