il_id' ) && ( is_category() || is_tag() || is_tax() ) ) { $term_id = get_queried_object_id(); $image_id = flextension_get_term_thumbnail_id( $term_id ); if ( $image_id > 0 ) { $image_url = wp_get_attachment_image_url( $image_id, 'fullwidth' ); if ( ! empty( $image_url ) ) { $args['background'] = 'image'; $args['background_image'] = $image_url; if ( function_exists( 'tripp_xt_term_image_styles' ) ) { $styles = tripp_xt_term_image_styles( $term_id ); if ( ! empty( $styles['background-position'] ) ) { $args['background_position'] = $styles['background-position']; } } } } } } return $args; } add_filter( 'tripp_page_header_args', 'tripp_author_page_header' ); /** * Filters the posts arguments for a search page. * * @param array $args An array of posts arguments. * @return array New array of posts arguments. */ function tripp_search_posts_args( $args ) { if ( is_search() || ( isset( $args['query'] ) && $args['query']->is_search() ) ) { $args['layout'] = 'search'; } return $args; } add_filter( 'tripp_posts_args', 'tripp_search_posts_args' ); /** * Adds the container (paragraph) the author description. * * @since 1.0.6 * * @param string $value The value of the metadata. * @return string The author description with the container. */ function tripp_add_author_description_container( $value = '' ) { if ( ! empty( $value ) ) { $value = '
'; } return $value; } add_filter( 'tripp_author_description', 'tripp_add_author_description_container', 10 ); /** * Inserts author location before the author description. * * @param string $value The value of the metadata. * @param int $user_id The user ID for the value. * @return string The author description with author location. */ function tripp_add_author_location( $value = '', $user_id = 0 ) { if ( function_exists( 'flextension_author_location' ) ) { $value = flextension_author_location( $user_id ) . $value; } return $value; } add_filter( 'tripp_author_description', 'tripp_add_author_location', 10, 2 ); /** * Adds the contact links to the author description. * * @param string $value The value of the metadata. * @param int $user_id The user ID for the value. * @return string The author description with the contact links. */ function tripp_add_author_social_links( $value = '', $user_id = 0 ) { if ( function_exists( 'flextension_get_user_social_links' ) ) { $value = $value . flextension_get_user_social_links( $user_id ); } return $value; } add_filter( 'tripp_author_description', 'tripp_add_author_social_links', 10, 2 ); /** * Prints out the filter options for the list of posts. * * @param array $options An array of options. */ function tripp_posts_filter_options( $options = array() ) { $taxonomies = get_object_taxonomies( $options['post_type'], 'objects' ); $taxonomies = wp_filter_object_list( $taxonomies, array( 'publicly_queryable' => true, ) ); /** * Filters the array list of taxonomies. * * @param array $taxonomies An array list of taxonomies. */ $taxonomies = apply_filters( 'tripp_posts_filter_taxonomies', $taxonomies ); if ( ! empty( $taxonomies ) ) { if ( ! empty( $options['taxonomy'] ) && isset( $taxonomies[ $options['taxonomy'] ] ) ) { unset( $taxonomies[ $options['taxonomy'] ] ); } if ( isset( $taxonomies['destination'] ) ) { unset( $taxonomies['destination'] ); } if ( ! is_search() ) { $taxonomies = wp_list_sort( $taxonomies, 'label' ); } $link_base = tripp_get_link_base(); $columns = 0; $output = ''; $selected_items = 0; foreach ( $taxonomies as $taxonomy ) { if ( empty( $taxonomy ) ) { continue; } $terms = get_terms( array( 'taxonomy' => $taxonomy->name, ) ); if ( is_wp_error( $terms ) ) { $terms = array(); } if ( ! empty( $terms ) ) { $columns++; $output .= '\s*
#', '', $content ); /** This filter is documented in wp-includes/post-template.php */ $content = apply_filters( 'the_content', $content ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound, WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound $content = trim( $content ); if ( ! empty( $content ) ) { echo '