Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Adds 39 and several other WordPress templates. #50

Merged
merged 18 commits into from
Jan 30, 2018
Merged

Adds 39 and several other WordPress templates. #50

merged 18 commits into from
Jan 30, 2018

Conversation

kopepasah
Copy link
Contributor

@kopepasah kopepasah commented Jan 29, 2018

Branched off and dependent on add/34. Branch add/34 has been merged into develop.

@kopepasah kopepasah changed the title WIP - Add/39 Adds 39 and several other WordPress templates. Jan 30, 2018
* @return string $title
*/
function ampconf_get_the_archive_title( $title ) {
$parts = explode( ':', $title );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some languages may translate “:” differently for the strings found in get_the_archive_title() so this won't always work.

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since comments are never shown on pages, I'll add remove_post_type_support( 'page', 'comments' );

?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'entry entry--featured' ); ?>>
<figure class="entry__thumbnail">
<a href="<?php esc_url( the_permalink() ); ?>">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the_permalink() echoes, so the esc_url() here will run on null, which won't get printed anyway. I'll change this to just the_permalink(), as the return goes through esc_url() already.

<figure class="entry__thumbnail">
<a href="<?php esc_url( the_permalink() ); ?>">
<?php the_post_thumbnail( 'ampconf-375x225' ); ?>
<?php the_post_thumbnail( 'ampconf-1040x400' ); ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why calling the_post_thumbnail() twice? I'm seeing:

image

Is this related to #48?

Also:
* Fix usage of the_permalink().
* Add some more phpdoc.
* Add translation for share label.

?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'entry entry--featured' ); ?>>
<figure class="entry__thumbnail">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kopepasah should all instances of <figure class="entry__thumbnail"> be wrapped with <?php if ( has_post_thumbnail() ) : ?>?

@westonruter westonruter merged commit 49fd2d6 into develop Jan 30, 2018
@westonruter westonruter deleted the add/39 branch January 30, 2018 19:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants