max_num_pages > 1 ) : ?> < id="comment-">
%s', get_comment_author_link() ); ?> comment_approved == '0' ) : ?>
at %2$s', 'artwork-lite' ), get_comment_date( 'F j, Y' ), get_comment_time() ); ?>
$mp_artwork_add_below, 'depth' => $mp_artwork_depth, 'max_depth' => $mp_artwork_args['max_depth'] ) ) ); ?>
user_id ); if ( $mp_artwork_user ) { $mp_artwork_author = $mp_artwork_user->display_name; if ( empty( $mp_artwork_url ) || 'http://' == $mp_artwork_url ) { $mp_artwork_return = $mp_artwork_author; } else { $mp_artwork_return = "$mp_artwork_author"; } } return $mp_artwork_return; } /* * add the filter get_comment_author_link */ add_filter( 'get_comment_author_link', 'mp_artwork_filter_get_comment_author_link', 10, 3 ); /* * Gett HTML information for the current post-date/time and author. * */ function mp_artwork_posted_on( $mp_artwork_post ) { if ( strcmp( get_post_type( $mp_artwork_post ), 'post' ) === 0 ) { $mp_artwork_archive_year = get_the_time( 'Y' ); $mp_artwork_archive_month = get_the_time( 'm' ); $mp_artwork_archive_day = get_the_time( 'd' ); printf( '', esc_url( get_day_link( $mp_artwork_archive_year, $mp_artwork_archive_month, $mp_artwork_archive_day ) ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } else { printf( '', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } } /* * Gety meta information for the current post-date/time and author. * */ function mp_artwork_posted_on_meta( $mp_artwork_post ) { if ( get_theme_mod( mp_artwork_get_prefix() . 'show_meta', '1' ) === '1' || get_theme_mod( mp_artwork_get_prefix() . 'show_meta' ) ): ?>
' . $mp_artwork_term->name . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( $mp_artwork_term != end( $term_list ) ) : echo ", "; endif; } } /* * Post Category */ function mp_artwork_post_category( $mp_artwork_post ) { if ( get_theme_mod( mp_artwork_get_prefix() . 'show_categories', '1' ) === '1' || get_theme_mod( mp_artwork_get_prefix() . 'show_categories' ) ): if ( strcmp( get_post_type( $mp_artwork_post ), 'post' ) === 0 ) : ?> , ', 'multiple', $mp_artwork_post->ID ); ?> / ID, $mp_artwork_postTypeSlugName, array( "fields" => "all" ) ); ?> / term_id )) . '" title="' . sprintf( __( "View all posts in %s", 'artwork-lite' ), $mp_artwork_category[0]->name ) . '" ' . ' class="category-wrapper">' . $mp_artwork_category[0]->name . ' '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; } /* * Post Tag */ function mp_artwork_post_tag( $mp_artwork_post ) { if ( get_theme_mod( mp_artwork_get_prefix() . 'show_tags', '1' ) === '1' || get_theme_mod( mp_artwork_get_prefix() . 'show_tags' ) ): if ( strcmp( get_post_type( $mp_artwork_post ), 'post' ) === 0 ) : the_tags( '/ ' . __( 'Tagged with', 'artwork-lite' ) . ' ', ', ', '' ); else: $mp_artwork_postTypeSlug = mp_artwork_get_post_type_slug(); if ( $mp_artwork_postTypeSlug ): $mp_artwork_postTypeSlugName = 'post_tag_' . $mp_artwork_postTypeSlug; $mp_artwork_term_list = wp_get_post_terms( $mp_artwork_post->ID, $mp_artwork_postTypeSlugName, array( "fields" => "all" ) ); if ( ! empty( $mp_artwork_term_list ) ) : ?> / post_content ) ); $mp_artwork_embeds = get_media_embedded_in_content( $mp_artwork_content ); if ( ! empty( $mp_artwork_embeds ) ) { return '
' . $mp_artwork_embeds[0] . '
'; } else { return false; } } /* * Post content */ function mp_artwork_get_content_theme( $mp_artwork_content_length ) { ?> (.*?)<\/(script|style)>/is', '', $mp_artwork_content ); if ( strlen( $mp_artwork_content ) > $mp_artwork_content_length ) { $mp_artwork_content = extension_loaded( 'mbstring' ) ? mb_substr( $mp_artwork_content, 0, $mp_artwork_content_length ) . '...' : substr( $mp_artwork_content, 0, $mp_artwork_content_length ) . '...'; } echo $mp_artwork_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> /i', $post->post_content, $mp_artwork_matches ); if ( ! empty( $mp_artwork_matches[1] ) ) { $mp_artwork_first_img = $mp_artwork_matches[1][0]; if ( empty( $mp_artwork_first_img ) ) { $mp_artwork_first_img = ""; } } return $mp_artwork_first_img; } function mp_artwork_posttype_name_sanitize_text( $mp_artwork_txt ) { $mp_artwork_txt = strip_tags( $mp_artwork_txt, '' ); $mp_artwork_txt = preg_replace( "/[^a-zA-Z0-9-]+/", "", $mp_artwork_txt ); $mp_artwork_txt = substr( strtolower( $mp_artwork_txt ), 0, 19 ); return wp_kses_post( force_balance_tags( $mp_artwork_txt ) ); } /* * Get post type slug * * @return string */ function mp_artwork_get_post_type_slug() { $mp_artwork_post_type_slug = ''; if ( is_plugin_active( 'mp-artwork/mp-artwork.php' ) ) { $mp_artwork_post_type_slug = mp_artwork_posttype_name_sanitize_text( get_option( mp_artwork_get_prefix() . 'post_type_slug' ) ); } if ( $mp_artwork_post_type_slug ) { return $mp_artwork_post_type_slug; } else { if ( has_post_format( 'work' ) ) { return ''; } } } /** * Artwork page menu. * * Show pages of site. * * @since Artwork 1.0 */ function mp_artwork_page_menu() { echo ''; } /** * Artwork page top menu. * * Show pages of site. * * @since Artwork 1.0 */ function mp_artwork_page_short_menu() { echo ''; } /** * Artwork post gallery. * * Show post gallery. * * @since Artwork 1.0 */ function mp_artwork_get_post_gallery( $mp_artwork_post, $mp_artwork_page_template ) { $mp_artwork_galleryPost = new MP_Artwork_Gallery( mp_artwork_get_prefix() ); $mp_artwork_galleryPost->get_post_gallery( $mp_artwork_post, $mp_artwork_page_template ); } /** * Artwork post related posts. * * Show post related posts. * * @since Artwork 1.0 */ function mp_artwork_get_related_posts() { $mp_artwork_relatedPost = new MP_Artwork_Related( mp_artwork_get_prefix() ); $mp_artwork_relatedPost->related_posts(); } /* * Post thumbnail * @since Artwork 1.0 */ function mp_artwork_post_thumbnail( $mp_artwork_post, $mp_artwork_page_template ) { ?>