Changeset 980798
- Timestamp:
- 09/04/2014 11:58:07 PM (12 years ago)
- File:
-
- 1 edited
-
wp-author-ranking/trunk/Readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-author-ranking/trunk/Readme.txt
r979828 r980798 19 19 3. Open the setting menu, it is possible to set the execution condition. 20 20 21 == = Get the ranking data. ===21 == Get the ranking data. == 22 22 23 23 The function "get_wpAuthorRanking()" return the ranking data stored in an array. 24 24 This example prints ranking data. 25 25 26 ``` 27 <?php 26 `<?php 28 27 $rankingData = get_wpAuthorRanking(); 29 28 for ($i=0; $i < count($rankingData); $i++) { … … 34 33 echo '</li>'; 35 34 } 36 ?> 37 ``` 35 ?>` 38 36 39 == = Informations the ranking data has. ===37 == Informations the ranking data has. == 40 38 41 39 * ID … … 51 49 52 50 53 ==== Request options ==== 51 Request options 54 52 55 53 You have four options to require ranking data. … … 62 60 This example gets columnist (post type 'column') ranking in September 2014. 63 61 64 ``` 65 <?php 62 `<?php 66 63 $rankingData = get_wpAuthorRanking(array('y'=>2014, 'm'=>9, 'cpt'=>'column')); 67 64 for ($i=0; $i < count($rankingData); $i++) { … … 72 69 echo '</li>'; 73 70 } 74 ?> 75 ``` 71 ?>` 76 72 77 73 78 == = Count pv manually ===74 == Count pv manually == 79 75 80 76 In default setting, page views are counted at single post page. You also have the function "count_wpAuthorRanking()" to count authors page views manually. 81 77 This example counts id-3 user on 'column' post type. 82 78 83 ` ``79 ` 84 80 <?php 85 81 count_wpAuthorRanking(array('user'=>3,'cpt'=>'column')); 86 ?> 87 ``` 82 ?>` 88 83 89 84
Note: See TracChangeset
for help on using the changeset viewer.