Skip to content

Commit

Permalink
Lesson 61
Browse files Browse the repository at this point in the history
  • Loading branch information
Alecaddd authored and Alecaddd committed Dec 28, 2016
1 parent 7aa47b4 commit 1db51ba
Show file tree
Hide file tree
Showing 401 changed files with 4,605 additions and 0 deletions.
59 changes: 59 additions & 0 deletions Lesson 61/archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php /*
@package sunsettheme
*/

get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<header class="archive-header text-center">
<?php the_archive_title('<h1 class="page-title">', '</h1>'); ?>
</header>

<?php if( is_paged() ): ?>

<div class="container text-center container-load-previous">
<a class="btn-sunset-load sunset-load-more" data-prev="1" data-archive="<?php echo sunset_grab_current_uri(); ?>" data-page="<?php echo sunset_check_paged(1); ?>" data-url="<?php echo admin_url('admin-ajax.php'); ?>">
<span class="sunset-icon sunset-loading"></span>
<span class="text">Load Previous</span>
</a>
</div><!-- .container -->

<?php endif; ?>

<div class="container sunset-posts-container">

<?php

if( have_posts() ):

echo '<div class="page-limit" data-page="' . $_SERVER["REQUEST_URI"] . '">';

while( have_posts() ): the_post();

get_template_part( 'template-parts/content', get_post_format() );

endwhile;

echo '</div>';

endif;

?>

</div><!-- .container -->

<div class="container text-center">
<a class="btn-sunset-load sunset-load-more" data-page="<?php echo sunset_check_paged(1); ?>" data-archive="<?php echo sunset_grab_current_uri(); ?>" data-url="<?php echo admin_url('admin-ajax.php'); ?>">
<span class="sunset-icon sunset-loading"></span>
<span class="text">Load More</span>
</a>
</div><!-- .container -->

</main>
</div><!-- #primary -->

<?php get_footer(); ?>
128 changes: 128 additions & 0 deletions Lesson 61/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<?php /*
@package sunsettheme
*/

if( post_password_required() ){
return;
}

?>

<div id="comments" class="comments-area">

<?php
if( have_comments() ):
//We have comments
?>

<h2 class="comment-title">
<?php

printf(
esc_html( _nx( 'One comment on &ldquo;%2$s&rdquo;', '%1$s comments on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'sunsettheme' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);

?>
</h2>

<?php sunset_get_post_navigation(); ?>

<ol class="comment-list">

<?php

$args = array(
'walker' => null,
'max_depth' => '',
'style' => 'ol',
'callback' => null,
'end-callback' => null,
'type' => 'all',
'reply_text' => 'Reply',
'page' => '',
'per_page' => '',
'avatar_size' => 64,
'reverse_top_level' => null,
'reverse_children' => '',
'format' => 'html5',
'short_ping' => false,
'echo' => true
);

wp_list_comments( $args );
?>

</ol>

<?php sunset_get_post_navigation(); ?>

<?php
if( !comments_open() && get_comments_number() ):
?>

<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'sunsettheme' ); ?></p>

<?php
endif;
?>

<?php
endif;
?>

<?php

$fields = array(

'author' =>
'<div class="form-group"><label for="author">' . __( 'Name', 'domainreference' ) . '</label> <span class="required">*</span> <input id="author" name="author" type="text" class="form-control" value="' . esc_attr( $commenter['comment_author'] ) . '" required="required" /></div>',

'email' =>
'<div class="form-group"><label for="email">' . __( 'Email', 'domainreference' ) . '</label> <span class="required">*</span><input id="email" name="email" class="form-control" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" required="required" /></div>',

'url' =>
'<div class="form-group last-field"><label for="url">' . __( 'Website', 'domainreference' ) . '</label><input id="url" name="url" class="form-control" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" /></div>'

);

$args = array(

'class_submit' => 'btn btn-block btn-lg btn-warning',
'label_submit' => __( 'Submit Comment' ),
'comment_field' =>
'<div class="form-group"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <span class="required">*</span><textarea id="comment" class="form-control" name="comment" rows="4" required="required"></textarea></p>',
'fields' => apply_filters( 'comment_form_default_fields', $fields )

);

comment_form( $args );

?>

</div><!-- .comments-area -->






















6 changes: 6 additions & 0 deletions Lesson 61/css/bootstrap.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Lesson 61/css/sunset.ace.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
@package sunsettheme
*/
#customCss { position: relative; width: 500px; height: 400px; }
2 changes: 2 additions & 0 deletions Lesson 61/css/sunset.admin.css

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

7 changes: 7 additions & 0 deletions Lesson 61/css/sunset.admin.css.map

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

2 changes: 2 additions & 0 deletions Lesson 61/css/sunset.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Lesson 61/css/sunset.css.map

Large diffs are not rendered by default.

Binary file added Lesson 61/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
Loading

0 comments on commit 1db51ba

Please sign in to comment.