This commit is contained in:
2026-07-02 15:54:39 -06:00
commit 9883323161
17470 changed files with 4470592 additions and 0 deletions
@@ -0,0 +1,43 @@
<?php
/**
* Main entry point for auto-generated asset registration.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
// Load script module registration.
$modules_file = __DIR__ . '/modules.php';
if ( file_exists( $modules_file ) ) {
require_once $modules_file;
}
// Load script registration.
$scripts_file = __DIR__ . '/scripts.php';
if ( file_exists( $scripts_file ) ) {
require_once $scripts_file;
}
// Load style registration.
$styles_file = __DIR__ . '/styles.php';
if ( file_exists( $styles_file ) ) {
require_once $styles_file;
}
// Load routes registration.
$routes_file = __DIR__ . '/routes.php';
if ( file_exists( $routes_file ) ) {
require_once $routes_file;
}
// Load widgets registration.
$widgets_file = __DIR__ . '/widgets.php';
if ( file_exists( $widgets_file ) ) {
require_once $widgets_file;
}
// Load pages registration.
$pages_file = __DIR__ . '/pages.php';
if ( file_exists( $pages_file ) ) {
require_once $pages_file;
}
@@ -0,0 +1,14 @@
<?php
/**
* Plugin constants - Auto-generated by build process.
* Do not edit this file manually.
*
* Returns an array of constants for use in other templates.
*
* @package jetpack_backup
*/
return array(
'version' => 'undefined',
'build_url' => plugin_dir_url( __FILE__ ),
);
@@ -0,0 +1,9 @@
<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.5" width="32" height="32" rx="4" fill="#008710"/>
<mask id="mask0_3026_4949" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="6" width="15" height="20">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5002 13.5002V11.0002C13.7418 11.0002 11.5002 13.2418 11.5002 16.0002C11.5002 16.8418 11.7085 17.6418 12.0835 18.3335L10.8668 19.5502C10.2168 18.5252 9.8335 17.3085 9.8335 16.0002C9.8335 12.3168 12.8168 9.3335 16.5002 9.3335V6.8335L19.8335 10.1668L16.5002 13.5002ZM20.9168 13.6668L22.1335 12.4502C22.7835 13.4752 23.1668 14.6918 23.1668 16.0002C23.1668 19.6835 20.1835 22.6668 16.5002 22.6668V25.1668L13.1668 21.8335L16.5002 18.5002V21.0002C19.2585 21.0002 21.5002 18.7585 21.5002 16.0002C21.5002 15.1585 21.2835 14.3668 20.9168 13.6668Z" fill="white"/>
</mask>
<g mask="url(#mask0_3026_4949)">
<rect x="6.5" y="6" width="20" height="20" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 992 B

@@ -0,0 +1,33 @@
<svg
class="backup__animation-el-1"
width="176"
height="212"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g filter="url(#filter1_d)">
<rect x="40" y="40" width="96" height="132" rx="3" fill="#98C6D9"></rect>
</g>
<defs>
<filter
id="filter1_d"
x="0"
y="0"
width="176"
height="212"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
<feColorMatrix
in="SourceAlpha"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
></feColorMatrix>
<feOffset></feOffset>
<feGaussianBlur stdDeviation="20"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix>
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow"></feBlend>
<feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"></feBlend>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 922 B

@@ -0,0 +1,33 @@
<svg
class="backup__animation-el-2"
width="248"
height="200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g filter="url(#filter2_d)">
<rect x="40" y="40" width="168" height="120" rx="3" fill="#F2D76B"></rect>
</g>
<defs>
<filter
id="filter2_d"
x="0"
y="0"
width="248"
height="200"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
<feColorMatrix
in="SourceAlpha"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
></feColorMatrix>
<feOffset></feOffset>
<feGaussianBlur stdDeviation="20"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix>
<feBlend in2="BackgroundImageFix" result="effect2_dropShadow"></feBlend>
<feBlend in="SourceGraphic" in2="effect2_dropShadow" result="shape"></feBlend>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 924 B

@@ -0,0 +1,42 @@
<svg
class="backup__animation-el-3"
width="536"
height="196"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g filter="url(#filter3_d)">
<rect x="40" y="40" width="456" height="116" rx="8" fill="#fff"></rect>
</g>
<path
d="M475.35 62.04A7.49 7.49 0 00468 56c-2.89 0-5.4 1.64-6.65 4.04A5.994 5.994 0 00456 66c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"
fill="#E9EFF5"
></path>
<circle cx="100" cy="98" r="36" fill="#F7A8C3"></circle>
<path
d="M160 84a6 6 0 016-6h174a6 6 0 110 12H166a6 6 0 01-6-6zM160 112a6 6 0 016-6h276a6 6 0 110 12H166a6 6 0 01-6-6z"
fill="#E9EFF5"
></path>
<defs>
<filter
id="filter3_d"
x="0"
y="0"
width="536"
height="196"
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
<feColorMatrix
in="SourceAlpha"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
></feColorMatrix>
<feOffset></feOffset>
<feGaussianBlur stdDeviation="20"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"></feColorMatrix>
<feBlend in2="BackgroundImageFix" result="effect3_dropShadow"></feBlend>
<feBlend in="SourceGraphic" in2="effect3_dropShadow" result="shape"></feBlend>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1 @@
<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" maskUnits="userSpaceOnUse" x="0" y="5" width="32" height="22"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 5.333c4.853 0 8.893 3.453 9.8 8.053 3.467.24 6.2 3.094 6.2 6.614a6.67 6.67 0 01-6.667 6.666H8c-4.413 0-8-3.586-8-8 0-4.12 3.12-7.52 7.133-7.946A9.994 9.994 0 0116 5.333zM8.667 18l4.666 4.666 8.787-8.786L20.24 12l-6.907 6.906-2.786-2.786L8.667 18z" fill="#fff"></path></mask><g mask="url(#a)"><path fill="#069E08" d="M0 0h32v32H0z"></path></g></svg>

After

Width:  |  Height:  |  Size: 551 B

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="32" height="32" viewBox="0 0 24 24"><path fill="#d63639" d="M19 20H6C2.7 20 0 17.3 0 14C0 10.9 2.3 8.4 5.3 8C6.6 5.6 9.1 4 12 4C15.6 4 18.7 6.6 19.4 10C22 10.2 24 12.3 24 15C24 17.7 21.7 20 19 20M11 15V17H13V15H11M11 13H13V7H11V13Z" /></svg>

After

Width:  |  Height:  |  Size: 481 B

@@ -0,0 +1,9 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="4" fill="#008710"/>
<mask id="mask0_3026_4944" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="9" width="20" height="14">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.125 14.3668C21.5583 11.4918 19.0333 9.3335 16 9.3335C13.5917 9.3335 11.5 10.7002 10.4583 12.7002C7.95 12.9668 6 15.0918 6 17.6668C6 20.4252 8.24167 22.6668 11 22.6668H21.8333C24.1333 22.6668 26 20.8002 26 18.5002C26 16.3002 24.2917 14.5168 22.125 14.3668ZM21.8333 21.0002H11C9.15833 21.0002 7.66667 19.5085 7.66667 17.6668C7.66667 15.9585 8.94167 14.5335 10.6333 14.3585L11.525 14.2668L11.9417 13.4752C12.7333 11.9502 14.2833 11.0002 16 11.0002C18.1833 11.0002 20.0667 12.5502 20.4917 14.6918L20.7417 15.9418L22.0167 16.0335C23.3167 16.1168 24.3333 17.2085 24.3333 18.5002C24.3333 19.8752 23.2083 21.0002 21.8333 21.0002ZM12.5917 16.0752L14.3333 17.8168L18.1667 13.9835L19.3417 15.1585L14.3333 20.1668L11.4167 17.2502L12.5917 16.0752Z" fill="white"/>
</mask>
<g mask="url(#mask0_3026_4944)">
<rect x="6" y="6" width="20" height="20" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,17 @@
<svg width="380" height="183" viewBox="0 0 380 183" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.75" filter="url(#filter0_f_5953_11924)">
<path d="M360 -60C360 7.93102 304.931 63 237 63C169.069 63 114 7.93102 114 -60C114 -127.931 169.069 -183 237 -183C304.931 -183 360 -127.931 360 -60Z" fill="url(#paint0_linear_5953_11924)"/>
</g>
<defs>
<filter id="filter0_f_5953_11924" x="-6" y="-303" width="486" height="486" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="60" result="effect1_foregroundBlur_5953_11924"/>
</filter>
<linearGradient id="paint0_linear_5953_11924" x1="360" y1="-60" x2="114" y2="-60" gradientUnits="userSpaceOnUse">
<stop stop-color="#48FF50"/>
<stop offset="0.471846" stop-color="#108642"/>
<stop offset="1" stop-color="#2E38FA"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 990 B

@@ -0,0 +1,9 @@
<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.5" width="32" height="32" rx="4" fill="#008710"/>
<mask id="mask0_3026_4960" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="8" y="7" width="17" height="18">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.4998 7.6665C11.8998 7.6665 8.1665 11.3998 8.1665 15.9998C8.1665 20.5998 11.8998 24.3332 16.4998 24.3332C21.0998 24.3332 24.8332 20.5998 24.8332 15.9998C24.8332 11.3998 21.0998 7.6665 16.4998 7.6665ZM16.4998 22.6665C12.8248 22.6665 9.83317 19.6748 9.83317 15.9998C9.83317 12.3248 12.8248 9.33317 16.4998 9.33317C20.1748 9.33317 23.1665 12.3248 23.1665 15.9998C23.1665 19.6748 20.1748 22.6665 16.4998 22.6665ZM11.4998 17.6665C11.4998 16.746 12.246 15.9998 13.1665 15.9998C14.087 15.9998 14.8332 16.746 14.8332 17.6665C14.8332 18.587 14.087 19.3332 13.1665 19.3332C12.246 19.3332 11.4998 18.587 11.4998 17.6665ZM16.4998 10.9998C15.5794 10.9998 14.8332 11.746 14.8332 12.6665C14.8332 13.587 15.5794 14.3332 16.4998 14.3332C17.4203 14.3332 18.1665 13.587 18.1665 12.6665C18.1665 11.746 17.4203 10.9998 16.4998 10.9998ZM18.1665 17.6665C18.1665 16.746 18.9127 15.9998 19.8332 15.9998C20.7536 15.9998 21.4998 16.746 21.4998 17.6665C21.4998 18.587 20.7536 19.3332 19.8332 19.3332C18.9127 19.3332 18.1665 18.587 18.1665 17.6665Z" fill="white"/>
</mask>
<g mask="url(#mask0_3026_4960)">
<rect x="6.5" y="6" width="20" height="20" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,9 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="4" fill="#008710"/>
<mask id="mask0_3026_4955" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="8" width="18" height="16">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.75 16C8.75 11.8583 12.1083 8.5 16.25 8.5C20.3917 8.5 23.75 11.8583 23.75 16C23.75 20.1417 20.3917 23.5 16.25 23.5C14.175 23.5 12.3083 22.6583 10.95 21.3L12.1333 20.1167C13.1833 21.175 14.6417 21.8333 16.25 21.8333C19.475 21.8333 22.0833 19.225 22.0833 16C22.0833 12.775 19.475 10.1667 16.25 10.1667C13.025 10.1667 10.4167 12.775 10.4167 16H12.9167L9.55 19.3583L9.49167 19.2417L6.25 16H8.75ZM15.4167 16.8333V12.6667H16.6667V16.125L19.6 17.8667L18.9583 18.9333L15.4167 16.8333Z" fill="white"/>
</mask>
<g mask="url(#mask0_3026_4955)">
<rect x="5" y="6" width="20" height="20" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 920 B

@@ -0,0 +1 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="4.75" y="7.75" width="14.5" height="10.5" rx="1.25" stroke="#069E08" stroke-width="1.5"></rect><path fill="#069E08" d="M6 5h5v3H6zM13 5h5v3h-5z"></path></svg>

After

Width:  |  Height:  |  Size: 242 B

@@ -0,0 +1 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 7L8 13.5c-.167-1.167 1-5.167 1.5-6 .365-.608 1-1.5 2.5-2.5s5-2 5-2c0 1-1 2.5-2.5 4z" fill="#069E08"></path><path d="M7 16l1-2.5m0 0L14.5 7C16 5.5 17 4 17 3c0 0-3.5 1-5 2S9.865 6.892 9.5 7.5c-.5.833-1.667 4.833-1.5 6z" stroke="#069E08" stroke-width="1.5" stroke-linecap="round"></path><path d="M17.743 3.1a.75.75 0 10-1.486-.2l1.486.2zm-1.486-.2c-.089.662-.131 1.443-.17 2.235-.04.804-.075 1.63-.146 2.423-.072.795-.176 1.525-.344 2.134-.17.62-.386 1.036-.627 1.278l1.06 1.06c.509-.508.814-1.216 1.013-1.94.203-.735.317-1.568.392-2.398.074-.831.111-1.694.15-2.483.04-.802.08-1.52.158-2.11l-1.486-.198zm-1.287 8.07c-.276.275-.767.574-1.435.866-.653.287-1.415.541-2.175.754-.758.213-1.502.38-2.114.493-.63.117-1.071.167-1.246.167v1.5c.325 0 .885-.075 1.52-.192a26.28 26.28 0 002.245-.523 18.402 18.402 0 002.372-.825c.722-.316 1.419-.705 1.893-1.18l-1.06-1.06z" fill="#069E08"></path><path stroke="#069E08" stroke-width="1.5" d="M6 19.25h8"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.44 13.905a5.345 5.345 0 01-10.69 0c0-.652.307-1.557.866-2.619.547-1.039 1.284-2.137 2.034-3.15a47.06 47.06 0 012.445-3.014 48.194 48.194 0 012.445 3.015c.75 1.012 1.488 2.11 2.034 3.15.56 1.061.866 1.966.866 2.618z" stroke="#069E08" stroke-width="1.5"></path></svg>

After

Width:  |  Height:  |  Size: 353 B

@@ -0,0 +1 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.293 13.758a7.503 7.503 0 01-14.168 1.243l3.67-2.177 3.456 1.217a.75.75 0 00.686-.098l2.887-2.073.08.04c.296.145.703.349 1.15.58.78.406 1.64.877 2.239 1.268zm.206-1.635a37.63 37.63 0 00-1.754-.964 63.44 63.44 0 00-1.538-.771l-.099-.048-.026-.012-.01-.005a.75.75 0 00-.76.068l-2.932 2.105-3.417-1.203a.75.75 0 00-.631.062l-3.675 2.18A7.5 7.5 0 1119.5 12.123zM21 12a9 9 0 11-18 0 9 9 0 0118 0z" fill="#069E08"></path></svg>

After

Width:  |  Height:  |  Size: 548 B

@@ -0,0 +1 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4ZM13.13 13.38L13.48 6.92H10.52L10.87 13.38H13.13ZM13.04 16.74C13.28 16.51 13.41 16.19 13.41 15.78C13.41 15.36 13.29 15.04 13.05 14.81C12.81 14.58 12.46 14.46 11.99 14.46C11.52 14.46 11.17 14.58 10.92 14.81C10.67 15.04 10.55 15.36 10.55 15.78C10.55 16.19 10.68 16.51 10.93 16.74C11.19 16.97 11.54 17.08 11.99 17.08C12.44 17.08 12.79 16.97 13.04 16.74V16.74Z" fill="#D63638"/></svg>

After

Width:  |  Height:  |  Size: 556 B

@@ -0,0 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'moment', 'react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7d9184e6ce035d060c7d');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,63 @@
<?php
/**
* Script module registration - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
/**
* Register all script modules.
*/
function jetpack_backup_register_script_modules() {
// Ensure this only runs once. wp_default_scripts can fire multiple times,
// and each wp_deregister_script_module() call also dequeues the module.
// If a module was enqueued between calls, repeated deregister/register
// cycles would lose the enqueue state.
static $already_registered = false;
if ( $already_registered ) {
return;
}
$already_registered = true;
// Load build constants
$constants_file = __DIR__ . '/constants.php';
if ( ! file_exists( $constants_file ) ) {
return;
}
$build_constants = require $constants_file;
$modules_dir = __DIR__ . '/modules';
$modules_file = $modules_dir . '/registry.php';
if ( ! file_exists( $modules_file ) ) {
return;
}
$modules = require $modules_file;
$base_url = $build_constants['build_url'] . 'modules/';
foreach ( $modules as $module ) {
// WASM-only modules (e.g., vips worker) only have .min.js; use it even when SCRIPT_DEBUG is `true`.
$extension = '.min.js';
$asset_path = $modules_dir . '/' . $module['asset'];
$asset = file_exists( $asset_path ) ? require $asset_path : array();
// Deregister first to override any previously registered version
// (e.g., Core's default modules when running as a plugin).
wp_deregister_script_module( $module['id'] );
wp_register_script_module(
$module['id'],
$base_url . $module['path'] . $extension,
$asset['module_dependencies'] ?? array(),
$asset['version'] ?? false,
array(
'fetchpriority' => 'low',
'in_footer' => true,
)
);
}
}
add_action( 'wp_default_scripts', 'jetpack_backup_register_script_modules' );
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/lazy-editor', 'import' => 'dynamic'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '188faf6c64fdd1b4');
@@ -0,0 +1,11 @@
<?php
/**
* Script module registry - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
return array(
);
@@ -0,0 +1,16 @@
<?php
/**
* Pages loader - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
foreach ( [
__DIR__ . '/pages/jetpack-backup-dashboard/page.php',
__DIR__ . '/pages/jetpack-backup-dashboard/page-wp-admin.php',
] as $file ) {
if ( file_exists( $file ) ) {
require_once $file;
}
}
@@ -0,0 +1 @@
// Empty module loader for page dependencies
@@ -0,0 +1,317 @@
<?php
/**
* Page: jetpack-backup-dashboard (wp-admin integrated)
* Auto-generated by build process.
* Do not edit this file manually.
*
* This version integrates with the standard WordPress admin interface,
* keeping the wp-admin sidebar and scripts/styles intact.
*
* @package jetpack_backup
*/
// Global storage for jetpack-backup-dashboard routes and menu items
global $jetpack_backup_jetpack_backup_dashboard_wp_admin_routes, $jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items;
$jetpack_backup_jetpack_backup_dashboard_wp_admin_routes = array();
$jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items = array();
/**
* Register a route for the jetpack-backup-dashboard-wp-admin page.
*
* @param string $path Route path (e.g., '/types/$type/edit/$id').
* @param string|null $content_module Script module ID for content (stage/inspector).
* @param string|null $route_module Script module ID for route lifecycle hooks.
*/
function jetpack_backup_register_jetpack_backup_dashboard_wp_admin_route( $path, $content_module = null, $route_module = null ) {
global $jetpack_backup_jetpack_backup_dashboard_wp_admin_routes;
$route = array( 'path' => $path );
if ( ! empty( $content_module ) ) {
$route['content_module'] = $content_module;
}
if ( ! empty( $route_module ) ) {
$route['route_module'] = $route_module;
}
$jetpack_backup_jetpack_backup_dashboard_wp_admin_routes[] = $route;
}
/**
* Register a menu item for the jetpack-backup-dashboard-wp-admin page.
* Note: Menu items are registered but not displayed in single-page mode.
*
* @param string $id Menu item ID.
* @param string $label Display label.
* @param string $to Route path to navigate to.
* @param string $parent_id Optional. Parent menu item ID.
*/
function jetpack_backup_register_jetpack_backup_dashboard_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
global $jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items;
$menu_item = array(
'id' => $id,
'label' => $label,
'to' => $to,
);
if ( ! empty( $parent_id ) ) {
$menu_item['parent'] = $parent_id;
}
$jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items[] = $menu_item;
}
/**
* Get all registered routes for the jetpack-backup-dashboard-wp-admin page.
*
* @return array Array of route objects.
*/
function jetpack_backup_get_jetpack_backup_dashboard_wp_admin_routes() {
global $jetpack_backup_jetpack_backup_dashboard_wp_admin_routes;
return $jetpack_backup_jetpack_backup_dashboard_wp_admin_routes ?? array();
}
/**
* Get all registered menu items for the jetpack-backup-dashboard-wp-admin page.
*
* @return array Array of menu item objects.
*/
function jetpack_backup_get_jetpack_backup_dashboard_wp_admin_menu_items() {
global $jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items;
return $jetpack_backup_jetpack_backup_dashboard_wp_admin_menu_items ?? array();
}
/**
* Preload REST API data for the jetpack-backup-dashboard-wp-admin page.
* Automatically called during page rendering.
*/
function jetpack_backup_jetpack_backup_dashboard_wp_admin_preload_data() {
// Define paths to preload - same for all pages
// Please also change packages/core-data/src/entities.js when changing this.
$preload_paths = array(
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
array( '/wp/v2/settings', 'OPTIONS' ),
);
// Use rest_preload_api_request to gather the preloaded data
$preload_data = array_reduce(
$preload_paths,
'rest_preload_api_request',
array()
);
// Register the preloading middleware with wp-api-fetch
wp_add_inline_script(
'wp-api-fetch',
sprintf(
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
wp_json_encode( $preload_data )
),
'after'
);
}
/**
* Enqueue scripts and styles for the jetpack-backup-dashboard-wp-admin page.
* Hooked to admin_enqueue_scripts.
*
* @param string $hook_suffix The current admin page.
*/
function jetpack_backup_jetpack_backup_dashboard_wp_admin_enqueue_scripts( $hook_suffix ) {
// Check all possible ways this page can be accessed:
// 1. Menu page via admin.php?page=jetpack-backup-dashboard-wp-admin (plugin)
// 2. Direct file via jetpack-backup-dashboard.php (Core) - screen ID will be 'jetpack-backup-dashboard'
$current_screen = get_current_screen();
$is_our_page = (
( isset( $_GET['page'] ) && 'jetpack-backup-dashboard-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
( $current_screen && 'jetpack-backup-dashboard' === $current_screen->id )
);
if ( ! $is_our_page ) {
return;
}
// Load build constants
$build_constants = require __DIR__ . '/../../constants.php';
/**
* Fires when the jetpack-backup-dashboard admin page is initialized so extensions can register routes and menu items.
*/
do_action( 'jetpack-backup-dashboard-wp-admin_init' );
// Preload REST API data
jetpack_backup_jetpack_backup_dashboard_wp_admin_preload_data();
// Get all registered routes
$routes = jetpack_backup_get_jetpack_backup_dashboard_wp_admin_routes();
// Get boot module asset file for dependencies
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
if ( file_exists( $asset_file ) ) {
$asset = require $asset_file;
// This script serves two purposes:
// 1. It ensures all the globals that are made available to the modules are loaded.
// 2. It initializes the boot module as an inline script.
wp_register_script( 'jetpack-backup-dashboard-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
/*
* Add inline script to initialize the app using initSinglePage (no menuItems).
* The dynamic import is deferred until DOMContentLoaded so that all classic
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
* wp-theme, etc.) have finished parsing and executing before the boot module
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
* against the classic-script-printing pass on fast CDN-fronted hosts in
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
*/
$init_js_function = <<<'JS'
( mountId, routes ) => {
const run = async () => {
const mod = await import( "@wordpress/boot" );
mod.initSinglePage( { mountId, routes } );
};
if ( document.readyState === "loading" ) {
document.addEventListener( "DOMContentLoaded", run );
} else {
run();
}
}
JS;
wp_add_inline_script(
'jetpack-backup-dashboard-wp-admin-prerequisites',
sprintf(
'( %s )( %s, %s );',
$init_js_function,
wp_json_encode( 'jetpack-backup-dashboard-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
)
);
// Register prerequisites style by filtering script dependencies to find registered styles
$style_dependencies = array_filter(
$asset['dependencies'],
function ( $handle ) {
return wp_style_is( $handle, 'registered' );
}
);
wp_register_style( 'jetpack-backup-dashboard-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
// Build dependencies for jetpack-backup-dashboard-wp-admin module
$boot_dependencies = array(
array(
'import' => 'static',
'id' => '@wordpress/boot',
),
);
// Add all registered routes as dependencies
foreach ( $routes as $route ) {
if ( isset( $route['route_module'] ) ) {
$boot_dependencies[] = array(
'import' => 'static',
'id' => $route['route_module'],
);
}
if ( isset( $route['content_module'] ) ) {
$boot_dependencies[] = array(
'import' => 'dynamic',
'id' => $route['content_module'],
);
}
}
/**
* Filters the boot script-module dependencies for the
* jetpack-backup-dashboard-wp-admin page.
*
* Surfaces extending this page can append entries to the boot
* dependency list. Each entry is an array with 'import' (string
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
*
* @param array $boot_dependencies Boot dependencies for the page.
*/
$boot_dependencies = apply_filters(
'jetpack-backup-dashboard-wp-admin_boot_dependencies',
$boot_dependencies
);
// Dummy script module to ensure dependencies are loaded
wp_register_script_module(
'jetpack-backup-dashboard-wp-admin',
$build_constants['build_url'] . 'pages/jetpack-backup-dashboard/loader.js',
$boot_dependencies
);
// Enqueue the boot scripts and styles
wp_enqueue_script( 'jetpack-backup-dashboard-wp-admin-prerequisites' );
wp_enqueue_script_module( 'jetpack-backup-dashboard-wp-admin' );
wp_enqueue_style( 'jetpack-backup-dashboard-wp-admin-prerequisites' );
}
}
/**
* Render the jetpack-backup-dashboard-wp-admin page.
* Call this function from add_menu_page or add_submenu_page.
* This renders within the normal WordPress admin interface.
*/
function jetpack_backup_jetpack_backup_dashboard_wp_admin_render_page() {
?>
<style>
/* Critical styles to prevent layout shifts - inlined for immediate application */
#wpwrap {
overflow-y: auto;
}
body {
background: #fff;
}
/* Reset wp-admin padding */
#wpcontent {
padding-inline-start: 0;
}
#wpbody-content {
padding-bottom: 0;
}
/* Hide legacy admin elements */
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
display: none;
}
#wpfooter {
display: none;
}
/* Accessibility regions */
.a11y-speak-region {
inset-inline-start: -1px;
top: -1px;
}
/* Admin menu indicators */
ul#adminmenu a.wp-has-current-submenu::after,
ul#adminmenu > li.current > a.current::after {
border-inline-end-color: #fff;
}
/* Media frame fix */
.media-frame select.attachment-filters:last-of-type {
width: auto;
max-width: 100%;
}
/* Responsive overflow fix for #wpwrap */
@media (min-width: 782px) {
#wpwrap {
overflow-y: initial;
}
}
</style>
<div id="jetpack-backup-dashboard-wp-admin-app" class="boot-layout-container"></div>
<?php
}
// Hook the enqueue function to admin_enqueue_scripts
add_action( 'admin_enqueue_scripts', 'jetpack_backup_jetpack_backup_dashboard_wp_admin_enqueue_scripts' );
@@ -0,0 +1,318 @@
<?php
/**
* Page: jetpack-backup-dashboard
* Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
// Global storage for jetpack-backup-dashboard routes and menu items
global $jetpack_backup_jetpack_backup_dashboard_routes, $jetpack_backup_jetpack_backup_dashboard_menu_items;
$jetpack_backup_jetpack_backup_dashboard_routes = array();
$jetpack_backup_jetpack_backup_dashboard_menu_items = array();
/**
* Register a route for the jetpack-backup-dashboard page.
*
* @param string $path Route path (e.g., '/types/$type/edit/$id').
* @param string|null $content_module Script module ID for content (stage/inspector).
* @param string|null $route_module Script module ID for route lifecycle hooks.
*/
function jetpack_backup_register_jetpack_backup_dashboard_route( $path, $content_module = null, $route_module = null ) {
global $jetpack_backup_jetpack_backup_dashboard_routes;
$route = array( 'path' => $path );
if ( ! empty( $content_module ) ) {
$route['content_module'] = $content_module;
}
if ( ! empty( $route_module ) ) {
$route['route_module'] = $route_module;
}
$jetpack_backup_jetpack_backup_dashboard_routes[] = $route;
}
/**
* Register a menu item for the jetpack-backup-dashboard page.
*
* @param string $id Menu item ID.
* @param string $label Display label.
* @param string $to Route path to navigate to.
* @param string $parent_id Optional. Parent menu item ID.
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
*/
function jetpack_backup_register_jetpack_backup_dashboard_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
global $jetpack_backup_jetpack_backup_dashboard_menu_items;
$menu_item = array(
'id' => $id,
'label' => $label,
'to' => $to,
);
if ( ! empty( $parent_id ) ) {
$menu_item['parent'] = $parent_id;
}
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
$menu_item['parent_type'] = $parent_type;
}
$jetpack_backup_jetpack_backup_dashboard_menu_items[] = $menu_item;
}
/**
* Get all registered routes for the jetpack-backup-dashboard page.
*
* @return array Array of route objects.
*/
function jetpack_backup_get_jetpack_backup_dashboard_routes() {
global $jetpack_backup_jetpack_backup_dashboard_routes;
return $jetpack_backup_jetpack_backup_dashboard_routes ?? array();
}
/**
* Get all registered menu items for the jetpack-backup-dashboard page.
*
* @return array Array of menu item objects.
*/
function jetpack_backup_get_jetpack_backup_dashboard_menu_items() {
global $jetpack_backup_jetpack_backup_dashboard_menu_items;
return $jetpack_backup_jetpack_backup_dashboard_menu_items ?? array();
}
/**
* Preload REST API data for the jetpack-backup-dashboard page.
* Automatically called during page rendering.
*/
function jetpack_backup_jetpack_backup_dashboard_preload_data() {
// Define paths to preload - same for all pages
// Please also change packages/core-data/src/entities.js when changing this.
$preload_paths = array(
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
array( '/wp/v2/settings', 'OPTIONS' ),
);
// Use rest_preload_api_request to gather the preloaded data
$preload_data = array_reduce(
$preload_paths,
'rest_preload_api_request',
array()
);
// Register the preloading middleware with wp-api-fetch
wp_add_inline_script(
'wp-api-fetch',
sprintf(
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
wp_json_encode( $preload_data )
),
'after'
);
}
/**
* Render the jetpack-backup-dashboard page.
* Call this function from add_menu_page or add_submenu_page.
*/
function jetpack_backup_jetpack_backup_dashboard_render_page() {
// Load build constants
$build_constants = require __DIR__ . '/../../constants.php';
// Set current screen
set_current_screen();
// Remove unwanted deprecated handler
remove_action( 'admin_head', 'wp_admin_bar_header' );
// Remove unwanted scripts and styles that were enqueued during `admin_init`
foreach ( wp_scripts()->queue as $script ) {
wp_dequeue_script( $script );
}
foreach ( wp_styles()->queue as $style ) {
wp_dequeue_style( $style );
}
/**
* Fires when the jetpack-backup-dashboard page is initialized so extensions can register routes and menu items.
*/
do_action( 'jetpack-backup-dashboard_init' );
// Enqueue command palette assets for boot-based pages
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
wp_enqueue_command_palette_assets();
}
// Preload REST API data
jetpack_backup_jetpack_backup_dashboard_preload_data();
// Get all registered routes and menu items
$menu_items = jetpack_backup_get_jetpack_backup_dashboard_menu_items();
$routes = jetpack_backup_get_jetpack_backup_dashboard_routes();
// Get boot module asset file for dependencies
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
if ( file_exists( $asset_file ) ) {
$asset = require $asset_file;
// This script serves two purposes:
// 1. It ensures all the globals that are made available to the modules are loaded.
// 2. It initializes the boot module as an inline script.
wp_register_script( 'jetpack-backup-dashboard-prerequisites', '', $asset['dependencies'], $asset['version'], true );
// Add inline script to initialize the app
$init_modules = [];
wp_add_inline_script(
'jetpack-backup-dashboard-prerequisites',
sprintf(
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
'jetpack-backup-dashboard-app',
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
esc_url( admin_url( '/' ) )
)
);
// Register prerequisites style by filtering script dependencies to find registered styles
$style_dependencies = array_filter(
$asset['dependencies'],
function ( $handle ) {
return wp_style_is( $handle, 'registered' );
}
);
wp_register_style( 'jetpack-backup-dashboard-prerequisites', false, $style_dependencies, $asset['version'] );
// Build dependencies for jetpack-backup-dashboard module
$boot_dependencies = array(
array(
'import' => 'static',
'id' => '@wordpress/boot',
),
);
// Add init modules as static dependencies
// No init modules configured
// Add all registered routes as dependencies
foreach ( $routes as $route ) {
if ( isset( $route['route_module'] ) ) {
$boot_dependencies[] = array(
'import' => 'static',
'id' => $route['route_module'],
);
}
if ( isset( $route['content_module'] ) ) {
$boot_dependencies[] = array(
'import' => 'dynamic',
'id' => $route['content_module'],
);
}
}
/**
* Filters the boot script-module dependencies for the
* jetpack-backup-dashboard page.
*
* Surfaces extending this page can append entries to the boot
* dependency list. Each entry is an array with 'import' (string
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
*
* @param array $boot_dependencies Boot dependencies for the page.
*/
$boot_dependencies = apply_filters(
'jetpack-backup-dashboard_boot_dependencies',
$boot_dependencies
);
// Dummy script module to ensure dependencies are loaded
wp_register_script_module(
'jetpack-backup-dashboard',
$build_constants['build_url'] . 'pages/jetpack-backup-dashboard/loader.js',
$boot_dependencies
);
// Enqueue the boot scripts and styles
wp_enqueue_script( 'jetpack-backup-dashboard-prerequisites' );
wp_enqueue_script_module( 'jetpack-backup-dashboard' );
wp_enqueue_style( 'jetpack-backup-dashboard-prerequisites' );
}
// Output the HTML
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
<style>
html {
background: #f1f1f1;
color: #444;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
line-height: 1.4em;
}
body {
margin: 0;
}
#wpadminbar { display: none; }
</style>
<?php
global $hook_suffix;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$hook_suffix = 'jetpack-backup-dashboard';
// BEGIN see wp-admin/admin-header.php
print_admin_styles();
print_head_scripts();
/** This action is documented in wp-admin/admin-header.php */
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/** This action is documented in wp-admin/admin-header.php */
do_action( 'admin_head' );
// END see wp-admin/admin-header.php
?>
</head>
<body class="jetpack-backup-dashboard">
<div id="jetpack-backup-dashboard-app" style="height: 100vh; box-sizing: border-box;"></div>
<?php
// BEGIN see wp-admin/admin-footer.php
/** This action is documented in wp-admin/admin-footer.php */
do_action( 'admin_footer', '' );
// Print import map first so it's available for inline scripts
wp_script_modules()->print_import_map();
print_footer_scripts();
wp_script_modules()->print_enqueued_script_modules();
wp_script_modules()->print_script_module_preloads();
wp_script_modules()->print_script_module_data();
/** This action is documented in wp-admin/admin-footer.php */
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
// END see wp-admin/admin-footer.php
?>
</body>
</html>
<?php
exit;
}
/**
* Intercept admin_init to render the page early.
* This bypasses the default WordPress admin template.
*/
function jetpack_backup_jetpack_backup_dashboard_intercept_render() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['page'] ) && 'jetpack-backup-dashboard' === $_GET['page'] ) {
jetpack_backup_jetpack_backup_dashboard_render_page();
exit;
}
}
// Hook the interceptor to admin_init
add_action( 'admin_init', 'jetpack_backup_jetpack_backup_dashboard_intercept_render' );
@@ -0,0 +1,113 @@
<?php
/**
* Routes registration - Auto-generated by build process.
* Registers all routes on their respective page init hooks.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
// Load routes registry
$routes_file = __DIR__ . '/routes/registry.php';
if ( ! file_exists( $routes_file ) ) {
return;
}
$routes = require $routes_file;
// Group routes by page and store in globals for page-specific functions
$routes_by_page = array();
foreach ( $routes as $route ) {
$page_slug = $route['page'];
if ( ! isset( $routes_by_page[ $page_slug ] ) ) {
$routes_by_page[ $page_slug ] = array();
}
$routes_by_page[ $page_slug ][] = $route;
}
// Store routes data in globals for each page
foreach ( $routes_by_page as $page_slug => $page_routes ) {
$page_slug_underscore = str_replace( '-', '_', $page_slug );
$global_name = 'jetpack_backup_' . $page_slug_underscore . '_routes_data';
$GLOBALS[ $global_name ] = $page_routes;
}
/**
* Generic helper function to register routes for a page.
*
* @param array $page_routes Array of route data for the page.
* @param string $register_function_name Name of the function to call for registering each route.
*/
function jetpack_backup_register_page_routes( $page_routes, $register_function_name ) {
// Load build constants
$build_constants = require __DIR__ . '/constants.php';
foreach ( $page_routes as $route ) {
$content_handle = null;
$route_handle = null;
// Register content module if exists
if ( $route['has_content'] ) {
$content_asset_path = __DIR__ . "/routes/{$route['name']}/content.min.asset.php";
if ( file_exists( $content_asset_path ) ) {
$content_asset = require $content_asset_path;
$content_handle = 'jetpack-backup/routes/' . $route['name'] . '/content';
$extension = '.min.js';
// Deregister first to override any previously registered version
// (e.g., Core's default modules when running as a plugin).
wp_deregister_script_module( $content_handle );
wp_register_script_module(
$content_handle,
$build_constants['build_url'] . 'routes/' . $route['name'] . '/content' . $extension,
$content_asset['module_dependencies'] ?? array(),
$content_asset['version'] ?? false
);
}
}
// Register route module if exists
if ( $route['has_route'] ) {
$route_asset_path = __DIR__ . "/routes/{$route['name']}/route.min.asset.php";
if ( file_exists( $route_asset_path ) ) {
$route_asset = require $route_asset_path;
$route_handle = 'jetpack-backup/routes/' . $route['name'] . '/route';
$extension = '.min.js';
// Deregister first to override any previously registered version
// (e.g., Core's default modules when running as a plugin).
wp_deregister_script_module( $route_handle );
wp_register_script_module(
$route_handle,
$build_constants['build_url'] . 'routes/' . $route['name'] . '/route' . $extension,
$route_asset['module_dependencies'] ?? array(),
$route_asset['version'] ?? false
);
}
}
// Register route with page
if ( function_exists( $register_function_name ) ) {
call_user_func( $register_function_name, $route['path'], $content_handle, $route_handle );
}
}
}
// Page-specific route registration functions
// Page-specific route registration functions for jetpack-backup-dashboard
/**
* Register routes for jetpack-backup-dashboard page (full-page mode).
*/
function jetpack_backup_register_jetpack_backup_dashboard_page_routes() {
global $jetpack_backup_jetpack_backup_dashboard_routes_data;
jetpack_backup_register_page_routes( $jetpack_backup_jetpack_backup_dashboard_routes_data, 'jetpack_backup_register_jetpack_backup_dashboard_route' );
}
add_action( 'jetpack-backup-dashboard_init', 'jetpack_backup_register_jetpack_backup_dashboard_page_routes' );
/**
* Register routes for jetpack-backup-dashboard page (wp-admin mode).
*/
function jetpack_backup_register_jetpack_backup_dashboard_wp_admin_page_routes() {
global $jetpack_backup_jetpack_backup_dashboard_routes_data;
jetpack_backup_register_page_routes( $jetpack_backup_jetpack_backup_dashboard_routes_data, 'jetpack_backup_register_jetpack_backup_dashboard_wp_admin_route' );
}
add_action( 'jetpack-backup-dashboard-wp-admin_init', 'jetpack_backup_register_jetpack_backup_dashboard_wp_admin_page_routes' );
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '2265a8c314eb50f1e452');
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'bdca920315a6e5637299');
@@ -0,0 +1 @@
var o={};export{o as route};
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'd5b51fbdaedc42e22931');
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'bdca920315a6e5637299');
@@ -0,0 +1 @@
var o={};export{o as route};
@@ -0,0 +1,31 @@
<?php
/**
* Route registry - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
return array(
array(
'name' => 'dashboard',
'path' => '/',
'page' => 'jetpack-backup-dashboard',
'has_route' => true,
'has_content' => true,
),
array(
'name' => 'download',
'path' => '/download/$rewindId',
'page' => 'jetpack-backup-dashboard',
'has_route' => true,
'has_content' => true,
),
array(
'name' => 'restore',
'path' => '/restore/$rewindId',
'page' => 'jetpack-backup-dashboard',
'has_route' => true,
'has_content' => true,
)
);
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '868a35ed1bba54131d12');
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'bdca920315a6e5637299');
@@ -0,0 +1 @@
var o={};export{o as route};
@@ -0,0 +1,85 @@
<?php
/**
* Script registration - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
/**
* Registers a script according to `wp_register_script`. Honors this request by
* reassigning internal dependency properties of any script handle already
* registered by that name. It does not deregister the original script, to
* avoid losing inline scripts which may have been attached.
*
* @param WP_Scripts $scripts WP_Scripts instance.
* @param string $handle Name of the script. Should be unique.
* @param string $src Full URL of the script, or path of the script relative to the WordPress root directory.
* @param array $deps Optional. An array of registered script handles this script depends on. Default empty array.
* @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL
* as a query string for cache busting purposes. If version is set to false, a version
* number is automatically added equal to current installed WordPress version.
* If set to null, no version is added.
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
* Default 'false'.
*/
function jetpack_backup_override_script( $scripts, $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
$script = $scripts->query( $handle, 'registered' );
if ( $script ) {
/*
* In many ways, this is a reimplementation of `wp_register_script` but
* bypassing consideration of whether a script by the given handle had
* already been registered.
*/
// See: `_WP_Dependency::__construct` .
$script->src = $src;
$script->deps = $deps;
$script->ver = $ver;
$script->args = $in_footer ? 1 : null;
} else {
$scripts->add( $handle, $src, $deps, $ver, ( $in_footer ? 1 : null ) );
}
if ( in_array( 'wp-i18n', $deps, true ) ) {
$scripts->set_translations( $handle );
}
}
/**
* Register all package scripts.
*/
function jetpack_backup_register_package_scripts( $scripts ) {
// Load build constants
$build_constants = require __DIR__ . '/constants.php';
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
$extension = '.min.js';
$scripts_dir = __DIR__ . '/scripts';
$scripts_file = $scripts_dir . '/registry.php';
if ( ! file_exists( $scripts_file ) ) {
return;
}
$scripts_data = require $scripts_file;
$plugin_dir = dirname( __FILE__ );
foreach ( $scripts_data as $script_data ) {
$asset_file = $scripts_dir . '/' . $script_data['asset'];
$asset = file_exists( $asset_file ) ? require $asset_file : array();
$dependencies = $asset['dependencies'] ?? array();
$version = $asset['version'] ?? $default_version;
jetpack_backup_override_script(
$scripts,
$script_data['handle'],
$build_constants['build_url'] . 'scripts/' . $script_data['path'] . $extension,
$dependencies,
$version,
true
);
}
}
add_action( 'wp_default_scripts', 'jetpack_backup_register_package_scripts' );
@@ -0,0 +1,11 @@
<?php
/**
* Script registry - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
return array(
);
@@ -0,0 +1,73 @@
<?php
/**
* Style registration - Auto-generated by build process.
* Do not edit this file manually.
*
* Note: These styles can be overridden by calling jetpack_backup_override_style()
* in lib/client-assets.php for complex cases (multiple files, conditional deps, etc.)
*
* @package jetpack_backup
*/
/**
* Registers a style according to `wp_register_style`. Honors this request by
* deregistering any style by the same handler before registration.
*
* @param WP_Styles $styles WP_Styles instance.
* @param string $handle Name of the stylesheet. Should be unique.
* @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
* @param array $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
* @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL
* as a query string for cache busting purposes. If version is set to false, a version
* number is automatically added equal to current installed WordPress version.
* If set to null, no version is added.
* @param string $media Optional. The media for which this stylesheet has been defined.
* Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
* '(orientation: portrait)' and '(max-width: 640px)'.
*/
function jetpack_backup_override_style( $styles, $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
$style = $styles->query( $handle, 'registered' );
if ( $style ) {
$styles->remove( $handle );
}
$styles->add( $handle, $src, $deps, $ver, $media );
}
/**
* Register all package styles (simple cases only).
* Complex cases should be manually registered in lib/client-assets.php.
*
* @param WP_Styles $styles WP_Styles instance.
*/
function jetpack_backup_register_package_styles( $styles ) {
// Load build constants
$build_constants = require __DIR__ . '/constants.php';
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
$suffix = '.min';
$styles_dir = __DIR__ . '/styles';
$styles_file = $styles_dir . '/registry.php';
if ( ! file_exists( $styles_file ) ) {
return;
}
$styles_data = require $styles_file;
$plugin_dir = dirname( __FILE__ );
foreach ( $styles_data as $style_data ) {
jetpack_backup_override_style(
$styles,
$style_data['handle'],
$build_constants['build_url'] . 'styles/' . $style_data['path'] . $suffix . '.css',
$style_data['dependencies'],
$default_version
);
// Enable RTL support (WordPress automatically loads -rtl.css variant)
$styles->add_data( $style_data['handle'], 'rtl', 'replace' );
$styles->add_data( $style_data['handle'], 'suffix', $suffix );
}
}
add_action( 'wp_default_styles', 'jetpack_backup_register_package_styles' );
@@ -0,0 +1,11 @@
<?php
/**
* Style registry - Auto-generated by build process.
* Do not edit this file manually.
*
* @package jetpack_backup
*/
return array(
);