diff --git a/admin/view.admin.php b/admin/view.admin.php
index 8d5da1c..d71af39 100644
--- a/admin/view.admin.php
+++ b/admin/view.admin.php
@@ -1,4 +1,32 @@
'h2',
+ 'h3' => 'h3',
+ 'h4' => 'h4',
+ 'h5' => 'h5',
+ 'h6' => 'h6',
+ 'div' => 'div',
+ 'span' => 'span',
+ 'strong' => 'strong',
+ );
+ ?>
+
+
@@ -17,6 +45,15 @@ function pad_the_admin_body() {
|
diff --git a/assets/_scss/vk-post-author.scss b/assets/_scss/vk-post-author.scss
index 1630413..62e7793 100644
--- a/assets/_scss/vk-post-author.scss
+++ b/assets/_scss/vk-post-author.scss
@@ -16,6 +16,8 @@
text-decoration: none;
border-bottom: none;
}
+#padSection h2,
+#padSection h3,
#padSection h4,
#padSection h5,
#padSection dl,
@@ -50,7 +52,9 @@
width: 100%;
}
-#padSection h4 {
+#padSection .padSectionTitle {
+ display: block;
+ font-weight: bold;
margin-bottom: 20px;
padding-bottom: 4px;
border-bottom: 1px dotted var(--wp--preset--color--border-normal, #e5e5e5);
@@ -119,7 +123,9 @@
margin-top: 15px;
clear: both;
position: relative;
- h5 {
+ .latestEntriesTitle {
+ font-weight:bold;
+ display: block;
margin-top: 0;
margin-bottom: 10px;
padding-bottom: 5px;
diff --git a/assets/css/vk-post-author.css b/assets/css/vk-post-author.css
index 5c96383..eb6ddf9 100644
--- a/assets/css/vk-post-author.css
+++ b/assets/css/vk-post-author.css
@@ -1 +1 @@
-#padSection{clear:both;margin:2em 0;display:block;overflow:hidden;padding:25px;border:3px solid var(--wp--preset--color--border-normal, #e5e5e5);font-size:14px}#padSection a{text-decoration:none;border-bottom:none}#padSection h4,#padSection h5,#padSection dl,#padSection dl dt,#padSection dl dd{margin:0px;padding:0px;background:none;border:none;color:inherit;outline:unset;outline-offset:unset;box-shadow:unset;border-radius:unset;color:inherit}#padSection h4::before,#padSection h4::after,#padSection h5::before,#padSection h5::after,#padSection dl::before,#padSection dl::after,#padSection dl dt::before,#padSection dl dt::after,#padSection dl dd::before,#padSection dl dd::after{content:none}#padSection dl dt .authorName{font-size:18px}#padSection dl dt .pad_caption{padding-left:10px;font-size:12px;font-weight:lighter}#padSection::before{display:block;overflow:hidden;width:100%}#padSection h4{margin-bottom:20px;padding-bottom:4px;border-bottom:1px dotted var(--wp--preset--color--border-normal, #e5e5e5);font-size:18px}#padSection .avatar{float:left}#padSection .avatar.circle img{border-radius:50%}#padSection .avatar img{border:1px solid #ccc;margin-bottom:15px;width:100px;height:auto}#padSection .profileTxtSet{margin-left:130px;display:block;overflow:hidden}#padSection .profileTxtSet dt{margin-bottom:5px}#padSection .sns_icons{list-style:none;margin:10px 0;padding:0}#padSection .sns_icons li{display:inline;font-size:28px;margin-right:10px}#padSection a.web{color:#1780bb}#padSection a.twitter{color:#0f1419}#padSection a.facebook{color:#3b5998}#padSection a.instagram{color:#262626}#padSection a.youtube{color:#cc181e}#padSection a.linkedin{color:#0077b5}#padSection a.google-plus{color:#db4437}#padSection a.wordpress{color:#585c60}#padSection a.amazon{color:#232f3e}#latestEntries{margin-top:15px;clear:both;position:relative}#latestEntries h5{margin-top:0;margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted var(--wp--preset--color--border-normal, #ccc);color:var(--wp--preset--color--text-normal, #333);font-size:16px}#latestEntries .authorLink{text-align:right;margin:0;position:absolute;top:-1px;right:0;font-size:14px}#latestEntries .authorLink a{color:var(--wp--preset--color--text-normal, #333)}#latestEntries ul,#latestEntries ul li{list-style:none;margin:0;padding:0;position:relative;background:none}#latestEntries li a{position:relative}#latestEntries li .padDate{color:var(--wp--preset--color--text-secondary, #666);line-height:14px}#latestEntries li a.padCate{font-size:10px;background-color:#e5e5e5;color:#fff;padding:2px 5px 1px;line-height:11px;text-decoration:none}#latestEntries li a.padTitle{color:inherit}#latestEntries li.textList{margin-bottom:3px;border-bottom:1px dotted #ccc;padding:3px 0}#latestEntries li.textList .padDate{margin-right:5px;vertical-align:text-bottom}#latestEntries li.textList a.padCate{border-radius:2px;position:relative;vertical-align:middle}#latestEntries li.textList a.padTitle{display:block;overflow:hidden;clear:both}#latestEntries li.textList a.padTitle::before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";margin-right:6px}.fa_v5_css #latestEntries li.textList a.padTitle::before{font-family:"Font Awesome 5 Free";font-weight:900}#latestEntries li.thumbnailBox{display:block;overflow:hidden;width:23.5%;margin-right:2%;float:left}#latestEntries li.thumbnailBox:last-child{margin-right:0}#latestEntries li.thumbnailBox .inner-box{display:block;position:relative;border:1px solid var(--wp--preset--color--border-normal, rgba(0, 0, 0, 0.1));margin-bottom:4px}#latestEntries li.thumbnailBox .postImage>a img{width:100%;height:100%;display:block;aspect-ratio:16/9;object-fit:cover}#latestEntries li.thumbnailBox .postImage a.padCate{display:block;position:absolute;bottom:0;right:0}#latestEntries li.thumbnailBox .padDate{display:block;font-size:10px}#latestEntries li.thumbnailBox a.padTitle{display:block;clear:both;font-size:12px;line-height:18px}@media(max-width: 600px){#padSection{padding:15px 10px 10px}#padSection .avatar img{width:80px;height:auto}#padSection .profileTxtSet{margin-left:95px}#padSection dl dt span{display:block;overflow:hidden}#padSection dl dt .authorName{padding-bottom:5px}#padSection dl dt .pad_caption{padding-left:0}#padSection dl dd{clear:both;width:100%}#padSection #latestEntries h5{margin-bottom:5px}#padSection #latestEntries ul li{border-bottom:1px dotted #ccc;padding:6px 0}#padSection #latestEntries ul li.thumbnailBox{display:block;overflow:hidden;width:100%;margin:0%;float:none}#padSection #latestEntries ul li.thumbnailBox .inner-box{display:block;overflow:hidden;float:left;width:120px;margin-right:10px;margin-bottom:0}#padSection #latestEntries ul li.thumbnailBox a.padTitle{clear:none}#padSection #latestEntries ul li.thumbnailBox a.padCate{display:inline-block;padding:1px 5px}}body.archive.author #padSection{margin:0 0 30px}
+#padSection{clear:both;margin:2em 0;display:block;overflow:hidden;padding:25px;border:3px solid var(--wp--preset--color--border-normal, #e5e5e5);font-size:14px}#padSection a{text-decoration:none;border-bottom:none}#padSection h2,#padSection h3,#padSection h4,#padSection h5,#padSection dl,#padSection dl dt,#padSection dl dd{margin:0px;padding:0px;background:none;border:none;color:inherit;outline:unset;outline-offset:unset;box-shadow:unset;border-radius:unset;color:inherit}#padSection h2::before,#padSection h2::after,#padSection h3::before,#padSection h3::after,#padSection h4::before,#padSection h4::after,#padSection h5::before,#padSection h5::after,#padSection dl::before,#padSection dl::after,#padSection dl dt::before,#padSection dl dt::after,#padSection dl dd::before,#padSection dl dd::after{content:none}#padSection dl dt .authorName{font-size:18px}#padSection dl dt .pad_caption{padding-left:10px;font-size:12px;font-weight:lighter}#padSection::before{display:block;overflow:hidden;width:100%}#padSection .padSectionTitle{display:block;font-weight:bold;margin-bottom:20px;padding-bottom:4px;border-bottom:1px dotted var(--wp--preset--color--border-normal, #e5e5e5);font-size:18px}#padSection .avatar{float:left}#padSection .avatar.circle img{border-radius:50%}#padSection .avatar img{border:1px solid #ccc;margin-bottom:15px;width:100px;height:auto}#padSection .profileTxtSet{margin-left:130px;display:block;overflow:hidden}#padSection .profileTxtSet dt{margin-bottom:5px}#padSection .sns_icons{list-style:none;margin:10px 0;padding:0}#padSection .sns_icons li{display:inline;font-size:28px;margin-right:10px}#padSection a.web{color:#1780bb}#padSection a.twitter{color:#0f1419}#padSection a.facebook{color:#3b5998}#padSection a.instagram{color:#262626}#padSection a.youtube{color:#cc181e}#padSection a.linkedin{color:#0077b5}#padSection a.google-plus{color:#db4437}#padSection a.wordpress{color:#585c60}#padSection a.amazon{color:#232f3e}#latestEntries{margin-top:15px;clear:both;position:relative}#latestEntries .latestEntriesTitle{font-weight:bold;display:block;margin-top:0;margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted var(--wp--preset--color--border-normal, #ccc);color:var(--wp--preset--color--text-normal, #333);font-size:16px}#latestEntries .authorLink{text-align:right;margin:0;position:absolute;top:-1px;right:0;font-size:14px}#latestEntries .authorLink a{color:var(--wp--preset--color--text-normal, #333)}#latestEntries ul,#latestEntries ul li{list-style:none;margin:0;padding:0;position:relative;background:none}#latestEntries li a{position:relative}#latestEntries li .padDate{color:var(--wp--preset--color--text-secondary, #666);line-height:14px}#latestEntries li a.padCate{font-size:10px;background-color:#e5e5e5;color:#fff;padding:2px 5px 1px;line-height:11px;text-decoration:none}#latestEntries li a.padTitle{color:inherit}#latestEntries li.textList{margin-bottom:3px;border-bottom:1px dotted #ccc;padding:3px 0}#latestEntries li.textList .padDate{margin-right:5px;vertical-align:text-bottom}#latestEntries li.textList a.padCate{border-radius:2px;position:relative;vertical-align:middle}#latestEntries li.textList a.padTitle{display:block;overflow:hidden;clear:both}#latestEntries li.textList a.padTitle::before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";margin-right:6px}.fa_v5_css #latestEntries li.textList a.padTitle::before{font-family:"Font Awesome 5 Free";font-weight:900}#latestEntries li.thumbnailBox{display:block;overflow:hidden;width:23.5%;margin-right:2%;float:left}#latestEntries li.thumbnailBox:last-child{margin-right:0}#latestEntries li.thumbnailBox .inner-box{display:block;position:relative;border:1px solid var(--wp--preset--color--border-normal, rgba(0, 0, 0, 0.1));margin-bottom:4px}#latestEntries li.thumbnailBox .postImage>a img{width:100%;height:100%;display:block;aspect-ratio:16/9;object-fit:cover}#latestEntries li.thumbnailBox .postImage a.padCate{display:block;position:absolute;bottom:0;right:0}#latestEntries li.thumbnailBox .padDate{display:block;font-size:10px}#latestEntries li.thumbnailBox a.padTitle{display:block;clear:both;font-size:12px;line-height:18px}@media(max-width: 600px){#padSection{padding:15px 10px 10px}#padSection .avatar img{width:80px;height:auto}#padSection .profileTxtSet{margin-left:95px}#padSection dl dt span{display:block;overflow:hidden}#padSection dl dt .authorName{padding-bottom:5px}#padSection dl dt .pad_caption{padding-left:0}#padSection dl dd{clear:both;width:100%}#padSection #latestEntries h5{margin-bottom:5px}#padSection #latestEntries ul li{border-bottom:1px dotted #ccc;padding:6px 0}#padSection #latestEntries ul li.thumbnailBox{display:block;overflow:hidden;width:100%;margin:0%;float:none}#padSection #latestEntries ul li.thumbnailBox .inner-box{display:block;overflow:hidden;float:left;width:120px;margin-right:10px;margin-bottom:0}#padSection #latestEntries ul li.thumbnailBox a.padTitle{clear:none}#padSection #latestEntries ul li.thumbnailBox a.padCate{display:inline-block;padding:1px 5px}}body.archive.author #padSection{margin:0 0 30px}
diff --git a/post-author-display.php b/post-author-display.php
index 355357e..76d1095 100644
--- a/post-author-display.php
+++ b/post-author-display.php
@@ -176,8 +176,10 @@ function pad_set_css() {
function pad_get_default_options() {
$display_author_options = array(
'author_box_title' => __( 'Author Profile', 'vk-post-author-display' ),
+ 'author_box_title_tag' => 'h4',
'author_picture_style' => 'square',
'list_box_title' => __( 'Latest entries', 'vk-post-author-display' ),
+ 'list_box_title_tag' => 'h5',
'author_archive_link' => 'hide',
'author_archive_link_txt' => __( 'Author Archives', 'vk-post-author-display' ),
'show_thumbnail' => 'display',
@@ -252,8 +254,10 @@ function pad_plugin_options_validate( $input ) {
$output = $defaults = pad_get_default_options();
$output['author_box_title'] = wp_kses_post( $input['author_box_title'] );
+ $output['author_box_title_tag'] = esc_html( $input['author_box_title_tag'] );
$output['author_picture_style'] = esc_html( $input['author_picture_style'] );
$output['list_box_title'] = wp_kses_post( $input['list_box_title'] );
+ $output['list_box_title_tag'] = esc_html( $input['list_box_title_tag'] );
$output['author_archive_link'] = esc_html( $input['author_archive_link'] );
$output['author_archive_link_txt'] = wp_kses_post( $input['author_archive_link_txt'] );
$output['show_thumbnail'] = esc_html( $input['show_thumbnail'] );
diff --git a/readme.txt b/readme.txt
index 9ce5618..98f87ac 100644
--- a/readme.txt
+++ b/readme.txt
@@ -30,6 +30,9 @@ Display to Post Author Information Box on bottom of the contents.
== Changelog ==
+= 1.25.0 =
+[ Add function ] Add a feature that allows specifying the tag.
+
= 1.24.1 =
[ Specification Change ] Fix Twitter icon to X icon
diff --git a/view.post-author.php b/view.post-author.php
index 85b54ad..8fb9993 100644
--- a/view.post-author.php
+++ b/view.post-author.php
@@ -118,15 +118,16 @@ public static function pad_get_author_entries() {
// Author entries.
global $post;
- $args = array(
+ $args = array(
'post_type' => $post->post_type,
'posts_per_page' => 4,
'author' => $post->post_author,
);
- $args = apply_filters( 'pad_get_author_entries_args', $args );
- $loop = new WP_Query( $args );
- $entry_unit = '' . "\n";
- $entry_unit .= ' ' . wp_kses_post( $options['list_box_title'] ) . '' . "\n";
+ $args = apply_filters( 'pad_get_author_entries_args', $args );
+ $loop = new WP_Query( $args );
+ $entry_unit = ' ' . "\n";
+
+ $entry_unit .= '<' . esc_html( $options['list_box_title_tag'] ) . ' class="latestEntriesTitle">' . wp_kses_post( $options['list_box_title'] ) . '' . esc_html( $options['list_box_title_tag'] ) . '>' . "\n";
if ( 'display' === $options['author_archive_link'] ) {
$entry_unit .= ' ' . wp_kses_post( $options['author_archive_link_txt'] ) . ' ' . "\n";
}
@@ -185,10 +186,10 @@ public static function pad_get_author_entries() {
*/
public static function pad_get_author_box( $layout = 'normal' ) {
$options = pad_get_plugin_options();
- $author_unit = ' ';
+ $author_unit = '';
if ( 'author_archive' !== $layout ) {
- $author_unit .= '' . esc_html( $options['author_box_title'] ) . '';
+ $author_unit .= '<'. esc_html( $options['author_box_title_tag'] ) .' class="padSectionTitle">' . esc_html( $options['author_box_title'] ) . ''. esc_html( $options['author_box_title_tag'] ) .'>';
}
$author_unit .= self::pad_get_author_profile();
@@ -197,7 +198,7 @@ public static function pad_get_author_box( $layout = 'normal' ) {
$author_unit .= self::pad_get_author_entries();
}
- $author_unit .= ' ';
+ $author_unit .= '';
return $author_unit;
}
}
|