Read-only archive : Issues · ClassicPress/ClassicPress · GitHub
Author : Dora D.
Vote count : 13
Status : Pull Request
Tags :
Comments
Same for themes
~ posted by Dora D.
The would open up a can of worms… I suggest to keep it as strict as possible, preferrable a ClassicPress repository for themes and plugins.
~ posted by Rudy Brinkman
Agree, it can already be done. Without description of what the idea is, I don’t understand.
~ posted by a ClassicPress Supporter
1 Like
The Update Manager plugin allows you to update plugins and themes from any remote location. It’s tightly integrated with the ClassicPress update process to create a perfectly seamless dashboard update experience for your end-users.
https://codepotent.com/classicpress/plugins/update-manager/
2 Likes
viktor
August 29, 2021, 5:51pm
5
A plugin already exists that offers this functionality, which is now maintained by @Simone . Closing petition.
1 Like
james
August 29, 2021, 9:41pm
8
Reopening due to a concern raised on Slack:
The reason given is inaccurate. A plugin is not adequate for this.
WordPress has implemented a similar change in 5.8 which we should consider backporting as a starting point for this petition: Introducing “Update URI” plugin header in WordPress 5.8 – Make WordPress Core
I think this isn’t a complete solution, but it’s a good starting point.
2 Likes
viktor
October 7, 2022, 12:24am
10
There’s a PR that will add Update URI header support:
ClassicPress:develop
← xxsimoxx:updateURI
opened 07:38AM - 03 Oct 22 UTC
## Description
This allows third-party plugins to avoid accidentally being over… written with an update of a plugin of a similar name from the WordPress.org Plugin Directory.
Additionally, introduce the `update_plugins_{$hostname}` filter, which third-party plugins can use to offer updates for a given hostname.
## Motivation and context
1. Give plugin developers to specify that the updates are not handled by the WP repo.
2. Add a filter that can be useful in the integration of the new ClassicPress directory.
## How has this been tested?
With this code I've successfully update a plugin trom a fork of the new directory.
**Note: the 'View Details' link with this code don't work.**
```
add_filter('update_plugins_dir.educatorecinofilo.dog', 'xsx_test', 10, 4);
function xsx_test($update, $plugin_data, $plugin_file, $locales) {
$slug = dirname($plugin_file);
$endpoint = 'https://dir.educatorecinofilo.dog/wp-json/wp/v2/plugins?byslug='.sanitize_key($slug);
$endpoint = 'https://dir.educatorecinofilo.dog/wp-json/wp/v2/plugins?byslug=vars';
$response = wp_remote_get($endpoint, ['user-agent' => 'WordPress/4.9.20; https://www.classicpress.net/?wp_compatible=true;'.get_bloginfo('url')]);
if (is_wp_error($response) || empty($response['response']) || $response['response']['code'] != '200') {
return false;
}
$update_info = json_decode(wp_remote_retrieve_body($response), true);
$update = [
'slug' => $plugin_file,
'version' => $update_info[0]['meta']['current_version'],
'package' => $update_info[0]['meta']['download_link'],
'requires_php' => $update_info[0]['meta']['requires_php'],
'sections' => ['description' => $update_info[0]['content']['rendered'] ]
];
return $update;
}
```
## Types of changes
- New feature
Closes #889
Closes #908
This petition will be closed.
viktor
Closed
October 10, 2022, 12:25am
11
This topic was automatically closed after 3 days. New replies are no longer allowed.