Repository navigation
Expand file tree
/
Copy pathpnscripts-tabcrest.php
More file actions
61 lines (54 loc) · 2.49 KB
/
Copy pathpnscripts-tabcrest.php
File metadata and controls
61 lines (54 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Plugin Name: PN Scripts Tabcrest – Custom Product Tabs & FAQ
* Plugin URI: https://pnscripts.com/marketplace/pnscripts-tabcrest
* Description: Custom product tabs per product, reusable global tabs by category or tag, FAQ tabs with optional FAQPage schema, rename, reorder or hide the default tabs, and a one-click importer from YIKES Custom Product Tabs. Works in classic and block themes.
* Version: 1.0.5
* Requires at least: 6.5
* Requires PHP: 8.1
* Requires Plugins: woocommerce
* WC requires at least: 9.0
* WC tested up to: 11.1
* Author: PN Scripts
* Author URI: https://pnscripts.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: pnscripts-tabcrest
* Domain Path: /languages
*
* @package Pnscripts\ProductTabs
*/
/*
* Copyright (C) 2026 ПН СКРИПТС ЕООД (PN Scripts)
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
declare(strict_types=1);
defined( 'ABSPATH' ) || exit;
define( 'PNSCRIPTS_PRODUCT_TABS_VERSION', '1.0.5' );
define( 'PNSCRIPTS_PRODUCT_TABS_FILE', __FILE__ );
define( 'PNSCRIPTS_PRODUCT_TABS_DIR', plugin_dir_path( __FILE__ ) );
define( 'PNSCRIPTS_PRODUCT_TABS_URL', plugin_dir_url( __FILE__ ) );
define( 'PNSCRIPTS_PRODUCT_TABS_MIN_WC', '9.0' );
spl_autoload_register(
static function ( string $class_name ): void {
$prefix = 'Pnscripts\\ProductTabs\\';
if ( 0 !== strpos( $class_name, $prefix ) ) {
return;
}
$relative = substr( $class_name, strlen( $prefix ) );
$file = PNSCRIPTS_PRODUCT_TABS_DIR . 'src/' . str_replace( '\\', '/', $relative ) . '.php';
if ( is_readable( $file ) ) {
require_once $file;
}
}
);
register_activation_hook( __FILE__, array( \Pnscripts\ProductTabs\Lifecycle::class, 'activate' ) );
add_action( 'before_woocommerce_init', array( \Pnscripts\ProductTabs\Lifecycle::class, 'declare_compatibility' ) );
add_action( 'plugins_loaded', array( \Pnscripts\ProductTabs\Plugin::class, 'boot' ), 20 );