Changeset 3214331
- Timestamp:
- 12/29/2024 06:54:53 AM (15 months ago)
- Location:
- timestamps
- Files:
-
- 10 edited
- 1 copied
-
tags/1.11.0 (copied) (copied from timestamps/trunk)
-
tags/1.11.0/includes/classes/Feature/Timestamp/Timestamp.php (modified) (2 diffs)
-
tags/1.11.0/package-lock.json (modified) (2 diffs)
-
tags/1.11.0/package.json (modified) (1 diff)
-
tags/1.11.0/readme.txt (modified) (3 diffs)
-
tags/1.11.0/timestamps.php (modified) (3 diffs)
-
trunk/includes/classes/Feature/Timestamp/Timestamp.php (modified) (2 diffs)
-
trunk/package-lock.json (modified) (2 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/timestamps.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
timestamps/tags/1.11.0/includes/classes/Feature/Timestamp/Timestamp.php
r3199387 r3214331 75 75 // Oxygen Builder. 76 76 add_action( 'save_post', array( $this, 'save_post_meta_oxygenbuilder' ), 10, 2 ); 77 78 // Thrive Themes Architect Page Builder. 79 add_action( 'save_post', array( $this, 'save_post_meta_thrivethemesbuilder' ), 10, 2 ); 77 80 } 78 81 … … 484 487 485 488 /** 489 * Save post meta data during the Thrive Themes Architect Page Builder request. 490 * 491 * @param int $post_id The post ID. 492 * @param WP_Post $post The post object. 493 * @since 1.11.0 494 * @since Thrive Themes Architect Page Builder 10.4.2 495 * @return void 496 * @throws \Exception If an error occurs during the process. 497 */ 498 public function save_post_meta_thrivethemesbuilder( $post_id, $post ) { 499 500 // Bail early if it is a revision. 501 if ( wp_is_post_revision( $post_id ) ) { 502 return; 503 } 504 505 // Bail early if any function does not exist. 506 if ( ! function_exists( 'tve_get_post_meta' ) || ! function_exists( 'tve_update_post_meta' ) ) { 507 return; 508 } 509 510 $tcb_content = tve_get_post_meta( $post_id, 'tve_globals' ); 511 512 // Bail early if the tcb_content is empty. This means that the post is not created with Thrive Themes Architect. 513 if ( empty( $tcb_content ) ) { 514 return; 515 } 516 517 // Bail early if the user does not have the required capabilities. 518 if ( ! current_user_can( 'edit_post', $post_id ) ) { 519 return; 520 } 521 522 // Bail early if we are not updating the post. 523 if ( ! isset( $_POST['update'] ) || $_POST['update'] !== 'true' ) { 524 return; 525 } 526 527 $sdcom_timestamp_post = get_post_meta( $post_id, 'sdcom_timestamp_post', true ); 528 529 // Bail early if the sdcom_timestamp_post post meta is not set. 530 if ( empty( $sdcom_timestamp_post ) ) { 531 return; 532 } 533 534 // Check if 'TCB_Post' class is in the extracted classes. 535 $has_tcb_post_class = in_array( 'TCB_Post', array_column( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), 'class' ), true ); 536 537 // Bail early if there is no TCB_Post class. 538 if ( ! $has_tcb_post_class ) { 539 return; 540 } 541 542 try { 543 $create_certificate = $this->create_certificate_post( $post ); 544 545 // Handle the case where the method returned false. 546 if ( $create_certificate === false ) { 547 throw new \Exception( 'Create certificate failed.' ); 548 } 549 550 $certificate_id = ! empty( $create_certificate->{'certificate'}->{'id'} ) ? $create_certificate->{'certificate'}->{'id'} : ''; 551 552 // Handle the case where the certificate id is empty. 553 if ( empty( $certificate_id ) ) { 554 throw new \Exception( 'Certificate id is empty.' ); 555 } 556 557 $update_certificate = $this->update_certificate_post( $post, $certificate_id ); 558 559 // Handle the case where the method returned false. 560 if ( $update_certificate === false ) { 561 throw new \Exception( 'Update certificate failed.' ); 562 } 563 564 // Bail early if the certificate id is empty. 565 if ( empty( $certificate_id ) ) { 566 throw new \Exception( 'Certificate id is empty.' ); 567 } 568 569 // Update the post meta with the new certificate id. 570 tve_update_post_meta( $post_id, 'sdcom_previous_certificate_id', $certificate_id ); 571 } catch ( \Exception $e ) { 572 // Handle the exception 573 error_log( 'An error occurred: ' . $e->getMessage() ); 574 } 575 } 576 577 /** 486 578 * Creates a certificate for a post. 487 579 * -
timestamps/tags/1.11.0/package-lock.json
r3199387 r3214331 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1.1 0.0",3 "version": "1.11.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "timestamps-plugin", 9 "version": "1.1 0.0",9 "version": "1.11.0", 10 10 "dependencies": { 11 11 "@supabase/supabase-js": "^2.39.3", -
timestamps/tags/1.11.0/package.json
r3199387 r3214331 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1.1 0.0",3 "version": "1.11.0", 4 4 "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.", 5 5 "homepage": "https://www.scoredetect.com/", -
timestamps/tags/1.11.0/readme.txt
r3199387 r3214331 1 === Timestamps – Blockchain Integration for WordPress ===1 === Timestamps – SEO-friendly Blockchain Integration for WordPress === 2 2 Contributors: scoredetect, xmic 3 3 Tags: timestamp, blockchain, content, authenticity, copyright 4 4 Requires at least: 6.0.0 5 Tested up to: 6.7 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.1 0.07 Stable tag: 1.11.0 8 8 License: AGPL-3.0-only 9 9 License URI: https://spdx.org/licenses/AGPL-3.0-only.html … … 16 16 ### SCOREDETECT: THE #1 WORDPRESS TIMESTAMPING PLUGIN 17 17 18 Since 2023, ScoreDetect has helped several users protect their digital assets and increase their content authenticity.18 Since 2023, ScoreDetect has helped several users and businesses protect their digital assets and increase their content authenticity. 19 19 20 20 Now, we are bringing the power to **WordPress** with the Timestamps plugin. With fresh features, an eco-friendly and secure blockchain, active plugin updates, and active customer support. … … 69 69 70 70 ### NEED HELP? 71 72 There are lots of Page Builders. We aim to make the plugin compatible with all of them. 73 You can view the documentation for your Page Builder on https://docs.scoredetect.com/ for instructions. 71 74 72 75 The plugin provides comprehensive customer support through email support@scoredetect.com. -
timestamps/tags/1.11.0/timestamps.php
r3199387 r3214331 9 9 * 10 10 * @link https://www.scoredetect.com/ 11 * @since 1.1 0.011 * @since 1.11.0 12 12 * @package SDCOM_Timestamps 13 13 * … … 15 15 * Plugin Name: Timestamps 16 16 * Description: Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed. 17 * Version: 1.1 0.017 * Version: 1.11.0 18 18 * Author: ScoreDetect.com 19 19 * Author URI: https://www.scoredetect.com/ … … 34 34 35 35 // Useful global constants. 36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.1 0.0' );36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.11.0' ); 37 37 define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' ); 38 38 define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) ); -
timestamps/trunk/includes/classes/Feature/Timestamp/Timestamp.php
r3199387 r3214331 75 75 // Oxygen Builder. 76 76 add_action( 'save_post', array( $this, 'save_post_meta_oxygenbuilder' ), 10, 2 ); 77 78 // Thrive Themes Architect Page Builder. 79 add_action( 'save_post', array( $this, 'save_post_meta_thrivethemesbuilder' ), 10, 2 ); 77 80 } 78 81 … … 484 487 485 488 /** 489 * Save post meta data during the Thrive Themes Architect Page Builder request. 490 * 491 * @param int $post_id The post ID. 492 * @param WP_Post $post The post object. 493 * @since 1.11.0 494 * @since Thrive Themes Architect Page Builder 10.4.2 495 * @return void 496 * @throws \Exception If an error occurs during the process. 497 */ 498 public function save_post_meta_thrivethemesbuilder( $post_id, $post ) { 499 500 // Bail early if it is a revision. 501 if ( wp_is_post_revision( $post_id ) ) { 502 return; 503 } 504 505 // Bail early if any function does not exist. 506 if ( ! function_exists( 'tve_get_post_meta' ) || ! function_exists( 'tve_update_post_meta' ) ) { 507 return; 508 } 509 510 $tcb_content = tve_get_post_meta( $post_id, 'tve_globals' ); 511 512 // Bail early if the tcb_content is empty. This means that the post is not created with Thrive Themes Architect. 513 if ( empty( $tcb_content ) ) { 514 return; 515 } 516 517 // Bail early if the user does not have the required capabilities. 518 if ( ! current_user_can( 'edit_post', $post_id ) ) { 519 return; 520 } 521 522 // Bail early if we are not updating the post. 523 if ( ! isset( $_POST['update'] ) || $_POST['update'] !== 'true' ) { 524 return; 525 } 526 527 $sdcom_timestamp_post = get_post_meta( $post_id, 'sdcom_timestamp_post', true ); 528 529 // Bail early if the sdcom_timestamp_post post meta is not set. 530 if ( empty( $sdcom_timestamp_post ) ) { 531 return; 532 } 533 534 // Check if 'TCB_Post' class is in the extracted classes. 535 $has_tcb_post_class = in_array( 'TCB_Post', array_column( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), 'class' ), true ); 536 537 // Bail early if there is no TCB_Post class. 538 if ( ! $has_tcb_post_class ) { 539 return; 540 } 541 542 try { 543 $create_certificate = $this->create_certificate_post( $post ); 544 545 // Handle the case where the method returned false. 546 if ( $create_certificate === false ) { 547 throw new \Exception( 'Create certificate failed.' ); 548 } 549 550 $certificate_id = ! empty( $create_certificate->{'certificate'}->{'id'} ) ? $create_certificate->{'certificate'}->{'id'} : ''; 551 552 // Handle the case where the certificate id is empty. 553 if ( empty( $certificate_id ) ) { 554 throw new \Exception( 'Certificate id is empty.' ); 555 } 556 557 $update_certificate = $this->update_certificate_post( $post, $certificate_id ); 558 559 // Handle the case where the method returned false. 560 if ( $update_certificate === false ) { 561 throw new \Exception( 'Update certificate failed.' ); 562 } 563 564 // Bail early if the certificate id is empty. 565 if ( empty( $certificate_id ) ) { 566 throw new \Exception( 'Certificate id is empty.' ); 567 } 568 569 // Update the post meta with the new certificate id. 570 tve_update_post_meta( $post_id, 'sdcom_previous_certificate_id', $certificate_id ); 571 } catch ( \Exception $e ) { 572 // Handle the exception 573 error_log( 'An error occurred: ' . $e->getMessage() ); 574 } 575 } 576 577 /** 486 578 * Creates a certificate for a post. 487 579 * -
timestamps/trunk/package-lock.json
r3199387 r3214331 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1.1 0.0",3 "version": "1.11.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "timestamps-plugin", 9 "version": "1.1 0.0",9 "version": "1.11.0", 10 10 "dependencies": { 11 11 "@supabase/supabase-js": "^2.39.3", -
timestamps/trunk/package.json
r3199387 r3214331 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1.1 0.0",3 "version": "1.11.0", 4 4 "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.", 5 5 "homepage": "https://www.scoredetect.com/", -
timestamps/trunk/readme.txt
r3199387 r3214331 1 === Timestamps – Blockchain Integration for WordPress ===1 === Timestamps – SEO-friendly Blockchain Integration for WordPress === 2 2 Contributors: scoredetect, xmic 3 3 Tags: timestamp, blockchain, content, authenticity, copyright 4 4 Requires at least: 6.0.0 5 Tested up to: 6.7 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.1 0.07 Stable tag: 1.11.0 8 8 License: AGPL-3.0-only 9 9 License URI: https://spdx.org/licenses/AGPL-3.0-only.html … … 16 16 ### SCOREDETECT: THE #1 WORDPRESS TIMESTAMPING PLUGIN 17 17 18 Since 2023, ScoreDetect has helped several users protect their digital assets and increase their content authenticity.18 Since 2023, ScoreDetect has helped several users and businesses protect their digital assets and increase their content authenticity. 19 19 20 20 Now, we are bringing the power to **WordPress** with the Timestamps plugin. With fresh features, an eco-friendly and secure blockchain, active plugin updates, and active customer support. … … 69 69 70 70 ### NEED HELP? 71 72 There are lots of Page Builders. We aim to make the plugin compatible with all of them. 73 You can view the documentation for your Page Builder on https://docs.scoredetect.com/ for instructions. 71 74 72 75 The plugin provides comprehensive customer support through email support@scoredetect.com. -
timestamps/trunk/timestamps.php
r3199387 r3214331 9 9 * 10 10 * @link https://www.scoredetect.com/ 11 * @since 1.1 0.011 * @since 1.11.0 12 12 * @package SDCOM_Timestamps 13 13 * … … 15 15 * Plugin Name: Timestamps 16 16 * Description: Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed. 17 * Version: 1.1 0.017 * Version: 1.11.0 18 18 * Author: ScoreDetect.com 19 19 * Author URI: https://www.scoredetect.com/ … … 34 34 35 35 // Useful global constants. 36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.1 0.0' );36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.11.0' ); 37 37 define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' ); 38 38 define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.