'lazy', ]; $attributes = array_merge($additional_attributes, $default_attributes); $custom_thumbnail = wp_get_attachment_image( get_post_thumbnail_id( $post_id ), $size, false, $additional_attributes ); } return $custom_thumbnail; } //post thumbnail function atlantisak_the_post_custom_thumbnail($post_id, $size='atlantisak-image-size', $additional_attributes = []){ echo atlantisak_get_the_custom_post_thumbnail($post_id, $size, $additional_attributes);// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } //post date and update date function atlantisak_posted_on(){ $time_stirng = ''; if(get_the_time( 'G' ) !== get_the_modified_time( 'G' )){ $time_stirng = ''; } $time_stirng = sprintf( $time_stirng, esc_attr(get_the_date(DATE_W3C)), esc_attr(get_the_date()), esc_attr(get_the_modified_date( DATE_W3C )), esc_attr(get_the_modified_date( )) ); $post_on = sprintf( esc_html_x('%s', 'post_date', 'atlantisak'),// phpcs:ignore WordPress.WP.I18n.NoEmptyStrings ''. $time_stirng .'' ); echo ''. $post_on .'';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } //post author function atlantisak_author(){ $byAuthor = sprintf( esc_html_x(' by %s', 'post author', 'atlantisak'),// phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment ''.esc_html(get_the_author()).'' ); echo ''. $byAuthor .'';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } //category display function atlantisak_category(){ $the_post_id = get_the_ID( ); $article_trms = wp_get_post_terms( $the_post_id, ['category', 'post_tag'] ); if(empty($article_trms) || ! is_array($article_trms)){ return; } foreach($article_trms as $key => $article_trm){ ?> name.','); ?> %2$s', get_permalink( get_the_ID( ) ), __('Read More', 'atlantisak') ); } return $more; } //pagination function atlantisak_pagination() { $allowed_tags = [ 'span' => [ 'class' => [] ], 'a' => [ 'class' => [], 'href' => [], ] ]; $args = [ 'before_page_number' => '', 'after_page_number' => '', ]; printf( '', wp_kses( paginate_links( $args ), $allowed_tags ) ); } //page edit function atlantisak_page_edit(){ if(is_page() && ! is_home() && ! is_single( ) && current_user_can('publish_posts')){ ?> 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png' ); //check file type from file name $file_ext = wp_check_filetype( $file, $mimes ); //if file has a valid mime type return it, otherwise return default return ( $file_ext['ext'] ? $file : $setting->default ); }