PluginProbe
Blocks CSS: CSS Editor for Gutenberg Blocks / 3.2.1
Blocks CSS: CSS Editor for Gutenberg Blocks v3.2.1
3.2.5 3.2.4 3.2.2 3.2.1 3.2.0 3.1.11 3.1.10 trunk 1.0.0 1.0.1 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.2 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.10 2.0.11 All 100 releases
blocks-css / blocks-css.php

blocks-css.php in Blocks CSS: CSS Editor for Gutenberg Blocks 3.2.1, at blocks-css.php

87 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Blocks CSS
4 *
5 * @package ThemeIsle\GutenbergBlocks\Blocks_CSS
6 * @copyright Copyright (c) 2019, Hardeep Asrani
7 * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
8 * @since 1.0.0
9 *
10 * Plugin Name: Blocks CSS: CSS Editor for Gutenberg Blocks
11 * Plugin URI: https://github.com/Codeinwp/otter-blocks
12 * Description: Blocks CSS allows you add custom CSS to your Blocks straight from the Block Editor (Gutenberg).
13 * Version: 3.2.1
14 * Author: ThemeIsle
15 * Author URI: https://themeisle.com
16 * Requires at least: 6.6
17 * License: GPL-3.0+
18 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
19 * Text Domain: blocks-css
20 * Domain Path: /languages
21 * WordPress Available: yes
22 * Requires License: no
23 */
24
25 // If this file is called directly, abort.
26 if ( ! defined( 'WPINC' ) ) {
27 die;
28 }
29
30 define( 'BLOCKS_CSS_URL', plugins_url( '/', __FILE__ ) );
31 define( 'BLOCKS_CSS_PATH', __DIR__ );
32 define( 'BLOCKS_CSS_PRODUCT_SLUG', basename( BLOCKS_CSS_PATH ) );
33
34 $vendor_file = BLOCKS_CSS_PATH . '/vendor/autoload.php';
35
36 if ( is_readable( $vendor_file ) ) {
37 require_once $vendor_file;
38 }
39
40 add_filter(
41 'themeisle_sdk_products',
42 function ( $products ) {
43 $products[] = __FILE__;
44
45 return $products;
46 }
47 );
48
49 add_action(
50 'plugins_loaded',
51 function () {
52 // call this only if Gutenberg is active.
53 if ( function_exists( 'register_block_type' ) ) {
54 require_once __DIR__ . '/class-blocks-css.php';
55
56 if ( class_exists( '\ThemeIsle\GutenbergBlocks\Blocks_CSS' ) ) {
57 \ThemeIsle\GutenbergBlocks\Blocks_CSS::instance();
58 }
59 }
60 }
61 );
62
63 add_filter(
64 'themeisle_sdk_blackfriday_data',
65 function ( $configs ) {
66 if ( defined( 'OTTER_BLOCKS_PATH' ) ) {
67 return $configs;
68 }
69
70 $config = $configs['default'];
71
72 // translators: 1. Number of free licenses, 2. The price of the product.
73 $config['message'] = sprintf( __( 'You’re using Blocks CSS, and the team behind it is celebrating Black Friday by giving away %1$s licences of Otter Pro. A powerful block collection worth %2$s, with advanced blocks, custom CSS, animations, and WooCommerce integration. Claim yours before they run out.', 'blocks-css' ), 100, '$69' );
74 $config['plugin_meta_message'] = __( 'Black Friday Sale - Get Otter Pro free', 'blocks-css' );
75 $config['sale_url'] = add_query_arg(
76 array(
77 'utm_term' => 'free',
78 ),
79 tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/otter-claim-bf', 'bfcm', 'blocks-css' ) )
80 );
81
82 $configs[ BLOCKS_CSS_PRODUCT_SLUG ] = $config;
83
84 return $configs;
85 }
86 );
87