Plugin Directory

Changeset 3061617


Ignore:
Timestamp:
03/30/2024 08:46:31 PM (2 years ago)
Author:
abrain
Message:

Code for upcoming release

Location:
einsatzverwaltung/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • einsatzverwaltung/trunk/Admin/Initializer.php

    r3034287 r3061617  
    121121
    122122        wp_enqueue_style(
    123             'font-awesome',
     123            'einsatzverwaltung-font-awesome',
    124124            Core::$pluginUrl . 'font-awesome/css/fontawesome.min.css',
    125125            false,
     
    127127        );
    128128        wp_enqueue_style(
    129             'font-awesome-solid',
     129            'einsatzverwaltung-font-awesome-solid',
    130130            Core::$pluginUrl . 'font-awesome/css/solid.min.css',
    131             array('font-awesome'),
     131            array('einsatzverwaltung-font-awesome'),
    132132            '6.2.1'
    133133        );
    134134        wp_enqueue_style(
    135             'font-awesome-brands',
     135            'einsatzverwaltung-font-awesome-brands',
    136136            Core::$pluginUrl . 'font-awesome/css/brands.min.css',
    137             array('font-awesome'),
     137            array('einsatzverwaltung-font-awesome'),
    138138            '6.2.1'
    139139        );
  • einsatzverwaltung/trunk/Core.php

    r3034293 r3061617  
    2020class Core
    2121{
    22     const VERSION = '1.11.0';
    23     const DB_VERSION = 72;
     22    const VERSION = '1.11.1';
     23    const DB_VERSION = 80;
    2424
    2525    /**
  • einsatzverwaltung/trunk/Frontend.php

    r3034287 r3061617  
    7171    public function enqueueStyleAndScripts()
    7272    {
    73         wp_enqueue_style(
    74             'font-awesome',
    75             Core::$pluginUrl . 'font-awesome/css/fontawesome.min.css',
    76             false,
    77             '6.2.1'
    78         );
    79         wp_enqueue_style(
    80             'font-awesome-solid',
    81             Core::$pluginUrl . 'font-awesome/css/solid.min.css',
    82             array('font-awesome'),
    83             '6.2.1'
    84         );
     73        if (get_option('einsatzvw_disable_fontawesome') !== '1') {
     74            wp_enqueue_style(
     75                'einsatzverwaltung-font-awesome',
     76                Core::$pluginUrl . 'font-awesome/css/fontawesome.min.css',
     77                false,
     78                '6.2.1'
     79            );
     80            wp_enqueue_style(
     81                'einsatzverwaltung-font-awesome-solid',
     82                Core::$pluginUrl . 'font-awesome/css/solid.min.css',
     83                array('einsatzverwaltung-font-awesome'),
     84                '6.2.1'
     85            );
     86        }
     87
    8588        wp_enqueue_style(
    8689            'einsatzverwaltung-frontend',
  • einsatzverwaltung/trunk/Settings/Pages/Advanced.php

    r2804129 r3061617  
    7676            $this->settingsApiPage,
    7777            'einsatzvw_settings_advreport'
     78        );
     79        add_settings_field(
     80            'einsatzvw_compatibility_fontawesome',
     81            __('Font Awesome', 'einsatzverwaltung'),
     82            array($this, 'echoFieldFontAwesome'),
     83            $this->settingsApiPage,
     84            'einsatzvw_settings_advanced_compatibility'
    7885        );
    7986    }
     
    113120            $this->settingsApiPage
    114121        );
     122        add_settings_section(
     123            'einsatzvw_settings_advanced_compatibility',
     124            __('Compatibility', 'einsatzverwaltung'),
     125            null,
     126            $this->settingsApiPage
     127        );
    115128    }
    116129
     
    175188    }
    176189
     190    public function echoFieldFontAwesome()
     191    {
     192        echo '<fieldset>';
     193        $this->echoSettingsCheckbox(
     194            'einsatzvw_disable_fontawesome',
     195            __('Disable Font Awesome', 'einsatzverwaltung')
     196        );
     197        printf(
     198            '<p class="description">%s</p>',
     199            esc_html__('If the icons are not shown correctly, there may be a collision with another installed version of Font Awesome. You can try and deactivate this plugin\'s version. This will not affect the admin area.', 'einsatzverwaltung')
     200        );
     201        echo '</fieldset>';
     202    }
     203
    177204    public function echoFieldGutenberg()
    178205    {
     
    266293            array(Utilities::class, 'sanitizeCheckbox')
    267294        );
     295        register_setting(
     296            'einsatzvw_settings_advanced',
     297            'einsatzvw_disable_fontawesome',
     298            array(Utilities::class, 'sanitizeCheckbox')
     299        );
    268300    }
    269301}
  • einsatzverwaltung/trunk/Update.php

    r2812745 r3061617  
    130130            $this->upgrade1102();
    131131        }
     132
     133        if ($currentDbVersion < 80 && $targetDbVersion >= 80) {
     134            $this->upgrade1111();
     135        }
    132136    }
    133137
     
    671675
    672676    /**
     677     * @since 1.11.1
     678     */
     679    public function upgrade1111()
     680    {
     681        add_option('einsatzvw_disable_fontawesome', '0');
     682
     683        update_option('einsatzvw_db_version', 80);
     684    }
     685
     686    /**
    673687     * Fügt einen Bezeichner für eine Admin Notice der Liste der noch anzuzeigenden Notices hinzu
    674688     *
  • einsatzverwaltung/trunk/einsatzverwaltung.php

    r3034293 r3061617  
    44Plugin URI: https://einsatzverwaltung.org
    55Description: Public incident reports for fire departments and other rescue services
    6 Version: 1.11.0
     6Version: 1.11.1
    77Author: Andreas Brain
    88Author URI: https://www.abrain.de
  • einsatzverwaltung/trunk/readme.txt

    r3034293 r3061617  
    5353== Changelog ==
    5454
     55= 1.11.1 =
     56* Reduce collisions with other occurrences of Font Awesome
     57* Add option to disable Font Awesome
     58
    5559= 1.11.0 =
    5660* Alerting Methods: Can now be linked with a page from the same site or an arbitrary URL
     
    7680
    7781== Upgrade Notice ==
     82= 1.11.1 =
     83Maintenance Release
     84
    7885= 1.11.0 =
    7986Minor enhancements, upgraded Font Awesome, improved compatibility with PHP 8.2
Note: See TracChangeset for help on using the changeset viewer.