Plugin Directory

Changeset 3214331


Ignore:
Timestamp:
12/29/2024 06:54:53 AM (15 months ago)
Author:
xmic
Message:

Update to version 1.11.0 from GitHub

Location:
timestamps
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • timestamps/tags/1.11.0/includes/classes/Feature/Timestamp/Timestamp.php

    r3199387 r3214331  
    7575        // Oxygen Builder.
    7676        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 );
    7780    }
    7881
     
    484487
    485488    /**
     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    /**
    486578     * Creates a certificate for a post.
    487579     *
  • timestamps/tags/1.11.0/package-lock.json

    r3199387 r3214331  
    11{
    22  "name": "timestamps-plugin",
    3   "version": "1.10.0",
     3  "version": "1.11.0",
    44  "lockfileVersion": 3,
    55  "requires": true,
     
    77    "": {
    88      "name": "timestamps-plugin",
    9       "version": "1.10.0",
     9      "version": "1.11.0",
    1010      "dependencies": {
    1111        "@supabase/supabase-js": "^2.39.3",
  • timestamps/tags/1.11.0/package.json

    r3199387 r3214331  
    11{
    22  "name": "timestamps-plugin",
    3   "version": "1.10.0",
     3  "version": "1.11.0",
    44  "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.",
    55  "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 ===
    22Contributors: scoredetect, xmic
    33Tags: timestamp, blockchain, content, authenticity, copyright
    44Requires at least: 6.0.0
    5 Tested up to: 6.7
     5Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.10.0
     7Stable tag: 1.11.0
    88License: AGPL-3.0-only
    99License URI: https://spdx.org/licenses/AGPL-3.0-only.html
     
    1616### SCOREDETECT: THE #1 WORDPRESS TIMESTAMPING PLUGIN
    1717
    18 Since 2023, ScoreDetect has helped several users protect their digital assets and increase their content authenticity.
     18Since 2023, ScoreDetect has helped several users and businesses protect their digital assets and increase their content authenticity.
    1919
    2020Now, 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.
     
    6969
    7070### NEED HELP?
     71
     72There are lots of Page Builders. We aim to make the plugin compatible with all of them.
     73You can view the documentation for your Page Builder on https://docs.scoredetect.com/ for instructions.
    7174
    7275The plugin provides comprehensive customer support through email support@scoredetect.com.
  • timestamps/tags/1.11.0/timestamps.php

    r3199387 r3214331  
    99 *
    1010 * @link              https://www.scoredetect.com/
    11  * @since             1.10.0
     11 * @since             1.11.0
    1212 * @package           SDCOM_Timestamps
    1313 *
     
    1515 * Plugin Name:       Timestamps
    1616 * Description:       Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed.
    17  * Version:           1.10.0
     17 * Version:           1.11.0
    1818 * Author:            ScoreDetect.com
    1919 * Author URI:        https://www.scoredetect.com/
     
    3434
    3535// Useful global constants.
    36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.10.0' );
     36define( 'SDCOM_TIMESTAMPS_VERSION', '1.11.0' );
    3737define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' );
    3838define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) );
  • timestamps/trunk/includes/classes/Feature/Timestamp/Timestamp.php

    r3199387 r3214331  
    7575        // Oxygen Builder.
    7676        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 );
    7780    }
    7881
     
    484487
    485488    /**
     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    /**
    486578     * Creates a certificate for a post.
    487579     *
  • timestamps/trunk/package-lock.json

    r3199387 r3214331  
    11{
    22  "name": "timestamps-plugin",
    3   "version": "1.10.0",
     3  "version": "1.11.0",
    44  "lockfileVersion": 3,
    55  "requires": true,
     
    77    "": {
    88      "name": "timestamps-plugin",
    9       "version": "1.10.0",
     9      "version": "1.11.0",
    1010      "dependencies": {
    1111        "@supabase/supabase-js": "^2.39.3",
  • timestamps/trunk/package.json

    r3199387 r3214331  
    11{
    22  "name": "timestamps-plugin",
    3   "version": "1.10.0",
     3  "version": "1.11.0",
    44  "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.",
    55  "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 ===
    22Contributors: scoredetect, xmic
    33Tags: timestamp, blockchain, content, authenticity, copyright
    44Requires at least: 6.0.0
    5 Tested up to: 6.7
     5Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.10.0
     7Stable tag: 1.11.0
    88License: AGPL-3.0-only
    99License URI: https://spdx.org/licenses/AGPL-3.0-only.html
     
    1616### SCOREDETECT: THE #1 WORDPRESS TIMESTAMPING PLUGIN
    1717
    18 Since 2023, ScoreDetect has helped several users protect their digital assets and increase their content authenticity.
     18Since 2023, ScoreDetect has helped several users and businesses protect their digital assets and increase their content authenticity.
    1919
    2020Now, 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.
     
    6969
    7070### NEED HELP?
     71
     72There are lots of Page Builders. We aim to make the plugin compatible with all of them.
     73You can view the documentation for your Page Builder on https://docs.scoredetect.com/ for instructions.
    7174
    7275The plugin provides comprehensive customer support through email support@scoredetect.com.
  • timestamps/trunk/timestamps.php

    r3199387 r3214331  
    99 *
    1010 * @link              https://www.scoredetect.com/
    11  * @since             1.10.0
     11 * @since             1.11.0
    1212 * @package           SDCOM_Timestamps
    1313 *
     
    1515 * Plugin Name:       Timestamps
    1616 * Description:       Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed.
    17  * Version:           1.10.0
     17 * Version:           1.11.0
    1818 * Author:            ScoreDetect.com
    1919 * Author URI:        https://www.scoredetect.com/
     
    3434
    3535// Useful global constants.
    36 define( 'SDCOM_TIMESTAMPS_VERSION', '1.10.0' );
     36define( 'SDCOM_TIMESTAMPS_VERSION', '1.11.0' );
    3737define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' );
    3838define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.