← All changes
|
includes/ui_modal__shortcodes/tiny-button-popup.php
+19
-9
10.10.2
→
11.8.4
View file →
| @@ -69,9 +69,10 @@ | ||
| 69 | 69 | // Add the old style button to the non-TinyMCE editor views //Fix: 8.4.2.10 - compatibility with Gutenberg 4.1- 4.3 ( or newer ) at edit post page. |
| 70 | 70 | add_action( 'edit_page_form', array( $this, 'add_html_button' ) ); |
| 71 | 71 | add_action( 'admin_head', array( $this, 'insert_button') ); // Tiny Button |
| 72 | 72 | add_action( 'admin_footer', array( $this, 'modal_content' ) ); // Modal Content |
| 73 | - | |
| 73 | + | |
| 74 | + | |
| 74 | 75 | // JS & CSS |
| 75 | 76 | wpbc_load_js__required_for_modals(); |
| 76 | 77 | |
| 77 | 78 | add_action( 'customize_controls_print_footer_scripts', array( $this, 'add_html_button' ) ); // FixIn: 8.8.2.12. |
| @@ -168,15 +169,17 @@ | ||
| 168 | 169 | public function insert_button() { |
| 169 | 170 | |
| 170 | 171 | $script = ''; |
| 171 | 172 | |
| 172 | - // calendar3-range https://icons.getbootstrap.com/icons/calendar3-range/ | |
| 173 | - $svg_icon_integarted = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar3-range" viewBox="-2 -1 20 20">' | |
| 174 | - . '<path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/>' | |
| 175 | - . '<path d="M7 10a1 1 0 0 0 0-2H1v2h6zm2-3h6V5H9a1 1 0 0 0 0 2z"/>' | |
| 176 | - . '</svg>'; | |
| 177 | - $mune_icon_url = sprintf( 'data:image/svg+xml;base64,%s', base64_encode( $svg_icon_integarted ) ); | |
| 173 | +// // calendar3-range https://icons.getbootstrap.com/icons/calendar3-range/ | |
| 174 | +// $svg_icon_integarted = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar3-range" viewBox="-2 -1 20 20">' | |
| 175 | +// . '<path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/>' | |
| 176 | +// . '<path d="M7 10a1 1 0 0 0 0-2H1v2h6zm2-3h6V5H9a1 1 0 0 0 0 2z"/>' | |
| 177 | +// . '</svg>'; | |
| 178 | +// $mune_icon_url = sprintf( 'data:image/svg+xml;base64,%s', base64_encode( $svg_icon_integarted ) ); | |
| 178 | 179 | |
| 180 | + // FixIn: 10.11.3.3. | |
| 181 | + $mune_icon_url = wpbc_get_svg_logo_for_background( '#000', '#aaa', '0.3' ); // '#aaa', '#aaa', '0.2' . | |
| 179 | 182 | |
| 180 | 183 | if ( ! empty( $this->settings['buttons'] ) ){ |
| 181 | 184 | |
| 182 | 185 | $script .= '<script type="text/javascript">'; |
| @@ -210,9 +213,9 @@ | ||
| 210 | 213 | // <editor-fold defaultstate="collapsed" desc=" M o d a l C o n t e n t " > |
| 211 | 214 | public function modal_content() { |
| 212 | 215 | |
| 213 | 216 | ?><span class="wpdevelop wpbc_page"><div class="visibility_container clearfix-height" style="display:block;"><?php |
| 214 | - ?><div id="wpbc_tiny_modal" class="modal wpbc_popup_modal wpbc_tiny_modal" tabindex="-1" role="dialog"> | |
| 217 | + ?><div id="wpbc_tiny_modal" class="modal wpbc_popup_modal wpbc_tiny_modal wpbc_shortcode_config__scroll_mode" tabindex="-1" role="dialog"> | |
| 215 | 218 | <div class="modal-dialog modal-lg"> |
| 216 | 219 | <div class="modal-content"> |
| 217 | 220 | <div class="modal-header"> |
| 218 | 221 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| @@ -240,8 +243,14 @@ | ||
| 240 | 243 | |
| 241 | 244 | // [bookingcalendar ... ] ---------------------------------------------------------- |
| 242 | 245 | wpbc_shortcode_config__content__bookingcalendar(); |
| 243 | 246 | |
| 247 | + // [booking_appointment ... ] -------------------------------------------------- | |
| 248 | + wpbc_shortcode_config__content__booking_appointment(); | |
| 249 | + | |
| 250 | + // [booking_resource_selector ... ] -------------------------------------------- | |
| 251 | + wpbc_shortcode_config__content__booking_resource_selector(); | |
| 252 | + | |
| 244 | 253 | // [bookingselect ... ] ------------------------------------------------------------ |
| 245 | 254 | wpbc_shortcode_config__content__bookingselect(); |
| 246 | 255 | |
| 247 | 256 | // [bookingtimeline ... ] ---------------------------------------------------------- |
| @@ -313,10 +322,11 @@ | ||
| 313 | 322 | |
| 314 | 323 | |
| 315 | 324 | if ( |
| 316 | 325 | ( in_array( basename( $_SERVER['PHP_SELF'] ), wpbc_get_pages_where_insert_tiny_mce_buttons() ) ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing |
| 317 | - || ( ( isset( $_REQUEST['page'] ) && ( 'wpbc-resources' === $_REQUEST['page'] ) ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing | |
| 326 | + || wpbc_can_i_load_on__resources_page() | |
| 318 | 327 | || wpbc_is_setup_wizard_page() // || wpbc_is_bookings_page() // FixIn: 10.6.6.2. |
| 328 | + || wpbc_is_builder_booking_form_page() | |
| 319 | 329 | ) { |
| 320 | 330 | // FixIn: 10.6.5.1. |
| 321 | 331 | new WPBC_TinyMCE_Buttons( array( |
| 322 | 332 | 'tiny_prefix' => 'wpbc_tiny', |