tombroucke / otomaties-bootstrap-popup
Installs: 1 173
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 7
Type:wordpress-plugin
Requires
- composer/installers: ^2.0
- johnbillion/extended-cpts: ^5.0
- stoutlogic/acf-builder: ^1.12
- tombroucke/wp-models: ^2.1
Requires (Dev)
- dev-master
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-snyk-fix-faab6637fd52018250685048b9896ba7
- dev-snyk-fix-ac8b412276a1acd9672be7d21965ff1a
- dev-snyk-fix-5e0c8b4be6428dfd7d8746f7060c333e
- dev-snyk-fix-ea1425993087f20430ecb20dadeacb7c
- dev-snyk-upgrade-a88bec7998a1f67cbbc27efff9f49e42
- dev-snyk-upgrade-2e5eb056a04153006b36a032af0a0697
- dev-snyk-upgrade-4ca97537b7015453d01da7f38dc395c4
This package is auto-updated.
Last update: 2024-11-25 09:18:12 UTC
README
Load Bootstrap JS from theme or other plugin
If you're loading bootstrap JS in your theme or another plugin, there's no need to load it twice. Loading it twice leads to slower loading times and could cause conflicts.
Make sure otomaties-bootstrap-popup is loaded first
$dependencies = wp_script_is('otomaties-bootstrap-popup', 'enqueued') ? ['otomaties-bootstrap-popup'] : []; bundle('app')->enqueueCss()->enqueueJs(true, $dependencies);
Load javascript without bootstrap
add_filter('otomaties_bootstrap_popup_load_bootstrap', '__return_false');
Pass modal component through a custom BootstrapLoaded event
import { Modal } from 'bootstrap'; const bootstrapComponents = { modal: Modal, } const bootstrapLoadedEvent = new CustomEvent('BootstrapLoaded', {detail: {components : bootstrapComponents}}); window.dispatchEvent(bootstrapLoadedEvent);
Filters
Use BS 4.x instead of 5.x
add_filter('otomaties_bootstrap_popup_bootstrap_version', function() { return '4.x'; });
Filter available bootstrap themes
otomaties_bootstrap_popup_button_themes
Center popup
add_filter('otomaties_bootstrap_popup_modal_dialog_classes', function ($classes) { $classes .= ' modal-dialog-centered'; return $classes; });