__( 'Search Doc', 'betterdocs' ), 'heading' => '', 'subheading' => '', 'heading_tag' => 'h2', 'subheading_tag' => 'h3', 'number_of_docs' => '5', 'number_of_faqs' => '5', 'search_button_text' => __( 'Search', 'betterdocs' ), 'faq_categories_ids' => '', 'layout' => 'layout-1', 'doc_ids' => '', 'doc_categories_ids' => '' ] ); } public function render( $atts, $content = null ) { betterdocs()->assets->localize( 'betterdocs-search-modal', 'searchModalConfig', [ 'nonce' => wp_create_nonce( 'wp_rest' ) ] ); if ( isset( $atts['layout'] ) && $atts['layout'] == 'layout-1' ) { $attributes = [ 'placeholder' => $atts['placeholder'], 'heading' => $atts['heading'], 'subheading' => $atts['subheading'], 'headingtag' => $atts['heading_tag'], 'subheadingtag' => $atts['subheading_tag'], 'buttontext' => isset( $atts['search_button_text'] ) ? $atts['search_button_text'] : '', 'numberofdocs' => isset( $atts['number_of_docs'] ) ? $atts['number_of_docs'] : 5, 'numberoffaqs' => isset( $atts['number_of_faqs'] ) ? $atts['number_of_faqs'] : 5, 'faq_categories_ids' => isset( $atts['faq_categories_ids'] ) ? $atts['faq_categories_ids'] : '', 'doc_ids' => isset( $atts['doc_ids'] ) ? $atts['doc_ids'] : '', 'doc_categories_ids' => isset( $atts['doc_categories_ids'] ) ? $atts['doc_categories_ids'] : '' ]; $attributes = apply_filters( 'betterdocs_search_modal_shortcode_attributes', $attributes ); echo '