| @@ -1,71 +1,57 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -defined('ABSPATH') or die("Jog on!"); | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * Plugin Name: Snippet Shortcodes | |
| 7 | - * Description: Create a library of custom shortcodes and reusable content, and seamlessly insert them into your posts and pages. | |
| 8 | - * Version: 5.2.1 | |
| 9 | - * Requires at least: 6.0 | |
| 10 | - * Tested up to: 7.0.1 | |
| 11 | - * Requires PHP: 8.1 | |
| 12 | - * Author: Ali Colville | |
| 13 | - * Author URI: https://www.YeKen.uk | |
| 14 | - * License: GPL v2 or later | |
| 15 | - * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| 16 | - * Text Domain: shortcode-variables | |
| 17 | - */ | |
| 18 | - | |
| 19 | -/* Copyright 2025 YeKen.uk | |
| 20 | - | |
| 21 | - This program is free software; you can redistribute it and/or modify | |
| 22 | - it under the terms of the GNU General Public License, version 2, as | |
| 23 | - published by the Free Software Foundation. | |
| 24 | - | |
| 25 | - This program is distributed in the hope that it will be useful, | |
| 26 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 27 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 28 | - GNU General Public License for more details. | |
| 29 | - | |
| 30 | - You should have received a copy of the GNU General Public License | |
| 31 | - along with this program; if not, write to the Free Software | |
| 32 | - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 33 | -*/ | |
| 34 | - | |
| 35 | -define( 'SH_CD_ABSPATH', plugin_dir_path( __FILE__ ) ); | |
| 36 | -define( 'SH_CD_PLUGIN_VERSION', '5.2.1' ); | |
| 37 | -define( 'SH_CD_PLUGIN_NAME', 'Snippet Shortcodes' ); | |
| 38 | -define( 'SH_CD_TABLE', 'SH_CD_SHORTCODES' ); | |
| 39 | -define( 'SH_CD_TABLE_MULTISITE', 'SH_CD_SHORTCODES_MULTISITE' ); | |
| 40 | -define( 'SH_CD_TABLE_REVISIONS', 'SH_CD_SHORTCODES_REVISIONS' ); | |
| 41 | -define( 'SH_CD_SLUG', 'sh-cd-shortcode-variables' ); | |
| 42 | -define( 'SH_CD_PREFIX', 'sh-cd-' ); | |
| 43 | -define( 'SH_CD_SHORTCODE', 'sv' ); | |
| 44 | -define( 'SH_CD_UPGRADE_LINK', 'https://shop.yeken.uk/product/shortcode-variables/' ); | |
| 45 | -// Note: SH_CD_GET_PREMIUM_LINK is detected by the Premium plugin to determine if the main plugin is enabled. | |
| 46 | -// Do not remove or rename the constant. | |
| 47 | -define( 'SH_CD_GET_PREMIUM_LINK', 'https://snippetshortcodes.yeken.uk/download/' ); | |
| 48 | -define( 'SH_CD_YEKEN_UPDATES_URL', 'https://yeken.uk/downloads/_updates/shortcode-variables.json' ); | |
| 49 | -define( 'SH_CD_YEKEN_PREMIUM_RELEASE_MANIFEST', 'https://snippetshortcodes.yeken.uk/wp-content/plugins/snippet-shortcodes-premium/release.json' ); | |
| 50 | - | |
| 51 | -add_action( 'plugins_loaded', function() { | |
| 52 | - | |
| 53 | - include_once SH_CD_ABSPATH . 'includes/functions.php'; | |
| 54 | - include_once SH_CD_ABSPATH . 'includes/class.presets.php'; | |
| 55 | - include_once SH_CD_ABSPATH . 'includes/hooks.php'; | |
| 56 | - include_once SH_CD_ABSPATH . 'includes/db.php'; | |
| 57 | - include_once SH_CD_ABSPATH . 'includes/marketing.php'; | |
| 58 | - include_once SH_CD_ABSPATH . 'includes/shortcode.marketing.php'; | |
| 59 | - include_once SH_CD_ABSPATH . 'includes/shortcode.user.php'; | |
| 60 | - include_once SH_CD_ABSPATH . 'includes/shortcode.presets.core.php'; | |
| 61 | - include_once SH_CD_ABSPATH . 'includes/shortcode.presets.free.php'; | |
| 62 | - include_once SH_CD_ABSPATH . 'includes/pages/page.list.php'; | |
| 63 | - include_once SH_CD_ABSPATH . 'includes/pages/page.premade.php'; | |
| 64 | - include_once SH_CD_ABSPATH . 'includes/pages/page.edit.php'; | |
| 65 | - include_once SH_CD_ABSPATH . 'includes/pages/page.upgrade.php'; | |
| 66 | - include_once SH_CD_ABSPATH . 'includes/pages/page.settings.php'; | |
| 67 | - include_once SH_CD_ABSPATH . 'includes/pages/page.help.php'; | |
| 68 | - include_once SH_CD_ABSPATH . 'includes/pages/page.import.php'; | |
| 69 | - include_once SH_CD_ABSPATH . 'includes/tinymce.php'; | |
| 70 | - include_once SH_CD_ABSPATH . 'includes/gutenberg.php'; | |
| 71 | -}); | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +defined('ABSPATH') or die("Jog on!"); | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Plugin Name: Shortcode Variables | |
| 7 | + * Description: Create your own shortcodes and assign text / variables to it or use our premade ones. You can then embed these shortcodes throughout your entire site and only have to change the value in one place. | |
| 8 | + * Version: 1.7 | |
| 9 | + * Author: YeKen | |
| 10 | + * Author URI: http://www.YeKen.uk | |
| 11 | + * License: GPL2 | |
| 12 | + * Text Domain: shortcode-variables | |
| 13 | + */ | |
| 14 | +/* Copyright 2016 YeKen.uk | |
| 15 | + | |
| 16 | + This program is free software; you can redistribute it and/or modify | |
| 17 | + it under the terms of the GNU General Public License, version 2, as | |
| 18 | + published by the Free Software Foundation. | |
| 19 | + | |
| 20 | + This program is distributed in the hope that it will be useful, | |
| 21 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 22 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 23 | + GNU General Public License for more details. | |
| 24 | + | |
| 25 | + You should have received a copy of the GNU General Public License | |
| 26 | + along with this program; if not, write to the Free Software | |
| 27 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 28 | +*/ | |
| 29 | + | |
| 30 | +define('SH_CD_ABSPATH', plugin_dir_path( __FILE__ )); | |
| 31 | + | |
| 32 | +define('SH_CD_PLUGIN_VERSION', '1.7'); | |
| 33 | + | |
| 34 | +// ----------------------------------------------------------------------------------------- | |
| 35 | +// Activation - create table | |
| 36 | +// ----------------------------------------------------------------------------------------- | |
| 37 | + | |
| 38 | +register_activation_hook( __FILE__, 'sh_cd_create_database_table'); | |
| 39 | + | |
| 40 | +// ----------------------------------------------------------------------------------------- | |
| 41 | +// AC: Include all relevant PHP files | |
| 42 | +// ----------------------------------------------------------------------------------------- | |
| 43 | + | |
| 44 | +include SH_CD_ABSPATH . 'includes/globals.php'; | |
| 45 | +include SH_CD_ABSPATH . 'includes/hooks.php'; | |
| 46 | +include SH_CD_ABSPATH . 'includes/pages.php'; | |
| 47 | +include SH_CD_ABSPATH . 'includes/functions.php'; | |
| 48 | +include SH_CD_ABSPATH . 'includes/shortcode.php'; | |
| 49 | +include SH_CD_ABSPATH . 'includes/shortcode-premade.php'; | |
| 50 | +// ----------------------------------------------------------------------------------------- | |
| 51 | +// AC: Load relevant language files | |
| 52 | +// ----------------------------------------------------------------------------------------- | |
| 53 | +load_plugin_textdomain( SH_CD_SLUG, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); | |
| 54 | + | |
| 55 | +// ----------------------------------------------------------------------------------------- | |
| 56 | +// AC: DEV Stuff here (!!!! REMOVE !!!!) | |
| 57 | +// ----------------------------------------------------------------------------------------- | |