Skip to content

Commit

Permalink
theme checked by envato theme check plugin and fiexed all the issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrafbd1496 committed Jul 26, 2021
1 parent 706900b commit fcf9034
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 213 deletions.
11 changes: 0 additions & 11 deletions assets/css/base.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<?php
$philosophy_cn = get_comments_number();
if ( $philosophy_cn <= 1 ) {
echo $philosophy_cn . " " . __( "Comment", "philosophy" );
echo esc_html($philosophy_cn) . " " . __( "Comment", "philosophy" );
} else {
echo $philosophy_cn . " " . __( "Comments", "philosophy" );
echo esc_html($philosophy_cn) . " " . __( "Comments", "philosophy" );
}

?>
Expand Down
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
foreach ( $tags as $tag ) :
$tag_link = get_tag_link( $tag->term_id );
?>
<a href='<?php echo $tag_link; ?>' title='<?php echo $tag->name; ?>' class='<?php echo $tag->slug ?>'><?php echo $tag->name ?></a>
<a href='<?php echo wp_kses_post($tag_link); ?>' title='<?php echo wp_kses_post($tag->name); ?>' class='<?php echo wp_kses_post($tag->slug); ?>'><?php echo wp_kses_post($tag->name); ?></a>
<?php
endforeach;
?>
Expand Down
10 changes: 8 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

require_once get_theme_file_path( '/inc/tgm.php');
require_once get_theme_file_path( '/inc/attachments.php');
require_once get_theme_file_path( '/widgets/social-icons-widget.php');
//require_once get_theme_file_path( '/widgets/social-icons-widget2.php');

if ( ! isset( $content_width ) ) $content_width = 960;
//check the version of css and js
if ( site_url() =='http://127.0.0.1/wordpress'){
define('VERSION', time() );
Expand All @@ -15,6 +16,7 @@ function philosophy_after_setup(){
add_theme_support('post-thumbnails');
add_theme_support('custom-logo');
add_theme_support('title-tag');
add_theme_support( 'automatic-feed-links' );
add_theme_support('html5',array('search-form','comment-list'));
add_theme_support('post-formats',array('image','gallery','quote','audio','video','link'));
add_editor_style('/assets/css/editor-style.css');
Expand Down Expand Up @@ -44,6 +46,10 @@ function philosophy_assets(){
wp_enqueue_script('modernizr-js',get_theme_file_uri('/assets/js/modernizr.js'),null,1.0);
wp_enqueue_script('pace-js',get_theme_file_uri('/assets/js/pace.min.js'),null,1.0);
wp_enqueue_script('plugins-js',get_theme_file_uri('/assets/js/plugins.js'),array('jquery'),1.0,true);

if ( is_singular() ) {
wp_enqueue_script( "comment-reply" );
}
wp_enqueue_script('main-js',get_theme_file_uri('/assets/js/main.js'),array('jquery'),1.0,true);
}
add_action( 'wp_enqueue_scripts','philosophy_assets');
Expand All @@ -60,7 +66,7 @@ function philosophy_pagination(){
$links = str_replace( "<ul class='pgn__num'>", "<ul>", $links );
$links = str_replace( "next pgn__num", "pgn__next", $links );
$links = str_replace( "prev pgn__num", "pgn__prev", $links );
echo $links;
echo wp_kses_post($links);
}

remove_action( 'term_description','wpautop');
Expand Down
3 changes: 2 additions & 1 deletion header.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="no-js" lang="en">
<html class="no-js" <?php language_attributes(); ?> lang="en">
<head>

<!--- basic page needs
Expand All @@ -19,6 +19,7 @@
</head>

<body id="top" <?php body_class(); ?>>
<?php wp_body_open(); ?>

<!-- pageheader
================================================== -->
Expand Down
5 changes: 4 additions & 1 deletion single.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

<div class="col-full s-content__main">

<?php the_content(); ?>
<?php
the_content();
wp_link_pages();
?>
<p class="s-content__tags">
<span>Post Tags</span>

Expand Down
117 changes: 116 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
Theme Name: Philosophy
Theme URI:
Description: Philosophy theme developed by ashraf
Author: Ashraf
Author URI: https://ashrafbd.com
Description : Philosophy WordPress theme by Ashraf
Expand All @@ -18,4 +19,118 @@ Tags : blog, education,photography,travel,lifestyle,health
color:#fff;
font-weight:bold;
text-decoration: none;
}
}
/* =WordPress Core
-------------------------------------------------------------- */
.alignnone {
margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
display: block;
margin: 5px auto 5px auto;
}

.alignright {
float:right;
margin: 5px 0 20px 20px;
}

.alignleft {
float: left;
margin: 5px 20px 20px 0;
}

a img.alignright {
float: right;
margin: 5px 0 20px 20px;
}

a img.alignnone {
margin: 5px 20px 20px 0;
}

a img.alignleft {
float: left;
margin: 5px 20px 20px 0;
}

a img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.wp-caption {
background: #fff;
border: 1px solid #f0f0f0;
max-width: 96%; /* Image does not overflow the content area */
padding: 5px 3px 10px;
text-align: center;
}

.wp-caption.alignnone {
margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
margin: 5px 0 20px 20px;
}

.wp-caption img {
border: 0 none;
height: auto;
margin: 0;
max-width: 98.5%;
padding: 0;
width: auto;
}

.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
margin: 0;
padding: 0 4px 5px;
}

/* Text meant only for screen readers. */
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}

.screen-reader-text:focus {
background-color: #eee;
clip: auto !important;
clip-path: none;
color: #444;
display: block;
font-size: 1em;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000;
/* Above WP toolbar. */
}
.sticky{

}
.gallery-caption{visibility:inherit;}
.bypostauthor{visibility:inherit;}
10 changes: 4 additions & 6 deletions template-parts/blog-home/featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
'meta_key' => 'featured',
'meta_value' => '1',
'posts_per_page' => 3,


));
$post_data=array();
$categories = get_the_category();
Expand Down Expand Up @@ -41,7 +39,7 @@
<?php echo esc_html($post_data[0]['cat']); ?>
</a></span>

<h1><a href="<?php echo esc_url($post_data[0]['permalink']); ?>" title="">
<h1><a href="<?php echo esc_url($post_data[0]['permalink']); ?>" title="<?php echo esc_html($post_data[0]['title']); ?>">
<?php echo esc_html($post_data[0]['title']); ?>
</a></h1>

Expand All @@ -53,7 +51,7 @@
</a>

<ul class="entry__meta">
<li><a href="<?php echo esc_url($post_data[0]['author_url']); ?>">
<li><a class="bypostauthor" href="<?php echo esc_url($post_data[0]['author_url']); ?>">
<?php echo esc_html($post_data[0]['author']); ?>
</a></li>
<li><?php echo esc_html($post_data[0]['date']); ?></li>
Expand All @@ -75,7 +73,7 @@
<?php echo esc_html($post_data[$i]['cat']); ?>
</a></span>

<h1><a href="<?php echo esc_url($post_data[$i]['permalink']); ?>" title="">
<h1><a href="<?php echo esc_url($post_data[$i]['permalink']); ?>" title="<?php echo esc_html($post_data[$i]['title']); ?>">
<?php echo esc_html($post_data[$i]['title']); ?>
</a></h1>

Expand All @@ -85,7 +83,7 @@
</a>

<ul class="entry__meta">
<li><a href="<?php echo esc_url($post_data[$i]['author_url']); ?>">
<li><a class="bypostauthor" href="<?php echo esc_url($post_data[$i]['author_url']); ?>">
<?php echo esc_html($post_data[$i]['author']); ?>
</a></li>
<li><?php echo esc_html($post_data[$i]['date']); ?></li>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/common/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'echo' => false,
));
$philosophy_menu=str_replace('menu-item-has-children','menu-item-has-children has-children',$philosophy_menu);
echo $philosophy_menu;
echo wp_kses_post($philosophy_menu);
?>

<a href="#0" title="Close Menu" class="header__overlay-close close-mobile-menu">
Expand Down
2 changes: 1 addition & 1 deletion template-parts/post-formats/post-audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

?>
<article class="masonry__brick entry format-audio" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-audio'); ?> data-aos="fade-up">

<div class="entry__thumb">
<a href="<?php the_permalink(); ?>" class="entry__thumb-link">
Expand Down
4 changes: 2 additions & 2 deletions template-parts/post-formats/post-gallery.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<article class="masonry__brick entry format-gallery" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-gallery'); ?> data-aos="fade-up">

<?php if(class_exists('Attachments')):
$attachments = New Attachments('gallery');
Expand All @@ -11,7 +11,7 @@
while($attachment = $attachments->get()):
?>
<div class="slider__slide">
<?php echo $attachments->image('philosophy-post-preview-square'); ?>
<?php echo wp_kses_post($attachments->image('philosophy-post-preview-square')); ?>
</div>
<?php endwhile; ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/post-formats/post-link.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<article class="masonry__brick entry format-link" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-link'); ?> data-aos="fade-up">

<div class="entry__thumb">
<div class="link-wrap">
Expand Down
2 changes: 1 addition & 1 deletion template-parts/post-formats/post-quote.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<article class="masonry__brick entry format-quote" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-quote'); ?> data-aos="fade-up">

<div class="entry__thumb">
<blockquote>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/post-formats/post-video.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

?>
<article class="masonry__brick entry format-video" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-video'); ?> data-aos="fade-up">

<div class="entry__thumb video-image">
<a href="<?php echo esc_url($philosophy_video_file);?>?color=01aef0&title=0&byline=0&portrait=0" data-lity>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/post-formats/post.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
?>
<article class="masonry__brick entry format-standard" data-aos="fade-up">
<article <?php post_class('masonry__brick entry format-standard'); ?> data-aos="fade-up">

<div class="entry__thumb">
<a href="single-standard.html" class="entry__thumb-link">
Expand Down
Loading

0 comments on commit fcf9034

Please sign in to comment.