Changeset 1450736
- Timestamp:
- 07/07/2016 05:23:32 PM (10 years ago)
- File:
-
- 1 edited
-
the-total-views/trunk/the-total-views.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-total-views/trunk/the-total-views.php
r1419640 r1450736 4 4 Plugin URI: http://www.gamix.fr/ 5 5 Description: 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.06 Version: 1.1.0 7 7 Author: Fredd 8 8 Author URI: http://www.gamix.fr/ … … 91 91 <?php 92 92 93 function get_thetotalviews( $atts) {93 function get_thetotalviews() { 94 94 global $wpdb; 95 95 $table_name = $wpdb->prefix . "postmeta"; 96 96 $sql = "SELECT SUM(meta_value) FROM ".$table_name." WHERE meta_key = 'views'"; 97 97 $total = $wpdb->get_var($sql); 98 return"<b>".$total."</b>";98 echo "<b>".$total."</b>"; 99 99 } 100 100
Note: See TracChangeset
for help on using the changeset viewer.