Changeset 2754511
- Timestamp:
- 07/11/2022 11:25:33 AM (2 years ago)
- 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 1 1 *** Changelog *** 2 3 4 5 6 7 8 2 9 3 10 2021.08.27 - version 2.2.1 -
sensei-certificates/trunk/classes/class-woothemes-sensei-certificates-dependency-checker.php
r2292649 r2754511 10 10 */ 11 11 class Woothemes_Sensei_Certificates_Dependency_Checker { 12 const MINIMUM_PHP_VERSION = ' 5.6';12 const MINIMUM_PHP_VERSION = ''; 13 13 const MINIMUM_SENSEI_VERSION = '1.11.0'; 14 14 -
sensei-certificates/trunk/classes/class-woothemes-sensei-certificates.php
r2590019 r2754511 469 469 'type' => 'checkbox', 470 470 'default' => true, 471 472 473 474 475 476 477 478 471 479 'section' => 'certificate-settings', 472 480 ); … … 755 763 exit; 756 764 765 766 767 768 757 769 } else { 758 770 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; 760 774 761 775 } // End If Statement … … 828 842 // Define the data we're going to load: Key => Default value 829 843 $load_data = array( 830 'certificate_font_style' => array(),844 'certificate_font_style' => , 831 845 'certificate_font_color' => array(), 832 846 'certificate_font_size' => array(), … … 1467 1481 $screen = get_current_screen(); 1468 1482 1469 if ( $screen && 'page' === $screen->post_type ) {1483 if ( $screen && 'page' === $screen->post_type ) { 1470 1484 WooThemes_Sensei_Certificates::instance()->assets->enqueue( 1471 1485 'sensei-certificates-block', … … 1486 1500 */ 1487 1501 public function update_view_certificate_button_url( $block_content, $block ): string { 1502 1488 1503 $class_name = 'view-certificate'; 1489 1504 1490 1505 // 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'] : ; 1492 1507 1493 1508 if ( … … 1496 1511 || ! get_current_user_id() 1497 1512 || 'course' !== get_post_type( $course_id ) 1498 || ! Sensei_Utils::user_completed_course( $course_id, get_current_user_id() )1499 1513 1500 1514 // Check that the block is a core/button and it contains the respective class name. … … 1507 1521 } 1508 1522 1509 // Check if course has template and core method exists.1523 // Check if course has template. 1510 1524 if ( 1511 1525 ! get_post_meta( $course_id, '_course_certificate_template', true ) 1512 1526 || ! method_exists( 'Sensei_Blocks', 'update_button_block_url' ) 1527 1513 1528 ) { 1514 1529 return ''; -
sensei-certificates/trunk/lang/sensei-certificates.pot
r2590019 r2754511 1 # Copyright (C) 202 1Automattic1 # Copyright (C) 202 Automattic 2 2 # This file is distributed under the GPLv2+. 3 3 msgid "" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 1-08-27T19:00:55+00:00\n"12 "POT-Creation-Date: 202+00:00\n" 13 13 "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" 15 15 "X-Domain: sensei-certificates\n" 16 16 … … 117 117 #: admin/post-types/writepanels/writepanel-certificate_data.php:131 118 118 #: classes/class-woothemes-sensei-certificate-templates.php:462 119 #: classes/class-woothemes-sensei-certificates.php:8 58119 #: classes/class-woothemes-sensei-certificates.php:8 120 120 #: sensei-certificates-functions.php:201 121 121 msgid "Certificate of Completion" … … 361 361 #: admin/woothemes-sensei-certificate-templates-admin-init.php:242 362 362 #: classes/class-woothemes-sensei-certificate-templates.php:192 363 #: classes/class-woothemes-sensei-certificates.php:54 1363 #: classes/class-woothemes-sensei-certificates.php:54 364 364 msgid "Course" 365 365 msgstr "" … … 466 466 467 467 #: classes/class-woothemes-sensei-certificate-templates.php:191 468 #: classes/class-woothemes-sensei-certificates.php:54 0468 #: classes/class-woothemes-sensei-certificates.php:54 469 469 msgid "Learner" 470 470 msgstr "" 471 471 472 472 #: classes/class-woothemes-sensei-certificate-templates.php:193 473 #: classes/class-woothemes-sensei-certificates.php:5 42473 #: classes/class-woothemes-sensei-certificates.php:5 474 474 msgid "Date Completed" 475 475 msgstr "" 476 476 477 477 #: classes/class-woothemes-sensei-certificate-templates.php:194 478 #: classes/class-woothemes-sensei-certificates.php:5 43478 #: classes/class-woothemes-sensei-certificates.php:5 479 479 msgid "Actions" 480 480 msgstr "" 481 481 482 482 #: classes/class-woothemes-sensei-certificate-templates.php:260 483 #: classes/class-woothemes-sensei-certificates.php: 497484 #: classes/class-woothemes-sensei-certificates.php:6 07485 #: classes/class-woothemes-sensei-certificates.php:1 092486 #: classes/class-woothemes-sensei-certificates.php:11 77487 #: classes/class-woothemes-sensei-certificates.php:16 24483 #: 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 488 488 msgid "View Certificate" 489 489 msgstr "" … … 494 494 495 495 #: classes/class-woothemes-sensei-certificate-templates.php:470 496 #: classes/class-woothemes-sensei-certificates.php:8 65496 #: classes/class-woothemes-sensei-certificates.php:8 497 497 #: sensei-certificates-functions.php:208 498 498 msgid "This is to certify that" … … 500 500 501 501 #: classes/class-woothemes-sensei-certificate-templates.php:470 502 #: classes/class-woothemes-sensei-certificates.php:8 65502 #: classes/class-woothemes-sensei-certificates.php:8 503 503 #: sensei-certificates-functions.php:208 504 504 msgid "has completed the course" … … 507 507 #. translators: %s is replaced with the site title 508 508 #: classes/class-woothemes-sensei-certificate-templates.php:495 509 #: classes/class-woothemes-sensei-certificates.php: 889509 #: classes/class-woothemes-sensei-certificates.php: 510 510 msgid "At %s" 511 511 msgstr "" … … 572 572 msgstr "" 573 573 574 #: classes/class-woothemes-sensei-certificates.php:490 574 #: classes/class-woothemes-sensei-certificates.php:475 575 msgid "Delete data on uninstall" 576 msgstr "" 577 578 #: classes/class-woothemes-sensei-certificates.php:476 579 msgid "Delete Sensei Certificates data when the plugin is deleted. Once removed, this data cannot be restored." 580 msgstr "" 581 582 #: classes/class-woothemes-sensei-certificates.php:498 575 583 msgctxt "post type general name" 576 584 msgid "Certificates" 577 585 msgstr "" 578 586 579 #: classes/class-woothemes-sensei-certificates.php:49 1587 #: classes/class-woothemes-sensei-certificates.php:49 580 588 msgctxt "post type singular name" 581 589 msgid "Certificate" 582 590 msgstr "" 583 591 584 #: classes/class-woothemes-sensei-certificates.php: 492592 #: classes/class-woothemes-sensei-certificates.php: 585 593 msgctxt "post type add_new" 586 594 msgid "Add New Certificate" 587 595 msgstr "" 588 596 589 #: classes/class-woothemes-sensei-certificates.php: 493597 #: classes/class-woothemes-sensei-certificates.php: 590 598 msgid "Add New Certificate" 591 599 msgstr "" 592 600 593 #: classes/class-woothemes-sensei-certificates.php: 494601 #: classes/class-woothemes-sensei-certificates.php: 594 602 msgid "Edit Certificate" 595 603 msgstr "" 596 604 597 #: classes/class-woothemes-sensei-certificates.php: 495605 #: classes/class-woothemes-sensei-certificates.php: 598 606 msgid "New Certificate" 599 607 msgstr "" 600 608 601 #: classes/class-woothemes-sensei-certificates.php: 496602 #: classes/class-woothemes-sensei-certificates.php:5 02609 #: classes/class-woothemes-sensei-certificates.php: 610 #: classes/class-woothemes-sensei-certificates.php:5 603 611 msgid "Certificates" 604 612 msgstr "" 605 613 606 #: classes/class-woothemes-sensei-certificates.php: 498614 #: classes/class-woothemes-sensei-certificates.php: 607 615 msgid "Search Certificates" 608 616 msgstr "" 609 617 610 #: classes/class-woothemes-sensei-certificates.php: 499618 #: classes/class-woothemes-sensei-certificates.php: 611 619 msgid "No certificates found" 612 620 msgstr "" 613 621 614 #: classes/class-woothemes-sensei-certificates.php:50 0622 #: classes/class-woothemes-sensei-certificates.php:50 615 623 msgid "No certificates found in Trash" 616 624 msgstr "" 617 625 618 626 #. translators: %1$s is the URL for editing the Course. 619 #: classes/class-woothemes-sensei-certificates.php:6 12627 #: classes/class-woothemes-sensei-certificates.php:6 620 628 msgid "Set a certificate template on the <a href=\"%1$s\">course</a> in order to view this certificate" 621 629 msgstr "" 622 630 623 #: classes/class-woothemes-sensei-certificates.php:7 59631 #: classes/class-woothemes-sensei-certificates.php:7 624 632 msgid "You are not allowed to view this Certificate." 625 633 msgstr "" 626 634 627 #: classes/class-woothemes-sensei-certificates.php:7 59628 #: classes/class-woothemes-sensei-certificates.php:9 18635 #: classes/class-woothemes-sensei-certificates.php:7 636 #: classes/class-woothemes-sensei-certificates.php:9 629 637 msgid "Certificate Error" 630 638 msgstr "" 631 639 632 #: classes/class-woothemes-sensei-certificates.php:9 18640 #: classes/class-woothemes-sensei-certificates.php:9 633 641 msgid "The certificate you are searching for does not exist." 634 642 msgstr "" 635 643 636 #: classes/class-woothemes-sensei-certificates.php:11 51644 #: classes/class-woothemes-sensei-certificates.php:11 637 645 msgid "Certificate" 638 646 msgstr "" 639 647 640 #: classes/class-woothemes-sensei-certificates.php:13 52648 #: classes/class-woothemes-sensei-certificates.php:13 641 649 msgid "Allow my Certificates to be publicly viewed" 642 650 msgstr "" 643 651 644 #: classes/class-woothemes-sensei-certificates.php:13 52652 #: classes/class-woothemes-sensei-certificates.php:13 645 653 msgid "Save" 646 654 msgstr "" 647 655 648 #: classes/class-woothemes-sensei-certificates.php:1 393656 #: classes/class-woothemes-sensei-certificates.php:1 649 657 msgid "Your Certificates Public View Settings Saved Successfully." 650 658 msgstr "" 651 659 652 #: classes/class-woothemes-sensei-certificates.php:14 54660 #: classes/class-woothemes-sensei-certificates.php:14 653 661 msgid "View certificate" 654 662 msgstr "" -
sensei-certificates/trunk/readme.txt
r2590019 r2754511 1 1 === Sensei LMS Certificates === 2 Contributors: automattic, alexsanford1, donnapep, jakeom, gikaragia, renathoc, yscik 2 Contributors: automattic, alexsanford1, donnapep, jakeom, gikaragia, renathoc, yscik 3 3 Tags: certificates, course certificate, sensei lms 4 4 Requires at least: 5.6 5 Tested up to: 5.85 Tested up to: 6 6 Requires PHP: 7.0 7 Stable tag: 2. 2.17 Stable tag: 2. 8 8 License: GPLv2+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 61 61 62 62 == 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 4 4 * Plugin URI: https://woocommerce.com/products/sensei-certificates/ 5 5 * Description: Award your students with a certificate of completion and a sense of accomplishment after finishing a course. 6 * Version: 2. 2.16 * Version: 2. 7 7 * Author: Automattic 8 8 * Author URI: https://automattic.com 9 9 * Requires at least: 5.6 10 * Tested up to: 5.810 * Tested up to: 11 11 * Requires PHP: 7.0 12 12 * License: GPLv2+ … … 17 17 } 18 18 19 define( 'SENSEI_CERTIFICATES_VERSION', '2. 2.1' );19 define( 'SENSEI_CERTIFICATES_VERSION', '2.' ); 20 20 define( 'SENSEI_CERTIFICATES_PLUGIN_FILE', __FILE__ ); 21 21 define( 'SENSEI_CERTIFICATES_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.