Comments (4)
I'm having a similar issue with translations. In the plugins_loaded
hook, get_locale()
returns en_US, while the language is set to nl_NL in my config/intervention.php file. Database value is EMPTY. I need to update the database value in order to get the correct translation.
Am I missing the point? Is intervention only disabling the options, but not settings their values?
from intervention.
Hey @tombroucke,
I will check on the first issue regarding the timezone.
I'm using the WordPress switch_to_locale
function for languages, with the init
hook. https://github.com/soberwp/intervention/blob/main/src/Application/General.php#L125-L134
The plugins_loaded
hook fires before and therefore Intervention has not yet applied the function.
Regarding database values, Intervention uses pre_option
when available, and therefore does not update the DB. Here's the thread on the reasoning behind that. #64
You can import values under Tools > Intervention > Application which will run update_option
and update the database values according to the Intervention config file. (please do a database backup prior!). This should solve your issue with the plugins_loaded
hook firing first.
from intervention.
@tombroucke I seem unable to reproduce the timezone issue with a post changing from publish
to schedule
. Do you have any other plugins installed which may affect this?
from intervention.
Hi,
Please see the screen recording below. Fresh install, twentytwentyone & intervention as the only active plugin. When I deactivate intervention, I can correctly publish new posts.
<?php
return [
'wp-admin' => [
'editor|shop_manager' => [
'common' => [
'adminbar' => [
'comments' => false,
'search' => false,
'updates' => false,
'site' => [
'themes' => false
]
],
'updates' => false,
],
'comments' => true,
'dashboard' => 'pages',
'tools' => true,
]
],
'application' => [
'theme' => 'twentytwentyone',
'general' => [
'membership' => false,
'default-role' => 'subscriber',
'timezone' => 'Europe/Brussels',
'date-format' => 'j F Y',
'time-format' => 'H:i',
'week-starts' => 'Mon',
],
'writing' => [
'emoji' => 'false',
],
'reading' => [
'posts-per-page' => 10,
'posts-per-rss' => 10,
'rss-excerpt' => 'full',
],
'media' => [
'sizes' => [
'thumbnail' => [
'width' => 300,
'height' => 200,
'crop' => true,
],
'medium' => [
'width' => 800,
'height' => 800,
'crop' => false,
],
'large' => [
'width' => 1920,
'height' => 1920,
'crop' => true,
],
],
'uploads.organize' => true,
],
'permalinks' => [
'structure' => '/%postname%/',
'category-base' => 'category',
'tag-base' => 'tag',
'search-base' => 'search',
],
],
];
Screen.Recording.2021-12-20.at.09.14.23.mov
from intervention.
Related Issues (20)
- Composer dependency incompatibilities with Sage 9 HOT 7
- Remove activate and deactivate actions when defining plugin state in config HOT 5
- Publish plugin to wordpress.org HOT 3
- [application.media] HOT 18
- Add support for WordPress code style/format/linting HOT 3
- Fatal error HOT 22
- [Featured Request] Additional Page Attribute Settings HOT 3
- Post types with "-" HOT 4
- Upgrade illuminate/collections HOT 2
- Settings to disable WP components
- Deprecated messages on PHP 8.2 HOT 1
- Need help to install plugin HOT 3
- Docker + Roots wrong composer inclusion path HOT 7
- Plugin could not be activated because it triggered a fatal error HOT 3
- Noob trouble trying to get Intervention working. HOT 7
- Something goes wrong setting options / saving to database HOT 7
- Rename the master branch to main HOT 2
- Feature idea: add theme supports HOT 2
- Translatable labels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intervention.