model; $id = $model['id']; $collection = array_key_exists( 'collection', $model ) ? $model['collection'] : array(); $is_header_location = true === sek_get_registered_location_property( $id, 'is_header_location' ); $is_footer_location = true === sek_get_registered_location_property( $id, 'is_footer_location' ); //sek_error_log( __FUNCTION__ . ' WHAT ARE WE RENDERING? ' . $id , $collection ); // Store the header-footer location boolean in the manager // Used to determine if we are allowed to lazyload // @see https://github.com/presscustomizr/nimble-builder/issues/705 Nimble_Manager()->current_location_is_header = $is_header_location; Nimble_Manager()->current_location_is_footer = $is_footer_location; // PASSWORD PROTECTION see #673 and #679 // If the page/post is password protect, and this is not a header or footer location, // => stop the recursive walker here and print the password form // for https://github.com/presscustomizr/nimble-builder/issues/673 // Nimble_Manager()->is_content_restricted is set at 'wp', see ::sek_maybe_empty_password_form // 1) we want to protect content added with Nimble Builder, but not if header or footer // 2) we want to apply the protection on front, not when customizing // 3) we need to check if the single page or post is password protected // 4) we don't want to render the password form multiple times $has_content_restriction_for_location = Nimble_Manager()->is_content_restricted && !$is_header_location && !$is_footer_location; $location_needs_css_class_to_style_password_form = false; if ( $has_content_restriction_for_location ) { // in the case of the built-in WP password form, we only print it once, so we don't need to add the CSS class to each locations $location_needs_css_class_to_style_password_form = !did_action('nimble_wp_pwd_form_rendered'); } // NOTE : empty sektions wrapper are only printed when customizing ?> nimble_customizing_or_content_is_printed_on_this_page = true; printf( '