Plugin Directory

Changeset 1450736


Ignore:
Timestamp:
07/07/2016 05:23:32 PM (10 years ago)
Author:
gamixfredd
Message:

Update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • the-total-views/trunk/the-total-views.php

    r1419640 r1450736  
    44Plugin URI: http://www.gamix.fr/
    55Description: A simple plugin to display the total number of articles views by widget or/and by shortcode [thetotalviews].You must to have [WP-PostViews](https://wordpress.org/plugins/wp-postviews/) installed
    6 Version: 1.0.0
     6Version: 1.1.0
    77Author: Fredd
    88Author URI: http://www.gamix.fr/
     
    9191<?php
    9292
    93 function get_thetotalviews($atts) {
     93function get_thetotalviews() {
    9494global $wpdb;
    9595$table_name = $wpdb->prefix . "postmeta";
    9696    $sql = "SELECT SUM(meta_value) FROM ".$table_name." WHERE meta_key = 'views'";
    9797    $total = $wpdb->get_var($sql);
    98     return "<b>".$total."</b>";
     98    echo "<b>".$total."</b>";
    9999}
    100100
Note: See TracChangeset for help on using the changeset viewer.