tombroucke/otomaties-bootstrap-popup
最新稳定版本:2.7.0
Composer 安装命令:
composer require tombroucke/otomaties-bootstrap-popup
包简介
README 文档
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);
wp_enqueue_scripts priority should be > 999
Load javascript without bootstrap
add_filter('otomaties_bootstrap_popup_load_bootstrap', fn() => false);
Pass modal component through a custom BootstrapLoaded event
import { Modal } from 'bootstrap'; const bootstrapComponents = { modal: Modal, // `bootstrap.Modal` if you're not importing bootstrap } 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', fn() => '4.x');
Filter available bootstrap themes
otomaties_bootstrap_popup_button_themes
Center popup
add_filter('otomaties_bootstrap_popup_modal_dialog_classes', fn($classes) => $classes . ' modal-dialog-centered');
统计信息
- 总下载量: 1.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-01-26