Changeset 2578297
- Timestamp:
- 08/04/2021 06:16:13 PM (4 years ago)
- Location:
- acfist/trunk
- Files:
-
- 2 edited
-
acfist.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acfist/trunk/acfist.php
r2578247 r2578297 3 3 * Plugin Name: ACFist 4 4 * Description: Empower ACF with more features. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Author: WPizard 7 * Author Uri: https://wpizard.com/acfist8 7 * Text Domain: acfist 9 8 */ … … 21 20 private static $plugin_name; 22 21 22 private static $plugin_slug; 23 23 24 private static $plugin_dir; 24 25 … … 35 36 self::$plugin_basename = plugin_basename( __FILE__ ); 36 37 self::$plugin_name = array_shift( $plugin_data ); 38 self::$plugin_slug = strtolower( self::$plugin_name ); 37 39 self::$version = array_shift( $plugin_data ); 38 40 self::$plugin_dir = trailingslashit( plugin_dir_path( __FILE__ ) ); … … 45 47 46 48 public function init() { 47 if ( ! class_exists( 'ACF' ) ) { 49 if ( ! $this->is_acf_active() ) { 50 add_action( "after_plugin_row_{$this->plugin_basename()}", [ $this, 'add_plugin_notice' ] ); 51 48 52 return; 49 53 } … … 62 66 } 63 67 68 public function add_plugin_notice() { 69 ?> 70 <style> 71 .plugins tr[data-slug="<?php echo $this->plugin_slug(); ?>"] th, 72 .plugins tr[data-slug="<?php echo $this->plugin_slug(); ?>"] td { 73 box-shadow: none; 74 padding-bottom: 5px; 75 } 76 </style> 77 <tr class="plugin-update-tr active" data-slug="<?php echo self::$plugin_slug; ?>" data-plugin="<?php echo self::$plugin_basename; ?>"> 78 <td colspan="4" class="plugin-update colspanchange"> 79 <div class="update-message notice inline notice-error notice-alt"> 80 <p>ACFist requires <a href="https://wordpress.org/plugins/advanced-custom-fields/" target="_blank">Advanced Custom Fields</a> v5.9.0+</p> 81 </div> 82 </td> 83 </tr> 84 <?php 85 } 86 87 public function is_acf_active() { 88 if ( empty( defined( 'ACF_VERSION' ) ) || version_compare( ACF_VERSION, '5.9.0', '<' ) ) { 89 return false; 90 } 91 92 return true; 93 } 94 64 95 public function version() { 65 96 return self::$version; … … 68 99 public function plugin_basename() { 69 100 return self::$plugin_basename; 101 } 102 103 public function plugin_slug() { 104 return self::$plugin_slug; 70 105 } 71 106 -
acfist/trunk/readme.txt
r2578247 r2578297 4 4 Requires at least: 4.7 5 5 Tested up to: 5.8 6 Stable tag: 1.0. 06 Stable tag: 1.0.1 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 13 13 == Description == 14 14 15 Empower ACF with more features. 15 [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) plugin is a useful and extendable plugin. ACFist is going to extend it with some handy features. 16 17 = Admin Columns = 18 Add any fields in post type lists effortlessly. It allows you to set custom column label and format the column value. Following is list of available formats. 19 - **Image** returns an image for Image field. 20 - **Selected** returns the selected option for Select, Checkbox, Radio Button, Button Group and True / False fields. 21 - **Truncate** returns the truncated value for Text, Text Area, Email, Url, Password, Wysiwyg Editor fields. 22 - **Word Count** returns the number of words for Text, Text Area, Wysiwyg Editor fields 16 23 17 24 == Changelog == 18 25 19 = 1.0.0 = 20 * initial release. 26 = 1.0.1 = 2021-08-04 27 * Add plugin notice when ACF plugin is inactive. 28 29 = 1.0.0 = 2021-08-04 30 * Initial release.
Note: See TracChangeset
for help on using the changeset viewer.