You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What in this template can be improved or added as a feature?
Since application containers are read-only, any attempts to add plugins/themes via the admin UI will fail, and prompt the user for SFTP credentials. For users who are new to platform.sh, this can cause considerable confusion.
What exactly should be updated?
In wp-config.php, we should add
define('DISALLOW_FILE_MODS',true);
Which will disable the ability to add new plugins/themes, and removes the file editor. However, because this too can be a bit jarring to users new to Platform.sh, it's suggested we add a warning to the Plugin and Theme panels letting users know the "Add New" is unavailable due to the system being read-only. We can do this by adding in a must-use plugin that hooks to admin_notices.
The following is SAMPLE code on how we could accomplish this.
<?php/** * Platform.sh Admin UI Plugin/Theme Notifier * * Plugin Name: Platform.sh Plugin/Theme Notifier * Plugin URI: https://platform.sh/ * Description: Displays a warning in the plugins, themes admin panels that adding new/updating themes is disabled. * Version: 0.1.0 * Author: Paul Gilzow, Platform.sh * Author URI: https://github.com/platformsh * Tested up to: 6.0 * Requires PHP: 5.2.4 * */if ( defined('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS ) {
add_action('admin_notices', function () {
$panels = ['plugins','themes'];
$screen = get_current_screen();
if(in_array($screen->id, $panels)) {
$notice = sprintf('<div class="notice notice-warning is-dismissible"> <p> Due to how Platform.sh operates, adding new %1$s and updating %1$s from this admin panel have been disabled. Please see <a href="https://docs.platform.sh/guides/wordpress/composer.html">this document</a> for additional information. </p> </div>', $screen->id);
echo$notice;
}
});
}
It was suggested that we improve the language in the notice a bit more before implementing.
Example screen shots:
Plugins:
Themes:
How important is this feature to you?
Adding this new feature will help alleviate new customer frustration, and get relevant information to them earlier in the process of their exploration of Platform.sh
Additional context
No response
The text was updated successfully, but these errors were encountered:
What in this template can be improved or added as a feature?
Since application containers are read-only, any attempts to add plugins/themes via the admin UI will fail, and prompt the user for SFTP credentials. For users who are new to platform.sh, this can cause considerable confusion.
What exactly should be updated?
In wp-config.php, we should add
Which will disable the ability to add new plugins/themes, and removes the file editor. However, because this too can be a bit jarring to users new to Platform.sh, it's suggested we add a warning to the Plugin and Theme panels letting users know the "Add New" is unavailable due to the system being read-only. We can do this by adding in a must-use plugin that hooks to
admin_notices
.The following is SAMPLE code on how we could accomplish this.
It was suggested that we improve the language in the notice a bit more before implementing.
Example screen shots:
![Screen Shot 2022-07-08 at 12 56 20 PM](https://user-images.githubusercontent.com/2332956/178045321-f7f42801-6045-4eda-bd7f-b490b1bddd48.png)
Plugins:
Themes:
![Screen Shot 2022-07-08 at 12 57 03 PM](https://user-images.githubusercontent.com/2332956/178045402-8328aafe-0da3-4035-8bb2-24f17519e069.png)
How important is this feature to you?
Adding this new feature will help alleviate new customer frustration, and get relevant information to them earlier in the process of their exploration of Platform.sh
Additional context
No response
The text was updated successfully, but these errors were encountered: