' . esc_html__( 'Pages:', 'advkt' ),
'after' => '
',
'link_before' => '',
'link_after' => '',
) );
?>
A single paragraph block style
', 'categories' => array( 'text' ), 'keywords' => array( 'cta', 'demo', 'example' ), 'viewportWidth' => 800, ) ); } } add_action( 'init', 'advkt_register_block_patterns' ); // Header extra menu function advkt_header_extra() { // Default values $defaults = [ 'extra_logo' => get_template_directory_uri() . '/img/logo/logo.png', 'company_info' => __('Although we are located in Brooklyn, our maritime lawyers are proud to help the injured throughout the nation, including workers who were working in foreign waters at the time of the incident go up against the largest offshore companies and win', 'advkt'), 'contact_info' => __('Contact Info', 'advkt'), 'address_icon' => 'fa-solid fa-location-dot', 'address' => __('20, Bordeshi, New York, US', 'advkt'), 'email_icon' => 'fa-regular fa-envelope', 'email' => 'hello@advkt.com', 'phone_icon' => 'fa-regular fa-phone', 'phone_number' => '123-456-7890' ]; // Check if Redux framework is available and override default values with Redux options if (class_exists('Redux')) { $opt_name = 'advkt_options'; $extra_logo = Redux::get_option($opt_name, 'sidebar_logo'); $defaults['extra_logo'] = is_array($extra_logo) && isset($extra_logo['url']) ? esc_url($extra_logo['url']) : $defaults['extra_logo']; $company_info = Redux::get_option($opt_name, 'company_info'); $defaults['company_info'] = !empty($company_info) ? sanitize_text_field($company_info) : $defaults['company_info']; $contact_info = Redux::get_option($opt_name, 'sidebar_contact_info'); $defaults['contact_info'] = !empty($contact_info) ? sanitize_text_field($contact_info) : $defaults['contact_info']; $address_icon = Redux::get_option($opt_name, 'sidebar_address_icon'); $defaults['address_icon'] = !empty($address_icon) ? sanitize_text_field($address_icon) : $defaults['address_icon']; $address = Redux::get_option($opt_name, 'sidebar_address'); $defaults['address'] = !empty($address) ? sanitize_text_field($address) : $defaults['address']; $email_icon = Redux::get_option($opt_name, 'sidebar_email_icon'); $defaults['email_icon'] = !empty($email_icon) ? sanitize_text_field($email_icon) : $defaults['email_icon']; $email = Redux::get_option($opt_name, 'sidebar_email_address'); $defaults['email'] = !empty($email) && is_email($email) ? sanitize_email($email) : $defaults['email']; $phone_icon = Redux::get_option($opt_name, 'sidebar_phone_icon'); $defaults['phone_icon'] = !empty($phone_icon) ? sanitize_text_field($phone_icon) : $defaults['phone_icon']; $phone_number = Redux::get_option($opt_name, 'sidebar_phone_number'); $defaults['phone_number'] = !empty($phone_number) ? sanitize_text_field($phone_number) : $defaults['phone_number']; } // Start output buffering ob_start(); ?> '', ); // If it's a 404 page, use a "Page not found" title. if ( is_404() ) { $title['title'] = __( 'Page not found', 'advkt' ); // If it's a search, use a dynamic search results title. } elseif ( is_search() ) { /* translators: %s: Search query. */ $title['title'] = sprintf( __( 'Search Results for “%s”', 'advkt' ), get_search_query() ); // If on the front page, use the site title. } elseif ( is_front_page() ) { $title['title'] = get_bloginfo( 'name', 'display' ); // If on a post type archive, use the post type archive title. } elseif ( is_post_type_archive() ) { $title['title'] = post_type_archive_title( '', false ); // If on a taxonomy archive, use the term title. } elseif ( is_tax() ) { $title['title'] = single_term_title( '', false ); /* * If we're on the blog page that is not the homepage * or a single post of any post type, use the post title. */ } elseif ( is_home() || is_singular() ) { $title['title'] = single_post_title( '', false ); // If on a category or tag archive, use the term title. } elseif ( is_category() || is_tag() ) { $title['title'] = single_term_title( '', false ); // If on an author archive, use the author's display name. } elseif ( is_author() && get_queried_object() ) { $author = get_queried_object(); $title['title'] = $author->display_name; // If it's a date archive, use the date as the title. } elseif ( is_year() ) { $title['title'] = get_the_date( _x( 'Y', 'yearly archives date format', 'advkt' ) ); } elseif ( is_month() ) { $title['title'] = get_the_date( _x( 'F Y', 'monthly archives date format', 'advkt' ) ); } elseif ( is_day() ) { $title['title'] = get_the_date(); } // Add a page number if necessary. if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { /* translators: %s: Page number. */ $title['page'] = sprintf( __( 'Page %s', 'advkt' ), max( $paged, $page ) ); } // Append the description or site title to give context. if ( is_front_page() ) { $title['tagline'] = get_bloginfo( 'description', 'display' ); } else { $title['site'] = get_bloginfo( 'name', 'display' ); } /** * Filters the separator for the document title. * * @since 4.4.0 * * @param string $sep Document title separator. Default '-'. */ $sep = apply_filters( 'document_title_separator', ':' ); /** * Filters the parts of the document title. * * @since 4.4.0 * * @param array $title { * The document title parts. * * @type string $title Title of the viewed page. * @type string $page Optional. Page number if paginated. * @type string $tagline Optional. Site description when on home page. * @type string $site Optional. Site title when not on home page. * } */ $title = apply_filters( 'document_title_parts', $title ); $title = implode( " $sep ", array_filter( $title ) ); /** * Filters the document title. * * @since 5.8.0 * * @param string $title Document title. */ $title = apply_filters( 'document_title', $title ); return $title; } function advkt_page_title(){ $title = advkt_breadcrumb_page_title(); $titleArray = explode(':', $title); return trim( $titleArray[0]); }