Skip to content

Commit

Permalink
Addressing #5, #14, #15, #16, #17
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Mar 24, 2016
1 parent 212ff89 commit d0f93ff
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
16 changes: 8 additions & 8 deletions content.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
<?php
if ( is_single() ) {
fastshop_posted_on();
the_title( '<h1 class="entry-title" itemprop="name headline">', '</h1>' );
} else {
if ( 'post' == get_post_type() ) {
fastshop_posted_on();
}

the_title( sprintf( '<h1 class="entry-title" itemprop="name headline"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' );
}
the_title( sprintf( '<h1 class="entry-title" itemprop="name headline"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' );
?>
</header><!-- .entry-header -->
<aside class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
if ( ! is_single() ) {
if ( 'post' == get_post_type() ) {
fastshop_posted_on();
}
}
if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>

<?php
/* translators: used between list items, there is a space after the comma */
Expand Down
5 changes: 5 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
$home = '';
$blog = '';
}
ob_start();
wc_print_notices();
$notices = ob_get_contents();
ob_end_clean();
$fs_data = array(
'notices' => $notices,
'url' => FS_URL,
'home' => $home,
'blog' => $blog,
Expand Down
2 changes: 1 addition & 1 deletion inc/functions/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,6 @@ function fastshop_posted_on() {
_x( 'by %s', 'post author', 'fastshop' ),
'<span class="vcard author"><span class="fn" itemprop="author"><a class="url fn n" rel="author" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span></span>'
);
echo apply_filters( 'fastshop_single_post_posted_on_html', '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>', $posted_on, $byline );
echo apply_filters( 'fastshop_single_post_posted_on_html', "<div class='posted-on-by'><span class='posted-on'>$posted_on</span> <span class='byline'>$byline</span></div>", $posted_on, $byline );
}
}
3 changes: 3 additions & 0 deletions ng/product.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {ProductsComponent} from "./products.component.ts";
directives: [ ProductsComponent ],
})
export class ProductComponent implements OnInit {
notices = '';
private product : SingleProduct = {
post_classes : '',
slug : '',
Expand All @@ -34,6 +35,8 @@ export class ProductComponent implements OnInit {
}

ngOnInit() {
this.notices = fastshopData.notices;
fastshopData.notices = '';
this.wpApi.api( 'product?name=' + this.routeParams.params.slug )
.success( res => {
this.product = JSON.parse( res );
Expand Down
1 change: 1 addition & 0 deletions ng/tpl/product.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<div *ngIf="notices" [innerHTML]="notices"></div>
<div *ngIf="product && product.ID" [attr.id]="'product-' + product.ID" [ngClass]="product.post_classes">
<span *ngIf="product.sale" class="onsale">Sale!</span>
<div class="images">
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ body {
content: '\f002';
position: absolute;
top: 0;
left: 0;
color: #444;
}

Expand Down Expand Up @@ -1513,6 +1514,7 @@ fieldset legend {
margin: 0 0 0 -1.6em;
padding-left: 0;
display: block;
overflow: visible;
}

.main-navigation ul li,
Expand Down Expand Up @@ -1981,6 +1983,7 @@ video {
.pagination {
text-align: center;
margin-bottom: 1.6em;
clear: both;
}

.pagination .page-numbers,
Expand Down Expand Up @@ -2584,6 +2587,7 @@ fastshop {
router-outlet + * {
display: block;
background: #fff;
position: relative;
}

router-outlet + *:after {
Expand Down

0 comments on commit d0f93ff

Please sign in to comment.