Plugin Directory

Changeset 2754511

Timestamp:
07/11/2022 11:25:33 AM (2 years ago)
Author:
aaronfc
Message:

Sensei LMS Certificates 2.3.0

Location:
sensei-certificates/trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • sensei-certificates/trunk/assets/dist/blocks/index.asset.php

    r2590019 r2754511  
    1 <?php return array('dependencies' => array('wp-blocks', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '5d47f69470d917d94458276ac9038639');
     1<?php return array('dependencies' => array('wp-blocks', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '');
  • sensei-certificates/trunk/assets/dist/blocks/index.js

    r2590019 r2754511  
    1 !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var o=r(10),n=r(11),i=r(12),s=r(13);e.exports=function(e){return o(e)||n(e)||i(e)||s()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.wp.blocks},,,,,function(e,t,r){"use strict";r.r(t);var o=r(2),n=r.n(o),i=r(0),s=r(3),c=r(4),u={className:"view-certificate",text:Object(i.__)("View Certificate","sensei-certificates")};Object(c.registerBlockVariation)("core/button",{name:"sensei-certificates/view-certificate-button",title:Object(i.__)("View Certificate","sensei-certificates"),description:Object(i.__)("Enable a learner to view their course certificate.","sensei-certificates"),keywords:[Object(i.__)("Certificates","sensei-lms")],category:"sensei-lms",attributes:u,isActive:function(e,t){var r;return null===(r=e.className)||void 0===r?void 0:r.match(t.className)}}),Object(s.addFilter)("sensei-lms.Course.completedActions","sensei-certificates",(function(e){return[].concat(n()(e),[["core/button",u]])}))},function(e,t,r){var o=r(1);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var o=r(1);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}]);
     1!function(e){var t={};function r((e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}]);
  • sensei-certificates/trunk/assets/dist/js/admin.asset.php

    r2590019 r2754511  
    1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => '0abfab22a8fd391b47a7b23a18519cea');
     1<?php return array('dependencies' => array('wp-polyfill'), 'version' => '');
  • sensei-certificates/trunk/changelog.txt

    r2590019 r2754511  
    11*** Changelog ***
     2
     3
     4
     5
     6
     7
     8
    29
    3102021.08.27 - version 2.2.1
  • sensei-certificates/trunk/classes/class-woothemes-sensei-certificates-dependency-checker.php

    r2292649 r2754511  
    1010 */
    1111class Woothemes_Sensei_Certificates_Dependency_Checker {
    12     const MINIMUM_PHP_VERSION    = '5.6';
     12    const MINIMUM_PHP_VERSION    = '';
    1313    const MINIMUM_SENSEI_VERSION = '1.11.0';
    1414
  • sensei-certificates/trunk/classes/class-woothemes-sensei-certificates.php

    r2590019 r2754511  
    469469            'type'        => 'checkbox',
    470470            'default'     => true,
     471
     472
     473
     474
     475
     476
     477
     478
    471479            'section'     => 'certificate-settings',
    472480        );
     
    755763            exit;
    756764
     765
     766
     767
     768
    757769        } else {
    758770
    759             wp_die( esc_html__( 'You are not allowed to view this Certificate.', 'sensei-certificates' ), esc_html__( 'Certificate Error', 'sensei-certificates' ) );
     771            // Redirect to the login page.
     772            wp_safe_redirect( wp_login_url( get_permalink() ) );
     773            exit;
    760774
    761775        } // End If Statement
     
    828842            // Define the data we're going to load: Key => Default value
    829843            $load_data = array(
    830                 'certificate_font_style'      => array(),
     844                'certificate_font_style'      => ,
    831845                'certificate_font_color'      => array(),
    832846                'certificate_font_size'       => array(),
     
    14671481        $screen = get_current_screen();
    14681482
    1469         if ( $screen && 'page' === $screen->post_type ) {
     1483        if ( $screen && 'page' === $screen->post_type ) {
    14701484            WooThemes_Sensei_Certificates::instance()->assets->enqueue(
    14711485                'sensei-certificates-block',
     
    14861500     */
    14871501    public function update_view_certificate_button_url( $block_content, $block ): string {
     1502
    14881503        $class_name = 'view-certificate';
    14891504
    14901505        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only used if the learner completed the course.
    1491         $course_id = isset( $_GET['course_id'] ) ? (int) $_GET['course_id'] : false;
     1506        $course_id = isset( $_GET['course_id'] ) ? (int) $_GET['course_id'] : ;
    14921507
    14931508        if (
     
    14961511            || ! get_current_user_id()
    14971512            || 'course' !== get_post_type( $course_id )
    1498             || ! Sensei_Utils::user_completed_course( $course_id, get_current_user_id() )
    14991513
    15001514            // Check that the block is a core/button and it contains the respective class name.
     
    15071521        }
    15081522
    1509         // Check if course has template and core method exists.
     1523        // Check if course has template.
    15101524        if (
    15111525            ! get_post_meta( $course_id, '_course_certificate_template', true )
    15121526            || ! method_exists( 'Sensei_Blocks', 'update_button_block_url' )
     1527
    15131528        ) {
    15141529            return '';
  • sensei-certificates/trunk/lang/sensei-certificates.pot

    r2590019 r2754511  
    1 # Copyright (C) 2021 Automattic
     1# Copyright (C) 202 Automattic
    22# This file is distributed under the GPLv2+.
    33msgid ""
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2021-08-27T19:00:55+00:00\n"
     12"POT-Creation-Date: 202+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.5.0\n"
     14"X-Generator: WP-CLI 2..0\n"
    1515"X-Domain: sensei-certificates\n"
    1616
     
    117117#: admin/post-types/writepanels/writepanel-certificate_data.php:131
    118118#: classes/class-woothemes-sensei-certificate-templates.php:462
    119 #: classes/class-woothemes-sensei-certificates.php:858
     119#: classes/class-woothemes-sensei-certificates.php:8
    120120#: sensei-certificates-functions.php:201
    121121msgid "Certificate of Completion"
     
    361361#: admin/woothemes-sensei-certificate-templates-admin-init.php:242
    362362#: classes/class-woothemes-sensei-certificate-templates.php:192
    363 #: classes/class-woothemes-sensei-certificates.php:541
     363#: classes/class-woothemes-sensei-certificates.php:54
    364364msgid "Course"
    365365msgstr ""
     
    466466
    467467#: classes/class-woothemes-sensei-certificate-templates.php:191
    468 #: classes/class-woothemes-sensei-certificates.php:540
     468#: classes/class-woothemes-sensei-certificates.php:54
    469469msgid "Learner"
    470470msgstr ""
    471471
    472472#: classes/class-woothemes-sensei-certificate-templates.php:193
    473 #: classes/class-woothemes-sensei-certificates.php:542
     473#: classes/class-woothemes-sensei-certificates.php:5
    474474msgid "Date Completed"
    475475msgstr ""
    476476
    477477#: classes/class-woothemes-sensei-certificate-templates.php:194
    478 #: classes/class-woothemes-sensei-certificates.php:543
     478#: classes/class-woothemes-sensei-certificates.php:5
    479479msgid "Actions"
    480480msgstr ""
    481481
    482482#: classes/class-woothemes-sensei-certificate-templates.php:260
    483 #: classes/class-woothemes-sensei-certificates.php:497
    484 #: classes/class-woothemes-sensei-certificates.php:607
    485 #: classes/class-woothemes-sensei-certificates.php:1092
    486 #: classes/class-woothemes-sensei-certificates.php:1177
    487 #: classes/class-woothemes-sensei-certificates.php:1624
     483#: classes/class-woothemes-sensei-certificates.php:
     484#: classes/class-woothemes-sensei-certificates.php:6
     485#: classes/class-woothemes-sensei-certificates.php:1
     486#: classes/class-woothemes-sensei-certificates.php:11
     487#: classes/class-woothemes-sensei-certificates.php:16
    488488msgid "View Certificate"
    489489msgstr ""
     
    494494
    495495#: classes/class-woothemes-sensei-certificate-templates.php:470
    496 #: classes/class-woothemes-sensei-certificates.php:865
     496#: classes/class-woothemes-sensei-certificates.php:8
    497497#: sensei-certificates-functions.php:208
    498498msgid "This is to certify that"
     
    500500
    501501#: classes/class-woothemes-sensei-certificate-templates.php:470
    502 #: classes/class-woothemes-sensei-certificates.php:865
     502#: classes/class-woothemes-sensei-certificates.php:8
    503503#: sensei-certificates-functions.php:208
    504504msgid "has completed the course"
     
    507507#. translators: %s is replaced with the site title
    508508#: classes/class-woothemes-sensei-certificate-templates.php:495
    509 #: classes/class-woothemes-sensei-certificates.php:889
     509#: classes/class-woothemes-sensei-certificates.php:
    510510msgid "At %s"
    511511msgstr ""
     
    572572msgstr ""
    573573
    574 #: classes/class-woothemes-sensei-certificates.php:490
     574#: classes/class-woothemes-sensei-certificates.php:475
     575msgid "Delete data on uninstall"
     576msgstr ""
     577
     578#: classes/class-woothemes-sensei-certificates.php:476
     579msgid "Delete Sensei Certificates data when the plugin is deleted. Once removed, this data cannot be restored."
     580msgstr ""
     581
     582#: classes/class-woothemes-sensei-certificates.php:498
    575583msgctxt "post type general name"
    576584msgid "Certificates"
    577585msgstr ""
    578586
    579 #: classes/class-woothemes-sensei-certificates.php:491
     587#: classes/class-woothemes-sensei-certificates.php:49
    580588msgctxt "post type singular name"
    581589msgid "Certificate"
    582590msgstr ""
    583591
    584 #: classes/class-woothemes-sensei-certificates.php:492
     592#: classes/class-woothemes-sensei-certificates.php:
    585593msgctxt "post type add_new"
    586594msgid "Add New Certificate"
    587595msgstr ""
    588596
    589 #: classes/class-woothemes-sensei-certificates.php:493
     597#: classes/class-woothemes-sensei-certificates.php:
    590598msgid "Add New Certificate"
    591599msgstr ""
    592600
    593 #: classes/class-woothemes-sensei-certificates.php:494
     601#: classes/class-woothemes-sensei-certificates.php:
    594602msgid "Edit Certificate"
    595603msgstr ""
    596604
    597 #: classes/class-woothemes-sensei-certificates.php:495
     605#: classes/class-woothemes-sensei-certificates.php:
    598606msgid "New Certificate"
    599607msgstr ""
    600608
    601 #: classes/class-woothemes-sensei-certificates.php:496
    602 #: classes/class-woothemes-sensei-certificates.php:502
     609#: classes/class-woothemes-sensei-certificates.php:
     610#: classes/class-woothemes-sensei-certificates.php:5
    603611msgid "Certificates"
    604612msgstr ""
    605613
    606 #: classes/class-woothemes-sensei-certificates.php:498
     614#: classes/class-woothemes-sensei-certificates.php:
    607615msgid "Search Certificates"
    608616msgstr ""
    609617
    610 #: classes/class-woothemes-sensei-certificates.php:499
     618#: classes/class-woothemes-sensei-certificates.php:
    611619msgid "No certificates found"
    612620msgstr ""
    613621
    614 #: classes/class-woothemes-sensei-certificates.php:500
     622#: classes/class-woothemes-sensei-certificates.php:50
    615623msgid "No certificates found in Trash"
    616624msgstr ""
    617625
    618626#. translators: %1$s is the URL for editing the Course.
    619 #: classes/class-woothemes-sensei-certificates.php:612
     627#: classes/class-woothemes-sensei-certificates.php:6
    620628msgid "Set a certificate template on the <a href=\"%1$s\">course</a> in order to view this certificate"
    621629msgstr ""
    622630
    623 #: classes/class-woothemes-sensei-certificates.php:759
     631#: classes/class-woothemes-sensei-certificates.php:7
    624632msgid "You are not allowed to view this Certificate."
    625633msgstr ""
    626634
    627 #: classes/class-woothemes-sensei-certificates.php:759
    628 #: classes/class-woothemes-sensei-certificates.php:918
     635#: classes/class-woothemes-sensei-certificates.php:7
     636#: classes/class-woothemes-sensei-certificates.php:9
    629637msgid "Certificate Error"
    630638msgstr ""
    631639
    632 #: classes/class-woothemes-sensei-certificates.php:918
     640#: classes/class-woothemes-sensei-certificates.php:9
    633641msgid "The certificate you are searching for does not exist."
    634642msgstr ""
    635643
    636 #: classes/class-woothemes-sensei-certificates.php:1151
     644#: classes/class-woothemes-sensei-certificates.php:11
    637645msgid "Certificate"
    638646msgstr ""
    639647
    640 #: classes/class-woothemes-sensei-certificates.php:1352
     648#: classes/class-woothemes-sensei-certificates.php:13
    641649msgid "Allow my Certificates to be publicly viewed"
    642650msgstr ""
    643651
    644 #: classes/class-woothemes-sensei-certificates.php:1352
     652#: classes/class-woothemes-sensei-certificates.php:13
    645653msgid "Save"
    646654msgstr ""
    647655
    648 #: classes/class-woothemes-sensei-certificates.php:1393
     656#: classes/class-woothemes-sensei-certificates.php:1
    649657msgid "Your Certificates Public View Settings Saved Successfully."
    650658msgstr ""
    651659
    652 #: classes/class-woothemes-sensei-certificates.php:1454
     660#: classes/class-woothemes-sensei-certificates.php:14
    653661msgid "View certificate"
    654662msgstr ""
  • sensei-certificates/trunk/readme.txt

    r2590019 r2754511  
    11=== Sensei LMS Certificates ===
    2 Contributors: automattic, alexsanford1, donnapep, jakeom, gikaragia, renathoc, yscik
     2Contributors: automattic, alexsanford1, donnapep, jakeom, gikaragia, renathoc, yscik
    33Tags: certificates, course certificate, sensei lms
    44Requires at least: 5.6
    5 Tested up to: 5.8
     5Tested up to:
    66Requires PHP: 7.0
    7 Stable tag: 2.2.1
     7Stable tag: 2.
    88License: GPLv2+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6161
    6262== Changelog ==
    63 [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/sensei-certificates/master/changelog.txt).
     63[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/sensei-certificates//changelog.txt).
  • sensei-certificates/trunk/woothemes-sensei-certificates.php

    r2590019 r2754511  
    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.2.1
     6 * Version: 2.
    77 * Author: Automattic
    88 * Author URI: https://automattic.com
    99 * Requires at least: 5.6
    10  * Tested up to: 5.8
     10 * Tested up to:
    1111 * Requires PHP: 7.0
    1212 * License: GPLv2+
     
    1717}
    1818
    19 define( 'SENSEI_CERTIFICATES_VERSION', '2.2.1' );
     19define( 'SENSEI_CERTIFICATES_VERSION', '2.' );
    2020define( 'SENSEI_CERTIFICATES_PLUGIN_FILE', __FILE__ );
    2121define( 'SENSEI_CERTIFICATES_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.