Plugin Directory

Changeset 2951863


Ignore:
Timestamp:
08/10/2023 10:24:26 PM (3 years ago)
Author:
tmconnect
Message:

Added PHP 8 support

Location:
acf-admin-flexible-content-collapse
Files:
17 added
2 edited

Legend:

Unmodified
Added
Removed
  • acf-admin-flexible-content-collapse/tags/1.3.0/acf-admin-flexible-content-collapse.php

    r2852267 r2951863  
    3636    function __construct() {
    3737
    38         if ( ! defined( 'DHZ_SHOW_DONATION_LINK' ) )
    39             define( 'DHZ_SHOW_DONATION_LINK', true );
    40 
    4138        // vars
    4239        $this->settings = array(
     
    6057        // enqueue scripts and styles
    6158        add_action( 'acf/field_group/admin_head', array($this, 'acf_admin_flex_collapse_enqueue'), 11 );
    62 
    63         if ( DHZ_SHOW_DONATION_LINK == true ) {
    64 
    65             // add plugin to $plugins array for the metabox
    66             add_filter('_dhz_plugins_list', array($this, '_dhz_meta_box_data'));
    67 
    68             // metabox callback for plugins list and donation link
    69             add_action('add_meta_boxes_acf-field-group', array($this, '_dhz_plugins_list_meta_box') );
    70 
    71         }
    7259
    7360    }
     
    168155
    169156    }
    170 
    171     /*
    172     *  Add plugin to $plugins array for the metabox
    173     */
    174     function _dhz_meta_box_data($plugins=array()) {
    175         if (apply_filters('remove_dhz_nag', false)) {
    176             return;
    177         }
    178 
    179         $plugins[] = array(
    180             'title' => $this->settings['plugin'],
    181             'screens' => array('acf-field-group'),
    182             'doc' => $this->settings['plugin_path']
    183         );
    184         return $plugins;
    185 
    186     } // end function meta_box
    187 
    188     /*
    189     *  Add metabox for plugins list and donation link
    190     */
    191     function _dhz_plugins_list_meta_box() {
    192         if (apply_filters('remove_dhz_nag', false)) {
    193             return;
    194         }
    195         $plugins = apply_filters('_dhz_plugins_list', array());
    196 
    197         $id = 'plugins-by-dreihochzwo';
    198         $title = '<a style="text-decoration: none; font-size: 1em;" href="https://profiles.wordpress.org/tmconnect/#content-plugins" target="_blank">'.__("Plugins by dreihochzwo", "acf-admin-flex-collapse").'</a>';
    199         $callback = array($this, 'show_dhz_plugins_list_meta_box');
    200         $screens = array();
    201         foreach ($plugins as $plugin) {
    202             $screens = array_merge($screens, $plugin['screens']);
    203         }
    204         $context = 'side';
    205         $priority = 'default';
    206         add_meta_box($id, $title, $callback, $screens, $context, $priority);
    207 
    208 
    209     } // end function _dhz_plugins_list_meta_box
    210 
    211     /*
    212     *  Metabox callback for plugins list and donation link
    213     */
    214     function show_dhz_plugins_list_meta_box() {
    215 
    216         $plugins = apply_filters('_dhz_plugins_list', array());
    217         ?>
    218             <p style="margin-bottom: 10px; font-weight:500"><?php _e("Thank you for using my plugins!", "acf-admin-flex-collapse") ?></p>
    219             <ul style="margin-top: 0; margin-left: 5px;">
    220                 <?php
    221                     foreach ($plugins as $plugin) {
    222                         ?>
    223                             <li style="list-style-type: disc; list-style-position:inside; text-indent:-13px; margin-left:13px">
    224                                 <?php
    225                                     echo $plugin['title']."<br/>";
    226                                     if ($plugin['doc']) {
    227                                         ?> <a style="font-size:12px" href="<?php echo $plugin['doc']; ?>" target="_blank"><?php _e("Documentation", "acf-admin-flex-collapse") ?></a><?php
    228                                     }
    229                                 ?>
    230                             </li>
    231                         <?php
    232                     }
    233                 ?>
    234             </ul>
    235             <div style="margin-left:-12px; margin-right:-12px; margin-bottom: -12px; background: #2a9bd9; padding:14px 12px">
    236                 <p style="margin:0; text-align:center"><a style="color: #fff;" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=XMLKD8H84HXB4&lc=US&item_name=Donation%20for%20WordPress%20Plugins&no_note=0&cn=Add%20a%20message%3a&no_shipping=1&currency_code=EUR" target="_blank"><?php _e("Please consider making a small donation!", "acf-admin-flex-collapse") ?></a></p>
    237             </div>
    238         <?php
    239     }
    240157}
    241158// initialize
  • acf-admin-flexible-content-collapse/trunk/readme.txt

    r2852263 r2951863  
    44Tags: acf, acfpro, advanced custom fields, flexible content field, collapse, expand,
    55Requires at least: 4.7
    6 Tested up to: 5.5
    7 Stable tag: 1.3.0
     6Tested up to: 6.3
     7Stable tag: 1.3.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4444== Changelog ==
    4545
     46= v1.3.1 =
     47* PHP 8 Support
     48
     49= v1.3.0 =
     50* Disabled ACF Pro V6 support
     51* Fixed bug where the duplicate button doesn't work
     52* Some JS improvements
     53* Some CSS changes
     54
    4655= v1.2.2 =
    4756* Fixes for WP 5.5
Note: See TracChangeset for help on using the changeset viewer.