kollapsminoriteten/wp-content/plugins/jetpack/extensions/blocks/simple-payments/simple-payments.php

29 lines
723 B
PHP
Raw Permalink Normal View History

2020-10-20 18:05:12 +02:00
<?php
/**
* Pay with PayPal block (aka Simple Payments).
*
* @since 9.0.0
*
2021-04-27 08:32:47 +02:00
* @package automattic/jetpack
2020-10-20 18:05:12 +02:00
*/
2025-08-27 08:44:30 +02:00
use Automattic\Jetpack\PaypalPayments\SimplePayments\Block;
2020-10-20 18:05:12 +02:00
2025-12-12 13:13:07 +01:00
if ( ! defined( 'ABSPATH' ) ) {
exit( 0 );
}
2025-08-27 08:44:30 +02:00
// Register the block
add_action( 'init', array( Block::class, 'register_block' ), 9 );
2020-10-20 18:05:12 +02:00
2025-08-27 08:44:30 +02:00
// Disable AMP for posts with the block.
add_filter( 'amp_skip_post', array( Block::class, 'amp_skip_post' ), 10, 3 );
2020-10-20 18:05:12 +02:00
2025-08-27 08:44:30 +02:00
// Load scripts for the editing interface
add_action( 'enqueue_block_editor_assets', array( Block::class, 'load_editor_scripts' ), 9 );
2022-04-02 10:26:41 +02:00
2025-08-27 08:44:30 +02:00
// Load styles in the editor iframe context
if ( is_admin() ) {
add_action( 'enqueue_block_assets', array( Block::class, 'load_editor_styles' ), 9 );
2020-11-18 09:10:44 +01:00
}