Plugin Directory

Changeset 1502033


Ignore:
Timestamp:
09/24/2016 09:16:14 PM (10 years ago)
Author:
jubstuff
Message:

Version 1.0.1

Location:
postats/trunk
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • postats/trunk/postats.php

    r1335026 r1502033  
    4141        add_action( 'plugins_loaded', array( $self, 'action_plugins_loaded' ) );
    4242        add_filter( 'the_content', array( $self, 'filter_the_content' ) );
     43        add_action( 'wp_enqueue_scripts', array( $self, 'enqueue_scripts' ) );
     44    }
     45
     46    public function enqueue_scripts() {
     47        wp_enqueue_style( 'postats', plugin_dir_url( __FILE__ ) . 'css/main.css' );
    4348    }
    4449
     
    6873            $post_id       = get_the_ID();
    6974
    70             $output = sprintf( '<h6 class="postats postats-%s">' . __( 'Post Stats', 'postats' ) . '</h6>', $post_id );
    71             $output .= '<ul>';
    72             $output .= '<li>' . sprintf( _n( '%d word', '%d words', $words, 'postats' ), $words ) . '</li>';
    73             $output .= '<li>' . sprintf( _n( '%d character', '%d characters', $characters, 'postats' ), $characters ) . '</li>';
    74             $output .= '<li>' . sprintf( __( '%d s reading time', 'postats' ), $reading_time ) . '</li>';
    75             $output .= '<li>' . sprintf( __( '%d s speaking time', 'postats' ), $speaking_time ) . '</li>';
    76             $output .= '</ul>';
     75            ob_start();
     76            include plugin_dir_path( __FILE__ ) . 'views/stats.php';
     77            $output = ob_get_clean();
    7778
    7879        }
  • postats/trunk/readme.txt

    r1335026 r1502033  
    33Tags: post, statistics, reading, post
    44Requires at least: 4.0
    5 Tested up to: 4.4
    6 Stable tag: 1.0
     5Tested up to: 4.6
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2929== Changelog ==
    3030
     31= 1.0.1 =
     32* Add CSS.
     33* Move template in separate file.
     34
    3135= 1.0 =
    3236* Initial version.
Note: See TracChangeset for help on using the changeset viewer.