Changeset 365 for trunk/xpressme_integration_kit/xoops_version.php
- Timestamp:
- Aug 20, 2009, 5:53:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/xoops_version.php
r363 r365 13 13 if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; 14 14 15 if (!function_exists('wp_version_compare')){ 16 function wp_version_compare($wp_version , $operator='==',$comp_version){ 17 $inc_wp_version = str_replace("ME", "", $wp_version); 18 return version_compare($inc_wp_version, $comp_version, $operator); 19 } 20 } 21 15 22 $mydirpath = dirname(__FILE__); 16 23 $mydirname = basename($mydirpath); … … 81 88 if (@$current_user->user_level > 0) { 82 89 $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); 83 if ( $wp_db_version > 4000)90 if (wp_version_compare($wp_version, '>=','2.1')) 84 91 $modversion['sub'][1]['url'] = "wp-admin/post-new.php"; 85 92 else … … 237 244 ); 238 245 $b_no++; 239 $modversion['blocks'][$b_no] = array( 240 'file' => 'tag_cloud_block.php' , 241 'name' => constant('_MI_XP2_BLOCK_TAG') , 242 'description' => '' , 243 'show_func' => "b_". $mydirname . "_tag_cloud_show" , 244 'edit_func' => "b_". $mydirname . "_tag_cloud_edit" , 245 'options' => $mydirname. '||8|22|pt|45|flat|name|ASC||' , 246 'can_clone' => false , 247 'func_num' => $b_no, 248 ); 246 if (wp_version_compare($wp_version, '>=','2.3')){ 247 $modversion['blocks'][$b_no] = array( 248 'file' => 'tag_cloud_block.php' , 249 'name' => constant('_MI_XP2_BLOCK_TAG') , 250 'description' => '' , 251 'show_func' => "b_". $mydirname . "_tag_cloud_show" , 252 'edit_func' => "b_". $mydirname . "_tag_cloud_edit" , 253 'options' => $mydirname. '||8|22|pt|45|flat|name|ASC||' , 254 'can_clone' => false , 255 'func_num' => $b_no, 256 ); 257 } 249 258 $b_no++; 250 259 $modversion['blocks'][$b_no] = array( … … 270 279 ); 271 280 $b_no++; 272 $modversion['blocks'][$b_no] = array( 273 'file' => 'widget_block.php' , 274 'name' => constant('_MI_XP2_BLOCK_WIDGET') , 275 'description' => '' , 276 'show_func' => "b_". $mydirname . "_widget_show" , 277 'edit_func' => "b_". $mydirname . "_widget_edit" , 278 'options' => $mydirname. '||1|' , 279 'can_clone' => true , 280 'func_num' => $b_no, 281 ); 281 if (wp_version_compare($wp_version, '>=','2.7')){ 282 $modversion['blocks'][$b_no] = array( 283 'file' => 'widget_block.php' , 284 'name' => constant('_MI_XP2_BLOCK_WIDGET') , 285 'description' => '' , 286 'show_func' => "b_". $mydirname . "_widget_show" , 287 'edit_func' => "b_". $mydirname . "_widget_edit" , 288 'options' => $mydirname. '||1|' , 289 'can_clone' => true , 290 'func_num' => $b_no, 291 ); 292 } 282 293 $b_no++; 283 294 $modversion['blocks'][$b_no] = array(
Note: See TracChangeset
for help on using the changeset viewer.