XPressME Integration Kit

Trac

Changeset 712


Ignore:
Timestamp:
Apr 23, 2011, 10:02:04 AM (14 years ago)
Author:
toemon
Message:

古いWordpressを利用している場合、XPressMEの自動アップグレードボタンを表示させない。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php

    r706 r712  
    1010        $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 
    1111        $lang = WPLANG; 
     12         
     13        $automatically_enable = file_exists(ABSPATH .'wp-admin/includes/class-wp-upgrader.php'); 
    1214 
    1315        $check_url = "http://ja.xpressme.info/version_check/index.php?version=$xpress_version&lang=$lang"; 
     
    4042                                $download_diff .='</a>'; 
    4143                        } 
    42                         $message =      sprintf(__('You can update to XPressME Integration Kit Ver %s</a> automatically or download the package and install it manually:', 'xpressme'), $latest_version); 
     44                        if($automatically_enable){ 
     45                                $message =      sprintf(__('You can update to XPressME Integration Kit Ver %s</a> automatically or download the package and install it manually:', 'xpressme'), $latest_version); 
     46                        } else { 
     47                                $message =      sprintf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version); 
     48                        } 
    4349                        $submit = __('Update Automatically', 'xpressme'); 
    4450                        $form_action = 'admin.php?page=upgrade_page&action=do-xpress-upgrade'; 
     
    6571                        $develop_latest_version=$latest['develop_latest_version']; 
    6672                        $develop_form_action = 'admin.php?page=upgrade_page&action=do-xpress-develop_upgrade'; 
    67 //                      $develop_message =sprintf(__('You can use the development version %s download the package and install it manually:', 'xpressme'),$latest['develop_latest_version']); 
    68                         $develop_message =      sprintf(__('You can update to  XPressME Integration Kit development version %s automatically or download the package and install it manually:'), $develop_latest_version); 
    69  
     73                        if($automatically_enable){ 
     74                                $develop_message =      sprintf(__('You can update to  XPressME Integration Kit development version %s automatically or download the package and install it manually:'), $develop_latest_version); 
     75                        } else { 
     76                                $develop_message =      sprintf(__('You can use the development version %s download the package and install it manually:', 'xpressme'),$develop_latest_version); 
     77                        } 
    7078                        $develop_show = true; 
    7179                        $develop_package=$latest['develop_package']; 
     
    93101                echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>'; 
    94102                if ( $show_buttons ) { 
    95                         echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" />&nbsp;'; 
     103                        if($automatically_enable){ 
     104                                echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" />&nbsp;'; 
     105                        } 
    96106                        echo '<a href="' . esc_url($package) . '" class="button">' . $download . '</a>&nbsp;'; 
    97107                        echo $download_diff; 
     
    107117                        echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>'; 
    108118                        echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>'; 
    109                                 echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($develop_submit) . '" name="develop_upgrade" />&nbsp;'; 
     119                                if($automatically_enable){ 
     120                                        echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($develop_submit) . '" name="develop_upgrade" />&nbsp;'; 
     121                                } 
    110122                                echo '<a href="' . esc_url($develop_package) . '" class="button">' . $develop_download . '</a>&nbsp;'; 
    111123                                echo $develop_download_diff; 
Note: See TracChangeset for help on using the changeset viewer.