Changeset 208022
- Timestamp:
- 02/19/2010 04:33:35 PM (16 years ago)
- File:
-
- 1 edited
-
wp2sinablog/trunk/wp2sinablog.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp2sinablog/trunk/wp2sinablog.php
r207034 r208022 103 103 curl_setopt($ch, CURLOPT_POST, 1); // how many parameters to post 104 104 curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 105 //curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);105 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 106 106 curl_setopt($ch, CURLOPT_REFERER, $reffer); 107 107 curl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookie); … … 129 129 // action function for above hook 130 130 function mt_add_pages() { 131 // Add a new submenu under Options: 131 //call register settings function 132 add_action( 'admin_init', 'register_mysettings' ); 133 // Add a new submenu under Options: 132 134 add_options_page('WP2Sinablog Options', 'WP2Sinablog', 'administrator', 'wpsinablog', 'mt_options_page'); 133 135 134 //call register settings function135 add_action( 'admin_init', 'register_mysettings' );136 136 137 137 … … 153 153 // mt_options_page() displays the page content for the Test Options submenu 154 154 function mt_options_page() { 155 156 if (!function_exists("curl_init")) 157 { 158 ?> 159 160 <div class="wrap"> 161 <h2>您的服务器不支持cURL库,插件WP2Sinablog无法工作,请禁用该插件。</h2><br /> 162 </div> 163 164 <?php 165 } 166 else 167 { 155 168 156 169 ?> … … 318 331 </div> 319 332 <?php 320 333 } 321 334 } 322 335
Note: See TracChangeset
for help on using the changeset viewer.