Plugin Directory

Changeset 3420766


Ignore:
Timestamp:
12/16/2025 08:50:07 AM (4 months ago)
Author:
m1r0
Message:

Sensei Certificates 2.5.4

Location:
sensei-certificates/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sensei-certificates/trunk/changelog.txt

    r3189023 r3420766  
    11*** Changelog ***
     2
     32025.12.15 - version 2.5.4
     4* Fix: PHP 8.2 utf8_decode deprecation notice - #369
     5
    26
    372024.11.14 - version 2.5.3
  • sensei-certificates/trunk/classes/class-woothemes-sensei-certificate-templates.php

    r3189023 r3420766  
    672672            // Decode string based on font type
    673673            if ( 'latin' == $fonttype ) {
    674                 $value = utf8_decode( $value );
     674                $value = Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value );
    675675            }
    676676
     
    773773            // Decode string based on font type
    774774            if ( 'latin' == $fonttype ) {
    775                 $value = utf8_decode( $value );
     775                $value = Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value );
    776776            }
    777777
  • sensei-certificates/trunk/classes/class-woothemes-sensei-certificates-utils.php

    r2292649 r3420766  
    6767        );
    6868    }
     69
     70    /**
     71     * Convert UTF-8 text to ISO-8859-1 with transliteration.
     72     *
     73     * Falls back to the original string if conversion fails.
     74     *
     75     * @param string $value Text to convert.
     76     * @return string
     77     */
     78    public static function convert_utf8_to_latin1( $value ) {
     79        if ( ! $value || ! is_string( $value ) ) {
     80            return $value;
     81        }
     82
     83        $converted = iconv( 'UTF-8', 'ISO-8859-1//TRANSLIT', $value );
     84
     85        return false === $converted ? $value : $converted;
     86    }
    6987}
  • sensei-certificates/trunk/classes/class-woothemes-sensei-pdf-certificate.php

    r3132778 r3420766  
    254254            // Decode string based on font type
    255255            if ( 'latin' == $fonttype ) {
    256                 $value = utf8_decode( $value );
     256                $value = Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value );
    257257            }
    258258
     
    285285
    286286            // and write out the value
    287             $fpdf->Image( esc_url( utf8_decode( $value ) ), $x, $y, $w, $h );
     287            $fpdf->Image( esc_url( Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value ) ), $x, $y, $w, $h );
    288288
    289289        } // End If Statement
     
    383383            // Decode string based on font type
    384384            if ( 'latin' == $fonttype ) {
    385                 $value = utf8_decode( $value );
     385                $value = Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value );
    386386            }
    387387
     
    457457            // Decode string based on font type
    458458            if ( 'latin' == $fonttype ) {
    459                 $value = utf8_decode( $value );
     459                $value = Woothemes_Sensei_Certificates_Utils::convert_utf8_to_latin1( $value );
    460460            }
    461461
  • sensei-certificates/trunk/lang/sensei-certificates.pot

    r3189023 r3420766  
    1 # Copyright (C) 2024 Automattic
     1# Copyright (C) 2025 Automattic
    22# This file is distributed under the GPLv2+.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Sensei LMS Certificates 2.5.3\n"
     5"Project-Id-Version: Sensei LMS Certificates 2.5.4\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sensei-certificates\n"
    77"Last-Translator: \n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-11-14T15:56:22+00:00\n"
     12"POT-Creation-Date: 2025-12-15T17:25:44+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.10.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: sensei-certificates\n"
    1616
     
    263263#. translators: %s is replaced with the formatted date timestamp of a certificate template revision
    264264#: admin/woothemes-sensei-certificate-templates-admin-init.php:285
     265#, php-format
    265266msgid "Certificate Template restored to revision from %s"
    266267msgstr ""
     
    276277#. translators: %1$s is replaced with the date on which the certificate template is scheduled to be published
    277278#: admin/woothemes-sensei-certificate-templates-admin-init.php:291
     279#, php-format
    278280msgid "Certificate Template scheduled for: <strong>%1$s</strong>."
    279281msgstr ""
     
    373375#. translators: %s is replaced with the title of the certificate template
    374376#: classes/class-woothemes-sensei-certificate-templates.php:975
     377#, php-format
    375378msgid "Edit %s"
    376379msgstr ""
     
    378381#. translators: %1$s is version of PHP that this plugin requires; %2$s is the version of PHP WordPress is running on.
    379382#: classes/class-woothemes-sensei-certificates-dependency-checker.php:92
     383#, php-format
    380384msgid "<strong>Sensei LMS Certificates</strong> requires a minimum PHP version of %1$s, but you are running %2$s."
    381385msgstr ""
     
    392396#. translators: %1$s is the minimum version number of Sensei that is required.
    393397#: classes/class-woothemes-sensei-certificates-dependency-checker.php:123
     398#, php-format
    394399msgid "<strong>Sensei LMS Certificates</strong> requires that the plugin <strong>Sensei</strong> (minimum version: <strong>%1$s</strong>) is installed and activated."
    395400msgstr ""
     
    481486#. translators: %1$s is the URL for editing the Course.
    482487#: classes/class-woothemes-sensei-certificates.php:690
     488#, php-format
    483489msgid "Set a certificate template on the <a href=\"%1$s\">course</a> in order to view this certificate"
    484490msgstr ""
     
    535541#. translators: Placeholder %d is the percentage complete.
    536542#: classes/tools/class-sensei-certificates-tool-create-certificates.php:91
     543#, php-format
    537544msgid "This task is running in the background and is %d%% complete."
    538545msgstr ""
  • sensei-certificates/trunk/readme.txt

    r3189023 r3420766  
    22Contributors: automattic, alexsanford1, donnapep, jakeom, gikaragia, renathoc, yscik, m1r0, aaronfc
    33Tags: certificates, course certificate, sensei lms
    4 Requires at least: 6.5
    5 Tested up to: 6.7
     4Requires at least: 6.7
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.5.3
     7Stable tag: 2.5.4
    88License: GPLv2+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • sensei-certificates/trunk/woothemes-sensei-certificates.php

    r3189023 r3420766  
    44 * Plugin URI: https://woocommerce.com/products/sensei-certificates/
    55 * Description: Award your students with a certificate of completion and a sense of accomplishment after finishing a course.
    6  * Version: 2.5.3
     6 * Version: 2.5.4
    77 * Author: Automattic
    88 * Author URI: https://automattic.com
    9  * Requires at least: 6.5
    10  * Tested up to: 6.7
     9 * Requires at least: 6.7
     10 * Tested up to: 6.9
    1111 * Requires PHP: 7.4
    1212 * License: GPLv2+
     
    1717}
    1818
    19 define( 'SENSEI_CERTIFICATES_VERSION', '2.5.3' );
     19define( 'SENSEI_CERTIFICATES_VERSION', '2.5.4' );
    2020define( 'SENSEI_CERTIFICATES_PLUGIN_FILE', __FILE__ );
    2121define( 'SENSEI_CERTIFICATES_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.