Skip to content

Commit

Permalink
Fix/issue description not showing up on backup card (#40904)
Browse files Browse the repository at this point in the history
* Fix issue where description doesn't show up on backup card and remove deprecated code

* changelog

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12772049335

Upstream-Ref: Automattic/jetpack@438c4b6
  • Loading branch information
CodeyGuyDylan authored and matticbot committed Jan 14, 2025
1 parent 3deafe9 commit 17453d6
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 163 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"automattic/jetpack-config": "^3.0.0",
"automattic/jetpack-publicize": "^0.57.3-alpha",
"automattic/jetpack-connection": "^6.2.2",
"automattic/jetpack-my-jetpack": "^5.3.1",
"automattic/jetpack-my-jetpack": "^5.3.2-alpha",
"automattic/jetpack-sync": "^4.3.0",
"automattic/jetpack-status": "^5.0.1",
"automattic/jetpack-plans": "^0.5.1",
Expand Down
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.3.2-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Fixed
- Fix bug where description doesn't show up on backup card in specific scenarios

## [5.3.1] - 2025-01-10
### Added
- Add new WAF status on Protect card for when WAF is unsupported. [#40880]
Expand Down Expand Up @@ -1902,6 +1909,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created package

[5.3.2-alpha]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.3.1...5.3.2-alpha
[5.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.3.0...5.3.1
[5.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.2.0...5.3.0
[5.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.1.2...5.2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '82cd9f738294716d43b4');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6ab3699f47ebfa7d6508');
24 changes: 6 additions & 18 deletions jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion jetpack_vendor/automattic/jetpack-my-jetpack/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ type JetpackModule =
| 'complete'
| 'site-accelerator'
| 'newsletter'
| 'related-posts';
| 'related-posts'
| 'brute-force';

type ThreatItem = {
// Protect API properties (free plan)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Initializer {
*
* @var string
*/
const PACKAGE_VERSION = '5.3.1';
const PACKAGE_VERSION = '5.3.2-alpha';

/**
* HTML container ID for the IDC screen on My Jetpack page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ public function __construct() {
'permission_callback' => __CLASS__ . '::permissions_callback',
)
);

register_rest_route(
'my-jetpack/v1',
'/site/backup/count-items',
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => __CLASS__ . '::count_things_that_can_be_backed_up',
'permission_callback' => __CLASS__ . '::permissions_callback',
)
);
}

/**
Expand Down Expand Up @@ -109,39 +99,4 @@ public static function get_site_backup_undo_event() {

return rest_ensure_response( $undo_event );
}

/**
* This will collect a count of all the items that could be backed up
* This is used to show what backup could be doing if it is not enabled
*
* @return WP_Error|\WP_REST_Response
*/
public static function count_things_that_can_be_backed_up() {
$image_mime_type = 'image';
$video_mime_type = 'video';
$audio_mime_type = 'audio';

$data = array();

// Add all post types together to get the total post count
$data['total_post_count'] = array_sum( (array) wp_count_posts( 'post' ) );

// Add all page types together to get the total page count
$data['total_page_count'] = array_sum( (array) wp_count_posts( 'page' ) );

// Add all comments together to get the total comment count
$comments = (array) wp_count_comments();
$data['total_comment_count'] = $comments ? $comments['total_comments'] : 0;

// Add all image attachments together to get the total image count
$data['total_image_count'] = array_sum( (array) wp_count_attachments( $image_mime_type ) );

// Add all video attachments together to get the total video count
$data['total_video_count'] = array_sum( (array) wp_count_attachments( $video_mime_type ) );

// Add all audio attachments together to get the total audio count
$data['total_audio_count'] = array_sum( (array) wp_count_attachments( $audio_mime_type ) );

return rest_ensure_response( $data );
}
}
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
),
'jetpack-my-jetpack' => array(
'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
'ver' => '5.3.1',
'ver' => '5.3.2-alpha1736872081',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
Expand Down
60 changes: 30 additions & 30 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "a92027343054acd637a8182dd3faf2ed645c39a5"
"reference": "f11c9b57823a50e513e85cdded8d2e8e020e84d4"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "8e9dac204663bcc6d429cb0243a5930d6aeb07d6"
"reference": "e7f328e4a8ac277d6ce12aa1ffc92301f2dc09ac"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -131,7 +131,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "09d8ab75c2707e662706654c6eb8f1a0c82a84bf"
"reference": "d9704d2ac396f11678ed5b521e4d3625c34a21cb"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -203,7 +203,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "c41584c8483991be7c4776eecae4e97ab860bec4"
"reference": "29e4bf792bd0c1f0b1d654c0b119303c5bf14932"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -274,7 +274,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "6f34905d3bbc88cbf949ea929d861defa693e8d5"
"reference": "63f1191cf32ecc37c89f9247c716e5554691794f"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down Expand Up @@ -345,7 +345,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "24bc9d73d512a9cfe8f2f5fbcc4a6c6f050f8f57"
"reference": "acbde11012a1f0b90dd0d41099a639d77b5f93b0"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.3",
Expand Down Expand Up @@ -424,7 +424,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "7eea8794ccb7430f3ac74bc74f84405a213a4065"
"reference": "ef0a53054c65ceca589d9afcd64b79aafc29cbb3"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -487,7 +487,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "63dd4f7d930fa51a39b3261f6de565b0ab19f8c6"
"reference": "dfeba0102cf9038d6cffb695e0fe1cf7e25679a0"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -562,7 +562,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "d3b9c53e9e4c3c45746c0d010835d1b6edc1f8c8"
"reference": "618a29e1ce2e36bb2889dfe1fbd89f740233a423"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -655,7 +655,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "35282eb1c5e98dbbe6cbcb590d9d0c325aa6e269"
"reference": "6e55ae15449708e9cfcb05229c245afe13840f3c"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -712,7 +712,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "707f90b23e8122239db390241558ccdccf2a53ec"
"reference": "25705063a6e75f1cd84155c427134ed73de1c839"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -768,7 +768,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "eada0dc01cb41ecb6461d5bbbe2631c945042a28"
"reference": "3a3c31d8f905ac8a0e02d7f9fbd2167a71534d33"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down Expand Up @@ -846,7 +846,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "5416bc6568c21615ea3a5fb73548ca5c7254cd7d"
"reference": "dce5a4a9d82b824c31d9b217078040f677695a0d"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -907,7 +907,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "c7d0a6f613c2ced940f1e59e4d48afd78abda65e"
"reference": "e40a46e32df92ea5bf3962d647f3fcd52b43520f"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -985,7 +985,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "4c7fb33bfa034f8ba022282ff175a03c2be23412"
"reference": "6d3905f9adf0e10512aa81cf47b530523fc37817"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down Expand Up @@ -1050,7 +1050,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "900adbaa3be9833bfa973488eda2ae23c827b773"
"reference": "a2c5612eb789d229fd60129e4a0da89ef0de633b"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1101,12 +1101,12 @@
},
{
"name": "automattic/jetpack-my-jetpack",
"version": "5.3.1",
"version_normalized": "5.3.1.0",
"version": "5.3.2-alpha.1736872081",
"version_normalized": "5.3.2.0-alpha1736872081",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "9d86810f0de7662a8ed006500458bd2276a46f4d"
"reference": "f0908307bd82237dd55e51f83506cfe1d123fb01"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.1",
Expand Down Expand Up @@ -1211,7 +1211,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "40c4538863b632edb8acc22f7fe8e54b6b10ba68"
"reference": "af1f0e90453eede962f43bc8256df4a086f441d3"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1275,7 +1275,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "deb9c7ea4a0cdd0e136a876edfcdf7f916a95824"
"reference": "1d7c3a95c557f73f71741e6db11e80809a179ae7"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down Expand Up @@ -1346,7 +1346,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "86ed5b3fc3d5909f5d3acdd3eae8f7a68af5b21b"
"reference": "16bb10869a38f2cd7acae4a3ca5786fb5fe6e79a"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1405,7 +1405,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-post-list",
"reference": "c75bc8ea939c382f8f5a5000daf12121c16671b0"
"reference": "27bf765624eaf74a57f20bbd562b810deefbf0d2"
},
"require": {
"automattic/jetpack-assets": "^4.0.2",
Expand Down Expand Up @@ -1473,7 +1473,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "dd18fe6bf9c9b97d18ec8900854a4b8f9c2486f9"
"reference": "d873670ca9619f98267988318646a4243689540a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1546,7 +1546,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "c4ba04c533bd7c4a5bd769e619593f4dc26474f6"
"reference": "197ee1efec673eaed482c3ca4abaa19a63f69d3d"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down Expand Up @@ -1624,7 +1624,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-publicize",
"reference": "3950a35960d44da605d50e4f9d1e407c73df8c70"
"reference": "b2d2cbc95a7ac455a110f864f52078e2aa5ad560"
},
"require": {
"automattic/jetpack-assets": "^4.0.2",
Expand Down Expand Up @@ -1709,7 +1709,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "1802d16ad7ae6708487177522edff565d6d6dc48"
"reference": "40a01b63eaac7b1d6f1fb8edef2662898d139d1d"
},
"require": {
"automattic/jetpack-status": "^5.0.1",
Expand Down Expand Up @@ -1767,7 +1767,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "7be82f14ef917480034d46bc900c6c2d5c8cf27e"
"reference": "d1786160663850b16a48136cc764d140d952c618"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1824,7 +1824,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "11523779dd46d8afe7df1ac69f40881d0386b3f5"
"reference": "990564a6eb7a8782e450fcbf49f0f59a29afa2a8"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -1891,7 +1891,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "1a6350e6d7fab1866e1049a4134909525e0490f4"
"reference": "f9b794f9315e9f052437f641f25d0791031d195c"
},
"require": {
"automattic/jetpack-connection": "^6.2.2",
Expand Down
Loading

0 comments on commit 17453d6

Please sign in to comment.