Changeset 3104434
- Timestamp:
- 06/19/2024 09:33:38 AM (4 weeks ago)
- Location:
- mhm-list-postthumbnail/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mhm-list-postthumbnail/trunk/README.txt
r3097983 r3104434 2 2 Contributors: markhowellsmead 3 3 Donate link: https://www.paypal.me/mhmli 4 Tags: wp-admin, list, thumbnail, post thumbnail, sayhellogmbh4 Tags: , thumbnail, post thumbnail, sayhellogmbh 5 5 Requires at least: 4.0 6 Tested up to: 6.5. 36 Tested up to: 6.5. 7 7 Stable tag: trunk 8 8 License: GPLv3 … … 25 25 26 26 == Changelog == 27 28 29 30 27 31 28 32 = 1.3.3 = -
mhm-list-postthumbnail/trunk/index.php
r3097983 r3104434 4 4 Plugin URI: https://wordpress.org/plugins/mhm-list-postthumbnail/ 5 5 Description: Adds a new column to the WordPress admin post list view, containing a thumbnail-sized preview of the post thumbnail (where available). 6 Version: 1.3. 36 Version: 1.3. 7 7 Requires at least: 4.0 8 8 Requires PHP: 5.6 … … 17 17 { 18 18 19 public $version = '1.3.3';20 public $wpversion = '4.0';21 19 private $excluded_posttypes = []; 22 20 23 21 public function __construct() 24 22 { 25 register_activation_hook(__FILE__, array($this, 'checkVersion'));26 add_action('admin_init', array($this, 'checkVersion'));27 23 add_action('plugins_loaded', array($this, 'loadTextdomain')); 28 24 add_filter('manage_posts_columns', array($this, 'adminColumnHeader'), 20); 29 25 add_action('manage_posts_custom_column', array($this, 'adminColumnContent'), 5, 2); 30 }31 32 public function checkVersion()33 {34 // Check that this plugin is compatible with the current version of WordPress35 if (!$this->compatibleVersion()) {36 if (is_plugin_active(plugin_basename(__FILE__))) {37 deactivate_plugins(plugin_basename(__FILE__));38 add_action('admin_notices', array($this, 'disabledNotice'));39 if (isset($_GET['activate'])) {40 unset($_GET['activate']);41 }42 }43 }44 }45 46 public function disabledNotice()47 {48 echo '<div class="notice notice-error is-dismissible">49 <p>' . sprintf(50 _x('The plugin “%1$s” requires WordPress %2$s or higher!', 'Compatibility warning message on activation', 'mhm-list-postthumbnail'),51 _x('Post thumbnail in Post admin list', 'Plugin name in compatibility warning message', 'mhm-list-postthumbnail'),52 $this->wpversion53 ) . '</p>54 </div>';55 }56 57 private function compatibleVersion()58 {59 if (version_compare($GLOBALS['wp_version'], $this->wpversion, '<')) {60 return false;61 }62 63 return true;64 26 } 65 27
Note: See TracChangeset
for help on using the changeset viewer.