PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 5.0.1
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v5.0.1
5.0.1 4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 All 39 releases
← All changes | inc/block-posts-config/class-multiauthor-frontend.php +9 -39 2.5.3 → 5.0.1 View file →
@@ -12,9 +12,9 @@
12 12 $multiauthor_settings = false;
13 13 if($enable_author_metabox_for_post && $enable_author_metabox_for_post['enable_author_metabox']==true){
14 14 $multiauthor_settings = true;
15 15 }
16 - //var_dump($awpa_post_authors);
16 +
17 17 if(isset($awpa_post_authors) && !empty($awpa_post_authors) && $multiauthor_settings == true){
18 18 foreach ($awpa_post_authors as $key=>$author_id) {
19 19
20 20 $needle = 'guest-';
@@ -33,14 +33,10 @@
33 33 }else{
34 34 $author_id = $xauthor_id;
35 35
36 36 ?>
37 - <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($xauthor_id));?>"
38 - itemprop="url" rel="author">
39 - <span itemprop="name">
40 - <i class="<?php echo $authorIcon;?>"></i>
41 - <?php echo esc_html(get_the_author_meta('display_name', $xauthor_id));?>
42 - </span>
37 + <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($xauthor_id));?>" itemprop="url" rel="author">
38 + <span itemprop="name"><i class="<?php echo $authorIcon;?>"></i><?php echo esc_html(get_the_author_meta('display_name', $xauthor_id));?></span>
43 39 </a>
44 40 <?php
45 41
46 42
@@ -46,14 +42,10 @@
46 42
47 43 }
48 44 }else{
49 45 $author_id = $xauthor_id;?>
50 - <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($xauthor_id));?>"
51 - itemprop="url" rel="author">
52 - <span itemprop="name">
53 - <i class="<?php echo $authorIcon;?>"></i>
54 - <?php echo esc_html(get_the_author_meta('display_name', $xauthor_id));?>
55 - </span>
46 + <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($xauthor_id));?>" itemprop="url" rel="author">
47 + <span itemprop="name"><i class="<?php echo $authorIcon;?>"></i><?php echo esc_html(get_the_author_meta('display_name', $xauthor_id));?></span>
56 48 </a>
57 49 <?php }
58 50
59 51 }
@@ -60,9 +52,9 @@
60 52
61 53
62 54
63 55
64 -function blockspare_front_author_list($authorIcon, $key, $awpa_post_authors, $post_id='',$author_id='',$author_type=''){
56 +function blockspare_front_author_list($authorIcon,$key,$awpa_post_authors,$post_id='',$author_id='',$author_type=''){
65 57
66 58 if($author_type == 'default'){
67 59 $default_author_id = get_post_field('post_author', $post_id);
68 60 $author_name = get_userdata( $author_id);
@@ -67,22 +59,10 @@
67 59 $default_author_id = get_post_field('post_author', $post_id);
68 60 $author_name = get_userdata( $author_id);
69 61 ?>
70 62
71 - <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($author_id));?>"
72 - itemprop="url" rel="author">
73 - <span itemprop="name">
74 - <?php if($key<1){?>
75 - <i class="<?php echo $authorIcon;?>"></i>
76 - <?php }?>
77 - <?php echo esc_html(get_the_author_meta('display_name', $author_id));?>
78 - <?php
79 - if( $key != ( count( $awpa_post_authors ) - 1 ) ){
80 - echo ",";
81 - }
82 - ?>
83 - </span>
84 -
63 + <a class="blockspare-posts-block-text-link" href="<?php echo esc_url(get_author_posts_url($author_id));?>" itemprop="url" rel="author">
64 + <span itemprop="name"><?php if($key<1){?><i class="<?php echo $authorIcon;?>"></i><?php } ?><?php echo esc_html(get_the_author_meta('display_name', $author_id));?><?php if( $key != ( count( $awpa_post_authors ) - 1 ) ){echo ",";} ?></span>
85 65 </a>
86 66 <?php
87 67 }
88 68 if($author_type == 'guest'){
@@ -89,19 +69,9 @@
89 69 $wp_amulti_authors = new WPAMultiAuthors();
90 70 $guest_user_data = $wp_amulti_authors->get_guest_by_id($author_id);?>
91 71
92 72 <a class="blockspare-posts-block-text-link">
93 - <span itemprop="name">
94 - <?php if($key<1){?>
95 - <i class="<?php echo esc_attr($authorIcon);?>"></i>
96 - <?php }?>
97 - <?php echo esc_html($guest_user_data->display_name);?>
98 - <?php
99 - if( $key != ( count( $awpa_post_authors ) - 1 ) ){
100 - echo ",";
101 - } ?>
102 - </span>
103 -
73 + <span itemprop="name"><?php if($key<1){?><i class="<?php echo esc_attr($authorIcon);?>"></i><?php } ?><?php echo esc_html($guest_user_data->display_name);?><?php if( $key != ( count( $awpa_post_authors ) - 1 ) ){echo ",";} ?></span>
104 74 </a>
105 75
106 76 <?php } ?>
107 77