PluginProbe
FeedWordPress / 2008.1214
FeedWordPress v2008.1214
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | compatability.php +1 -39 2009.06132008.1214 View file →
@@ -14,36 +14,8 @@
14 14 endif;
15 15 return $good;
16 16 } /* function fwp_test_wp_version () */
17 17
18 -class FeedWordPressCompatibility {
19 - /*static*/ function validate_http_request ($action = -1, $capability = null) {
20 - // Only worry about this if we're using a method with significant side-effects
21 - if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') :
22 - // Limit post by user capabilities
23 - if (!is_null($capability) and !current_user_can($capability)) :
24 - wp_die(__('Cheatin’ uh?'));
25 - endif;
26 -
27 - // If check_admin_referer() checks a nonce.
28 - if (function_exists('wp_verify_nonce')) :
29 - check_admin_referer($action);
30 -
31 - // No nonces means no checking nonces.
32 - else :
33 - check_admin_referer();
34 - endif;
35 - endif;
36 - } /* FeedWordPressCompatibility::validate_http_request() */
37 -
38 - /*static*/ function stamp_nonce ($action = -1) {
39 - // stamp form with hidden fields for a nonce in WP 2.0.3 & later
40 - if (function_exists('wp_nonce_field')) :
41 - wp_nonce_field($action);
42 - endif;
43 - } /* FeedWordPressCompatibility::stamp_nonce() */
44 -} /* class FeedWordPressCompatibility */
45 -
46 18 if (!function_exists('stripslashes_deep')) {
47 19 function stripslashes_deep($value) {
48 20 $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
49 21 return $value;
@@ -72,11 +44,8 @@
72 44 break;
73 45 case 'manage_links':
74 46 $can = ($user_level >= 5);
75 47 break;
76 - case 'edit_files':
77 - $can = ($user_level >= 9);
78 - break;
79 48 endswitch;
80 49 return $can;
81 50 }
82 51 } else {
@@ -113,16 +82,10 @@
113 82 $id = $wpdb->insert_id;
114 83
115 84 return $id;
116 85 }
117 -} /* if (!function_exists('wp_insert_user')) */
86 +}
118 87
119 -if (!function_exists('wp_die')) {
120 - function wp_die ( $message, $title = '', $args = array() ) {
121 - die($message);
122 - } /* wp_die() */
123 -} /* if */
124 -
125 88 function fwp_category_checklist ($post_id = 0, $descendents_and_self = 0, $selected_cats = false) {
126 89 if (function_exists('wp_category_checklist')) :
127 90 wp_category_checklist($post_id, $descendents_and_self, $selected_cats);
128 91 else :
@@ -199,9 +162,8 @@
199 162
200 163 <p>This may take several minutes for a large installation.</p>
201 164
202 165 <form action="" method="post">
203 -<?php FeedWordPressCompatibility::stamp_nonce('feedwordpress_upgrade'); ?>
204 166 <div class="submit"><input type="submit" name="action" value="Upgrade" /></div>
205 167 </form>
206 168 </div>
207 169 <?php