WordPress Popular Posts - Version 4.1.2

Version Description

  • Enables Data Caching by default (new installs only).
  • The Parameters section (Settings > WordPress Popular Posts > Parameters) is now mobile-friendly.
  • Updated the documentation in the Parameters section.
  • Refactored WPP's caching mechanism into its own class.
  • Removed unused code.
Download this release

Release Info

Developer hcabrera
Plugin Icon 128x128 WordPress Popular Posts
Version 4.1.2
Comparing to
See all releases

Code changes from version 4.1.1 to 4.1.2

admin/css/admin.css CHANGED
@@ -336,6 +336,35 @@
336
  display: inline;
337
  }
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  .clear {
340
  float:none;
341
  clear:both;
336
  display: inline;
337
  }
338
 
339
+ #wpp_params {}
340
+
341
+ #wpp_params div {
342
+ }
343
+
344
+ #wpp_params div table {
345
+ width: 100%;
346
+ min-width: 800px;
347
+ background: white;
348
+ }
349
+
350
+ #wpp_params div table tr th {
351
+ font-size: 1.2em;
352
+ text-align: left;
353
+ border-bottom: #dedede 1px solid;
354
+ }
355
+
356
+ #wpp_params div table tr th,
357
+ #wpp_params div table tr td {
358
+ padding: 1em;
359
+ }
360
+
361
+ #wpp_params div table tr td {
362
+ position: static !important;
363
+ clear: none !important;
364
+ display: table-cell !important;
365
+ vertical-align: top;
366
+ }
367
+
368
  .clear {
369
  float:none;
370
  clear:both;
admin/partials/admin.php CHANGED
@@ -707,250 +707,253 @@ if ( !$wpp_rand = get_option("wpp_rand") ) {
707
  'https://github.com/cabrerahector/wordpress-popular-posts/wiki/1.-Using-WPP-on-posts-&-pages'
708
  ); ?></p>
709
  <br />
710
- <table cellspacing="0" class="wp-list-table widefat fixed posts">
711
- <thead>
712
- <tr>
713
- <th class="manage-column column-title"><?php _e('Parameter', 'wordpress-popular-posts'); ?></th>
714
- <th class="manage-column column-title"><?php _e('What it does ', 'wordpress-popular-posts'); ?></th>
715
- <th class="manage-column column-title"><?php _e('Possible values', 'wordpress-popular-posts'); ?></th>
716
- <th class="manage-column column-title"><?php _e('Defaults to', 'wordpress-popular-posts'); ?></th>
717
- <th class="manage-column column-title"><?php _e('Example', 'wordpress-popular-posts'); ?></th>
718
- </tr>
719
- </thead>
720
- <tbody>
721
- <tr>
722
- <td><strong>header</strong></td>
723
- <td><?php _e('Sets a heading for the list', 'wordpress-popular-posts'); ?></td>
724
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
725
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
726
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts']<br /><br /></td>
727
- </tr>
728
- <tr class="alternate">
729
- <td><strong>header_start</strong></td>
730
- <td><?php _e('Set the opening tag for the heading of the list', 'wordpress-popular-posts'); ?></td>
731
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
732
- <td>&lt;h2&gt;</td>
733
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts', <br />&nbsp;&nbsp;&nbsp;&nbsp;'header_start' => '&lt;h3 class="title"&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'header_end' => '&lt;/h3&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts' header_start='&lt;h3 class="title"&gt;' header_end='&lt;/h3&gt;']<br /><br /></td>
734
- </tr>
735
- <tr>
736
- <td><strong>header_end</strong></td>
737
- <td><?php _e('Set the closing tag for the heading of the list', 'wordpress-popular-posts'); ?></td>
738
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
739
- <td>&lt;/h2&gt;</td>
740
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts', <br />&nbsp;&nbsp;&nbsp;&nbsp;'header_start' => '&lt;h3 class="title"&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'header_end' => '&lt;/h3&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts' header_start='&lt;h3 class="title"&gt;' header_end='&lt;/h3&gt;']<br /><br /></td>
741
- </tr>
742
- <tr class="alternate">
743
- <td><strong>limit</strong></td>
744
- <td><?php _e('Sets the maximum number of popular posts to be shown on the listing', 'wordpress-popular-posts'); ?></td>
745
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
746
- <td>10</td>
747
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'limit' => 5<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp limit=5]<br /><br /></td>
748
- </tr>
749
- <tr>
750
- <td><strong>range</strong></td>
751
- <td><?php _e('Tells WordPress Popular Posts to retrieve the most popular entries within the time range specified by you', 'wordpress-popular-posts'); ?></td>
752
- <td>"last24hours", "last7days", "last30days", "all", "custom"</td>
753
- <td>last24hours</td>
754
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'last7days'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='last7days']<br /><br /></td>
755
- </tr>
756
- <tr class="alternate">
757
- <td><strong>time_quantity</strong></td>
758
- <td><?php _e('Especifies the number of time units of the custom time range', 'wordpress-popular-posts'); ?></td>
759
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
760
- <td>24</td>
761
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'custom',<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_quantity' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_unit' => 'hour'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='custom' time_quantity=1 time_unit='hour']<br /><br /></td>
762
- </tr>
763
- <tr>
764
- <td><strong>time_unit</strong></td>
765
- <td><?php _e('Especifies the time unit of the custom time range', 'wordpress-popular-posts'); ?></td>
766
- <td>minute, hour, day, week, month</td>
767
- <td>hour</td>
768
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'custom',<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_quantity' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_unit' => 'hour'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='custom' time_quantity=1 time_unit='hour']<br /><br /></td>
769
- </tr>
770
- <tr class="alternate">
771
- <td><strong>freshness</strong></td>
772
- <td><?php _e('Tells WordPress Popular Posts to retrieve the most popular entries published within the time range specified by you', 'wordpress-popular-posts'); ?></td>
773
- <td>1 (true), 0 (false)</td>
774
- <td>0</td>
775
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'weekly',<br />&nbsp;&nbsp;&nbsp;&nbsp;'freshness' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='last7days' freshness=1]<br /><br /></td>
776
- </tr>
777
- <tr>
778
- <td><strong>order_by</strong></td>
779
- <td><?php _e('Sets the sorting option of the popular posts', 'wordpress-popular-posts'); ?></td>
780
- <td>"comments", "views", "avg" <?php _e('(for average views per day)', 'wordpress-popular-posts'); ?></td>
781
- <td>views</td>
782
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'order_by' => 'comments'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp order_by='comments']<br /><br /></td>
783
- </tr>
784
- <tr class="alternate">
785
- <td><strong>post_type</strong></td>
786
- <td><?php _e('Defines the type of posts to show on the listing', 'wordpress-popular-posts'); ?></td>
787
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
788
- <td>post,page</td>
789
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_type' => 'post,page,your-custom-post-type'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_type='post,page,your-custom-post-type']<br /><br /></td>
790
- </tr>
791
- <tr>
792
- <td><strong>pid</strong></td>
793
- <td><?php _e('If set, WordPress Popular Posts will exclude the specified post(s) ID(s) form the listing.', 'wordpress-popular-posts'); ?></td>
794
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
795
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
796
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'pid' => '60,25,31'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp pid='60,25,31']<br /><br /></td>
797
- </tr>
798
- <tr class="alternate">
799
- <td><strong>cat</strong></td>
800
- <td><?php _e('If set, WordPress Popular Posts will retrieve all entries that belong to the specified category ID(s). If a minus sign is used, entries associated to the category will be excluded instead.', 'wordpress-popular-posts'); ?></td>
801
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
802
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
803
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'cat' => '1,55,-74'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp cat='1,55,-74']<br /><br /></td>
804
- </tr>
805
- <tr>
806
- <td><strong>taxonomy</strong></td>
807
- <td><?php _e('If set, WordPress Popular Posts will filter posts by a given taxonomy.', 'wordpress-popular-posts'); ?></td>
808
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
809
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
810
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'taxonomy' => 'post_tag',<br />&nbsp;&nbsp;&nbsp;&nbsp;'term_id' => '118,75,15'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp taxonomy='post_tag' term_id='118,75,15']<br /><br /></td>
811
- </tr>
812
- <tr class="alternate">
813
- <td><strong>term_id</strong></td>
814
- <td><?php _e('If set, WordPress Popular Posts will retrieve all entries that belong to the specified term ID(s). If a minus sign is used, entries associated to the term(s) will be excluded instead.', 'wordpress-popular-posts'); ?></td>
815
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
816
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
817
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'taxonomy' => 'post_tag',<br />&nbsp;&nbsp;&nbsp;&nbsp;'term_id' => '118,75,15'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp taxonomy='post_tag' term_id='118,75,15']<br /><br /></td>
818
- </tr>
819
- <tr>
820
- <td><strong>author</strong></td>
821
- <td><?php _e('If set, WordPress Popular Posts will retrieve all entries created by specified author(s) ID(s).', 'wordpress-popular-posts'); ?></td>
822
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
823
- <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
824
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'author' => '75,8,120'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp author='75,8,120']<br /><br /></td>
825
- </tr>
826
- <tr class="alternate">
827
- <td><strong>title_length</strong></td>
828
- <td><?php _e('If set, WordPress Popular Posts will shorten each post title to "n" characters whenever possible', 'wordpress-popular-posts'); ?></td>
829
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
830
- <td>25</td>
831
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_length' => 25<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp title_length=25]<br /><br /></td>
832
- </tr>
833
- <tr>
834
- <td><strong>title_by_words</strong></td>
835
- <td><?php _e('If set to 1, WordPress Popular Posts will shorten each post title to "n" words instead of characters', 'wordpress-popular-posts'); ?></td>
836
- <td>1 (true), (0) false</td>
837
- <td>0</td>
838
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_by_words' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_length' => 25<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp title_by_words=1 title_length=25]<br /><br /></td>
839
- </tr>
840
- <tr class="alternate">
841
- <td><strong>excerpt_length</strong></td>
842
- <td><?php _e('If set, WordPress Popular Posts will build and include an excerpt of "n" characters long from the content of each post listed as popular', 'wordpress-popular-posts'); ?></td>
843
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
844
- <td>0</td>
845
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_length=25 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
846
- </tr>
847
- <tr>
848
- <td><strong>excerpt_format</strong></td>
849
- <td><?php _e('If set, WordPress Popular Posts will maintaing all styling tags (strong, italic, etc) and hyperlinks found in the excerpt', 'wordpress-popular-posts'); ?></td>
850
- <td>1 (true), (0) false</td>
851
- <td>0</td>
852
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_format' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_format=1 excerpt_length=25 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
853
- </tr>
854
- <tr class="alternate">
855
- <td><strong>excerpt_by_words</strong></td>
856
- <td><?php _e('If set to 1, WordPress Popular Posts will shorten the excerpt to "n" words instead of characters', 'wordpress-popular-posts'); ?></td>
857
- <td>1 (true), (0) false</td>
858
- <td>0</td>
859
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_by_words' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_by_words=1 excerpt_length=55 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
860
- </tr>
861
- <tr>
862
- <td><strong>thumbnail_width</strong></td>
863
- <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the width for thumbnails', 'wordpress-popular-posts'); ?></td>
864
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
865
- <td>0</td>
866
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_width' => 30,<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_height' => 30<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp thumbnail_width=30 thumbnail_height=30]<br /><br /></td>
867
- </tr>
868
- <tr class="alternate">
869
- <td><strong>thumbnail_height</strong></td>
870
- <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the height for thumbnails', 'wordpress-popular-posts'); ?></td>
871
- <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
872
- <td>0</td>
873
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_width' => 30,<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_height' => 30<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp thumbnail_width=30 thumbnail_height=30]<br /><br /></td>
874
- </tr>
875
- <tr>
876
- <td><strong>rating</strong></td>
877
- <td><?php _e('If set, and if the WP-PostRatings plugin is installed and enabled on your blog, WordPress Popular Posts will show how your visitors are rating your entries', 'wordpress-popular-posts'); ?></td>
878
- <td>1 (true), (0) false</td>
879
- <td>0</td>
880
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'rating' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} {rating}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp rating=1 post_html='&lt;li&gt;{thumb} {title} {rating}&lt;/li&gt;']<br /><br /></td>
881
- </tr>
882
- <tr class="alternate">
883
- <td><strong>stats_comments</strong></td>
884
- <td><?php _e('If set, WordPress Popular Posts will show how many comments each popular post has got during the specified time range', 'wordpress-popular-posts'); ?></td>
885
- <td>1 (true), 0 (false)</td>
886
- <td>0</td>
887
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_comments' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_comments=1]<br /><br /></td>
888
- </tr>
889
- <tr>
890
- <td><strong>stats_views</strong></td>
891
- <td><?php _e('If set, WordPress Popular Posts will show how many views each popular post has got during the specified time range', 'wordpress-popular-posts'); ?></td>
892
- <td>1 (true), (0) false</td>
893
- <td>1</td>
894
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_views' => 0<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_views=0]<br /><br /></td>
895
- </tr>
896
- <tr class="alternate">
897
- <td><strong>stats_author</strong></td>
898
- <td><?php _e('If set, WordPress Popular Posts will show who published each popular post on the list', 'wordpress-popular-posts'); ?></td>
899
- <td>1 (true), (0) false</td>
900
- <td>0</td>
901
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_author' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_author=1]<br /><br /></td>
902
- </tr>
903
- <tr>
904
- <td><strong>stats_date</strong></td>
905
- <td><?php _e('If set, WordPress Popular Posts will display the date when each popular post on the list was published', 'wordpress-popular-posts'); ?></td>
906
- <td>1 (true), (0) false</td>
907
- <td>0</td>
908
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_date=1]<br /><br /></td>
909
- </tr>
910
- <tr class="alternate">
911
- <td><strong>stats_date_format</strong></td>
912
- <td><?php _e('Sets the date format', 'wordpress-popular-posts'); ?></td>
913
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
914
- <td>0</td>
915
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date_format' => 'F j, Y'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_date=1 stats_date_format='F j, Y']<br /><br /></td>
916
- </tr>
917
- <tr>
918
- <td><strong>stats_category</strong></td>
919
- <td><?php _e('If set, WordPress Popular Posts will display the categories associated to each entry', 'wordpress-popular-posts'); ?></td>
920
- <td>1 (true), (0) false</td>
921
- <td>0</td>
922
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_category' => 1, <br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {category}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_taxonomy=1 post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {category}&lt;/li&gt;']<br /><br /></td>
923
- </tr>
924
- <tr class="alternate">
925
- <td><strong>stats_taxonomy</strong></td>
926
- <td><?php _e('If set, WordPress Popular Posts will display the taxonomies associated to each entry', 'wordpress-popular-posts'); ?></td>
927
- <td>1 (true), (0) false</td>
928
- <td>0</td>
929
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_taxonomy' => 1, <br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {taxonomy}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_taxonomy=1 post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {taxonomy}&lt;/li&gt;']<br /><br /></td>
930
- </tr>
931
- <tr>
932
- <td><strong>wpp_start</strong></td>
933
- <td><?php _e('Sets the opening tag for the listing', 'wordpress-popular-posts'); ?></td>
934
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
935
- <td>&lt;ul&gt;</td>
936
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_start' => '&lt;ol&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_end' => '&lt;/ol&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp wpp_start='&lt;ol&gt;' wpp_end='&lt;/ol&gt;']<br /><br /></td>
937
- </tr>
938
- <tr class="alternate">
939
- <td><strong>wpp_end</strong></td>
940
- <td><?php _e('Sets the closing tag for the listing', 'wordpress-popular-posts'); ?></td>
941
- <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
942
- <td>&lt;/ul&gt;</td>
943
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_start' => '&lt;ol&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_end' => '&lt;/ol&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp wpp_start='&lt;ol&gt;' wpp_end='&lt;/ol&gt;']<br /><br /></td>
944
- </tr>
945
- <tr>
946
- <td><strong>post_html</strong></td>
947
- <td><?php _e('Sets the HTML structure of each post', 'wordpress-popular-posts'); ?></td>
948
- <td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('returns thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('returns thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('returns thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('returns linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{pid}</em> (<?php _e('returns the post/page ID', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('returns post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('returns the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('returns post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('returns post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('returns the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('returns post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('returns linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('returns linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('returns linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('returns views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('returns comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('returns post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)</td>
949
- <td>&lt;li&gt;{thumb} {title} &lt;span class="wpp-meta post-stats"&gt;{stats}&lt;/span&gt;&lt;/li&gt;</td>
950
- <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;']<br /><br /></td>
951
- </tr>
952
- </tbody>
953
- </table>
 
 
 
954
  </div>
955
  </div>
956
  <!-- End params -->
707
  'https://github.com/cabrerahector/wordpress-popular-posts/wiki/1.-Using-WPP-on-posts-&-pages'
708
  ); ?></p>
709
  <br />
710
+
711
+ <div style="overflow-x: auto;">
712
+ <table cellspacing="0" class="wp-list-table">
713
+ <thead>
714
+ <tr>
715
+ <th class="manage-column column-title"><?php _e('Parameter', 'wordpress-popular-posts'); ?></th>
716
+ <th class="manage-column column-title"><?php _e('What it does ', 'wordpress-popular-posts'); ?></th>
717
+ <th class="manage-column column-title"><?php _e('Possible values', 'wordpress-popular-posts'); ?></th>
718
+ <th class="manage-column column-title"><?php _e('Defaults to', 'wordpress-popular-posts'); ?></th>
719
+ <th class="manage-column column-title"><?php _e('Example', 'wordpress-popular-posts'); ?></th>
720
+ </tr>
721
+ </thead>
722
+ <tbody>
723
+ <tr>
724
+ <td><strong>header</strong></td>
725
+ <td><?php _e('Sets a heading for the list', 'wordpress-popular-posts'); ?></td>
726
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
727
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
728
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts']<br /><br /></td>
729
+ </tr>
730
+ <tr class="alternate">
731
+ <td><strong>header_start</strong></td>
732
+ <td><?php _e('Set the opening tag for the heading of the list', 'wordpress-popular-posts'); ?></td>
733
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
734
+ <td>&lt;h2&gt;</td>
735
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts', <br />&nbsp;&nbsp;&nbsp;&nbsp;'header_start' => '&lt;h3 class="title"&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'header_end' => '&lt;/h3&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts' header_start='&lt;h3 class="title"&gt;' header_end='&lt;/h3&gt;']<br /><br /></td>
736
+ </tr>
737
+ <tr>
738
+ <td><strong>header_end</strong></td>
739
+ <td><?php _e('Set the closing tag for the heading of the list', 'wordpress-popular-posts'); ?></td>
740
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
741
+ <td>&lt;/h2&gt;</td>
742
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'header' => 'Popular Posts', <br />&nbsp;&nbsp;&nbsp;&nbsp;'header_start' => '&lt;h3 class="title"&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'header_end' => '&lt;/h3&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp header='Popular Posts' header_start='&lt;h3 class="title"&gt;' header_end='&lt;/h3&gt;']<br /><br /></td>
743
+ </tr>
744
+ <tr class="alternate">
745
+ <td><strong>limit</strong></td>
746
+ <td><?php _e('Sets the maximum number of popular posts to be shown on the listing', 'wordpress-popular-posts'); ?></td>
747
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
748
+ <td>10</td>
749
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'limit' => 5<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp limit=5]<br /><br /></td>
750
+ </tr>
751
+ <tr>
752
+ <td><strong>range</strong></td>
753
+ <td><?php _e('Tells WordPress Popular Posts to retrieve the most popular entries within the time range specified by you', 'wordpress-popular-posts'); ?></td>
754
+ <td>"last24hours", "last7days", "last30days", "all", "custom"</td>
755
+ <td>last24hours</td>
756
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'last7days'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='last7days']<br /><br /></td>
757
+ </tr>
758
+ <tr class="alternate">
759
+ <td><strong>time_quantity</strong></td>
760
+ <td><?php _e('Especifies the number of time units of the custom time range', 'wordpress-popular-posts'); ?></td>
761
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
762
+ <td>24</td>
763
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'custom',<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_quantity' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_unit' => 'hour'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='custom' time_quantity=1 time_unit='hour']<br /><br /></td>
764
+ </tr>
765
+ <tr>
766
+ <td><strong>time_unit</strong></td>
767
+ <td><?php _e('Especifies the time unit of the custom time range', 'wordpress-popular-posts'); ?></td>
768
+ <td>minute, hour, day, week, month</td>
769
+ <td>hour</td>
770
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'custom',<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_quantity' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'time_unit' => 'hour'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='custom' time_quantity=1 time_unit='hour']<br /><br /></td>
771
+ </tr>
772
+ <tr class="alternate">
773
+ <td><strong>freshness</strong></td>
774
+ <td><?php _e('Tells WordPress Popular Posts to retrieve the most popular entries published within the time range specified by you', 'wordpress-popular-posts'); ?></td>
775
+ <td>1 (true), 0 (false)</td>
776
+ <td>0</td>
777
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'range' => 'weekly',<br />&nbsp;&nbsp;&nbsp;&nbsp;'freshness' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp range='last7days' freshness=1]<br /><br /></td>
778
+ </tr>
779
+ <tr>
780
+ <td><strong>order_by</strong></td>
781
+ <td><?php _e('Sets the sorting option of the popular posts', 'wordpress-popular-posts'); ?></td>
782
+ <td>"comments", "views", "avg" <?php _e('(for average views per day)', 'wordpress-popular-posts'); ?></td>
783
+ <td>views</td>
784
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'order_by' => 'comments'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp order_by='comments']<br /><br /></td>
785
+ </tr>
786
+ <tr class="alternate">
787
+ <td><strong>post_type</strong></td>
788
+ <td><?php _e('Defines the type of posts to show on the listing', 'wordpress-popular-posts'); ?></td>
789
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
790
+ <td>post</td>
791
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_type' => 'post,page,your-custom-post-type'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_type='post,page,your-custom-post-type']<br /><br /></td>
792
+ </tr>
793
+ <tr>
794
+ <td><strong>pid</strong></td>
795
+ <td><?php _e('If set, WordPress Popular Posts will exclude the specified post(s) ID(s) form the listing.', 'wordpress-popular-posts'); ?></td>
796
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
797
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
798
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'pid' => '60,25,31'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp pid='60,25,31']<br /><br /></td>
799
+ </tr>
800
+ <tr class="alternate">
801
+ <td><strong>cat</strong></td>
802
+ <td><?php _e('If set, WordPress Popular Posts will retrieve all entries that belong to the specified category ID(s). If a minus sign is used, entries associated to the category will be excluded instead.', 'wordpress-popular-posts'); ?></td>
803
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
804
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
805
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'cat' => '1,55,-74'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp cat='1,55,-74']<br /><br /></td>
806
+ </tr>
807
+ <tr>
808
+ <td><strong>taxonomy</strong></td>
809
+ <td><?php _e('If set, WordPress Popular Posts will filter posts by a given taxonomy.', 'wordpress-popular-posts'); ?></td>
810
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
811
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
812
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'taxonomy' => 'post_tag',<br />&nbsp;&nbsp;&nbsp;&nbsp;'term_id' => '118,75,15'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp taxonomy='post_tag' term_id='118,75,15']<br /><br /></td>
813
+ </tr>
814
+ <tr class="alternate">
815
+ <td><strong>term_id</strong></td>
816
+ <td><?php _e('If set, WordPress Popular Posts will retrieve all entries that belong to the specified term ID(s). If a minus sign is used, entries associated to the term(s) will be excluded instead.', 'wordpress-popular-posts'); ?></td>
817
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
818
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
819
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'taxonomy' => 'post_tag',<br />&nbsp;&nbsp;&nbsp;&nbsp;'term_id' => '118,75,15'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp taxonomy='post_tag' term_id='118,75,15']<br /><br /></td>
820
+ </tr>
821
+ <tr>
822
+ <td><strong>author</strong></td>
823
+ <td><?php _e('If set, WordPress Popular Posts will retrieve all entries created by specified author(s) ID(s).', 'wordpress-popular-posts'); ?></td>
824
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
825
+ <td><?php _e('None', 'wordpress-popular-posts'); ?></td>
826
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'author' => '75,8,120'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp author='75,8,120']<br /><br /></td>
827
+ </tr>
828
+ <tr class="alternate">
829
+ <td><strong>title_length</strong></td>
830
+ <td><?php _e('If set, WordPress Popular Posts will shorten each post title to "n" characters whenever possible', 'wordpress-popular-posts'); ?></td>
831
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
832
+ <td>25</td>
833
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_length' => 25<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp title_length=25]<br /><br /></td>
834
+ </tr>
835
+ <tr>
836
+ <td><strong>title_by_words</strong></td>
837
+ <td><?php _e('If set to 1, WordPress Popular Posts will shorten each post title to "n" words instead of characters', 'wordpress-popular-posts'); ?></td>
838
+ <td>1 (true), (0) false</td>
839
+ <td>0</td>
840
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_by_words' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'title_length' => 25<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp title_by_words=1 title_length=25]<br /><br /></td>
841
+ </tr>
842
+ <tr class="alternate">
843
+ <td><strong>excerpt_length</strong></td>
844
+ <td><?php _e('If set, WordPress Popular Posts will build and include an excerpt of "n" characters long from the content of each post listed as popular', 'wordpress-popular-posts'); ?></td>
845
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
846
+ <td>0</td>
847
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_length=25 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
848
+ </tr>
849
+ <tr>
850
+ <td><strong>excerpt_format</strong></td>
851
+ <td><?php _e('If set, WordPress Popular Posts will maintaing all styling tags (strong, italic, etc) and hyperlinks found in the excerpt', 'wordpress-popular-posts'); ?></td>
852
+ <td>1 (true), (0) false</td>
853
+ <td>0</td>
854
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_format' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_format=1 excerpt_length=25 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
855
+ </tr>
856
+ <tr class="alternate">
857
+ <td><strong>excerpt_by_words</strong></td>
858
+ <td><?php _e('If set to 1, WordPress Popular Posts will shorten the excerpt to "n" words instead of characters', 'wordpress-popular-posts'); ?></td>
859
+ <td>1 (true), (0) false</td>
860
+ <td>0</td>
861
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_by_words' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'excerpt_length' => 55,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp excerpt_by_words=1 excerpt_length=55 post_html='&lt;li&gt;{thumb} {title} &lt;span class="wpp-excerpt"&gt;{summary}&lt;/span&gt;&lt;/li&gt;']<br /><br /></td>
862
+ </tr>
863
+ <tr>
864
+ <td><strong>thumbnail_width</strong></td>
865
+ <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the width for thumbnails', 'wordpress-popular-posts'); ?></td>
866
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
867
+ <td>0</td>
868
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_width' => 30,<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_height' => 30<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp thumbnail_width=30 thumbnail_height=30]<br /><br /></td>
869
+ </tr>
870
+ <tr class="alternate">
871
+ <td><strong>thumbnail_height</strong></td>
872
+ <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the height for thumbnails', 'wordpress-popular-posts'); ?></td>
873
+ <td><?php _e('Positive integer', 'wordpress-popular-posts'); ?></td>
874
+ <td>0</td>
875
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_width' => 30,<br />&nbsp;&nbsp;&nbsp;&nbsp;'thumbnail_height' => 30<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp thumbnail_width=30 thumbnail_height=30]<br /><br /></td>
876
+ </tr>
877
+ <tr>
878
+ <td><strong>rating</strong></td>
879
+ <td><?php _e('If set, and if the WP-PostRatings plugin is installed and enabled on your blog, WordPress Popular Posts will show how your visitors are rating your entries', 'wordpress-popular-posts'); ?></td>
880
+ <td>1 (true), (0) false</td>
881
+ <td>0</td>
882
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'rating' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} {title} {rating}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp rating=1 post_html='&lt;li&gt;{thumb} {title} {rating}&lt;/li&gt;']<br /><br /></td>
883
+ </tr>
884
+ <tr class="alternate">
885
+ <td><strong>stats_comments</strong></td>
886
+ <td><?php _e('If set, WordPress Popular Posts will show how many comments each popular post has got during the specified time range', 'wordpress-popular-posts'); ?></td>
887
+ <td>1 (true), 0 (false)</td>
888
+ <td>0</td>
889
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_comments' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_comments=1]<br /><br /></td>
890
+ </tr>
891
+ <tr>
892
+ <td><strong>stats_views</strong></td>
893
+ <td><?php _e('If set, WordPress Popular Posts will show how many views each popular post has got during the specified time range', 'wordpress-popular-posts'); ?></td>
894
+ <td>1 (true), (0) false</td>
895
+ <td>1</td>
896
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_views' => 0<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_views=0]<br /><br /></td>
897
+ </tr>
898
+ <tr class="alternate">
899
+ <td><strong>stats_author</strong></td>
900
+ <td><?php _e('If set, WordPress Popular Posts will show who published each popular post on the list', 'wordpress-popular-posts'); ?></td>
901
+ <td>1 (true), (0) false</td>
902
+ <td>0</td>
903
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_author' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_author=1]<br /><br /></td>
904
+ </tr>
905
+ <tr>
906
+ <td><strong>stats_date</strong></td>
907
+ <td><?php _e('If set, WordPress Popular Posts will display the date when each popular post on the list was published', 'wordpress-popular-posts'); ?></td>
908
+ <td>1 (true), (0) false</td>
909
+ <td>0</td>
910
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date' => 1<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_date=1]<br /><br /></td>
911
+ </tr>
912
+ <tr class="alternate">
913
+ <td><strong>stats_date_format</strong></td>
914
+ <td><?php _e('Sets the date format', 'wordpress-popular-posts'); ?></td>
915
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
916
+ <td>0</td>
917
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date' => 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_date_format' => 'F j, Y'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_date=1 stats_date_format='F j, Y']<br /><br /></td>
918
+ </tr>
919
+ <tr>
920
+ <td><strong>stats_category</strong></td>
921
+ <td><?php _e('If set, WordPress Popular Posts will display the categories associated to each entry', 'wordpress-popular-posts'); ?></td>
922
+ <td>1 (true), (0) false</td>
923
+ <td>0</td>
924
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_category' => 1, <br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {category}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_taxonomy=1 post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {category}&lt;/li&gt;']<br /><br /></td>
925
+ </tr>
926
+ <tr class="alternate">
927
+ <td><strong>stats_taxonomy</strong></td>
928
+ <td><?php _e('If set, WordPress Popular Posts will display the taxonomies associated to each entry', 'wordpress-popular-posts'); ?></td>
929
+ <td>1 (true), (0) false</td>
930
+ <td>0</td>
931
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'stats_taxonomy' => 1, <br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {taxonomy}&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp stats_taxonomy=1 post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt; {taxonomy}&lt;/li&gt;']<br /><br /></td>
932
+ </tr>
933
+ <tr>
934
+ <td><strong>wpp_start</strong></td>
935
+ <td><?php _e('Sets the opening tag for the listing', 'wordpress-popular-posts'); ?></td>
936
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
937
+ <td>&lt;ul&gt;</td>
938
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_start' => '&lt;ol&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_end' => '&lt;/ol&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp wpp_start='&lt;ol&gt;' wpp_end='&lt;/ol&gt;']<br /><br /></td>
939
+ </tr>
940
+ <tr class="alternate">
941
+ <td><strong>wpp_end</strong></td>
942
+ <td><?php _e('Sets the closing tag for the listing', 'wordpress-popular-posts'); ?></td>
943
+ <td><?php _e('Text string', 'wordpress-popular-posts'); ?></td>
944
+ <td>&lt;/ul&gt;</td>
945
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_start' => '&lt;ol&gt;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'wpp_end' => '&lt;/ol&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp wpp_start='&lt;ol&gt;' wpp_end='&lt;/ol&gt;']<br /><br /></td>
946
+ </tr>
947
+ <tr>
948
+ <td><strong>post_html</strong></td>
949
+ <td><?php _e('Sets the HTML structure of each post', 'wordpress-popular-posts'); ?></td>
950
+ <td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('returns thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('returns thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('returns thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('returns linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{pid}</em> (<?php _e('returns the post/page ID', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('returns post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('returns the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('returns post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('returns post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('returns the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('returns post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('returns linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('returns linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('returns linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('returns views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('returns comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('returns post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)</td>
951
+ <td>&lt;li&gt;{thumb} {title} &lt;span class="wpp-meta post-stats"&gt;{stats}&lt;/span&gt;&lt;/li&gt;</td>
952
+ <td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;']<br /><br /></td>
953
+ </tr>
954
+ </tbody>
955
+ </table>
956
+ </div>
957
  </div>
958
  </div>
959
  <!-- End params -->
includes/class-wordpress-popular-posts-cache.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Helper class to store data in cache for a fixed amount of time.
5
+ *
6
+ * @link https://cabrerahector.com
7
+ * @since 4.1.2
8
+ *
9
+ * @package WordPressPopularPosts
10
+ * @subpackage WordPressPopularPosts/includes
11
+ */
12
+
13
+ /**
14
+ * Helper class to store data in cache for a fixed amount of time.
15
+ *
16
+ * Stores data in cache via WordPress Transients (or any other available
17
+ * method in the future) for a fixed amount of time to reduce the number
18
+ * of database calls.
19
+ *
20
+ * @package WordPressPopularPosts
21
+ * @subpackage WordPressPopularPosts/includes
22
+ * @author Hector Cabrera <me@cabrerahector.com>
23
+ */
24
+ class WPP_Cache {
25
+
26
+ /**
27
+ * Retrieves cached data.
28
+ *
29
+ * @since 4.1.2
30
+ * @access public
31
+ * @param string $key The name of the cached data.
32
+ * @return mixed
33
+ */
34
+ public static function get( $key ) {
35
+ return get_transient( $key );
36
+ }
37
+
38
+ /**
39
+ * Retrieves cached data.
40
+ *
41
+ * @since 4.1.2
42
+ * @access public
43
+ * @param string $key The name of the cached data.
44
+ * @param mixed $data The data being stored.
45
+ */
46
+ public static function set( $key = null, $data = array(), $time_value = 1, $time_unit = 'minute' ) {
47
+
48
+ if ( !$key )
49
+ return false;
50
+
51
+ if (
52
+ !is_int( $time_value )
53
+ || $time_value <= 0
54
+ ) {
55
+ $time_value = 1;
56
+ }
57
+
58
+ switch( $time_unit ){
59
+
60
+ case 'minute':
61
+ $time = 60;
62
+ break;
63
+
64
+ case 'hour':
65
+ $time = 60 * 60;
66
+ break;
67
+
68
+ case 'day':
69
+ $time = 60 * 60 * 24;
70
+ break;
71
+
72
+ case 'week':
73
+ $time = 60 * 60 * 24 * 7;
74
+ break;
75
+
76
+ case 'month':
77
+ $time = 60 * 60 * 24 * 30;
78
+ break;
79
+
80
+ case 'year':
81
+ $time = 60 * 60 * 24 * 365;
82
+ break;
83
+
84
+ default:
85
+ $time = 60;
86
+ break;
87
+
88
+ }
89
+
90
+ $expiration = $time * $time_value;
91
+
92
+ // Store transient
93
+ set_transient( $key, $data, $expiration );
94
+
95
+ // Store transient in WPP transients array for garbage collection
96
+ $wpp_transients = get_option( 'wpp_transients' );
97
+
98
+ if ( !$wpp_transients ) {
99
+ $wpp_transients = array( $key );
100
+ add_option( 'wpp_transients', $wpp_transients );
101
+ } else {
102
+ if ( !in_array($key, $wpp_transients) ) {
103
+ $wpp_transients[] = $key;
104
+ update_option( 'wpp_transients', $wpp_transients );
105
+ }
106
+ }
107
+
108
+ }
109
+
110
+ }
includes/class-wordpress-popular-posts-rest-controller.php CHANGED
@@ -137,62 +137,22 @@ class WP_REST_Popular_Posts_Controller extends WP_REST_Controller {
137
  // Return cached results
138
  if ( $admin_options['tools']['cache']['active'] ) {
139
 
140
- $transient_name = md5( json_encode($instance) );
141
- $popular_posts = get_transient( $transient_name );
142
 
143
  if ( false === $popular_posts ) {
144
 
145
  $popular_posts = new WPP_Query( $instance );
146
 
147
- switch( $admin_options['tools']['cache']['interval']['time'] ){
 
148
 
149
- case 'minute':
150
- $time = 60;
151
- break;
152
-
153
- case 'hour':
154
- $time = 60 * 60;
155
- break;
156
-
157
- case 'day':
158
- $time = 60 * 60 * 24;
159
- break;
160
-
161
- case 'week':
162
- $time = 60 * 60 * 24 * 7;
163
- break;
164
-
165
- case 'month':
166
- $time = 60 * 60 * 24 * 30;
167
- break;
168
-
169
- case 'year':
170
- $time = 60 * 60 * 24 * 365;
171
- break;
172
-
173
- default:
174
- $time = 60 * 60;
175
- break;
176
-
177
- }
178
-
179
- $expiration = $time * $admin_options['tools']['cache']['interval']['value'];
180
-
181
- // Store transient
182
- set_transient( $transient_name, $popular_posts, $expiration );
183
-
184
- // Store transient in WPP transients array for garbage collection
185
- $wpp_transients = get_option('wpp_transients');
186
-
187
- if ( !$wpp_transients ) {
188
- $wpp_transients = array( $transient_name );
189
- add_option( 'wpp_transients', $wpp_transients );
190
- } else {
191
- if ( !in_array($transient_name, $wpp_transients) ) {
192
- $wpp_transients[] = $transient_name;
193
- update_option( 'wpp_transients', $wpp_transients );
194
- }
195
- }
196
 
197
  }
198
 
137
  // Return cached results
138
  if ( $admin_options['tools']['cache']['active'] ) {
139
 
140
+ $key = md5( json_encode($instance) );
141
+ $popular_posts = WPP_Cache::get( $key );
142
 
143
  if ( false === $popular_posts ) {
144
 
145
  $popular_posts = new WPP_Query( $instance );
146
 
147
+ $time_value = $admin_options['tools']['cache']['interval']['value']; // eg. 5
148
+ $time_unit = $admin_options['tools']['cache']['interval']['time']; // eg. 'minute'
149
 
150
+ WPP_Cache::set(
151
+ $key,
152
+ $popular_posts,
153
+ $time_value,
154
+ $time_unit
155
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  }
158
 
includes/class-wordpress-popular-posts-settings.php CHANGED
@@ -113,9 +113,9 @@ class WPP_Settings {
113
  'expires_after' => 180
114
  ),
115
  'cache' => array(
116
- 'active' => false,
117
  'interval' => array(
118
- 'time' => 'hour',
119
  'value' => 1
120
  )
121
  ),
113
  'expires_after' => 180
114
  ),
115
  'cache' => array(
116
+ 'active' => true,
117
  'interval' => array(
118
+ 'time' => 'minute',
119
  'value' => 1
120
  )
121
  ),
includes/class-wordpress-popular-posts-widget.php CHANGED
@@ -312,62 +312,22 @@ class WPP_Widget extends WP_Widget {
312
  // Return cached results
313
  if ( $this->admin_options['tools']['cache']['active'] ) {
314
 
315
- $transient_name = md5( json_encode($instance) );
316
- $popular_posts = get_transient( $transient_name );
317
 
318
  if ( false === $popular_posts ) {
319
 
320
  $popular_posts = new WPP_Query( $instance );
321
 
322
- switch( $this->admin_options['tools']['cache']['interval']['time'] ){
 
323
 
324
- case 'minute':
325
- $time = 60;
326
- break;
327
-
328
- case 'hour':
329
- $time = 60 * 60;
330
- break;
331
-
332
- case 'day':
333
- $time = 60 * 60 * 24;
334
- break;
335
-
336
- case 'week':
337
- $time = 60 * 60 * 24 * 7;
338
- break;
339
-
340
- case 'month':
341
- $time = 60 * 60 * 24 * 30;
342
- break;
343
-
344
- case 'year':
345
- $time = 60 * 60 * 24 * 365;
346
- break;
347
-
348
- default:
349
- $time = 60 * 60;
350
- break;
351
-
352
- }
353
-
354
- $expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
355
-
356
- // Store transient
357
- set_transient( $transient_name, $popular_posts, $expiration );
358
-
359
- // Store transient in WPP transients array for garbage collection
360
- $wpp_transients = get_option('wpp_transients');
361
-
362
- if ( !$wpp_transients ) {
363
- $wpp_transients = array( $transient_name );
364
- add_option( 'wpp_transients', $wpp_transients );
365
- } else {
366
- if ( !in_array($transient_name, $wpp_transients) ) {
367
- $wpp_transients[] = $transient_name;
368
- update_option( 'wpp_transients', $wpp_transients );
369
- }
370
- }
371
 
372
  }
373
 
312
  // Return cached results
313
  if ( $this->admin_options['tools']['cache']['active'] ) {
314
 
315
+ $key = md5( json_encode($instance) );
316
+ $popular_posts = WPP_Cache::get( $key );
317
 
318
  if ( false === $popular_posts ) {
319
 
320
  $popular_posts = new WPP_Query( $instance );
321
 
322
+ $time_value = $this->admin_options['tools']['cache']['interval']['value']; // eg. 5
323
+ $time_unit = $this->admin_options['tools']['cache']['interval']['time']; // eg. 'minute'
324
 
325
+ WPP_Cache::set(
326
+ $key,
327
+ $popular_posts,
328
+ $time_value,
329
+ $time_unit
330
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
 
332
  }
333
 
includes/class-wordpress-popular-posts.php CHANGED
@@ -45,6 +45,11 @@ class WordPressPopularPosts {
45
  */
46
  private function load_dependencies(){
47
 
 
 
 
 
 
48
  /**
49
  * The class responsible for defining internationalization functionality of the plugin.
50
  */
45
  */
46
  private function load_dependencies(){
47
 
48
+ /**
49
+ * Caching class.
50
+ */
51
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordpress-popular-posts-cache.php';
52
+
53
  /**
54
  * The class responsible for defining internationalization functionality of the plugin.
55
  */
public/class-wordpress-popular-posts-public.php CHANGED
@@ -104,16 +104,13 @@ class WPP_Public {
104
 
105
  wp_register_script( 'wpp-js', plugin_dir_url( __FILE__ ) . 'js/wpp-4.1.0.min.js', array(), $this->version, false );
106
 
107
- $wp_rest_api = class_exists( 'WP_REST_Controller', false );
108
-
109
  $params = array(
110
- 'rest_api' => (int) $wp_rest_api,
111
  'sampling_active' => (int) $this->admin_options['tools']['sampling']['active'],
112
  'sampling_rate' => $this->admin_options['tools']['sampling']['rate'],
113
  'ajax_url' => esc_url_raw( rest_url( 'wordpress-popular-posts/v1/popular-posts/' ) ),
114
  'action' => 'update_views_ajax',
115
  'ID' => $is_single,
116
- 'token' => ( $wp_rest_api ) ? wp_create_nonce( 'wp_rest' ) : wp_create_nonce( 'wpp-token' ),
117
  'debug' => WP_DEBUG
118
  );
119
  wp_localize_script( 'wpp-js', 'wpp_params', $params );
@@ -376,9 +373,6 @@ class WPP_Public {
376
  if ( empty( $ids ) ) {
377
  $shortcode_ops['pid'] = '';
378
  }
379
- else {
380
- $instance['pid'] = implode( ",", $ids );
381
- }
382
 
383
  // Category filter
384
  $ids = array_filter( explode( ",", $shortcode_ops['cat'] ), 'is_numeric' );
@@ -386,9 +380,6 @@ class WPP_Public {
386
  if ( empty( $ids ) ) {
387
  $shortcode_ops['cat'] = '';
388
  }
389
- else {
390
- $instance['cat'] = implode( ",", $ids );
391
- }
392
 
393
  // Author filter
394
  $ids = array_filter( explode( ",", $shortcode_ops['author'] ), 'is_numeric' );
@@ -396,9 +387,6 @@ class WPP_Public {
396
  if ( empty( $ids ) ) {
397
  $shortcode_ops['author'] = '';
398
  }
399
- else {
400
- $instance['author'] = implode( ",", $ids );
401
- }
402
 
403
  $shortcode_content = '';
404
 
@@ -416,62 +404,22 @@ class WPP_Public {
416
  // Return cached results
417
  if ( $this->admin_options['tools']['cache']['active'] ) {
418
 
419
- $transient_name = md5( json_encode($shortcode_ops) );
420
- $popular_posts = get_transient( $transient_name );
421
 
422
  if ( false === $popular_posts ) {
423
 
424
  $popular_posts = new WPP_Query( $shortcode_ops );
425
 
426
- switch( $this->admin_options['tools']['cache']['interval']['time'] ){
427
-
428
- case 'minute':
429
- $time = 60;
430
- break;
431
-
432
- case 'hour':
433
- $time = 60 * 60;
434
- break;
435
-
436
- case 'day':
437
- $time = 60 * 60 * 24;
438
- break;
439
-
440
- case 'week':
441
- $time = 60 * 60 * 24 * 7;
442
- break;
443
-
444
- case 'month':
445
- $time = 60 * 60 * 24 * 30;
446
- break;
447
-
448
- case 'year':
449
- $time = 60 * 60 * 24 * 365;
450
- break;
451
-
452
- default:
453
- $time = 60 * 60;
454
- break;
455
-
456
- }
457
-
458
- $expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
459
-
460
- // Store transient
461
- set_transient( $transient_name, $popular_posts, $expiration );
462
-
463
- // Store transient in WPP transients array for garbage collection
464
- $wpp_transients = get_option('wpp_transients');
465
 
466
- if ( !$wpp_transients ) {
467
- $wpp_transients = array( $transient_name );
468
- add_option( 'wpp_transients', $wpp_transients );
469
- } else {
470
- if ( !in_array($transient_name, $wpp_transients) ) {
471
- $wpp_transients[] = $transient_name;
472
- update_option( 'wpp_transients', $wpp_transients );
473
- }
474
- }
475
 
476
  }
477
 
104
 
105
  wp_register_script( 'wpp-js', plugin_dir_url( __FILE__ ) . 'js/wpp-4.1.0.min.js', array(), $this->version, false );
106
 
 
 
107
  $params = array(
 
108
  'sampling_active' => (int) $this->admin_options['tools']['sampling']['active'],
109
  'sampling_rate' => $this->admin_options['tools']['sampling']['rate'],
110
  'ajax_url' => esc_url_raw( rest_url( 'wordpress-popular-posts/v1/popular-posts/' ) ),
111
  'action' => 'update_views_ajax',
112
  'ID' => $is_single,
113
+ 'token' => wp_create_nonce( 'wp_rest' ),
114
  'debug' => WP_DEBUG
115
  );
116
  wp_localize_script( 'wpp-js', 'wpp_params', $params );
373
  if ( empty( $ids ) ) {
374
  $shortcode_ops['pid'] = '';
375
  }
 
 
 
376
 
377
  // Category filter
378
  $ids = array_filter( explode( ",", $shortcode_ops['cat'] ), 'is_numeric' );
380
  if ( empty( $ids ) ) {
381
  $shortcode_ops['cat'] = '';
382
  }
 
 
 
383
 
384
  // Author filter
385
  $ids = array_filter( explode( ",", $shortcode_ops['author'] ), 'is_numeric' );
387
  if ( empty( $ids ) ) {
388
  $shortcode_ops['author'] = '';
389
  }
 
 
 
390
 
391
  $shortcode_content = '';
392
 
404
  // Return cached results
405
  if ( $this->admin_options['tools']['cache']['active'] ) {
406
 
407
+ $key = md5( json_encode($shortcode_ops) );
408
+ $popular_posts = WPP_Cache::get( $key );
409
 
410
  if ( false === $popular_posts ) {
411
 
412
  $popular_posts = new WPP_Query( $shortcode_ops );
413
 
414
+ $time_value = $this->admin_options['tools']['cache']['interval']['value']; // eg. 5
415
+ $time_unit = $this->admin_options['tools']['cache']['interval']['time']; // eg. 'minute'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
+ WPP_Cache::set(
418
+ $key,
419
+ $popular_posts,
420
+ $time_value,
421
+ $time_unit
422
+ );
 
 
 
423
 
424
  }
425
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: hcabrera
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
4
  Tags: popular, posts, widget, popularity, top
5
  Requires at least: 4.7
6
- Tested up to: 4.9.6
7
  Requires PHP: 5.3
8
- Stable tag: 4.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -58,8 +58,9 @@ Please make sure your site meets the [minimum requirements](https://github.com/c
58
 
59
  1. Go to Appearance > Widgets, drag and drop the **WordPress Popular Posts** widget to your sidebar. Once you're done configuring it, hit the Save button.
60
  2. If you have a caching plugin installed on your site, flush its cache now so WPP can start tracking your site.
61
- 3. Go to Appearance > Editor. Under "Templates", click on `header.php` and make sure that the `<?php wp_head(); ?>` tag is present (should be right before the closing `</head>` tag).
62
- 4. (Optional, but highly recommended for large / high traffic sites) Enabling [Data Sampling](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#data-sampling) and/or [Caching](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#caching) might be a good idea. Check [here](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance) for more.
 
63
 
64
  That's it!
65
 
@@ -85,6 +86,14 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
85
  4. WordPress Popular Posts Stats panel.
86
 
87
  == Changelog ==
 
 
 
 
 
 
 
 
88
  = 4.1.1 =
89
 
90
  **If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is highly recommended.**
@@ -107,11 +116,6 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
107
 
108
  See the [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-4-1-is-here/) for more details!
109
 
110
- = 4.0.13 =
111
-
112
- - Improvements to WPP's upgrade process.
113
- - Fixes ALT text missing from IMG tags.
114
-
115
  See [full changelog](https://github.com/cabrerahector/wordpress-popular-posts/blob/master/changelog.md).
116
 
117
  == Credits ==
@@ -119,5 +123,5 @@ See [full changelog](https://github.com/cabrerahector/wordpress-popular-posts/bl
119
  * Flame graphic by freevector/Vecteezy.com.
120
 
121
  == Upgrade Notice ==
122
- = 4.0.11 =
123
- If you're using a caching plugin, flushing its cache after upgrading to this version is highly recommended.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
4
  Tags: popular, posts, widget, popularity, top
5
  Requires at least: 4.7
6
+ Tested up to: 4.9.8
7
  Requires PHP: 5.3
8
+ Stable tag: 4.1.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
58
 
59
  1. Go to Appearance > Widgets, drag and drop the **WordPress Popular Posts** widget to your sidebar. Once you're done configuring it, hit the Save button.
60
  2. If you have a caching plugin installed on your site, flush its cache now so WPP can start tracking your site.
61
+ 3. If you have a security / firewall plugin installed on your site, make sure you [allow WPP access to the REST API](https://wordpress.org/support/topic/wpp-does-not-count-properly/#post-10411163) so it can start tracking your site.
62
+ 4. Go to Appearance > Editor. Under "Templates", click on `header.php` and make sure that the `<?php wp_head(); ?>` tag is present (should be right before the closing `</head>` tag).
63
+ 5. (Optional, but highly recommended for large / high traffic sites) Enabling [Data Sampling](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#data-sampling) and/or [Caching](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#caching) might be a good idea. Check [here](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance) for more.
64
 
65
  That's it!
66
 
86
  4. WordPress Popular Posts Stats panel.
87
 
88
  == Changelog ==
89
+ = 4.1.2 =
90
+
91
+ - Enables [Data Caching](https://github.com/cabrerahector/wordpress-popular-posts/wiki/7.-Performance#caching) by default (new installs only).
92
+ - The Parameters section (Settings > WordPress Popular Posts > Parameters) is now mobile-friendly.
93
+ - Updated the documentation in the Parameters section.
94
+ - Refactored WPP's caching mechanism into its own class.
95
+ - Removed unused code.
96
+
97
  = 4.1.1 =
98
 
99
  **If you're using a caching plugin, flushing its cache right after installing / upgrading to this version is highly recommended.**
116
 
117
  See the [Release notes](https://cabrerahector.com/wordpress/wordpress-popular-posts-4-1-is-here/) for more details!
118
 
 
 
 
 
 
119
  See [full changelog](https://github.com/cabrerahector/wordpress-popular-posts/blob/master/changelog.md).
120
 
121
  == Credits ==
123
  * Flame graphic by freevector/Vecteezy.com.
124
 
125
  == Upgrade Notice ==
126
+ = 4.1.2 =
127
+ If you're using a caching plugin, flushing its cache after upgrading to this version is recommended.
wordpress-popular-posts.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WordPress Popular Posts
17
  * Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
18
  * Description: A highly customizable widget that displays the most popular posts on your blog.
19
- * Version: 4.1.1
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
@@ -29,7 +29,7 @@ if ( ! defined( 'WPINC' ) ) {
29
  die();
30
  }
31
 
32
- define( 'WPP_VER', '4.1.1' );
33
 
34
  /*
35
  * The code that runs during plugin activation.
16
  * Plugin Name: WordPress Popular Posts
17
  * Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
18
  * Description: A highly customizable widget that displays the most popular posts on your blog.
19
+ * Version: 4.1.2
20
  * Author: Hector Cabrera
21
  * Author URI: https://cabrerahector.com/
22
  * License: GPL-2.0+
29
  die();
30
  }
31
 
32
+ define( 'WPP_VER', '4.1.2' );
33
 
34
  /*
35
  * The code that runs during plugin activation.