Changeset 715812
- Timestamp:
- 05/21/2013 12:28:39 AM (13 years ago)
- File:
-
- 1 edited
-
gplus-comments/trunk/gplus-comments.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gplus-comments/trunk/gplus-comments.php
r715779 r715812 33 33 } 34 34 35 /**36 * Returns current plugin version.37 */38 35 function gplus_comments_get_version() { 39 $plugin_data = get_plugin_data( __FILE__, false, false ); 40 $plugin_version = $plugin_data['Version']; 41 return $plugin_version; 36 $version = 0; 37 $plugin_file = file_get_contents(__FILE__); 38 preg_match('#^\s*Version\:\s*(.*)$#im', $plugin_file, $matches); 39 if (!empty($matches[1])) 40 { 41 $version = $matches[1]; 42 } 43 return $version; 42 44 } 43 45 44 define('GPLUS_COMMENTS_VERSION', '1.4.11');46 define('GPLUS_COMMENTS_VERSION', gplus_comments_get_version()); 45 47 defined('GPLUS_COMMENTS_DEFAULT_TAB_ORDER') or define('GPLUS_COMMENTS_DEFAULT_TAB_ORDER', 'gplus,facebook,wordpress'); 46 48 defined('GPLUS_COMMENTS_DEBUG') or define('GPLUS_COMMENTS_DEBUG', false); … … 49 51 defined('GPLUS_COMMENTS_LIB') or define('GPLUS_COMMENTS_LIB', GPLUS_COMMENTS_DIR . "/lib"); 50 52 defined('GPLUS_COMMENTS_TEMPLATES') or define('GPLUS_COMMENTS_TEMPLATES', GPLUS_COMMENTS_DIR . "/templates"); 51 52 //require __DIR__ . '/lib/init.php';53 53 54 54 require GPLUS_COMMENTS_LIB . '/hooks.php';
Note: See TracChangeset
for help on using the changeset viewer.