Changeset 37293
- Timestamp:
- 04/01/08 06:32:26 (3 months ago)
- Files:
-
- popularity-contest/trunk/popularity-contest.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
popularity-contest/trunk/popularity-contest.php
r26828 r37293 4 4 Plugin URI: http://alexking.org/projects/wordpress 5 5 Description: This will enable ranking of your posts by popularity; using the behavior of your visitors to determine each post's popularity. You set a value (or use the default value) for every post view, comment, etc. and the popularity of your posts is calculated based on those values. Once you have activated the plugin, you can configure the <a href="options-general.php?page=popularity-contest.php">Popularity Values</a> and <a href="index.php?page=popularity-contest.php">View Reports</a>. You can also use the included <a href="options-general.php?page=popularity-contest.php#akpc_template_tags">Template Tags</a> to display post popularity and lists of popular posts on your blog. 6 Version: 1.3b 36 Version: 1.3b4 7 7 Author: Alex King 8 8 Author URI: http://alexking.org/ 9 9 */ 10 10 11 // Copyright (c) 2005-200 7Alex King. All rights reserved.11 // Copyright (c) 2005-2008 Alex King. All rights reserved. 12 12 // 13 13 // Released under the GPL license … … 55 55 /* ------------------------------------- */ 56 56 57 58 if (!isset($wpdb)) {59 require('../../wp-blog-header.php');60 akpc_init();61 }62 57 63 58 load_plugin_textdomain('alexking.org'); … … 1656 1651 // -- HANDLE ACTIONS 1657 1652 1653 function akpc_request_handler() { 1658 1654 if (!empty($_POST['ak_action'])) { 1659 1655 switch($_POST['ak_action']) { 1660 1656 case 'update_popularity_values': 1661 akpc_init();1662 1657 $akpc = new ak_popularity_contest; 1663 1658 $akpc->get_settings(); … … 1669 1664 switch($_GET['ak_action']) { 1670 1665 case 'recount_feedback': 1671 akpc_init();1672 1666 $akpc = new ak_popularity_contest; 1673 1667 $akpc->get_settings(); … … 1731 1725 } 1732 1726 } 1727 } 1733 1728 1734 1729 // -- GET HOOKED … … 1739 1734 } 1740 1735 1741 add_action('init', 'akpc_init'); 1736 add_action('init', 'akpc_init', 1); 1737 add_action('init', 'akpc_request_handler', 2); 1742 1738 add_action('admin_menu', 'akpc_options'); 1743 1739 add_action('admin_head', 'akpc_options_css');
