Changeset 3491589
- Timestamp:
- 03/26/2026 08:45:30 AM (2 days ago)
- Location:
- booking/trunk
- Files:
-
- 3 edited
-
includes/page-form-builder/save-load/bfb-activate.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wpdev-booking.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
booking/trunk/includes/page-form-builder/save-load/bfb-activate.php
r3491564 r3491589 543 543 544 544 545 546 545 /** 546 * Remove BFB Preview page from rendered nav menus. 547 * 548 * @param array $sorted_menu_items Menu item objects. 549 * @param stdClass $args Menu args. 550 * 551 * @return array 552 */ 553 function wpbc_bfb_preview__exclude_from_nav_menus( $sorted_menu_items, $args ) { 554 555 $page_id = absint( get_option( wpbc_bfb_activation__get_preview_page_option_key() ) ); 556 557 if ( $page_id <= 0 ) { 558 return $sorted_menu_items; 559 } 560 561 $filtered_items = array(); 562 563 foreach ( $sorted_menu_items as $menu_item ) { 564 565 $object_id = isset( $menu_item->object_id ) ? absint( $menu_item->object_id ) : 0; 566 $object = isset( $menu_item->object ) ? (string) $menu_item->object : ''; 567 568 if ( ( 'page' === $object ) && ( $page_id === $object_id ) ) { 569 continue; 570 } 571 572 $filtered_items[] = $menu_item; 573 } 574 575 return $filtered_items; 576 } 577 add_filter( 'wp_nav_menu_objects', 'wpbc_bfb_preview__exclude_from_nav_menus', 10, 2 ); 578 579 580 /** 581 * Exclude BFB Preview page from wp_list_pages() outputs. 582 * 583 * @param array $exclude_array Excluded page IDs. 584 * 585 * @return array 586 */ 587 function wpbc_bfb_preview__exclude_from_page_lists( $exclude_array ) { 588 589 $page_id = absint( get_option( wpbc_bfb_activation__get_preview_page_option_key() ) ); 590 591 if ( $page_id > 0 ) { 592 $exclude_array[] = $page_id; 593 } 594 595 return array_unique( array_map( 'absint', $exclude_array ) ); 596 } 597 // add_filter( 'wp_list_pages_excludes', 'wpbc_bfb_preview__exclude_from_page_lists' ); 598 599 // FixIn: 10.15.3.1. 600 /** 601 * Check whether current request is the BFB Preview page request. 602 * 603 * @return bool 604 */ 605 function wpbc_bfb_is_preview_request() { 606 607 if ( empty( $_GET['wpbc_bfb_preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 608 return false; 609 } 610 611 return ( '1' === sanitize_text_field( wp_unslash( $_GET['wpbc_bfb_preview'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 612 } 613 614 /** 615 * Add noindex / noarchive robots directives for BFB Preview. 616 * 617 * @param array $robots Robots directives. 618 * 619 * @return array 620 */ 621 function wpbc_bfb_preview__wp_robots( $robots ) { 622 623 if ( ! wpbc_bfb_is_preview_request() ) { 624 return $robots; 625 } 626 627 return wp_robots_sensitive_page( $robots ); 628 } 629 add_filter( 'wp_robots', 'wpbc_bfb_preview__wp_robots' ); 630 631 /** 632 * Send no-cache headers for BFB Preview responses. 633 * 634 * @return void 635 */ 636 function wpbc_bfb_preview__nocache_headers() { 637 638 if ( ! wpbc_bfb_is_preview_request() ) { 639 return; 640 } 641 642 if ( ! headers_sent() ) { 643 nocache_headers(); 644 } 645 } 646 add_action( 'template_redirect', 'wpbc_bfb_preview__nocache_headers', 1 ); 547 647 548 648 /** -
booking/trunk/readme.txt
r3491564 r3491589 6 6 Requires PHP: 5.6 7 7 Tested up to: 7.0 8 Stable tag: 10.15. 28 Stable tag: 10.15.3 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 336 336 337 337 == Changelog == 338 = 10.15.3 = 339 - Changes in **all** versions: 340 * **Fix**: Exclude the Preview page from nav menus (10.15.3.1) 341 338 342 = 10.15.2 = 339 343 - Changes in **all** versions: 340 * ** New**: Force a safe template for the BFB Preview page. (10.15.2.1)344 * **Fix**: Force a safe template for the BFB Preview page. (10.15.2.1) 341 345 342 346 = 10.15.1 = -
booking/trunk/wpdev-booking.php
r3491564 r3491589 8 8 Text Domain: booking 9 9 Domain Path: /languages/ 10 Version: 10.15. 210 Version: 10.15.3 11 11 License: GPLv2 or later 12 12 */ … … 35 35 36 36 if ( ! defined( 'WP_BK_VERSION_NUM' ) ) { 37 define( 'WP_BK_VERSION_NUM', '10.15. 2' );37 define( 'WP_BK_VERSION_NUM', '10.15.3' ); 38 38 } 39 39 if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.