Commit f5f8323b authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch '11-optimize-and-unify-php' into 'master'

Optimize and unify PHP, part 1

See merge request !12
parents f213db4b 15aa4cf9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ get_header();
        <h2><?php bloginfo('description');?></h2>
    </header>
    <section class="ticker">
        <?php echo apply_filters('the_content', $post->post_content); ?>
        <?php the_content(); ?>
    </section>
    <section class="news">
        <?php $recent_posts = wp_get_recent_posts(array('numberposts'=>4)); ?>
+9 −16
Original line number Diff line number Diff line
@@ -19,26 +19,19 @@
get_header();
?>
<main>
    <?php the_post(); ?>
    <article>
        <header
        <?php
            echo ' style="background-image:url(\'';
            if ( has_post_thumbnail($post->ID) ) {
                echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
        <header style="background-image:url('<?php if(has_post_thumbnail()) {
                // A header configured specifically for this page
                the_post_thumbnail_url();
            } else {
                echo get_header_image();
            }
            echo '\');"';?> >
            <h1><?php echo get_the_title($post->ID); ?></h1>
                // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL)
                header_image();
            } ?>')">
            <h1><?php the_title(); ?></h1>
        </header>
        <div class="content">
            <?php
                if ( !post_password_required() ) {
                    echo apply_filters('the_content', $post->post_content);
                } else {
                    echo get_the_password_form();
                }
            ?>
            <?php the_content(); ?>
        </div>
        <footer></footer>
    </article>
+11 −18
Original line number Diff line number Diff line
@@ -21,30 +21,23 @@
get_header();
?>
<main>
    <?php the_post(); ?>
    <article>
        <header
        <?php
            echo ' style="background-image:url(\'';
            if ( has_post_thumbnail($post->ID) ) {
                echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
        <header style="background-image:url('<?php if(has_post_thumbnail()) {
                // A header configured specifically for this post
                the_post_thumbnail_url();
            } else {
                echo get_header_image();
            }
            echo '\');"';?> >
            <h1><?php echo get_the_title($post->ID); ?></h1>
                // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL)
                header_image();
            } ?>')">
            <h1><?php the_title(); ?></h1>
        </header>
        <div class="content">
            <?php
                if ( !post_password_required() ) {
                    echo apply_filters('the_content', $post->post_content);
                } else {
                    echo get_the_password_form();
                }
            ?>
            <?php the_content(); ?>
        </div>
        <footer>
            <div class="post-meta-author"><?php echo get_the_author_meta('display_name', $post->post_author);?></div>
            <time><?php echo get_the_date();?></time>
            <div class="post-meta-author"><?php the_author_meta('display_name'); ?></div>
            <time><?php the_date(); ?></time>
        </footer>
    </article>
</main>
+1 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser (Code-Rewrite)
 * Author URI: https://personads.me/
 *
 * Version: 1.3.2
 * Version: 1.3.3
 *
 * License: GNU General Public License v3.0
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -386,7 +386,6 @@ article:only-child > header {
    height: 200px;
    margin: -2em 0 0 -2em;
    padding: 2em;
    background-image: url("img/header.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;