after-kubio-activation.php
4 months ago
allow-kubio-blog-override.php
2 years ago
cache-plugins.php
4 years ago
default-editor-overlay.php
1 year ago
dismissable-notice.php
1 month ago
gutenerg-plugin-check.php
1 year ago
image-size-auto-fix.php
1 year ago
kubio-fresh-site.php
2 years ago
post-insert.php
4 months ago
register-meta-fields.php
3 years ago
requirements-notices.php
1 year ago
site-urls.php
1 year ago
starter-sites-feature.php
1 year ago
svg-kses.php
1 year ago
wp-import.php
3 months ago
after-kubio-activation.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | use Kubio\Flags; |
| 4 | |
| 5 | function kubio_set_editor_ui_version() { |
| 6 | Flags::setSetting( 'editorUIVersion', 2 ); |
| 7 | Flags::setSetting( 'editorMode', 'advanced' ); |
| 8 | Flags::setSetting( 'activatedOnStage2', true ); |
| 9 | Flags::setSetting( 'aiStage2', apply_filters( 'kubio/ai_stage_2', false ) || ( defined( 'KUBIO_AI_STAGE_2' ) && KUBIO_AI_STAGE_2 ) ); |
| 10 | Flags::setSetting( 'advancedMode', apply_filters( 'kubio/advanced_mode_enabled', false ) ); |
| 11 | Flags::setSetting( 'featuresVersion', apply_filters( 'kubio/featuresVersion', 2 ) ); |
| 12 | |
| 13 | //enable the fix for wordpress setting for blog as frontpage only for new users to not cause issues for current users |
| 14 | Flags::setSetting( 'enableBlogAsFrontPageFromGeneralSettings', true ); |
| 15 | |
| 16 | //Enable the fix for "0057672: [ Business pro template ] - When hovering the buttons the text is not visible anymore" |
| 17 | //only for new users to not break frontend websites for old users. This happens only for users who use template gallery -> |
| 18 | //page content. The logic is that old users either found a solution or did not like them and we care only for new users |
| 19 | //who may encounter the issue |
| 20 | Flags::setSetting( 'enableTypographyBodySelector', true ); |
| 21 | |
| 22 | Flags::setSetting( 'allowSiteLeadsRecommendations', true); |
| 23 | } |
| 24 | |
| 25 | |
| 26 | //after the theme changes update the aiStage2 flag |
| 27 | add_filter( |
| 28 | 'after_switch_theme', |
| 29 | function () { |
| 30 | Flags::setSetting( 'aiStage2', apply_filters( 'kubio/ai_stage_2', false ) || ( defined( 'KUBIO_AI_STAGE_2' ) && KUBIO_AI_STAGE_2 ) ); |
| 31 | } |
| 32 | ); |
| 33 | |
| 34 | add_action( 'kubio/after_activation', 'kubio_set_editor_ui_version' ); |
| 35 | add_action( 'kubio/after_activation', '_kubio_set_fresh_site' ); |
| 36 | |
| 37 | //For this issue. https://mantis.iconvert.pro/view.php?id=52025. On Bluehost all the rest api return 404 and needs a flush permalink to fix it |
| 38 | add_action( 'kubio/after_activation', 'flush_rewrite_rules' ); |
| 39 | add_action( |
| 40 | 'kubio/after_activation', |
| 41 | function () { |
| 42 | Flags::setSetting( 'aiWizardDescriptionOptional', true ); |
| 43 | } |
| 44 | ); |
| 45 |