%s
', wp_kses_post( $title ) ); if ( ! empty( $text ) ) { $html .= sprintf( '- ';
foreach ( $features as $feature ) {
$html .= sprintf(
'
- %s ', wp_kses_post( $feature ) ); } $html .= '
readme.txt 0000644 00000051053 15021200650 0006535 0 ustar 00 === WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager ===
Contributors: WPbeginner, smub, gripgrip, wpcodeteam
Tags: code, css, php, header, code snippets
Requires at least: 4.6
Tested up to: 6.7
Requires PHP: 5.5
Stable tag: 2.2.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert ads pixel code, and more.
== Description ==
= Insert Headers & Footers + Full WordPress Code Snippets Plugin =
[WPCode](https://wpcode.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin) (formerly known as Insert Headers and Footers by WPBeginner) is the most popular code snippets plugin for WordPress used by over 2 million websites.
We make it easy for you to add code snippets in WordPress without having to edit your theme's functions.php file.
Our simple insert headers and footers interface allows you to insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site's header and footer as well other areas of your website. No need to edit your theme files!
Aside from Header and Footer scripts, you can also use WPCode to insert custom PHP code snippets, JavaScript code snippets, CSS code snippets, HTML code snippets, and text snippets with full conditional logic support.
We took the pain out of adding custom code snippets in WordPress and made it easy.
> I have been using Insert Headers and Footers and it is such a useful tool. Super helpful and the very best of its kind. Highly recommend
> The_Gibble - WordPress user
= Quick Overview of WPCode from WPBeginner =
https://www.youtube.com/watch?v=Fo-7MKRRUec
> Introducing New WPCode Pro
> While WPCode Lite offers tons of powerful features for free, we listened to user feedback and created WPCode Pro with even more amazing features to improve your workflow. This includes smart conditional logic, saving code snippets to cloud library, code revisions, page-specific snippets, deeper integration with popular plugins like WooCommerce, Easy Digital Downloads, and so much more. [Click here to purchase the best premium WordPress code snippet plugin now!](https://wpcode.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin)
= Future Proof Code Snippet Management =
Most [WordPress tutorial websites](https://www.wpbeginner.com/category/wp-tutorials/) ask you to add code snippets to your theme's functions.php file. This makes managing code snippets messy, and it also prevents you from updating your theme.
If you ever update your theme or switch to another theme, then you will lose all custom code functions that you added in your functions.php file.
WPCode solves this by providing you an easy way to insert header and footer scripts along with other code snippets directly from your WordPress dashboard. These code snippets actually run as if they were in your theme's functions.php file.
Our smart code snippet validation helps you prevent common code errors to ensure you never break your website when adding code snippets or header and footer scripts.
New WPCode Cloud Library even allows you to store all your custom code snippets in a cloud library, so you can easily re-use code snippets across multiple website projects and save time. You can keep your code snippets completely private or [share it with the community](https://library.wpcode.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin) to give back while boosting your social profile.
> This plugin allows me to not only add things to my site whenever needed, but it takes me only seconds to accomplish it.
> David Weber - WordPress user
= Full Code Snippets Library and Code Generators =
Ever wanted a central place to find all the most popular WordPress code snippets that are tested and proven to work?
When we started Insert Headers and Footers plugin, we did too. So we built a WordPress code snippets library right inside the WPCode plugin.
You will find verified PHP code snippets for popular feature requests like disable REST API, disable XML-RPC, disable comments, allow SVG file uploads, disable Gutenberg, add Classic Editor, and more without installing separate plugins for each.
> I was very hesitant to get into any of the code for my website. Your plugin made it easy for me to do.
> Conbrio75 - WordPress user
We also built the ability to save your code snippets to [WPCode Cloud Library](https://library.wpcode.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin), so you can easily re-use it on your other websites, client projects, or even share it with the larger community.
WPCode Cloud Library helps you better organize your code snippets in one central location, so you can save more time and speed up your workflow when managing websites. No more wasting time looking for custom notes or Github gists.
Aside from our growing code snippets library, we also have WordPress code generators to help you quickly get ready-to-use custom code using the latest WordPress coding standards and API's.
= Conditional Logic for Code Snippets + Code Insertion Priority =
Our goal with WPCode was to create a WordPress code snippets plugin that's both EASY and POWERFUL.
That's why aside from our global header and footer scripts, we added advanced features like conditional logic for code snippets and made it easy.
Instead of learning WordPress conditional logic queries, you can use our beginner-friendly conditional logic user interface to:
* Load code snippets for logged in users only
* Load PHP code snippets for specific user roles
* Load PHP code snippets only on specific page URLs
* Insert header and footer pixel scripts on specific pages
* Show code snippets based on type of page
* Run code snippet only on certain post types
* Load header and footer code snippet based on referrer source
* and more...
We also added both automatic code insertion and manual code output using shortcodes.
Our Auto Insert feature allows you to run the code snippet everywhere or choose from custom options like:
* Run code snippet only on frontend
* Run code snippet only in WordPress admin area
* Add header and footer scripts sitewide
* Insert PHP code snippet before or after post content
* Insert code snippet before or after specific paragraph
* Insert code snippet on specific archive pages
* Insert code snippets after specific WooCommerce function ([Pro Feature](https://wpcode.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteplugin))
Aside from that, we also added a visual code snippet priority system, so you can choose the order for your custom functions to avoid code conflict.
> This is such a useful plugin! It makes it so much easier to include things on your website!
> Understoryliving - WordPress user
And for even more flexibility and customization, we have added the ability for you to add page-specific code snippets right from the WordPress classic editor as well as the Gutenberg editor. You can even load code snippets based on device type such as mobile only code snippets, desktop only code snippets, etc.
= Import and Export Code Snippets =
Managing multiple websites or developing in a staging environment?
We offer an easy way to import and export your custom code snippets, functions, and header and footer scripts to help you save time.
You can also save your code snippets to WPCode Cloud (Pro feature), so you can easily re-use the same code snippets across multiple websites. This also allows you to better organize your code snippets instead of wasting time searching for random Github gists.
> Simple plugin I use in quite every site. Very useful to insert scripts and tags.
> tommasoperego - WordPress user
= Full WPCode Feature List =
The simple interface of WPCode plugin (formerly known as Insert Headers and Footers) gives you one place where you can insert header and footer scripts as well as custom code snippets rather than dealing with dozens of different plugins.
Below is a full list of WPCode features:
* Quick to set up
* Unlimited code snippets
* Simple to insert header and footer scripts globally
* Beginner Friendly Code Editor with Syntax Highlighter for PHP, JavaScript, and HTML
* Smart Code Validation to Prevent PHP Errors
* Insert header code and/or footer code using Conditional Logic
* Add Google Analytics code to header and footer
* Add custom CSS code to any theme
* Insert Facebook pixel code in header and footer
* Insert any code or script, including HTML and Javascript
* Insert PHP Code Snippets
* Ready-made Code Snippet Library
* Custom WordPress Code Snippet Generator
* Show or Hide PHP Code Snippets based on conditional logic
* Run PHP code and custom code snippets everywhere or in select areas using smart auto-insert rules.
* Manually insert PHP code snippets using shortcodes anywhere on website
* Add Rich Text Ads and Content Snippets automatically on posts & pages.
* Export / Import Code Snippets
* New Save snippets to Cloud Library - All your snippets stored in your private code snippet cloud.
* New Deep integrations with Gutenberg, WooCommerce, and more.
* Device specific code snippets (such as load code snippets on mobile only, desktop only, etc)
* and more features coming soon.
= Credits =
Insert Headers and Footers plugin was first created by [Syed Balkhi](https://syedbalkhi.com/) and the [WPBeginner](http://www.wpbeginner.com/) team in 2011.
It was later rebranded to WPCode in 2022 by Syed Balkhi to add powerful code snippets features that users were requesting for.
= Branding Guideline =
WPCode™ is a trademark of WPCode LLC. When writing about the Insert Headers and Footers - Code Snippets plugin by WPCode, please make sure to uppercase the initial 3 letters.
WPCode (correct)
WP Code (incorrect)
wpcode (incorrect)
wp code snippets (incorrect)
== Installation ==
1. Install WPCode - Insert Headers, Footers, and Code Snippets plugin by uploading the `insert-headers-and-footers` directory to the `/wp-content/plugins/` directory. (See instructions on how to install a WordPress plugin.)
2. Activate WPCode - Insert Headers, Footers, and Code Snippets plugin through the `Plugins` menu in WordPress.
3. Insert code in your header and footer or add custom code snippets by going to the `Code Snippets` menu.
[youtube https://www.youtube.com/watch?v=QXbrdVjWaME]
== Screenshots ==
1. WordPress Code Snippets Management Screen
2. Ready-Made Code Snippets Library
3. Edit PHP Snippets with Code Syntax Highlighter
4. Show / Hide Code Snippets with Smart Conditional Logic
5. Custom WordPress Code Generators
6. Example of Custom Post Type Generator
7. Insert Header and Footer Scripts Globally
8. Import and Export Code Snippets
9. Private Snippets Library In Plugin
10. Page-Specific Scripts Metabox
== Frequently Asked Questions ==
= Can I use WPCode - Insert Headers and Footers to install Google Analytics? =
Yes, you can insert your Google Analytics code in the `Scripts in Header` field.
= Can I use WPCode - Insert Headers and Footers for Google AdSense? =
Yes, to verify your account or to tag your page for Auto ads, paste the code AdSense gives you, into the Scripts in Header field.
= Will I lose my snippets if I change my WordPress theme? =
No, the idea behind WPCode - Insert Headers, Footers, and Code Snippets plugin is so you can safely add code snippets.
All code snippets are stored in the WordPress database, independent of the theme upgrades.
= Can I switch back to the old version of Insert Headers and Footers? =
Yes, if you don't want the advanced code snippets functionality, then you can switch back to the old Insert Headers and Footers features by simply going to the Settings Menu and clicking on the Headers & Footers mode.
= What Type of Code Snippets can I add? =
With WPCode, you can add any type of code snippet that you would otherwise add in your theme's functions.php file or in a site-specific plugin.
This includes custom PHP snippets, JavaScript snippets, HTML snippet, CSS snippets, Text Snippets, Conversion pixels, Tracking scripts, AdSense or other banner ads code, and more.
= What are some example plugins WPCode can replace? =
WPCode comes with a ready-made code snippets library that allows you to replace several popular plugins including:
* Disable Comment plugins
* Disable XML-RPC plugins
* Disable Rest API plugins
* Disable Gutenberg plugins
* Classic Editor plugin
* Allow SVG File Upload plugins
* Disable RSS feed plugins
* Disable Search plugins
* Disable Automatic Updates plugins
* Disable Admin Bar plugins
* Disable Widget Blocks plugin
* Classic Widgets plugin
* Remove WordPress Version Number plugins
* Google Analytics plugins
* Facebook Pixel plugins
* Google AdSense plugins
* Custom Post Types UI plugins
* Other WordPress Generator plugins
... and basically any plugin that adds a functionality which can be added via custom code snippets.
== Changelog ==
= 2.2.7 =
* New: Added support for automatically importing snippets from 2 new plugins.
= 2.2.6 =
* New: Easily find where your snippet is used as a shortcode with our new shortcode finder tool. 1-click search through your site.
* New: Improved editor for snippet notes. You can now add links and format text with a WYSIWYG editor.
* New: Snippet notes column. Display the notes for each snippet in the list of snippets.
* Fix: We improved the code snippets list filtering in the admin to avoid issues when JS errors are encountered on the page from other scripts.
= 2.2.5 =
* New: We added a new way to quickly filter snippets by code type in the list of snippets.
* Tweak: Prevent content_save_pre from modifying snippet code.
= 2.2.4.1 =
* Fix: Shortcode attributes variables were not being set correctly.
= 2.2.4 =
* Tweak: We adjusted the way our plugin adds a version-specific body class to avoid conflicts with other plugins.
* Tweak: We improved the way custom PHP code is executed to avoid conflicts with variables in snippets.
* Fix: When removing the last Conditional Logic group the rule selector was no longer working.
= 2.2.3.1 =
* Tweak: Updated the way we load translatable strings in some components for compatibility with WordPress 6.7.
= 2.2.3 =
* Tweak: We updated the way we validate PHP snippets when making an edit to an active snippet for better feedback when debugging.
* Tweak: We replaced a dependency (SweetAlert2) for a more lightweight alternative to improve performance.
= 2.2.2 =
* New: The Add Snippet screen now makes it easier to get started with more than just our library of snippets, choose from expert-picked snippets, snippet generators or plugin-specific snippets.
* New: We updated the code type picker for more clarity on what each code type is useful for and the last code type you used is now saved for a streamlined experience when adding multiple snippets.
* Tweak: We extended the unfiltered HTML permissions notice when the DISALLOW_UNFILTERED_HTML constant is defined to add more clarity.
= 2.2.1 =
* Fix: We fixed a bug that was causing the selected conditional logic operator to not be displayed correctly for some rules.
* Fix: The auto-insert location picker was not opening again in some situations.
= 2.2.0 =
* New: We updated the conditional logic rules picker for more clarity and ease of use.
* New: We expanded our automatic cache clearing to include the Swift Performance plugin.
* Tweak: The Page URL conditional logic option now supports query params and wp-admin URLs.
= 2.1.14 =
* New: When making changes to the Global Header & Footer WPCode will attempt to automatically clear page cache for popular caching plugins.
* New: Save your snippet with a keyboard shortcut by pressing CTRL+S (Windows) or CMD+S (Mac) in the snippet editor.
* Tweak: Prevent error when TinyMCE is disabled by other plugins.
= 2.1.13 =
* New: We added admin-specific locations for header and footer to streamline customizations in the wp-admin area.
* New: The code editor height can now be adjusted directly from the snippet editor screen. Auto-height is still available as an option on the settings page.
* Fix: When making changes to a snippet, the function to prevent you from navigating away was no longer working.
= 2.1.12 =
* New: We added a new way to execute PHP snippets "On Demand" - look for the "On Demand" location in the Auto Insert settings.
* Tweak: We added checks in place to prevent malicious code patterns from being used in WPCode.
* Fix: We fixed a bug where the conditional logic for logged-in users was not being saved correctly the first time.
= 2.1.11 =
* Tweak: We improved the admin bar menu to fix an JS error in some scenarios and a html validation issue.
* Tweak: We added support for importing snippets from the Code Snippets Pro plugin.
* Fix: We fixed an issue with importing CSS snippets.
= 2.1.10 =
* New: When another user is editing the same snippet, we now show a warning to avoid conflicts.
* Tweak: Improved mobile styles across the plugin admin for better readability.
= 2.1.9 =
* New: Conditional logic rule for Blog home page (posts page)
* Tweak: Improved the connect to library flow to avoid the connect window from getting blocked.
* Fix: Author archive condition was not working as intended.
= 2.1.8 =
* Tweak: We changed the way the code generators are loaded to improve performance overall.
* Tweak: We changed the way translations are loaded for better performance.
= 2.1.7 =
* New: WPCode now has a Dark Mode for those late night coding sessions. Enable it on the settings page.
* Tweak: We improved the way the error messages are displayed in the snippet editor for more clarity.
* Fix: The snippet editor was no longer running syntax checks for PHP snippets upon activation.
* Fix: We fixed a bug where in certain versions of Safari the auto-insert location was being unset when saving a snippet.
= 2.1.6 =
* New: We added the option to delete all the plugin data on uninstall.
* Fix: The code of duplicated snippets was sometimes removing some slashes.
* Fix: Error count was not correctly updated when snippets were trashed or deleted.
= 2.1.5 =
* New: Priority column added to the list of snippets, order by snippet priority.
* Fix: Fixed a notice that was being thrown in new sites when running the installation routines.
* Fix: Filtering by tag or location in the list of snippets was not working correctly.
= 2.1.4.1 =
* Fix: Avoid notices for errors that don't include the file parameter.
* Fix: Improve compatibility with PHP 8.2 for the snippet cache class.
= 2.1.4 =
* New: Enhanced error tracking: Errors generated by PHP snippets on your website will be displayed within the snippet's context, simplifying the debugging process.
* New: We've refined the snippet auto-deactivation process. Now, only snippets that produce fatal errors in the admin section will be deactivated. All other errors will be reported through the newly implemented error tracker.
* New: We introduced three new columns to the snippet list: ID, Code Type, and Shortcode.
* Tweak: We've enhanced our file caching mechanism to prevent redundant requests in scenarios where files aren't written properly due to certain setups.
* Tweak: We've implemented an additional check to ensure that closing PHP tags don't disrupt the execution of snippets.
* Fix: We've corrected the sorting of snippets when arranged by their last updated date.
= 2.1.3.1 =
* Fix: Shortcode attributes were not being correctly parsed in some scenarios.
= 2.1.3 =
* New: We improved how we manage automatic snippet disabling when errors occur. You'll now get detailed insights into which snippet is responsible for the error and the exact line where the problem occurred.
* Tweak: We adjusted the way snippets are preloaded to improve compatibility with object cache.
* Fix: The snippets added as shortcodes were not correctly displayed in the admin bar.
= 2.1.2 =
* Tweak: We adjusted the way snippets are tracked in the Admin Bar Code Spotter to avoid wrong numbers in certain locations.
* Tweak: We improved the way the Admin Bar Code Spotter menu is loaded for better compatibility with other plugins and older themes.
* Tweak: Changed the way assets used by the admin bar are loaded to avoid errors if the head is loaded multiple times.
= 2.1.1 =
* New: Easily duplicate a snippet with all of its settings with the new Duplicate link in the list of snippets.
* Fix: Taxonomy page conditional logic was not being correctly assigned for category and tags archives.
* Tweak: Adjust admin bar markup to avoid using a heading.
= 2.1.0 =
* New: See exactly which scripts and snippets are loaded on the current page with the WPCode admin bar info menu.
* Tweak: Minor update to connect process.
ihaf.php 0000644 00000031606 15021200650 0006161 0 ustar 00
%1$s
%2$s
', esc_html__( 'Heads up!', 'insert-headers-and-footers' ), esc_html__( 'Your site already has WPCode Pro activated. If you want to switch to WPCode Lite, please first go to Plugins → Installed Plugins and deactivate WPCode. Then, you can activate WPCode Lite.', 'insert-headers-and-footers' ) ); if ( isset( $_GET['activate'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended } unset( $wpcode_lite_just_activated, $wpcode_lite_just_deactivated ); } } add_action( 'admin_notices', 'wpcode_lite_notice' ); // Do not process the plugin code further. return; } /** * Main WPCode Class */ class WPCode { /** * Holds the instance of the plugin. * * @since 2.0.0 * * @var WPCode The one true WPCode */ private static $instance; /** * Plugin version. * * @since 2.0.0 * * @var string */ public $version = ''; /** * The auto-insert instance. * * @var WPCode_Auto_Insert */ public $auto_insert; /** * The snippet execution instance. * * @var WPCode_Snippet_Execute */ public $execute; /** * The error handling instance. * * @var WPCode_Error */ public $error; /** * The conditional logic instance. * * @var WPCode_Conditional_Logic */ public $conditional_logic; /** * The conditional logic instance. * * @var WPCode_Snippet_Cache */ public $cache; /** * The snippet library. * * @var WPCode_Library */ public $library; /** * The Snippet Generator. * * @var WPCode_Generator */ public $generator; /** * The plugin settings. * * @var WPCode_Settings */ public $settings; /** * The plugin importers. * * @var WPCode_Importers */ public $importers; /** * The file cache class. * * @var WPCode_File_Cache */ public $file_cache; /** * The notifications instance (admin-only). * * @var WPCode_Notifications */ public $notifications; /** * The admin page loader. * * @var WPCode_Admin_Page_Loader */ public $admin_page_loader; /** * The library auth instance. * * @var WPCode_Library_Auth */ public $library_auth; /** * The admin notices instance. * * @var WPCode_Notice */ public $notice; /** * Instance for logging errors. * * @var WPCode_File_Logger */ public $logger; /** * Load the smart tags. * * @var WPCode_Smart_Tags */ public $smart_tags; /** * Main instance of WPCode. * * @return WPCode * @since 2.0.0 */ public static function instance() { if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WPCode ) ) { self::$instance = new WPCode(); } return self::$instance; } /** * Constructor. */ private function __construct() { $this->setup_constants(); $this->includes(); add_action( 'plugins_loaded', array( $this, 'load_components' ), - 1 ); } /** * Set up global constants. * * @return void */ private function setup_constants() { define( 'WPCODE_FILE', __FILE__ ); $plugin_headers = get_file_data( WPCODE_FILE, array( 'version' => 'Version' ) ); define( 'WPCODE_VERSION', $plugin_headers['version'] ); define( 'WPCODE_PLUGIN_BASENAME', plugin_basename( WPCODE_FILE ) ); define( 'WPCODE_PLUGIN_URL', plugin_dir_url( WPCODE_FILE ) ); define( 'WPCODE_PLUGIN_PATH', plugin_dir_path( WPCODE_FILE ) ); $this->version = WPCODE_VERSION; } /** * Require the files needed for the plugin. * * @return void */ private function includes() { // Load the safe mode logic first. require_once WPCODE_PLUGIN_PATH . 'includes/safe-mode.php'; // Plugin helper functions. require_once WPCODE_PLUGIN_PATH . 'includes/helpers.php'; // Functions for global headers & footers output. require_once WPCODE_PLUGIN_PATH . 'includes/global-output.php'; // Use the old class name for backwards compatibility. require_once WPCODE_PLUGIN_PATH . 'includes/legacy.php'; // Add backwards compatibility for older versions of PHP or WP. require_once WPCODE_PLUGIN_PATH . 'includes/compat.php'; // Register code snippets post type. require_once WPCODE_PLUGIN_PATH . 'includes/post-type.php'; // The snippet class. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-snippet.php'; // Auto-insert options. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-auto-insert.php'; // Execute snippets. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-snippet-execute.php'; // Handle PHP errors. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-error.php'; // [wpcode] shortcode. require_once WPCODE_PLUGIN_PATH . 'includes/shortcode.php'; // Conditional logic. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-conditional-logic.php'; // Snippet Cache. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-snippet-cache.php'; // Settings class. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-settings.php'; // Custom capabilities. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-capabilities.php'; // Map capabilities for backwards compatibility. require_once WPCODE_PLUGIN_PATH . 'includes/capabilities.php'; // Install routines. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-install.php'; // Logging class. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-file-logger.php'; // Smart tags class. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-smart-tags.php'; // Admin bar info class. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-admin-bar-info.php'; if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { require_once WPCODE_PLUGIN_PATH . 'includes/icons.php'; // This is not needed in the frontend atm. // Code Editor class. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-code-editor.php'; require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-admin-page-loader.php'; require_once WPCODE_PLUGIN_PATH . 'includes/admin/admin-scripts.php'; require_once WPCODE_PLUGIN_PATH . 'includes/admin/admin-ajax-handlers.php'; // Always used just in the backend. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-generator.php'; // Snippet Library. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-library.php'; // Authentication for the library site. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-library-auth.php'; // Importers. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-importers.php'; // File cache. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-file-cache.php'; // The docs. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-docs.php'; // Notifications class. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-notifications.php'; // Upgrade page. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-upgrade-welcome.php'; // Metabox class. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-metabox-snippets.php'; // Metabox class. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-admin-notice.php'; // Ask for some love. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-review.php'; // Suggest free plugins. require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-suggested-plugins.php'; } // Load lite-specific files. require_once WPCODE_PLUGIN_PATH . 'includes/lite/loader.php'; } /** * Load the Generator on demand. * * @return WPCode_Generator */ public function generator() { if ( ! isset( $this->generator ) ) { $this->generator = new WPCode_Generator(); } return $this->generator; } /** * Load components in the main plugin instance. * * @return void */ public function load_components() { $this->auto_insert = new WPCode_Auto_Insert(); $this->execute = new WPCode_Snippet_Execute(); $this->error = new WPCode_Error(); $this->conditional_logic = new WPCode_Conditional_Logic(); $this->cache = new WPCode_Snippet_Cache(); $this->settings = new WPCode_Settings(); $this->logger = new WPCode_File_Logger(); if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { $this->file_cache = new WPCode_File_Cache(); $this->library = new WPCode_Library(); $this->library_auth = new WPCode_Library_Auth(); $this->importers = new WPCode_Importers(); $this->notifications = new WPCode_Notifications(); $this->admin_page_loader = new WPCode_Admin_Page_Loader_Lite(); $this->notice = new WPCode_Notice(); $this->smart_tags = new WPCode_Smart_Tags_Lite(); // Metabox class. new WPCode_Metabox_Snippets_Lite(); // Usage tracking class. new WPCode_Usage_Tracking_Lite(); // Suggested plugins. new WPCode_Suggested_Plugins(); } new WPCode_Admin_Bar_Info_Lite(); do_action( 'wpcode_loaded' ); // Load the pluggable functions late to allow plugins to hook in. require_once WPCODE_PLUGIN_PATH . 'includes/pluggable.php'; } } require_once dirname( __FILE__ ) . '/includes/ihaf.php'; WPCode(); build/admin-bar.js 0000644 00000002440 15021200650 0010022 0 ustar 00 !function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){!function(){if(window.wpcode_admin_bar_info){var e=document.getElementById("wp-admin-bar-wpcode-loaded-on-this-page");if(e){var a=e.querySelector(".ab-submenu");a.innerHTML="",wpcode_admin_bar_info.forEach((function(e){var n=document.createElement("li");n.className="wpcode-admin-bar-info-location menupop",n.setAttribute("data-location-id",e.location_id),n.innerHTML=''+e.label+"";var i=document.createElement("ul");i.className="ab-submenu",e.snippets.forEach((function(e){var a=document.createElement("li");a.className="wpcode-admin-bar-info-snippet",a.setAttribute("data-snippet-id",e.id),a.innerHTML=''+e.title+"",i.appendChild(a)}));var t=document.createElement("div");t.className="ab-sub-wrapper",t.appendChild(i),n.appendChild(t),a.appendChild(n)}))}if(0===wpcode_admin_bar_info_count){var n=document.querySelector("#wp-admin-bar-wpcode-loaded-on-this-page .wp-admin-bar-arrow");n&&(n.style.display="none")}var i=document.querySelector("#wp-admin-bar-wpcode-loaded-on-this-page > .ab-item");i&&(i.innerHTML+=" ("+wpcode_admin_bar_info_count+")")}}()}))}(); build/connect.asset.php 0000644 00000000137 15021200650 0011113 0 ustar 00 array(), 'version' => '9c3a931e76deaf8190a85137802b7390'); build/notices.js 0000644 00000001156 15021200650 0007637 0 ustar 00 !function(){"use strict";(window.WPCodeAdminWideNotices||function(i,e,c){var n={init:function(){c(n.ready)},ready:function(){n.events()},events:function(){c(i).on("click",".wpcode-notice .notice-dismiss, .wpcode-notice .wpcode-notice-dismiss",n.dismissNotice)},dismissNotice:function(i){i.target.classList.contains("wpcode-notice-dismiss")&&c(this).closest(".wpcode-notice").slideUp(),c.post(wpcode_admin_notices.ajax_url,{action:"wpcode_notice_dismiss",_wpnonce:wpcode_admin_notices.nonce,id:(c(this).closest(".wpcode-notice").attr("id")||"").replace("wpcode-notice-","")})}};return n}(document,window,jQuery)).init()}(); build/admin.css 0000644 00000512140 15021200650 0007437 0 ustar 00 :root{--wpcode-background-gray:#F8F8F8;--wpcode-background-highlight:#F6FAFF;--wpcode-background-light:#F3F4F5;--wpcode-background-red:#DF2A35;--wpcode-background-white:#fff;--wpcode-border-color:#ddd;--wpcode-button-disabled-bg:#F5F5F5;--wpcode-button-disabled-border:1px solid #DDDDDD;--wpcode-button-disabled-text:#bbb;--wpcode-button-primary-bg:var(--wpcode-color-primary);--wpcode-button-primary-bg-hover:#397EEB;--wpcode-button-primary-text:#fff;--wpcode-button-primary-text-hover:#fff;--wpcode-button-secondary-bg:#F8F8F8;--wpcode-button-secondary-bg-hover:#fff;--wpcode-button-secondary-border:1px solid #DDDDDD;--wpcode-button-secondary-text:#777;--wpcode-button-orange-bg:#E06B44;--wpcode-button-orange-bg-hover:#e17f5e;--wpcode-button-secondary-text-hover:#454545;--wpcode-color-primary:#3568B7;--wpcode-color-red:#DF2A35;--wpcode-color-red-darker:#AB2028;--wpcode-font-size-l:18px;--wpcode-font-size-m:16px;--wpcode-font-size-s:14px;--wpcode-font-size-xl:22px;--wpcode-font-size-xs:12px;--wpcode-font-size-xxl:24px;--wpcode-input-border:1px solid #DDD;--wpcode-input-border-active:#3568B7;--wpcode-input-text-color:#454545;--wpcode-notice-success-bg:#09A347;--wpcode-notice-success-text:#fff;--wpcode-space-h:36px;--wpcode-space-v:24px;--wpcode-text-color-heading:#454545;--wpcode-text-color-highlight:#3568B7;--wpcode-text-color-light-bg:#848A8A;--wpcode-text-color-paragraph:#777777;--wpcode-text-color-placeholder:#bbb}@media screen and (max-width:782px){:root{--wpcode-space-h:24px}}:root .wpcode-dark-mode.wpcode-admin-page{--wpcode-background-gray:#2B2B2B;--wpcode-background-highlight:#1E293B;--wpcode-background-light:#3A3A3A;--wpcode-background-red:#A63239;--wpcode-background-white:#1E1E1E;--wpcode-border-color:#555;--wpcode-button-disabled-bg:#424242;--wpcode-button-disabled-border:1px solid #555;--wpcode-button-disabled-text:#777;--wpcode-button-primary-text:#fff;--wpcode-button-primary-text-hover:#fff;--wpcode-button-secondary-bg:#2B2B2B;--wpcode-button-secondary-bg-hover:#3A3A3A;--wpcode-button-secondary-border:1px solid #555;--wpcode-button-secondary-text:#ccc;--wpcode-button-orange-bg:#D97049;--wpcode-button-orange-bg-hover:#e59572;--wpcode-button-secondary-text-hover:#ddd;--wpcode-color-red:#fa525e;--wpcode-color-red-darker:#ec7d83;--wpcode-input-border:1px solid #555;--wpcode-input-border-active:#4A90E2;--wpcode-input-text-color:#ccc;--wpcode-notice-success-bg:#0BA858;--wpcode-notice-success-text:#fff;--wpcode-text-color-heading:#ccc;--wpcode-text-color-highlight:#4A90E2;--wpcode-text-color-light-bg:#A0A4A4;--wpcode-text-color-paragraph:#aaa;--wpcode-text-color-placeholder:#777}:root .wpcode-dark-mode.wpcode-admin-page table.widefat{background-color:var(--wpcode-background-white);border-color:var(--wpcode-border-color)}:root .wpcode-dark-mode.wpcode-admin-page .widefat td,:root .wpcode-dark-mode.wpcode-admin-page .widefat th{color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page .widefat tfoot tr td,:root .wpcode-dark-mode.wpcode-admin-page .widefat tfoot tr th,:root .wpcode-dark-mode.wpcode-admin-page .widefat thead tr td,:root .wpcode-dark-mode.wpcode-admin-page .widefat thead tr th{color:var(--wpcode-text-color-heading);border-color:var(--wpcode-border-color)}:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui select{background-color:var(--wpcode-background-gray);color:var(--wpcode-text-color-light-bg)}:root .wpcode-dark-mode.wpcode-admin-page.wpcode .button,:root .wpcode-dark-mode.wpcode-admin-page .button{background-color:var(--wpcode-button-secondary-bg);border-color:var(--wpcode-button-secondary-border);color:var(--wpcode-button-secondary-text)}:root .wpcode-dark-mode.wpcode-admin-page .button.button-primary{background-color:var(--wpcode-color-primary);border-color:var(--wpcode-border-color);color:var(--wpcode-button-primary-text)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-checkbox-toggle .wpcode-checkbox-toggle-slider{background-color:#555}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-checkbox-toggle .wpcode-checkbox-toggle-slider:before{background-color:#ccc}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-checkbox-toggle input:checked+.wpcode-checkbox-toggle-slider{background-color:var(--wpcode-color-primary)}:root .wpcode-dark-mode.wpcode-admin-page #wpfooter{color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page #wpfooter a{color:var(--wpcode-color-primary)}:root .wpcode-dark-mode.wpcode-admin-page input[type=color],:root .wpcode-dark-mode.wpcode-admin-page input[type=date],:root .wpcode-dark-mode.wpcode-admin-page input[type=datetime-local],:root .wpcode-dark-mode.wpcode-admin-page input[type=datetime],:root .wpcode-dark-mode.wpcode-admin-page input[type=email],:root .wpcode-dark-mode.wpcode-admin-page input[type=month],:root .wpcode-dark-mode.wpcode-admin-page input[type=number],:root .wpcode-dark-mode.wpcode-admin-page input[type=password],:root .wpcode-dark-mode.wpcode-admin-page input[type=search],:root .wpcode-dark-mode.wpcode-admin-page input[type=tel],:root .wpcode-dark-mode.wpcode-admin-page input[type=text],:root .wpcode-dark-mode.wpcode-admin-page input[type=time],:root .wpcode-dark-mode.wpcode-admin-page input[type=url],:root .wpcode-dark-mode.wpcode-admin-page input[type=week],:root .wpcode-dark-mode.wpcode-admin-page select,:root .wpcode-dark-mode.wpcode-admin-page textarea{background-color:var(--wpcode-background-gray);border-color:var(--wpcode-input-border);color:var(--wpcode-input-text-color)}:root .wpcode-dark-mode.wpcode-admin-page h3{color:var(--wpcode-text-color-heading)}:root .wpcode-dark-mode.wpcode-admin-page ul#adminmenu a.wp-has-current-submenu:after,:root .wpcode-dark-mode.wpcode-admin-page ul#adminmenu>li.current>a.current:after{border-right-color:var(--wpcode-background-light)}:root .wpcode-dark-mode.wpcode-admin-page input[type=checkbox],:root .wpcode-dark-mode.wpcode-admin-page input[type=radio]{background-color:var(--wpcode-background-gray);border-color:var(--wpcode-input-border);color:var(--wpcode-input-text-color)}:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button-disabled,:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button-secondary.disabled,:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button-secondary:disabled,:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button-secondary[disabled],:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button.disabled,:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button:disabled,:root .wpcode-dark-mode.wpcode-admin-page.wp-core-ui .button[disabled]{background-color:var(--wpcode-button-disabled-bg) !important;border-color:var(--wpcode-button-disabled-border) !important;color:var(--wpcode-button-disabled-text) !important}:root .wpcode-dark-mode.wpcode-admin-page a{color:var(--wpcode-text-color-light-bg)}:root .wpcode-dark-mode.wpcode-admin-page a:hover{color:var(--wpcode-input-border-active)}:root .wpcode-dark-mode.wpcode-admin-page .ac_match,:root .wpcode-dark-mode.wpcode-admin-page .subsubsub a.current{color:var(--wpcode-button-primary-text)}:root .wpcode-dark-mode.wpcode-admin-page .subsubsub a .count,:root .wpcode-dark-mode.wpcode-admin-page .subsubsub a.current .count{color:var(--wpcode-button-secondary-text)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-button{color:var(--wpcode-button-primary-text)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-button:hover{color:var(--wpcode-button-primary-text-hover)}:root .wpcode-dark-mode.wpcode-admin-page .wp-list-table.wpcode-snippets td.column-tags a{color:var(--wpcode-text-color-light-bg)}:root .wpcode-dark-mode.wpcode-admin-page{color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page #wpcode-header-between #screen-meta-links .show-settings{color:var(--wpcode-text-color-light-bg)}:root .wpcode-dark-mode.wpcode-admin-page #wpcode-header-between #screen-meta-links .show-settings:hover{color:var(--wpcode-input-border-active)}:root .wpcode-dark-mode.wpcode-admin-page .notice{background:var(--wpcode-background-white);border-color:var(--wpcode-border-color)}:root .wpcode-dark-mode.wpcode-admin-page .select2-container--default .select2-selection--multiple,:root .wpcode-dark-mode.wpcode-admin-page .select2-dropdown{background-color:var(--wpcode-background-gray);border-color:var(--wpcode-input-border);color:var(--wpcode-input-text-color)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-content .select2-container.select2-container--default .select2-selection--multiple{border-color:var(--wpcode-input-border)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-button-toggle svg path{fill:var(--wpcode-text-color-light-bg)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-calendar{background-color:var(--wpcode-background-gray);border-color:var(--wpcode-input-border);color:var(--wpcode-input-text-color)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-day{color:var(--wpcode-input-text-color)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-time .flatpickr-time-separator,:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-time .flatpickr-am-pm,:root .wpcode-dark-mode.wpcode-admin-page span.flatpickr-weekday{color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-months .flatpickr-prev-month,:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-months .flatpickr-next-month{color:var(--wpcode-text-color-paragraph);fill:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page .flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--wpcode-text-color-paragraph)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-admin-tabs li button,:root .wpcode-dark-mode.wpcode-admin-page .wpcode-admin-tabs li a{border-bottom-color:var(--wpcode-border-color)}:root .wpcode-dark-mode.wpcode-admin-page .wpcode-admin-tabs li button.active,:root .wpcode-dark-mode.wpcode-admin-page .wpcode-admin-tabs li a.active{border-color:var(--wpcode-color-primary)}:root .wpcode-dark-mode.wpcode-admin-page table.diff .diff-deletedline{background-color:#3b0309}:root .wpcode-dark-mode.wpcode-admin-page table.diff .diff-addedline{background-color:#042a04}.wpcode-button{background-color:var(--wpcode-button-primary-bg);border:1px solid var(--wpcode-button-primary-bg);border-radius:4px;color:var(--wpcode-button-primary-text);cursor:pointer;display:inline-block;font-size:var(--wpcode-font-size-s);font-weight:700;line-height:1;padding:10px 16px;text-decoration:none}.wpcode-button.wpcode-button-icon{align-items:center;display:inline-flex;padding-bottom:12px;padding-top:12px}.wpcode-button.wpcode-button-icon svg{margin-right:5px}.wpcode-button.wpcode-button-icon.wpcode-copy-target{padding-bottom:10px;padding-top:10px}.wpcode-button.wpcode-button-wide{padding-left:50px;padding-right:50px}.wpcode-button:hover,.wpcode-button:focus{background-color:var(--wpcode-button-primary-bg-hover);border-color:var(--wpcode-button-primary-bg-hover);color:var(--wpcode-button-primary-text-hover)}.wpcode-button.wpcode-button-secondary{background-color:var(--wpcode-button-secondary-bg);border:var(--wpcode-button-secondary-border);color:var(--wpcode-button-secondary-text)}.wpcode-button.wpcode-button-secondary:hover,.wpcode-button.wpcode-button-secondary:focus{background-color:var(--wpcode-button-secondary-bg-hover);color:var(--wpcode-button-secondary-text-hover)}.wpcode-button.wpcode-button-secondary.wpcode-button-secondary-inactive{background-color:var(--wpcode-button-disabled-bg);border-color:var(--wpcode-button-disabled-bg)}.wpcode-button.wpcode-button-secondary.wpcode-button-secondary-selected{border-color:var(--wpcode-button-primary-bg)}.wpcode-button.wpcode-button-orange{background-color:var(--wpcode-button-orange-bg);border-color:var(--wpcode-button-orange-bg);color:var(--wpcode-button-primary-text)}.wpcode-button.wpcode-button-orange:hover,.wpcode-button.wpcode-button-orange:focus{background-color:var(--wpcode-button-orange-bg-hover);color:var(--wpcode-button-primary-text)}.wpcode-button.wpcode-button-large{align-items:center;display:inline-flex;font-size:var(--wpcode-font-size-m);height:56px;justify-content:center;padding-left:var(--wpcode-space-h);padding-right:var(--wpcode-space-h);text-align:center}.wpcode-button.wpcode-button-large svg{margin-right:7px}.wpcode-button.wpcode-button-small{font-size:var(--wpcode-font-size-xs);padding:9px}.wpcode-button:disabled:hover,.wpcode-button:disabled{background-color:var(--wpcode-button-disabled-bg);border:var(--wpcode-button-disabled-border);color:var(--wpcode-button-disabled-text)}.wpcode-button-toggle{align-items:center;display:flex;justify-content:space-between}@media screen and (min-width:783px){.wpcode-button-toggle{min-width:424px}}.wpcode-button-toggle .wpcode-button{width:calc(50% - 5px);background:var(--wpcode-background-white);color:var(--wpcode-input-text-color)}.wpcode-button-toggle .wpcode-button-secondary{border:2px solid var(--wpcode-color-primary)}.wpcode-success-icon{display:none}.wpcode-show-success-icon .wpcode-success-icon{display:inline-block}.wpcode-show-success-icon .wpcode-default-icon{display:none}.wpcode-button-just-icon{background:none;border:none;cursor:pointer;padding:0}.wpcode-button-just-icon .wpcode-icon{display:block}.wpcode-text-button-icon{align-items:center;background:none;border:none;color:var(--wpcode-text-color-paragraph);cursor:pointer;display:inline-flex;font-size:var(--wpcode-font-size-s);font-weight:600;padding:0}.wpcode-text-button-icon:hover{color:var(--wpcode-text-color-heading)}.wpcode-text-button-icon:hover path{fill:var(--wpcode-text-color-heading)}.wpcode-text-button-icon .wpcode-icon{margin-right:5px}.wpcode-just-icon-button{background:none;border:none;cursor:pointer}.wpcode-button-text{background:none;border:none;color:var(--wpcode-text-color-paragraph);cursor:pointer;font-size:var(--wpcode-font-size-xs);padding:0;text-decoration:underline}.wpcode-button-text .wpcode-icon{margin-right:11px}.wpcode-button-text:focus,.wpcode-button-text:hover{text-decoration:none;background:none;color:var(--wpcode-text-color-heading)}.wpcode-button-text:focus svg path,.wpcode-button-text:hover svg path{fill:var(--wpcode-text-color-heading)}#wpbody-content .wpcode-button-ai-generate{position:relative;background:var(--wpcode-color-primary);border:none;color:white;cursor:pointer;overflow:hidden;z-index:1;border-radius:5px;transition:background-color 0.5s ease 0s,color 0.5s ease 0s}#wpbody-content .wpcode-button-ai-generate svg path{fill:#fff;transition:fill 0.5s ease 0s}#wpbody-content .wpcode-button-ai-generate .wpcode-button-ai-text-done,#wpbody-content .wpcode-button-ai-generate .wpcode-button-ai-text-loading{display:none}#wpbody-content .wpcode-button-ai-generate:focus,#wpbody-content .wpcode-button-ai-generate:hover{background:var(--wpcode-color-primary);color:#fff}#wpbody-content .wpcode-button-ai-generate:focus:before,#wpbody-content .wpcode-button-ai-generate:hover:before{opacity:0}#wpbody-content .wpcode-button-ai-generate:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg,#6e2dfb 0%,#a01cfd 100%);transition:opacity 0.5s ease;z-index:-1}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading{background:white;color:#a01cfd}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done:before,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading:before{display:none}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done svg path,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading svg path{fill:#a01cfd;-webkit-animation-name:wpcode-shape-scale;animation-name:wpcode-shape-scale;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;transform-origin:center center;transform-box:fill-box}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done g:nth-child(2) path,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading g:nth-child(2) path{-webkit-animation-delay:0.75s;animation-delay:0.75s}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done g:nth-child(3) path,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading g:nth-child(3) path{-webkit-animation-delay:1.5s;animation-delay:1.5s}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done .wpcode-button-ai-text-default,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading .wpcode-button-ai-text-default{display:none}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done .wpcode-button-ai-text-loading,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-loading .wpcode-button-ai-text-loading{display:block}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done .wpcode-button-ai-text-done{display:block}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done .wpcode-button-ai-text-default,#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-done .wpcode-button-ai-text-loading{display:none}#wpbody-content .wpcode-button-ai-generate.wpcode-button-ai-not-available{filter:grayscale(1)}.wpcode-ai-improve{margin-right:14px;padding:10px 10px}.wpcode-ai-improve svg path{fill:#a01cfd}.wpcode-headers-footers #wpcontent,.wpcode-admin-page #wpcontent{padding-left:0 !important}.wpcode-headers-footers #wpwrap,.wpcode-admin-page #wpwrap{background:var(--wpcode-background-light)}.wpcode-header-top{align-items:center;background:var(--wpcode-background-gray);display:flex;justify-content:space-between;padding:var(--wpcode-space-v) var(--wpcode-space-h)}.wpcode-header-right{display:flex;flex-flow:wrap;justify-content:flex-end}@media screen and (min-width:783px){.wpcode-header-right{display:block}}.wpcode-header-right .wpcode-toggle-testing-mode-wrap{order:3;margin-top:14px}@media screen and (min-width:783px){.wpcode-header-right .wpcode-toggle-testing-mode-wrap{margin-top:0}}.wpcode-header-right button{margin-left:18px;vertical-align:middle;order:1}.wpcode-header-left svg{display:block}.wpcode-header-bottom{align-items:center;background:var(--wpcode-background-white);border-color:var(--wpcode-border-color);border-style:solid;border-width:1px 0;display:flex;justify-content:space-between;min-height:60px;padding:0 var(--wpcode-space-h)}@media screen and (max-width:782px){.wpcode-header-bottom{flex-flow:wrap;padding-top:calc(var(--wpcode-space-v) / 2);padding-bottom:calc(var(--wpcode-space-v) / 2)}}.wpcode-header-bottom h1{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-xl);margin:0}@media screen and (min-width:783px){.wpcode-header-bottom.wpcode-sticky{left:160px;position:fixed;right:0;top:32px;z-index:1055}}.folded .wpcode-header-bottom.wpcode-sticky{left:36px}.wpcode-column{align-items:center;display:flex;flex-flow:row;margin:6px 0}@media screen and (min-width:783px){.wpcode-column{margin:0}}#wpcode-header-logo{display:block}.wpcode-notifications-inbox{position:relative}.wpcode-notifications-inbox[data-count]:after{background:var(--wpcode-color-red);border-radius:50%;bottom:100%;color:#fff;content:attr(data-count);display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:700;height:16px;left:100%;line-height:18px;min-width:16px;position:absolute;text-align:center;transform:translate(-50%,50%)}.toplevel_page_wpcode .wpcode-header-top{margin-top:40px}@media screen and (min-width:783px){.toplevel_page_wpcode .wpcode-header-top{margin-top:0}}.wpcode-snippet-manager .wpcode-header-bottom .wpcode-column .wpcode-button{margin-left:12px}.wpcode-snippet-manager .wpcode-header-bottom .wpcode-column .wpcode-button.wpcode-button-save-to-library{margin-left:0}@media screen and (max-width:782px){.wpcode-title-button h1{margin-right:20px}}.wpcode-mobile-dropdown-toggle{display:none}@media screen and (max-width:1160px){.wpcode-mobile-dropdown-toggle{display:block}}@media screen and (max-width:1160px){#wpcode-snippet-type-buttons.wpcode-admin-tabs{display:block;overflow:hidden;height:60px}#wpcode-snippet-type-buttons.wpcode-admin-tabs li{float:none !important;display:block}#wpcode-snippet-type-buttons.wpcode-admin-tabs.wpcode-open{height:auto}.wpcode-title-button{display:flex;align-items:flex-start}.wpcode-title-button>.wpcode-button{margin-top:10px}.wpcode-title-button>.wpcode-mobile-dropdown-toggle{margin-top:15px;margin-right:20px}}.wpcode-admin-tabs{font-size:14px;list-style:none;margin:0;overflow:auto;padding:0}.wpcode-admin-tabs li{float:left;margin:0 30px 0 0;padding:0}.wpcode-admin-tabs li button{border:none;background:transparent;cursor:pointer}.wpcode-admin-tabs li button,.wpcode-admin-tabs li a{border-bottom:4px solid #fff;box-shadow:none;color:var(--wpcode-text-color-paragraph);display:block;font-weight:600;padding:20px 0 18px 0;text-decoration:none;transition:border 300ms ease}.wpcode-admin-tabs li button.wpcode_pro_type_lite,.wpcode-admin-tabs li a.wpcode_pro_type_lite{opacity:0.5}.wpcode-admin-tabs li button.wpcode_pro_type_lite:hover,.wpcode-admin-tabs li a.wpcode_pro_type_lite:hover{border:none}.wpcode-admin-tabs li button.wpcode_pro_type_lite:focus,.wpcode-admin-tabs li a.wpcode_pro_type_lite:focus{border:none}.wpcode-admin-tabs li button.active,.wpcode-admin-tabs li a.active{border-color:var(--wpcode-color-primary);color:var(--wpcode-text-color-heading)}.wpcode-admin-tabs li button:focus,.wpcode-admin-tabs li a:focus{border-color:var(--wpcode-color-primary)}.wpcode-admin-tabs li button:hover,.wpcode-admin-tabs li a:hover{border-color:var(--wpcode-text-color-paragraph)}.wpcode-admin-tab-content{display:none;position:relative}.wpcode-admin-tab-content.active{display:block}.wpcode-content{padding:28px var(--wpcode-space-h)}.wpcode-content *{box-sizing:border-box}.wpcode-content h2{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-l)}.wpcode-content p{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s)}.wpcode-add-snippet .wpcode-content{padding-top:20px}.wpcode-content>hr{margin-bottom:36px;margin-top:36px}.wpcode-code-textarea h2{margin:12px 0 20px}.wrap{margin:0;padding:0 var(--wpcode-space-h)}.wrap div.error,.wrap div.updated{margin-bottom:0;position:relative}.wrap div:first-child{margin-top:28px}#wpcontent .wrap .wpcode-review-step{margin-top:0}#wpfooter{padding-left:var(--wpcode-space-h);padding-right:var(--wpcode-space-h)}.wpcode-modal-overlay{background:rgba(0,0,0,0.3);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:1000}.admin-bar .wpcode-modal-overlay{top:32px}.wpcode-show-modal .wpcode-modal-overlay{display:block}.wpcode-modal{background:#fff;border:1px solid var(--wpcode-border-color);border-radius:8px;display:none;left:50%;max-width:100%;padding:25px;position:fixed;top:50%;transform:translate(-50%,-50%);width:752px;z-index:1050}.wpcode-show-modal .wpcode-modal{display:block}@media screen and (min-width:783px){.wpcode-modal{margin-left:18px}}@media screen and (min-width:961px){.wpcode-modal{margin-left:80px}.folded .wpcode-modal{margin-left:18px}}.wpcode-content .CodeMirror{border:1px solid var(--wpcode-border-color);border-radius:3px 3px 0 0;font-size:var(--wpcode-font-size-s);line-height:25px}.wpcode-content .CodeMirror .CodeMirror-matchingbracket{background:rgba(219,166,23,.3);color:inherit}.wpcode-content .CodeMirror-linenumber{color:var(--wpcode-text-color-light-bg);font-size:var(--wpcode-font-size-xs)}.wpcode-content .CodeMirror-lines{padding:20px 0}.wpcode-content .CodeMirror-gutters{background-color:var(--wpcode-button-disabled-bg)}.wpcode-content .CodeMirror-focused .cm-matchhighlight{background-color:var(--wpcode-border-color)}.wpcode-editor-auto .CodeMirror{height:auto;min-height:300px;border-radius:3px}.wpcode-editor-auto .CodeMirror-sizer{min-height:300px !important}.CodeMirror-sizer:before{color:var(--wpcode-text-color-light-bg);position:absolute}[data-code-type="php"] .CodeMirror-sizer:before{content:""}.wpcode-dark-mode .CodeMirror{background:#1c1b1b;color:#fff}.wpcode-dark-mode div.CodeMirror-selected{background:#545167 !important}.wpcode-dark-mode .CodeMirror-gutters{background:#1c1b1b;border-right:0}.wpcode-dark-mode .CodeMirror-linenumber{color:#545167}.wpcode-dark-mode .CodeMirror-cursor{border-left:1px solid #ffad5c;border-right:.5em solid #ffad5c;opacity:.5}.wpcode-dark-mode .CodeMirror-activeline-background{background:#363342;opacity:.5}.wpcode-dark-mode .cm-fat-cursor .CodeMirror-cursor{background:#ffad5c;opacity:.5}.wpcode-dark-mode span.cm-atom,.wpcode-dark-mode span.cm-attribute,.wpcode-dark-mode span.cm-hr,.wpcode-dark-mode span.cm-keyword,.wpcode-dark-mode span.cm-link,.wpcode-dark-mode span.cm-quote,.wpcode-dark-mode span.cm-variable{color:#fff}.wpcode-dark-mode span.cm-keyword{color:#88aece}.wpcode-dark-mode span.cm-number{color:#f08d49}.wpcode-dark-mode span.cm-property{color:#9a86fd}.wpcode-dark-mode span.cm-negative,.wpcode-dark-mode span.cm-punctuation,.wpcode-dark-mode span.cm-unit{color:#e09142}.wpcode-dark-mode span.cm-string{color:#b5bd68}.wpcode-dark-mode span.cm-operator{color:#fff}.wpcode-dark-mode span.cm-positive{color:#6a51e6}.wpcode-dark-mode span.cm-string-2,.wpcode-dark-mode span.cm-type,.wpcode-dark-mode span.cm-url,.wpcode-dark-mode span.cm-variable-2,.wpcode-dark-mode span.cm-variable-3{color:#fff}.wpcode-dark-mode span.cm-builtin,.wpcode-dark-mode span.cm-def,.wpcode-dark-mode span.cm-em,.wpcode-dark-mode span.cm-header,.wpcode-dark-mode span.cm-qualifier,.wpcode-dark-mode span.cm-tag{color:#eeebff}.wpcode-dark-mode span.cm-bracket,.wpcode-dark-mode span.cm-comment{color:#999}.wpcode-dark-mode span.cm-error,.wpcode-dark-mode span.cm-invalidchar{color:red}.wpcode-dark-mode span.cm-header{font-weight:400}.wpcode-dark-mode .CodeMirror-matchingbracket{color:#eeebff !important;text-decoration:underline}.wpcode-resize-handle{background:#f7f7f7;height:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:row-resize;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #ddd;margin-bottom:var(--wpcode-space-h);border-radius:0 0 3px 3px}.wpcode-resize-handle:before{content:'\2261';color:#999;position:absolute;left:50%}.wpcode-resize-handle:hover{background:#f0f0f0}.wpcode-resize-handle:hover:before{color:#000}.wpcode-resizing .CodeMirror{min-height:200px !important}.wpcode-editor-auto .wpcode-resize-handle,.wpcode-code-type-blocks .wpcode-resize-handle,.wpcode-code-type-text .wpcode-resize-handle{display:none}.wpcode-editor-auto .wpcode-code-textarea,.wpcode-code-type-blocks .wpcode-code-textarea,.wpcode-code-type-text .wpcode-code-textarea{margin-bottom:var(--wpcode-space-h)}.wpcode-input-title input.wpcode-input-text{font-size:var(--wpcode-font-size-m)}input.wpcode-input-number,input.wpcode-input-text{border:var(--wpcode-input-border);border-radius:4px;color:var(--wpcode-input-text-color);font-size:var(--wpcode-font-size-s);height:40px}input.wpcode-input-number:focus,input.wpcode-input-text:focus{border-color:var(--wpcode-input-border-active)}input.wpcode-input-text{width:100%}.wpcode-input-textarea{border:var(--wpcode-input-border);border-radius:4px;color:var(--wpcode-input-text-color);font-size:var(--wpcode-font-size-s);max-width:100%;resize:none;width:424px}.wpcode-input-select{align-items:center;display:flex}.wpcode-input-select label{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-s);font-weight:600}.wpcode-input-select .wpcode-checkbox-toggle,.wpcode-input-select select{margin-left:13px}.wpcode-metabox-form-row-input{width:100%;position:relative}.wpcode-metabox-form-row-input select{min-width:424px}@media screen and (max-width:782px){.wpcode-metabox-form-row-input select{min-width:0;width:100%}}.wpcode-inline-select select{min-width:98px}.wpcode-inline-select>label{color:var(--wpcode-text-color-paragraph);display:inline-block;font-size:13px;margin-left:12px}.wpcode-separator{border-color:var(--wpcode-border-color);border-style:solid;border-width:1px 0 0;margin:var(--wpcode-space-v) 0}.wpcode-checkbox-toggle{display:inline-block;height:20px;position:relative;width:36px}.wpcode-checkbox-toggle input{opacity:0;height:100%;width:100%;position:absolute}.wpcode-checkbox-toggle input:checked+.wpcode-checkbox-toggle-slider{background-color:var(--wpcode-color-primary)}.wpcode-checkbox-toggle input:checked+.wpcode-checkbox-toggle-slider:before{transform:translateX(16px)}.wpcode-checkbox-toggle input:focus+.wpcode-checkbox-toggle-slider{outline:1px dotted #212121;outline:1px auto -webkit-focus-ring-color}.wpcode-checkbox-toggle input:focus:not(:focus-visible)+.wpcode-checkbox-toggle-slider{outline:none}.wpcode-checkbox-toggle .wpcode-checkbox-toggle-slider{background-color:#ccc;border-radius:20px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:.4s}.wpcode-checkbox-toggle .wpcode-checkbox-toggle-slider:before{background-color:white;border-radius:50%;bottom:3px;content:"";height:14px;left:3px;position:absolute;transition:.4s;width:14px}.wpcode-checkbox-toggle-label{margin-left:14px;color:var(--wpcode-text-color-heading);font-size:14px;font-weight:600}.wpcode-checkbox-row{margin-bottom:25px}.wpcode-checkbox-row.wpcode-checkbox-row-disabled{opacity:0.7;cursor:not-allowed;pointer-events:none}.wpcode-checkbox-row .description{margin:14px 0}.wpcode-input-radio{margin-right:20px;flex:1 1;text-align:center}.wpcode-input-radio label{display:flex;flex-flow:column;border-radius:4px;justify-content:center;padding:20px;background-color:var(--wpcode-button-disabled-bg);border:2px solid var(--wpcode-button-disabled-bg);color:var(--wpcode-text-color-paragraph)}.wpcode-input-radio label:hover{color:var(--wpcode-text-color-heading)}.wpcode-input-radio label:hover svg path{fill:var(--wpcode-text-color-heading)}.wpcode-input-radio input[type="radio"]{opacity:0;position:absolute}.wpcode-input-radio input[type="radio"]:checked+label{border-color:var(--wpcode-color-primary);background:var(--wpcode-background-white);color:var(--wpcode-text-color-heading)}.wpcode-input-radio input[type="radio"]:checked+label svg path{fill:var(--wpcode-text-color-heading)}.wpcode-input-radio input[type="radio"]:disabled+label{opacity:0.9}.wpcode-input-radio input[type="radio"]:disabled+label:hover{color:var(--wpcode-text-color-paragraph)}.wpcode-input-radio input[type="radio"]:disabled+label:hover svg path{fill:var(--wpcode-text-color-paragraph)}.wpcode-input-radio .wpcode-input-radio-icon{text-align:center}.wpcode-input-radio .wpcode-input-radio-label{font-size:16px;font-weight:600;margin-top:10px;display:block}.wpcode-input-with-button{display:flex;width:100%}.wpcode-input-with-button .wpcode-input-text{margin-right:10px;width:100%}.wpcode-input-with-button .wpcode-button{padding-bottom:10px;padding-top:10px}.wpcode-snippet-manager.wp-core-ui select,.wpcode-tools.wp-core-ui select,.wpcode-generator.wp-core-ui select{background-position-x:calc(100% - 13px);border-color:var(--wpcode-border-color);border-radius:4px;color:var(--wpcode-text-color-heading);line-height:38px;min-height:40px;padding-left:12px;padding-right:32px}.wpcode-content .select2-container .select2-search--inline{margin:0}.wpcode-content .select2-container .select2-search--inline .select2-search__field{color:var(--wpcode-text-color-heading);font-size:14px;margin:5px 5px 0}.wpcode-content .select2-container.select2-container--default .select2-selection--multiple{border-color:var(--wpcode-border-color)}.wpcode-content .select2-container.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:var(--wpcode-button-disabled-bg);border:none;border-radius:3px;color:var(--wpcode-text-color-heading);font-size:14px;margin:9px 8px 9px 0;padding:1px 4px}.wpcode-content .select2-container.select2-container--default .select2-selection--multiple .select2-selection__rendered{display:block;padding:0 8px}.wpcode-content .select2-container.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{margin-right:4px}.wpcode-content .select2-container .select2-selection--single{height:40px;font-size:var(--wpcode-font-size-s);border-color:var(--wpcode-border-color)}.wpcode-content .select2-container .select2-selection--single .select2-selection__rendered{padding:0 8px;line-height:40px}.wpcode-content .select2-container .select2-selection--single .select2-selection__arrow{height:40px;width:30px}.wpcode-admin-page .select2-dropdown{border-color:var(--wpcode-border-color);color:var(--wpcode-text-color-heading)}.wpcode-admin-page .select2-results .wpcode-pro-pill{margin-left:7px;vertical-align:middle}.wpcode-admin-page .select2-results>.select2-results__options>.select2-results__option[role="list"]{padding:0}.wpcode-checkboxes-list label{display:block;margin-bottom:16px}.wpcode-checkboxes-list input{margin-right:12px}.wpcode-file-upload .wpcode-file-field{background-color:var(--wpcode-background-white);border:1px solid #ddd;border-radius:3px;box-shadow:none;color:var(--wpcode-text-color-paragraph);display:inline-block;margin:0 10px 0 0;min-height:40px;overflow:hidden;padding:10px 10px;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;width:400px}.wpcode-file-upload input[type=file]{height:0.1px;opacity:0;overflow:hidden;position:absolute;width:0.1px;z-index:-1}.wpcode-file-upload label{cursor:pointer;display:inline-flex;outline:none;padding:0;text-overflow:ellipsis;white-space:nowrap}.wpcode-checkbox-multiselect-columns{max-width:600px;position:relative}.wpcode-checkbox-multiselect-columns:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;min-height:0;visibility:hidden}.wpcode-checkbox-multiselect-columns:before{background-image:url("data:image/svg+xml,%3Csvg width=%2718%27 height=%2714%27 viewBox=%270 0 18 14%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M3.99 6L0 10L3.99 14V11H11V9H3.99V6ZM18 4L14.01 0V3H7V5H14.01V8L18 4Z%27 fill=%27%23999%27/%3E%3C/svg%3E%0A");color:#999;content:"";display:block;height:14px;left:50%;margin:0 0 0 -10px;position:absolute;top:130px;width:18px}.wpcode-checkbox-multiselect-columns .header{font-size:13px;font-weight:600;margin:0;padding:0 0 5px 0;text-align:center}.wpcode-checkbox-multiselect-columns .first-column,.wpcode-checkbox-multiselect-columns .second-column{float:left;width:45%}.wpcode-checkbox-multiselect-columns .second-column{float:right}.wpcode-checkbox-multiselect-columns .second-column ul li{padding:10px}.wpcode-checkbox-multiselect-columns ul{background-color:#fff;border:1px solid #ddd;border-radius:3px;height:250px;list-style-type:none;margin:0;overflow-y:auto;padding:0;position:relative}.wpcode-checkbox-multiselect-columns ul li{border-bottom:1px #eee solid;color:var(--wpcode-text-color-paragraph);font-size:14px;margin:0}.wpcode-checkbox-multiselect-columns ul li label{display:block;padding:10px 10px 10px 32px;position:relative;vertical-align:baseline}.wpcode-checkbox-multiselect-columns ul li label:hover{background-color:var(--wpcode-color-primary);color:#fff}.wpcode-checkbox-multiselect-columns ul li label:before{color:#ddd;content:"\f0c8";font:normal normal normal 16px/1 Georgia;-webkit-font-smoothing:antialiased;left:10px;-moz-osx-font-smoothing:grayscale;position:absolute;text-rendering:auto;top:12px}.wpcode-checkbox-multiselect-columns ul li label.checked{color:rgba(119,119,119,0.6)}.wpcode-checkbox-multiselect-columns ul li label.checked:hover{color:#fff}.wpcode-checkbox-multiselect-columns ul li label.checked:before{background-image:url("data:image/svg+xml,%3Csvg width=%2710%27 height=%278%27 viewBox=%270 0 10 8%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1.38462 3.03448L0 4.13793L3.23077 8H4.46154L10 0.965517L8.76923 0L3.69231 4.96552L1.38462 3.03448Z%27 fill=%27%234982BF%27/%3E%3C/svg%3E%0A");background-position:3px 3px;background-repeat:no-repeat;background-size:10px 8px}.wpcode-checkbox-multiselect-columns ul li label input{display:none}.wpcode-checkbox-multiselect-columns .all{color:#999;display:inline-block;font-size:13px;margin:10px 0 0}.wpcode-admin-page .select2-container--default{font-size:12px;font-weight:500}.wpcode-admin-page .select2-container--default .select2-results__option .select2-results__option{padding-left:30px;color:var(--wpcode-text-color-heading);font-weight:500;margin-bottom:0}.wpcode-admin-page .select2-container--default .select2-results__option .select2-results__option[aria-disabled=true]{color:var(--wpcode-text-color-paragraph);opacity:0.5}.wpcode-admin-page .select2-container--default .select2-results__option .select2-results__option[aria-selected=true]{background-color:var(--wpcode-button-primary-bg);color:#fff}.wpcode-admin-page .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--wpcode-button-disabled-bg);color:var(--wpcode-text-color-light-bg)}.wpcode-admin-page .select2-container--default .select2-results__group{padding-left:16px;color:var(--wpcode-text-color-paragraph);font-weight:500}label .wpcode-icon-mobile{transform:scale(0.86)}.wpcode-wide-text{width:100%;max-width:500px}.wpcode-metabox-form-row-input .wpcode-alert{max-width:800px}.wpcode-label-text-row p:first-child{margin-top:0}.wpcode-input-row-schedule{display:flex;justify-content:space-between}.wpcode-input-row-schedule .wpcode-input-row-input{width:calc(50% - 10px);position:relative}.wpcode-input-row-schedule+.wpcode-help-tooltip,.wpcode-input-with-button+.wpcode-help-tooltip{position:absolute;left:100%;top:10px;margin-left:15px}@media screen and (max-width:782px){.wpcode-input-row-schedule+.wpcode-help-tooltip,.wpcode-input-with-button+.wpcode-help-tooltip{display:none}}.wpcode-input-button-clear{position:absolute;right:7px;top:15px;width:14px;height:14px;border:none;text-align:center;margin:0;padding:0;background:transparent;cursor:pointer;border-radius:50%}.wpcode-input-button-clear svg{width:14px;height:14px;display:block}.wpcode-input-button-clear svg path{}.wpcode-flex{display:flex}.wpcode-code-textarea>.wpcode-flex{justify-content:space-between}@media screen and (max-width:782px){.wpcode-code-textarea>.wpcode-flex{flex-flow:wrap}}.wpcode-input-title{margin-bottom:8px}#wpcode_snippet_code{display:none}.wpcode-syntax-highlighting-disabled #wpcode_snippet_code{display:block}.wpcode-status-text{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s);margin-right:8px;min-width:51px}#wpcode_block_editor,#wp-wpcode_snippet_text-wrap{display:none}.wpcode-code-type-text #wpcode_block_editor,.wpcode-code-type-text #wpcode_snippet_code,.wpcode-code-type-text .wpcode-code-textarea .CodeMirror{display:none}.wpcode-code-type-text #wp-wpcode_snippet_text-wrap{display:block}.wpcode-code-type-blocks #wp-wpcode_snippet_text-wrap,.wpcode-code-type-blocks .wpcode-code-textarea .CodeMirror{display:none}.wpcode-code-type-blocks .wpcode-code-textarea{margin:0}.wpcode-code-type-blocks #wpcode_block_editor{display:block}.wpcode-add-snippet-description{padding:var(--wpcode-space-v);background:var(--wpcode-background-white);border:1px solid var(--wpcode-border-color);border-bottom:0;border-radius:0 4px 0 0;font-size:var(--wpcode-font-size-s);color:var(--wpcode-text-color-paragraph)}.wpcode-add-snippet-description a:hover{text-decoration:none}.wpcode-add-snippet-description+.wpcode-metabox{border-radius:0 0 4px 4px}.wpcode-button-save-to-library{margin-right:14px;text-decoration:none;font-size:var(--wpcode-font-size-s);font-weight:600;color:var(--wpcode-text-color-paragraph)}.wpcode-button-save-to-library svg{vertical-align:middle}.wpcode-button-save-to-library svg path{fill:var(--wpcode-text-color-paragraph)}.wpcode-button-save-to-library:hover{text-decoration:underline;color:var(--wpcode-text-color-heading)}.wpcode-button-save-to-library:hover svg path{fill:var(--wpcode-text-color-heading)}.wpcode-button-save-to-library:disabled{background-color:transparent;border:none}.wpcode-button-save-to-library#wpcode_save_to_library{opacity:0.5}.wpcode-device-type-picker{margin:0 0 20px;display:flex;max-width:600px}@media screen and (max-width:782px){.wpcode-device-type-picker{display:block}.wpcode-device-type-picker .wpcode-input-radio{width:100%;margin-bottom:12px}.wpcode-device-type-picker .wpcode-input-radio label{flex-flow:row;justify-content:start;padding:12px;align-items:center}.wpcode-device-type-picker .wpcode-input-radio label .wpcode-input-radio-icon{margin-right:12px}.wpcode-device-type-picker .wpcode-input-radio label .wpcode-input-radio-icon svg{max-width:24px;height:auto}.wpcode-device-type-picker .wpcode-input-radio label .wpcode-input-radio-label{margin-top:0}}.wpcode-device-type-area{position:relative;display:flex;margin-bottom:20px}@media (max-width:1442px){.wpcode-device-type-area{flex-flow:column}}.wpcode-device-type-area .wpcode-blur-area{flex-shrink:0;flex-grow:0;width:600px}.wpcode-device-type-area .wpcode-blur-area .wpcode-device-type-picker{margin-bottom:0}.wpcode-device-type-area .wpcode-upsell-box{padding:20px;width:580px;position:relative;transform:none;left:auto;top:auto;background:var(--wpcode-background-white);border:none;text-align:left;display:flex;justify-content:space-between;align-items:center}@media (max-width:1442px){.wpcode-device-type-area .wpcode-upsell-box{margin-top:20px;width:580px}}.wpcode-device-type-area .wpcode-upsell-box h2{margin-bottom:10px}.wpcode-device-type-area .wpcode-upsell-box .wpcode-upsell-text{margin-bottom:0}.wpcode-device-type-area .wpcode-upsell-box .wpcode-upsell-text p{margin-bottom:0}.wpcode-device-type-area .wpcode-upsell-box .wpcode-upsell-buttons{flex-shrink:0;padding-left:20px}.wpcode-block-editor-area{height:400px;width:100%;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--wpcode-border-color);border-radius:4px;text-align:center;margin-bottom:var(--wpcode-space-h)}.wpcode-code-textarea .wpcode-smart-tags{margin-right:16px}.wpcode-code-type-css .wpcode-code-textarea .wpcode-smart-tags,.wpcode-code-type-blocks .wpcode-code-textarea .wpcode-smart-tags,.wpcode-code-type-php .wpcode-code-textarea .wpcode-smart-tags{display:none}.wpcode-shortcode-attributes-list ul{max-width:272px}.wpcode-shortcode-attributes-list li{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;color:var(--wpcode-text-color-paragraph)}.wpcode-shortcode-locations-list{width:100%}.wpcode-shortcode-locations-list .wpcode-button-row{margin-bottom:13px}.wpcode-shortcode-locations-list ul{max-width:none;width:100%;margin:0;padding:0}.wpcode-shortcode-locations-list li{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;color:var(--wpcode-text-color-paragraph);width:100%;padding:0}.wpcode-shortcode-locations-list li a{flex-grow:1;margin-right:10px}.wpcode-shortcode-locations-list li .wpcode-post-type{flex-shrink:0}.wpcode-line-error-code{background:rgba(250,152,152,0.3)}.wpcode-line-error-icon{background-image:url("data:image/svg+xml,");width:20px;height:20px;background-size:cover;margin-left:5px;margin-top:2px}.wpcode-error-preview{overflow:auto;max-width:100%}#wpcode_compress_output_option .wpcode-checkbox-toggle{opacity:0.6}#wpcode_snippet_as_file_option .wpcode-checkbox-toggle{opacity:0.6}#wpcode_snippet_as_file_option_pro .wpcode-checkbox-toggle+p{display:inline-block;margin:0 0 0 15px}.wpcode-ai-questions label{width:100%;display:block}.wpcode-ai-questions input{width:100%;max-width:600px}.wpcode-metabox{background:var(--wpcode-background-white);border:1px solid var(--wpcode-border-color);border-radius:4px;margin-bottom:var(--wpcode-space-h)}.wpcode-metabox-title{align-items:center;border-bottom:1px solid var(--wpcode-border-color);display:flex;justify-content:space-between}.wpcode-metabox-title-text{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-m);font-weight:600;padding:0 var(--wpcode-space-v)}.wpcode-metabox-button-toggle{background-color:var(--wpcode-background-white);border:none;cursor:pointer;height:60px;margin:0;text-align:center;width:60px}.wpcode-metabox-collapsed .wpcode-metabox-button-toggle svg{transform:rotate(180deg)}.wpcode-metabox-content{padding:var(--wpcode-space-v);padding-bottom:0}.wpcode-metabox-collapsed .wpcode-metabox-content{display:none}.wpcode-metabox-content p:first-child{margin-top:0}.wpcode-metabox-content .notice{margin:24px 0}.wpcode-metabox-content .notice p{margin:0.5em 0}.wpcode-metabox-form .wpcode-metabox-form-row{max-width:670px}.wpcode-metabox-form-row{display:flex;margin-bottom:var(--wpcode-space-v)}@media screen and (max-width:782px){.wpcode-metabox-form-row{flex-flow:wrap}}.wpcode-metabox-form-row-label{flex-shrink:0;width:245px}@media screen and (max-width:782px){.wpcode-metabox-form-row-label{margin-bottom:6px}}.wpcode-metabox-form-row-label label{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-s);font-weight:600}.wp-list-table.wpcode-snippets .column-status{width:100px}@media screen and (min-width:783px){.wp-list-table.wpcode-snippets .column-status{text-align:right}}.wp-list-table.wpcode-snippets .column-status .wpcode-checkbox-toggle{float:right}.wp-list-table.wpcode-snippets .column-name a{color:var(--wpcode-text-color-heading);font-size:14px;text-decoration:none}.wp-list-table.wpcode-snippets .column-name a:hover,.wp-list-table.wpcode-snippets .column-name a:focus{color:var(--wpcode-text-color-paragraph)}.wp-list-table.wpcode-snippets .column-name .delete a,.wp-list-table.wpcode-snippets .column-name .trash a{color:var(--wpcode-background-red)}.wp-list-table.wpcode-snippets .column-name .delete a:hover,.wp-list-table.wpcode-snippets .column-name .delete a:focus,.wp-list-table.wpcode-snippets .column-name .trash a:hover,.wp-list-table.wpcode-snippets .column-name .trash a:focus{color:var(--wpcode-color-red-darker)}.wp-list-table.wpcode-snippets .column-location a,.wp-list-table.wpcode-snippets .column-author a{color:var(--wpcode-text-color-paragraph)}.wp-list-table.wpcode-snippets .column-location a:hover,.wp-list-table.wpcode-snippets .column-location a:focus,.wp-list-table.wpcode-snippets .column-author a:hover,.wp-list-table.wpcode-snippets .column-author a:focus{color:var(--wpcode-text-color-heading)}.wp-list-table.wpcode-snippets th.column-created a{color:var(--wpcode-text-color-heading)}.wp-list-table.wpcode-snippets th.column-created a:hover,.wp-list-table.wpcode-snippets th.column-created a:focus{color:var(--wpcode-text-color-paragraph)}.wp-list-table.wpcode-snippets .column-created{color:var(--wpcode-text-color-paragraph)}.wp-list-table.wpcode-snippets td.column-tags{color:var(--wpcode-color-primary)}.wp-list-table.wpcode-snippets td.column-tags a{color:var(--wpcode-color-primary);text-decoration:underline}.wp-list-table.wpcode-snippets td.column-tags a:hover,.wp-list-table.wpcode-snippets td.column-tags a:focus{text-decoration:none}.wp-list-table.wpcode-snippets .alternate,.wp-list-table.wpcode-snippets.striped>tbody>:nth-child(odd),.wp-list-table.wpcode-snippets ul.striped>:nth-child(odd){background-color:var(--wpcode-background-gray)}.wp-list-table.wpcode-snippets .column-id{width:4.5em}.wp-list-table.wpcode-snippets .wpcode-copy{cursor:pointer;position:relative}.wp-list-table.wpcode-snippets .wpcode-copy .wpcode-icon-copy{display:none;position:absolute;left:100%;top:2px}.wp-list-table.wpcode-snippets .wpcode-copy.wpcode-show-success-icon .wpcode-icon-copy{display:block}.tablenav.bottom form{display:inline}.wpcode-admin-page.wpcode .tablenav.top{margin-bottom:16px}.wpcode-admin-page.wpcode .tablenav.bottom{margin-top:11px}.wpcode-admin-page.wpcode .wpcode-content a{}.wpcode-admin-page.wpcode .button{background:var(--wpcode-background-light);border-color:var(--wpcode-color-primary);color:var(--wpcode-color-primary)}.wpcode-content .has_error a,.wpcode-content .deactivated a{color:var(--wpcode-color-red)}.wpcode-content .has_error a:hover,.wpcode-content .has_error a:focus,.wpcode-content .deactivated a:hover,.wpcode-content .deactivated a:focus{color:var(--wpcode-color-red-darker)}.wpcode-table-status-icon{margin-right:10px;display:inline-block}.wpcode-table-status-icon-deactivated path{fill:var(--wpcode-color-red)}.wpcode-scheduled-icon .wpcode-icon-scheduled{width:20px;height:20px;display:inline-block}.wpcode-scheduled-icon .wpcode-icon-scheduled path{fill:var(--wpcode-color-primary)}#wpcode-header{position:relative}.wpcode-admin-page.wpcode #screen-meta-links{display:none}#wpcode-header-between{position:absolute;right:14px;z-index:92;top:46px}@media screen and (min-width:783px){#wpcode-header-between{top:auto}}#wpcode-header-between #screen-meta{border-color:var(--wpcode-border-color)}#wpcode-header-between #screen-meta-links .show-settings{border-color:var(--wpcode-border-color);background:var(--wpcode-background-gray)}#wpcode-header-between #screen-options-wrap{background:var(--wpcode-background-gray);border-color:var(--wpcode-border-color)}#wpbody-content{position:relative}#wpbody-content #wpcode-loader{display:none;position:absolute;top:0;left:0;z-index:99;right:0;bottom:0;background:transparent}#wpbody-content #wpcode-loader .wpcode-loader-overlay{position:absolute;left:36px;right:36px;background:rgba(255,255,255,0.8)}#wpbody-content #wpcode-loader .wpcode-loader-overlay img{height:20px;width:20px;align-items:center;position:absolute;top:50px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;left:50%;transform:translateX(-50%)}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.wpcode-cl-group{background:var(--wpcode-button-disabled-bg);border-radius:4px;margin-top:50px;padding:16px;position:relative}.wpcode-cl-group:first-child{margin-top:0}.wpcode-cl-group:first-child .wpcode-cl-group-or{display:none}#wpcode-conditions-holder{margin:16px 0;max-width:710px}.wpcode-cl-group-or{bottom:100%;height:50px;left:0;position:absolute;right:0}.wpcode-cl-group-or .wpcode-cl-group-or-line{background-color:var(--wpcode-button-disabled-bg);height:2px;left:0;position:absolute;right:0;top:50%}.wpcode-cl-group-or .wpcode-cl-group-or-text{background:#F5F5F5;border-radius:10px;color:var(--wpcode-text-color-heading);font-size:12px;font-weight:500;left:50%;padding:2px 9px;position:absolute;top:50%;transform:translate(-50%,-50%)}.wpcode-cl-rules-row{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}@media screen and (max-width:782px){.wpcode-cl-rules-row{margin-bottom:16px}}.wpcode-cl-rules-row .wpcode-cl-rules-row-options{align-items:flex-start;display:flex;max-width:661px;padding-right:15px;gap:10px}.wpcode-cl-rules-row .wpcode-cl-rules-row-options .wpcode-cl-rule-value{width:145px}.wpcode-cl-rules-row .wpcode-cl-rules-row-options .wpcode-cl-rule-meta-key-container,.wpcode-cl-rules-row .wpcode-cl-rules-row-options .wpcode-cl-rule-user-meta-key-container{width:145px}@media screen and (max-width:782px){.wpcode-cl-rules-row .wpcode-cl-rules-row-options{flex-flow:wrap}}.wpcode-metabox-form-row-input .wpcode-cl-rules-row .wpcode-cl-rule-type-container{cursor:pointer}@media screen and (max-width:782px){.wpcode-metabox-form-row-input .wpcode-cl-rules-row .wpcode-cl-rule-type-container{margin-bottom:6px;width:100%}}.wpcode-metabox-form-row-input .wpcode-cl-rules-row .wpcode-cl-rule-type-container select{pointer-events:none;margin:0}.wpcode-metabox-form-row-input .wpcode-cl-rules-row select{margin:0;min-width:0;width:145px}@media screen and (max-width:782px){.wpcode-metabox-form-row-input .wpcode-cl-rules-row select{width:100%;margin-bottom:6px}}.wpcode-metabox-form-row-input .wpcode-cl-rules-row select.wpcode-cl-rule-relation{width:145px}@media screen and (max-width:782px){.wpcode-metabox-form-row-input .wpcode-cl-rules-row select.wpcode-cl-rule-relation{width:100%}}.wpcode-cl-rules-row .wpcode-cl-remove-row{flex-shrink:0}@media screen and (max-width:782px){.wpcode-cl-rules-row .wpcode-cl-rule-value{display:inline-block;width:100%;margin-right:16px}}#wpcode_cl_picker{margin-left:-258px;margin-right:-16px;margin-top:20px;background-color:var(--wpcode-background-highlight);border-radius:4px 0 0 4px}@media screen and (max-width:782px){#wpcode_cl_picker{margin-left:-16px;margin-right:-16px}#wpcode_cl_picker .wpcode-list-item .wpcode-list-item-description{opacity:1}}#wpcode_cl_picker.wpcode-hidden{display:none}#wpcode_cl_picker .wpcode-items-list:before{left:158px;border-bottom:10px solid var(--wpcode-background-highlight)}@media screen and (max-width:782px){#wpcode_cl_picker .wpcode-items-list:before{display:none}}#wpcode_cl_picker .wpcode-items-sidebar{border-radius:4px 0 0 4px}#wpcode_cl_picker .wpcode-list-item label{cursor:pointer}.wpcode-items-metabox{display:flex;padding:0}@media screen and (max-width:782px){.wpcode-items-metabox{flex-flow:column}}.wpcode-items-sidebar{flex-shrink:0;padding:var(--wpcode-space-v);width:242px}@media screen and (max-width:782px){.wpcode-items-sidebar{width:100%}}.wpcode-items-list{border-left:1px solid var(--wpcode-border-color);min-height:400px;padding:calc(var(--wpcode-space-v) / 2) 12px;width:100%}@media screen and (max-width:782px){.wpcode-items-list{border-top:1px solid var(--wpcode-border-color);border-left:0}}.wpcode-items-categories-list{margin:0}.wpcode-items-categories-list li{margin:0}.wpcode-items-categories-list button{background:transparent;border:none;color:var(--wpcode-text-color-paragraph);cursor:pointer;display:block;font-size:var(--wpcode-font-size-m);font-weight:500;padding:12px 8px;position:relative;text-align:left;width:100%}.wpcode-items-categories-list button:focus,.wpcode-items-categories-list button.wpcode-active{background:var(--wpcode-background-highlight);color:var(--wpcode-text-color-highlight)}.wpcode-items-categories-list button:hover{text-decoration:underline}.wpcode-items-categories-list button .wpcode-items-count{float:right;color:var(--wpcode-text-color-paragraph);opacity:0.5}.wpcode-items-categories-list button.wpcode-active{font-weight:700}.wpcode-items-categories-list button.wpcode-active:hover{text-decoration:none}.wpcode-items-categories-list button.wpcode-active .wpcode-items-count{opacity:1;color:var(--wpcode-text-color-highlight);font-weight:700}.wpcode-items-list-category{align-content:stretch;display:flex;flex-wrap:wrap;justify-content:flex-start}.wpcode-list-item{border:1px solid var(--wpcode-border-color);border-radius:4px;margin-bottom:24px;margin-right:12px;margin-left:12px;max-width:100%;padding:16px 20px;position:relative;width:100%}@media (min-width:961px){.wpcode-list-item{width:calc(50% - 24px)}}@media (min-width:1440px){.wpcode-list-item{width:calc(100% / 3 - 24px)}}.wpcode-list-item h3,.wpcode-list-item .wpcode-list-item-title{font-size:var(--wpcode-font-size-m);line-height:1.2;margin:0;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}.wpcode-list-item p{margin-bottom:0}.wpcode-list-item:hover .wpcode-list-item-description,.wpcode-list-item:focus .wpcode-list-item-description{opacity:0}.wpcode-list-item:hover .wpcode-list-item-buttons,.wpcode-list-item:focus .wpcode-list-item-buttons{opacity:1}@media (hover:none){.wpcode-list-item .wpcode-list-item-description{opacity:0}.wpcode-list-item .wpcode-list-item-buttons{opacity:1}}.wpcode-list-item .wpcode-list-item-pill{position:absolute;top:10px;right:10px;font-size:8px;font-weight:700;text-transform:uppercase;line-height:1;padding:4px 8px;border-radius:40px}.wpcode-list-item .wpcode-list-item-pill.wpcode-list-item-pill-blue{background:var(--wpcode-color-primary);color:#fff}.wpcode-list-item .wpcode-list-item-pill.wpcode-list-item-pill-green{background:var(--wpcode-notice-success-bg);color:#fff}.wpcode-list-item .wpcode-list-item-pill.wpcode-list-item-pill-gray{background:var(--wpcode-text-color-heading);color:#fff}.wpcode-list-item .wpcode-list-item-pill.wpcode-list-item-pill-light{background:var(--wpcode-text-color-placeholder);color:#fff}.wpcode-list-item.wpcode-list-item-has-pill h3{max-width:calc(100% - 60px)}.wpcode-list-item.wpcode-custom-snippet,.wpcode-list-item.wpcode-library-item-ai{background:var(--wpcode-background-highlight)}.wpcode-list-item-actions{position:relative}.wpcode-list-item-description{min-height:40px}.wpcode-list-item-buttons{display:flex;justify-content:space-between;opacity:0;position:absolute;top:0;width:100%;z-index:10}.wpcode-list-item-buttons .wpcode-button{flex-grow:1;margin-left:10px;text-align:center}.wpcode-list-item-buttons .wpcode-button:first-child{margin-left:0}.wpcode-items-search{margin-bottom:20px;position:relative}.wpcode-items-search input{border-color:var(--wpcode-border-color);font-size:var(--wpcode-font-size-s);height:38px;padding-left:32px;width:100%}.wpcode-items-search input::-moz-placeholder{color:var(--wpcode-text-color-placeholder)}.wpcode-items-search input:-ms-input-placeholder{color:var(--wpcode-text-color-placeholder)}.wpcode-items-search input::placeholder{color:var(--wpcode-text-color-placeholder)}.wpcode-items-search label{left:10px;position:absolute;top:11px}.wpcode-library-preview-header{padding-bottom:25px}.wpcode-library-preview-header h2{margin:0}.wpcode-library-preview-header .wpcode-close-modal{float:right}.wpcode-library-preview-content .CodeMirror{background:var(--wpcode-background-gray)}.wpcode-library-preview-content .CodeMirror-activeline-background{background:transparent !important}.wpcode-library-preview-content .CodeMirror-focused .CodeMirror-activeline-background{background:rgba(100,100,100,0.1) !important}.wpcode-library-preview-buttons{margin-top:25px}.wpcode-item-use-button.wpcode-start-auth{padding-top:6px;padding-bottom:6px;justify-content:center}.wpcode-item-use-button.wpcode-start-auth svg{margin-right:9px}#wpcode-library-connect-banner{background:var(--wpcode-button-disabled-bg);margin-bottom:24px;margin-left:12px;border-radius:6px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding-right:20px;margin-right:12px}@media (min-width:961px){#wpcode-library-connect-banner{flex-direction:row}}#wpcode-library-connect-banner .wpcode-template-content{padding:20px;color:#444444}@media (min-width:961px){#wpcode-library-connect-banner .wpcode-template-content{width:80%}}#wpcode-library-connect-banner .wpcode-template-upgrade-button{text-align:right;flex-shrink:0;padding-bottom:20px}@media (min-width:961px){#wpcode-library-connect-banner .wpcode-template-upgrade-button{padding-bottom:0}}#wpcode-library-connect-banner .wpcode-template-upgrade-button button{white-space:pre}#wpcode-library-connect-banner h3{margin:0 0 5px}#wpcode-library-connect-banner p{margin:0}.wpcode-library-item-ai-not-available .wpcode-button{opacity:0.7;pointer-events:none}.wpcode-library-tab-navigation{position:relative;z-index:10}.wpcode-library-tab-navigation:before{content:'';width:1px;height:1px;background-color:var(--wpcode-border-color);position:absolute;top:100%;left:0;display:block}.wpcode-library-tab-button{border:1px solid var(--wpcode-border-color);margin-bottom:-1px;padding:10px 25px;font-size:var(--wpcode-font-size-m);border-radius:0 0 0 0;display:inline-block;margin-right:-5px;cursor:pointer;transition:background-color 300ms ease 0s,color 300ms ease;background-color:var(--wpcode-button-secondary-bg);font-weight:400;color:var(--wpcode-button-secondary-text)}.wpcode-library-tab-button.wpcode-library-tab-button-active{border-bottom-color:#fff;background:#fff;color:var(--wpcode-button-secondary-text-hover)}.wpcode-library-tab-button:first-child{border-radius:4px 0 0 0}.wpcode-library-tab-button:last-child{border-radius:0 4px 0 0}.wpcode-library-tab-button:hover,.wpcode-library-tab-button:focus{background:#fff;color:var(--wpcode-button-secondary-text-hover)}.wpcode-library-tab{position:relative;display:none}.wpcode-library-tab .wpcode-items-metabox{border-radius:0 4px 4px 4px}.wpcode-library-tab .wpcode-add-snippet-description+.wpcode-items-metabox{border-radius:0 0 4px 4px}.wpcode-library-tab.wpcode-library-tab-active{display:block}.wpcode-snippet-manager .wpcode-content .wpcode-library-suggest-plugins{padding:var(--wpcode-space-v)}.wpcode-snippet-manager .wpcode-content .wpcode-library-suggest-plugins .wpcode-suggestions-title{margin-bottom:var(--wpcode-space-v);margin-top:0}.wpcode-snippet-manager .wpcode-content .wpcode-library-suggest-plugins .wpcode-plugin-suggestions{flex-flow:wrap}.wpcode-snippet-manager .wpcode-content .wpcode-library-suggest-plugins .wpcode-plugin-suggestion-plugin{width:33.3333%;margin-bottom:var(--wpcode-space-h)}.wpcode-metabox .wpcode-alert{margin:var(--wpcode-space-v)}.wpcode-metabox .wpcode-alert h4{margin-bottom:0}.wpcode-generator .wpcode-items-metabox{margin-bottom:0}.wpcode-generator .wpcode-generator-preview .CodeMirror{height:auto}.wpcode-generator-preview{background-color:var(--wpcode-background-highlight);border-color:var(--wpcode-border-color);border-style:solid;border-width:0 1px 1px;padding:15px 28px 24px}.wpcode-generator-preview-header{align-items:center;display:flex;margin-bottom:14px}.wpcode-generator-preview-header h2{margin:0 8px 0 0}.wpcode-generator-preview-header .wpcode-button{margin-left:12px}.wpcode-form-tab:after{clear:both;content:'';display:table}.wpcode-generator-column{float:left;padding:14px 14px;width:calc(100% / 3)}.wpcode-generator-actions{padding:28px 14px 14px;text-align:center}.wpcode-generator-field{margin-bottom:24px}.wpcode-generator-field label{color:var(--wpcode-text-color-heading);display:block;font-size:var(--wpcode-font-size-s);font-weight:600;margin-bottom:8px}.wpcode-generator-field input[type="text"]{width:100%}.wpcode-generator-field select{max-width:100%;width:100%}.wpcode-field-description{margin-top:8px}.wpcode-generator-field-list ul{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s);list-style:disc;padding-left:18px}.wpcode-checkbox-line{margin-bottom:14px}.wpcode-checkbox-line .wpcode-checkbox-toggle{margin-right:8px}.wpcode-checkbox-line label{display:inline-block}.wpcode-repeater-group{border-top:1px solid var(--wpcode-border-color);padding-top:24px}.wpcode-repeater-group .wpcode-remove-row{margin-bottom:24px}#wpcode-importer-process{display:none}#wpcode-importer-process .process-completed{display:none}#wpcode-importer-process .status{background-color:#fff;border:1px solid #ddd;border-radius:3px;display:none;margin:20px 0 30px;max-height:800px;overflow-y:scroll}#wpcode-importer-process .item{border-bottom:1px solid #ddd;padding:20px}#wpcode-importer-process .item:last-of-type{border:none}#wpcode-importer-process .item .name{float:left;font-size:14px}#wpcode-importer-process .item .name svg{display:inline-block;margin:0 10px 0 0}#wpcode-importer-process .item .actions{float:right;font-size:14px}.wpcode-clear:after{clear:both;content:" ";display:table}#wpcode-plugins-importer{margin-bottom:20px;max-width:100%;width:400px}.wpcode-tools .pre-error,.wpcode-tools .info-area{background:#fff;border:1px solid #ddd;box-shadow:none;display:block;font-family:Menlo,Monaco,monospace;font-size:12px;height:450px;max-width:1000px;overflow:auto;padding:20px;white-space:pre;width:100%}.wpcode-admin-page .wpcode-alert{border:1px solid transparent;margin-bottom:18px;padding:16px}.wpcode-admin-page .wpcode-alert h4{color:inherit;margin-top:0}.wpcode-admin-page .wpcode-alert p{margin:0 0 15px 0}.wpcode-admin-page .wpcode-alert p:last-of-type{margin:0}.wpcode-admin-page .wpcode-alert.wpcode-alert-nomargin{margin:0}.wpcode-admin-page .wpcode-alert.wpcode-alert-small{font-size:12px}.wpcode-admin-page .wpcode-alert.wpcode-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.wpcode-admin-page .wpcode-alert.wpcode-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.wpcode-admin-page .wpcode-alert.wpcode-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.wpcode-admin-page .wpcode-alert.wpcode-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}#wpcode-log-data{margin-top:25px;background:var(--wpcode-background-white);border:1px solid var(--wpcode-border-color);padding:5px 20px}#wpcode-log-data pre{font-family:monospace;white-space:pre-wrap;word-wrap:break-word;color:var(--wpcode-text-color-heading)}.wpcode-docs-overlay{background-color:var(--wpcode-background-white);bottom:0;display:none;left:0;max-height:100vh;opacity:1;overflow-y:auto;position:fixed;right:0;top:46px;z-index:100100}.wpcode-docs-overlay *{box-sizing:border-box}@media screen and (min-width:783px){.wpcode-docs-overlay{left:36px;top:32px}}@media screen and (min-width:961px){.wpcode-docs-overlay{left:160px}.folded .wpcode-docs-overlay{left:36px}}#wpcode-help-logo{left:36px;position:absolute;top:24px}#wpcode-help-close{cursor:pointer;display:inline-block;height:30px;padding:5px;position:absolute;right:37px;top:25px;transition:all 0.05s ease-out;width:30px;z-index:10}.wpcode-docs-content{background-color:var(--wpcode-background-white);margin:0 auto 50px auto;max-width:100%;padding:0 30px;width:760px}.wpcode-help-docs{margin-bottom:20px;padding:0 18px}.wpcode-help-docs a{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-m);text-decoration:none}.wpcode-help-docs a:hover,.wpcode-help-docs a:focus{color:var(--wpcode-text-color-heading);text-decoration:underline}.wpcode-help-docs .wpcode-icon-file-text{margin-right:14px}.wpcode-help-docs li{margin-bottom:18px}.wpcode-help-categories-toggle{border-bottom:1px solid var(--wpcode-border-color);margin-bottom:40px}.wpcode-help-category{border-top:1px solid var(--wpcode-border-color);margin:0}.wpcode-help-category header{align-items:center;color:var(--wpcode-text-color-heading);cursor:pointer;display:flex;flex-direction:row;font-size:var(--wpcode-font-size-l);font-weight:600;justify-content:flex-start;padding-left:18px;padding-right:25px}.wpcode-help-category header:hover{color:var(--wpcode-color-primary)}.wpcode-help-category .wpcode-icon-folder{margin:23px 11px 23px 0}.wpcode-help-category .wpcode-icon-arrow{margin-left:auto;transform-origin:center;transition:transform 300ms ease}.wpcode-help-category.open .wpcode-icon-arrow{transform:rotate(90deg)}.wpcode-help-category .wpcode-help-docs{display:none}#wpcode-help-search{padding:74px 0 50px 0;position:relative;text-align:center;top:0}#wpcode-help-search .wpcode-icon-search{display:none;left:17px;position:absolute;top:92px}#wpcode-help-search input{background-image:none;background-position:22px center;background-repeat:no-repeat;background-size:20px 20px;border:1px solid var(--wpcode-border-color);border-radius:3px;color:var(--wpcode-text-color-heading);font-size:20px;letter-spacing:0;line-height:20px;min-height:48px;padding:10px 10px 10px 42px;text-align:left;width:100%}#wpcode-help-search #wpcode-help-search-clear{cursor:pointer;left:17px;opacity:.7;position:absolute;top:92px}#wpcode-help-search.wpcode-search-empty #wpcode-help-search-clear{display:none}#wpcode-help-search.wpcode-search-empty .wpcode-icon-search{display:block}#wpcode-help-no-result li span{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s)}.wpcode-help-footer{align-items:center;display:flex;justify-content:space-between}.wpcode-help-footer .wpcode-help-footer-box{border:1px solid var(--wpcode-border-color);border-radius:8px;padding:40px 38px;text-align:center;width:calc(50% - 18px)}.wpcode-help-footer .wpcode-help-footer-box h3{font-size:var(--wpcode-font-size-l)}.wpcode-help-footer .wpcode-help-footer-box p{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-m)}.wpcode-notifications-drawer{background:var(--wpcode-background-white);border-left:1px solid var(--wpcode-border-color);bottom:0;position:fixed;right:-375px;top:32px;transition:right 300ms ease 0s,visibility 0s ease 400ms;visibility:hidden;width:375px;z-index:1100}.wpcode-notifications-open .wpcode-notifications-drawer{right:0;transition:right 300ms ease 0s,visibility 0s ease 0ms;visibility:visible}.wpcode-notifications-overlay{background-color:rgba(0,0,0,0.3);bottom:0;display:none;left:0;opacity:.5;position:fixed;right:0;top:46px;transition:.5s;z-index:1052}.folded .wpcode-notifications-overlay{left:36px}.wpcode-notifications-open .wpcode-notifications-overlay{display:block}@media screen and (min-width:783px){.wpcode-notifications-overlay{left:36px}.admin-bar .wpcode-notifications-overlay{top:32px}}@media screen and (min-width:961px){.wpcode-notifications-overlay{left:160px}.folded .wpcode-notifications-overlay{left:36px}}.wpcode-notifications-header{background:var(--wpcode-background-highlight);border-bottom:1px solid var(--wpcode-border-color);padding:18px 40px 18px 20px}.wpcode-notifications-header .wpcode-notifications-close{position:absolute;right:18px;top:22px}.wpcode-notifications-header .wpcode-notifications-close path{fill:var(--wpcode-text-color-heading)}.wpcode-notifications-header h3{color:var(--wpcode-text-color-heading);display:inline-block;font-size:var(--wpcode-font-size-s);font-weight:700;line-height:21px;margin:0 10px 0 0}.wpcode-notifications-list{height:calc(100% - 130px);overflow:auto}.wpcode-notifications-list ul{margin:0}.wpcode-notifications-list li{border-top:1px solid var(--wpcode-border-color);display:flex;margin:0;padding:24px}.wpcode-notifications-list li:first-child{border-top:none}.wpcode-notifications-list li h4{color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-s);font-weight:600;line-height:21px;margin:0}.wpcode-notifications-list p{color:var(--wpcode-text-color-light-bg);font-size:var(--wpcode-font-size-s);margin:8px 0}.wpcode-notifications-list p.wpcode-start{font-size:var(--wpcode-font-size-xs)}.wpcode-notification-actions .wpcode-button{margin-right:10px}.wpcode-notifications-footer{border-top:1px solid var(--wpcode-border-color);padding:24px 27px;text-align:right}#wpcode-dismissed-title,#wpcode-notifications-show-active,.wpcode-notifications-dismissed{display:none}.show-dismissed #wpcode-notifications-show-dismissed,.show-dismissed .wpcode-notifications-active,.show-dismissed #wpcode-active-title{display:none}.show-dismissed #wpcode-notifications-show-active,.show-dismissed #wpcode-dismissed-title{display:inline-block}.show-dismissed .wpcode-notifications-dismissed{display:block}.wpcode-notifications-dismissed .wpcode-notification-dismiss{display:none}.wpcode-notification-icon{margin-right:10px}.wpcode-help-tooltip{cursor:help;display:inline-block;position:relative;vertical-align:middle}.wpcode-help-tooltip .wpcode-help-tooltip-text{background-color:var(--wpcode-color-primary);border-radius:6px;bottom:100%;color:#fff;font-size:var(--wpcode-font-size-s);font-weight:400;left:50%;margin-bottom:12px;margin-left:-90px;padding:12px 12px;position:absolute;text-align:center;visibility:hidden;width:180px;z-index:500}.wpcode-help-tooltip .wpcode-help-tooltip-text:after{border-color:var(--wpcode-color-primary) transparent transparent transparent;border-style:solid;border-width:10px 9px 0 9px;content:'';height:0;left:50%;margin-left:-9px;position:absolute;top:100%;width:0}.wpcode-help-tooltip .wpcode-help-tooltip-text:before{content:'';top:100%;height:20px;left:0;right:0;position:absolute;background:transparent}.wpcode-help-tooltip .wpcode-help-tooltip-text a{color:#fff}.wpcode-help-tooltip:hover .wpcode-help-tooltip-text{visibility:visible}.wpcode-help-tooltip .wpcode-icon-help{margin-top:1px}.wpcode-help-tooltip .wpcode-icon-help path{fill:#8A8A8A}.wpcode-upgrade-welcome{background:#f3f4f5}.wpcode-welcome-content{max-width:1168px;margin:24px auto;clear:both}.wpcode-welcome-content *{box-sizing:border-box}.wpcode-welcome-content h2{font-size:22px;font-weight:600;margin-top:0;line-height:1.2}.wpcode-welcome-content h3{font-size:1.5em}.wpcode-welcome-content p{font-size:1.2em}.wpcode-welcome-box{background:#fff;padding:40px;border:1px solid #ddd;border-radius:4px;margin-bottom:30px}@media (max-width:767px){.wpcode-welcome-box{padding:26px}}.wpcode-welcome-logo{margin:4px 0 28px}.wpcode-welcome-text{width:700px;margin:32px auto;max-width:100%}.wpcode-welcome-features{display:flex;justify-content:space-between;flex-wrap:wrap;margin-top:42px}.wpcode-welcome-features .wpcode-welcome-feature{width:calc(33.3% - 16px);text-align:center;margin-bottom:32px;display:flex}@media (max-width:782px){.wpcode-welcome-features .wpcode-welcome-feature{width:100%}}.wpcode-welcome-features .wpcode-welcome-feature p{font-size:16px}.wpcode-welcome-features .wpcode-welcome-feature h3{font-size:18px;margin-top:6px}.wpcode-welcome-features .wpcode-welcome-feature .wpcode-welcome-feature-text{text-align:left;margin-left:16px}.wpcode-welcome-features .wpcode-welcome-feature-icon-icon path{fill:var(--wpcode-color-primary)}.wpcode-welcome-highlight{grid-template-columns:1fr 1fr;display:grid}@media (max-width:767px){.wpcode-welcome-highlight{grid-template-columns:1fr}}.wpcode-welcome-highlight .wpcode-welcome-highlight-column{padding:16px 0;align-self:center;grid-column-start:2}@media (min-width:768px){.wpcode-welcome-highlight .wpcode-welcome-highlight-column{padding:16px 20px}.wpcode-welcome-highlight .wpcode-welcome-highlight-column:nth-of-type(2n+1){grid-column-start:1}.wpcode-welcome-highlight .wpcode-welcome-highlight-column:nth-of-type(2n){grid-column-start:2}}.wpcode-welcome-highlight img{max-width:100%;width:100%;height:auto}.wpcode-buttons-row{text-align:left}.wpcode-welcome-syed-mircea{font-size:1.2em}.wpcode-welcome-syed-mircea .wpcode-welcome-person{display:inline-flex;align-items:center;margin-right:60px;margin-top:32px}.wpcode-welcome-syed-mircea .wpcode-welcome-person-image{margin-right:15px}.wpcode-welcome-syed-mircea .wpcode-welcome-person-text{font-size:13px;color:var(--wpcode-text-color-paragraph)}.wpcode-welcome-syed-mircea h4{color:var(--wpcode-text-color-heading);margin:0 0 4px;font-size:16px;font-weight:600}.wpcode-welcome-syed-mircea img{display:block;margin-bottom:0}.wpcode-welcome-syed-mircea span{align-self:end}.wpcode-upgrade-welcome #wpcontent{padding-right:10px}@media screen and (min-width:783px){.wpcode-upgrade-welcome #wpcontent{padding-right:20px}}.wpcode-loading-spinner{-webkit-animation:wpcode-spinner-rotation 0.8s linear infinite;animation:wpcode-spinner-rotation 0.8s linear infinite;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4MCA4MCI+CiAgICA8cGF0aCBkPSJNNDAgMEMxNy45IDAgMCAxNy45IDAgNDBzMTcuOSA0MCA0MCA0MCA0MC0xNy45IDQwLTQwUzYyLjEgMCA0MCAwem0wIDcyQzIyLjMgNzIgOCA1Ny43IDggNDBTMjIuMyA4IDQwIDhzMzIgMTQuMyAzMiAzMi0xNC4zIDMyLTMyIDMyeiIKICAgICAgICAgIG9wYWNpdHk9Ii4xNSIvPgogICAgPHBhdGggZmlsbD0iIzM1NjhCNyIKICAgICAgICAgIGQ9Ik03NS44IDQ3LjRoLS40Yy0yLjItLjItMy44LTIuMi0zLjYtNC40LjEtMSAuMS0yIC4xLTNDNzIgMjIuNCA1Ny42IDggNDAgOGMtMi4yIDAtNC0xLjgtNC00czEuOC00IDQtNGMyMi4xIDAgNDAgMTcuOSA0MCA0MCAwIDEuMy0uMSAyLjUtLjIgMy44LS4yIDIuMS0xLjkgMy42LTQgMy42eiIvPgo8L3N2Zz4K);background-repeat:no-repeat;background-size:16px 16px;display:none;height:16px;margin:0 10px;position:absolute;width:16px;z-index:40}@-webkit-keyframes wpcode-spinner-rotation{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes wpcode-spinner-rotation{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.wpcode-pro-pill{background:#bbb;color:var(--wpcode-background-white);text-transform:uppercase;padding:4px 7px;border-radius:9px;font-size:8px;line-height:1;display:inline-block;vertical-align:text-top}.wpcode-revisions-list-area{margin:24px 0 24px;position:relative}.wpcode-revisions-list-area #wpcode-show-all-snippets{margin-top:24px}.wpcode-revisions-list{border-left:1px solid var(--wpcode-border-color);padding-left:22px;margin:0}.wpcode-revisions-list.wpcode-revisions-list-collapsed{display:none}.wpcode-revisions-list.wpcode-revisions-list-extra{margin-top:0}.wpcode-revisions-list.wpcode-revisions-list-extra .wpcode-revision-list-item:first-child{background-color:var(--wpcode-button-disabled-bg)}.wpcode-revision-list-item{background:var(--wpcode-button-disabled-bg);padding:6px 9px;font-size:var(--wpcode-font-size-s);position:relative}.wpcode-revision-list-item .avatar{border-radius:50%;vertical-align:middle}.wpcode-revision-list-item:before{position:absolute;content:'';width:7px;height:7px;border-radius:50%;background-color:#C4C4C4;border:2px solid #FFF;right:100%;margin-right:17px;top:50%;margin-top:-5px}.wpcode-revision-list-item:first-child{background-color:var(--wpcode-background-highlight)}.wpcode-revision-list-author{display:inline-block;margin:0 10px 0 12px;font-weight:600;color:var(--wpcode-text-color-heading)}.wpcode-revision-list-date{color:var(--wpcode-text-color-light-bg)}.wpcode-remote-icon{background:#c5c5c6;border-radius:50%;display:inline-block;width:30px;height:30px;vertical-align:middle;text-align:center;line-height:30px}.wpcode-remote-icon svg path{fill:#fff}.wpcode-revision-list-item-actions{float:right;display:inline-flex;vertical-align:middle;align-items:center;margin-top:7px;margin-right:6px}.wpcode-revision-list-item-actions span,.wpcode-revision-list-item-actions a{font-size:12px;color:var(--wpcode-text-color-paragraph);margin-left:14px}.wpcode-revision-list-item-actions span:hover,.wpcode-revision-list-item-actions a:hover{text-decoration:none}.wpcode-blur-area{filter:blur(2px);pointer-events:none}.wpcode-library .wpcode-content{position:relative}#poststuff .wpcode-upsell-box,.wpcode-upsell-box{position:absolute;z-index:20;background:var(--wpcode-background-white);width:662px;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%);padding:40px;text-align:center;border-radius:8px;border:1px solid var(--wpcode-border-color)}#poststuff .wpcode-upsell-box *,.wpcode-upsell-box *{box-sizing:border-box}#poststuff .wpcode-upsell-box h2,.wpcode-upsell-box h2{font-size:var(--wpcode-font-size-xxl);margin-top:0;line-height:1.2}#poststuff .wpcode-upsell-box .wpcode-button,.wpcode-upsell-box .wpcode-button{margin-top:6px}#poststuff .wpcode-upsell-box .wpcode-upsell-button-text,.wpcode-upsell-box .wpcode-upsell-button-text{margin-top:16px;display:inline-block;font-size:var(--wpcode-font-size-s);color:var(--wpcode-text-color-light-bg)}#poststuff .wpcode-upsell-box .wpcode-upsell-button-text:hover,.wpcode-upsell-box .wpcode-upsell-button-text:hover{text-decoration:none}#poststuff .wpcode-upsell-box p,.wpcode-upsell-box p{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-m);line-height:1.5}#poststuff .wpcode-upsell-box.wpcode-upsell-box-with-features,.wpcode-upsell-box.wpcode-upsell-box-with-features{width:892px;padding:56px}#poststuff .wpcode-upsell-box.wpcode-upsell-box-with-features .wpcode-upsell-text,.wpcode-upsell-box.wpcode-upsell-box-with-features .wpcode-upsell-text{max-width:600px;margin:0 auto}#poststuff .wpcode-upsell-box .wpcode-upsell-features,.wpcode-upsell-box .wpcode-upsell-features{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:40px;margin-bottom:24px;text-align:left}#poststuff .wpcode-upsell-box .wpcode-upsell-features .wpcode-upsell-feature,.wpcode-upsell-box .wpcode-upsell-features .wpcode-upsell-feature{width:50%;color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-m);margin-bottom:16px;line-height:1.5;padding-left:34px;position:relative;padding-right:10px}#poststuff .wpcode-upsell-box .wpcode-upsell-features .wpcode-upsell-feature:before,.wpcode-upsell-box .wpcode-upsell-features .wpcode-upsell-feature:before{content:'';background-image:url("data:image/svg+xml,%3Csvg width=%2719%27 height=%2718%27 viewBox=%270 0 19 18%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath fill-rule=%27evenodd%27 clip-rule=%27evenodd%27 d=%27M9.5 0.416016C4.67 0.416016 0.75 4.33602 0.75 9.16602C0.75 13.996 4.67 17.916 9.5 17.916C14.33 17.916 18.25 13.996 18.25 9.16602C18.25 4.33602 14.33 0.416016 9.5 0.416016ZM9.5 16.166C5.64125 16.166 2.5 13.0248 2.5 9.16602C2.5 5.30727 5.64125 2.16602 9.5 2.16602C13.3587 2.16602 16.5 5.30727 16.5 9.16602C16.5 13.0248 13.3587 16.166 9.5 16.166ZM7.75 11.0648L13.5163 5.29852L14.75 6.54102L7.75 13.541L4.25 10.041L5.48375 8.80727L7.75 11.0648Z%27 fill=%27%2309A347%27/%3E%3C/svg%3E");display:block;width:19px;height:18px;position:absolute;left:0;top:3px}.wpcode-pixel .wpcode-upsell-box .wpcode-upsell-text{max-width:750px}@media (max-width:1440px){.wpcode-library .wpcode-upsell-box{top:100px;transform:translate(-50%,0)}}.wpcode-hide{display:none}.wpcode-setting-license-wrapper .wpcode-input-text{max-width:400px}.wpcode-settings .wpcode-metabox-form-row-input input[type="number"]{width:80px;margin-right:10px}.wpcode-settings .wpcode-metabox-form-row-input input[type="number"]+label{margin-right:10px}.wpcode-settings .wpcode-metabox-form-row-input>label{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s)}.wpcode-settings .wpcode-metabox-form-row-input input[type="password"]{width:400px}.wpcode-settings #wpcode-notice-global-emailsmtp{margin-left:0;margin-right:0}.wpcode-settings #wpcode-notice-global-emailsmtp h3{margin-bottom:5px}.wpcode-notice-top-area .notice-top{margin:0;border:0;box-shadow:none;background-color:#dddddd;color:var(--wpcode-text-color-heading);text-align:center}.wpcode-notice-top-area .notice-top a{color:var(--wpcode-color-primary)}.wpcode-icon-new{color:var(--wpcode-notice-success-bg);vertical-align:super;font-size:9px;font-weight:600;padding-left:2px}.wpcode-notice .wpcode-icon-new{margin-right:5px}.wpcode-features-list{display:flex;justify-content:space-between;max-width:1000px}@media (max-width:1200px){.wpcode-features-list{flex-direction:column}}.wpcode-features-list ul{margin:0}.wpcode-features-list li{color:var(--wpcode-text-color-heading);font-size:14px;margin-bottom:15px}.wpcode-features-list li:before{content:'+';margin-right:5px;vertical-align:center}#wpcode-notice-ihaf-snippets{margin:0 0 36px;border-left:1px solid #c3c4c7}#wpcode-notice-ihaf-snippets p{color:var(--wpcode-text-color-heading)}.wpcode-modal-area{border:1px solid var(--wpcode-border-color);padding:26px;width:752px;max-width:100%;margin:60px auto;background:#fff;border-radius:8px}.wpcode-modal-area .notice{margin:0}.wpcode-buttons-row{margin:40px 0 0;text-align:center}.wpcode-modal-header{text-align:center}.wpcode-items-metabox-inside{background-color:var(--wpcode-background-gray);margin-bottom:var(--wpcode-space-v);margin-left:-24px;margin-right:-24px;border-top:1px solid #F5F5F5;border-bottom:1px solid #F5F5F5}.wpcode-items-metabox-inside .wpcode-list-item-location{cursor:pointer}.wpcode-items-metabox-inside .wpcode-list-item-location *{cursor:pointer}.wpcode-items-metabox-inside .wpcode-list-item{padding:0;border:none;font-size:14px;margin-top:12px;margin-bottom:12px}.wpcode-items-metabox-inside .wpcode-list-item.wpcode-list-item-disabled .wpcode-list-item-title{color:#848A8A}.wpcode-items-metabox-inside .wpcode-list-item.wpcode-list-item-disabled .wpcode-list-item-description{color:rgba(119,119,119,0.50)}@media (min-width:961px){.wpcode-items-metabox-inside .wpcode-list-item{width:calc(50% - 24px)}}.wpcode-items-metabox-inside .wpcode-list-item.wpcode-list-item-separator{width:100%;color:var(--wpcode-text-color-heading);font-size:var(--wpcode-font-size-m);font-weight:700;padding:0;border:none;margin-top:16px}.wpcode-items-metabox-inside .wpcode-list-item .wpcode-list-item-title{font-size:var(--wpcode-font-size-s);color:var(--wpcode-text-color-heading);font-weight:700;display:block}.wpcode-items-metabox-inside .wpcode-list-item:hover .wpcode-list-item-description,.wpcode-items-metabox-inside .wpcode-list-item:focus .wpcode-list-item-description{opacity:1}.wpcode-items-metabox-inside .wpcode-list-item input{opacity:0;position:absolute}.wpcode-items-metabox-inside .wpcode-list-item.wpcode-list-item-selected .wpcode-list-item-title:after{content:attr(data-selected-label);display:inline-block;position:absolute;left:auto;top:0;margin-left:5px;vertical-align:middle;background-color:var(--wpcode-color-primary);color:#fff;font-size:8px;font-weight:700;text-transform:uppercase;line-height:1;padding:4px 8px;border-radius:40px}.wpcode-items-metabox-inside .wpcode-list-item-description{margin-top:8px;display:block;min-height:0;color:var(--wpcode-text-color-paragraph)}.wpcode-items-metabox-inside .wpcode-items-list-category{margin-top:0}.wpcode-items-metabox-inside .wpcode-items-list{padding:5px 12px;position:relative}.wpcode-items-metabox-inside .wpcode-items-list:before{content:'';display:block;position:absolute;top:-10px;left:417px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid var(--wpcode-background-gray);z-index:10}.wpcode-items-metabox-inside .wpcode-items-list:after{content:'';display:block;position:absolute;top:-11px;left:417px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #F5F5F5;z-index:5}.wpcode-items-metabox-inside .wpcode-keywords{display:none}.wpcode-items-metabox-inside .wpcode-list-item-pill{display:inline-block;position:relative;right:0;top:0;margin-left:5px;vertical-align:middle;color:#fff}.wpcode-items-metabox-inside .wpcode-items-categories-list .wpcode-active:after{background-image:url("data:image/svg+xml,%3Csvg width=%2716%27 height=%2712%27 viewBox=%270 0 16 12%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M5.33329 9.25326L1.83329 5.75326L0.666626 6.91992L5.33329 11.5866L15.3333 1.58659L14.1666 0.419922L5.33329 9.25326Z%27 fill=%27%233568B7%27/%3E%3C/svg%3E%0A");content:'';height:12px;position:absolute;right:10px;top:50%;transform:translateY(-50%);width:16px}.wpcode-faux-select{border-color:var(--wpcode-border-color);border-radius:4px;border-width:1px;border-style:solid;color:var(--wpcode-text-color-heading);cursor:pointer;line-height:38px;min-height:40px;padding-left:12px;padding-right:32px;font-size:14px;background:var(--wpcode-background-white) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 13px top 55%;max-width:424px;width:100%}.wpcode-faux-select:focus{outline:none;box-shadow:0 0 0 1px var(--wpcode-color-primary)}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row{max-width:100%}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input{display:flex;align-items:center;flex-flow:wrap}@media (min-width:1470px){.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input{flex-flow:row}}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-fields{display:flex;align-items:center;margin-top:24px;width:100%}@media (min-width:1470px){.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-fields{margin-top:0}}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-input{display:flex;align-items:center;position:relative;margin-right:18px}@media (min-width:1470px){.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-input{margin-right:0}}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-input .wpcode-location-extra-input-description{flex-shrink:0}.wpcode-auto-insert-form-fields .wpcode-metabox-form-row-input .wpcode-extra-location-input .wpcode-help-tooltip{margin-left:10px}.wpcode-auto-insert-form-fields .wpcode-location-extra-input-description{color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s);margin:0 18px 0 0}@media (min-width:1470px){.wpcode-auto-insert-form-fields .wpcode-location-extra-input-description{margin-left:18px}}.wpcode-auto-insert-form-fields .wpcode-input-number{max-width:75px}#wpcode_auto_insert_location .wpcode-list-item-description{opacity:1}.wpcode-smart-tags{position:relative;display:inline-block;vertical-align:top}.wpcode-smart-tags.wpcode-smart-tags-unavailable .wpcode-smart-tags-toggle{opacity:0.6}.wpcode-smart-tags .wpcode-smart-tags-toggle{background:none;border:none;color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s);cursor:pointer}.wpcode-smart-tags .wpcode-smart-tags-toggle svg{vertical-align:middle}.wpcode-smart-tags .wpcode-smart-tags-toggle span{text-decoration:underline}.wpcode-smart-tags .wpcode-smart-tags-toggle:hover span{text-decoration:none}.wpcode-smart-tags .wpcode-text-active{display:none}.wpcode-smart-tags .wpcode-smart-tags-dropdown{border:1px solid var(--wpcode-border-color);border-radius:4px;display:none;left:0;position:absolute;top:100%;z-index:1050;background:#fff;width:400px;margin-top:7px}.wpcode-smart-tags .wpcode-smart-tags-dropdown ul{border-top:1px solid var(--wpcode-border-color)}.wpcode-smart-tags .wpcode-smart-tags-dropdown ul:first-child{border-top:none}.wpcode-smart-tags .wpcode-smart-tags-dropdown ul li{padding:0 15px;margin:12px 0}.wpcode-smart-tags .wpcode-smart-tags-dropdown .wpcode-smart-tag-category-label{font-weight:600;font-size:var(--wpcode-font-size-s);color:var(--wpcode-text-color-paragraph)}.wpcode-smart-tags.wpcode-smart-tags-open .wpcode-text-active{display:inline-block}.wpcode-smart-tags.wpcode-smart-tags-open .wpcode-text-default{display:none}.wpcode-smart-tags.wpcode-smart-tags-open .wpcode-smart-tags-dropdown{display:block}.wpcode-insert-smart-tag{border:0;color:var(--wpcode-text-color-paragraph);font-size:var(--wpcode-font-size-s);padding:0;text-align:left;background:none;cursor:pointer}.wpcode-insert-smart-tag:hover code{background-color:rgba(0,0,0,0.15)}.wpcode-smart-tags-dropdown-footer{padding:12px 15px;border-top:1px solid var(--wpcode-border-color);display:flex}.wpcode-smart-tags-dropdown-footer a{color:var(--wpcode-text-color-paragraph);display:inline-flex}.wpcode-smart-tags-dropdown-footer a .wpcode-icon{margin-right:5px}.wpcode-toggle-testing-mode-wrap{opacity:0.6}.wpcode-plugin-page{margin:50px auto;width:700px;max-width:100%;text-align:center}.wpcode-plugin-page-image{margin-bottom:38px}.wpcode-plugin-screenshot{display:flex;text-align:left;margin:50px 0}.wpcode-plugin-screenshot ul{margin-left:30px;margin-top:0}.wpcode-plugin-screenshot ul li{margin:16px 0;padding:0 0 0 24px;font-size:15px;color:var(--wpcode-text-color-paragraph);background-image:url("data:image/svg+xml,%3Csvg width=%2719%27 height=%2718%27 viewBox=%270 0 19 18%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath fill-rule=%27evenodd%27 clip-rule=%27evenodd%27 d=%27M9.5 0.416016C4.67 0.416016 0.75 4.33602 0.75 9.16602C0.75 13.996 4.67 17.916 9.5 17.916C14.33 17.916 18.25 13.996 18.25 9.16602C18.25 4.33602 14.33 0.416016 9.5 0.416016ZM9.5 16.166C5.64125 16.166 2.5 13.0248 2.5 9.16602C2.5 5.30727 5.64125 2.16602 9.5 2.16602C13.3587 2.16602 16.5 5.30727 16.5 9.16602C16.5 13.0248 13.3587 16.166 9.5 16.166ZM7.75 11.0648L13.5163 5.29852L14.75 6.54102L7.75 13.541L4.25 10.041L5.48375 8.80727L7.75 11.0648Z%27 fill=%27%2309A347%27/%3E%3C/svg%3E");background-position:left 3px;background-repeat:no-repeat;background-size:14px}.wpcode-plugin-screenshot-image{width:315px;padding:5px;background:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);border-radius:3px;position:relative}.wpcode-plugin-screenshot-image img{max-width:100%;display:block}.wpcode-plugin-screenshot-image a{position:absolute;opacity:0;height:100%;width:100%;top:0;left:0;border:5px solid #ffffff;background-color:rgba(0,0,0,0.15);background-repeat:no-repeat;background-position:center;background-size:50px;transition:all 0.3s;display:flex;justify-content:center;align-items:center}.wpcode-plugin-screenshot-image a:before{content:'';position:absolute;width:50px;height:50px;border-radius:50%;background-color:var(--wpcode-color-primary);opacity:1;top:50%;left:50%;transform:translate(-50%,-50%)}.wpcode-plugin-screenshot-image a svg{position:relative;z-index:10}.wpcode-plugin-screenshot-image a svg path{fill:#fff}.wpcode-plugin-screenshot-image a:hover{opacity:1}.wpcode-plugin-step{background-color:#f9f9f9;box-shadow:0 2px 5px 0 rgba(0,0,0,0.05);border:1px solid #e5e5e5;margin:0 0 25px 0;text-align:left}.wpcode-plugin-step>*{vertical-align:middle}.wpcode-plugin-step .wpcode-plugin-page-step-num{display:inline-block;position:relative;width:100px;height:50px;text-align:center}.wpcode-plugin-step .wpcode-plugin-page-step-num .wpcode-icon-step-1{background-color:#ccc;border-radius:50%}.wpcode-plugin-step div{display:inline-block;width:calc(100% - 104px);background-color:#ffffff;padding:30px;border-left:1px solid #eeeeee}.wpcode-plugin-step div h2{margin-top:0}.wpcode-plugin-page-step-loader{margin:0 auto;position:relative;text-indent:-9999em;border-top:4px solid #969696;border-right:4px solid #969696;border-bottom:4px solid #969696;border-left:4px solid #404040;transform:translateZ(0);-webkit-animation:wpcoderotate1 1.1s infinite linear;animation:wpcoderotate1 1.1s infinite linear;background-color:transparent;display:block;border-radius:50%;width:50px;height:50px;margin-top:-54px}.wpcode-plugin-page-step-loader.wpcode-plugin-page-step-loader-hidden{opacity:0}.wpcode-plugin-page-step-loader:after{display:block;border-radius:50%;width:50px;height:50px}@-webkit-keyframes wpcoderotate1{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes wpcoderotate1{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}/*! Lity - v2.4.1 - 2020-04-26 * http://sorgalla.com/lity/ * Copyright (c) 2015-2020 Jan Sorgalla; Licensed MIT */.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,0.9);outline:none !important;opacity:0;transition:opacity 0.3s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-0.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;transition:opacity 0.3s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important}.lity-content{z-index:9993;width:100%;transform:scale(1);transition:transform 0.3s ease}.lity-loading .lity-content,.lity-closed .lity-content{transform:scale(0.8)}.lity-content:after{content:'';position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6)}.lity-close{z-index:9994;width:35px;height:35px;position:fixed;right:0;top:0;-webkit-appearance:none;cursor:pointer;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;box-shadow:none}.lity-close::-moz-focus-inner{border:0;padding:0}.lity-close:hover,.lity-close:focus,.lity-close:active,.lity-close:visited{text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;box-shadow:none}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container,.lity-youtube .lity-container,.lity-vimeo .lity-container,.lity-facebookvideo .lity-container,.lity-googlemaps .lity-container{width:100%;max-width:964px}.lity-iframe-container{width:100%;height:0;padding-top:56.25%;overflow:auto;pointer-events:auto;transform:translateZ(0);-webkit-overflow-scrolling:touch}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}.lity-hide{display:none}.wpcode-admin-page .lity{z-index:100000;padding:20px}.wpcode-admin-page .lity-content img{max-height:80vh !important;max-width:80vw !important}.wpcode-content .wpcode-plugin-suggestions,.wrap .wpcode-plugin-suggestions{display:flex;align-items:center;margin-top:0}.wpcode-content .wpcode-plugin-suggestions h3,.wrap .wpcode-plugin-suggestions h3{margin-top:0;margin-bottom:5px}.wpcode-content .wpcode-plugin-suggestions p,.wrap .wpcode-plugin-suggestions p{padding:0}@media (max-width:782px){.wpcode-content .wpcode-plugin-suggestions,.wrap .wpcode-plugin-suggestions{flex-direction:column;align-items:flex-start}}.wpcode-content .wpcode-plugin-suggestions:first-child,.wpcode-content .wpcode-plugin-suggestions div:first-child,.wrap .wpcode-plugin-suggestions:first-child,.wrap .wpcode-plugin-suggestions div:first-child{margin-top:0}.wpcode-content .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin,.wrap .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin{width:33%;margin:0 0 20px;display:flex}.wpcode-content .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin .wpcode-plugin-suggestion-plugin-icon,.wrap .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin .wpcode-plugin-suggestion-plugin-icon{margin-right:12px}@media (max-width:782px){.wpcode-content .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin,.wrap .wpcode-plugin-suggestions .wpcode-plugin-suggestion-plugin{width:100%}}.wpcode-content .wpcode-suggestions-title,.wrap .wpcode-suggestions-title{padding:0;margin-bottom:12px;margin-top:20px}.wpcode-code-type-picker{position:fixed;left:160px;right:0;z-index:1100;background:#f0f0f1;text-align:left;padding:30px 40px 30px;bottom:-1000px;border-top:1px solid var(--wpcode-border-color);transition:bottom 0.30s ease}.folded .wpcode-code-type-picker{left:36px}@media (max-width:768px){.wpcode-code-type-picker{left:0}.wp-responsive-open .wpcode-code-type-picker{display:none}}.wpcode-code-type-picker .wpcode-code-types-list{display:grid;grid-gap:40px;padding:0 40px;grid-template-columns:repeat(auto-fill,minmax(Max(150px,200px),1fr));max-width:1100px;margin:0 auto}@media (max-width:1239px){.wpcode-code-type-picker .wpcode-code-types-list{padding:0;grid-gap:20px}}@media (max-height:480px) OR (max-width:768px){.wpcode-code-type-picker .wpcode-code-types-list .wpcode-code-type-desc{display:none}}.wpcode-code-textarea{position:relative}.wpcode-code-type{border-radius:6px;height:100%;overflow:hidden;padding:0 0 15px;position:relative;box-shadow:0 0 0 1px #cccccc;transition:box-shadow 0.15s;background:#fff;cursor:pointer}.wpcode-code-type h3{font-size:16px;font-weight:600;line-height:18px;padding:20px 30px 2px;margin:0;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;color:#444444}.wpcode-code-type .wpcode-code-type-desc{color:#777777;font-size:14px;line-height:18px;margin:10px 0 0;padding:5px 30px}.wpcode-code-type.wpcode-code-type-selected{box-shadow:0 0 0 2px var(--wpcode-color-primary)}.wpcode-code-type-picker-backdrop{left:160px;top:0;z-index:-100;bottom:0;right:0;background:rgba(0,0,0,0.7);position:fixed;opacity:0;transition:opacity 0.30s ease}.folded .wpcode-code-type-picker-backdrop{left:36px}@media (max-width:768px){.wpcode-code-type-picker-backdrop{left:0}.wp-responsive-open .wpcode-code-type-picker-backdrop{display:none}}.wpcode-code-type-picker-header{display:flex;justify-content:space-between;margin:0 auto 20px;width:1020px;max-width:100%}.wpcode-code-type-picker-visible .wpcode-code-type-picker-backdrop{opacity:1;z-index:1070}.wpcode-code-type-picker-visible .wpcode-code-type-picker{bottom:0}#wpcode_snippet_type-holder select{pointer-events:none}/*! * jquery-confirm v3.3.4 (http://craftpip.github.io/jquery-confirm/) * Author: boniface pereira * Website: www.craftpip.com * Contact: hey@craftpip.com * * Copyright 2013-2019 jquery-confirm * Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE) */@-webkit-keyframes jconfirm-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes jconfirm-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}body[class*=jconfirm-no-scroll-]{overflow:hidden !important}.jconfirm{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999999;font-family:inherit;overflow:hidden}.jconfirm .jconfirm-bg{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .4s}.jconfirm .jconfirm-bg.jconfirm-bg-h{opacity:0 !important}.jconfirm .jconfirm-scrollpane{perspective:500px;perspective-origin:center;display:table;width:100%;height:100%}.jconfirm .jconfirm-row{display:table-row;width:100%}.jconfirm .jconfirm-cell{display:table-cell;vertical-align:middle}.jconfirm .jconfirm-holder{max-height:100%;padding:50px 0}.jconfirm .jconfirm-box-container{transition:transform}.jconfirm .jconfirm-box-container.jconfirm-no-transition{transition:none !important}.jconfirm .jconfirm-box{background:white;border-radius:4px;position:relative;outline:0;padding:15px 15px 0;overflow:hidden;margin-left:auto;margin-right:auto}@-webkit-keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@-webkit-keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@-webkit-keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@-webkit-keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@-webkit-keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@-webkit-keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}@keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}.jconfirm .jconfirm-box.jconfirm-type-animated{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.jconfirm .jconfirm-box.jconfirm-type-blue{border-top:solid 7px #3498db;-webkit-animation-name:type-blue;animation-name:type-blue}.jconfirm .jconfirm-box.jconfirm-type-green{border-top:solid 7px #2ecc71;-webkit-animation-name:type-green;animation-name:type-green}.jconfirm .jconfirm-box.jconfirm-type-red{border-top:solid 7px #e74c3c;-webkit-animation-name:type-red;animation-name:type-red}.jconfirm .jconfirm-box.jconfirm-type-orange{border-top:solid 7px #f1c40f;-webkit-animation-name:type-orange;animation-name:type-orange}.jconfirm .jconfirm-box.jconfirm-type-purple{border-top:solid 7px #9b59b6;-webkit-animation-name:type-purple;animation-name:type-purple}.jconfirm .jconfirm-box.jconfirm-type-dark{border-top:solid 7px #34495e;-webkit-animation-name:type-dark;animation-name:type-dark}.jconfirm .jconfirm-box.loading{height:120px}.jconfirm .jconfirm-box.loading:before{content:'';position:absolute;left:0;background:white;right:0;top:0;bottom:0;border-radius:10px;z-index:1}.jconfirm .jconfirm-box.loading:after{opacity:.6;content:'';height:30px;width:30px;border:solid 3px transparent;position:absolute;left:50%;margin-left:-15px;border-radius:50%;-webkit-animation:jconfirm-spin 1s infinite linear;animation:jconfirm-spin 1s infinite linear;border-bottom-color:dodgerblue;top:50%;margin-top:-15px;z-index:2}.jconfirm .jconfirm-box div.jconfirm-closeIcon{height:20px;width:20px;position:absolute;top:10px;right:10px;cursor:pointer;opacity:.6;text-align:center;font-size:27px !important;line-height:14px !important;display:none;z-index:1}.jconfirm .jconfirm-box div.jconfirm-closeIcon:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-closeIcon .fa{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .glyphicon{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .zmdi{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon:hover{opacity:1}.jconfirm .jconfirm-box div.jconfirm-title-c{display:block;font-size:22px;line-height:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;padding-bottom:15px}.jconfirm .jconfirm-box div.jconfirm-title-c.jconfirm-hand{cursor:move}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{font-size:inherit;display:inline-block;vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i{vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:inherit;font-family:inherit;display:inline-block;vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-content-pane{margin-bottom:15px;height:auto;transition:height .4s ease-in;display:inline-block;width:100%;position:relative;overflow-x:hidden;overflow-y:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane.no-scroll{overflow-y:hidden}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar{width:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-thumb{background:#666;border-radius:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content{overflow:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content img{max-width:100%;height:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content:empty{display:none}.jconfirm .jconfirm-box .jconfirm-buttons{padding-bottom:11px}.jconfirm .jconfirm-box .jconfirm-buttons>button{margin-bottom:4px;margin-left:2px;margin-right:2px}.jconfirm .jconfirm-box .jconfirm-buttons button{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px;min-height:1em;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;-webkit-tap-highlight-color:transparent;border:0;background-image:none}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue{background-color:#3498db;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue:hover{background-color:#2980b9;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green{background-color:#2ecc71;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green:hover{background-color:#27ae60;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red{background-color:#e74c3c;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red:hover{background-color:#c0392b;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange{background-color:#f1c40f;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange:hover{background-color:#f39c12;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default{background-color:#ecf0f1;color:#000;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default:hover{background-color:#bdc3c7;color:#000}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple{background-color:#9b59b6;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple:hover{background-color:#8e44ad;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark{background-color:#34495e;color:#FFF;text-shadow:none;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark:hover{background-color:#2c3e50;color:#FFF}.jconfirm .jconfirm-box.jconfirm-type-red .jconfirm-title-c .jconfirm-icon-c{color:#e74c3c !important}.jconfirm .jconfirm-box.jconfirm-type-blue .jconfirm-title-c .jconfirm-icon-c{color:#3498db !important}.jconfirm .jconfirm-box.jconfirm-type-green .jconfirm-title-c .jconfirm-icon-c{color:#2ecc71 !important}.jconfirm .jconfirm-box.jconfirm-type-purple .jconfirm-title-c .jconfirm-icon-c{color:#9b59b6 !important}.jconfirm .jconfirm-box.jconfirm-type-orange .jconfirm-title-c .jconfirm-icon-c{color:#f1c40f !important}.jconfirm .jconfirm-box.jconfirm-type-dark .jconfirm-title-c .jconfirm-icon-c{color:#34495e !important}.jconfirm .jconfirm-clear{clear:both}.jconfirm.jconfirm-rtl{direction:rtl}.jconfirm.jconfirm-rtl div.jconfirm-closeIcon{left:5px;right:auto}.jconfirm.jconfirm-white .jconfirm-bg,.jconfirm.jconfirm-light .jconfirm-bg{background-color:#444;opacity:.2}.jconfirm.jconfirm-white .jconfirm-box,.jconfirm.jconfirm-light .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);border-radius:5px}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default{box-shadow:none;color:#333}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#ddd}.jconfirm.jconfirm-white.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-black .jconfirm-bg,.jconfirm.jconfirm-dark .jconfirm-bg{background-color:darkslategray;opacity:.4}.jconfirm.jconfirm-black .jconfirm-box,.jconfirm.jconfirm-dark .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);background:#444;border-radius:5px;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button{border:0;background-image:none;text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none;transition:background .1s;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default{box-shadow:none;color:#fff;background:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#666}.jconfirm.jconfirm-black.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-shake{-webkit-animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;transform:translate3d(0,0,0)}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-glow{-webkit-animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;transform:translate3d(0,0,0)}@-webkit-keyframes shake{10%,90%{transform:translate3d(-2px,0,0)}20%,80%{transform:translate3d(4px,0,0)}30%,50%,70%{transform:translate3d(-8px,0,0)}40%,60%{transform:translate3d(8px,0,0)}}@keyframes shake{10%,90%{transform:translate3d(-2px,0,0)}20%,80%{transform:translate3d(4px,0,0)}30%,50%,70%{transform:translate3d(-8px,0,0)}40%,60%{transform:translate3d(8px,0,0)}}@-webkit-keyframes glow{0%,100%{box-shadow:0 0 0 red}50%{box-shadow:0 0 30px red}}@keyframes glow{0%,100%{box-shadow:0 0 0 red}50%{box-shadow:0 0 30px red}}.jconfirm{perspective:400px}.jconfirm .jconfirm-box{opacity:1;transition-property:all}.jconfirm .jconfirm-box.jconfirm-animation-top,.jconfirm .jconfirm-box.jconfirm-animation-left,.jconfirm .jconfirm-box.jconfirm-animation-right,.jconfirm .jconfirm-box.jconfirm-animation-bottom,.jconfirm .jconfirm-box.jconfirm-animation-opacity,.jconfirm .jconfirm-box.jconfirm-animation-zoom,.jconfirm .jconfirm-box.jconfirm-animation-scale,.jconfirm .jconfirm-box.jconfirm-animation-none,.jconfirm .jconfirm-box.jconfirm-animation-rotate,.jconfirm .jconfirm-box.jconfirm-animation-rotatex,.jconfirm .jconfirm-box.jconfirm-animation-rotatey,.jconfirm .jconfirm-box.jconfirm-animation-scaley,.jconfirm .jconfirm-box.jconfirm-animation-scalex{opacity:0}.jconfirm .jconfirm-box.jconfirm-animation-rotate{transform:rotate(90deg)}.jconfirm .jconfirm-box.jconfirm-animation-rotatex{transform:rotateX(90deg);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatexr{transform:rotateX(-90deg);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatey{transform:rotatey(90deg);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotateyr{transform:rotatey(-90deg);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scaley{transform:scaley(1.5);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scalex{transform:scalex(1.5);transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-top{transform:translate(0px,-100px)}.jconfirm .jconfirm-box.jconfirm-animation-left{transform:translate(-100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-right{transform:translate(100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-bottom{transform:translate(0px,100px)}.jconfirm .jconfirm-box.jconfirm-animation-zoom{transform:scale(1.2)}.jconfirm .jconfirm-box.jconfirm-animation-scale{transform:scale(0.5)}.jconfirm .jconfirm-box.jconfirm-animation-none{visibility:hidden}.jconfirm.jconfirm-supervan .jconfirm-bg{background-color:rgba(54,70,93,0.95)}.jconfirm.jconfirm-supervan .jconfirm-box{background-color:transparent}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-blue{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-green{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-red{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-orange{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-purple{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-dark{border:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-closeIcon{color:white}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c{text-align:center;color:white;font-size:28px;font-weight:normal}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c>*{padding-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content-pane{margin-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content{text-align:center;color:white}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons button{font-size:16px;border-radius:2px;background:#303f53;text-shadow:none;border:0;color:white;padding:10px;min-width:100px}.jconfirm.jconfirm-supervan.jconfirm-rtl .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-material .jconfirm-bg{background-color:rgba(0,0,0,0.67)}.jconfirm.jconfirm-material .jconfirm-box{background-color:white;box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 25px 10px 25px}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons{text-align:right}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-weight:500}.jconfirm.jconfirm-material.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-bootstrap .jconfirm-bg{background-color:rgba(0,0,0,0.21)}.jconfirm.jconfirm-bootstrap .jconfirm-box{background-color:white;box-shadow:0 3px 8px 0 rgba(0,0,0,0.2);border:solid 1px rgba(0,0,0,0.4);padding:15px 0 0}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold;padding-left:15px;padding-right:15px}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87);padding:0 15px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons{text-align:right;padding:10px;margin:-5px 0 0;border-top:solid 1px #ddd;overflow:hidden;border-radius:0 0 4px 4px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons button{font-weight:500}.jconfirm.jconfirm-bootstrap.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-modern .jconfirm-bg{background-color:slategray;opacity:.6}.jconfirm.jconfirm-modern .jconfirm-box{background-color:white;box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 30px 15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87);top:15px;right:15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:24px;font-weight:bold;text-align:center;margin-bottom:10px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{transition:transform .5s;transform:scale(0);display:block;margin-right:0;margin-left:0;margin-bottom:10px;font-size:69px;color:#aaa}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-content{text-align:center;font-size:15px;color:#777;margin-bottom:25px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button{font-weight:bold;text-transform:uppercase;transition:background .1s;padding:10px 20px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button+button{margin-left:4px}.jconfirm.jconfirm-modern.jconfirm-open .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{transform:scale(1)}body div.jconfirm *,body div.jconfirm *::before,body div.jconfirm *::after{box-sizing:border-box;font-size:14px;color:#777777;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.jconfirm.jconfirm-modern .jconfirm-bg{background:rgba(0,0,0,0.4);opacity:1}.jconfirm .jconfirm-box .jconfirm-buttons{padding:0px}body div.jconfirm .jconfirm-box-container .jconfirm-box{display:grid;grid-template-columns:repeat(2,1fr);justify-items:center;-webkit-animation:none;animation:none;background:#ffffff;border-radius:0px;border-top-style:solid;border-top-width:4px;box-shadow:0 3px 6px rgba(0,0,0,0.15);padding:36px 36px 17px}body div.jconfirm.loader-spinner .jconfirm-box-container .jconfirm-box{padding:10px 0 0 0}body div.jconfirm.no-content .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-icon-c+.jconfirm-title{margin:0px}body div.jconfirm.no-content .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{display:none}body div.jconfirm.loader-spinner-completed .jconfirm-box-container .jconfirm-box .lds-dual-ring{display:block;text-align:center;margin:20px auto 0px auto}body div.jconfirm.no-content .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{display:none}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{grid-column:1/-1}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default{border-top-width:0}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default .jconfirm-title-c{margin-bottom:20px}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default .jconfirm-title-c .jconfirm-icon-c{font-size:44px;margin-bottom:-6px}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default button.wpcode-btn-confirm{background-color:#e27730;border-color:#e27730}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.btn.wpcode-btn-reject{background-color:#d63638;border-color:#d63638;color:#fff}body div.jconfirm.save-to-cloud .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.btn.wpcode-btn-reject{line-height:15px}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default button.wpcode-btn-confirm{background-color:#e27730;border-color:#e27730}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-default button.wpcode-btn-confirm:hover{background-color:#cd6622;border-color:#cd6622}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-red{border-top:none}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-red .jconfirm-title-c .jconfirm-icon-c{color:#d63638 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-red button.wpcode-btn-confirm{background-color:#d63638;border-color:#d63638}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-red button.wpcode-btn-confirm:hover{background-color:#b32d2e;border-color:#b32d2e}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-orange{border-top-color:#e27730 !important;border-top:none}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-orange .jconfirm-title-c .jconfirm-icon-c{color:#e27730 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-orange button.wpcode-btn-confirm{background-color:#e27730;border-color:#e27730}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-orange button.wpcode-btn-confirm:hover{background-color:#cd6622;border-color:#cd6622}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-yellow{border-top-color:#ffb900 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-yellow .jconfirm-title-c .jconfirm-icon-c{color:#ffb900 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-yellow button.wpcode-btn-confirm{background-color:#ffb900;border-color:#ffb900}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-yellow button.wpcode-btn-confirm:hover{background-color:#ffaa00;border-color:#ffaa00}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue{border-top:0 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue .jconfirm-title-c .jconfirm-icon-c{color:var(--wpcode-color-primary) !important}body div.jconfirm.width560px .jconfirm-box-container .jconfirm-box{max-width:560px}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue button.wpcode-btn-confirm{background-color:#3085d6;border-color:#3085d6}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue button.wpcode-btn-confirm:focus{box-shadow:0 0 0 3px rgb(53 104 183/50%)}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue button.wpcode-btn-confirm:hover{background-color:#2b77c0;border-color:#2b77c0}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue button.wpcode-btn-reject:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-blue button.wpcode-btn-cancel:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-green{border-top-color:#00a32a !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-green .jconfirm-title-c .jconfirm-icon-c{color:#00a32a !important}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-green button.wpcode-btn-confirm{background-color:#00a32a;border-color:#00a32a}body div.jconfirm .jconfirm-box-container .jconfirm-box.jconfirm-type-green button.wpcode-btn-confirm:hover{background-color:#008a20;border-color:#008a20}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-closeIcon{font-family:inherit;height:14px;opacity:1;right:17px !important;font-weight:700;right:10px;color:#c1c1c1;top:10px;width:14px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-closeIcon:after{}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-closeIcon:hover:after{color:#777777 !important}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c{margin:0 0 20px 0;padding:0;font-weight:600}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{font-size:47px;margin:0;transform:none !important;transition:none !important}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-icon-c+.jconfirm-title{margin-top:0px;margin-bottom:10px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title{color:#444444;display:block;line-height:30px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{display:block;margin-bottom:20px}body div.jconfirm.loader-spinner-completed .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{margin-bottom:0px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content{color:#444444;font-size:16px;line-height:24px;margin-bottom:0;overflow:inherit}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content.lite-upgrade p{color:#777777;font-size:18px;padding:0 20px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content p{font-size:inherit;line-height:inherit;margin:0 0 16px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content p:last-of-type{margin:0}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content p.large{font-size:18px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content p.small{font-size:14px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=text],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=number],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=email],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=url],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=password],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=search],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content input[type=tel],body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content textarea,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content select{margin:10px 2px;width:calc(100% - 4px)}body div.jconfirm .jconfirm-box-container .jconfirm-box .feature-video{margin:30px 0 0 0}body div.jconfirm .jconfirm-box-container .jconfirm-box .pro-feature-video{margin:15px 0 10px 0}body div.jconfirm .jconfirm-box-container .jconfirm-box input[type=text]:not(.choices__input){display:block;width:99%;border:1px solid #d6d6d6;padding:10px !important;box-shadow:none;margin:10px 1px 1px 1px !important;line-height:1 !important;outline:0}body div.jconfirm .jconfirm-box-container .jconfirm-box input[type=text]:not(.choices__input):focus{border-color:#007cba;box-shadow:0 0 0 1px #007cba}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons{margin-top:0px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button{background:#f8f8f8;border:1px solid #cccccc;border-radius:4px;color:#777777;font-size:14px;font-weight:600;line-height:14px;outline:none;padding:10px 16px;text-transform:none;margin:5px;transition-property:all;transition-duration:0.15s;transition-timing-function:ease-out}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .excl-mark,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content .excl-mark{height:88px;width:88px;text-align:center;margin:auto;font-weight:400;margin-bottom:30px;font-size:55px;color:#f8bb86c9;border:4px solid #f8bb86c9;border-radius:50%;line-height:66px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-title-c .jconfirm-title .excl-mark{margin-top:20px}body div.jconfirm.disable-testing-mode .jconfirm-box-container .jconfirm-content-pane p{text-align:left}body div.jconfirm .jconfirm-box-container .jconfirm-content .lds-dual-ring,body div.jconfirm .jconfirm-box-container .jconfirm-content .lds-dual-ring:after{box-sizing:border-box}body div.jconfirm .jconfirm-box-container .jconfirm-content .lds-dual-ring{color:var(--wpcode-color-primary);display:inline-block;width:54px;height:54px}body div.jconfirm .jconfirm-box-container .jconfirm-content .lds-dual-ring:after{content:" ";display:block;color:var(--wpcode-color-primary);width:38px;height:38px;margin:8px;border-radius:50%;border:4px solid var(--wpcode-color-primary);border-color:var(--wpcode-color-primary) transparent var(--wpcode-color-primary) transparent;-webkit-animation:lds-dual-ring 1.2s linear infinite;animation:lds-dual-ring 1.2s linear infinite}@-webkit-keyframes lds-dual-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes lds-dual-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button:hover{background:#eeeeee;border-color:#cccccc}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .wpcode-btn-orange{background:var(--wpcode-button-orange-bg);border-color:var(--wpcode-button-orange-bg);color:#fff;height:56px;font-size:var(--wpcode-font-size-m);justify-content:center;padding-left:var(--wpcode-space-h);padding-right:var(--wpcode-space-h);text-align:center}body div.jconfirm .jconfirm-box-container .jconfirm-box .footer-link{grid-column:1/-1;border-top:1px solid #eee;padding-top:16px;margin-top:20px;width:100%;text-align:center}body div.jconfirm .jconfirm-box-container .jconfirm-box .footer-link a{color:#135e96}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons .wpcode-btn-orange:hover{background:var(--wpcode-button-orange-bg-hover);border-color:var(--wpcode-button-orange-bg-hover);background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button[disabled]{cursor:no-drop;pointer-events:none;opacity:.25}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.wpcode-btn-confirm{color:#ffffff}body div.jconfirm.disable-testing-mode .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.wpcode-btn-confirm,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.wpcode-btn-cancel,body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.wpcode-btn-reject{font-size:16px;line-height:19px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.wpcode-btn-cancel{background-color:#757575;color:#fff}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane a{color:#135e96}body div.jconfirm.disable-testing-mode .jconfirm-box-container .jconfirm-box .jconfirm-content-pane{padding:0 40px}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.hidden+button{margin-left:0;margin-right:0}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.btn-block{display:block;margin:0 0 10px 0 !important;text-align:center;width:100%}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button.btn-normal-case{text-transform:none !important}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-buttons button i{margin:0 10px 0 0}body div.jconfirm .jconfirm-box-container .jconfirm-box .error{color:#d63638;display:none}body div.jconfirm .jconfirm-box-container .jconfirm-box button[disabled]{cursor:no-drop}.choices{font-size:16px;text-align:start}body .jconfirm.has-video div.jconfirm-box-container .jconfirm-box{padding-bottom:0;padding-top:30px}body .jconfirm.has-video div.jconfirm-box-container .feature-video,body .jconfirm.has-video div.jconfirm-box-container .pro-feature-video{grid-row:1/span 4;grid-column-start:2;margin-top:0;margin-left:15px}body .jconfirm.has-video div.jconfirm-box-container .jconfirm-title-c,body .jconfirm.has-video div.jconfirm-box-container .jconfirm-content-pane,body .jconfirm.has-video div.jconfirm-box-container .jconfirm-buttons{grid-column:1/2}body .jconfirm.upgrade-modal .jconfirm-box-container div.jconfirm-box{padding-bottom:30px}body .jconfirm.upgrade-modal .jconfirm-box-container div.jconfirm-box .pro-feature-video{margin-bottom:0}body .jconfirm.upgrade-modal .jconfirm-box-container div.jconfirm-box .jconfirm-buttons{padding-bottom:0}.jconfirm-content-pane svg,.jconfirm-title svg{width:100px;display:block;margin:22px auto 54px auto}.upsell-box .jconfirm-content-pane svg,.jconfirm-title svg{margin:0px auto 10px auto}.jconfirm-content-pane svg circle,.jconfirm-title svg circle{stroke:rgba(165,220,134,.3)}.jconfirm-content-pane svg polyline,.jconfirm-title svg polyline{background-color:#a5dc86;stroke:#a5dc86;stroke-width:7px}.jconfirm-content-pane .path,.jconfirm-title .path{stroke-dasharray:1000;stroke-dashoffset:0}.jconfirm-content-pane .path.circle,.jconfirm-title .path.circle{-webkit-animation:dash .9s ease-in-out;animation:dash .9s ease-in-out}.jconfirm-content-pane .path.line,.jconfirm-title .path.line{stroke-dashoffset:1000;-webkit-animation:dash .9s .35s ease-in-out forwards;animation:dash .9s .35s ease-in-out forwards}.jconfirm-content-pane .path.check,.jconfirm-title .path.check{stroke-dashoffset:-100;-webkit-animation:dash-check .9s .35s ease-in-out forwards;animation:dash-check .9s .35s ease-in-out forwards}.jconfirm-content-pane p,.jconfirm-title p{text-align:center;margin:20px 0 60px;font-size:1.25em}.jconfirm-content-pane p.success,.jconfirm-title p.success{color:#73AF55}.jconfirm-content-pane p.error,.jconfirm-title p.error{color:#D06079}body div.jconfirm .jconfirm-box-container .wpcode-already-purchased{grid-column:1/-1}body div.jconfirm .jconfirm-box-container .wpcode-discount-note{grid-column:1/-1;text-align:center;background-color:#fcf9e8;color:#777777;font-size:16px;line-height:24px;margin:25px -36px 17px;padding:22px 52px 12px 52px;position:relative}body div.jconfirm .jconfirm-box-container .wpcode-discount-note span{font-weight:700;color:#00a32a}body div.jconfirm .jconfirm-box-container .jconfirm-box .jconfirm-content-pane .jconfirm-content.wpcode-lite-upgrade div{font-size:17px}body div.jconfirm .jconfirm-box-container .wpcode-discount-note strong{font-weight:700;font-size:16px}body div.jconfirm .jconfirm-box-container .wpcode-discount-note:after{background-color:#ffffff;border-radius:50%;background-color:#00a32a;content:"";display:inline-block;font:normal normal normal 14px FontAwesome;-webkit-margin-end:-15px;margin-inline-end:-15px;padding:11px 11px;border:6px solid #fff;position:absolute;inset-inline-end:50%;text-rendering:auto;top:-16px;-webkit-font-smoothing:antialiased}body div.jconfirm .jconfirm-box-container .wpcode_check{grid-column:1/-1;grid-row:4;display:inline-block;transform:rotate(45deg);height:13px;width:8px;position:relative;top:31px;left:-2px;border-bottom:3px solid #ffffff;border-right:3px solid #ffffff}body div.jconfirm .jconfirm-box-container .wpcode-already-purchased{grid-column:1/-1}body div.jconfirm .jconfirm-box-container .wpcode-already-purchased a{color:#bbb}body div.jconfirm .jconfirm-box-container .wpcode-already-purchased a:hover{color:#777}@-webkit-keyframes dash{0%{stroke-dashoffset:1000}100%{stroke-dashoffset:0}}@keyframes dash{0%{stroke-dashoffset:1000}100%{stroke-dashoffset:0}}@-webkit-keyframes dash-check{0%{stroke-dashoffset:-100}100%{stroke-dashoffset:900}}@keyframes dash-check{0%{stroke-dashoffset:-100}100%{stroke-dashoffset:900}}@media screen and (max-width:1023px){body .jconfirm.has-video div.jconfirm-box{grid-template-columns:repeat(1,1fr)}body .jconfirm.has-video .feature-video,body .jconfirm.has-video .pro-feature-video{display:none}} .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-results__option[data-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[data-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:linear-gradient(to bottom,#fff 50%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF',endColorstr='#FFEEEEEE',GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:linear-gradient(to bottom,#eee 50%,#ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE',endColorstr='#FFCCCCCC',GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:linear-gradient(to bottom,#fff 0%,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF',endColorstr='#FFEEEEEE',GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:linear-gradient(to bottom,#eee 50%,#fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE',endColorstr='#FFFFFFFF',GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[data-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} .flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1 1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1 1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1 1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1 1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}} build/admin.js 0000644 00000633724 15021200650 0007277 0 ustar 00 !function(){var e={233:function(){(window.WPCodeAdminCodeEditor||function(e,t,n){const o={l18n:wpcode,init(){t.WPCodeAdminCodeEditor=o},switch_code_mode(e,t){const n=o.get_editor(e);if(void 0===n)return!1;n.setOption("mode",o.get_mime_for_code_type(t)),n.setOption("lint",o.get_lint_for_code_type(t)),jQuery(n.getTextArea()).closest(".wpcode-code-textarea").attr("data-code-type",t)},get_editor(e){if("undefined"!=typeof wpcode_editor)return wpcode_editor[e]?wpcode_editor[e].codemirror:void 0},set_value(e,t){const n=o.get_editor(e);if(void 0===n)return!1;n.getDoc().setValue(t)},get_mime_for_code_type:e=>o.l18n.code_type_options[e].mime,get_lint_for_code_type:e=>o.l18n.code_type_options[e].lint,refresh(e){"undefined"!=typeof wpcode_editor&&o.get_editor(e).refresh()},get_value:e=>void 0===o.get_editor(e)?n("#"+e).val():o.get_editor(e).getValue(),refresh_all(){"undefined"!=typeof wpcode_editor&&n.each(wpcode_editor,(function(e,t){t.codemirror.refresh()}))}};return o}(document,window,jQuery)).init()},560:function(){!function(e,t,n){const o={l10n:wpcode,isAjaxInProgress:!1,init:function(){o.should_init()&&(o.init_status_toggle(),o.move_screen_options(),o.init_copy(),o.init_type_filter(),o.init_pagination(),o.init_code_type_mobile())},init_type_filter:function(){n("#wpcode-snippet-type-buttons a").click((function(e){if(n(this).hasClass("active")||n(this).hasClass("wpcode_pro_type_lite"))return;e.preventDefault();const t=n(this).data("type");n(this).closest("ul").find("a").removeClass("active"),n(this).addClass("active"),o.show_loader(),o.update_url_and_filter(t)})),n("#wpcode-snippet-type-buttons a.wpcode_pro_type_lite").click((function(e){e.preventDefault(),"blocks"===n(this).data("type")?WPCodeAdminNotices.show_pro_notice(o.l10n.blocks_title,o.l10n.blocks_description,o.l10n.blocks_snippet_upgrade_url,o.l10n.button_text):WPCodeAdminNotices.show_pro_notice(o.l10n.scss_title,o.l10n.scss_description,o.l10n.scss_snippet_upgrade_url,o.l10n.button_text)}))},show_loader(){try{const e=n("#wpcode-code-snippets-table .wp-list-table");if(0===e.length)throw new Error("Table element not found");const t=e.offset().top-n("#wpadminbar").outerHeight(),o=e.outerHeight();n("#wpcode-loader .wpcode-loader-overlay").css({top:t,height:o}),n("#wpcode-loader").show()}catch(e){console.error("Failed to show loader:",e.message)}},init_pagination:function(){n(e).on("click",".pagination-links a",(function(e){e.preventDefault();const t=n(this).attr("href").split("paged=")[1];o.changePage(t)})),n(e).on("blur","#current-page-selector",(function(){const e=parseInt(n(this).val(),10);isNaN(e)||o.changePage(e)})),n(e).on("keypress","#current-page-selector",(function(e){"Enter"===e.key&&(e.preventDefault(),n(this).blur())}))},changePage:function(e){const n=new URLSearchParams(t.location.search).get("type")||"",i=new URLSearchParams(t.location.search).get("location")||"",r=new URLSearchParams(t.location.search).get("s")||"";o.show_loader(),o.filter_by_type(n,i,r,e).done((function(n){if(n.success){const n=new URL(t.location);n.searchParams.set("paged",e),history.replaceState({},"",n)}}))},update_url_and_filter:function(e){const i=new URL(t.location),r=new URLSearchParams(t.location.search),a=n("#total_pages").val(),s=r.get("s")||"",c=r.get("location")||"",l=r.get("view")||"all",d=r.get("filter_action")||"Filter";e?i.searchParams.set("type",e):i.searchParams.delete("type"),parseInt(a)>1?i.searchParams.set("paged",r.get("paged")||"1"):i.searchParams.delete("paged"),i.searchParams.delete("action"),i.searchParams.delete("action2"),i.searchParams.set("page","wpcode"),i.searchParams.set("view",l),i.searchParams.set("filter_action",d),i.searchParams.set("s",s),i.searchParams.set("location",c),history.pushState({},"",i),o.filter_by_type(e,c,s)},show_button_spinner(e){t.WPCodeSpinner.show_button_spinner(e)},filter_by_type:function(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1";if(!o.isAjaxInProgress)return o.isAjaxInProgress=!0,n.post(ajaxurl,{_wpnonce:wpcode.nonce,action:"wpcode_filter_snippets_by_type",snippet_type:e,location:t,s:i,paged:r}).done((function(e){n("#wpcode-loader").hide(),e.success?(n("#wpbody-content #wpcode-code-snippets-table").html(e.data.html),n("#wpbody-content .wpcode-content > table").remove()):console.error("Failed to update snippets:",e.data)})).fail((function(e,t,o){n("#wpcode-loader").hide(),console.error("AJAX request failed:",t,o)})).always((function(){o.isAjaxInProgress=!1}))},should_init:function(){return null!==e.getElementById("wpcode-code-snippets-table")},init_status_toggle:function(){n("#wpbody-content").on("change",".wpcode-status-toggle",(function(){const e=n(this),t=e.is(":checked"),i=e.data("id");o.update_status(t,i).fail((function(){e.prop("checked",!1)})).done((function(n){!1===n.success&&(e.prop("checked",!t),n.data.message&&WPCodeAdminNotices.add_notice(n.data.message,"error"))})).fail((function(e){e.responseText&&WPCodeAdminNotices.add_notice(e.responseText,"error")}))}))},update_status:function(e,t){return n.post(ajaxurl,{_wpnonce:o.l10n.nonce,action:"wpcode_update_snippet_status",snippet_id:t,active:e,multisite:o.l10n.multisite})},move_screen_options:function(){n("#screen-meta-links, #screen-meta").prependTo("#wpcode-header-between").show()},init_copy:function(){n("#wpbody-content").on("click",".wpcode-copy",(function(e){e.preventDefault();const t=n(this).data("copy-value"),o=n(this);t&&(navigator.clipboard.writeText(t),o.addClass("wpcode-show-success-icon"),setTimeout((function(){o.removeClass("wpcode-show-success-icon")}),500))}))},init_code_type_mobile:function(){n(".wpcode-mobile-dropdown-toggle").on("click",(function(){const e=n(this).data("target");n(e).toggleClass("wpcode-open"),n(e).one("click","a",(function(){n(e).removeClass("wpcode-open")}))}))}};t.WPCodeSnippetsTable=o,o.init()}(document,window,jQuery)},691:function(){jQuery((function(e){WPCodeCodeTypePicker.init()})),window.WPCodeCodeTypePicker=function(e,t,n){const o={hidePicker:function(){o.body.removeClass("wpcode-code-type-picker-visible")},findElements:function(){o.snippet_type_dropdown=n("#wpcode_snippet_type"),o.snippet_type_holder=n("#wpcode_snippet_type-holder"),o.backdrop=n("#wpcode-code-type-picker-backdrop"),o.close=n("#wpcode-close-code-type-picker"),o.body=n("body"),o.code_type_list=n("#wpcode-code-type-list")},init:function(){o.findElements();const e=new URLSearchParams(t.location.search);o.body.hasClass("wpcode-new-snippet")&&!e.has("ai_generate")&&o.showPicker(),o.snippet_type_holder.click((function(e){e.preventDefault(),e.stopPropagation(),o.showPicker()})),o.backdrop.click((function(){o.hidePicker()})),o.close.click((function(){o.hidePicker()})),o.code_type_list.on("click",".wpcode-code-type",(function(e){e.preventDefault();const t=n(this).data("code-type");o.snippet_type_dropdown.val(t).trigger("change"),n(".wpcode-code-type").removeClass("wpcode-code-type-selected"),n(this).addClass("wpcode-code-type-selected"),o.hidePicker()}))},showPicker:function(){o.code_type_list.find(".wpcode-code-type").each((function(){n(this).data("code-type")===o.snippet_type_dropdown.val()?n(this).addClass("wpcode-code-type-selected"):n(this).removeClass("wpcode-code-type-selected")})),o.body.addClass("wpcode-code-type-picker-visible")}};return o}(document,window,jQuery)},707:function(){jconfirm.defaults={closeIcon:!1,backgroundDismiss:!1,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"560px",type:"blue",animateFromElement:!1,scrollToPreviousElement:!1}},786:function(){(window.WPCodeAdminGenerator||function(e,t,n){const o={doing_ajax_call:!1,ajax_snippet_update:!1,editor_id:"wpcode_generator_code_preview",init:function(){o.should_init()&&(o.find_elements(),o.init_generator_form(),o.init_code_editor(),o.init_tabs(),o.init_use_snippet(),o.init_copy_editor(),o.init_repeater(),o.do_spacer(),n(e).ready((function(){o.init_autocomplete()})))},should_init:()=>(o.generator_form=n("#wpcode_generator_form"),o.generator_form.length>0),find_elements(){o.tabs_buttons=n(".wpcode-items-tabs"),o.tabs_content=n(".wpcode-items-list .wpcode-form-tab"),o.use_snippet=n("#wpcode-generator-use-snippet"),o.update_button=n("#wpcode-generator-update-code"),o.repeater_row=n("#wpcode-generator-repeater-row").html()},init_generator_form(){o.generator_form.on("submit",(function(e){e.preventDefault(),o.update_snippet()})),o.generator_form.on("change","input, select",(function(){o.update_snippet()})),o.update_snippet()},update_snippet(){o.doing_ajax_call||(o.ajax_snippet_update&&o.ajax_snippet_update.abort(),o.show_button_spinner(o.update_button),o.ajax_snippet_update=n.post(ajaxurl,n(o.generator_form).serialize()).done((function(e){o.ajax_snippet_update=!1,WPCodeAdminCodeEditor.set_value(o.editor_id,e),o.hide_button_spinner(o.update_button)})))},init_tabs(){o.tabs_buttons.on("click","button",(function(e){e.preventDefault(),o.switch_active_tab(n(this))}))},switch_active_tab(e){o.tabs_buttons.find("button").removeClass("wpcode-active"),e.addClass("wpcode-active");const t=e.data("category");o.tabs_content.hide(),o.tabs_content.filter((function(){return n(this).data("tab")===t})).show(),o.do_spacer(),WPCodeAdminCodeEditor.refresh(o.editor_id)},init_use_snippet(){o.use_snippet.on("click",(function(e){if(e.preventDefault(),o.doing_ajax_call)return;o.doing_ajax_call=!0;const i=o.generator_form.serializeArray(),r=n(this);n.each(i,(function(e,t){"action"===t.name&&(i[e].value="wpcode_save_generated_snippet")})),o.show_button_spinner(r),n.post(ajaxurl,n.param(i)).done((function(e){o.doing_ajax_call=!1,o.hide_button_spinner(r),e.success&&e.data.url&&(t.location=e.data.url)}))}))},show_button_spinner(e){t.WPCodeSpinner.show_button_spinner(e)},hide_button_spinner(e){t.WPCodeSpinner.hide_button_spinner(e)},init_copy_editor:function(){n(".wpcode-copy-target").on("click",(function(e){e.preventDefault();const t=n(this),i=WPCodeAdminCodeEditor.get_value(o.editor_id);i&&(navigator.clipboard.writeText(i),t.addClass("wpcode-show-success-icon"),setTimeout((function(){t.removeClass("wpcode-show-success-icon")}),500))}))},init_repeater(){o.row_id=0,o.tabs_content.on("click",".wpcode-repeater-button",(function(){const e=n(this).data("target"),t=n(n('.wpcode-generator-column > [data-repeater="'+e+'"]').get().reverse());let i,r,a=0;o.row_id++,t.each((function(){const e=n(this).closest(".wpcode-generator-column");e.is(i)||(a++,i=e,r=n(o.repeater_row),a>1?r.find("button").remove():r.find("button").data("target",o.row_id),r.attr("data-id",o.row_id),e.append(r)),n(this).clone().attr("data-repeater",null).prependTo(r).find("input").val(null)}));let s=0,c=n('.wpcode-repeater-group[data-id="'+o.row_id+'"]');c.each((function(){const e=n(this).height();e>s&&(s=e)})),c.height(s),c.first().find("input").first().focus()})),o.tabs_content.on("click",".wpcode-remove-row",(function(){const e=n(this).data("target");n('.wpcode-repeater-group[data-id="'+e+'"]').remove()}))},do_spacer(){n(".wpcode-generator-field-spacer").each((function(){const e=n(this).closest(".wpcode-generator-column"),t=n(this).closest(".wpcode-generator-column").outerHeight();let o=0;e.siblings(".wpcode-generator-column").each((function(){const e=n(this).height();e>o&&(o=e)})),o>t&&n(this).height(o-t+3)}))},init_autocomplete(){n(".wpcode-generator-field-autocomplete").each((function(){const e=n(this).find('input[type="text"]'),t=n(this).find(".wpcode-field-autocomplete").text();e.autocomplete({source:JSON.parse(t)})}))},init_code_editor(){const e=n(".wpcode-generator-code");if(0===e.length)return;const t=wp.codeEditor.initialize(e);o.CodeMirror=t.codemirror,o.CodeMirror.setOption("readOnly",!1),o.CodeMirror.on("change",(function(e){clearTimeout(o.editor_change_handler),o.editor_change_handler=setTimeout((function(){jQuery(e.getTextArea()).val(e.getValue()).change(),o.update_snippet()}),300)}))}};return o}(document,window,jQuery)).init()},448:function(){(window.WPCodeHeader||function(e,t,n){const o={init(){o.should_init()&&n(e).ready((function(){o.init_sticky_header()}))},should_init:()=>n("#wpcode_snippet_code").length>0||n("#ihaf_insert_header").length>0,init_sticky_header(){const e=n(".wpcode-header-bottom"),o=e.height(),i=e.offset().top,r=e.parent();n(t).scroll((function(){const a=n(t).scrollTop();i(o.$overlay=n("#wpcode-docs-overlay"),o.$overlay.length>0),find_elements(){o.$close_button=n("#wpcode-help-close"),o.$search=n("#wpcode-help-search"),o.$no_result=n("#wpcode-help-no-result"),o.$search_results=n("#wpcode-help-result ul"),o.$categories=n("#wpcode-help-categories")},init_close_button(){o.$close_button.on("click",(function(e){e.preventDefault(),o.$overlay.fadeOut(200)}))},init_show(){n(e).on("click",".wpcode-show-help",(function(e){e.preventDefault(),o.$overlay.fadeIn(200)}))},init_accordion(){o.$categories.on("click",".wpcode-help-category header",(function(){const e=n(this).closest(".wpcode-help-category");o.toggle_category(e)})),o.$categories.on("click",".viewall",(function(e){e.preventDefault(),n(this).closest(".wpcode-help-docs").find("div").slideDown(),n(this).hide()}))},toggle_category(e){e.toggleClass("open"),e.find(".wpcode-help-docs").slideToggle()},init_search(){o.$search.on("keyup","input",o.input_search),o.$search.on("click","#wpcode-help-search-clear",o.clear_search)},input_search(){o.$search_results.html("");const e=n(this).val().toLowerCase(),t=n("#wpcode-help-categories .wpcode-help-docs li").filter((function(){return n(this).text().toLowerCase().indexOf(""+e)>-1}));e.length>2&&t.clone().appendTo(o.$search_results),0===t.length?o.$no_result.show():o.$no_result.hide(),o.$search.toggleClass("wpcode-search-empty",!e)},clear_search(){o.$search.find("input").val("").trigger("keyup")}};return o}(document,window,jQuery)).init()},279:function(){const e=window.WPCodeSVG||function(e,t,n){const o={l18n:wpcode,init(){t.WPCodeSVG=o},sanitizeSvg(e,t){const n=(new DOMParser).parseFromString(e,"image/svg+xml");return n.querySelector("parsererror")?(console.error("Error parsing SVG:",n.querySelector("parsererror").textContent),""):(n.querySelectorAll("*").forEach((e=>{const n=e.tagName.toLowerCase();if(t[n])for(let o of[...e.attributes])t[n][o.name.toLowerCase()]||e.removeAttribute(o.name);else e.parentNode.removeChild(e)})),"svg"===n.documentElement.nodeName?n.documentElement.outerHTML:"")},WPCodeIcon(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";const s=o.wpcodeIcons();if(!s.hasOwnProperty(e))return"";i||(i=`0 0 ${t} ${n}`);const c=` `;return this.sanitizeSvg(c,{svg:{class:!0,"aria-hidden":!0,"aria-labelledby":!0,role:!0,xmlns:!0,width:!0,height:!0,viewbox:!0,id:!0},g:{fill:!0,"clip-path":!0},title:{title:!0},path:{d:!0,fill:!0,"fill-rule":!0,"clip-rule":!0,"data-name":!0},circle:{cx:!0,cy:!0,r:!0,stroke:!0,"stroke-width":!0,fill:!0},rect:{x:!0,y:!0,width:!0,height:!0,fill:!0},polyline:{points:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-miterlimit":!0},clipPath:{id:!0},defs:{}})},wpcodeIcons:()=>({logo:'{attr_'+e+"}
- "+e+"
<script type="text/javascript">
console.log( 'header' );
</script>
%s
', esc_html__( 'As you make changes to your page scripts and save, you will get a list of previous versions with all the changes made in each revision. You can compare revisions to the current version or see changes as they have been saved by going through each revision. Any of the revisions can then be restored as needed without interfering with your post/page.', 'insert-headers-and-footers' ) ); echo $this->code_revisions_list_with_notice( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped esc_html__( 'Code Revisions is a Pro Feature', 'insert-headers-and-footers' ), sprintf( '%s
', esc_html__( 'Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your page scripts.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'revisions', 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'post-editor-metabox', 'revisions', 'features' ) ), ) ); } } includes/lite/admin/class-wpcode-usage-tracking-lite.php 0000644 00000001012 15021200650 0017312 0 ustar 00 settings->get_option( 'usage_tracking' ) ); } } includes/lite/admin/class-wpcode-connect.php 0000644 00000016647 15021200650 0015130 0 ustar 00 hooks(); } /** * Hooks. * * @since 2.0.9 */ public function hooks() { add_action( 'wpcode_admin_page_content_wpcode-settings', array( $this, 'settings_enqueues' ) ); add_action( 'wp_ajax_wpcode_connect_url', array( $this, 'generate_url' ) ); add_action( 'wp_ajax_nopriv_wpcode_connect_process', array( $this, 'process' ) ); } /** * Settings page enqueues. * * @since 2.0.9 */ public function settings_enqueues() { $admin_asset_file = WPCODE_PLUGIN_PATH . 'build/connect.asset.php'; if ( ! file_exists( $admin_asset_file ) ) { return; } $asset = require $admin_asset_file; wp_enqueue_script( 'wpcode-connect-js', WPCODE_PLUGIN_URL . 'build/connect.js', $asset['dependencies'], $asset['version'], true ); } /** * Generate and return the WPCode Connect URL. * * @since 2.0.9 */ public function generate_url() { // Run a security check. check_ajax_referer( 'wpcode_admin' ); // Check for permissions. if ( ! current_user_can( 'install_plugins' ) ) { wp_send_json_error( array( 'message' => esc_html__( 'You are not allowed to install plugins.', 'insert-headers-and-footers' ) ) ); } $key = ! empty( $_POST['key'] ) ? sanitize_text_field( wp_unslash( $_POST['key'] ) ) : ''; if ( empty( $key ) ) { wp_send_json_error( array( 'message' => esc_html__( 'Please enter your license key to connect.', 'insert-headers-and-footers' ) ) ); } if ( class_exists( 'WPCode_Premium' ) ) { wp_send_json_error( array( 'message' => esc_html__( 'Only the Lite version can be upgraded.', 'insert-headers-and-footers' ) ) ); } // Verify pro version is not installed. $active = activate_plugin( 'wpcode-premium/wpcode.php', false, false, true ); if ( ! is_wp_error( $active ) ) { update_option( 'wpcode_install', 1 ); // Run install routines. // Deactivate Lite. $plugin = plugin_basename( WPCODE_FILE ); deactivate_plugins( $plugin ); do_action( 'wpcode_plugin_deactivated', $plugin ); wp_send_json_success( array( 'message' => esc_html__( 'WPCode Pro is installed but not activated.', 'insert-headers-and-footers' ), 'reload' => true, ) ); } // Generate URL. $oth = hash( 'sha512', wp_rand() ); $hashed_oth = hash_hmac( 'sha512', $oth, wp_salt() ); update_option( 'wpcode_connect_token', $oth ); update_option( 'wpcode_connect', $key ); $version = WPCODE_VERSION; $endpoint = admin_url( 'admin-ajax.php' ); $redirect = admin_url( 'admin.php?page=wpcode-settings' ); $url = add_query_arg( array( 'key' => $key, 'oth' => $hashed_oth, 'endpoint' => $endpoint, 'version' => $version, 'siteurl' => admin_url(), 'homeurl' => home_url(), 'redirect' => rawurldecode( base64_encode( $redirect ) ), // phpcs:ignore 'v' => 2, 'php' => phpversion(), 'wp' => get_bloginfo( 'version' ), ), 'https://upgrade.wpcode.com/' ); wp_send_json_success( array( 'url' => $url, 'back_url' => add_query_arg( array( 'action' => 'wpcode_connect', 'oth' => $oth, ), $endpoint ), ) ); } /** * Process WPCode Connect. * * @since 2.0.9 */ public function process() { $error = esc_html__( 'There was an error while installing an upgrade. Please download the plugin from wpcode.com and install it manually.', 'insert-headers-and-footers' ); // Verify params present (oth & download link). $post_oth = ! empty( $_REQUEST['oth'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['oth'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification $post_url = ! empty( $_REQUEST['file'] ) ? esc_url_raw( wp_unslash( $_REQUEST['file'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification if ( empty( $post_oth ) || empty( $post_url ) ) { wp_send_json_error( $error ); } // Verify oth. $oth = get_option( 'wpcode_connect_token' ); if ( hash_hmac( 'sha512', $oth, wp_salt() ) !== $post_oth ) { wp_send_json_error( $error ); } // Delete so cannot replay. delete_option( 'wpcode_connect_token' ); // Set the current screen to avoid undefined notices. set_current_screen( 'wpcode_page_wpcode-settings' ); // Prepare variables. $url = esc_url_raw( add_query_arg( array( 'page' => 'wpcode-settings' ), admin_url( 'admin.php' ) ) ); // Verify pro not activated. if ( class_exists( 'WPCode_Premium' ) ) { wp_send_json_success( esc_html__( 'Plugin installed & activated.', 'insert-headers-and-footers' ) ); } // Verify pro not installed. $active = activate_plugin( 'wpcode-premium/wpcode.php', $url, false, true ); if ( ! is_wp_error( $active ) ) { $plugin = plugin_basename( WPCODE_FILE ); deactivate_plugins( $plugin ); do_action( 'wpcode_plugin_deactivated', $plugin ); wp_send_json_success( esc_html__( 'Plugin installed & activated.', 'insert-headers-and-footers' ) ); } $creds = request_filesystem_credentials( $url, '', false, false, null ); // Check for file system permissions. if ( false === $creds || ! WP_Filesystem( $creds ) ) { wp_send_json_error( esc_html__( 'There was an error while installing an upgrade. Please check file system permissions and try again. Also, you can download the plugin from wpcode.com and install it manually.', 'insert-headers-and-footers' ) ); } /* * We do not need any extra credentials if we have gotten this far, so let's install the plugin. */ // Do not allow WordPress to search/download translations, as this will break JS output. remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); wpcode_require_upgrader(); // Create the plugin upgrader with our custom skin. $installer = new Plugin_Upgrader( new WPCode_Skin() ); // Error check. if ( ! method_exists( $installer, 'install' ) ) { wp_send_json_error( $error ); } // Check license key. $key = get_option( 'wpcode_connect', false ); if ( empty( $key ) ) { wp_send_json_error( new WP_Error( '403', esc_html__( 'No key provided.', 'insert-headers-and-footers' ) ) ); } $installer->install( $post_url ); // phpcs:ignore // Flush the cache and return the newly installed plugin basename. wp_cache_flush(); $plugin_basename = $installer->plugin_info(); if ( $plugin_basename ) { // Deactivate the lite version first. $plugin = plugin_basename( WPCODE_FILE ); deactivate_plugins( $plugin ); do_action( 'wpcode_plugin_deactivated', $plugin ); // Activate the plugin silently. $activated = activate_plugin( $plugin_basename, '', false, true ); if ( ! is_wp_error( $activated ) ) { add_option( 'wpcode_install', 1 ); wp_send_json_success( esc_html__( 'Plugin installed & activated.', 'insert-headers-and-footers' ) ); } else { // Reactivate the lite plugin if pro activation failed. activate_plugin( plugin_basename( WPCODE_FILE ), '', false, true ); wp_send_json_error( esc_html__( 'Pro version installed but needs to be activated on the Plugins page inside your WordPress admin.', 'insert-headers-and-footers' ) ); } } wp_send_json_error( $error ); } } new WPCode_Connect(); includes/lite/admin/admin-scripts.php 0000644 00000003244 15021200650 0013657 0 ustar 00 settings->get_option( 'headers_footers_mode' ) ) { return; } wpcode_admin_scripts_global(); } /** * This is loaded after the plugin is activated and if the installation process was initiated * from the WPCode Library site it will redirect the user to the appropriate page to continue * that process. * * @return void */ function wpcode_listen_for_deploy_message() { // Load this only in the plugins list. $screen = get_current_screen(); $screens = array( 'plugins', 'plugin-install', ); if ( ! isset( $screen->id ) || ! in_array( $screen->id, $screens, true ) ) { return; } $click_page = add_query_arg( array( 'page' => 'wpcode-click', ), admin_url( 'admin.php' ) ) ?> id ) && isset( $submenu['wpcode'][ $upgrade_link_position ][2] ) ) { // Let's clean up the screen id a bit. $screen_id = str_replace( array( 'code-snippets_page_', 'toplevel_page_', ), '', $screen->id ); $submenu['wpcode'][ $upgrade_link_position ][2] = str_replace( 'wpcode-admin', $screen_id, $submenu['wpcode'][ $upgrade_link_position ][2] ); } // Prepare a HTML class. // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited if ( isset( $submenu['wpcode'][ $upgrade_link_position ][4] ) ) { $submenu['wpcode'][ $upgrade_link_position ][4] .= ' wpcode-sidebar-upgrade-pro'; } else { $submenu['wpcode'][ $upgrade_link_position ][] = 'wpcode-sidebar-upgrade-pro'; } // phpcs:enable WordPress.WP.GlobalVariablesOverride.Prohibited } /** * Output inline styles for the admin menu. */ public function admin_menu_styles() { $styles = 'a.wpcode-sidebar-upgrade-pro { background-color: #59A56D !important; color: #fff !important; font-weight: 600 !important; }'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped printf( '', $styles ); } } includes/lite/admin/notices.php 0000644 00000013233 15021200650 0012545 0 ustar 00 library_auth->has_auth() || ! isset( $_GET['page'] ) || 0 !== strpos( $_GET['page'], 'wpcode' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash return; } // Don't show if in headers & footers mode only. if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) { return; } $settings_url = add_query_arg( array( 'page' => 'wpcode-settings', ), admin_url( 'admin.php' ) ); $snippets_count = wpcode()->library->get_snippets_count(); // Translators: more here is used in the sense of "get access to more snippets" and gets replaced with the number of snippets if the library items are loaded correctly. $more = $snippets_count > 0 ? $snippets_count : __( 'more', 'insert-headers-and-footers' ); WPCode_Notice::info( sprintf( // Translators: %1$s and %2$s add a link to the settings page. %3$s and %4$s make the text bold. %6$s is replaced with the number of snippets and %5$s adds a "new" icon. __( '%5$s%1$sConnect to the WPCode Library%2$s to get access to %3$s%6$s FREE snippets%4$s!', 'insert-headers-and-footers' ), '', '', '', '', ' ', $more ), array( 'dismiss' => WPCode_Notice::DISMISS_GLOBAL, 'slug' => 'wpcode-library-connect-lite', ) ); } /** * Add a notice to consider more features with offer. * * @return void */ function wpcode_maybe_add_lite_top_bar_notice() { // Only add this to the WPCode pages. if ( ! isset( $_GET['page'] ) || 0 !== strpos( $_GET['page'], 'wpcode' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash return; } // Don't show in H&F mode. if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) { return; } $screen = get_current_screen(); if ( isset( $screen->id ) && false !== strpos( $screen->id, 'code-snippets_page_wpcode-' ) ) { $screen = str_replace( 'code-snippets_page_wpcode-', '', $screen->id ); } else { $screen = 'snippets-list'; } $upgrade_url = wpcode_utm_url( 'https://wpcode.com/lite/', 'top-notice', $screen ); WPCode_Notice::top( sprintf( // Translators: %1$s and %2$s add a link to the upgrade page. %3$s and %4$s make the text bold. __( '%3$sYou\'re using WPCode Lite%4$s. To unlock more features consider %1$supgrading to Pro%2$s.', 'insert-headers-and-footers' ), '', '', '', '' ), array( 'dismiss' => WPCode_Notice::DISMISS_USER, 'slug' => 'consider-upgrading', ) ); } /** * Show a notice with more features at the bottom of the Headers & Footers page. * * @return void */ function wpcode_headers_footers_bottom_notice() { // Don't show if in headers & footers mode only. if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) { return; } // Don't show if other notices were already displayed on the page. if ( ! empty( wpcode()->notice->notices ) ) { return; } $html = ''; $html .= sprintf( // Translators: Placeholders make the text bold. esc_html__( '%1$sBonus:%2$s WPCode Lite users get %3$s$50 off regular price%4$s, automatically applied at checkout', 'insert-headers-and-footers' ), '', '', '', '' ); $html .= '
'; // Add our custom notice for this page. WPCode_Notice::info( $html, array( 'slug' => 'ihaf-snippets', 'dismiss' => WPCode_Notice::DISMISS_USER, ) ); // Display notice we just added so that scripts are loaded. wpcode()->notice->display(); } includes/class-wpcode-error.php 0000644 00000017062 15021200650 0012573 0 ustar 00 previous_exception_handler = set_exception_handler( array( $this, 'track_errors' ) ); } /** * The error object caught when running the code. * * @param ParseError|Exception|Error|array $error The caught error. * * @return void */ public function add_error( $error ) { $this->errors[] = $error; $this->write_error_to_log( $error ); } /** * Check if an error has been recorded. * * @return bool */ public function has_error() { return ! empty( $this->errors ); } /** * Empty the errors record, useful if you want to * make sure the last error was thrown by your code. * * @return void */ public function clear_errors() { $this->errors = array(); } /** * Store the error in the logs. * * @param array|Exception $error The error object. * * @return void */ private function write_error_to_log( $error ) { $handle = 'error'; if ( is_array( $error ) && isset( $error['snippet'] ) ) { $this->track_snippet_error( $error ); } wpcode()->logger->handle( time(), $this->get_error_message( $error ), $handle ); } /** * Log the error in the snippet specific log and mark the snippet as having an error. * * @param array $error The error object. * * @return void */ private function track_snippet_error( $error ) { if ( ! isset( $error['snippet'] ) ) { return; } if ( is_int( $error['snippet'] ) ) { $snippet = new WPCode_Snippet( absint( $error['snippet'] ) ); } else { $snippet = $error['snippet']; } // Let's see if the snippet is currently marked as having an error. if ( ! isset( $snippet->id ) ) { return; } if ( empty( $error['wpc_type'] ) ) { $error['wpc_type'] = 'error'; } $last_error = $snippet->get_last_error(); // If we already have an error and the type of the current error is not deactivated let's not log it. if ( ! empty( $last_error ) && 'deactivated' === $last_error['wpc_type'] || ! empty( $last_error ) && $last_error['wpc_type'] === $error['wpc_type'] ) { return; } if ( ! isset( $error['time'] ) ) { $error['time'] = time(); } $handle = 'snippet-' . $snippet->get_id(); // Log to snippet specific log. wpcode()->logger->handle( time(), $this->get_error_message( $error ), $handle ); // Store the error details in the snippet meta. $snippet->set_last_error( $error ); do_action( 'wpcode_snippet_error_tracked', $error, $snippet ); // Reset the error count. $this->clear_snippets_errors(); } /** * Get the last error message. * * @return string */ public function get_last_error_message() { if ( empty( $this->errors ) ) { return ''; } $last_error = end( $this->errors ); return $this->get_error_message( $last_error ); } /** * Get the error message from the error object, either an array or an Exception object. * * @param array|Exception $error The error object. * * @return string */ public function get_error_message( $error ) { if ( is_array( $error ) && isset( $error['message'] ) ) { return $error['message']; } if ( ! is_array( $error ) && method_exists( $error, 'getMessage' ) ) { return $error->getMessage(); } return ''; } /** * Get the short version of the error message without the file and line number. * * @param string $message The error message. * * @return string */ public function get_error_message_short( $message ) { $pattern = '/^([^:]+: .+?) in/'; if ( preg_match( $pattern, $message, $matches ) ) { $message = $matches[1]; } return $message; } /** * Set the error count. * * @param int $count The error count. * * @return void */ private function set_error_count( $count ) { $this->error_count = $count; } /** * Set the snippets that have errors. * * @param int[] $snippets Ids of the snippets with errors. * * @return void */ private function set_snippets_with_errors( $snippets ) { update_option( 'wpcode_snippets_errors', $snippets ); } /** * Clear the persistent error count. * * @return void */ public function clear_snippets_errors() { unset( $this->error_count ); delete_option( 'wpcode_snippets_errors' ); $this->snippets_with_errors = false; $this->gather_errors(); } /** * Get the error count. * * @return int */ public function get_error_count() { if ( ! isset( $this->error_count ) ) { $snippets_with_errors = $this->get_snippets_with_errors(); $this->error_count = is_array( $snippets_with_errors ) ? count( $snippets_with_errors ) : 0; } return $this->error_count; } /** * Get the snippets that have errors. * * @return int[] */ public function get_snippets_with_errors() { if ( ! isset( $this->snippets_with_errors ) ) { $this->snippets_with_errors = get_option( 'wpcode_snippets_errors' ); } return $this->snippets_with_errors; } /** * Let's query all the snippets that have an error set to them. * * @return void */ public function gather_errors() { // If we already have an error count, no need to query the db. if ( false !== $this->get_snippets_with_errors() ) { return; } $snippets = get_posts( array( 'post_type' => 'wpcode', 'posts_per_page' => - 1, 'post_status' => 'any', 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query 'relation' => 'OR', array( 'key' => '_wpcode_last_error', 'compare' => 'EXISTS', ), ), 'fields' => 'ids', ) ); $this->set_snippets_with_errors( $snippets ); $this->set_error_count( count( $snippets ) ); } /** * Track errors thrown by PHP. * * @param Throwable $e The error or exception object. * * @return void */ public function track_errors( $e ) { $error = array( 'line' => $e->getLine(), 'file' => $e->getFile(), 'message' => $e->getMessage(), 'type' => 'error', ); if ( wpcode()->execute->is_error_from_wpcode( $error ) && ! empty( $error['line'] ) ) { $snippet = wpcode()->execute->snippet_executed; if ( ! empty( $snippet ) && ! wpcode()->execute->snippet_location_disable( $snippet ) ) { $error['snippet'] = $snippet; $error['error_line'] = $error['line']; // Let's try to determine on which page we are and potentially save that URL in the error details. global $wp; if ( isset( $wp->request ) ) { $error['url'] = home_url( $wp->request ); } wpcode()->error->add_error( $error ); } } $this->call_previous_exception_handler( $e ); } /** * Call the previous exception handler. * * @param Throwable $e The error or exception object. * * @return void * @throws Throwable The error or exception object. */ private function call_previous_exception_handler( $e ) { if ( isset( $this->previous_exception_handler ) ) { call_user_func( $this->previous_exception_handler, $e ); } else { throw $e; } exit(); } } includes/legacy.php 0000644 00000001633 15021200650 0010321 0 ustar 00 log_size_limit = apply_filters( 'wpcode_log_file_size_limit', $log_size_limit ); add_action( 'plugins_loaded', array( $this, 'write_cached_logs' ) ); } /** * Close all open file handles. */ public function __destruct() { foreach ( $this->handles as $handle ) { if ( is_resource( $handle ) ) { fclose( $handle ); // @codingStandardsIgnoreLine. } } } /** * Write cached logs. */ public function write_cached_logs() { foreach ( $this->cached_logs as $log ) { $this->write( $log['entry'], $log['handle'] ); } } /** * Format an entry for the log file. * * @param int $timestamp The timestamp for the log entry. * @param string $message The error message. * * @return mixed|void */ public function format_entry( $timestamp, $message ) { $time_string = date( 'c', $timestamp );// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date $entry = "{$time_string} {$message}"; return apply_filters( 'wpcode_format_log_entry', $entry, array( 'timestamp' => $timestamp, 'message' => $message, ) ); } /** * Handle a direct request to log something & format it before writing. * * @param int $timestamp The timestamp for the log entry. * @param string $message The error message. * @param string $handle The log handle. * * @return void */ public function handle( $timestamp, $message, $handle ) { if ( ! $this->is_enabled() ) { return; } $entry = $this->format_entry( $timestamp, $message ); $this->write( $entry, $handle ); } /** * Write an entry to a log file by its handle. * * @param string $entry The entry text. * @param string $handle The log handle. * * @return bool */ public function write( $entry, $handle ) { $result = false; if ( $this->should_rotate( $handle ) ) { $this->log_rotate( $handle ); } if ( $this->open( $handle ) && is_resource( $this->handles[ $handle ] ) ) { $result = fwrite( $this->handles[ $handle ], $entry . PHP_EOL ); // @codingStandardsIgnoreLine. } else { $this->cache_log( $entry, $handle ); } return false !== $result; } /** * Should the log file be rotated? Returns true if the file is above the size limit. * * @param string $handle Log handle. * * @return bool */ public function should_rotate( $handle ) { $file = self::get_file_path( $handle ); if ( $file ) { if ( $this->is_open( $handle ) ) { $file_stat = fstat( $this->handles[ $handle ] ); return $file_stat['size'] > $this->log_size_limit; } elseif ( file_exists( $file ) ) { return filesize( $file ) > $this->log_size_limit; } else { return false; } } else { return false; } } /** * Rotate log files by adding a suffix up to 10. * * @param string $handle Log handle. */ protected function log_rotate( $handle ) { for ( $i = 8; $i >= 0; $i -- ) { $this->increment_log_infix( $handle, $i ); } $this->increment_log_infix( $handle ); } /** * Increment a log file suffix. * * @param string $handle Log handle. * @param null|int $number Optional. Default null. Log suffix number to be incremented. * * @return bool True if increment was successful, otherwise false. */ protected function increment_log_infix( $handle, $number = null ) { if ( null === $number ) { $suffix = ''; $next_suffix = '.0'; } else { $suffix = '.' . $number; $next_suffix = '.' . ( $number + 1 ); } $rename_from = self::get_file_path( "{$handle}{$suffix}" ); $rename_to = self::get_file_path( "{$handle}{$next_suffix}" ); if ( $this->is_open( $rename_from ) ) { $this->close( $rename_from ); } if ( is_writable( $rename_from ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable return rename( $rename_from, $rename_to ); // phpcs:ignore WordPress.WP.AlternativeFunctions.rename_rename } else { return false; } } /** * Open a log file for writing. * * @param string $handle Log handle. * * @return bool */ public function open( $handle = 'log' ) { if ( $this->is_open( $handle ) ) { return true; } $file = self::get_file_path( $handle ); if ( $file ) { if ( ! file_exists( $file ) ) { $temphandle = @fopen( $file, 'w+' ); // @codingStandardsIgnoreLine. if ( is_resource( $temphandle ) ) { @fclose( $temphandle ); // @codingStandardsIgnoreLine. if ( defined( 'FS_CHMOD_FILE' ) ) { @chmod( $file, FS_CHMOD_FILE ); // @codingStandardsIgnoreLine. } } } $resource = @fopen( $file, 'a' ); // @codingStandardsIgnoreLine. if ( $resource ) { $this->handles[ $handle ] = $resource; return true; } } return false; } /** * Close a log file. * * @param string $handle Log handle. * * @return void */ public function close( $handle = 'log' ) { if ( $this->is_open( $handle ) ) { @fclose( $this->handles[ $handle ] ); // @codingStandardsIgnoreLine. unset( $this->handles[ $handle ] ); } } /** * Check if a handle is open. * * @param string $handle Log handle. * * @return bool True if $handle is open. */ protected function is_open( $handle ) { return array_key_exists( $handle, $this->handles ) && is_resource( $this->handles[ $handle ] ); } /** * Get the file path for a log handle. * * @param string $handle Log handle. * * @return string */ public static function get_file_path( $handle ) { $date_suffix = date( 'Y-m-d', time() );// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date $hash_suffix = wp_hash( $handle ); $filename = sanitize_file_name( implode( '-', array( $handle, $date_suffix, $hash_suffix ) ) . '.log' ); return self::get_log_dir() . $filename; } /** * Get the log directory path while also making sure it exists & we have an index.html and a .htaccess file in it. * * @return string */ public static function get_log_dir() { $uploads = wp_upload_dir(); $base_path = trailingslashit( $uploads['basedir'] ) . 'wpcode-logs/'; if ( ! file_exists( $base_path ) ) { wp_mkdir_p( $base_path ); WPCode_File_Cache::create_index_html_file( $base_path ); WPCode_File_Cache::create_htaccess_file( $base_path ); } return $base_path; } /** * Store a log entry in the cache for writing later. * * @param string $entry Log entry. * @param string $handle Log handle. * * @return void */ public function cache_log( $entry, $handle ) { $this->cached_logs[] = array( 'entry' => $entry, 'handle' => $handle, ); } /** * Is logging errors enabled? * * @return bool */ public function is_enabled() { if ( ! isset( $this->enabled ) ) { $this->enabled = boolval( wpcode()->settings->get_option( 'error_logging', false ) ); } return $this->enabled; } /** * Go through the logs folder and return a list of all .log files. * * @return array */ public function get_logs() { $logs = array(); $files = glob( self::get_log_dir() . '*.log' ); if ( ! empty( $files ) ) { foreach ( $files as $file ) { $logs[] = array( 'filename' => basename( $file ), 'path' => $file, 'size' => filesize( $file ), ); } } return $logs; } /** * Delete a log file by its name. * * @param string $name Log name. * * @return void */ public function delete_log( $name ) { // If the file doesn't include the .log extension, add it. if ( ! preg_match( '/\.log$/', $name ) ) { $name .= '.log'; } $real_file_path = realpath( self::get_log_dir() . $name ); $real_base_path = realpath( self::get_log_dir() ) . DIRECTORY_SEPARATOR; if ( false === $real_file_path || strpos( $real_file_path, $real_base_path ) !== 0 ) { // Traversal attempt. return; } // Delete the file from the server. @unlink( $real_file_path ); // @codingStandardsIgnoreLine. } } includes/capabilities.php 0000644 00000005371 15021200650 0011511 0 ustar 00 array( 'label' => __( 'Edit Text/Blocks Snippets', 'insert-headers-and-footers' ), 'description' => __( 'This enables users to edit just text & blocks snippets, no HTML code is allowed.', 'insert-headers-and-footers' ), ), 'wpcode_edit_html_snippets' => array( 'label' => __( 'Edit HTML, JavaScript & CSS Snippets', 'insert-headers-and-footers' ), 'description' => __( 'This enables users to add and manage HTML, JavaScript & CSS snippets but also Text & Blocks snippets.', 'insert-headers-and-footers' ), ), 'wpcode_edit_php_snippets' => array( 'label' => __( 'Edit PHP Snippets', 'insert-headers-and-footers' ), 'description' => __( 'This enables users to add and manage PHP snippets and all the other types of snippets.', 'insert-headers-and-footers' ), ), 'wpcode_manage_conversion_pixels' => array( 'label' => __( 'Manage Conversion Pixels Settings', 'insert-headers-and-footers' ), 'description' => __( 'This enables users to manage the conversion pixels settings.', 'insert-headers-and-footers' ), ), 'wpcode_file_editor' => array( 'label' => __( 'Use the File Editor', 'insert-headers-and-footers' ), 'description' => __( 'This enables users to use the file editor.', 'insert-headers-and-footers' ), ), ); } /** * Return just the keys to avoid a gettext call that causes an endless loop with TranslatePress. * * @return string[] */ function wpcode_custom_capabilities_keys() { return array( 'wpcode_edit_text_snippets', 'wpcode_edit_html_snippets', 'wpcode_edit_php_snippets', 'wpcode_manage_conversion_pixels', 'wpcode_file_editor', ); } includes/class-wpcode-auto-insert.php 0000644 00000007151 15021200650 0013712 0 ustar 00 hooks(); } /** * Add hooks. * * @return void */ private function hooks() { add_action( 'plugins_loaded', array( $this, 'load_types' ), 1 ); } /** * Define the categories of auto-insert types. * * @return void */ public function define_category_label() { $categories_labels = array( 'global' => __( 'Global', 'insert-headers-and-footers' ), 'page' => __( 'Page-Specific', 'insert-headers-and-footers' ), 'ecommerce' => __( 'eCommerce', 'insert-headers-and-footers' ), ); // Add the labels to the $this->type_categories array. foreach ( $categories_labels as $key => $category ) { $this->type_categories[ $key ]['label'] = $category; } $this->categories_with_labels = true; } /** * Load and initialize the different types of auto-insert types. * * @return void */ public function load_types() { require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-type.php'; require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-everywhere.php'; require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-site-wide.php'; require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-single.php'; require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-archive.php'; require_once WPCODE_PLUGIN_PATH . 'includes/auto-insert/class-wpcode-auto-insert-admin.php'; } /** * Register an auto-insert type. * * @param WPCode_Auto_Insert_Type $type The type to add to the available types. * * @return void */ public function register_type( $type ) { $this->types[ $type->name ] = $type; if ( isset( $type->category ) ) { $this->type_categories[ $type->category ]['types'][ $type->name ] = $type; } } /** * Get the types of auto-insert options. * * @return WPCode_Auto_Insert_Type[] */ public function get_types() { return $this->types; } /** * Get the categories of auto-insert options. * * @return array */ public function get_type_categories() { if ( ! isset( $this->categories_with_labels ) ) { $this->define_category_label(); } return $this->type_categories; } /** * Get the categories info for the sidebar admin view. * * @return array */ public function get_type_categories_for_sidebar() { $sidebar_categories = array(); $categories = $this->get_type_categories(); foreach ( $categories as $key => $category ) { $sidebar_categories[] = array( 'slug' => $key, 'name' => $category['label'], ); } return $sidebar_categories; } /** * Get a location label from the class not the term. * * @param string $location The location slug/name. * * @return string */ public function get_location_label( $location ) { foreach ( $this->types as $type ) { /** * Added for convenience. * * @var WPCode_Auto_Insert_Type $type */ $locations = $type->get_locations(); if ( isset( $locations[ $location ] ) ) { if ( isset( $locations[ $location ]['label'] ) ) { return $locations[ $location ]['label']; } else { return $locations[ $location ]; } } } return ''; } } includes/generator/class-wpcode-generator-sidebar.php 0000644 00000020523 15021200650 0017021 0 ustar 00 title = __( 'Sidebar', 'insert-headers-and-footers' ); $this->description = __( 'Generate a snippet to register a sidebar for your widgets.', 'insert-headers-and-footers' ); } /** * Load the generator tabs. * * @return void */ protected function load_tabs() { $this->tabs = array( 'info' => array( 'label' => __( 'Info', 'insert-headers-and-footers' ), 'columns' => array( // Column 1. array( // Column 1 fields. array( 'type' => 'description', 'label' => __( 'Overview', 'insert-headers-and-footers' ), 'content' => sprintf( // Translators: Placeholders add links to the wordpress.org references. __( 'This generator makes it easy to add sidebars to your website using the "register_sidebar" function.', 'insert-headers-and-footers' ), '', '' ), ), ), // Column 2. array( // Column 2 fields. array( 'type' => 'list', 'label' => __( 'Usage', 'insert-headers-and-footers' ), 'content' => array( __( 'Fill in the forms using the menu on the left.', 'insert-headers-and-footers' ), __( 'Click the "Update Code" button.', 'insert-headers-and-footers' ), __( 'Click on "Use Snippet" to create a new snippet with the generated code.', 'insert-headers-and-footers' ), __( 'Activate and save the snippet and you\'re ready to go', 'insert-headers-and-footers' ), ), ), ), // Column 3. array( // Column 3 fields. array( 'type' => 'description', 'label' => __( 'Examples', 'insert-headers-and-footers' ), 'content' => __( 'You can add multiple widget areas for your footer or post-type specific sidebars.', 'insert-headers-and-footers' ), ), ), ), ), 'general' => array( 'label' => __( 'General', 'insert-headers-and-footers' ), 'columns' => array( // Column 1. array( array( 'type' => 'text', 'label' => __( 'Function name', 'insert-headers-and-footers' ), 'description' => __( 'Make this unique to avoid conflicts with other snippets', 'insert-headers-and-footers' ), 'id' => 'function_name', 'placeholder' => 'register_custom_sidebars', 'default' => 'register_custom_sidebars' . time(), ), ), // Column 2. array( array( 'type' => 'text', 'label' => __( 'Text Domain', 'insert-headers-and-footers' ), 'description' => __( 'Optional text domain for translations.', 'insert-headers-and-footers' ), 'id' => 'text_domain', 'placeholder' => 'text_domain', 'default' => 'text_domain', ), ), ), ), 'schedule' => array( 'label' => __( 'Sidebars', 'insert-headers-and-footers' ), 'columns' => array( // Column 1. array( array( 'type' => 'text', 'label' => __( 'Sidebar Id', 'insert-headers-and-footers' ), 'description' => __( 'This is the sidebar unique id, used in the code, lowercase with no spaces.', 'insert-headers-and-footers' ), 'id' => 'sidebar_id', 'name' => 'sidebar_id[]', 'repeater' => 'sidebars', ), array( 'type' => 'text', 'label' => __( 'Name', 'insert-headers-and-footers' ), 'description' => __( 'Add a descriptive label for this sidebar to be used in the admin.', 'insert-headers-and-footers' ), 'id' => 'sidebar_name', 'name' => 'sidebar_name[]', 'repeater' => 'sidebars', ), array( 'type' => 'text', 'label' => __( 'Description', 'insert-headers-and-footers' ), 'description' => __( 'A short description for the the admin area.', 'insert-headers-and-footers' ), 'id' => 'sidebar_description', 'name' => 'sidebar_description[]', 'repeater' => 'sidebars', ), array( 'type' => 'text', 'label' => __( 'CSS Class', 'insert-headers-and-footers' ), 'description' => __( 'Use an unique CSS class name for better control over this sidebar\'s styles in the admin.', 'insert-headers-and-footers' ), 'id' => 'sidebar_css_class', 'name' => 'sidebar_css_class[]', 'repeater' => 'sidebars', ), ), // Column 2. array( array( 'type' => 'html', 'label' => __( 'Before Title', 'insert-headers-and-footers' ), 'description' => __( 'HTML code to add before each widget title.', 'insert-headers-and-footers' ), 'id' => 'before_title', 'name' => 'before_title[]', 'repeater' => 'sidebars', 'default' => ''; echo ''; echo 'get_field_id( '$id' ) .'\" name=\"'. \$this->get_field_name( '$id' ) .'\" class=\"widefat\" value=\"'. esc_attr(\$instance['$id']) .'\" />'; {$this->widget_field_description( $description )} echo '
'; "; } /** * Email field, uses the text field with a different input type. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param array $options The field options (unused here). * * @return string */ public function widget_field_email( $id, $label, $description, $options = array() ) { return $this->widget_field_text( $id, $label, $description, $options, 'email' ); } /** * URL field, uses the text field with a different input type. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param array $options The field options (unused here). * * @return string */ public function widget_field_url( $id, $label, $description, $options = array() ) { return $this->widget_field_text( $id, $label, $description, $options, 'url' ); } /** * Number field, uses the text field with a different input type. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param array $options The field options (unused here). * * @return string */ public function widget_field_number( $id, $label, $description, $options = array() ) { return $this->widget_field_text( $id, $label, $description, $options, 'number' ); } /** * Textarea field. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param array $options The field options (unused here). * * @return string */ public function widget_field_textarea( $id, $label, $description, $options = array() ) { return " echo ''; echo ''; echo ''; {$this->widget_field_description( $description )} echo '
'; "; } /** * Get the code for a text field. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param string $options The field options. * * @return string */ public function widget_field_select( $id, $label, $description, $options = array() ) { $field_code = " echo ''; echo ''; echo ''; {$this->widget_field_description( $description )} echo '
';"; return $field_code; } /** * Get the code for a checkbox field. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param string $options The field options. * * @return string */ public function widget_field_checkbox( $id, $label, $description, $options = array() ) { $field_code = " echo ''; echo '';"; foreach ( $options as $value => $label ) { if ( empty( $value ) ) { continue; } $field_code .= "\n\t\t echo'
';"; } $field_code .= "{$this->widget_field_description( $description )} echo '';"; return $field_code; } /** * Get the code for a radio field. * * @param string $id The field id. * @param string $label The field label. * @param string $description The field description. * @param string $options The field options. * * @return string */ public function widget_field_radio( $id, $label, $description, $options = array() ) { $field_code = " echo ''; echo '';"; foreach ( $options as $value => $label ) { if ( empty( $value ) ) { continue; } $field_code .= "\n\t\t echo'
';"; } $field_code .= "\n{$this->widget_field_description( $description )} echo '';"; return $field_code; } /** * Get standard markup for the description of a field. * * @param string $description The field description. * * @return string */ public function widget_field_description( $description ) { if ( empty( $description ) ) { return ''; } return "echo '' . __( '$description', '{$this->get_value( 'text_domain' ) }' ) . '';"; } /** * Get the snippet code with dynamic values applied. * * @return string */ public function get_snippet_code() { $instance_defaults = ''; $fields_markup = ''; $fields = $this->get_value( 'field_id' ); $labels = $this->get_value( 'field_label' ); $values = $this->get_value( 'field_default' ); $type = $this->get_value( 'field_type' ); $options = $this->get_value( 'field_options' ); $descriptions = $this->get_value( 'field_description' ); if ( ! empty( $fields ) && is_array( $fields ) ) { foreach ( $fields as $key => $field_id ) { if ( empty( $field_id ) ) { continue; } $value = "'$values[$key]'"; if ( 'checkbox' === $type[ $key ] ) { $value = "array('$values[$key]')"; } $instance_defaults .= "\t\t\t'$field_id' => $value,\n"; $fields_markup .= $this->get_widget_field_code( $type[ $key ], $field_id, $labels[ $key ], $descriptions[ $key ], $options[ $key ] ); } } $widget_output = $this->get_value( 'code' ); if ( empty( $widget_output ) && ! empty( $fields ) && is_array( $fields ) ) { // If there's no custom PHP code for the output build a simple list output. $widget_output = "\n\t\techo '%s
', __( 'Snippet has not been activated due to an error.', 'insert-headers-and-footers' ) ); if ( ! $doing_ajax ) { // Not doing ajax let's ask them to go back. $message .= '' . __( 'Please click the back button in the browser to update the snippet.', 'insert-headers-and-footers' ) . '
'; } } else { $message = sprintf( '%s
', __( 'WPCode has detected an error in one of the snippets which has now been automatically deactivated.', 'insert-headers-and-footers' ) ); } if ( ! $doing_ajax ) { $message .= ''; if ( ! empty( $this->snippet_executed ) ) { $deactivated_snippets_link = add_query_arg( array( 'page' => 'wpcode', 'view' => 'has_error', ), admin_url( 'admin.php' ) ); $message .= '' . __( 'View Snippets With Errors', 'insert-headers-and-footers' ) . ' '; } if ( ! $this->is_doing_activation() ) { if ( wpcode()->settings->get_option( 'error_logging' ) ) { $url = add_query_arg( array( 'page' => 'wpcode-tools', 'view' => 'logs', ), admin_url( 'admin.php' ) ); $message .= '' . __( 'View error logs', 'insert-headers-and-footers' ) . ''; } else { $url = add_query_arg( array( 'page' => 'wpcode-settings', ), admin_url( 'admin.php' ) ); $message .= '' . __( 'Enable error logging', 'insert-headers-and-footers' ) . ''; } } $message .= '
'; } $message .= sprintf( '%s
', __( 'Error message:', 'insert-headers-and-footers' ) ); $message .= sprintf( '%s
', $error['message'] );
return $message;
}
/**
* Mark as doing activation.
*
* @return void
*/
public function doing_activation() {
$this->doing_activation = true;
}
/**
* Check if we are in the middle of activating a snippet.
* Used for choosing the type of custom error message to display.
*
* @return bool
*/
public function is_doing_activation() {
return $this->doing_activation;
}
/**
* Mark as finished activation.
*
* @return void
*/
public function not_doing_activation() {
$this->doing_activation = false;
}
/**
* Check if a code type is marked as pro.
*
* @param string $key The key of the type to check.
*
* @return bool
*/
public function is_type_pro( $key ) {
$types = $this->get_types();
// Find type by key in the list of types.
$pro_types = wp_list_filter( $types, array( 'is_pro' => true ) );
if ( isset( $pro_types[ $key ] ) ) {
return true;
}
return false;
}
/**
* Get the list of locations where snippets can be automatically disabled.
*
* @return array
*/
public function get_locations_to_auto_disable() {
// Use this filter to add locations where the snippet should be auto disabled or disable auto-disable.
return apply_filters(
'wpcode_error_locations_auto_disable',
array(
'everywhere',
'admin_only',
)
);
}
/**
* Check if we should auto disable snippets on the frontend.
*
* @return bool
*/
public function should_auto_disable() {
return apply_filters(
'wpcode_auto_disable_frontend',
is_admin()
);
}
/**
* Add a method to detect suspicious code.
*
* @param string $code The code to check.
*
* @return bool
*/
public static function is_code_not_allowed( $code ) {
if ( preg_match_all( '/(base64_decode|error_reporting|ini_set|eval)\s*\(/i', $code, $matches ) ) {
if ( count( $matches[0] ) > 5 ) {
return true;
}
}
if ( preg_match( '/dns_get_record/i', $code ) ) {
return true;
}
return false;
}
/**
* Callback for the wpcode_snippet_output_php filter to prevent loading the edited snippet.
* This allows us to run actual checks on the code without throwing function redeclare errors or similar
* by executing the same code twice.
*
* @param string $code The code to be output.
* @param WPCode_Snippet $snippet The snippet object.
*
* @return string
*/
public function dont_load_edited_snippet( $code, $snippet ) {
if ( ! is_admin() ) {
return $code;
}
if ( ! isset( $_POST['wpcode-save-snippet-nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['wpcode-save-snippet-nonce'] ), 'wpcode-save-snippet' ) ) {
return $code;
}
// Let's check if $_REQUEST['id'] matches the snippet id.
if ( ! isset( $_REQUEST['id'] ) || absint( $_REQUEST['id'] ) !== $snippet->get_id() ) {
return $code;
}
return '';
}
}
includes/class-wpcode-smart-tags.php 0000644 00000016317 15021200650 0013526 0 ustar 00 hooks();
}
/**
* Add filters to replace the tags in the snippet code.
*
* @return void
*/
public function hooks() {
}
/**
* Load tags in the instance.
*
* @return void
*/
public function load_tags() {
$generic_tags = array(
'id' => array(
'label' => __( 'Content ID', 'insert-headers-and-footers' ),
'function' => array( $this, 'get_the_ID' ),
),
'title' => array(
'label' => __( 'Content title', 'insert-headers-and-footers' ),
'function' => array( $this, 'get_the_title' ),
),
'categories' => array(
'label' => __( 'Content Categories', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_categories' ),
),
'email' => array(
'label' => __( 'User\'s email', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_email' ),
),
'first_name' => array(
'label' => __( 'User\'s first name', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_first_name' ),
),
'last_name' => array(
'label' => __( 'User\'s last name', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_last_name' ),
),
'custom_field' => array(
'label' => __( 'Custom Field (meta)', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_custom_field' ),
'editor_tag' => 'custom_field="meta_key"',
),
'author_id' => array(
'label' => __( 'Author ID', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_author_id' ),
),
'author_name' => array(
'label' => __( 'Author Name', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_author_name' ),
),
'author_url' => array(
'label' => __( 'Author URL', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_author_url' ),
),
'login_url' => array(
'label' => __( 'Login URL', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_login_url' ),
),
'logout_url' => array(
'label' => __( 'Logout URL', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_logout_url' ),
),
'permalink' => array(
'label' => __( 'Permalink', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_permalink' ),
),
);
$woocommerce_tags = array(
'wc_order_number' => array(
'label' => __( 'Order number', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_wc_order_number' ),
),
'wc_order_subtotal' => array(
'label' => __( 'Order subtotal', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_wc_order_subtotal' ),
),
'wc_order_total' => array(
'label' => __( 'Order total', 'insert-headers-and-footers' ),
'function' => array( $this, 'tag_value_wc_order_total' ),
),
);
$tags = array(
'generic' => array(
'label' => '',
'tags' => $generic_tags,
),
);
if ( $this->woocommerce_available() ) {
$tags['woocommerce'] = array(
'label' => 'WooCommerce',
'tags' => $woocommerce_tags,
);
}
$this->tags = apply_filters( 'wpcode_smart_tags', $tags );
}
/**
* Get smart tags with labels.
*
* @return array
*/
public function get_tags() {
if ( ! isset( $this->tags ) ) {
$this->load_tags();
}
return $this->tags;
}
/**
* Check if WooCommerce is installed & active on the site.
*
* @return bool
*/
public function woocommerce_available() {
return class_exists( 'woocommerce' );
}
/**
* @param $tag
*
* @return false|mixed
*/
public function get_tag_editor_tag( $tag ) {
$tags = $this->get_tags();
foreach ( $tags as $category ) {
if ( isset( $category['tags'][ $tag ]['editor_tag'] ) ) {
return $category['tags'][ $tag ]['editor_tag'];
}
}
return $tag;
}
/**
* Get a tag in the format used in the code.
*
* @param string $tag The tag to wrap in code format.
*
* @return string
*/
public function get_tag_code( $tag ) {
return "{{$tag}}";
}
/**
* Smart tags picker markup with a target id where the selected smart tag will be inserted.
*
* @param string $target The id of the textarea where the smart tag will be inserted.
*
* @return void
*/
public function smart_tags_picker( $target = '' ) {
$tags = $this->get_tags();
$unavailable = ! empty( $this->upgrade_notice_data() ) ? ' wpcode-smart-tags-unavailable' : '';
?>
get_tag_code( $tag );
$editor_tag = $this->get_tag_code( $this->get_tag_editor_tag( $tag ) );
printf(
'',
esc_html( $tag_code ),
esc_html( $label ),
esc_attr( $editor_tag )
);
}
/**
* Get upgrade notice data.
*
* @return array
*/
public function upgrade_notice_data() {
return array();
}
/**
* Print upgrade notice data attributes, if any.
*
* @return void
*/
public function upgrade_data_attributes() {
$upgrade_data = $this->upgrade_notice_data();
foreach ( $upgrade_data as $attribute => $value ) {
printf( ' data-upgrade-%s="%s"', esc_attr( $attribute ), esc_attr( $value ) );
}
}
}
includes/shortcode.php 0000644 00000004604 15021200650 0011050 0 ustar 00 0,
'wpcode_source' => 'shortcode',
)
);
if ( 0 === $atts['id'] ) {
return '';
}
$snippet = new WPCode_Snippet( absint( $atts['id'] ) );
if ( ! $snippet->is_active() ) {
return '';
}
// Let's check that conditional logic rules are met.
if ( $snippet->conditional_rules_enabled() && ! wpcode()->conditional_logic->are_snippet_rules_met( $snippet ) && apply_filters( 'wpcode_shortcode_use_conditional_logic', true ) ) {
return '';
}
$shortcode_location = apply_filters( 'wpcode_get_snippets_for_location', array( $snippet ), 'shortcode' );
if ( empty( $shortcode_location ) ) {
return '';
}
$snippet->location = $atts['wpcode_source'];
do_action( 'wpcode_shortcode_before_output', $snippet, $atts, $content, $tag );
return wpcode()->execute->get_snippet_output( $snippet );
}
/**
* Before the shortcode output, let's check if we have to load any shortcode attributes to the class instance.
*
* @param WPCode_Snippet $snippet The snippet instance.
* @param array $atts The shortcode attributes.
* @param string|null $content Shortcode content, if any.
* @param string $tag The shortcode tag.
*
* @return void
*/
function wpcode_pass_shortcode_attributes_to_snippet( $snippet, $atts, $content, $tag ) {
// Let's see if we have to load any shortcode attributes.
$shortcode_attributes = $snippet->get_shortcode_attributes();
if ( ! empty( $shortcode_attributes ) ) {
foreach ( $shortcode_attributes as $attribute ) {
$value = isset( $atts[ $attribute ] ) ? $atts[ $attribute ] : '';
$snippet->set_attribute( $attribute, apply_filters( 'wpcode_shortcode_attribute_value', $value, $attribute ) );
}
}
if ( ! empty( $content ) ) {
$snippet->set_attribute( 'content', $content );
}
}
includes/auto-insert/class-wpcode-auto-insert-site-wide.php 0000644 00000004715 15021200650 0020057 0 ustar 00 locations = array(
'site_wide_header' => array(),
'site_wide_body' => array(),
'site_wide_footer' => array(),
);
}
/**
* Load the label.
*
* @return void
*/
public function load_label() {
$this->label = __( 'Site Wide (Frontend)', 'insert-headers-and-footers' );
}
/**
* Load the available locations.
*
* @return void
*/
public function load_locations() {
$this->locations = array(
'site_wide_header' => array(
'label' => esc_html__( 'Site Wide Header', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet between the head tags of your website on all pages.', 'insert-headers-and-footers' ),
),
'site_wide_body' => array(
'label' => esc_html__( 'Site Wide Body', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert the snippet just after the opening body tag.', 'insert-headers-and-footers' ),
),
'site_wide_footer' => array(
'label' => esc_html__( 'Site Wide Footer', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert the snippet in the footer just before the closing body tag.', 'insert-headers-and-footers' ),
),
);
}
/**
* Add hooks specific to this type.
*
* @return void
*/
public function hooks() {
add_action( 'wp_head', array( $this, 'insert_header' ) );
add_action( 'wp_footer', array( $this, 'insert_footer' ) );
add_action( 'wp_body_open', array( $this, 'insert_body' ) );
}
/**
* Insert snippets in the header.
*
* @return void
*/
public function insert_header() {
$this->output_location( 'site_wide_header' );
}
/**
* Insert snippets in the footer.
*
* @return void
*/
public function insert_footer() {
$this->output_location( 'site_wide_footer' );
}
/**
* Insert snippets after the opening body tag.
*
* @return void
*/
public function insert_body() {
$this->output_location( 'site_wide_body' );
}
}
new WPCode_Auto_Insert_Site_Wide();
includes/auto-insert/class-wpcode-auto-insert-admin.php 0000644 00000004301 15021200650 0017244 0 ustar 00 locations = array(
'admin_head' => array(),
'admin_footer' => array(),
);
}
/**
* Load the label.
*
* @return void
*/
public function load_label() {
$this->label = __( 'Admin Area', 'insert-headers-and-footers' );
}
/**
* Load the available locations.
*
* @return void
*/
public function load_locations() {
$this->locations = array(
'admin_head' => array(
'label' => esc_html__( 'Admin header', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet in the wp-admin header area.', 'insert-headers-and-footers' ),
),
'admin_footer' => array(
'label' => esc_html__( 'Admin footer', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet in the wp-admin footer.', 'insert-headers-and-footers' ),
),
);
}
/**
* Checks if we are on an archive page and we should be executing hooks.
*
* @return bool
*/
public function conditions() {
return is_admin();
}
/**
* Add hooks specific to single posts.
*
* @return void
*/
public function hooks() {
add_action( 'admin_head', array( $this, 'insert_admin_head' ), 9 );
add_action( 'admin_footer', array( $this, 'insert_admin_footer' ), 9 );
}
/**
* Output snippet in the admin head.
*
* @return void
*/
public function insert_admin_head() {
$this->output_location( 'admin_head' );
}
/**
* Output snippet in the admin footer.
*
* @return void
*/
public function insert_admin_footer() {
$this->output_location( 'admin_footer' );
}
/**
* Override the parent method to add the start hook specific to the admin.
*
* @return void
*/
protected function add_start_hook() {
add_action( 'admin_init', array( $this, 'maybe_run_hooks' ) );
}
}
new WPCode_Auto_Insert_Admin();
includes/auto-insert/class-wpcode-auto-insert-single.php 0000644 00000020542 15021200650 0017442 0 ustar 00 locations = array(
'before_post' => array(),
'after_post' => array(),
'before_content' => array(),
'after_content' => array(),
'before_paragraph' => array(),
'after_paragraph' => array(),
);
}
/**
* Load the label.
*
* @return void
*/
public function load_label() {
$this->label = __( 'Page, Post, Custom Post Type', 'insert-headers-and-footers' );
}
/**
* Load the available locations.
*
* @return void
*/
public function load_locations() {
$this->locations = array(
'before_post' => array(
'label' => esc_html__( 'Insert Before Post', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet at the beginning of a post.', 'insert-headers-and-footers' ),
),
'after_post' => array(
'label' => esc_html__( 'Insert After Post', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet at the end of a post.', 'insert-headers-and-footers' ),
),
'before_content' => array(
'label' => esc_html__( 'Insert Before Content', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet at the beginning of the post content.', 'insert-headers-and-footers' ),
),
'after_content' => array(
'label' => esc_html__( 'Insert After Content', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet at the end of the post content.', 'insert-headers-and-footers' ),
),
'before_paragraph' => array(
'label' => esc_html__( 'Insert Before Paragraph', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet before paragraph # of the post content.', 'insert-headers-and-footers' ),
),
'after_paragraph' => array(
'label' => esc_html__( 'Insert After Paragraph', 'insert-headers-and-footers' ),
'description' => esc_html__( 'Insert snippet after paragraph # of the post content.', 'insert-headers-and-footers' ),
),
);
}
/**
* Checks if we are on a singular page and we should be executing hooks.
*
* @return bool
*/
public function conditions() {
return is_singular();
}
/**
* Add hooks specific to single posts.
*
* @return void
*/
public function hooks() {
add_action( 'the_post', array( $this, 'insert_before_post' ) );
add_filter( 'render_block_core/template-part', array( $this, 'insert_before_post_fse' ), 15, 2 );
add_action( 'the_content', array( $this, 'insert_after_post' ) );
add_filter( 'the_content', array( $this, 'insert_before_content' ) );
add_filter( 'the_content', array( $this, 'insert_after_content' ) );
add_filter( 'the_content', array( $this, 'insert_after_before_paragraph' ) );
}
/**
* Insert snippet before the post.
*
* @param WP_Post $post_object The post object being loaded.
*
* @return void
*/
public function insert_before_post( $post_object ) {
if ( ! did_action( 'get_header' ) || get_the_ID() !== $post_object->ID || $this->did_before_post_output ) {
return;
}
$this->output_location( 'before_post' );
$this->did_before_post_output = true;
}
/**
* In FSE themes there's no "get_header" action to check for, so we hook after the core template-part header block.
*
* @param string $block_content The normal block HTML that would be sent to the screen.
* @param array $block An array of data about the block, and the way the user configured it.
*
* @return string
*/
public function insert_before_post_fse( $block_content, $block ) {
// If the get_header action ran we use the classic output method above.
if ( did_action( 'get_header' ) ) {
return $block_content;
}
if ( ! isset( $block['attrs']['slug'] ) || 'header' !== $block['attrs']['slug'] ) {
return $block_content;
}
$before_post = '';
$snippets = $this->get_snippets_for_location( 'before_post' );
foreach ( $snippets as $snippet ) {
$before_post .= wpcode()->execute->get_snippet_output( $snippet );
}
return $block_content . $before_post;
}
/**
* Insert snippet output after the content.
*
* @param string $content The content of the post.
*
* @return string
*/
public function insert_after_content( $content ) {
$snippets = $this->get_snippets_for_location( 'after_content' );
foreach ( $snippets as $snippet ) {
$content .= wpcode()->execute->get_snippet_output( $snippet );
}
return $content;
}
/**
* Insert snippet after the post
*
* @param string $content The post content.
*
* @return string
*/
public function insert_after_post( $content ) {
$snippets = $this->get_snippets_for_location( 'after_post' );
foreach ( $snippets as $snippet ) {
$content .= wpcode()->execute->get_snippet_output( $snippet );
}
return $content;
}
/**
* Insert snippets before the content.
*
* @param string $content The post content.
*
* @return string
*/
public function insert_before_content( $content ) {
$snippets = $this->get_snippets_for_location( 'before_content' );
$snippets_output = '';
foreach ( $snippets as $snippet ) {
$snippets_output .= wpcode()->execute->get_snippet_output( $snippet );
}
return $snippets_output . $content;
}
/**
* Insert content before or after paragraphs based on settings.
*
* @param string $content The post content.
*
* @return string
*/
public function insert_after_before_paragraph( $content ) {
$snippets = $this->get_snippets_for_location( 'before_paragraph' );
foreach ( $snippets as $snippet ) {
$auto_insert_number = $snippet->get_auto_insert_number();
$auto_insert_number = empty( $auto_insert_number ) ? 1 : absint( $auto_insert_number );
$snippet_output = wpcode()->execute->get_snippet_output( $snippet );
$content = $this->insert_between_paragraphs( $snippet_output, $auto_insert_number, $content, 'before' );
}
$snippets = $this->get_snippets_for_location( 'after_paragraph' );
foreach ( $snippets as $snippet ) {
$auto_insert_number = $snippet->get_auto_insert_number();
$auto_insert_number = empty( $auto_insert_number ) ? 1 : absint( $auto_insert_number );
$snippet_output = wpcode()->execute->get_snippet_output( $snippet );
$content = $this->insert_between_paragraphs( $snippet_output, $auto_insert_number, $content, 'after' );
}
return $content;
}
/**
* Insert snippet code before or after paragraphs in a post.
*
* @param string $content_to_insert The content to insert (snippet code output).
* @param int $p_number The paragraph number.
* @param string $content_to_add_to The content in which the content should be added.
* @param string $before_or_after Add it before or after the paragraph.
*
* @return string
*/
public function insert_between_paragraphs( $content_to_insert, $p_number, $content_to_add_to, $before_or_after = 'after' ) {
if ( 'before' === $before_or_after ) {
preg_match_all( '//', $content_to_add_to, $matches ); } else { preg_match_all( '/<\/p>/', $content_to_add_to, $matches ); } $paragraphs = $matches[0]; // We don't have enough paragraphs to add the snippet. if ( count( $paragraphs ) < $p_number ) { return $content_to_add_to; } $p_number = -- $p_number; $offset = 0; foreach ( $paragraphs as $p_index => $p ) { $position = strpos( $content_to_add_to, $p, $offset ); if ( $p_index === $p_number ) { if ( 'before' === $before_or_after ) { $content_to_add_to = substr( $content_to_add_to, 0, $position ) . $content_to_insert . substr( $content_to_add_to, $position ); } else { $content_to_add_to = substr( $content_to_add_to, 0, $position + 4 ) . $content_to_insert . substr( $content_to_add_to, $position + 4 ); } break; } else { $offset = $position + 1; } } return $content_to_add_to; } } new WPCode_Auto_Insert_Single(); includes/auto-insert/class-wpcode-auto-insert-everywhere.php 0000644 00000011272 15021200650 0020346 0 ustar 00 locations = array( 'everywhere' => array(), 'frontend_only' => array(), 'admin_only' => array(), 'frontend_cl' => array(), 'on_demand' => array(), ); } /** * Load the label. * * @return void */ public function load_label() { $this->label = __( 'PHP Snippets Only', 'insert-headers-and-footers' ); } /** * Load the available locations. * * @return void */ public function load_locations() { $this->locations = array( 'everywhere' => array( 'label' => esc_html__( 'Run Everywhere', 'insert-headers-and-footers' ), 'description' => esc_html__( 'Snippet gets executed everywhere on your website.', 'insert-headers-and-footers' ), ), 'frontend_only' => array( 'label' => esc_html__( 'Frontend Only', 'insert-headers-and-footers' ), 'description' => esc_html__( 'Snippet gets executed only in the frontend of the website.', 'insert-headers-and-footers' ), ), 'admin_only' => array( 'label' => esc_html__( 'Admin Only', 'insert-headers-and-footers' ), 'description' => esc_html__( 'The snippet only gets executed in the wp-admin area.', 'insert-headers-and-footers' ), ), 'frontend_cl' => array( 'label' => esc_html__( 'Frontend Conditional Logic', 'insert-headers-and-footers' ), 'description' => esc_html__( 'Ideal for running the snippet later with conditional logic rules in the frontend.', 'insert-headers-and-footers' ), ), 'on_demand' => array( 'label' => esc_html__( 'On Demand', 'insert-headers-and-footers' ), 'description' => esc_html__( 'Execute this snippet on demand or programmatically just when you need it.', 'insert-headers-and-footers' ), ), ); } /** * Execute snippets. * * @return void */ public function run_snippets() { $snippets = $this->get_snippets_for_location( 'everywhere' ); $line_reference = array(); $code = array(); $last_line = 0; $last_snippet = null; if ( is_admin() ) { $snippets = array_merge( $snippets, $this->get_snippets_for_location( 'admin_only' ) ); } // Merge all the code into 1, so we can track on which line the error occurs, if any. foreach ( $snippets as $snippet ) { // Use the WPCode_Snippet_Execute_Type filters here for compatibility with class even thought we're skipping it for these particular locations. $snippet_code = apply_filters( 'wpcode_snippet_output_php', $snippet->get_code(), $snippet ); $snippet_code = apply_filters( 'wpcode_snippet_output', $snippet_code, $snippet ); // Let's see how many lines the code has. $lines = substr_count( $snippet_code, PHP_EOL ); // Let's keep a record of the start and end line of each snippet. $last_line ++; $line_reference[ $snippet->get_id() ] = array( 'start' => $last_line, 'end' => $last_line + $lines, ); $last_line = $last_line + $lines; $code[] = $snippet_code; $last_snippet = $snippet; } if ( ! empty( $code ) ) { // Implode all the code and execute it. $code = implode( PHP_EOL, $code ); // Execute the code. wpcode()->execute->safe_execute_php( $code, $last_snippet, $line_reference ); } if ( ! is_admin() ) { $snippets = $this->get_snippets_for_location( 'frontend_only' ); foreach ( $snippets as $snippet ) { wpcode()->execute->get_snippet_output( $snippet ); } } } /** * Execute snippets on the init hook to allow using more Conditional Logic options. * * @return void */ public function run_init_snippets() { $snippets = $this->get_snippets_for_location( 'frontend_cl' ); foreach ( $snippets as $snippet ) { wpcode()->execute->get_snippet_output( $snippet ); } } /** * Override the default hook and short-circuit any other conditions * checks as these snippets will run everywhere. * * @return void */ protected function add_start_hook() { add_action( 'plugins_loaded', array( $this, 'run_snippets' ), 5 ); add_action( 'wp', array( $this, 'run_init_snippets' ) ); } } new WPCode_Auto_Insert_Everywhere(); includes/auto-insert/class-wpcode-auto-insert-archive.php 0000644 00000012004 15021200650 0017574 0 ustar 00 locations = array( 'before_excerpt' => array(), 'after_excerpt' => array(), 'between_posts' => array(), 'archive_before_post' => array(), 'archive_after_post' => array(), ); } /** * Load the label. * * @return void */ public function load_label() { $this->label = __( 'Categories, Archives, Tags, Taxonomies', 'insert-headers-and-footers' ); } /** * Load the available locations. * * @return void */ public function load_locations() { $this->locations = array( 'before_excerpt' => array( 'label' => __( 'Insert Before Excerpt', 'insert-headers-and-footers' ), 'description' => __( 'Insert snippet above post summary.', 'insert-headers-and-footers' ), ), 'after_excerpt' => array( 'label' => __( 'Insert After Excerpt', 'insert-headers-and-footers' ), 'description' => __( 'Insert snippet below post summary.', 'insert-headers-and-footers' ), ), 'between_posts' => array( 'label' => __( 'Between Posts', 'insert-headers-and-footers' ), 'description' => __( 'Insert snippet between multiple posts.', 'insert-headers-and-footers' ), ), 'archive_before_post' => array( 'label' => __( 'Before Post', 'insert-headers-and-footers' ), 'description' => __( 'Insert snippet at the beginning of a post.', 'insert-headers-and-footers' ), ), 'archive_after_post' => array( 'label' => __( 'After Post', 'insert-headers-and-footers' ), 'description' => __( 'Insert snippet at the end of a post.', 'insert-headers-and-footers' ), ), ); } /** * Checks if we are on an archive page and we should be executing hooks. * * @return bool */ public function conditions() { return is_archive() || is_home(); } /** * Add hooks specific to single posts. * * @return void */ public function hooks() { add_filter( 'the_excerpt', array( $this, 'insert_before_excerpt' ) ); add_filter( 'the_excerpt', array( $this, 'insert_after_excerpt' ) ); add_action( 'the_post', array( $this, 'insert_between_posts' ), 10, 2 ); add_action( 'the_post', array( $this, 'insert_before_after_post' ), 10, 2 ); } /** * Output snippet before excerpt on archive pages. * * @param string $excerpt The excerpt text. * * @return string */ public function insert_before_excerpt( $excerpt ) { $snippets = $this->get_snippets_for_location( 'before_excerpt' ); foreach ( $snippets as $snippet ) { $excerpt = wpcode()->execute->get_snippet_output( $snippet ) . $excerpt; } return $excerpt; } /** * Output snippet after excerpt on archive pages. * * @param string $excerpt The excerpt text. * * @return string */ public function insert_after_excerpt( $excerpt ) { $snippets = $this->get_snippets_for_location( 'after_excerpt' ); foreach ( $snippets as $snippet ) { $excerpt .= wpcode()->execute->get_snippet_output( $snippet ); } return $excerpt; } /** * Output snippets between posts in a list of posts. * * @param WP_Post $post_data The post. * @param WP_Query $query The query. * * @return void */ public function insert_between_posts( $post_data, $query ) { // If the query has at least two posts to display snippets between. if ( $query->post_count < 2 ) { return; } // If the current post is not the first one in the list. if ( $query->current_post < 1 ) { return; } // If the current post is not the last one in the list. if ( $query->post_count <= $query->current_post ) { return; } $this->output_location( 'between_posts' ); } /** * Output snippets before or after posts. * * @param WP_Post $post_data The post. * @param WP_Query $query The query. * * @return void */ public function insert_before_after_post( $post_data, $query ) { $snippets = $this->get_snippets_for_location( 'archive_before_post' ); foreach ( $snippets as $snippet ) { $insert_number = $snippet->get_auto_insert_number(); if ( $query->current_post === $insert_number - 1 ) { echo wpcode()->execute->get_snippet_output( $snippet ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } $snippets = $this->get_snippets_for_location( 'archive_after_post' ); foreach ( $snippets as $snippet ) { $insert_number = $snippet->get_auto_insert_number(); if ( $query->current_post === $insert_number ) { echo wpcode()->execute->get_snippet_output( $snippet ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } } new WPCode_Auto_Insert_Archive(); includes/auto-insert/class-wpcode-auto-insert-type.php 0000644 00000022244 15021200650 0017143 0 ustar 00 label where the keys should be unique for all the options across * all child classes as those will be used as taxonomy terms to store the * relationship between snippets and their location. * * @var array */ public $locations; /** * Terms of the locations for this type. * * @var array */ public $locations_terms; /** * All the snippets for this location. * * @var array */ public $snippets; /** * For which code type this insert is available. * By default, all. * * @var string */ public $code_type = 'all'; /** * If we should skip the cache set this to false. * * @var bool */ protected $use_cache = true; /** * Display a label next to the optgroup title. * * @var string */ public $label_pill = ''; /** * Title of the upgrade prompt. * * @var string */ public $upgrade_title = ''; /** * Text of the upgrade prompt. * * @var string */ public $upgrade_text = ''; /** * URL of the upgrade prompt (CTA) with UTM. * * @var string */ public $upgrade_link = ''; /** * Text for the CTA Button. * * @var string */ public $upgrade_button = ''; /** * Category used for displaying this type in the admin. * * @var string */ public $category = ''; /** * Start the auto insertion. */ public function __construct() { $this->init(); $this->register_type(); /** * Constant to enable safe mode. * Filter to allow disabling auto insert. */ if ( defined( 'WPCODE_SAFE_MODE' ) && WPCODE_SAFE_MODE ) { return; } if ( ! apply_filters( 'wpcode_do_auto_insert', true ) ) { return; } // If we're in headers & footers mode prevent execution of any type of snippet. if ( WPCode()->settings->get_option( 'headers_footers_mode' ) ) { return; } add_action( 'admin_init', array( $this, 'load_upgrade_strings' ), 140 ); $this->add_start_hook(); } /** * Register this instance to the global auto-insert types. * * @return void */ private function register_type() { wpcode()->auto_insert->register_type( $this ); } /** * Init function that is specific to each auto-insert type. * * @return void */ abstract public function init(); /** * Give child classes a chance to load on a different hook. * * @return void */ protected function add_start_hook() { add_action( 'wp', array( $this, 'maybe_run_hooks' ) ); } /** * Check if conditions are met before calling the hooks. * * @return void */ public function maybe_run_hooks() { if ( ! $this->conditions() ) { return; } // Go through relevant hooks and output based on settings. $this->hooks(); } /** * Conditions that have to be met for the class to do its thing. * For example, in the single post class we'll check if is_single * and only then will we change the_content. * * @return bool */ public function conditions() { // Most types only run on the frontend. return ! is_admin(); } /** * Hooks specific to this type of auto-insertion. * * @return void */ public function hooks() { } /** * Get an array of options for the admin. * Check if the insert type is compatible with the code type. * * @return array */ public function get_locations() { $this->load_locations(); return isset( $this->locations ) ? $this->locations : array(); } /** * Load the locations for this type. * * @return void */ abstract public function load_locations(); /** * Load the label for this type. * * @return void */ abstract public function load_label(); /** * Query snippets by location. * * @param string $location The location slug. * * @return WPCode_Snippet[] */ public function get_snippets_for_location( $location ) { $snippets = $this->get_snippets(); $snippets_for_location = isset( $snippets[ $location ] ) ? $snippets[ $location ] : array(); return apply_filters( 'wpcode_get_snippets_for_location', wpcode()->conditional_logic->check_snippets_conditions( $snippets_for_location ), $location ); } /** * Get the snippets for this type and query on demand. * * @return array */ public function get_snippets() { if ( ! isset( $this->snippets ) ) { $this->load_all_snippets_for_type(); } return $this->snippets; } /** * Load all the snippets for this type and group them by location. * This can be further improved by separating the snippet loading and loading * all the relevant snippets for a screen at once (regardless of type) or just loading all the * active snippets in 1 query. * * @return void */ public function load_all_snippets_for_type() { if ( $this->use_cache() ) { $this->snippets = $this->get_snippets_from_cache(); return; } $this->snippets = array(); $args = array( 'post_type' => wpcode_get_post_type(), 'posts_per_page' => - 1, 'post_status' => 'publish', 'cache_results' => false, // We don't want to cache this query ever as it should only run when snippets are preloaded in case of an error it will provide false values if cached. ); $snippets_query = new WP_Query( $args ); $snippets = $snippets_query->posts; foreach ( $snippets as $snippet ) { $snippet_locations = wp_get_post_terms( $snippet->ID, 'wpcode_location', array( 'fields' => 'slugs' ) ); if ( empty( $snippet_locations ) || is_wp_error( $snippet_locations ) ) { continue; } $location_key = $snippet_locations[0]; $this->snippets[ $location_key ][] = wpcode_get_snippet( $snippet ); } } /** * Get snippets from cache split by relevant locations for this type. * * @return array */ public function get_snippets_from_cache() { $cached_snippets = wpcode()->cache->get_cached_snippets(); $type_snippets = array(); foreach ( $this->locations as $location => $label ) { if ( array_key_exists( $location, $cached_snippets ) ) { $type_snippets[ $location ] = $cached_snippets[ $location ]; } else { $type_snippets[ $location ] = array(); } } return $type_snippets; } /** * Get the ids of the loaded location terms. * * @return int[] */ public function get_locations_ids() { $terms = $this->get_location_terms(); $ids = array(); foreach ( $terms as $term ) { $ids[] = $term->term_id; } return $ids; } /** * Get the location terms. * * @return WP_Term[] */ public function get_location_terms() { if ( ! isset( $this->locations_terms ) ) { $this->load_locations_terms(); } return $this->locations_terms; } /** * Query the location terms using get_terms and store them in the instance. * * @return void */ public function load_locations_terms() { $terms = get_terms( array( 'taxonomy' => 'wpcode_location', 'slug' => array_keys( $this->locations ), ) ); $this->locations_terms = array(); if ( is_wp_error( $terms ) ) { // If the terms don't exist, bail early. return; } foreach ( $terms as $term ) { $this->locations_terms[ $term->slug ] = $term; } } /** * Change the clauses for our specific query to include the term id in the resulting * WP_Post object so that we can group the results by the type locations. * * @param array $clauses Array of clauses for the SQL query. * * @return mixed */ public function include_term_in_post( $clauses ) { global $wpdb; $clauses['fields'] .= ", {$wpdb->term_relationships}.term_taxonomy_id"; $clauses['groupby'] = ''; return $clauses; } /** * Return the type label. * * @return string */ public function get_label() { if ( ! isset( $this->label ) ) { $this->load_label(); } return $this->label; } /** * Grab the use cache value allowing filtering. * * @return bool */ public function use_cache() { return boolval( apply_filters( 'wpcode_use_auto_insert_cache', $this->use_cache ) ); } /** * Get the snippets for a location and echo them executed. * * @param string $location_name The location to grab snippets for. * * @return void */ public function output_location( $location_name ) { $snippets = $this->get_snippets_for_location( $location_name ); foreach ( $snippets as $snippet ) { echo wpcode()->execute->get_snippet_output( $snippet ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Get the snippets for a location and return them executed. * * @param string $location_name The location to grab snippets for. * * @return string */ public function get_location( $location_name ) { $content = ''; $snippets = $this->get_snippets_for_location( $location_name ); foreach ( $snippets as $snippet ) { $content .= wpcode()->execute->get_snippet_output( $snippet ); } return $content; } /** * Load the strings for the upgrade prompt, if any. * * @return void */ public function load_upgrade_strings() { } } includes/class-wpcode-library.php 0000644 00000044474 15021200650 0013115 0 ustar 00 hooks(); } /** * Class-specific hooks. * * @return void */ protected function hooks() { add_action( 'trash_wpcode', array( $this, 'clear_used_snippets' ) ); add_action( 'transition_post_status', array( $this, 'clear_used_snippets_untrash' ), 10, 3 ); add_action( 'wpcode_library_api_auth_connected', array( $this, 'delete_cache' ) ); add_action( 'wpcode_library_api_auth_connected', array( $this, 'get_data_delayed' ), 15 ); add_action( 'wpcode_library_api_auth_deleted', array( $this, 'delete_cache' ) ); } /** * Wait for the file cache to be cleared before loading the data. * * @return void */ public function get_data_delayed() { // Wait for the cache to be cleared. add_action( 'shutdown', array( $this, 'get_data' ) ); } /** * Grab all the available categories from the library. * * @return array */ public function get_data() { if ( ! isset( $this->data ) ) { $this->data = $this->load_data(); } return $this->data; } /** * Get the number of snippets in the library. * * @return int */ public function get_snippets_count() { if ( ! isset( $this->snippets_count ) ) { $this->snippets_count = 0; $data = $this->get_data(); if ( ! empty( $data['snippets'] ) ) { $this->snippets_count = count( $data['snippets'] ); } } return $this->snippets_count; } /** * Grab data from the cache. * * @param string $key The key used to grab from cache. * @param int $ttl The time to live for cached data, defaults to class ttl. * * @return array|false */ public function get_from_cache( $key, $ttl = 0 ) { if ( empty( $ttl ) ) { $ttl = $this->ttl; } $data = wpcode()->file_cache->get( $this->cache_folder . '/' . $key, $ttl ); if ( isset( $data['error'] ) && isset( $data['time'] ) ) { if ( $data['time'] + 10 * MINUTE_IN_SECONDS < time() ) { return false; } else { return $this->get_empty_array(); } } return $data; } /** * Load the library data either from the server or from cache. * * @return array */ public function load_data() { $this->data = $this->get_from_cache( $this->cache_key ); if ( false === $this->data ) { $this->data = $this->get_from_server(); } $this->maybe_add_usernames_data(); return $this->data; } /** * Get data from the server. * * @return array */ protected function get_from_server() { $data = $this->process_response( $this->make_request( $this->all_snippets_endpoint ) ); if ( empty( $data['snippets'] ) ) { return $this->save_temporary_response_fail( $this->cache_key ); } $this->save_to_cache( $this->cache_key, $data ); return $data; } /** * Generic request handler with support for authentication. * * @param string $endpoint The API endpoint to load data from. * @param string $method The method used for the request (GET, POST, etc). * @param array $data The data to pass in the body for POST-like requests. * * @return string */ public function make_request( $endpoint = '', $method = 'GET', $data = array() ) { $args = array( 'method' => $method, 'timeout' => 10, ); if ( wpcode()->library_auth->has_auth() ) { $args['headers'] = $this->get_authenticated_headers(); } if ( ! empty( $data ) ) { $args['body'] = $data; } $url = add_query_arg( array( 'site' => rawurlencode( site_url() ), 'version' => WPCODE_VERSION, ), wpcode()->library_auth->get_api_url( $endpoint ) ); $response = wp_remote_request( $url, $args ); $response_code = wp_remote_retrieve_response_code( $response ); if ( $response_code > 299 ) { // Temporary error so cache for just 10 minutes and then try again. return ''; } return wp_remote_retrieve_body( $response ); } /** * Get the headers for making an authenticated request. * * @return array */ public function get_authenticated_headers() { // Build the headers of the request. return array( 'Content-Type' => 'application/x-www-form-urlencoded', 'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0', 'Pragma' => 'no-cache', 'Expires' => 0, 'Origin' => site_url(), 'WPCode-Referer' => site_url(), 'WPCode-Sender' => 'WordPress', 'WPCode-Site' => esc_attr( get_option( 'blogname' ) ), 'WPCode-Version' => esc_attr( WPCODE_VERSION ), 'WPCode-Client-Id' => wpcode()->library_auth->get_client_id(), 'X-WPCode-ApiKey' => wpcode()->library_auth->get_auth_key(), ); } /** * When we can't fetch from the server we save a temporary error => true file to avoid * subsequent requests for a while. Returns a properly formatted array for frontend output. * * @param string $key The key used for storing the data in the cache. * * @return array */ public function save_temporary_response_fail( $key ) { $data = array( 'error' => true, 'time' => time(), ); $this->save_to_cache( $key, $data ); return $this->get_empty_array(); } /** * Get an empty array for a consistent response. * * @return array[] */ public function get_empty_array() { return array( 'categories' => array(), 'snippets' => array(), ); } /** * Save to cache. * * @param string $key The key used to store the data in the cache. * @param array|mixed $data The data that will be stored. * * @return void */ public function save_to_cache( $key, $data ) { wpcode()->file_cache->set( $this->cache_folder . '/' . $key, $data ); } /** * Generic handler for grabbing data by slug. Either all categories or the category slug. * * @param string $data Response body from server. * * @return array */ public function process_response( $data ) { $response = json_decode( $data, true ); if ( ! isset( $response['status'] ) || 'success' !== $response['status'] ) { return $this->get_empty_array(); } return $response['data']; } /** * Get a cache key for a specific snippet id. * * @param int $id The snippet id. * * @return string */ public function get_snippet_cache_key( $id ) { return $this->snippet_key . '_' . $id; } /** * Create a new snippet by the library id. * This grabs the snippet by its id from the snippet library site and creates * a new snippet on the current site using the response. * * @param int $library_id The id of the snippet on the library site. * * @return false|WPCode_Snippet */ public function create_new_snippet( $library_id ) { $snippet_data = $this->grab_snippet_from_api( $library_id ); if ( ! $snippet_data ) { return false; } $snippet_data = apply_filters( 'wpcode_library_import_snippet_data', $snippet_data ); $snippet = wpcode_get_snippet( $snippet_data ); $snippet->save(); delete_transient( $this->used_snippets_transient_key ); return $snippet; } /** * Grab a snippet data from the API. * * @param int $library_id The id of the snippet in the Library api. * * @return array|array[]|false */ public function grab_snippet_from_api( $library_id ) { $snippet_request = $this->make_request( 'get/' . $library_id ); $snippet_data = $this->process_response( $snippet_request ); if ( empty( $snippet_data ) ) { return false; } return $snippet_data; } /** * Get all the snippets that were created from the library, by library ID. * Results are cached in a transient. * * @return array */ public function get_used_library_snippets() { if ( isset( $this->library_snippets ) ) { return $this->library_snippets; } $snippets_from_library = get_transient( $this->used_snippets_transient_key ); if ( false === $snippets_from_library ) { $snippets_from_library = array(); $args = array( 'post_type' => wpcode_get_post_type(), 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query array( 'key' => $this->snippet_library_id_meta_key, 'compare' => 'EXISTS', ), ), 'fields' => 'ids', 'post_status' => 'any', 'nopaging' => true, ); $snippets = get_posts( $args ); foreach ( $snippets as $snippet_id ) { $snippets_from_library[ $this->get_snippet_library_id( $snippet_id ) ] = $snippet_id; } set_transient( $this->used_snippets_transient_key, $snippets_from_library ); } $this->library_snippets = $snippets_from_library; return $this->library_snippets; } /** * Grab the library id from the snippet by snippet id. * * @param int $snippet_id The snippet id. * * @return int */ public function get_snippet_library_id( $snippet_id ) { return absint( get_post_meta( $snippet_id, '_wpcode_library_id', true ) ); } /** * When a snippet is trashed, clear the used snippets transients * for this class instance to avoid confusion in the library. * * @return void */ public function clear_used_snippets() { delete_transient( $this->used_snippets_transient_key ); } /** * Clear used snippets also when a snippet is un-trashed. * * @param string $new_status The new post status. * @param string $old_status The old post status. * @param WP_Post $post The post object. * * @return void */ public function clear_used_snippets_untrash( $new_status, $old_status, $post ) { if ( 'wpcode' !== $post->post_type || 'trash' !== $old_status ) { return; } $this->clear_used_snippets(); } /** * Delete the file cache for the snippets library. * * @return void */ public function delete_cache() { wpcode()->file_cache->delete( $this->cache_folder . '/' . $this->cache_key ); if ( isset( $this->data ) ) { unset( $this->data ); } } /** * Makes a request to the snippet library API to grab a public snippet by its hash. * * @param string $hash The hash used to identify the snippet on the library server. * @param string $auth The unique user hash used to authenticate the request on the library. * * @return array */ public function get_public_snippet( $hash, $auth ) { // Let's use transients for hashes to avoid unnecessary requests. $transient_key = 'wpcode_public_snippet_' . $hash . '_' . $auth; $snippet_data = get_transient( $transient_key ); if ( false === $snippet_data ) { $snippet_request = $this->make_request( 'public/' . $hash, 'POST', array( 'auth' => $auth, ) ); $snippet_data = json_decode( $snippet_request, true ); // Transient for 1 minute if error otherwise 30 minutes. $timeout = ! isset( $snippet_data['status'] ) || 'error' === $snippet_data['status'] ? 60 : 30 * 60; set_transient( $transient_key, $snippet_data, $timeout ); } return $snippet_data; } /** * Get snippets by username. * * @param string $username The username to grab data for. * @param string $version The version of the library to grab data for. * * @return array */ public function get_snippets_by_username( $username, $version = '' ) { $username = sanitize_key( $username ); if ( empty( $version ) ) { // Let's grab the version from the registered username if no version is explicitly passed. $version = $this->get_version_by_username( $username ); } if ( ! isset( $this->snippets_by_username[ $username ] ) ) { $this->load_snippets_by_username( $username, $version ); } return $this->snippets_by_username[ $username ]; } /** * Grab the version from the registered username array. * * @param string $username The username to grab version for. * * @return string */ public function get_version_by_username( $username ) { return isset( $this->library_usernames[ $username ] ) ? $this->library_usernames[ $username ]['version'] : ''; } /** * Load snippets in the current instance, either from cache or from the server. * * @param string $username The username to grab data for. * @param string $version The version of the plugin/theme to grab data for. * * @return array */ private function load_snippets_by_username( $username, $version ) { $this->snippets_by_username[ $username ] = $this->get_from_cache( 'profile_' . $username ); if ( false === $this->snippets_by_username[ $username ] ) { $this->snippets_by_username[ $username ] = $this->get_from_server_by_username( $username ); } // Let's filter the loaded data to make sure no snippets aimed at older versions are loaded. $this->snippets_by_username[ $username ] = $this->filter_snippets_by_version( $this->snippets_by_username[ $username ], $version ); return $this->data; } /** * Go through all the snippets and if they have a maximum version set, remove them if the current version is higher. * * @param array $profile_data The snippets to filter. * @param string $version The version to filter by. * * @return array */ public function filter_snippets_by_version( $profile_data, $version ) { // If we have no version, we can't filter anything. if ( empty( $version ) || empty( $profile_data['snippets'] ) ) { return $profile_data; } $filtered_snippets = array(); foreach ( $profile_data['snippets'] as $snippet ) { if ( empty( $snippet['max_version'] ) || version_compare( $version, $snippet['max_version'], '<=' ) ) { $filtered_snippets[] = $snippet; } } $profile_data['snippets'] = $filtered_snippets; return $profile_data; } /** * Grab data from the WPCode library by username. * * @param string $username The username to grab data for. * * @return array|array[] */ private function get_from_server_by_username( $username ) { $data = $this->process_response( $this->make_request( 'profile/' . $username ) ); if ( empty( $data['snippets'] ) ) { return $this->save_temporary_response_fail( 'profile_' . $username ); } $this->save_to_cache( 'profile_' . $username, $data ); return $data; } /** * Get a list of usernames that we should attempt to load data from the library for. * * @return array */ public function get_library_usernames() { return $this->library_usernames; } /** * Add a method to allow other plugins to register usernames to load data for. * * @param string $username The public username on the WPCode Library. * @param string $label The label to display in the WPCode library view. * @param string $max_version The plugin/theme version, used for excluding snippets aimed at older plugin/theme versions. * * @return void */ public function register_library_username( $username, $label = '', $max_version = '' ) { $username = sanitize_key( $username ); if ( empty( $label ) ) { $label = $username; } $this->library_usernames[ $username ] = array( 'label' => $label, 'version' => $max_version, ); } /** * If there are usernames to load data for, add them to the data array. * * @return void */ public function maybe_add_usernames_data() { $usernames = $this->get_library_usernames(); if ( empty( $usernames ) ) { return; } foreach ( $usernames as $username => $data ) { $snippets = $this->get_snippets_by_username( $username, $data['version'] ); if ( ! empty( $snippets['snippets'] ) ) { $this->data['categories'][] = array( 'slug' => $username, 'name' => $data['label'], 'count' => count( $snippets['snippets'] ), ); // Append snippets to the $this->data['snippets'] array. $this->data['snippets'] = array_merge( $this->data['snippets'], $snippets['snippets'] ); } } } /** * Get the URL to edit a snippet. * * @param int $snippet_id The snippet id. * * @return string */ public function get_edit_snippet_url( $snippet_id ) { return add_query_arg( array( 'page' => 'wpcode-snippet-manager', 'snippet_id' => absint( $snippet_id ), ), admin_url( 'admin.php' ) ); } /** * Get a direct link to install a snippet by its library URL. * * @param int $snippet_library_id The snippet ID on the WPCode library. * * @return string */ public function get_install_snippet_url( $snippet_library_id ) { return wp_nonce_url( add_query_arg( array( 'snippet_library_id' => absint( $snippet_library_id ), 'page' => 'wpcode-library', ), admin_url( 'admin.php' ) ), 'wpcode_add_from_library' ); } /** * Get just the snippets from usernames. * * @return array */ public function get_username_snippets() { $usernames = $this->get_library_usernames(); $snippets = array(); $categories = array(); foreach ( $usernames as $username => $data ) { $username_snippets = $this->get_snippets_by_username( $username, $data['version'] ); if ( ! empty( $username_snippets['snippets'] ) ) { $categories[] = array( 'slug' => $username, 'name' => $data['label'], 'count' => count( $username_snippets['snippets'] ), ); // Append snippets to the $this->data['snippets'] array. $snippets = array_merge( $snippets, $username_snippets['snippets'] ); } } return array( 'categories' => $categories, 'snippets' => $snippets, ); } } includes/class-wpcode-conditional-logic.php 0000644 00000012356 15021200650 0015041 0 ustar 00 types[ $type->name ] = $type; } /** * Get all the admin options for the conditional logic form. * * @param bool $for_js Whether to return the options for JS or not. * * @return array */ public function get_all_admin_options( $for_js = false ) { $options = array(); foreach ( $this->types as $type ) { $type->load_type_options(); // Reload the options in case a global snippet made them get loaded before some post types were registered, for example. $options[ $type->get_name() ] = array( 'label' => $type->get_label(), 'name' => $type->get_name(), 'category' => $type->get_category(), 'options' => $type->get_type_options(), ); } // Sort options so the unavailable ones are at the end. $available_options = array(); $unavailable_options = array(); foreach ( $options as $key => $option ) { if ( empty( $option['options'] ) ) { continue; } $first_option = reset( $option['options'] ); if ( ! empty( $first_option['upgrade'] ) ) { $unavailable_options[ $key ] = $option; } else { $available_options[ $key ] = $option; } } // For the user logged_in option let's run esc_attr on the option values to save the values correctly. if ( $for_js && isset( $available_options['user']['options']['logged_in']['options'] ) ) { foreach ( $available_options['user']['options']['logged_in']['options'] as $key => $option ) { $available_options['user']['options']['logged_in']['options'][ $key ]['value'] = esc_attr( $option['value'] ); } } return apply_filters( 'wpcode_conditional_logic_admin_options', array_merge( $available_options, $unavailable_options ) ); } /** * Goes through a list of snippets and filters out the ones * that don't match the conditional logic rules. * * @param WPCode_Snippet[] $snippets An array of snippets. * * @return WPCode_Snippet[] */ public function check_snippets_conditions( $snippets ) { // If there's nothing to evaluate just return an empty array. if ( empty( $snippets ) ) { return array(); } $filtered_snippets = array(); foreach ( $snippets as $snippet ) { if ( ! $snippet->conditional_rules_enabled() ) { // If rules are disabled, ignore. $filtered_snippets[] = $snippet; continue; } $rules = $snippet->get_conditional_rules(); if ( ! isset( $rules['show'] ) ) { continue; } $show = 'show' === $rules['show']; $rules_are_met = $this->are_snippet_rules_met( $snippet ); if ( $show && ! $rules_are_met ) { // If we should show based on conditions, and conditions // are not met, skip. continue; } if ( ! $show && $rules_are_met ) { // If we should hide based on conditions, and conditions // are met, skip. continue; } $filtered_snippets[] = $snippet; } return $filtered_snippets; } /** * Takes a snippet and evaluates if conditional logic rules * are met. * * @param WPCode_Snippet $snippet The snippet instance. * * @return bool */ public function are_snippet_rules_met( $snippet ) { $rules = $snippet->get_conditional_rules(); if ( empty( $rules ) || ! is_array( $rules ) || empty( $rules['groups'] ) ) { return true; } // Go through all rule groups. foreach ( $rules['groups'] as $rule_group ) { // If any of the groups are met return true. if ( $this->are_group_rules_met( $rule_group, $snippet ) ) { return true; } } // If no group rules satisfy the conditions, return false. return false; } /** * Evaluate all the rows of rules in a group. * * @param array $rule_group An array of rows. * @param WPCode_Snippet $snippet The snippet we are evaluating the rules for. * * @return bool */ public function are_group_rules_met( $rule_group, $snippet ) { foreach ( $rule_group as $rule_row ) { if ( ! isset( $rule_row['type'] ) || ! isset( $this->types[ $rule_row['type'] ] ) ) { continue; } $rule_type = $this->types[ $rule_row['type'] ]; if ( ! $rule_type->evaluate_rule_row( $rule_row, $snippet ) ) { // If this row doesn't match, the whole group fails. return false; } } // If none of the rows failed the group matches. return true; } } includes/class-wpcode-snippet.php 0000644 00000067570 15021200650 0013135 0 ustar 00 load_from_id( $snippet ); } elseif ( $snippet instanceof WP_Post ) { $this->post_data = $snippet; } elseif ( is_array( $snippet ) ) { $this->load_from_array( $snippet ); } if ( isset( $this->post_data ) && $this->post_type !== $this->post_data->post_type ) { unset( $this->post_data ); unset( $this->id ); } } /** * Load a snippet by its ID. * * @param int $snippet_id The snippet id. * * @return void */ public function load_from_id( $snippet_id ) { $this->post_data = get_post( $snippet_id ); if ( $this->post_data ) { $this->id = $this->post_data->ID; } } /** * Load snippet from array - useful for creating a new snippet. * * @param array $snippet_data The array of data to load. * * @return void */ public function load_from_array( $snippet_data ) { $available_options = get_object_vars( $this ); foreach ( $available_options as $key => $value ) { if ( isset( $snippet_data[ $key ] ) ) { $this->$key = $snippet_data[ $key ]; } } } /** * Get the snippet location. * * @return string */ public function get_location() { if ( ! isset( $this->location ) ) { $this->set_location(); } return $this->location; } /** * Grab and set the location term and location string. * * @return void */ public function set_location() { // If something below fails, let's not try again. $this->location = ''; $this->location_term = $this->get_single_term( $this->location_taxonomy ); if ( $this->location_term ) { $this->location = $this->location_term->slug; } } /** * Get a single term for this snippet based on the taxonomy. * * @param string $taxonomy The taxonomy to grab data for. * * @return false|WP_Term */ public function get_single_term( $taxonomy ) { if ( ! isset( $this->post_data ) ) { return false; } $taxonomy_terms = wp_get_post_terms( $this->post_data->ID, $taxonomy ); if ( ! empty( $taxonomy_terms ) && ! is_wp_error( $taxonomy_terms ) ) { return $taxonomy_terms[0]; } return false; } /** * Get the author from the post object. * * @return int */ public function get_snippet_author() { if ( isset( $this->post_data ) ) { return $this->post_data->post_author; } return 0; } /** * Get the post data object. * * @return WP_Post */ public function get_post_data() { return isset( $this->post_data ) ? $this->post_data : null; } /** * Get the snippet title. * * @return string */ public function get_title() { if ( ! isset( $this->title ) ) { $this->title = isset( $this->post_data ) ? $this->post_data->post_title : ''; } return $this->title; } /** * Get the snippet code. * * @return string */ public function get_code() { if ( ! isset( $this->code ) ) { $this->code = isset( $this->post_data ) ? $this->post_data->post_content : ''; } return $this->code; } /** * Get location term. * * @return WP_Term */ public function get_location_term() { if ( ! isset( $this->location_term ) ) { $this->set_location(); } return $this->location_term; } /** * Get the code type term. * * @return WP_Term */ public function get_code_type_term() { if ( ! isset( $this->code_type_term ) ) { $this->set_code_type(); } return $this->code_type_term; } /** * Is the snippet active? * * @return boolean */ public function is_active() { if ( ! isset( $this->active ) ) { $this->active = isset( $this->post_data->post_status ) && 'publish' === $this->post_data->post_status; } return $this->active; } /** * Shorthand for activating. * * @return void */ public function activate() { $this->active = true; $this->get_id(); $this->save(); } /** * Get the snippet id. * * @return int */ public function get_id() { if ( ! isset( $this->id ) ) { $this->id = isset( $this->post_data ) ? $this->post_data->ID : 0; } return $this->id; } /** * Store current object in the db. * * @return int|false */ public function save() { // Allow to prevent saving the snippet. $pre_save = apply_filters( 'wpcode_pre_save_snippet', false, $this ); if ( false !== $pre_save ) { return $pre_save; } $post_args = array( 'post_type' => $this->post_type, ); if ( isset( $this->id ) && 0 !== $this->id ) { $post_args['ID'] = $this->id; $this->load_from_id( $this->id ); } if ( isset( $this->title ) ) { $post_args['post_title'] = $this->title; } if ( isset( $this->code ) ) { $post_args['post_content'] = $this->code; } // If the user is not allowed to activate/deactivate snippets, prevent it and show error. if ( ! current_user_can( 'wpcode_activate_snippets', $this ) ) { wpcode()->error->add_error( array( 'message' => __( 'You are not allowed to change snippet status, please contact your webmaster.', 'insert-headers-and-footers' ), 'type' => 'permissions', ) ); unset( $this->active ); } if ( isset( $this->active ) ) { // If we're going to activate a snippet let's check if errors will be thrown. $this->run_activation_checks(); $post_args['post_status'] = $this->active ? 'publish' : 'draft'; } do_action( 'wpcode_before_snippet_save', $this ); if ( isset( $post_args['ID'] ) ) { $insert_result = wp_update_post( $post_args ); } else { if ( empty( $post_args['post_title'] ) ) { $post_args['post_title'] = $this->get_untitled_title(); } $insert_result = wp_insert_post( $post_args ); } if ( 0 === $insert_result || is_wp_error( $insert_result ) ) { return false; } $this->id = $insert_result; // Reset the last error. $this->reset_last_error(); if ( isset( $this->code_type ) ) { wp_set_post_terms( $this->id, $this->code_type, $this->code_type_taxonomy ); } if ( isset( $this->auto_insert ) ) { // Save this value for reference, but we never query by it. update_post_meta( $this->id, '_wpcode_auto_insert', $this->auto_insert ); } if ( isset( $this->location ) && 1 === $this->auto_insert ) { wp_set_post_terms( $this->id, $this->location, $this->location_taxonomy ); } elseif ( isset( $this->auto_insert ) ) { // If auto insert is disabled we just empty the taxonomy. wp_set_post_terms( $this->id, array(), $this->location_taxonomy ); } if ( isset( $this->tags ) ) { wp_set_post_terms( $this->id, $this->tags, $this->tags_taxonomy ); } if ( isset( $this->insert_number ) ) { update_post_meta( $this->id, '_wpcode_auto_insert_number', $this->insert_number ); } if ( isset( $this->use_rules ) ) { update_post_meta( $this->id, '_wpcode_conditional_logic_enabled', $this->use_rules ); } if ( isset( $this->rules ) ) { update_post_meta( $this->id, '_wpcode_conditional_logic', $this->rules ); } if ( isset( $this->priority ) ) { update_post_meta( $this->id, '_wpcode_priority', $this->priority ); } if ( isset( $this->library_id ) ) { update_post_meta( $this->id, '_wpcode_library_id', $this->library_id ); } if ( isset( $this->library_version ) ) { update_post_meta( $this->id, '_wpcode_library_version', $this->library_version ); } if ( isset( $this->note ) ) { update_post_meta( $this->id, '_wpcode_note', $this->note ); } if ( isset( $this->generator ) ) { update_post_meta( $this->id, '_wpcode_generator', $this->generator ); } if ( isset( $this->generator_data ) ) { update_post_meta( $this->id, '_wpcode_generator_data', $this->generator_data ); } if ( isset( $this->location_extra ) ) { update_post_meta( $this->id, '_wpcode_location_extra', $this->location_extra ); } if ( isset( $this->cloud_id ) ) { $auth_username = wpcode()->library_auth->get_auth_username(); $cloud_ids = get_post_meta( $this->id, '_wpcode_cloud_id', true ); if ( empty( $cloud_ids ) || ! is_array( $cloud_ids ) ) { $cloud_ids = array(); } if ( empty( $this->cloud_id ) && isset( $cloud_ids[ $auth_username ] ) ) { unset( $cloud_ids[ $auth_username ] ); } elseif ( ! empty( $this->cloud_id ) ) { $cloud_ids[ $auth_username ] = $this->cloud_id; } update_post_meta( $this->id, '_wpcode_cloud_id', $cloud_ids ); } if ( isset( $this->custom_shortcode ) ) { if ( empty( $this->custom_shortcode ) ) { // Delete this meta if empty because we query by it. delete_post_meta( $this->id, '_wpcode_custom_shortcode' ); } else { update_post_meta( $this->id, '_wpcode_custom_shortcode', $this->custom_shortcode ); } } if ( isset( $this->device_type ) ) { update_post_meta( $this->id, '_wpcode_device_type', $this->device_type ); } if ( isset( $this->schedule ) ) { update_post_meta( $this->id, '_wpcode_schedule', $this->schedule ); } if ( isset( $this->shortcode_attributes ) ) { update_post_meta( $this->id, '_wpcode_shortcode_attributes', $this->shortcode_attributes ); } if ( isset( $this->load_as_file ) && in_array( $this->get_code_type(), array( 'css', 'js', 'scss' ), true ) ) { update_post_meta( $this->id, '_wpcode_load_as_file', $this->load_as_file ); } if ( isset( $this->compress_output ) ) { update_post_meta( $this->id, '_wpcode_compress_output', true ); } else { delete_post_meta( $this->id, '_wpcode_compress_output' ); } if ( isset( $this->compiled_code ) ) { update_post_meta( $this->id, '_wpcode_compiled_code', $this->compiled_code ); } /** * Run extra logic after the snippet is saved. * * @param int $id The id of the updated snippet. * @param WPCode_Snippet $snippet The snippet object. */ do_action( 'wpcode_snippet_after_update', $this->id, $this ); $this->rebuild_cache(); return $this->id; } /** * Method for rebuilding all snippets cache. * * @return void */ public function rebuild_cache() { wpcode()->cache->cache_all_loaded_snippets(); } /** * Check if a snippet can be run without errors before activating it. * * @return void */ public function run_activation_checks() { $executed_types = array( 'php', 'universal', ); if ( ! in_array( $this->get_code_type(), $executed_types, true ) ) { // If the code is not getting executed just skip. return; } if ( false === $this->active ) { // If we're not trying to activate or the snippet is already active, bail. return; } // Make sure no errors are added by something else. wpcode()->error->clear_errors(); // Try running the code. // Grab the executor class specific to the code type. $executor = wpcode()->execute->get_type_execute_class( $this->get_code_type() ); // Mark this as an activation attempt. wpcode()->execute->doing_activation(); /** * Added for convenience. * * @var WPCode_Snippet_Execute_Type $executor */ $execute = new $executor( $this ); // Grab the output that executes the code. $execute->get_output(); // If any errors are caught, prevent the status from being changed. $has_error = wpcode()->error->has_error(); if ( $has_error ) { $this->active = false; } wpcode()->execute->not_doing_activation(); } /** * Return the code type. * * @return string */ public function get_code_type() { if ( ! isset( $this->code_type ) ) { $this->set_code_type(); } return $this->code_type; } /** * Grab the code type from the taxonomy. * * @return void */ public function set_code_type() { // If something below fails, let's not try again. $this->code_type = ''; $this->code_type_term = $this->get_single_term( $this->code_type_taxonomy ); if ( $this->code_type_term ) { $this->code_type = $this->code_type_term->slug; } } /** * Get the default title for snippets with no title set. * * @return string */ public function get_untitled_title() { return __( 'Untitled Snippet', 'insert-headers-and-footers' ); } /** * Shorthand for deactivating a snippet. * * @return void */ public function deactivate() { $this->active = false; $this->get_id(); $this->save(); } /** * This deactivates the snippet without regardless of user permissions. * Should only be used for unattended auto-deactivation when a snippet throws a potentially blocking error. * * @return void */ public function force_deactivate() { global $wpdb; // Add a filter so we can hijack the deactivate logic if needed. $force_deactivate = apply_filters( 'wpcode_force_deactivate_snippet', false, $this ); if ( false !== $force_deactivate ) { return; } // We need to make a direct call as using wp_update_post will load the post content and if the current user // doesn't have the unfiltered_html capability, the code will be changed unexpectedly. $update = $wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->posts, array( 'post_status' => 'draft', ), array( 'ID' => $this->get_id(), ) ); if ( $update ) { // Rebuild cache to avoid the snippet being loaded again. $this->rebuild_cache(); wpcode()->error->add_error( array( 'message' => sprintf( /* translators: %s: Snippet title and ID used in the error log for clarity. */ esc_html__( 'Snippet %s was automatically deactivated due to a fatal error.', 'insert-headers-and-footers' ), sprintf( '"%s" (#%d)', $this->get_title(), $this->get_id() ) ), ) ); } } /** * Set the last error for this snippet. * * @param array $error The error details. * * @return void */ public function set_last_error( $error ) { if ( ! isset( $error['message'] ) ) { return; } update_post_meta( $this->get_id(), '_wpcode_last_error', $error ); } /** * Get the last error for this snippet. * * @return array|false */ public function get_last_error() { $error = get_post_meta( $this->get_id(), '_wpcode_last_error', true ); if ( empty( $error ) || ! is_array( $error ) ) { return false; } return $error; } /** * Remove the meta that stores the last error. * * @return void */ public function reset_last_error() { delete_post_meta( $this->get_id(), '_wpcode_last_error' ); wpcode()->error->clear_snippets_errors(); } /** * Get the auto insert number. * * @return int */ public function get_auto_insert_number() { if ( ! isset( $this->insert_number ) ) { $this->insert_number = absint( get_post_meta( $this->get_id(), '_wpcode_auto_insert_number', true ) ); // Default value should be 1. if ( 0 === $this->insert_number ) { $this->insert_number = 1; } } return $this->insert_number; } /** * Get the auto-insert value. * * @return int */ public function get_auto_insert() { if ( ! isset( $this->auto_insert ) ) { $this->auto_insert = absint( get_post_meta( $this->get_id(), '_wpcode_auto_insert', true ) ); } return $this->auto_insert; } /** * Get the array of tag slugs. * * @return string[] */ public function get_tags() { if ( ! isset( $this->tags ) ) { $this->set_tags(); } return $this->tags; } /** * Set the tags for the current snippet. * * @return void */ public function set_tags() { $tags = wp_get_post_terms( $this->get_id(), $this->tags_taxonomy ); $tag_slugs = array(); foreach ( $tags as $tag ) { /** * The tag term object. * * @var WP_Term $tag */ $tag_slugs[] = $tag->slug; } $this->tags = $tag_slugs; $this->tags_terms = $tags; } /** * Get the conditional logic rules from the db. * * @return array */ public function get_conditional_rules() { if ( ! isset( $this->rules ) ) { $rules = get_post_meta( $this->get_id(), '_wpcode_conditional_logic', true ); if ( empty( $rules ) ) { $rules = array(); } $this->rules = $rules; } return $this->rules; } /** * Are the conditional logic rules enabled? * * @return bool */ public function conditional_rules_enabled() { if ( ! isset( $this->use_rules ) ) { $enabled = get_post_meta( $this->get_id(), '_wpcode_conditional_logic_enabled', true ); if ( '' === $enabled ) { $enabled = false; } $this->use_rules = boolval( $enabled ); } return $this->use_rules; } /** * Get the note for this snippet. * * @return string */ public function get_note() { if ( ! isset( $this->note ) ) { $this->note = get_post_meta( $this->get_id(), '_wpcode_note', true ); } return $this->note; } /** * Get the priority number for this snippet. * * @return int */ public function get_priority() { if ( ! isset( $this->priority ) ) { $priority = get_post_meta( $this->get_id(), '_wpcode_priority', true ); if ( '' === $priority ) { $priority = 10; } $this->priority = intval( $priority ); } return $this->priority; } /** * Get essential data for caching. * * @return array */ public function get_data_for_caching() { $modified = 0; $post_data = $this->get_post_data(); if ( ! is_null( $post_data ) ) { $modified = $post_data->post_modified; } return array( 'id' => $this->get_id(), 'title' => $this->get_title(), 'code' => $this->get_code(), 'code_type' => $this->get_code_type(), 'location' => $this->get_location(), 'auto_insert' => $this->get_auto_insert(), 'insert_number' => $this->get_auto_insert_number(), 'use_rules' => $this->conditional_rules_enabled(), 'rules' => $this->get_conditional_rules(), 'priority' => $this->get_priority(), 'location_extra' => $this->get_location_extra(), 'shortcode_attributes' => $this->get_shortcode_attributes(), 'compiled_code' => $this->get_compiled_code(), 'modified' => $modified, ); } /** * Get the cloud id for this snippet. * * @return string */ public function get_cloud_id() { if ( ! isset( $this->cloud_id ) ) { if ( wpcode()->library_auth->has_auth() ) { $cloud_id = get_post_meta( $this->get_id(), '_wpcode_cloud_id', true ); if ( empty( $cloud_id ) || ! is_array( $cloud_id ) ) { $cloud_id = array(); } $auth_username = wpcode()->library_auth->get_auth_username(); $this->cloud_id = isset( $cloud_id[ $auth_username ] ) ? $cloud_id[ $auth_username ] : false; } else { $this->cloud_id = false; } } return $this->cloud_id; } /** * Set the cloud id. * * @param string $cloud_id The cloud id to use. * * @return void */ public function set_cloud_id( $cloud_id ) { $this->cloud_id = $cloud_id; } /** * Get the custom shortcode value. * * @return string */ public function get_custom_shortcode() { if ( ! isset( $this->custom_shortcode ) ) { $this->custom_shortcode = get_post_meta( $this->get_id(), '_wpcode_custom_shortcode', true ); } return $this->custom_shortcode; } /** * Get the device type for this snippet. * * @return string */ public function get_device_type() { if ( ! isset( $this->device_type ) ) { $this->device_type = get_post_meta( $this->get_id(), '_wpcode_device_type', true ); if ( empty( $this->device_type ) ) { $this->device_type = 'any'; } } return $this->device_type; } /** * Get the schedule data for this snippet. * * @return array */ public function get_schedule() { if ( ! isset( $this->schedule ) ) { $this->schedule = wp_parse_args( get_post_meta( $this->get_id(), '_wpcode_schedule', true ), array( 'start' => '', 'end' => '', ) ); } return $this->schedule; } /** * Get the generator data for this snippet, if any. * * @return array|false */ public function get_generator_data() { if ( ! isset( $this->generator_data ) ) { $generator_data = get_post_meta( $this->get_id(), '_wpcode_generator_data', true ); $this->generator_data = empty( $generator_data ) ? false : $generator_data; } return $this->generator_data; } /** * Get the generator name for this snippet. * * @return array|false */ public function get_generator() { if ( ! isset( $this->generator ) ) { $generator_name = get_post_meta( $this->get_id(), '_wpcode_generator', true ); $this->generator = empty( $generator_name ) ? false : $generator_name; } return $this->generator; } /** * Check if the snippet is generated using a WPCode generator.. * * @return bool */ public function is_generated() { return ! empty( $this->get_generator() ); } /** * Is this snippet scheduled? * * @return bool */ public function is_scheduled() { $schedule = $this->get_schedule(); return ! empty( $schedule['start'] ) || ! empty( $schedule['end'] ); } /** * Extra data for the selected auto-insert location. * * @return array */ public function get_location_extra() { if ( ! isset( $this->location_extra ) ) { $this->location_extra = get_post_meta( $this->get_id(), '_wpcode_location_extra', true ); } return $this->location_extra; } /** * Load compiled Code. * * @return string */ public function get_compiled_code() { if ( ! isset( $this->compiled_code ) ) { $this->compiled_code = get_post_meta( $this->get_id(), '_wpcode_compiled_code', true ); } return $this->compiled_code; } /** * Maybe the output be compressed? * * @return bool */ public function maybe_compress_output() { if ( ! isset( $this->compress_output ) ) { $this->compress_output = boolval( get_post_meta( $this->get_id(), '_wpcode_compress_output', true ) ); } return $this->compress_output; } /** * Load the shortcode attributes and return. * * @return array */ public function get_shortcode_attributes() { if ( ! isset( $this->shortcode_attributes ) ) { $attributes = get_post_meta( $this->get_id(), '_wpcode_shortcode_attributes', true ); if ( ! is_array( $attributes ) ) { $attributes = array(); } $this->shortcode_attributes = $attributes; } return $this->shortcode_attributes; } /** * Set shortcode attribute value. * * @param string $key The attribute key. * @param string $value The value for the attribute. * * @return void */ public function set_attribute( $key, $value ) { $this->attributes[ $key ] = $value; } /** * Duplicates a snippet with all its data. * * @return void */ public function duplicate() { $this->get_data_for_caching(); $this->get_note(); $this->get_tags(); $this->get_custom_shortcode(); $this->get_device_type(); $this->get_schedule(); // Add a suffix to the title. $this->title = $this->get_title() . ' - Copy'; // Make sure the snippet is not active. $this->post_data->post_status = 'draft'; // Let's make sure the slashes don't get removed from the code. $this->code = wp_slash( $this->code ); /** * Fires before a snippet that is about to be duplicated is saved. * * @param WPCode_Snippet $snippet The snippet object. */ do_action( 'wpcode_before_snippet_duplicated', $this ); // Remove the id to create a new snippet. unset( $this->id ); // Save the new snippet. $this->save(); /** * Fires after a snippet has been duplicated. * * @param WPCode_Snippet $snippet The snippet object. */ do_action( 'wpcode_after_snippet_duplicated', $this ); } /** * Get the edit url for this snippet. * * @return string */ public function get_edit_url() { return admin_url( 'admin.php?page=wpcode-snippet-manager&snippet_id=' . absint( $this->get_id() ) ); } /** * Whether this snippet should be load as a file (for JS or CSS snippets, returns false for other code types). * * @return bool */ public function get_load_as_file() { if ( ! isset( $this->load_as_file ) ) { $this->load_as_file = in_array( $this->get_code_type(), array( 'js', 'css', 'scss' ), true ); if ( $this->load_as_file ) { $this->load_as_file = boolval( get_post_meta( $this->get_id(), '_wpcode_load_as_file', true ) ); } } return $this->load_as_file; } /** * Execute a snippet on demand. * * @param bool $ignore_conditional_logic Whether to ignore the conditional logic rules. * * @return void */ public function execute( $ignore_conditional_logic = false ) { if ( ! $ignore_conditional_logic ) { if ( $this->conditional_rules_enabled() && ! wpcode()->conditional_logic->are_snippet_rules_met( $this ) ) { return; } } wpcode()->execute->get_snippet_output( $this ); } } includes/post-type.php 0000644 00000006436 15021200650 0011027 0 ustar 00 false, 'show_ui' => false, 'can_export' => false, ) ); } /** * Register the custom taxonomies used for snippets. * * @return void */ function wpcode_register_taxonomies() { register_taxonomy( 'wpcode_type', 'wpcode', array( 'public' => false, ) ); register_taxonomy( 'wpcode_location', 'wpcode', array( 'public' => false, ) ); register_taxonomy( 'wpcode_tags', 'wpcode', array( 'public' => false, ) ); } /** * Count draft (inactive) snippets as part of our custom taxonomies count. * * @param array $statuses The statuses to include in the count. * @param WP_Taxonomy $taxonomy The taxonomy object. * * @return array */ function wpcode_taxonomies_count_drafts( $statuses, $taxonomy ) { $taxonomies = array( 'wpcode_type', 'wpcode_location', 'wpcode_tags', ); if ( in_array( $taxonomy->name, $taxonomies, true ) ) { $statuses[] = 'draft'; } return $statuses; } /** * Remove core filters that may interfere with snippet saving. * * @param WPCode_Snippet $snippet The snippet being saved. * * @return void */ function wpcode_maybe_remove_core_content_filters( $snippet ) { // Prevent content_save_pre from modifying the snippet content. remove_all_filters( 'content_save_pre' ); if ( ! function_exists( 'wp_remove_targeted_link_rel_filters' ) || version_compare( get_bloginfo( 'version' ), '6.7', '>=' ) ) { // This function is only available in WP 5.1+. return; } /** * Filters the code types that should keep the core filters. * * @param array $code_types_to_keep_filters The code types that should keep the core filters. */ $code_types_to_keep_filters = apply_filters( 'wpcode_code_types_to_keep_core_content_filters', array( 'text', 'html', ) ); if ( ! in_array( $snippet->get_code_type(), $code_types_to_keep_filters, true ) ) { wp_remove_targeted_link_rel_filters(); } } /** * Add back the core filters that were removed when saving a snippet. * * @return void */ function wpcode_restore_core_content_filters() { if ( ! function_exists( 'wp_init_targeted_link_rel_filters' ) || version_compare( get_bloginfo( 'version' ), '6.7', '>=' ) ) { // This function is only available in WP 5.1+. return; } wp_init_targeted_link_rel_filters(); } /** * Prevent the WP Importer plugin from importing snippets. * * @param array $post_data The post data. * * @return array */ function wpcode_prevent_wp_importer_import( $post_data ) { if ( 'wpcode' === $post_data['post_type'] ) { $post_data['post_type'] = ''; $post_data['post_content'] = ''; } return $post_data; } includes/conditional-logic/class-wpcode-conditional-page.php 0000644 00000024355 15021200650 0020260 0 ustar 00 label = __( 'Page', 'insert-headers-and-footers' ); } /** * Set the type options for the admin mainly. * * @return void */ public function load_type_options() { $this->options = array( 'type_of_page' => array( 'label' => __( 'Type of page', 'insert-headers-and-footers' ), 'description' => __( 'Choose a WordPress-specific type of page for your rule.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => array( array( 'label' => __( 'Homepage', 'insert-headers-and-footers' ), 'value' => 'is_front_page', ), array( 'label' => __( 'Archive', 'insert-headers-and-footers' ), 'value' => 'is_archive', ), array( 'label' => __( 'Single post/page', 'insert-headers-and-footers' ), 'value' => 'is_single', ), array( 'label' => __( 'Search page', 'insert-headers-and-footers' ), 'value' => 'is_search', ), array( 'label' => __( '404 page', 'insert-headers-and-footers' ), 'value' => 'is_404', ), array( 'label' => __( 'Author page', 'insert-headers-and-footers' ), 'value' => 'is_author', ), array( 'label' => __( 'Blog home', 'insert-headers-and-footers' ), 'value' => 'is_home', ), ), 'callback' => array( $this, 'get_type_of_page' ), ), 'post_type' => array( 'label' => __( 'Post type', 'insert-headers-and-footers' ), 'description' => __( 'Target by post type: posts, pages or custom post types.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => $this->get_post_types(), 'callback' => array( $this, 'get_current_post_type' ), ), 'referrer' => array( 'label' => __( 'Referrer', 'insert-headers-and-footers' ), 'description' => __( 'Use the page referrer/last visited page url as a condition.', 'insert-headers-and-footers' ), 'type' => 'text', 'callback' => array( $this, 'get_referer' ), ), 'taxonomy_page' => array( 'label' => __( 'Taxonomy page', 'insert-headers-and-footers' ), 'description' => __( 'Load only on pages for a specific category/taxonomy.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => $this->get_taxonomies_options(), 'callback' => array( $this, 'get_taxonomy' ), ), 'taxonomy_term' => array( 'label' => __( 'Taxonomy term', 'insert-headers-and-footers' ), 'description' => __( 'Choose category/taxonomy terms to target for single or archive pages.', 'insert-headers-and-footers' ), 'type' => 'ajax', 'options' => 'wpcode_search_terms', 'callback' => array( $this, 'get_term' ), 'labels_callback' => array( $this, 'get_taxonomy_term_labels' ), 'multiple' => true, ), 'page_url' => array( 'label' => __( 'Page URL', 'insert-headers-and-footers' ), 'description' => __( 'Use the page URL to limit where this snippet is loaded.', 'insert-headers-and-footers' ), 'type' => 'text', 'callback' => array( $this, 'get_page_url' ), ), 'post_meta' => array( 'label' => __( 'Post meta', 'insert-headers-and-footers' ) . ' (PRO)', 'description' => __( 'Target specific posts based on custom post meta values.', 'insert-headers-and-footers' ), 'type' => 'text', 'options' => array(), 'upgrade' => array( 'title' => __( 'Post Meta rules are a Pro feature', 'insert-headers-and-footers' ), 'text' => __( 'Upgrade today to create conditional logic rules for specific pages or posts.', 'insert-headers-and-footers' ), 'link' => wpcode_utm_url( 'https://wpcode.com/lite/', 'edit-snippet', 'conditional-logic', 'post_meta' ), ), ), 'post_id' => array( 'label' => __( 'Post/Page', 'insert-headers-and-footers' ) . ' (PRO)', 'description' => __( 'Pick specific posts or pages to load the snippet on.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => array(), 'upgrade' => array( 'title' => __( 'Post specific rules are a Pro feature', 'insert-headers-and-footers' ), 'text' => __( 'Upgrade today to create conditional logic rules for specific pages or posts.', 'insert-headers-and-footers' ), 'link' => wpcode_utm_url( 'https://wpcode.com/lite/', 'edit-snippet', 'conditional-logic', 'post_id' ), ), ), 'page_template' => array( 'label' => __( 'Page Template', 'insert-headers-and-footers' ) . ' (PRO)', 'description' => __( 'Load the snippet only on pages with a specific template.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => array(), 'upgrade' => array( 'title' => __( 'Page Template rules are a Pro feature', 'insert-headers-and-footers' ), 'text' => __( 'Upgrade today to create conditional logic rules for specific page templates.', 'insert-headers-and-footers' ), 'link' => wpcode_utm_url( 'https://wpcode.com/lite/', 'edit-snippet', 'conditional-logic', 'page_template' ), ), ), 'post_author' => array( 'label' => __( 'Author', 'insert-headers-and-footers' ) . ' (PRO)', 'description' => __( 'Load the snippet only on pages with a specific author.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => array(), 'upgrade' => array( 'title' => __( 'Post Author rules are a Pro feature', 'insert-headers-and-footers' ), 'text' => __( 'Upgrade today to create conditional logic rules based on the page/post author.', 'insert-headers-and-footers' ), 'link' => wpcode_utm_url( 'https://wpcode.com/lite/', 'edit-snippet', 'conditional-logic', 'post_author' ), ), ), ); } /** * Get a list of options with post types. * * @return array */ protected function get_post_types() { $post_types = get_post_types( array( 'public' => true ), 'objects' ); $options = array(); foreach ( $post_types as $post_type ) { $options[] = array( 'label' => $post_type->label, 'value' => $post_type->name, ); } return $options; } /** * Get a list of taxonomy types. * * @return array */ protected function get_taxonomies_options() { $taxonomies = get_taxonomies( array( 'public' => true, ), 'objects' ); $options = array(); foreach ( $taxonomies as $taxonomy ) { if ( 'post_format' === $taxonomy->name ) { continue; } $options[] = array( // Translators: this is the name of the taxonomy. 'label' => $taxonomy->labels->singular_name, 'value' => $taxonomy->name, ); } return $options; } /** * Get the type of page. * * @return string */ public function get_type_of_page() { global $wp_query; if ( ! isset( $wp_query ) ) { return ''; } if ( is_front_page() ) { return 'is_front_page'; } if ( is_home() ) { return 'is_home'; } if ( is_singular() ) { return 'is_single'; } if ( is_author() ) { return 'is_author'; } if ( is_archive() ) { return 'is_archive'; } if ( is_search() ) { return 'is_search'; } if ( is_404() ) { return 'is_404'; } return ''; } /** * Get the current page post type, if any. * * @return string */ public function get_current_post_type() { return get_post_type(); } /** * Get the referrer from PHP. * * @return string */ public function get_referer() { return isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized } /** * Get the page URL. * * @return string */ public function get_page_url() { global $wp; if ( is_admin() ) { $url = isset( $_SERVER['REQUEST_URI'] ) ? basename( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) : ''; $url = admin_url( $url ); } else { $url = isset( $wp->request ) ? trailingslashit( home_url( $wp->request ) ) : ''; } if ( ! empty( $_GET ) ) { // phpcs:ignore foreach ( $_GET as $key => $value ) { // phpcs:ignore $key = sanitize_key( $key ); $url = add_query_arg( array( $key => sanitize_text_field( wp_unslash( $value ) ), ), $url ); } } return $url; } /** * Check if the current page is a taxonomy page and if yes get the taxonomy name. * * @return string */ public function get_taxonomy() { global $wp_query; if ( is_null( $wp_query ) ) { return ''; } $queried_object = get_queried_object(); return isset( $queried_object->taxonomy ) ? $queried_object->taxonomy : ''; } /** * Get the term of the current page, if any. * * @return array */ public function get_term() { global $wp_query; if ( is_null( $wp_query ) ) { return array(); } if ( is_tax() || is_category() || is_tag() ) { $queried_object = get_queried_object(); return isset( $queried_object->term_id ) ? array( $queried_object->term_id ) : array(); } if ( is_singular() ) { return get_terms( array( 'object_ids' => array( get_the_ID() ), 'fields' => 'ids', ) ); } return array(); } /** * Get the term labels for the taxonomy term value loading in the admin form. * * @param array $values The values that are selected. * * @return array */ public function get_taxonomy_term_labels( $values ) { $labels = array(); foreach ( $values as $term_id ) { $term = get_term( $term_id ); if ( is_null( $term ) || is_wp_error( $term ) ) { continue; } $labels[] = array( 'value' => $term_id, 'label' => $term->name, ); } return $labels; } } new WPCode_Conditional_Page(); includes/conditional-logic/class-wpcode-conditional-type.php 0000644 00000012756 15021200650 0020327 0 ustar 00 register_type(); $this->hooks(); } /** * Register conditional-logic hooks specific to each type (e.g. ajax callbacks). * * @return void */ public function hooks() { } /** * Register this instance to the global auto-insert types. * * @return void */ private function register_type() { wpcode()->conditional_logic->register_type( $this ); } /** * Get the options for this type. * * @return array */ public function get_type_options() { if ( ! isset( $this->options ) ) { $this->load_type_options(); } return $this->options; } /** * Set the type label with a translatable string. * * @return void */ abstract protected function set_label(); /** * Load the options for this type of conditions. * * @return void */ abstract public function load_type_options(); /** * Get the label. * * @return string */ public function get_label() { if ( ! isset( $this->label ) ) { $this->set_label(); } return $this->label; } /** * Get the category. * * @return string */ public function get_category() { return $this->category; } /** * Get the type name. * * @return string */ public function get_name() { return $this->name; } /** * Process a rule group specific to the conditions type. * * @param array $rule_group An array of rules with keys option,relation and value. * @param WPCode_Snippet $snippet The snippet we are evaluating the rules for. * * @return bool */ public function evaluate_rule_row( $rule_group, $snippet ) { return $this->evaluate_rule( $rule_group['option'], $rule_group['relation'], $rule_group['value'], $snippet ); } /** * This takes an option name from the list of options for the type * and if it finds it, it executes the callback defined in the list of * options and compares that value to the set value using the operator * set in the settings. * * @param string $option The option to evaluate. * @param string $relation The comparison relation. * @param string $value The selected value for this condition. * @param WPCode_Snippet $snippet The snippet we are evaluating the rules for. * * @return bool */ protected function evaluate_rule( $option, $relation, $value, $snippet ) { $options = $this->get_type_options(); if ( ! isset( $options [ $option ] ) ) { return true; } $option_details = $options[ $option ]; if ( ! isset( $option_details['callback'] ) ) { return false; } $callback = $option_details['callback']; if ( ! is_callable( $callback ) ) { return false; } return $this->get_relation_comparison( $callback( $snippet ), $value, $relation ); } /** * Takes 2 values and an operator and finds the appropriate function * to evaluate the relation between them. * * @param mixed $value1 This is the first value to compare with value 2. * @param mixed $value2 This is the 2nd value. * @param string $operator This is the operator string. * * @return bool */ protected function get_relation_comparison( $value1, $value2, $operator ) { switch ( $operator ) { case '=': $result = $this->equals( $value1, $value2 ); break; case '!=': $result = $this->does_not_equal( $value1, $value2 ); break; case 'contains': $result = $this->contains( $value1, $value2 ); break; case 'notcontains': $result = ! $this->contains( $value1, $value2 ); break; default: $result = true; break; } return $result; } /** * Does an equals comparison (not strict), also handles arrays to * make it easier to compare things like user roles. * * @param mixed $value1 Value 1. * @param mixed $value2 Value to compare value 1 to. * * @return bool */ private function equals( $value1, $value2 ) { if ( is_array( $value1 ) ) { if ( is_array( $value2 ) ) { return count( array_intersect( $value1, $value2 ) ) > 0; } return in_array( $value2, $value1 ); } if ( is_array( $value2 ) ) { return in_array( $value1, $value2 ); } return $value1 == $value2; } /** * Does a "does not equal" comparison (not strict), also handles arrays to * make it easier to compare things like user roles. * * @param mixed $value1 Value 1. * @param mixed $value2 Value to compare value 1 to. * * @return bool */ private function does_not_equal( $value1, $value2 ) { if ( is_array( $value1 ) ) { if ( is_array( $value2 ) ) { return count( array_intersect( $value1, $value2 ) ) === 0; } return ! in_array( $value2, $value1 ); } if ( is_array( $value2 ) ) { return ! in_array( $value1, $value2 ); } return $value1 != $value2; } /** * Check if value1 contains value2. * * @param string $value1 Value in which to look for value 2. * @param string $value2 The value to look for in value 1. * * @return bool */ private function contains( $value1, $value2 ) { if ( empty( $value2 ) ) { return false; } return false !== strpos( $value1, $value2 ); } } includes/conditional-logic/class-wpcode-conditional-user.php 0000644 00000005321 15021200650 0020312 0 ustar 00 label = __( 'User', 'insert-headers-and-footers' ); } /** * Set the type options for the admin mainly. * * @return void */ public function load_type_options() { $this->options = array( 'logged_in' => array( 'label' => __( 'Logged-in', 'insert-headers-and-footers' ), 'description' => __( 'Check if your site visitor is logged in.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => array( array( 'label' => __( 'True', 'insert-headers-and-footers' ), 'value' => true, ), array( 'label' => __( 'False', 'insert-headers-and-footers' ), 'value' => false, ), ), 'callback' => 'is_user_logged_in', ), 'user_role' => array( 'label' => __( 'User Role', 'insert-headers-and-footers' ), 'description' => __( 'Target a specific user role.', 'insert-headers-and-footers' ), 'type' => 'select', 'options' => $this->get_options_user_roles(), 'callback' => array( $this, 'get_user_role' ), ), 'user_meta' => array( 'label' => __( 'User Meta', 'insert-headers-and-footers') . ' (PRO)' , 'description' => __( 'Target users based on user meta values.', 'insert-headers-and-footers' ), 'type' => 'text', 'options' => array(), 'upgrade' => array( 'title' => __( 'User Meta is a Pro Feature', 'insert-headers-and-footers' ), 'text' => __( 'Get access to User Meta conditional logic rules by upgrading to PRO today.', 'insert-headers-and-footers' ), 'link' => wpcode_utm_url( 'https://wpcode.com/lite/', 'edit-snippet', 'conditional-logic', 'user-meta' ), ), ), ); } /** * Get a list of options for user roles. * * @return array */ protected function get_options_user_roles() { $user_roles = wp_roles()->roles; $options = array(); foreach ( $user_roles as $key => $role ) { $options[] = array( 'label' => $role['name'], 'value' => $key, ); } return $options; } /** * Get an array of user roles for the current user. * * @return string[] */ public function get_user_role() { $user = wp_get_current_user(); return $user->roles; } } new WPCode_Conditional_User(); includes/class-wpcode-snippet-cache.php 0000644 00000007742 15021200650 0014171 0 ustar 00 snippets ) ) { $all_snippets = $this->get_option(); foreach ( $all_snippets as $location => $snippets ) { if ( empty( $snippets ) ) { continue; } if ( ! is_array( $all_snippets[ $location ] ) ) { $all_snippets[ $location ] = array(); } // Load minimal snippet data from array. foreach ( $snippets as $key => $snippet ) { $all_snippets[ $location ][ $key ] = $this->load_snippet( $snippet ); } usort( $all_snippets[ $location ], array( $this, 'priority_order' ) ); } $this->snippets = $all_snippets; } return $this->snippets; } /** * Load a snippet by id, WP_Post or array. * * @param array|int|WP_Post $snippet_data Load a snippet by id, WP_Post or array. * * @return WPCode_Snippet */ public function load_snippet( $snippet_data ) { return new WPCode_Snippet( $snippet_data ); } /** * Get cached snippets in an array by their id. * * @return WPCode_Snippet[] */ public function get_cached_snippets_by_id() { $snippets_by_id = array(); $cached_snippets = $this->get_cached_snippets(); foreach ( $cached_snippets as $snippets ) { foreach ( $snippets as $snippet ) { $snippets_by_id[ $snippet->get_id() ] = $snippet; } } return $snippets_by_id; } /** * Used for sorting by priority. * * @param WPCode_Snippet $snippet_a The first snippet. * @param WPCode_Snippet $snippet_b The second snippet. * * @return int */ public function priority_order( $snippet_a, $snippet_b ) { return $snippet_a->get_priority() - $snippet_b->get_priority(); } /** * Delete the cache option completely. * * @return void */ public function delete_cache() { update_option( $this->option_name, array() ); } /** * Save all the loaded snippets in a single option. * * @return void */ public function cache_all_loaded_snippets() { if ( ! apply_filters( 'wpcode_cache_active_snippets', true ) ) { return; } $auto_inserts = wpcode()->auto_insert->get_types(); $snippets_by_location = array(); foreach ( $auto_inserts as $auto_insert ) { // We don't want to use cached data when gathering stuff for cache. add_filter( 'wpcode_use_auto_insert_cache', '__return_false' ); // Make sure snippets were not already loaded by earlier hooks. unset( $auto_insert->snippets ); $snippets_by_location = array_merge( $auto_insert->get_snippets(), $snippets_by_location ); } $data_for_cache = array(); foreach ( $snippets_by_location as $location => $snippets ) { if ( empty( $snippets ) ) { continue; } $data_for_cache[ $location ] = $this->prepare_snippets_for_caching( $snippets ); } $this->update_option( $data_for_cache ); } /** * Update the option with the new data. * * @param array $data_for_cache The data to store in the option. * * @return bool */ public function update_option( $data_for_cache ) { return update_option( $this->option_name, $data_for_cache ); } /** * Get the option from the db. * * @return array */ public function get_option() { return (array) get_option( $this->option_name, array() ); } /** * Go through an array of snippets and extract just the minimal data * needed for running the snippets. * * @param WPCode_Snippet[] $snippets The snippets array. * * @return array */ private function prepare_snippets_for_caching( $snippets ) { $prepared_snippets = array(); foreach ( $snippets as $snippet ) { $prepared_snippets[] = $snippet->get_data_for_caching(); } return $prepared_snippets; } } includes/class-wpcode-file-cache.php 0000644 00000014610 15021200650 0013416 0 ustar 00 write_file( $this->get_cache_filename_by_key( $name ), wp_json_encode( $data ) ); } /** * Get some data by its name. Checks if the data is expired and if so * returns false so you can update it. * * @param string $name The key of the data to save. * @param int $ttl For how long since creation should this file be used. * * @return array|false */ public function get( $name, $ttl = 0 ) { $file = $this->get_directory_path( $this->get_cache_filename_by_key( $name ) ); /** * Filter the $ttl for a file if you want to change it. * * @param int $ttl The time to live for the cache. * @param string $name The name of the file. * * @return int * @since 2.2.2 */ $ttl = apply_filters( 'wpcode_file_cache_ttl', $ttl, $name ); // If the file doesn't exist there's not much to do. if ( ! file_exists( $file ) ) { // Let's see if we have it in the database. $option = get_option( 'wpcode_alt_cache_' . $name, false ); if ( false !== $option ) { // Let's check if the time since the option was saved is less than the TTL. if ( empty( $option['time'] ) || $ttl > 0 && (int) $option['time'] + $ttl < time() ) { // If the option expired let's delete it, so we clean up in case the file will now work. delete_option( 'wpcode_alt_cache_' . $name ); return false; } return json_decode( $option['data'], true ); } return false; } // If TTL is 0, always return the file. if ( $ttl > 0 && (int) filemtime( $file ) + $ttl < time() ) { return false; } return json_decode( file_get_contents( $file ), true ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents } /** * Delete a cached file by its key. * * @param string $key The key to find the file by. * * @return void */ public function delete( $key ) { $file = $this->get_directory_path( $this->get_cache_filename_by_key( $key ) ); wp_delete_file( $file ); delete_option( 'wpcode_alt_cache_' . $key ); } /** * Basically just adds JSON to the end of the key but we should use this * to also make sure it's a proper filename. * * @param string $name The key. * * @return string */ private function get_cache_filename_by_key( $name ) { return $name . '.json'; } /** * Write a file to the cache folder. Data should already be processed when using this. * * @param string $name The name of the file. * @param string $data The data to write to the file. * * @return void */ private function write_file( $name, $data ) { $written = file_put_contents( $this->get_directory_path( $name ), $data ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents if ( false === $written ) { // If we can't save the file to the file cache let's try to save it to the database. // This is not ideal but it prevents having endless requests. // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents $option = array( 'time' => time(), 'data' => $data, ); // $name is the file name, in order to save it in the db we should remove the file extension. $name = str_replace( '.json', '', $name ); update_option( 'wpcode_alt_cache_' . $name, $option, false ); } } /** * Get a reliable path to write files to, it also creates the folders needed if they don't exist. * * @param string $filename The file path. * * @return string */ private function get_directory_path( $filename ) { if ( ! isset( $this->upload_path ) ) { $uploads = wp_upload_dir(); $base_path = trailingslashit( $uploads['basedir'] ) . $this->basedir; $this->upload_path = $base_path . '/' . $this->dirname; if ( ! file_exists( $this->upload_path ) || ! wp_is_writable( $this->upload_path ) ) { wp_mkdir_p( $this->upload_path ); $this->create_index_html_file( $this->upload_path ); } // Ensure the base path has an index file. $this->create_index_html_file( $base_path ); } $filepath = trailingslashit( $this->upload_path ) . $filename; $directory = dirname( $filepath ); if ( $directory !== $this->upload_path && ! file_exists( $directory ) ) { wp_mkdir_p( $directory ); $this->create_index_html_file( $directory ); } $this->create_index_html_file( $this->upload_path ); return $filepath; } /** * Create index.html file in the specified directory if it doesn't exist. * * @param string $path The path to the directory. * * @return false|int */ public static function create_index_html_file( $path ) { if ( ! is_dir( $path ) || is_link( $path ) ) { return false; } $index_file = wp_normalize_path( trailingslashit( $path ) . 'index.html' ); // Do nothing if index.html exists in the directory. if ( file_exists( $index_file ) ) { return false; } // Create empty index.html. return file_put_contents( $index_file, '' ); // phpcs:ignore WordPress.WP.AlternativeFunctions } /** * Create .htaccess file in the specified directory if it doesn't exist. * * @param string $path The path to the directory. * * @return false|int */ public static function create_htaccess_file( $path ) { if ( ! is_dir( $path ) || is_link( $path ) ) { return false; } $htaccess_file = wp_normalize_path( trailingslashit( $path ) . '.htaccess' ); // Do nothing if index.html exists in the directory. if ( file_exists( $htaccess_file ) ) { return false; } // Create empty index.html. return file_put_contents( $htaccess_file, 'deny from all' ); // phpcs:ignore WordPress.WP.AlternativeFunctions } } includes/helpers.php 0000644 00000033336 15021200650 0010524 0 ustar 00 class_exists( 'WPCode_License' ) ? 'proplugin' : 'liteplugin', 'utm_medium' => sanitize_key( $medium ), 'utm_campaign' => sanitize_key( $campaign ) ); if ( ! empty( $ad_content ) ) { $args['utm_content'] = sanitize_key( $ad_content ); } return add_query_arg( $args, $url ); } /** * Get a standard auto-insert location select menu. * * @param string $selected_location The location currently selected. * @param string $code_type The code type for the current snippet (disables some locations). * @param string $name The name for the select (used in the form). * * @return string */ function wpcode_get_auto_insert_location_picker( $selected_location, $code_type = 'html', $name = 'wpcode_auto_insert_location' ) { $available_types = wpcode()->auto_insert->get_types(); ob_start(); ?> auto_insert->get_types(); $location_label = ''; foreach ( $available_types as $type ) { $options = $type->get_locations(); foreach ( $options as $key => $location ) { if ( $key === $location_slug ) { if ( isset( $location['label'] ) ) { $label = $location['label']; } else { $label = $location; } $location_label = $label; break 2; } } } return $location_label; } /** * Get a checkbox wrapped with markup to be displayed as a toggle. * * @param bool $checked Is it checked or not. * @param string $name The name for the input. * @param string $description Field description (optional). * @param string|int $value Field value (optional). * @param string $label Field label (optional). * * @return string */ function wpcode_get_checkbox_toggle( $checked, $name, $description = '', $value = '', $label = '' ) { $markup = ''; if ( ! empty( $label ) ) { $markup .= ''; } if ( ! empty( $description ) ) { $markup .= '
' . wp_kses_post( $description ) . '
'; } return $markup; } /** * Button that copies target input value to the clipboard. * * @param string $target The id of the input to copy from. * @param string $prefix If you want something prepended to the copied value. * @param string $suffix If you want something appended to the copied value. * * @return string */ function wpcode_get_copy_target_button( $target, $prefix = '', $suffix = '' ) { return sprintf( '', get_wpcode_icon( 'copy', 16, 16 ), get_wpcode_icon( 'check', 16, 13 ), _x( 'Copy', 'Copy to clipboard', 'insert-headers-and-footers' ), esc_attr( $target ), esc_attr( $prefix ), esc_attr( $suffix ) ); } /** * Get a list of labels for the conditions used in conditional logic. * * @return array */ function wpcode_get_conditions_relation_labels() { return array( 'contains' => __( 'Contains', 'insert-headers-and-footers' ), 'notcontains' => __( 'Doesn\'t Contain', 'insert-headers-and-footers' ), '=' => __( 'Is', 'insert-headers-and-footers' ), '!=' => __( 'Is not', 'insert-headers-and-footers' ), 'before' => __( 'Is Before', 'insert-headers-and-footers' ), 'after' => __( 'Is After', 'insert-headers-and-footers' ), 'before-or' => __( 'Is on or Before', 'insert-headers-and-footers' ), 'after-or' => __( 'Is on or After', 'insert-headers-and-footers' ), ); } /** * Get an array of locations that support an insert number. * * @return string[] */ function wpcode_get_auto_insert_locations_with_number() { return array( 'before_paragraph', 'after_paragraph', 'archive_before_post', 'archive_after_post', 'after_words', 'every_words', ); } /** * Returns the site domain. * * @return string */ function wpcode_get_site_domain() { return wp_parse_url( home_url(), PHP_URL_HOST ); } /** * Check WP version and include the compatible upgrader skin. */ function wpcode_require_upgrader() { global $wp_version; require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // WP 5.3 changes the upgrader skin. if ( version_compare( $wp_version, '5.3', '<' ) ) { require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-skin-legacy.php'; } else { require_once WPCODE_PLUGIN_PATH . 'includes/admin/class-wpcode-skin.php'; } } /** * Get timezone string if the function doesn't exist. (WP < 5.3). * * @return string * @since 2.0.10 */ function wpcode_wp_timezone_string() { if ( function_exists( 'wp_timezone_string' ) ) { return wp_timezone_string(); } $timezone_string = get_option( 'timezone_string' ); if ( $timezone_string ) { return $timezone_string; } $offset = (float) get_option( 'gmt_offset' ); $hours = (int) $offset; $minutes = ( $offset - $hours ); $sign = ( $offset < 0 ) ? '-' : '+'; $abs_hour = abs( $hours ); $abs_mins = abs( $minutes * 60 ); $tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins ); return $tz_offset; } /** * Add a new library username to be loaded in the WPCode Library. * * @param string $slug The username to load snippets for from the WPCode Library. * @param string $label The label to display for the username in the library. * @param string $version The version of the plugin/theme. Used to filter snippets that should not be loaded for newer versions. * * @return void */ function wpcode_register_library_username( $slug, $label = '', $version = '' ) { if ( ! is_admin() || ! isset( wpcode()->library ) ) { return; } wpcode()->library->register_library_username( $slug, $label, $version ); } /** * Load snippets from the library by a specific username. * This function also loads the library if it hasn't been loaded yet so that it can be used in API endpoints. * It also adds links to install snippets and checks for permissions. * * @param string $username The username to load snippets for from the WPCode Library. * * @return array */ function wpcode_get_library_snippets_by_username( $username ) { wpcode_maybe_load_library(); $snippets = wpcode()->library->get_snippets_by_username( $username ); // Let's prepare this a bit for easier output. // If there are no snippets just return an empty array. if ( empty( $snippets['snippets'] ) ) { return array(); } $can_install = current_user_can( 'wpcode_edit_snippets' ); $prepared = array(); $used_library_snippets = wpcode()->library->get_used_library_snippets(); foreach ( $snippets['snippets'] as $snippet ) { $snippet['installed'] = false; // If the user can't install snippets, don't provide an install link. if ( ! $can_install ) { $url = ''; } elseif ( ! empty( $used_library_snippets[ $snippet['library_id'] ] ) ) { // If the snippet is already installed link to the snippet so they can edit it. $snippet['installed'] = true; $url = wpcode()->library->get_edit_snippet_url( $used_library_snippets[ $snippet['library_id'] ] ); } else { // If the snippet is not yet installed, add a link to install it. $url = wpcode()->library->get_install_snippet_url( $snippet['library_id'] ); } $snippet['install'] = $url; $prepared[] = $snippet; } return $prepared; } /** * Make sure the WPCode library is loaded, along with the components it needs to run. * * @return void */ function wpcode_maybe_load_library() { if ( ! isset( wpcode()->library ) ) { // Snippet Library. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-library.php'; // Load components needed for the library, if not loaded. if ( ! isset( wpcode()->file_cache ) ) { // File cache. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-file-cache.php'; wpcode()->file_cache = new WPCode_File_Cache(); } if ( ! isset( wpcode()->library_auth ) ) { // Authentication for the library site. require_once WPCODE_PLUGIN_PATH . 'includes/class-wpcode-library-auth.php'; wpcode()->library_auth = new WPCode_Library_Auth(); } wpcode()->library = new WPCode_Library(); } } /** * Helper function for testing mode. * * @return bool */ function wpcode_testing_mode_enabled() { if ( ! class_exists( 'WPCode_Testing_Mode' ) ) { return false; } return WPCode_Testing_Mode::get_instance()->testing_mode_enabled(); } /** * Get the user's IP address. * * @return string */ function wpcode_get_user_ip() { $ip = '127.0.0.1'; $address_headers = array( 'HTTP_TRUE_CLIENT_IP', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR', ); foreach ( $address_headers as $header ) { if ( empty( $_SERVER[ $header ] ) ) { continue; } /* * HTTP_X_FORWARDED_FOR can contain a chain of comma-separated addresses, with or without spaces. * The first address is the original client. It can't be trusted for authenticity, * but we don't need to for this purpose. */ // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $address_chain = explode( ',', wp_unslash( $_SERVER[ $header ] ) ); $ip = filter_var( trim( $address_chain[0] ), FILTER_VALIDATE_IP ); break; } /** * Filter detected IP address. * * @param string $ip IP address. */ return filter_var( apply_filters( 'wpcode_get_user_ip', $ip ), FILTER_VALIDATE_IP ); } /** * Is the ip for a localhost. Defaults to the current user ip. * * @param string $ip The IP to check. * * @return string */ function wpcode_is_local( $ip = null ) { if ( ! $ip ) { $ip = wpcode_get_user_ip(); } return empty( $ip ) || in_array( $ip, array( '127.0.0.1', '::1' ), true ); } /** * Attempts to detect popular caching plugins and clear their cache. * * @param string $context The context in which the cache is being cleared. * * @return void */ function wpcode_clear_all_plugins_page_cache( $context = '' ) { if ( apply_filters( 'wpcode_skip_clear_all_plugins_cache', false, $context ) ) { return; } // LiteSpeed Cache. if ( function_exists( 'run_litespeed_cache' ) && class_exists( 'LiteSpeed\Purge' ) && method_exists( 'LiteSpeed\Purge', 'purge_all' ) ) { LiteSpeed\Purge::purge_all(); } // WP Super Cache. if ( function_exists( 'wp_cache_clear_cache' ) ) { wp_cache_clear_cache(); } // W3 Total Cache. if ( function_exists( 'w3tc_flush_all' ) ) { w3tc_flush_all(); } // WP-Optimize. if ( function_exists( 'WP_Optimize' ) ) { WP_Optimize()->get_page_cache()->purge(); } // WP Rocket. if ( function_exists( 'rocket_clean_domain' ) ) { rocket_clean_domain(); } // WP Fastest Cache. if ( function_exists( 'wpfc_clear_all_cache' ) ) { wpfc_clear_all_cache(); } // SiteGround Optimizer. if ( function_exists( 'sg_cachepress_purge_cache' ) ) { sg_cachepress_purge_cache(); } if ( class_exists( 'Swift_Performance_Cache' ) ) { if ( method_exists( 'Swift_Performance_Cache', 'clear_all_cache' ) ) { Swift_Performance_Cache::clear_all_cache(); } } // WP Engine. if ( class_exists( 'WpeCommon' ) ) { if ( method_exists( 'WpeCommon', 'purge_varnish_cache' ) ) { WpeCommon::purge_varnish_cache(); } } } includes/admin/class-wpcode-review.php 0000644 00000014760 15021200650 0014035 0 ustar 00 settings->get_option( 'headers_footers_mode' ) ) { return; } // If this is a multisite and the user is a super admin let's see if they already dismissed this on other sites. if ( is_multisite() && is_super_admin() ) { $dismissed = get_user_meta( get_current_user_id(), 'wpcode_dismissed_review_request', true ); if ( ! empty( $dismissed ) ) { return; } } // Verify that we can do a check for reviews. $notices = get_option( 'wpcode_admin_notices', array() ); $time = time(); $load = false; if ( empty( $notices['review_request'] ) ) { $notices['review_request'] = array( 'time' => $time, 'dismissed' => false, ); update_option( 'wpcode_admin_notices', $notices ); return; } // Check if it has been dismissed or not. if ( ( isset( $notices['review_request']['dismissed'] ) && ! $notices['review_request']['dismissed'] ) && ( isset( $notices['review_request']['time'] ) && ( ( $notices['review_request']['time'] + DAY_IN_SECONDS ) <= $time ) ) ) { $load = true; } // If we cannot load, return early. if ( ! $load ) { return; } $this->review(); } /** * Maybe show Lite review request. */ public function review() { // Fetch when plugin was initially installed. $activated = get_option( 'ihaf_activated', array() ); if ( ! empty( $activated['wpcode'] ) ) { // Only continue if plugin has been installed for at least 14 days. if ( ( $activated['wpcode'] + ( DAY_IN_SECONDS * 14 ) ) > time() ) { return; } } else { $activated['wpcode'] = time(); update_option( 'ihaf_activated', $activated ); return; } // Only proceed with displaying if the user is using an active snippet. $snippet_count = wp_count_posts( 'wpcode' ); if ( empty( $snippet_count->publish ) ) { return; } $feedback_url = add_query_arg( array( 'siteurl' => untrailingslashit( home_url() ), 'plugin' => class_exists( 'WPCode_Premium') ? 'pro' : 'lite', 'version' => WPCODE_VERSION, ), 'https://www.wpcode.com/plugin-feedback/' ); $feedback_url = wpcode_utm_url( $feedback_url, 'review-notice', 'feedback' ); ob_start(); // We have a candidate! Output a review message. ?> WPCode_Notice::DISMISS_GLOBAL, 'slug' => 'review_request', 'autop' => false, 'class' => 'wpcode-review-notice', ) ); } /** * When user is on a WPCode related admin page, display footer text * that graciously asks them to rate us. * * @param string $text Footer text. * * @return string * * */ public function admin_footer( $text ) { global $current_screen; if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'wpcode' ) !== false ) { $url = 'https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/?filter=5#new-post'; $text = sprintf( wp_kses( /* translators: $1$s - WPCode plugin name; $2$s - WP.org review link; $3$s - WP.org review link. */ __( 'Please rate %1$s ★★★★★ on WordPress.org to help us spread the word. Thank you from the WPCode team!', 'insert-headers-and-footers' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), ), ) ), 'WPCode', $url, $url ); } return $text; } } new WPCode_Review(); includes/admin/class-wpcode-usage-tracking.php 0000644 00000016641 15021200650 0015440 0 ustar 00 is_enabled() ) { return; } $last_run = get_option( self::LAST_RUN ); // Make sure we do not run it more than once a day. if ( false !== $last_run && ( time() - $last_run ) < DAY_IN_SECONDS ) { return; } wp_remote_post( $this->get_url(), array( 'timeout' => 10, 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8', ), 'user-agent' => $this->get_user_agent(), 'body' => wp_json_encode( $this->get_data() ), ) ); // If we have completed successfully, recheck in 1 week. update_option( self::LAST_RUN, time() ); } /** * Gets the URL for the notifications api. * * @return string The URL to use for the api requests. * @since 2.0.10 */ private function get_url() { if ( defined( 'WPCODE_USAGE_TRACKING_URL' ) ) { return WPCODE_USAGE_TRACKING_URL; } return $this->url; } /** * Rtrieve the data to send to the usage tracking api. * * @return array * @since 2.0.10 */ public function get_data() { global $wpdb; $theme_data = wp_get_theme(); $activated = get_option( 'ihaf_activated', array() ); $installed_date = isset( $activated['wpcode'] ) ? $activated['wpcode'] : null; $data = array( // Generic data (environment). 'url' => home_url(), 'php_version' => PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, 'wp_version' => get_bloginfo( 'version' ), 'mysql_version' => $wpdb->db_version(), 'server_version' => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '', 'is_ssl' => is_ssl(), 'is_multisite' => is_multisite(), 'sites_count' => function_exists( 'get_blog_count' ) ? (int) get_blog_count() : 1, 'active_plugins' => $this->get_active_plugins(), 'theme_name' => $theme_data->name, 'theme_version' => $theme_data->version, 'user_count' => function_exists( 'get_user_count' ) ? get_user_count() : null, 'locale' => get_locale(), 'timezone_offset' => wpcode_wp_timezone_string(), // WPCode specific data. 'wpcode_version' => WPCODE_VERSION, 'wpcode_license_key' => null, 'wpcode_license_type' => null, 'wpcode_is_pro' => false, 'wpcode_lite_installed_date' => $installed_date, 'wpcode_settings' => $this->get_settings(), ); // Add snippets data. $data = array_merge( $data, $this->get_snippets_data() ); return $data; } /** * Return a list of active plugins. * * @return array An array of active plugin data. * @since 2.0.10 */ private function get_active_plugins() { if ( ! function_exists( 'get_plugins' ) ) { include ABSPATH . '/wp-admin/includes/plugin.php'; } $active = get_option( 'active_plugins', array() ); $plugins = array_intersect_key( get_plugins(), array_flip( $active ) ); return array_map( static function ( $plugin ) { if ( isset( $plugin['Version'] ) ) { return $plugin['Version']; } return 'Not Set'; }, $plugins ); } /** * Get the User Agent string that will be sent to the API. * * @return string * @since 2.0.10 */ public function get_user_agent() { return 'WPCode/' . WPCODE_VERSION . '; ' . get_bloginfo( 'url' ); } /** * Get the WPCode settings but anonymize some data. * * @return array */ public function get_settings() { $settings = wpcode()->settings->get_options(); // By default, don't send the API tokens. $settings_to_ignore = apply_filters( 'wpcode_usage_tracking_excluded_settings', array( 'facebook_pixel_api_token', 'pinterest_conversion_token', 'tiktok_access_token', ) ); foreach ( $settings_to_ignore as $setting ) { if ( isset( $settings[ $setting ] ) ) { $settings[ $setting ] = '***'; } } return $settings; } /** * After the user has successfully authenticated with the API, we can start sending data. * * @return void */ public function usage_tracking_auth() { // If already enabled, don't do anything. if ( $this->is_enabled() ) { return; } wpcode()->settings->update_option( 'usage_tracking', true ); } /** * Track snippet-specific data. * * @return array */ public function get_snippets_data() { $counts = wp_count_posts( 'wpcode' ); $snippets_data = array( 'wpcode_total_snippets' => array_sum( array( $counts->publish, $counts->draft ) ), 'wpcode_active_snippets' => $counts->publish, 'wpcode_trashed_snippets' => $counts->trash, 'wpcode_generated_snippets' => 0, 'wpcode_generators' => array(), ); if ( empty( $snippets_data['wpcode_total_snippets'] ) ) { // If there are no snippets to look at then we can return early. return $snippets_data; } // Let's see how many snippets were generated with a WPCode Generator. $generated_snippets = get_posts( array( 'post_type' => 'wpcode', 'meta_key' => '_wpcode_generator', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key 'fields' => 'ids', ) ); if ( ! empty( $generated_snippets ) ) { $snippets_data['wpcode_generated_snippets'] = count( $generated_snippets ); foreach ( $generated_snippets as $snippet_id ) { $snippets_data['wpcode_generators'][] = get_post_meta( $snippet_id, '_wpcode_generator', true ); } } return $snippets_data; } } includes/admin/class-wpcode-skin-legacy.php 0000644 00000005724 15021200650 0014742 0 ustar 00 upgrader =& $upgrader; } } /** * Set the upgrader result and store it as a property in the parent class. * * @param object $result The result of the install process. * * @since 2.0.7 * */ public function set_result( $result ) { $this->result = $result; } /** * Empty out the header of its HTML content and only check to see if it has * been performed or not. * * @since 2.0.7 */ public function header() { } /** * Empty out the footer of its HTML contents. * * @since 2.0.7 */ function footer() { } /** * Instead of outputting HTML for errors, json_encode the errors and send them * back to the Ajax script for processing. * * @param array $errors Array of errors with the install process. * * @since 2.0.7 * */ function error( $errors ) { if ( ! empty( $errors ) ) { $error_message = sprintf( // Translators: Support link tag starts with url and Support link tag ends. esc_html__( 'There was an error installing the addon. Please try again. If you are still having issues, please %1$scontact our support%2$s team.', 'insert-headers-and-footers' ), '', '' ); if ( is_wp_error( $errors ) ) { /** * @var WP_Error $errors */ $message = $errors->get_error_message(); if ( ! empty( $message ) ) { $error_message = sprintf( // Translators: The name of the addon that can't be installed, Support link tag starts with url and Support link tag ends. esc_html__( 'There was an error installing the addon, %1$s. Please try again. If you are still having issues, please %2$scontact our support%3$s team. ', 'insert-headers-and-footers' ), esc_html( $message ), '', '' ); } } wp_send_json( array( 'error' => $error_message ) ); } } /** * Empty out the feedback method to prevent outputting HTML strings as the install * is progressing. * * @param string $string The feedback string. * * @since 2.0.7 * */ function feedback( $string ) { } } includes/admin/class-wpcode-code-editor.php 0000644 00000011157 15021200650 0014727 0 ustar 00 load_code_mirror( $code_type ); } /** * If called, this loads CodeMirror on the current admin page with checks. * * @param string $code_type The code type that will be converted to the mime type for the editor. * * @return array|false */ public function load_code_mirror( $code_type ) { if ( ! function_exists( 'wp_enqueue_code_editor' ) ) { return false; } $editor_args = array( 'type' => wpcode()->execute->get_mime_for_code_type( $code_type ), 'showHint' => true, 'codemirror' => array( 'matchBrackets' => true, 'gutters' => array( 'CodeMirror-lint-markers', 'CodeMirror-foldgutter' ), 'foldGutter' => true, 'autoCloseBrackets' => true, 'highlightSelectionMatches' => true, ), ); if ( ! current_user_can( 'wpcode_edit_snippets' ) ) { $editor_args['codemirror']['readOnly'] = true; } // Check if the DISALLOW_UNFILTERED_HTML is defined and print the warning message if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) { WPCode_Notice::warning( esc_html__( 'The PHP constant DISALLOW_UNFILTERED_HTML is currently defined, which is preventing WPCode from saving code accurately. Please contact your webmaster for assistance in disabling this restriction.', 'insert-headers-and-footers' ) ); } // Allow filtering of the editor args. $editor_args = apply_filters( 'wpcode_editor_config', $editor_args ); // Add filter to override the current user meta for syntax highlighting. add_filter( 'get_user_metadata', array( $this, 'override_user_meta' ), 10, 4 ); // Enqueue code editor and settings for manipulating HTML. $this->settings = wp_enqueue_code_editor( $editor_args ); // Remove the filter. remove_filter( 'get_user_metadata', array( $this, 'override_user_meta' ) ); return $this->settings; } /** * When using the WPCode editor always load syntax highlighting. * * @param mixed $value The meta value. * @param int $object_id The user ID. * @param string $meta_key The meta key being looked up. * @param bool $single True if only the first value should be returned. * * @return bool|mixed */ public function override_user_meta( $value, $object_id, $meta_key, $single ) { if ( 'syntax_highlighting' !== $meta_key || ! apply_filters( 'wpcode_override_syntax_highlighting', true ) ) { return $value; } return true; } /** * Load hint scripts if needed. * * @return void */ public function load_hint_scripts() { wp_enqueue_script( 'htmlhint' ); wp_enqueue_script( 'csslint' ); wp_enqueue_script( 'jshint' ); } /** * Update a setting for the editor instance. * * @param string $key Key of setting to update. * @param mixed $value Value to set the setting to, can be string, integer, array. * * @return void */ public function set_setting( $key, $value ) { if ( ! isset( $this->settings ) ) { return; } if ( ! isset( $this->settings['codemirror'] ) ) { $this->settings['codemirror'] = array(); } $this->settings['codemirror'][ $key ] = $value; } /** * Load the inline script needed to initiate the code editor using the current settings. * * @param string $id The textarea ID to init the editor for. * * @return void */ public function register_editor( $id ) { $this->editors[] = $id; } /** * Load the inline script needed to initiate the code editor using the current settings. * * @return void */ public function init_editor() { wp_add_inline_script( 'code-editor', sprintf( ' jQuery( function() { window.wpcode_editor = window.wpcode_editor ? window.wpcode_editor : {}; var ids = %1$s; var settings = %2$s; for ( var i in ids ) { window.wpcode_editor[ids[i]] = wp.codeEditor.initialize( ids[i], settings ); } } );', wp_json_encode( $this->editors ), wp_json_encode( $this->get_settings() ) ) ); } /** * Get the settings. * * @return array */ public function get_settings() { return $this->settings; } } includes/admin/class-wpcode-metabox-snippets.php 0000644 00000014417 15021200650 0016035 0 ustar 00 hooks(); } /** * Load the translatable strings. * * @return void */ public function load_strings() { $this->title = __( 'WPCode Page Scripts', 'insert-headers-and-footers' ); $this->tabs = array( 'header' => __( 'Header', 'insert-headers-and-footers' ), 'footer' => __( 'Footer', 'insert-headers-and-footers' ), ); $body_supported = function_exists( 'wp_body_open' ) && version_compare( get_bloginfo( 'version' ), '5.2', '>=' ); if ( $body_supported ) { $this->tabs['body'] = __( 'Body', 'insert-headers-and-footers' ); } $this->tabs['code'] = __( 'Custom Code Snippet', 'insert-headers-and-footers' ); $this->tabs['revisions'] = __( 'Revisions', 'insert-headers-and-footers' ); } /** * Add hooks. * * @return void */ public function hooks() { add_action( 'admin_init', array( $this, 'load_strings' ) ); add_action( 'add_meta_boxes', array( $this, 'register_metabox' ) ); add_action( 'admin_head', array( $this, 'close_metabox_for_current_screen' ) ); } /** * Make sure the metabox is closed by default. * * @return void */ public function close_metabox_for_current_screen() { // Close the metabox by default. $screen = get_current_screen(); if ( ! isset( $screen->id ) ) { return; } if ( apply_filters( 'wpcode_metabox_scripts_force_collapse', true, $screen ) ) { add_filter( 'get_user_option_closedpostboxes_' . $screen->id, array( $this, 'add_metabox_to_user_closed', ) ); } } /** * Add our metabox id to the array of closed metaboxes when the page loads. * * @param mixed $closed The array of closed metaboxes. * * @return array */ public function add_metabox_to_user_closed( $closed ) { // Make sure it's an array. if ( ! is_array( $closed ) ) { $closed = array(); } $closed[] = $this->id; return $closed; } /** * Use `add_meta_box` to register the metabox for this class. * * @param string $post_type The post type of the screen where metaboxes are loaded. * * @return void */ public function register_metabox( $post_type ) { // Don't show the metabox to users who aren't allowed to manage snippets. if ( ! current_user_can( 'wpcode_edit_html_snippets' ) ) { return; } if ( wpcode()->settings->get_option( 'headers_footers_mode' ) ) { // Don't load the metabox when headers & footers mode is enabled. return; } $post_type_details = get_post_type_object( $post_type ); // Add metabox only on public post types. if ( empty( $post_type_details->public ) ) { return; } add_meta_box( $this->id, $this->title, array( $this, 'output_metabox_content', ), $post_type, 'normal', apply_filters( 'wpcode_post_metabox_priority', 'default' ) ); } /** * Metabox content output callback. * * @param WP_Post $post The post object. * * @return void */ public function output_metabox_content( $post ) { $this->metabox_start(); echo '<head>
'
);
$body_desc = sprintf(
/* translators: %s: The `` tag */
esc_html__( 'These scripts will be printed just below the opening %s tag.', 'insert-headers-and-footers' ),
'<body>
'
);
$footer_desc = sprintf(
/* translators: %s: The `` tag */
esc_html__( 'These scripts will be printed above the closing %s tag.', 'insert-headers-and-footers' ),
'</body>
'
);
$this->textarea_field( 'header', __( 'Header', 'insert-headers-and-footers' ), $header_desc );
if ( $this->body_supported() ) {
$this->textarea_field( 'body', __( 'Body', 'insert-headers-and-footers' ), $body_desc );
}
$this->textarea_field( 'footer', __( 'Footer', 'insert-headers-and-footers' ), $footer_desc );
wp_nonce_field( $this->action, $this->nonce_name );
}
/**
* Check if the website supports wp_body_open.
*
* @return bool
*/
public function body_supported() {
return function_exists( 'wp_body_open' ) && version_compare( get_bloginfo( 'version' ), '5.2', '>=' );
}
/**
* Standard output for a code input field.
*
* @param string $option The option name as stored in the DB.
* @param string $title The title of the input (also used as label).
* @param string $desc The description that shows up under the field.
*
* @return void
*/
public function textarea_field( $option, $title, $desc ) {
$value = wp_unslash( $this->get_option( $option ) );
?>
array() ) ); ?>
%s
', esc_html__( 'Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to global Headers & Footers scripts.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ), 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'headers-footers', 'revisions', 'upgrade-to-pro' ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'headers-footers', 'revisions', 'features' ), ) ); $this->metabox( __( 'Code Revisions', 'insert-headers-and-footers' ), $html, __( 'Easily switch back to a previous version of your global scripts.', 'insert-headers-and-footers' ) ); } } includes/admin/pages/class-wpcode-admin-page-tools.php 0000644 00000100661 15021200650 0016767 0 ustar 00 page_title = __( 'Tools', 'insert-headers-and-footers' ); parent::__construct(); } /** * Register hook on admin init just for this page. * * @return void */ public function page_hooks() { $this->process_message(); add_action( 'admin_init', array( $this, 'submit_listener' ) ); add_action( 'admin_print_scripts', array( $this, 'importer_templates' ) ); add_filter( 'wpcode_admin_js_data', array( $this, 'add_tools_data' ) ); // Listen for log delete requests. add_action( 'admin_init', array( $this, 'maybe_delete_log' ) ); // Localize script data. add_filter( 'wpcode_admin_js_data', array( $this, 'add_tools_strings' ) ); } /** * Process messages specific to this page. * * @return void */ public function process_message() { // phpcs:disable WordPress.Security.NonceVerification if ( ! isset( $_GET['message'] ) ) { return; } $messages = array( 1 => sprintf( // Translators: Adds a link to the snippets list in the admin. __( 'Import was successfully finished. You can go and check %1$syour snippets%2$s.', 'insert-headers-and-footers' ), '', '' ), ); $message = absint( $_GET['message'] ); // phpcs:enable WordPress.Security.NonceVerification if ( ! isset( $messages[ $message ] ) ) { return; } $this->set_success_message( $messages[ $message ] ); } /** * @return WPCode_Importer_Type[] */ public function get_importers() { if ( empty( $this->importers ) ) { $this->importers = wpcode()->importers->get_importers(); } return $this->importers; } /** * The Tools page output. * * @return void */ public function output_content() { if ( method_exists( $this, 'output_view_' . $this->view ) ) { call_user_func( array( $this, 'output_view_' . $this->view ) ); } } /** * The Import view. * * @return void */ public function output_view_import() { ?>
array( 'class' => array(), ), ) ), '1', '0', esc_html( $provider_name ) ); ?>
array( 'class' => array(), ), ) ), '' ); ?>
' . esc_html__( 'You do not have sufficient permissions to view logs.', 'insert-headers-and-footers' ) . '
'; return; } $logs = wpcode()->logger->get_logs(); if ( empty( $logs ) ) { echo ''; printf( // translators: %1$s: opening anchor tag, %2$s: closing anchor tag. esc_html__( 'No logs found. You can enable logging from the %1$ssettings panel%2$s.', 'insert-headers-and-footers' ), '', '' ); echo '
'; return; } $selected_log = $logs[0]['path']; $selected_log_name = $logs[0]['filename']; if ( isset( $_POST['log'] ) && isset( $_POST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_POST['_wpnonce'] ), 'wpcode_view_log' ) ) { $selected_log_name = sanitize_text_field( wp_unslash( $_POST['log'] ) ); // Find the log file path. foreach ( $logs as $log ) { if ( $log['filename'] === $selected_log_name ) { $selected_log = $log['path']; break; } } } // Load the selected log. $log_content = file_get_contents( $selected_log ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $delete_log_url = wp_nonce_url( add_query_arg( array( 'wpcode_action' => 'delete_log', 'log' => str_replace( '.log', '', $selected_log_name ), ), $this->get_page_action_url() ), 'wpcode_delete_log' ); // Log picker form. ?>'; $html .= esc_html__( 'Set the editor height in pixels or enable auto-grow so the code editor automatically grows in height with the code.', 'insert-headers-and-footers' ); $html .= '
'; return $html; } /** * Get the license key input. * * @return string */ public function get_license_key_input() { ob_start(); ?> '; $this->access_view_content(); echo 'wp_mail_smtp_notice(); ?>
', '
' . esc_html( $capability_data['description'] ) . '
' ); } $this->php_setting(); ?> tags. '' . esc_html__( 'Improve the way you and your team manage your snippets with the WPCode Access Control settings. Enable other users on your site to manage different types of snippets or configure Conversion Pixels settings and update configuration files. This feature is available on the %1$sWPCode Pro%2$s plan or higher.', 'insert-headers-and-footers' ) . '
', '', '' ); return self::get_upsell_box( esc_html__( 'Access Control is a PRO Feature', 'insert-headers-and-footers' ), $text, array( 'text' => esc_html__( 'Upgrade to WPCode PRO', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'settings', 'tab-' . $this->view, 'upgrade-to-pro' ) ), ), array(), array( esc_html__( 'Save time and improve website management with your team', 'insert-headers-and-footers' ), esc_html__( 'Delegate snippet management to other users with full control', 'insert-headers-and-footers' ), esc_html__( 'Enable other users to set up ads & 3rd party services', 'insert-headers-and-footers' ), esc_html__( 'Choose if PHP snippets should be enabled on the site', 'insert-headers-and-footers' ), ) ); } /** * Output the PHP disable setting. * * @return void */ public function php_setting() { ?> metabox_row( esc_html__( 'Disable PHP snippets', 'insert-headers-and-footers' ), $this->get_checkbox_toggle( boolval( wpcode()->settings->get_option( 'completely_disable_php' ) ), 'completely_disable_php', esc_html__( 'This option will completely disable PHP snippets execution and the option to edit or add new PHP snippets.', 'insert-headers-and-footers' ) ), 'wpcode_disable_php' ); } /** * Get the custom capabilities. * * @return array[] */ public function get_capabilites() { return wpcode_custom_capabilities(); } /** * Get a dropdown with the user roles. * * @param array $selected The roles that are selected. * @param string $name The name of the select. * @param string $id The ID of the select, defaults to the name. * * @return string */ public function get_roles_dropdown( $selected, $name, $id = '' ) { if ( empty( $id ) ) { $id = $name; } $user_roles = wp_roles()->roles; $dropdown = ''; return $dropdown; } /** * Display a notice to suggest installing WP Mail SMTP. * * @return void */ public function wp_mail_smtp_notice() { if ( function_exists( 'wp_mail_smtp' ) ) { return; } $dismissed_notices = get_option( 'wpcode_admin_notices', array() ); $slug = 'emailsmtp'; $smtp_url = add_query_arg( array( 'type' => 'term', 's' => 'wp mail smtp', 'tab' => 'search', ), admin_url( 'plugin-install.php' ) ); if ( ! isset( $dismissed_notices[ $slug ] ) || empty( $dismissed_notices[ $slug ]['dismissed'] ) ) { ?>', '' ); ?>
' . esc_html( $shortcode ) . get_wpcode_icon( 'copy' ) . '
';
break;
case 'code_type':
// Let's display the code type with a link to filter by code type.
$code_type = $snippet->get_code_type();
if ( 'trash' === $this->view ) {
$value = $code_type;
} else {
$url = add_query_arg(
array(
'filter_action' => 'Filter',
'type' => $code_type,
),
$this->admin_url( 'admin.php?page=wpcode' )
);
$value = sprintf( '%2$s', esc_url( $url ), esc_html( $code_type ) );
}
break;
case 'note':
$notes = $snippet->get_note();
// Simply apply content filters to properly format the HTML.
$value = wpautop( wp_kses_post( $notes ) );
break;
case 'priority':
$value = esc_html( $snippet->get_priority() );
break;
default:
$value = '';
}
return apply_filters( 'wpcode_code_snippets_table_column_value', $value, $snippet, $column_name );
}
/**
* Get the markup for the status toggle.
*
* @param bool $active If the snippet is active or not.
* @param int $snippet_id The id of the snippet.
*
* @return string
*/
public function get_status_toggle( $active, $snippet_id ) {
$markup = '';
$snippets_with_errors = wpcode()->error->get_snippets_with_errors();
// Let's check if the snippet threw an error.
if ( ! empty( $snippets_with_errors ) && in_array( $snippet_id, $snippets_with_errors, true ) ) {
$last_error = get_post_meta( $snippet_id, '_wpcode_last_error', true );
if ( ! empty( $last_error ) ) {
$type = 'error';
if ( isset( $last_error['wpc_type'] ) && 'deactivated' === $last_error['wpc_type'] ) {
$tooltip_text = sprintf(
// Translators: %1$s is the time since the snippet was deactivated, %2$s is the date and time of deactivation.
__( 'This snippet was automatically deactivated because of a fatal error at %2$s on %3$s (%1$s ago)', 'insert-headers-and-footers' ),
human_time_diff( $last_error['time'], time() ),
gmdate( 'H:i:s', $last_error['time'] ),
gmdate( 'Y-m-d', $last_error['time'] )
);
$type = 'deactivated';
} else {
$tooltip_text = esc_html__( 'This snippet threw an error, you can see more details when editing the snippet.', 'insert-headers-and-footers' );
}
$markup .= ' ';
}
}
return $markup;
}
/**
* Render the snippet name column with action links.
*
* @param WP_Post $snippet Snippet.
*
* @return string
*/
public function column_name( $snippet ) {
// Build the row action links and return the value.
return $this->get_column_name_title( $snippet ) . $this->get_column_name_row_actions( $snippet );
}
/**
* Get the snippet name HTML for the snippet name column.
*
* @param WP_Post $snippet Snippet post object.
*
* @return string
*/
protected function get_column_name_title( $snippet ) {
$title = ! empty( $snippet->post_title ) ? $snippet->post_title : $snippet->post_name;
$name = sprintf(
'%s',
esc_html( $title )
);
if ( 'trash' === $this->view ) {
return $name;
}
if ( current_user_can( 'edit_post', $snippet->ID ) ) {
$name = sprintf(
'%s',
esc_url(
add_query_arg(
'snippet_id',
$snippet->ID,
$this->admin_url( 'admin.php?page=wpcode-snippet-manager' )
)
),
esc_attr__( 'Edit This Snippet', 'insert-headers-and-footers' ),
esc_html( $title )
);
}
// Check if snippet is locked for editing.
$post_lock = wp_check_post_lock( $snippet );
if ( $post_lock ) {
$user = get_user_by( 'id', $post_lock );
$currently_editing = sprintf(
/* translators: %s: User display name */
esc_html__( '%s is currently editing', 'insert-headers-and-footers' ),
esc_html( $user->display_name )
);
$name = '' . $error_details . '
'
);
$messages[ $message ] .= ' ' . $error_message;
}
if ( $message > 2 && $message < 5 || 6 === $message ) {
$this->set_error_message( $messages[ $message ] );
} else {
$this->set_success_message( $messages[ $message ] );
}
if ( in_array( $message, array( 1, 2 ), true ) ) {
// The first time the user saves a snippet, if they did not activate it, highlight that and save a user meta to avoid the message from being displayed again.
add_action( 'wpcode_admin_notices', array( $this, 'maybe_show_saved_without_activation_notice' ), 5 );
}
}
/**
* The first time a snippet is saved without being activated, show a notice to the user.
*
* @return void
*/
public function maybe_show_saved_without_activation_notice() {
if ( ! isset( $this->snippet ) ) {
return;
}
$snippet = $this->snippet;
if ( ! $snippet->is_active() && ! get_user_meta( get_current_user_id(), 'wpcode_snippet_activate_notice_shown', true ) ) {
update_user_meta( get_current_user_id(), 'wpcode_snippet_activate_notice_shown', true );
?>
' . $description . '
'; } return $input; } /** * Get a simple textarea field. * * @param string $id The id of the input field. * @param string $value The value of the input. * @param string $description The description to display under the field. * * @return string */ public function get_input_textarea( $id, $value = '', $description = '' ) { ob_start(); echo '' . esc_html( $description ) . '
'; } return ob_get_clean(); } /** * Get the auto-insert value consistently. * * @return int */ private function get_auto_insert_number_value() { return isset( $this->snippet ) ? $this->snippet->get_auto_insert_number() : 1; } /** * Markup for the basic info metabox. * * @return void */ public function field_basic_info() { $priority = isset( $this->snippet ) ? $this->snippet->get_priority() : 10; $note = isset( $this->snippet ) ? $this->snippet->get_note() : ''; ob_start(); $this->metabox_row( __( 'Tag', 'insert-headers-and-footers' ), $this->get_input_tag_picker() ); $this->metabox_row( __( 'Priority', 'insert-headers-and-footers' ), $this->get_input_number( 'wpcode_priority', $priority ), 'wpcode_priority' ); $this->metabox_row( __( 'Note', 'insert-headers-and-footers' ), $this->get_input_textarea( 'wpcode_note', $note ), 'wpcode_note' ); if ( isset( $this->snippet ) && $this->snippet->is_generated() ) { $this->metabox_row( __( 'Generator', 'insert-headers-and-footers' ), $this->get_input_generator() ); } $this->metabox( __( 'Basic info', 'insert-headers-and-footers' ), ob_get_clean(), __( 'Tags: Use tags to make it easier to group similar snippets together.' . __( 'Using conditional logic you can limit the pages where you want the snippet to be auto-inserted.', 'insert-headers-and-footers' ) . '
'; $content .= ''; ob_start(); $this->metabox_row( __( 'Enable Logic', 'insert-headers-and-footers' ), $this->get_checkbox_toggle( $enable_logic, 'wpcode_conditional_logic_enable' ), 'wpcode_conditional_logic_enable' ); $this->metabox_row( __( 'Conditions', 'insert-headers-and-footers' ), $this->get_conditional_logic_input(), 'wpcode_contional_logic_conditions', '#wpcode_conditional_logic_enable', '1' ); $content .= ob_get_clean(); $this->metabox( __( 'Smart Conditional Logic', 'insert-headers-and-footers' ), $content, __( 'Enable logic to add rules and limit where your snippets are inserted automatically. Use multiple groups for different sets of rules.', 'insert-headers-and-footers' ) ); $this->get_conditional_logic_dropdown(); } /** * Get the tag picker markup. * * @return string */ public function get_input_tag_picker() { $tags = isset( $this->snippet ) ? $this->snippet->get_tags() : array(); $tags_string = isset( $this->snippet ) ? implode( ',', $this->snippet->get_tags() ) : ''; $markup = ''; $markup .= ''; return $markup; } /** * Get the link to the generator page for the current snippet. * * @return string */ public function get_input_generator() { $generator = $this->snippet->get_generator(); return sprintf( '%2$s', add_query_arg( array( 'generator' => $generator, 'page' => 'wpcode-generator', 'snippet' => $this->snippet->get_id(), ), admin_url( 'admin.php' ) ), esc_html__( 'Update Generated Snippet', 'insert-headers-and-footers' ) ); } /** * The hidden fields needed to identify the form submission. * * @return void */ public function hidden_fields() { if ( ! isset( $this->snippet_id ) ) { return; } ?> show_library ) { // Don't wrap with form when showing library. parent::output(); return; } ?> tag, %2$s is the closing
tag.
__( 'Use this field to define the attribute name for your shortcode and click Add Attribute. Attributes added here will be available to use as smart tags and as variables inside snippets. E.g. an attribute named "keyword" will be available in a PHP snippet as %1$s$keyword%2$s. %3$sLearn more%4$s.', 'insert-headers-and-footers' ),
'',
'
',
'',
''
),
false
);
$input .= '%s
%s
', esc_html__( 'Limit where you want this snippet to be loaded by device type. By default, snippets are loaded on all devices.', 'insert-headers-and-footers' ) ); $html .= ''; $html .= $this->device_type_picker(); $this->metabox( __( 'Device Type', 'insert-headers-and-footers' ), $html ); } /** * This method returns the markup for the device type radio input picker, the * three options available are Any device type, Desktop only and Mobile only. * By default, any device type is selected. * * @return string */ public function device_type_picker() { $html = '%s
', esc_html__( 'Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your snippet.', 'insert-headers-and-footers' ) ), array( 'text' => esc_html__( 'Upgrade to Pro and Unlock Revisions', 'insert-headers-and-footers' ), 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'snippet-editor', 'revisions', 'upgrade-to-pro' ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => wpcode_utm_url( 'https://wpcode.com/lite/', 'snippet-editor', 'revisions', 'features' ), ) ); } /** * Display a notice if the snippet loaded for editing triggered an error. * * @return void */ public function maybe_show_error_notice() { if ( ! isset( $this->snippet ) ) { return; } if ( $this->is_locked ) { ?>locked_by ) ); ?>
%s', esc_html__( 'Error message:', 'insert-headers-and-footers' ) ); ?>
error->get_error_message_short( $last_error['message'] ) ); ?>
', '', absint( $error_line ) ); ?>
' . esc_url( $last_error['url'] ) . '' ); ?>
', '', absint( $this->snippet->get_id() ) ); } else { esc_html_e( 'You can enable error logging to get more details about the error that caused this.', 'insert-headers-and-footers' ); } ?>
views[ $this->view ] ) ); ?>
', '' ); ?>
views = array( 'adstxt' => 'ads.txt', 'appadstxt' => 'app-ads.txt', 'serviceworkerjs' => 'service-worker.js', 'robotstxt' => 'robots.txt', ); } /** * Nothing to return by default. * * @return array */ public function get_value() { return array( 'enabled' => true, 'content' => '', ); } /** * Get the overlay for the file editor page. * * @return string */ public function get_pixel_overlay() { $text = '
' . esc_html__( 'Simplify your website management with the WPCode File Editor! Say goodbye to the hassle of manually editing files on your server.', 'insert-headers-and-footers' ) . '
'; $text .= sprintf( // translators: %1$s and %2$s are tags. '
' . esc_html__( 'With this powerful tool, you can easily customize crucial files like %1$sads.txt%2$s, %1$sapp-ads.txt%2$s, %1$srobots.txt%2$s, and %1$sservice-worker.js%2$s right from your WordPress admin.', 'insert-headers-and-footers' ) . '
', '', '' ); return self::get_upsell_box( __( 'File Editor is a PRO Feature', 'insert-headers-and-footers' ), $text, array( 'text' => esc_html__( 'Upgrade to WPCode PRO', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'file-editor', 'tab-' . $this->view, 'upgrade-to-pro' ) ), ), array( 'text' => esc_html__( 'Learn More about the File Editor', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/docs/file-editor/', 'file-editor', 'tab-' . $this->view, 'learn-more' ) ), ), array( esc_html__( 'No manual coding, no FTP', 'insert-headers-and-footers' ), esc_html__( 'Effortless integrations setup', 'insert-headers-and-footers' ), esc_html__( 'Reduce the number of plugins', 'insert-headers-and-footers' ), esc_html__( 'Prevent advertising fraud', 'insert-headers-and-footers' ), ) ); } } includes/admin/pages/trait-wpcode-my-library-markup.php 0000644 00000016415 15021200650 0017234 0 ustar 00 'Most Popular', 'admin' => 'Admin', 'archive' => 'Archive', 'attachments' => 'Attachments', 'comments' => 'Comments', 'disable' => 'Disable', 'login' => 'Login', 'rss-feeds' => 'RSS Feeds', 'search' => 'Search', ); $categories_parsed = array(); foreach ( $categories as $slug => $name ) { $categories_parsed[] = array( 'slug' => $slug, 'name' => $name, ); } return array( 'categories' => $categories_parsed, 'snippets' => array( array( 'library_id' => 0, 'title' => 'Add an Edit Post Link to Archives', 'code' => '', 'note' => 'Make it easier to edit posts when viewing archives. Or on single pages. If you...', 'categories' => array( 0 => 'archive', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Add Featured Images to RSS Feeds', 'code' => '', 'note' => 'Extend your site\'s RSS feeds by including featured images in the feed.', 'categories' => array( 0 => 'rss-feeds', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Add the Page Slug to Body Class', 'code' => '', 'note' => 'Add the page slug to the body class for better styling.', 'categories' => array( 0 => 'archive', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Allow SVG Files Upload', 'code' => '', 'note' => 'Add support for SVG files to be uploaded in WordPress media.', 'categories' => array( 0 => 'most-popular', 1 => 'attachments', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Automatically Link Featured Images to Posts', 'code' => '', 'note' => 'Wrap featured images in your theme in links to posts.', 'categories' => array( 0 => 'attachments', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Change "Howdy Admin" in Admin Bar', 'code' => '', 'note' => 'Customize the "Howdy" message in the admin bar.', 'categories' => array( 0 => 'admin', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Change Admin Panel Footer Text', 'code' => '', 'note' => 'Display custom text in the admin panel footer with this snippet.', 'categories' => array( 0 => 'admin', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Change Excerpt Length', 'code' => '', 'note' => 'Update the length of the Excerpts on your website using this snippet.', 'categories' => array( 0 => 'archive', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Change Read More Text for Excerpts', 'code' => '', 'note' => 'Customize the "Read More" text that shows up after excerpts.', 'categories' => array( 0 => 'archive', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Completely Disable Comments', 'code' => '', 'note' => 'Disable comments for all post types, in the admin and the frontend.', 'categories' => array( 0 => 'most-popular', 1 => 'comments', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Delay Posts in RSS Feeds', 'code' => '', 'note' => 'Add a delay before published posts show up in the RSS feeds.', 'categories' => array( 0 => 'rss-feeds', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Disable Attachment Pages', 'code' => '', 'note' => 'Hide the Attachment/Attachments pages on the frontend from all visitors.', 'categories' => array( 0 => 'most-popular', 1 => 'attachments', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Disable Automatic Updates', 'code' => '', 'note' => 'Use this snippet to completely disable automatic updates on your website.', 'categories' => array( 0 => 'most-popular', 1 => 'disable', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Disable Automatic Updates Emails', 'code' => '', 'note' => 'Stop getting emails about automatic updates on your WordPress site.', 'categories' => array( 0 => 'most-popular', 1 => 'disable', ), 'code_type' => 'php', ), array( 'library_id' => 0, 'title' => 'Disable Gutenberg Editor (use Classic Editor)', 'code' => '', 'note' => 'Switch back to the Classic Editor by disablling the Block Editor.', 'categories' => array( 0 => 'most-popular', 1 => 'admin', ), 'code_type' => 'php', ), ), ); } /** * Get placeholder library items in a blurred box. * * @return void */ public function blurred_placeholder_items() { $snippets = $this->get_placeholder_library_items(); echo '' . esc_html__( 'Upgrade to WPCode PRO today and save your snippets in your private library directly from the plugin and import them with 1-click on other sites.', 'insert-headers-and-footers' ) . '
', array( 'text' => esc_html__( 'Upgrade to PRO and Unlock "My Library"', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'add-snippet', 'my-library', 'upgrade-and-unlock' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'add-snippet', 'my-library', 'features' ) ), ), array( esc_html__( 'Save your snippets to your library', 'insert-headers-and-footers' ), esc_html__( '1-click import snippets from you library', 'insert-headers-and-footers' ), esc_html__( 'Deploy new snippets from your account', 'insert-headers-and-footers' ), esc_html__( 'Update snippets across all your sites', 'insert-headers-and-footers' ), esc_html__( 'Set up new websites faster', 'insert-headers-and-footers' ), esc_html__( 'Edit snippets in the WPCode Library', 'insert-headers-and-footers' ), ) ); } } includes/admin/pages/class-wpcode-admin-page-duplicator.php 0000644 00000010675 15021200650 0020002 0 ustar 00 page_title = 'Backups'; $this->menu_title = 'Backups'; parent::__construct(); } /** * Register hook on admin init just for this page. * * @return void */ public function page_hooks() { add_action( 'admin_init', array( $this, 'maybe_redirect_to_duplicator' ) ); } /** * Override to hide default header on this page. * * @return void */ public function output_header() { } /** * Redirect to the Duplicator page if the plugin is active. * * @return void */ public function maybe_redirect_to_duplicator() { if ( class_exists( 'Duplicator\Lite\Requirements' ) ) { wp_safe_redirect( admin_url( 'admin.php?page=duplicator' ) ); exit; } elseif ( class_exists( 'Duplicator\Pro\Requirements' ) ) { wp_safe_redirect( admin_url( 'admin.php?page=duplicator-pro' ) ); exit; } } /** * The page output. * * @return void */ public function output_content() { ?> page_title = __( 'Conversion Pixels', 'insert-headers-and-footers' ); parent::__construct(); } /** * The Conversion Pixels page output. * * @return void */ public function output_content() { if ( method_exists( $this, 'output_view_' . $this->view ) ) { echo '' . esc_html__( 'While you can always add pixels manually using code snippets, our Conversion Pixels addon helps you %1$ssave time%2$s while %1$sreducing errors%2$s. It lets you properly implement Facebook, Google, Pinterest, TikTok and Snapchat ads tracking with deep integrations for eCommerce events, interaction measurement, and more. This addon is available on WPCode Plus plan or higher.', 'insert-headers-and-footers' ) . '
', '', '' ); return self::get_upsell_box( esc_html__( 'Conversion Pixels Addon is a PRO Feature', 'insert-headers-and-footers' ), $text, array( 'text' => esc_html__( 'Upgrade to WPCode PRO', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'conversion-pixels', 'tab-' . $this->view, 'upgrade-to-pro' ) ), ), array(), array( esc_html__( 'Seamless integration with WooCommerce, Easy Digital Downloads and MemberPress', 'insert-headers-and-footers' ), esc_html__( 'Works with Facebook, Google Ads, Pinterest, TikTok and Snapchat', 'insert-headers-and-footers' ), esc_html__( 'No coding required', 'insert-headers-and-footers' ), esc_html__( '1-click setup for conversion tracking', 'insert-headers-and-footers' ), ) ); } /** * Setup page-specific views. * * @return void */ protected function setup_views() { $this->views = array( 'facebook' => __( 'Facebook', 'insert-headers-and-footers' ), 'google' => __( 'Google', 'insert-headers-and-footers' ), 'pinterest' => __( 'Pinterest', 'insert-headers-and-footers' ), 'tiktok' => __( 'TikTok', 'insert-headers-and-footers' ), 'snapchat' => __( 'Snapchat', 'insert-headers-and-footers' ), 'click_tracking' => __( 'Click Tracking', 'insert-headers-and-footers' ), ); } /** * For this page we output a menu. * * @return void */ public function output_header_bottom() { ?> metabox_row( __( 'Facebook Pixel ID', 'insert-headers-and-footers' ), $this->get_input_text( 'facebook_pixel_id', $this->get_option( 'facebook_pixel_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Facebook Pixel ID in the Facebook Ads Manager. %1$sRead our step by step directions%2$s. ', 'insert-headers-and-footers' ), '', '' ) ), 'facebook_pixel_id' ); $this->metabox_row( __( 'Conversions API Token', 'insert-headers-and-footers' ), $this->get_input_text( 'facebook_pixel_api_token', $this->get_option( 'facebook_pixel_api_token', '' ), __( 'The Conversions API token allows you to send API events that are more reliable and can improve audience targeting.', 'insert-headers-and-footers' ), true ), 'facebook_pixel_api_token' ); $this->metabox_row( __( 'Facebook Pixel Events', 'insert-headers-and-footers' ), $this->get_checkbox_inputs( array( array( 'label' => __( 'PageView Event', 'insert-headers-and-footers' ), 'name' => 'page_view', 'description' => __( 'Enable the PageView event to track and record page visits on all the pages of your website using the Facebook Pixel.', 'insert-headers-and-footers' ), 'ecommerce' => false, ), ), 'facebook_pixel_events' ) ); $this->metabox_row( __( 'eCommerce Events Tracking', 'insert-headers-and-footers' ), $this->get_ecommerce_events_input() . $this->get_checkbox_inputs( $this->get_fb_pixel_events_inputs(), 'facebook_pixel_events' ) ); wp_nonce_field( 'wpcode-save-facebook-pixel-data', 'wpcode-pixel-nonce' ); ?> metabox_row( __( 'Google Analytics ID', 'insert-headers-and-footers' ), $this->get_input_text( 'google_analytics_id', $this->get_option( 'google_analytics_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Google Analytics ID in the Google Analytics Admin panel. %1$sRead our step by step directions%2$s. ', 'insert-headers-and-footers' ), '', '' ) ), 'google_analytics_id' ); $this->metabox_row( __( 'Google Ads Tag ID', 'insert-headers-and-footers' ), $this->get_input_text( 'google_ads_id', $this->get_option( 'google_ads_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Google Ads Tag ID in the Google Ads Settings under Google Tag. %1$sRead our step by step directions%2$s. ', 'insert-headers-and-footers' ), '', '' ) ), 'google_ads_id' ); $this->metabox_row( __( 'Ads Conversion Label', 'insert-headers-and-footers' ), $this->get_input_text( 'google_ads_label', $this->get_option( 'google_ads_label', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'Add your Google Ads Conversion Label for tracking conversion events. %1$sLearn More%2$s.', 'insert-headers-and-footers' ), '', '' ) ), 'google_ads_label' ); $this->metabox_row( __( 'Google Events', 'insert-headers-and-footers' ), $this->get_checkbox_inputs( array( array( 'label' => __( 'PageView Event', 'insert-headers-and-footers' ), 'name' => 'page_view', 'description' => __( 'Enable PageView event on all pages.', 'insert-headers-and-footers' ), 'ecommerce' => false, ), ), 'google_pixel_events' ) ); $this->metabox_row( __( 'eCommerce Events Tracking', 'insert-headers-and-footers' ), $this->get_ecommerce_events_input() . $this->get_checkbox_inputs( $this->get_google_pixel_events_inputs(), 'google_pixel_events' ) ); wp_nonce_field( 'wpcode-save-google-pixel-data', 'wpcode-pixel-nonce' ); ?> metabox_row( __( 'Tag ID', 'insert-headers-and-footers' ), $this->get_input_text( 'pinterest_id', $this->get_option( 'pinterest_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Tag id in your Pinterest Business account. %1$sRead our step by step directions%2$s. ', 'insert-headers-and-footers' ), '', '' ) ), 'pinterest_id' ); $this->metabox_row( __( 'Ad Account ID', 'insert-headers-and-footers' ), $this->get_input_text( 'pinterest_ad_account_id', $this->get_option( 'pinterest_ad_account_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Ad Account ID in your Pinterest Business account. %1$sRead more%2$s. ', 'insert-headers-and-footers' ), '', '' ) ), 'pinterest_ad_account_id' ); $this->metabox_row( __( 'Conversion Access Token', 'insert-headers-and-footers' ), $this->get_input_text( 'pinterest_conversion_token', $this->get_option( 'pinterest_conversion_token', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Conversion Access Token under Ads > Conversions > Conversion access token. %1$sRead more%2$s. ', 'insert-headers-and-footers' ), '', '' ), true ), 'pinterest_conversion_token' ); $this->metabox_row( __( 'eCommerce Events Tracking', 'insert-headers-and-footers' ), $this->get_ecommerce_events_input() . $this->get_checkbox_inputs( $this->get_pinterest_pixel_events_inputs(), 'pinterest_pixel_events' ) ); wp_nonce_field( 'wpcode-save-pinterest-pixel-data', 'wpcode-pixel-nonce' ); ?> metabox_row( __( 'Pixel ID', 'insert-headers-and-footers' ), $this->get_input_text( 'tiktok_pixel_id', $this->get_option( 'tiktok_pixel_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Pixel id in your TikTok Business Account. %1$sRead our step by step directions%2$s.', 'insert-headers-and-footers' ), '', '' ) ), 'tiktok_pixel_id' ); $this->metabox_row( __( 'Events API Access Token', 'insert-headers-and-footers' ), $this->get_input_text( 'tiktok_access_token', $this->get_option( 'tiktok_access_token', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can generate an access token in the Pixel Settings under Access Token Generation. %1$sRead more%2$s', 'insert-headers-and-footers' ), '', '' ), true ), 'tiktok_access_token' ); $this->metabox_row( __( 'eCommerce Events Tracking', 'insert-headers-and-footers' ), $this->get_ecommerce_events_input() . $this->get_checkbox_inputs( $this->get_tiktok_pixel_events_inputs(), 'tiktok_pixel_events' ) ); wp_nonce_field( 'wpcode-save-tiktok-pixel-data', 'wpcode-pixel-nonce' ); ?> metabox_row( __( 'Snap Pixel ID', 'insert-headers-and-footers' ), $this->get_input_text( 'snapchat_pixel_id', $this->get_option( 'snapchat_pixel_id', '' ), sprintf( // translators: %1$s and %2$s are the opening and closing anchor tags. __( 'You can find your Snapchat Pixel ID in the Snapchat Ads Manager. %1$sRead our step by step directions%2$s. ', 'insert-headers-and-footers' ), '', '' ), true ), 'snapchat_pixel_id' ); $this->metabox_row( __( 'Conversions API Token', 'insert-headers-and-footers' ), $this->get_input_text( 'snapchat_pixel_api_token', $this->get_option( 'snapchat_pixel_api_token', '' ), __( 'The Conversions API token allows you to send API events that are more reliable and can improve audience targeting.', 'insert-headers-and-footers' ), true ), 'snapchat_pixel_api_token' ); $this->metabox_row( __( 'Snapchat Pixel Events', 'insert-headers-and-footers' ), $this->get_checkbox_inputs( array( array( 'label' => __( 'Pave View Event', 'insert-headers-and-footers' ), 'name' => 'page_view', 'description' => __( 'Enable the PAGE_VIEW event to track and record page visits on all the pages of your website using the Snapchat Pixel.', 'insert-headers-and-footers' ), 'ecommerce' => false, ), ), 'snapchat_pixel_events' ) ); $this->metabox_row( __( 'eCommerce Events Tracking', 'insert-headers-and-footers' ), $this->get_ecommerce_events_input() . $this->get_checkbox_inputs( $this->get_snap_pixel_events_inputs(), 'snapchat_pixel_events' ) ); wp_nonce_field( 'wpcode-save-snapchat-pixel-data', 'wpcode-pixel-nonce' ); ?> __( 'ViewContent Event', 'insert-headers-and-footers' ), 'name' => 'view_content', 'description' => __( 'Turn on the "ViewContent" event to track views of product pages on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'view-content', ), array( 'label' => __( 'AddtoCart Event', 'insert-headers-and-footers' ), 'name' => 'add_to_cart', 'description' => __( 'Turn on the "AddToCart" event to track when items are added to a shopping cart on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'add-to-cart', ), array( 'label' => __( 'InitiateCheckout Event', 'insert-headers-and-footers' ), 'name' => 'begin_checkout', 'description' => __( 'Turn on the "InitiateCheckout" event to track when a user reaches the checkout page on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'begin-checkout', ), array( 'label' => __( 'Purchase Event', 'insert-headers-and-footers' ), 'name' => 'purchase', 'description' => __( 'Turn on the "Purchase" event to track successful purchases on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'purchase', ), ); } /** * Events checkboxes for Google Analytics & Ads. * * @return array[] */ public function get_google_pixel_events_inputs() { return array( array( 'label' => __( 'View Item Event', 'insert-headers-and-footers' ), 'name' => 'view_item', 'description' => __( 'Send the View Item event to track views of product pages on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'view-content', ), array( 'label' => __( 'Add to Cart Event', 'insert-headers-and-footers' ), 'name' => 'add_to_cart', 'description' => __( 'Send the Add to Cart event when a product is added to the cart.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'add-to-cart', ), array( 'label' => __( 'Begin Checkout Event', 'insert-headers-and-footers' ), 'name' => 'begin_checkout', 'description' => __( 'Send the Begin Checkout event when the user sees the checkout page.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'begin-checkout', ), array( 'label' => __( 'Purchase Event', 'insert-headers-and-footers' ), 'name' => 'purchase', 'description' => __( 'Send the Purchase event when the user completes a purchase.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'purchase', ), array( 'label' => __( 'Conversion Event', 'insert-headers-and-footers' ), 'name' => 'conversion', 'description' => __( 'Send the conversion event with the Google Ads label set above on a successful purchase.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'conversion', ), ); } /** * Events checkboxes for Pinterest. * * @return array[] */ public function get_pinterest_pixel_events_inputs() { return array( array( 'label' => __( 'PageVisit Product Event', 'insert-headers-and-footers' ), 'name' => 'pagevisit_product', 'description' => __( 'Turn on the "PageVisit" event to track views of product pages on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'view-content ', ), array( 'label' => __( 'Add to Cart Event', 'insert-headers-and-footers' ), 'name' => 'add_to_cart', 'description' => __( 'Turn on the Add to Cart event to track when items are added to a shopping cart on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'add-to-cart', ), array( 'label' => __( 'Checkout PageVisit Event', 'insert-headers-and-footers' ), 'name' => 'begin_checkout', 'description' => __( 'Enable the Checkout PageVisit event to track when a user reaches the checkout page on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'begin-checkout', ), array( 'label' => __( 'Checkout Event', 'insert-headers-and-footers' ), 'name' => 'purchase', 'description' => __( 'Turn on the "Checkout" event to track successful purchases on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'purchase', ), ); } /** * Events checkboxes for TikTok. * * @return array[] */ public function get_tiktok_pixel_events_inputs() { return array( array( 'label' => __( 'ViewContent Product Event', 'insert-headers-and-footers' ), 'name' => 'view_content', 'description' => __( 'Turn on the "ViewContent" event to track views of product pages on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'view-content', ), array( 'label' => __( 'Add to Cart Event', 'insert-headers-and-footers' ), 'name' => 'add_to_cart', 'description' => __( 'Turn on the "AddToCart" event to track when items are added to a shopping cart on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'add-to-cart', ), array( 'label' => __( 'InitiateCheckout Event', 'insert-headers-and-footers' ), 'name' => 'begin_checkout', 'description' => __( 'Turn on the "InitiateCheckout" event to track when a user reaches the checkout page on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'begin-checkout', ), array( 'label' => __( 'PlaceAnOrder Event', 'insert-headers-and-footers' ), 'name' => 'purchase', 'description' => __( 'Turn on the "PlaceAnOrder" event to track successful purchases on your website.', 'insert-headers-and-footers' ), 'ecommerce' => true, 'css_class' => 'purchase', ), ); } /** * Get the markup for a list of checkboxes. * * @param array $inputs The details for the checkbox inputs. * @param string $name The name of the inputs. * @param string $pixel_options_key The key of the pixel options (defaults to $name above if not set). * * @return string */ public function get_checkbox_inputs( $inputs, $name, $pixel_options_key = '' ) { $markup = ''; if ( empty( $pixel_options_key ) ) { $pixel_options_key = $name; } $pixel_options = $this->get_option( $pixel_options_key, array() ); $ecommerce_vendors = $this->ecommerce_available(); foreach ( $inputs as $input ) { $row_class = isset( $input['css_class'] ) ? $input['css_class'] : ''; $input_name = $name . '[' . $input['name'] . ']'; $checked = ! empty( $pixel_options[ $input['name'] ] ); if ( $input['ecommerce'] && empty( $ecommerce_vendors ) ) { $row_class = ' wpcode-checkbox-row-disabled'; } $markup .= '' . __( 'Disabled, no eCommerce Platform Detected', 'insert-headers-and-footers' ) . '
'; } else { foreach ( $providers as $provider ) { // translators: %s is the name of the eCommerce provider. $markup .= '' . sprintf( __( '%s Tracking Enabled', 'insert-headers-and-footers' ), $provider ) . '
'; } } $markup .= ''; $markup .= sprintf( // translators: %s a html break. __( 'Advanced eCommerce tracking is available for WooCommerce, Easy Digital Downloads and MemberPress. %s These plugins are detected automatically and when available you can toggle individual events using the options below.', 'insert-headers-and-footers' ), '' ); $markup .= '
'; $markup .= '', '' ); ?>
library_auth->has_auth() && ! isset( $_GET['snippet'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended // We have a snippet hash so let's continue the snippet install process. $snippet_url = wpcode()->library_auth->library_url . '/snippet/' . $snippet_hash . '/?deploy=1'; ?> library_auth->has_auth() ) { // Let's make sure the site is authenticated with the library. ?>
' . esc_html__( 'Upgrade to WPCode PRO today and see the snippets you starred in the WPCode Library directly in the plugin.', 'insert-headers-and-footers' ) . '
', array( 'text' => esc_html__( 'Upgrade to PRO and Unlock "My Favorites"', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'library-page', 'my-favorites', 'upgrade-and-unlock' ) ), ), array( 'text' => esc_html__( 'Learn more about all the features', 'insert-headers-and-footers' ), 'url' => esc_url( wpcode_utm_url( 'https://wpcode.com/lite/', 'library-page', 'my-favorites', 'features' ) ), ), array( esc_html__( 'Load favorite snippets in the plugin', 'insert-headers-and-footers' ), esc_html__( 'Import snippets from the WPCode Library', 'insert-headers-and-footers' ), esc_html__( 'Save your snippets to the WPCode Library', 'insert-headers-and-footers' ), esc_html__( 'Set up new websites faster', 'insert-headers-and-footers' ), esc_html__( 'Easily implement features on multiple sites', 'insert-headers-and-footers' ), esc_html__( 'Edit snippets in the WPCode Library', 'insert-headers-and-footers' ), ) ); } /** * Get the data handler for this page. * * @return WPCode_Library */ public function get_data_handler() { if ( ! isset( $this->data_handler ) ) { $this->data_handler = wpcode()->library; } return $this->data_handler; } } includes/admin/pages/class-wpcode-admin-page.php 0000644 00000124473 15021200650 0015640 0 ustar 00 menu_title ) ) { $this->menu_title = $this->page_title; } $this->hooks(); } /** * Add hooks to register the page and output content. * * @return void */ public function hooks() { add_action( 'admin_menu', array( $this, 'add_page' ) ); $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended // Only load if we are actually on the desired page. if ( $this->page_slug !== $page ) { return; } if ( ! current_user_can( $this->capability ) ) { wp_die( esc_html__( 'You do not have permission to access this page.', 'insert-headers-and-footers' ) ); } remove_all_actions( 'admin_notices' ); remove_all_actions( 'all_admin_notices' ); add_action( 'wpcode_admin_page', array( $this, 'output' ) ); add_action( 'wpcode_admin_page', array( $this, 'output_footer' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'page_scripts' ) ); add_filter( 'admin_body_class', array( $this, 'page_specific_body_class' ) ); add_filter( 'wpcode_admin_js_data', array( $this, 'maybe_add_library_data' ) ); add_action( 'admin_init', array( $this, 'maybe_redirect_to_click' ) ); $this->setup_views(); $this->set_current_view(); $this->page_hooks(); } /** * Get the post type for this page. * * @return string */ public function get_post_type() { return wpcode_get_post_type(); } /** * Override in child class to define page-specific hooks that will run only * after checks have been passed. * * @return void */ public function page_hooks() { } /** * Add the submenu page. * * @return void */ public function add_page() { add_submenu_page( 'wpcode', $this->page_title, $this->menu_title, $this->capability, $this->page_slug, array( wpcode()->admin_page_loader, 'admin_menu_page', ) ); } /** * If the page has views, this is where you should assign them to $this->views. * * @return void */ protected function setup_views() { } /** * Set the current view from the query param also checking it's a registered view for this page. * * @return void */ protected function set_current_view() { // phpcs:disable WordPress.Security.NonceVerification.Recommended if ( ! isset( $_GET['view'] ) ) { return; } $view = sanitize_text_field( wp_unslash( $_GET['view'] ) ); // phpcs:enable WordPress.Security.NonceVerification.Recommended if ( array_key_exists( $view, $this->views ) ) { $this->view = $view; } } /** * Output the page content. * * @return void */ public function output() { $this->output_header(); ?>' . wp_kses_post( $description ) . '
'; } return $markup; } /** * Get an email field. * * @param string $id The id of the text field. * @param string $value The value of the text field. * @param string $description The description of the text field. * @param bool $wide Whether the text field should be wide. * * @return string */ public function get_input_email( $id, $value = '', $description = '', $wide = false ) { return $this->get_input_text( $id, $value, $description, $wide, 'email' ); } /** * Get an admin URL. * * @param string $path The path to append to the admin URL. * * @return string */ public function admin_url( $path ) { return admin_url( $path ); } } includes/admin/pages/class-wpcode-admin-page-search-replace.php 0000644 00000011004 15021200650 0020475 0 ustar 00 page_title = 'Search & Replace Everything'; $this->menu_title = 'Search & Replace'; parent::__construct(); } /** * Register hook on admin init just for this page. * * @return void */ public function page_hooks() { add_action( 'admin_init', array( $this, 'maybe_redirect_to_search_replace' ) ); } /** * Override to hide default header on this page. * * @return void */ public function output_header() { } /** * Redirect to the search replace page if the plugin is active. * * @return void */ public function maybe_redirect_to_search_replace() { if ( function_exists( 'wsrw_main' ) ) { wp_safe_redirect( admin_url( 'tools.php?page=wsrw-search-replace' ) ); exit; } } /** * The page output. * * @return void */ public function output_content() { ?> hooks(); } /** * Hooks. * */ public function hooks() { add_action( 'admin_notices', array( $this, 'display' ), 999000 ); // Hook for our specific pages where we hide all other admin notices. add_action( 'wpcode_admin_notices', array( $this, 'display' ), 10 ); add_action( 'wp_ajax_wpcode_notice_dismiss', array( $this, 'dismiss_ajax' ) ); // Display notices above the header. add_action( 'wpcode_admin_page', array( $this, 'display_top' ), 5 ); } /** * Enqueue assets. */ public function enqueues() { wp_enqueue_script( 'wpcode-admin-notices', WPCODE_PLUGIN_URL . 'build/notices.js', array( 'jquery' ), WPCODE_VERSION, true ); wp_localize_script( 'wpcode-admin-notices', 'wpcode_admin_notices', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wpcode-admin' ), ) ); } /** * Display the notices. */ public function display() { $dismissed_notices = get_user_meta( get_current_user_id(), 'wpcode_admin_notices', true ); $dismissed_notices = is_array( $dismissed_notices ) ? $dismissed_notices : array(); $dismissed_notices = array_merge( $dismissed_notices, (array) get_option( 'wpcode_admin_notices', array() ) ); foreach ( $this->notices as $slug => $notice ) { if ( isset( $dismissed_notices[ $slug ] ) && ! empty( $dismissed_notices[ $slug ]['dismissed'] ) ) { unset( $this->notices[ $slug ] ); } } $output = implode( '', $this->notices ); echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped // Enqueue script only when it's needed. if ( strpos( $output, 'is-dismissible' ) !== false ) { $this->enqueues(); } } /** * Display the notices at the top of the WPC pages. */ public function display_top() { $dismissed_notices = get_user_meta( get_current_user_id(), 'wpcode_admin_notices', true ); $dismissed_notices = is_array( $dismissed_notices ) ? $dismissed_notices : array(); $dismissed_notices = array_merge( $dismissed_notices, (array) get_option( 'wpcode_admin_notices', array() ) ); foreach ( $this->notices_top as $slug => $notice ) { if ( isset( $dismissed_notices[ $slug ] ) && ! empty( $dismissed_notices[ $slug ]['dismissed'] ) ) { unset( $this->notices_top[ $slug ] ); } } $output = implode( '', $this->notices_top ); if ( ! empty( $output ) ) { echo '' . wpcode()->error->get_last_error_message() . '
',
$active ? _x( 'activated', 'Snippet status change', 'insert-headers-and-footers' ) : _x( 'deactivated', 'Snippet status change', 'insert-headers-and-footers' )
);
// We failed to activate it, so it's an error.
wp_send_json_error(
array(
'message' => $error_message,
)
);
}
exit;
}
/**
* Filter snippets by type.
*
* @return void
*/
function wpcode_filter_snippets_by_type() {
check_ajax_referer( 'wpcode_admin' );
// If the current user can't edit snippets they should not be trying this.
if ( ! current_user_can( 'wpcode_edit_snippets' ) ) {
wp_send_json_error();
}
if ( ! isset( $_POST['snippet_type'] ) ) {
wp_send_json_error();
}
require_once WPCODE_PLUGIN_PATH . 'includes/admin/pages/class-wpcode-code-snippets-table.php';
$snippet_type = isset( $_POST['snippet_type'] ) ? sanitize_text_field( wp_unslash( $_POST['snippet_type'] ) ) : '';
$location = isset( $_POST['location'] ) ? sanitize_text_field( wp_unslash( $_POST['location'] ) ) : '';
$search_term = isset( $_POST['s'] ) ? sanitize_text_field( wp_unslash( $_POST['s'] ) ) : '';
$screen_id = 'toplevel_page_wpcode';
$current_screen = convert_to_screen( $screen_id );
set_current_screen( $screen_id );
$snippets_table = new WPCode_Code_Snippets_Table();
// Used screen object to set up table.
$snippets_table->screen = $current_screen;
$_GET['type'] = $snippet_type;
$_GET['location'] = $location;
$_GET['s'] = $search_term;
$snippets_table->prepare_items();
$count = $snippets_table->get_total_items();
// Output table HTML.
ob_start();
?>
search_box( __( 'Search Snippets', 'insert-headers-and-footers' ), 'wpcode_snippet_search' );
$snippets_table->views();
$snippets_table->display();
$table_html = ob_get_clean();
// Send success response.
wp_send_json_success(
array(
'html' => $table_html,
'count' => $count,
)
);
}
/**
* Ajax handler to search for terms through all the public taxonomies.
*
* @return void
*/
function wpcode_search_terms() {
check_ajax_referer( 'wpcode_admin' );
if ( ! current_user_can( 'wpcode_edit_snippets' ) ) {
wp_send_json_error();
}
$term = isset( $_GET['term'] ) ? sanitize_text_field( wp_unslash( $_GET['term'] ) ) : '';
$public_taxonomies = get_taxonomies(
array(
'public' => true,
)
);
$terms = get_terms(
array(
'search' => $term,
'taxonomy' => $public_taxonomies,
'hide_empty' => false,
)
);
$results = array();
foreach ( $terms as $term ) {
$results[] = array(
'id' => $term->term_id,
'text' => $term->name,
);
}
wp_send_json(
array(
'results' => $results,
)
);
}
/**
* Ajax handler for the generator.
*
* @return void
*/
function wpcode_generate_snippet() {
check_ajax_referer( 'wpcode_generate', 'nonce' );
if ( ! current_user_can( 'wpcode_edit_snippets' ) ) {
wp_send_json_error();
}
$generator_type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';
$generator = wpcode()->generator()->get_type( $generator_type );
if ( ! $generator ) {
wp_send_json_error();
}
$snippet_code = $generator->process_form_data( $_POST );
wp_send_json( $snippet_code );
}
/**
* Take the values from a generated snippet and save as a new snippet.
*
* @return void
*/
function wpcode_save_generated_snippet() {
check_ajax_referer( 'wpcode_generate', 'nonce' );
// If the current user can't edit snippets they should not be trying this.
if ( ! current_user_can( 'wpcode_edit_snippets' ) ) {
wp_send_json_error();
}
$generator_type = isset( $_POST['type'] ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';
$generator = wpcode()->generator()->get_type( $generator_type );
// If a snippet id is passed, let's attempt to update it.
$snippet_id = isset( $_POST['snippet_id'] ) ? absint( $_POST['snippet_id'] ) : '';
if ( ! $generator ) {
wp_send_json_error();
}
$snippet_code = $generator->process_form_data( $_POST );
$snippet_data = array(
// Translators: this an auto-generated title for when a snippet is saved from the generator.
'title' => sprintf( __( 'Generated Snippet %s', 'insert-headers-and-footers' ), $generator->get_title() ),
'code' => $snippet_code,
'code_type' => $generator->get_code_type(),
'tags' => $generator->get_tags(),
'location' => $generator->get_location(),
'generator' => $generator->get_name(),
'generator_data' => $generator->get_generator_data(),
'auto_insert' => $generator->get_auto_insert(),
);
// If a snippet id is passed, let's attempt to update the snippet.
if ( ! empty( $snippet_id ) ) {
$snippet = new WPCode_Snippet( $snippet_id );
// Let's make sure this is an id for a snippet.
if ( null !== $snippet->get_post_data() ) {
$snippet_data['id'] = $snippet_id;
$snippet_data['active'] = false;
// Don't change the title of an existing snippet.
unset( $snippet_data['title'] );
}
}
$new_snippet = new WPCode_Snippet( $snippet_data );
$new_snippet_id = $new_snippet->save();
wp_send_json_success(
array(
'url' => add_query_arg(
array(
'page' => 'wpcode-snippet-manager',
'snippet_id' => $new_snippet_id,
),
admin_url( 'admin.php' )
),
)
);
}
/**
* Ajax handler to verify that the current web host can successfully
* make outbound SSL connections.
*
* @return void
*/
function wpcode_verify_ssl() {
if ( ! current_user_can( 'wpcode_edit_snippets' ) ) {
wp_send_json_error();
}
$response = wp_remote_post( 'https://wpcode.com' );
if ( 200 === wp_remote_retrieve_response_code( $response ) ) {
wp_send_json_success(
array(
'msg' => esc_html__( 'Success! Your server can make SSL connections.', 'insert-headers-and-footers' ),
)
);
}
wp_send_json_error(
array(
'msg' => esc_html__( 'There was an error and the connection failed. Please contact your web host with the technical details below.', 'insert-headers-and-footers' ),
'debug' => '' . print_r( map_deep( $response, 'wp_strip_all_tags' ), true ) . '', // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r ) ); } /** * Use heartbeat to update lock status when editing a snippet. * * @param array $response The Heartbeat response. * @param array $data The $_POST data sent with the Heartbeat. * @param string $screen_id The screen ID. * * @return array */ function wpcode_heartbeat_data( $response, $data, $screen_id ) { if ( 'code-snippets_page_wpcode-snippet-manager' === $screen_id && isset( $data['wpcode_lock'] ) ) { // Update the post lock while they are still editing. wp_set_post_lock( absint( $data['wpcode_lock'] ) ); } return $response; } /** * AJAX handler to save the editor height. * * @return void */ function wpcode_save_editor_height() { check_ajax_referer( 'wpcode_admin' ); // If the current user can't edit snippets they should not be trying this. if ( ! current_user_can( 'wpcode_edit_snippets' ) ) { wp_send_json_error(); } $height = isset( $_POST['height'] ) ? absint( $_POST['height'] ) : false; if ( false !== $height ) { wpcode()->settings->update_option( 'editor_height', $height ); wp_send_json_success(); } wp_send_json_error(); } /** * Get the list of locations where a shortcode is used. * * @return void */ function wpcode_get_shortcode_locations() { check_ajax_referer( 'wpcode_admin', '_wpnonce' ); if ( ! current_user_can( 'wpcode_edit_snippets' ) ) { wp_send_json_error(); } if ( empty( $_POST['snippet_id'] ) ) { wp_send_json_error( 'No snippet ID provided' ); } $snippet_id = absint( $_POST['snippet_id'] ); $snippet = wpcode_get_snippet( $snippet_id ); $page = isset( $_POST['page'] ) ? absint( $_POST['page'] ) : 1; $per_page = 100; $post_types = array_merge( get_post_types( array( 'public' => true ) ), array( 'wp_template', 'wp_template_part', 'wpcode', ) ); // Add post types to params. $params = $post_types; global $wpdb; $search_terms = array(); $search_terms[] = '[wpcode'; if ( $snippet->get_custom_shortcode() ) { $search_terms[] = '[' . $snippet->get_custom_shortcode(); } $like_clauses = array(); foreach ( $search_terms as $term ) { $like_clauses[] = 'post_content LIKE %s'; $params[] = '%' . $wpdb->esc_like( $term ) . '%'; } $where_like = implode( ' OR ', $like_clauses ); $offset = ( $page - 1 ) * $per_page; $post_type_placeholders = implode( ', ', array_fill( 0, count( $post_types ), '%s' ) ); $params[] = $per_page; $params[] = $offset; $candidate_ids = $wpdb->get_col( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber "SELECT ID FROM {$wpdb->posts} WHERE post_type IN ($post_type_placeholders) AND post_status != 'trash' AND ($where_like) LIMIT %d OFFSET %d", $params ) ); $candidate_ids = array_unique( $candidate_ids ); $matching_posts = array(); if ( ! empty( $candidate_ids ) ) { $candidate_posts = get_posts( array( 'post_type' => array_values( $post_types ), 'post_status' => 'any', 'posts_per_page' => - 1, 'include' => $candidate_ids, ) ); foreach ( $candidate_posts as $post ) { $content = $post->post_content; if ( has_shortcode( $content, 'wpcode' ) && preg_match( '/\[wpcode[^\]]*id\s*=\s*["\']\s*' . preg_quote( $snippet_id, '/' ) . '\s*["\'][^\]]*\]/', $content ) ) { $matching_posts[] = $post; continue; } if ( $snippet->get_custom_shortcode() && has_shortcode( $content, $snippet->get_custom_shortcode() ) && preg_match( '/\[' . preg_quote( $snippet->get_custom_shortcode(), '/' ) . '[^\]]*\]/', $content ) ) { $matching_posts[] = $post; } } } if ( empty( $matching_posts ) ) { if ( 1 === $page ) { $html = '
tag, %2$s is the closing
tag.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:1920
msgid "Use this field to define the attribute name for your shortcode and click Add Attribute. Attributes added here will be available to use as smart tags and as variables inside snippets. E.g. an attribute named \"keyword\" will be available in a PHP snippet as %1$s$keyword%2$s. %3$sLearn more%4$s."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:1990
msgid "Schedule snippet"
msgstr ""
#. Translators: Link to the documentation article for files as snippets. %1$s is the opening anchor tag, %2$s is the closing anchor tag.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2013
msgid "If enabled, this snippet will be loaded as a physical file instead of being inserted in the source of the page. %1$sLearn more%2$s."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2025
msgid "Compress code output by removing spaces and comments."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2035
msgid "Load as file"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2057
msgid "Compress Output"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2086
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2087
msgid "Start Date"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2088
msgid "Clear start date"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2095
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2096
msgid "End Date"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2097
msgid "Clear end date"
msgstr ""
#. Translators: %1$s and %2$s are HTML tags for a link to the documentation article.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2106
msgid "Looking for more scheduling options? %1$sClick here%2$s to read more about all the available options."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2180
msgid "Find Where This Shortcode Is Used"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2184
msgid "Click to search for any posts or pages where this shortcode is being used."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2194
msgid "Locations Used"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2210
msgid "As you make changes to your snippet and save, you will get a list of previous versions with all the changes made in each revision. You can compare revisions to the current version or see changes as they have been saved by going through each revision. Any of the revisions can then be restored as needed."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2217
msgid "Easily switch back to a previous version of your snippet."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2229
msgid "Limit where you want this snippet to be loaded by device type. By default, snippets are loaded on all devices."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2235
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:48
msgid "Device Type"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2249
msgid "Any device type"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2250
msgid "Desktop only"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2251
msgid "Mobile only"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2303
msgid "Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your snippet."
msgstr ""
#. Translators: The placeholder gets replaced with the display name of the user currently editing the snippet.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2331
msgid "Notice: %1$s is also editing this snippet. Please be aware that your changes could be overwritten."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2345
msgid "View Error Logs"
msgstr ""
#. Translators: The placeholder gets replaced with the time passed since the snippet was deactivated.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2370
msgid "This snippet was automatically deactivated due to an error at %1$s on %2$s (%3$s ago)."
msgstr ""
#. Translators: The placeholder gets replaced with the time passed since the snippet was deactivated.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2382
msgid "This snippet first threw an error at %1$s on %2$s (%3$s ago)."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2393
#: includes/class-wpcode-snippet-execute.php:615
msgid "Error message:"
msgstr ""
#. Translators: The placeholders make the text bold and add the line number.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2402
msgid "The error occurred on %1$sline %3$d%2$s of this snippet's code (highlighted below)."
msgstr ""
#. Translators: The placeholder is replaced with the URL where the error happened.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2416
msgid "The error was triggered at the following URL: %1$s"
msgstr ""
#. Translators: The placeholders are for the link to the error logs.
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2427
msgid "You can %1$sview the error log%2$s to get more details about the error that caused this. The error will also be in a snippet-specific log whose name starts with snippet-%3$d (the id of this snippet)."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2433
msgid "You can enable error logging to get more details about the error that caused this."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2438
msgid "This message will disappear when the snippet is updated."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-snippet-manager.php:2488
msgid "Use AI to improve your snippet by describing the changes you want"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:59
msgid "Tools"
msgstr ""
#. Translators: Adds a link to the snippets list in the admin.
#: includes/admin/pages/class-wpcode-admin-page-tools.php:94
msgid "Import was successfully finished. You can go and check %1$syour snippets%2$s."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:140
msgid "WPCode Snippet Import"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:141
msgid "Select a WPCode export file"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:147
msgid "No file chosen"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:151
msgid "Choose a file…"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:160
#: includes/admin/pages/class-wpcode-admin-page-tools.php:193
#: includes/admin/pages/class-wpcode-admin-page-tools.php:315
#: includes/admin/pages/class-wpcode-admin-page-tools.php:491
msgid "Import"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:166
msgid "Import from Other Code Plugins"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:167
msgid "WPCode makes it easy for you to switch by allowing you import your third-party snippet plugins with a single click."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:170
msgid "Select previous Code plugin"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:176
msgid "Not Installed"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:178
msgid "Not Active"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:208
msgid "Export Code Snippets"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:212
#: includes/admin/pages/class-wpcode-code-snippets-table.php:712
#: includes/generator/class-wpcode-generator-post-status.php:111
msgid "Status"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:217
msgid "Code type"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:222
#: includes/admin/pages/class-wpcode-code-snippets-table.php:705
msgid "Tags"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:229
msgid "Export Snippets"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:243
msgid "System Information"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:248
msgid "Test SSL Connections"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:249
msgid "Click the button below to verify your web server can perform SSL connections successfully."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:251
msgid "Test Connection"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:274
msgid "Snippets import"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:278
msgid "Select the Snippets you would like to import."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:282
#: includes/admin/pages/class-wpcode-admin-page.php:1024
msgid "Available Snippets"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:287
#: includes/admin/pages/class-wpcode-code-snippets-table.php:512
msgid "No snippets found."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:301
msgid "Select All"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:306
msgid "Snippets to Import"
msgstr ""
#. Translators: These add markup to display which snippet out of the total from the provider name.
#: includes/admin/pages/class-wpcode-admin-page-tools.php:327
msgid "Importing %1$s of %2$s snippets from %3$s."
msgstr ""
#. Translators: this adds the total snippets count that have been completed.
#: includes/admin/pages/class-wpcode-admin-page-tools.php:345
msgid "Congrats, the import process has finished! We have successfully imported %s snippets. You can review the results below."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:368
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1073
msgid "All"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:402
msgid "No snippets available to export."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:427
msgid "No tags available."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:492
msgid "Export"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:493
msgid "System Info"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:494
msgid "Importer"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:495
#: includes/class-wpcode-admin-bar-info.php:422
msgid "Logs"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:606
msgid "Please upload a valid .json snippets export file."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:607
#: includes/admin/pages/class-wpcode-admin-page-tools.php:620
msgid "Error"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:619
msgid "Snippets data cannot be imported."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:680
#: includes/admin/pages/class-wpcode-code-snippets-table.php:407
msgid "Edit"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:696
msgid "Testing"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:968
msgid "You do not have sufficient permissions to view logs."
msgstr ""
#. translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
#: includes/admin/pages/class-wpcode-admin-page-tools.php:979
msgid "No logs found. You can enable logging from the %1$ssettings panel%2$s."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1017
msgid "Delete log"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1027
msgid "View"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1035
msgid "Log is empty."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1055
msgid "Link expired. Please refresh the page and retry."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1059
msgid "You do not have sufficient permissions to delete logs."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page-tools.php:1078
msgid "Are you sure you want to delete this log?"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:119
msgid "You do not have permission to access this page."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:257
msgid "Search docs"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:261
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1017
msgid "Clear"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:268
msgid "No docs found"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:283
msgid "View Documentation"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:284
msgid "Browse documentation, reference material, and tutorials for WPCode."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:285
msgid "View All Documentation"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:289
msgid "Get Support"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:290
msgid "Submit a ticket and our world class support team will be in touch soon."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:291
msgid "Submit a Support Ticket"
msgstr ""
#. Translators: Placeholder for the number of active notifications.
#: includes/admin/pages/class-wpcode-admin-page.php:303
msgid "New Notifications (%s)"
msgstr ""
#. Translators: Placeholder for the number of dismissed notifications.
#: includes/admin/pages/class-wpcode-admin-page.php:314
msgid "Notifications (%s)"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:321
msgid "Dismissed Notifications"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:324
msgid "Active Notifications"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:347
msgid "Dismiss all"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:389
msgid "Dismiss"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:438
msgid "Testing Mode"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:451
msgid "Help"
msgstr ""
#. translators: %s is the title of the metabox.
#: includes/admin/pages/class-wpcode-admin-page.php:607
msgid "Collapse Metabox %s"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:726
msgid "Use snippet"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:739
msgid "Edit snippet"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:740
msgid "Used"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:753
msgid "Preview"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:763
msgid "Connect to library to unlock (Free)"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:947
msgid "We encountered a problem loading the Snippet Library items, please try again later."
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:1116
msgid "Preview Snippet"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:1126
msgid "Edit in Library"
msgstr ""
#. translators: %d - snippets count.
#: includes/admin/pages/class-wpcode-admin-page.php:1291
msgid "Get Access to Our Library of %d FREE Snippets"
msgstr ""
#: includes/admin/pages/class-wpcode-admin-page.php:1296
msgid "Connect your website with WPCode Library and get instant access to FREE code snippets written by our experts. Snippets can be installed with just 1-click from inside the plugin and come automatically-configured to save you time."
msgstr ""
#. Translators: This is the format for displaying the date in the admin list, [date] at [time].
#: includes/admin/pages/class-wpcode-code-snippets-table.php:145
#: includes/admin/pages/class-wpcode-code-snippets-table.php:154
msgid "%1$s at %2$s"
msgstr ""
#. Translators: The tag by which to filter the list of snippets in the admin.
#: includes/admin/pages/class-wpcode-code-snippets-table.php:187
msgid "Filter snippets by tag: %s"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:254
msgid "Toggle Snippet Status"
msgstr ""
#. Translators: %1$s is the time since the snippet was deactivated, %2$s is the date and time of deactivation.
#: includes/admin/pages/class-wpcode-code-snippets-table.php:266
msgid "This snippet was automatically deactivated because of a fatal error at %2$s on %3$s (%1$s ago)"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:274
msgid "This snippet threw an error, you can see more details when editing the snippet."
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:325
#: includes/admin/pages/class-wpcode-code-snippets-table.php:406
msgid "Edit This Snippet"
msgstr ""
#. translators: %s: User display name
#: includes/admin/pages/class-wpcode-code-snippets-table.php:337
msgid "%s is currently editing"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:379
msgid "Restore this snippet"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:380
#: includes/admin/pages/class-wpcode-code-snippets-table.php:463
msgid "Restore"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:396
msgid "Delete this snippet permanently"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:397
#: includes/admin/pages/class-wpcode-code-snippets-table.php:464
msgid "Delete Permanently"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:426
msgid "Move this snippet to trash"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:427
#: includes/admin/pages/class-wpcode-code-snippets-table.php:468
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1082
msgid "Trash"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:446
msgid "Duplicate this snippet"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:447
msgid "Duplicate"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:470
msgid "Deactivate"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:699
#: includes/generator/class-wpcode-generator-query.php:298
msgid "ID"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:701
#: includes/conditional-logic/class-wpcode-conditional-page.php:152
#: includes/generator/class-wpcode-generator-post-type.php:378
#: includes/generator/class-wpcode-generator-query.php:225
#: includes/generator/class-wpcode-generator-query.php:299
msgid "Author"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:964
msgid "of"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:966
msgid "Current Page"
msgstr ""
#. Translators: %s: the number of items.
#: includes/admin/pages/class-wpcode-code-snippets-table.php:995
msgid "%s item"
msgid_plural "%s items"
msgstr[0] ""
msgstr[1] ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1013
#: includes/generator/class-wpcode-generator-hooks.php:1337
msgid "Filter"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1049
msgid "Filter by location"
msgstr ""
#: includes/admin/pages/class-wpcode-code-snippets-table.php:1051
msgid "All locations"
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:230
msgid "My Library is a PRO Feature"
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:231
msgid "Upgrade to WPCode PRO today and save your snippets in your private library directly from the plugin and import them with 1-click on other sites."
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:233
msgid "Upgrade to PRO and Unlock \"My Library\""
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:241
msgid "Save your snippets to your library"
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:242
msgid "1-click import snippets from you library"
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:243
msgid "Deploy new snippets from your account"
msgstr ""
#: includes/admin/pages/trait-wpcode-my-library-markup.php:244
msgid "Update snippets across all your sites"
msgstr ""
#: includes/admin/pages/trait-wpcode-revisions-display.php:96
#: includes/generator/class-wpcode-generator-query.php:514
msgid "Compare"
msgstr ""
#. Translators: time since the revision has been updated.
#: includes/admin/pages/trait-wpcode-revisions-display.php:106
msgid "Updated %s ago"
msgstr ""
#. Translators: The placeholder gets replaced with the extra number of revisions available.
#: includes/admin/pages/trait-wpcode-revisions-display.php:129
msgid "%d Other Revisions"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-admin.php:42
msgid "Admin Area"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-admin.php:53
msgid "Admin header"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-admin.php:54
msgid "Insert snippet in the wp-admin header area."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-admin.php:57
msgid "Admin footer"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-admin.php:58
msgid "Insert snippet in the wp-admin footer."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:50
msgid "Categories, Archives, Tags, Taxonomies"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:61
msgid "Insert Before Excerpt"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:62
msgid "Insert snippet above post summary."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:65
msgid "Insert After Excerpt"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:66
msgid "Insert snippet below post summary."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:69
msgid "Between Posts"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:70
msgid "Insert snippet between multiple posts."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:73
msgid "Before Post"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:74
#: includes/auto-insert/class-wpcode-auto-insert-single.php:72
msgid "Insert snippet at the beginning of a post."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:77
msgid "After Post"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-archive.php:78
#: includes/auto-insert/class-wpcode-auto-insert-single.php:76
msgid "Insert snippet at the end of a post."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:59
msgid "PHP Snippets Only"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:70
msgid "Run Everywhere"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:71
msgid "Snippet gets executed everywhere on your website."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:74
msgid "Frontend Only"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:75
msgid "Snippet gets executed only in the frontend of the website."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:78
msgid "Admin Only"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:79
msgid "The snippet only gets executed in the wp-admin area."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:82
msgid "Frontend Conditional Logic"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:83
msgid "Ideal for running the snippet later with conditional logic rules in the frontend."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:86
msgid "On Demand"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-everywhere.php:87
msgid "Execute this snippet on demand or programmatically just when you need it."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:60
msgid "Page, Post, Custom Post Type"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:71
msgid "Insert Before Post"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:75
msgid "Insert After Post"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:79
msgid "Insert Before Content"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:80
msgid "Insert snippet at the beginning of the post content."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:83
msgid "Insert After Content"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:84
msgid "Insert snippet at the end of the post content."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:87
msgid "Insert Before Paragraph"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:88
msgid "Insert snippet before paragraph # of the post content."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:91
msgid "Insert After Paragraph"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-single.php:92
msgid "Insert snippet after paragraph # of the post content."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:49
msgid "Site Wide (Frontend)"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:60
msgid "Site Wide Header"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:61
msgid "Insert snippet between the head tags of your website on all pages."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:64
msgid "Site Wide Body"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:65
msgid "Insert the snippet just after the opening body tag."
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:68
msgid "Site Wide Footer"
msgstr ""
#: includes/auto-insert/class-wpcode-auto-insert-site-wide.php:69
msgid "Insert the snippet in the footer just before the closing body tag."
msgstr ""
#: includes/capabilities.php:51
msgid "Edit Text/Blocks Snippets"
msgstr ""
#: includes/capabilities.php:52
msgid "This enables users to edit just text & blocks snippets, no HTML code is allowed."
msgstr ""
#: includes/capabilities.php:55
msgid "Edit HTML, JavaScript & CSS Snippets"
msgstr ""
#: includes/capabilities.php:56
msgid "This enables users to add and manage HTML, JavaScript & CSS snippets but also Text & Blocks snippets."
msgstr ""
#: includes/capabilities.php:59
msgid "Edit PHP Snippets"
msgstr ""
#: includes/capabilities.php:60
msgid "This enables users to add and manage PHP snippets and all the other types of snippets."
msgstr ""
#: includes/capabilities.php:63
msgid "Manage Conversion Pixels Settings"
msgstr ""
#: includes/capabilities.php:64
msgid "This enables users to manage the conversion pixels settings."
msgstr ""
#: includes/capabilities.php:67
msgid "Use the File Editor"
msgstr ""
#: includes/capabilities.php:68
msgid "This enables users to use the file editor."
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:156
msgid "Snippets With Errors"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:175
msgid "Loaded on this page"
msgstr ""
#. translators: %d is the total number of global scripts.
#: includes/class-wpcode-admin-bar-info.php:196
msgid "Global Scripts (%d)"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:286
msgid "Gutenberg Block"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:348
msgid "Global Header"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:353
msgid "Global Body"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:357
msgid "Global Footer"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:360
msgid "Disabled via Page Scripts"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:396
msgid "+ Add Snippet"
msgstr ""
#: includes/class-wpcode-admin-bar-info.php:442
msgid "Help Docs"
msgstr ""
#: includes/class-wpcode-auto-insert.php:53
msgid "Global"
msgstr ""
#: includes/class-wpcode-auto-insert.php:54
msgid "Page-Specific"
msgstr ""
#: includes/class-wpcode-generator.php:94
msgid "Admin"
msgstr ""
#: includes/class-wpcode-generator.php:95
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:59
msgid "Content"
msgstr ""
#: includes/class-wpcode-generator.php:96
msgid "Core"
msgstr ""
#: includes/class-wpcode-generator.php:97
msgid "Design"
msgstr ""
#: includes/class-wpcode-generator.php:98
#: includes/generator/class-wpcode-generator-post-type.php:539
msgid "Query"
msgstr ""
#: includes/class-wpcode-install.php:151
msgid "Snippet was deactivated due to an error."
msgstr ""
#: includes/class-wpcode-install.php:218
msgid "Display a message after the 1st paragraph of posts"
msgstr ""
#: includes/class-wpcode-install.php:230
msgid "Completely Disable Comments"
msgstr ""
#: includes/class-wpcode-library-auth.php:61
msgid "Your WordPress Site"
msgstr ""
#: includes/class-wpcode-library-auth.php:101
#: includes/class-wpcode-library-auth.php:171
msgid "You do not have permissions to connect WPCode to the library."
msgstr ""
#: includes/class-wpcode-library-auth.php:131
msgid "Authentication successfully completed"
msgstr ""
#: includes/class-wpcode-library-auth.php:132
msgid "Reloading page, please wait."
msgstr ""
#: includes/class-wpcode-smart-tags.php:43
msgid "Content ID"
msgstr ""
#: includes/class-wpcode-smart-tags.php:47
msgid "Content title"
msgstr ""
#: includes/class-wpcode-smart-tags.php:51
msgid "Content Categories"
msgstr ""
#: includes/class-wpcode-smart-tags.php:55
msgid "User's email"
msgstr ""
#: includes/class-wpcode-smart-tags.php:59
msgid "User's first name"
msgstr ""
#: includes/class-wpcode-smart-tags.php:63
msgid "User's last name"
msgstr ""
#: includes/class-wpcode-smart-tags.php:67
msgid "Custom Field (meta)"
msgstr ""
#: includes/class-wpcode-smart-tags.php:72
msgid "Author ID"
msgstr ""
#: includes/class-wpcode-smart-tags.php:76
msgid "Author Name"
msgstr ""
#: includes/class-wpcode-smart-tags.php:80
msgid "Author URL"
msgstr ""
#: includes/class-wpcode-smart-tags.php:84
msgid "Login URL"
msgstr ""
#: includes/class-wpcode-smart-tags.php:88
msgid "Logout URL"
msgstr ""
#: includes/class-wpcode-smart-tags.php:92
msgid "Permalink"
msgstr ""
#: includes/class-wpcode-smart-tags.php:99
msgid "Order number"
msgstr ""
#: includes/class-wpcode-smart-tags.php:103
msgid "Order subtotal"
msgstr ""
#: includes/class-wpcode-smart-tags.php:107
msgid "Order total"
msgstr ""
#: includes/class-wpcode-smart-tags.php:193
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:202
msgid "Show Smart Tags"
msgstr ""
#: includes/class-wpcode-smart-tags.php:196
msgid "Hide Smart Tags"
msgstr ""
#: includes/class-wpcode-smart-tags.php:227
msgid "Learn more about Smart Tags"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:131
msgid "HTML Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:132
msgid "Easily insert scripts from other sites or build custom elements using HTML."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:138
msgid "Text Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:139
msgid "Create reusable text snippets that you can visually format in a familiar editor."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:144
msgid "Blocks Snippet (PRO)"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:146
msgid "Use the Block Editor to create components that you can insert anywhere in your site."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:151
msgid "CSS Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:152
msgid "Write CSS styles directly in WPCode and easily customize how your website looks."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:157
msgid "SCSS Snippet (PRO)"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:159
msgid "Write SCSS styles directly in WPCode and easily customize how your website looks."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:164
msgid "JavaScript Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:165
msgid "Add custom JavaScript code to your site to add interactivity or integrate with other services."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:170
msgid "PHP Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:171
msgid "Extend or add functionality using PHP code with full control on where it's executed"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:176
msgid "Universal Snippet"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:177
msgid "Start writing HTML and add PHP code like you would in a .php file with Universal snippets."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:565
msgid "Snippet has not been activated due to an error."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:569
msgid "Please click the back button in the browser to update the snippet."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:572
msgid "WPCode has detected an error in one of the snippets which has now been automatically deactivated."
msgstr ""
#: includes/class-wpcode-snippet-execute.php:586
msgid "View Snippets With Errors"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:600
msgid "View error logs"
msgstr ""
#: includes/class-wpcode-snippet-execute.php:609
msgid "Enable error logging"
msgstr ""
#: includes/class-wpcode-snippet.php:707
msgid "Untitled Snippet"
msgstr ""
#. translators: %s: Snippet title and ID used in the error log for clarity.
#: includes/class-wpcode-snippet.php:756
msgid "Snippet %s was automatically deactivated due to a fatal error."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:37
msgid "Page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:48
msgid "Type of page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:49
msgid "Choose a WordPress-specific type of page for your rule."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:53
msgid "Homepage"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:57
msgid "Archive"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:61
msgid "Single post/page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:65
msgid "Search page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:69
msgid "404 page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:73
msgid "Author page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:77
msgid "Blog home"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:84
#: includes/generator/class-wpcode-generator-query.php:204
msgid "Post type"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:85
msgid "Target by post type: posts, pages or custom post types."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:91
msgid "Referrer"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:92
msgid "Use the page referrer/last visited page url as a condition."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:97
msgid "Taxonomy page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:98
msgid "Load only on pages for a specific category/taxonomy."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:104
msgid "Taxonomy term"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:105
msgid "Choose category/taxonomy terms to target for single or archive pages."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:113
msgid "Page URL"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:114
msgid "Use the page URL to limit where this snippet is loaded."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:119
msgid "Post meta"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:120
msgid "Target specific posts based on custom post meta values."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:124
msgid "Post Meta rules are a Pro feature"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:125
#: includes/conditional-logic/class-wpcode-conditional-page.php:136
msgid "Upgrade today to create conditional logic rules for specific pages or posts."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:130
msgid "Post/Page"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:131
msgid "Pick specific posts or pages to load the snippet on."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:135
msgid "Post specific rules are a Pro feature"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:141
msgid "Page Template"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:142
msgid "Load the snippet only on pages with a specific template."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:146
msgid "Page Template rules are a Pro feature"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:147
msgid "Upgrade today to create conditional logic rules for specific page templates."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:153
msgid "Load the snippet only on pages with a specific author."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:157
msgid "Post Author rules are a Pro feature"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-page.php:158
msgid "Upgrade today to create conditional logic rules based on the page/post author."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:37
msgid "User"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:48
msgid "Logged-in"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:49
msgid "Check if your site visitor is logged in."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:53
msgid "True"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:57
msgid "False"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:64
msgid "User Role"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:65
msgid "Target a specific user role."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:71
msgid "User Meta"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:72
msgid "Target users based on user meta values."
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:76
msgid "User Meta is a Pro Feature"
msgstr ""
#: includes/conditional-logic/class-wpcode-conditional-user.php:77
msgid "Get access to User Meta conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:35
msgid "Admin Bar Menu"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:36
msgid "Add a custom admin bar menu with links or content."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:47
#: includes/generator/class-wpcode-generator-contact-methods.php:47
#: includes/generator/class-wpcode-generator-cronjob.php:47
#: includes/generator/class-wpcode-generator-hooks.php:1279
#: includes/generator/class-wpcode-generator-menu.php:47
#: includes/generator/class-wpcode-generator-post-status.php:47
#: includes/generator/class-wpcode-generator-post-type.php:47
#: includes/generator/class-wpcode-generator-query.php:72
#: includes/generator/class-wpcode-generator-script.php:47
#: includes/generator/class-wpcode-generator-sidebar.php:47
#: includes/generator/class-wpcode-generator-style.php:47
#: includes/generator/class-wpcode-generator-taxonomy.php:47
#: includes/generator/class-wpcode-generator-widget.php:47
msgid "Info"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:54
#: includes/generator/class-wpcode-generator-contact-methods.php:54
#: includes/generator/class-wpcode-generator-cronjob.php:54
#: includes/generator/class-wpcode-generator-hooks.php:1286
#: includes/generator/class-wpcode-generator-menu.php:54
#: includes/generator/class-wpcode-generator-post-status.php:54
#: includes/generator/class-wpcode-generator-post-type.php:54
#: includes/generator/class-wpcode-generator-query.php:79
#: includes/generator/class-wpcode-generator-script.php:54
#: includes/generator/class-wpcode-generator-sidebar.php:54
#: includes/generator/class-wpcode-generator-style.php:54
#: includes/generator/class-wpcode-generator-taxonomy.php:54
#: includes/generator/class-wpcode-generator-widget.php:54
msgid "Overview"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:55
msgid "Generate a snippet to add a custom menu to the admin bar by filling in a simple form."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:63
#: includes/generator/class-wpcode-generator-contact-methods.php:63
#: includes/generator/class-wpcode-generator-cronjob.php:68
#: includes/generator/class-wpcode-generator-hooks.php:1304
#: includes/generator/class-wpcode-generator-menu.php:68
#: includes/generator/class-wpcode-generator-post-status.php:63
#: includes/generator/class-wpcode-generator-post-type.php:63
#: includes/generator/class-wpcode-generator-query.php:93
#: includes/generator/class-wpcode-generator-script.php:63
#: includes/generator/class-wpcode-generator-sidebar.php:68
#: includes/generator/class-wpcode-generator-style.php:63
#: includes/generator/class-wpcode-generator-taxonomy.php:63
#: includes/generator/class-wpcode-generator-widget.php:63
msgid "Usage"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:65
#: includes/generator/class-wpcode-generator-contact-methods.php:65
msgid "Fill in the forms sections using the menu on the left."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:66
#: includes/generator/class-wpcode-generator-contact-methods.php:66
#: includes/generator/class-wpcode-generator-cronjob.php:71
#: includes/generator/class-wpcode-generator-hooks.php:1307
#: includes/generator/class-wpcode-generator-menu.php:71
#: includes/generator/class-wpcode-generator-post-status.php:66
#: includes/generator/class-wpcode-generator-post-type.php:66
#: includes/generator/class-wpcode-generator-query.php:96
#: includes/generator/class-wpcode-generator-script.php:66
#: includes/generator/class-wpcode-generator-sidebar.php:71
#: includes/generator/class-wpcode-generator-style.php:66
#: includes/generator/class-wpcode-generator-taxonomy.php:66
#: includes/generator/class-wpcode-generator-widget.php:66
msgid "Click the \"Update Code\" button."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:67
#: includes/generator/class-wpcode-generator-contact-methods.php:67
#: includes/generator/class-wpcode-generator-cronjob.php:72
#: includes/generator/class-wpcode-generator-hooks.php:1308
#: includes/generator/class-wpcode-generator-menu.php:72
#: includes/generator/class-wpcode-generator-post-status.php:67
#: includes/generator/class-wpcode-generator-post-type.php:67
#: includes/generator/class-wpcode-generator-query.php:97
#: includes/generator/class-wpcode-generator-script.php:67
#: includes/generator/class-wpcode-generator-sidebar.php:72
#: includes/generator/class-wpcode-generator-style.php:67
#: includes/generator/class-wpcode-generator-taxonomy.php:67
#: includes/generator/class-wpcode-generator-widget.php:67
msgid "Click on \"Use Snippet\" to create a new snippet with the generated code."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:68
#: includes/generator/class-wpcode-generator-contact-methods.php:68
#: includes/generator/class-wpcode-generator-cronjob.php:73
#: includes/generator/class-wpcode-generator-hooks.php:1309
#: includes/generator/class-wpcode-generator-menu.php:73
#: includes/generator/class-wpcode-generator-post-status.php:68
#: includes/generator/class-wpcode-generator-post-type.php:68
#: includes/generator/class-wpcode-generator-query.php:98
#: includes/generator/class-wpcode-generator-script.php:68
#: includes/generator/class-wpcode-generator-sidebar.php:73
#: includes/generator/class-wpcode-generator-style.php:68
#: includes/generator/class-wpcode-generator-taxonomy.php:68
#: includes/generator/class-wpcode-generator-widget.php:68
msgid "Activate and save the snippet and you're ready to go"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:77
#: includes/generator/class-wpcode-generator-contact-methods.php:77
#: includes/generator/class-wpcode-generator-cronjob.php:82
#: includes/generator/class-wpcode-generator-hooks.php:1318
#: includes/generator/class-wpcode-generator-menu.php:82
#: includes/generator/class-wpcode-generator-post-status.php:77
#: includes/generator/class-wpcode-generator-post-type.php:77
#: includes/generator/class-wpcode-generator-query.php:107
#: includes/generator/class-wpcode-generator-script.php:77
#: includes/generator/class-wpcode-generator-sidebar.php:82
#: includes/generator/class-wpcode-generator-style.php:77
#: includes/generator/class-wpcode-generator-taxonomy.php:77
#: includes/generator/class-wpcode-generator-widget.php:77
msgid "Examples"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:78
msgid "You could add a new admin bar menu for links you use often, a list of posts, a site you often visit when in the admin, etc."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:84
#: includes/generator/class-wpcode-generator-contact-methods.php:84
#: includes/generator/class-wpcode-generator-cronjob.php:89
#: includes/generator/class-wpcode-generator-menu.php:89
#: includes/generator/class-wpcode-generator-post-status.php:84
#: includes/generator/class-wpcode-generator-post-type.php:84
#: includes/generator/class-wpcode-generator-query.php:114
#: includes/generator/class-wpcode-generator-script.php:89
#: includes/generator/class-wpcode-generator-sidebar.php:89
#: includes/generator/class-wpcode-generator-style.php:89
#: includes/generator/class-wpcode-generator-taxonomy.php:84
#: includes/generator/class-wpcode-generator-widget.php:84
msgid "General"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:90
#: includes/generator/class-wpcode-generator-contact-methods.php:90
#: includes/generator/class-wpcode-generator-cronjob.php:95
#: includes/generator/class-wpcode-generator-menu.php:95
#: includes/generator/class-wpcode-generator-post-status.php:90
#: includes/generator/class-wpcode-generator-post-type.php:90
#: includes/generator/class-wpcode-generator-script.php:95
#: includes/generator/class-wpcode-generator-sidebar.php:95
#: includes/generator/class-wpcode-generator-style.php:95
#: includes/generator/class-wpcode-generator-taxonomy.php:90
msgid "Function name"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:91
#: includes/generator/class-wpcode-generator-cronjob.php:96
#: includes/generator/class-wpcode-generator-menu.php:96
#: includes/generator/class-wpcode-generator-post-status.php:91
#: includes/generator/class-wpcode-generator-post-type.php:91
#: includes/generator/class-wpcode-generator-script.php:96
#: includes/generator/class-wpcode-generator-sidebar.php:96
#: includes/generator/class-wpcode-generator-style.php:96
#: includes/generator/class-wpcode-generator-taxonomy.php:91
msgid "Make this unique to avoid conflicts with other snippets"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:101
msgid "Position"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:102
msgid "Select where you want the menu item to be displayed on the admin bar."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:106
msgid "Last item on the left"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:107
msgid "Before Site Name"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:108
msgid "After Site Name"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:109
msgid "Before \"New\" Button"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:110
msgid "After \"New\" Button"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:117
msgid "Menu Structure"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:123
msgid "Menu ID"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:124
msgid "Unique menu id for the admin bar menu."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:131
msgid "Menu Title"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:132
msgid "Text or HTML that will show up in the admin bar top-level item. Use HTML if you want to display an image."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:139
msgid "Menu item link"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:140
msgid "If left empty, the top level menu item will not be a link, just text."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:147
msgid "Menu item target"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:148
msgid "The menu item is a link use this field to set the target attribute. Use \"_blank\" to open the link in a new tab."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:158
msgid "Submenu Item Title"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:159
msgid "Text or HTML for the submenu item."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:167
msgid "Submenu item link"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:168
msgid "If left empty, this menu item will not be a link, just text."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:176
msgid "Submenu item target attribute"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:177
msgid "If the menu item is a link use this for the target attribute. Use \"_blank\" to open in a new tab."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:188
msgid "Add more submenu items"
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:189
msgid "Use the \"Add submenu item\" button below to add multiple submenu items."
msgstr ""
#: includes/generator/class-wpcode-generator-admin-bar.php:193
msgid "Add submenu item"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:35
#: includes/generator/class-wpcode-generator-contact-methods.php:111
msgid "Contact Methods"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:36
msgid "Add additional contact methods to WordPress user profiles."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:55
msgid "Use this generator to create a snippet which adds more contact methods to your WordPress users profiles."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:78
msgid "You can add extra fields for user profiles like their extended address, city, country, phone number, social media profiles (Facebook, Twitter, etc)."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:91
msgid "Make this unique to avoid conflicts with other snippets."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:101
#: includes/generator/class-wpcode-generator-cronjob.php:106
#: includes/generator/class-wpcode-generator-menu.php:106
#: includes/generator/class-wpcode-generator-post-status.php:101
#: includes/generator/class-wpcode-generator-post-type.php:101
#: includes/generator/class-wpcode-generator-sidebar.php:106
#: includes/generator/class-wpcode-generator-taxonomy.php:102
#: includes/generator/class-wpcode-generator-widget.php:113
msgid "Text Domain"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:102
#: includes/generator/class-wpcode-generator-cronjob.php:107
#: includes/generator/class-wpcode-generator-menu.php:107
#: includes/generator/class-wpcode-generator-post-status.php:102
#: includes/generator/class-wpcode-generator-post-type.php:102
#: includes/generator/class-wpcode-generator-sidebar.php:107
#: includes/generator/class-wpcode-generator-taxonomy.php:103
msgid "Optional text domain for translations."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:117
msgid "Contact Method Slug"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:118
msgid "A lowercase with no spaces slug for usage in the code. For example: \"facebook\" or \"telephone\"."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:126
msgid "Contact Method Label"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:127
msgid "This will show up as a label next to the contact method field. For example: \"Facebook URL\" or \"Phone number\"."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:138
msgid "Add more contact methods"
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:139
msgid "Use the \"Add contact method\" button below to add as many contact methods as you wish."
msgstr ""
#: includes/generator/class-wpcode-generator-contact-methods.php:143
msgid "Add contact method"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:35
msgid "Schedule a Cron Job"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:36
msgid "Generate a snippet to schedule a recurring event using the WordPress cron."
msgstr ""
#. Translators: Placeholders add links to the wordpress.org references.
#: includes/generator/class-wpcode-generator-cronjob.php:57
msgid "This generator makes it easy to generate a snippet that will schedule a recurring event using %1$swp_schedule_event%2$s."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:70
#: includes/generator/class-wpcode-generator-hooks.php:1306
#: includes/generator/class-wpcode-generator-menu.php:70
#: includes/generator/class-wpcode-generator-post-status.php:65
#: includes/generator/class-wpcode-generator-post-type.php:65
#: includes/generator/class-wpcode-generator-query.php:95
#: includes/generator/class-wpcode-generator-script.php:65
#: includes/generator/class-wpcode-generator-sidebar.php:70
#: includes/generator/class-wpcode-generator-style.php:65
#: includes/generator/class-wpcode-generator-taxonomy.php:65
#: includes/generator/class-wpcode-generator-widget.php:65
msgid "Fill in the forms using the menu on the left."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:83
msgid "You may want to run some code once every hour, day or week, for example you could use this to send an email with the number of published posts every week."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:116
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:37
msgid "Schedule"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:122
msgid "Recurrence"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:123
msgid "Choose how often you want this event to run."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:127
msgid "Hourly"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:128
msgid "Twice Daily"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:129
msgid "Daily"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:130
msgid "Custom"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:138
msgid "Custom Recurrence Name"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:139
msgid "This is the recurrence name slug, lowercase and no space."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:145
msgid "Custom Recurrence Label"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:148
msgid "This label will be used in a list of cron events, for example."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:152
msgid "Custom Recurrence Interval"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:155
msgid "The number of seconds of this interval."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:161
#: includes/generator/class-wpcode-generator-hooks.php:1379
msgid "Code"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:167
#: includes/generator/class-wpcode-generator-hooks.php:1342
msgid "Hook name"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:168
msgid "Unique name of your hook used to run when scheduled."
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:177
#: includes/generator/class-wpcode-generator-hooks.php:1385
msgid "PHP Code"
msgstr ""
#: includes/generator/class-wpcode-generator-cronjob.php:178
msgid "Custom PHP code that will run when the event is triggered."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:35
msgid "Hooks"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:36
msgid "Generate a snippet for an action or a filter using any available hook."
msgstr ""
#. Translators: Placeholders add links to the wordpress.org references.
#: includes/generator/class-wpcode-generator-hooks.php:1289
msgid "Using this generator you can safely add custom %1$shooks%2$s using either %3$sadd_action%4$s or %5$sadd_filter%6$s."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1319
msgid "You can use this to quickly get started with adding an action or filter."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1325
msgid "Hook Details"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1331
msgid "Hook type"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1332
msgid "Can be either an action or a filter"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1336
msgid "Action"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1343
msgid "Input hook name or pick one from the suggested list as you type."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1353
msgid "Callback function"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1354
msgid "Name of the function you want to add to this hook."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1361
msgid "Priority of this hook, by default 10."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1370
msgid "Arguments list"
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1371
msgid "Add comma-separated custom arguments that will be passed to the callback function depending on the action/filter."
msgstr ""
#: includes/generator/class-wpcode-generator-hooks.php:1386
msgid "Custom PHP code you want to run in the function, you can also edit this after you create the snippet."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:35
msgid "Navigation Menu"
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:36
msgid "Generate a snippet to register new navigation menus for your website."
msgstr ""
#. Translators: Placeholders add links to the wordpress.org references.
#: includes/generator/class-wpcode-generator-menu.php:57
msgid "This generator makes it easy to add new navigation menus to your website using the \"register_nav_menus\" function."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:83
msgid "You can add a new navigation menu for your website to display in a flyout menu that is not part of the theme, for example."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:116
msgid "Menus"
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:122
msgid "Menu name"
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:123
msgid "This is the menu name slug, lowercase and no space."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:130
msgid "Menu label"
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:131
msgid "Add a descriptive label for this menu in the admin."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:141
msgid "Add another menu"
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:142
msgid "Use the \"Add menu\" button below to add as many menu locations as you need."
msgstr ""
#: includes/generator/class-wpcode-generator-menu.php:146
msgid "Add Menu"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:35
#: includes/generator/class-wpcode-generator-post-status.php:117
msgid "Post Status"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:36
msgid "Use this tool to generate a custom post status for your posts."
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:55
msgid "Generate custom post statuses for your posts to improve the way you manage content."
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:78
msgid "You could add a new status called \"Pending Review\" that your authors can use before the content will be published"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:118
msgid "Name of status used in the code, lowercase maximum 32 characters."
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:129
msgid "The singular name that will be displayed in the admin. "
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:136
#: includes/generator/class-wpcode-generator-post-type.php:144
#: includes/generator/class-wpcode-generator-taxonomy.php:137
msgid "Name (Plural)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:137
msgid "The post status plural name. For example: Drafts."
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:146
#: includes/generator/class-wpcode-generator-post-type.php:441
#: includes/generator/class-wpcode-generator-taxonomy.php:309
msgid "Visibility"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:152
#: includes/generator/class-wpcode-generator-post-type.php:447
#: includes/generator/class-wpcode-generator-taxonomy.php:315
msgid "Public"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:153
#: includes/generator/class-wpcode-generator-post-status.php:167
msgid "Should the posts with this status be visible in the frontend?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:156
#: includes/generator/class-wpcode-generator-post-status.php:184
msgid "Yes - Default"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:157
#: includes/generator/class-wpcode-generator-post-status.php:185
#: includes/generator/class-wpcode-generator-post-type.php:411
#: includes/generator/class-wpcode-generator-post-type.php:426
#: includes/generator/class-wpcode-generator-post-type.php:454
#: includes/generator/class-wpcode-generator-post-type.php:465
#: includes/generator/class-wpcode-generator-post-type.php:479
#: includes/generator/class-wpcode-generator-post-type.php:521
#: includes/generator/class-wpcode-generator-post-type.php:532
#: includes/generator/class-wpcode-generator-post-type.php:552
#: includes/generator/class-wpcode-generator-post-type.php:622
#: includes/generator/class-wpcode-generator-post-type.php:636
#: includes/generator/class-wpcode-generator-post-type.php:647
#: includes/generator/class-wpcode-generator-query.php:137
#: includes/generator/class-wpcode-generator-query.php:342
#: includes/generator/class-wpcode-generator-query.php:437
#: includes/generator/class-wpcode-generator-script.php:210
#: includes/generator/class-wpcode-generator-script.php:229
#: includes/generator/class-wpcode-generator-style.php:211
#: includes/generator/class-wpcode-generator-style.php:230
#: includes/generator/class-wpcode-generator-taxonomy.php:322
#: includes/generator/class-wpcode-generator-taxonomy.php:336
#: includes/generator/class-wpcode-generator-taxonomy.php:347
#: includes/generator/class-wpcode-generator-taxonomy.php:361
#: includes/generator/class-wpcode-generator-taxonomy.php:372
#: includes/generator/class-wpcode-generator-taxonomy.php:417
msgid "No"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:166
msgid "Exclude from search results"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:171
#: includes/generator/class-wpcode-generator-post-status.php:196
msgid "No - Default"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:180
msgid "Show in admin all list"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:181
msgid "Show statuses in the edit listing of the post."
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:191
msgid "Show in admin status list"
msgstr ""
#: includes/generator/class-wpcode-generator-post-status.php:192
msgid "Show statuses list at the top of the edit listings. e.g. Published (12) Custom Status (2)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:35
#: includes/generator/class-wpcode-generator-post-type.php:111
msgid "Post Type"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:36
msgid "Use this tool to generate a custom post type for your website."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:55
msgid "Generate custom post types for your website using a snippet."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:78
msgid "You can add custom post types for specific items that are not blog posts, for example, if your site is about music you can have post types for artists, albums or songs."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:117
msgid "Post Type Key"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:118
msgid "Name of post type used in the code, lowercase maximum 20 characters."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:125
#: includes/generator/class-wpcode-generator-sidebar.php:138
#: includes/generator/class-wpcode-generator-widget.php:150
#: includes/generator/class-wpcode-generator-widget.php:223
msgid "Description"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:126
msgid "A short description of the post type."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:137
msgid "The singular post type name (e.g. Artist, Album, Song)."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:145
msgid "The post type plural name (e.g. Artists, Albums, Songs)."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:155
msgid "Link To Taxonomies"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:156
msgid "Comma-separated list of Taxonomies (e.g. post_tag, category)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:163
#: includes/generator/class-wpcode-generator-taxonomy.php:156
msgid "Hierarchical"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:164
msgid "Hierarchical post types can have parents/children."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:168
msgid "Yes, like pages"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:169
msgid "No, like posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:176
#: includes/generator/class-wpcode-generator-taxonomy.php:169
msgid "Labels"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:182
#: includes/generator/class-wpcode-generator-taxonomy.php:175
msgid "Menu Name"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:189
msgid "Admin Bar Name"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:196
msgid "Archives"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:203
msgid "Attributes"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:210
#: includes/generator/class-wpcode-generator-taxonomy.php:189
msgid "Parent Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:217
#: includes/generator/class-wpcode-generator-taxonomy.php:182
msgid "All Items"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:224
#: includes/generator/class-wpcode-generator-taxonomy.php:210
msgid "Add New Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:238
msgid "New Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:248
#: includes/generator/class-wpcode-generator-taxonomy.php:220
msgid "Edit Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:255
#: includes/generator/class-wpcode-generator-taxonomy.php:227
msgid "Update Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:262
#: includes/generator/class-wpcode-generator-taxonomy.php:234
msgid "View Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:269
msgid "View Items"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:276
msgid "Search Item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:283
#: includes/generator/class-wpcode-generator-taxonomy.php:279
msgid "Not Found"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:290
msgid "Not Found in Trash"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:297
msgid "Featured Image"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:304
msgid "Set featured image"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:314
msgid "Remove featured image"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:321
msgid "Use as featured image"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:328
msgid "Insert into item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:335
msgid "Uploaded to this item"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:342
#: includes/generator/class-wpcode-generator-taxonomy.php:293
msgid "Items list"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:349
#: includes/generator/class-wpcode-generator-taxonomy.php:300
msgid "Items list navigation"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:356
msgid "Filter items list"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:365
#: includes/generator/class-wpcode-generator-widget.php:239
msgid "Options"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:371
msgid "Supports"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:372
msgid "Select which features this post type should support"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:376
#: includes/generator/class-wpcode-generator-query.php:300
msgid "Title"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:377
msgid "Content Editor"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:379
msgid "Featured image"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:380
msgid "Excerpt"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:381
msgid "Trackbacks"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:382
#: includes/generator/class-wpcode-generator-query.php:487
msgid "Custom Fields"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:383
msgid "Comments"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:385
msgid "Page Attributes"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:386
msgid "Post Formats"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:394
msgid "Exclude From Search"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:395
msgid "Exclude the posts of this post type from search results?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:400
#: includes/generator/class-wpcode-generator-post-type.php:758
#: includes/generator/class-wpcode-generator-taxonomy.php:427
#: includes/generator/class-wpcode-generator-taxonomy.php:506
msgid "No - default"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:405
msgid "Enable Export"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:406
msgid "Allow exporting posts of this post type in Tools > Export."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:410
#: includes/generator/class-wpcode-generator-post-type.php:424
#: includes/generator/class-wpcode-generator-post-type.php:453
#: includes/generator/class-wpcode-generator-post-type.php:464
#: includes/generator/class-wpcode-generator-post-type.php:478
#: includes/generator/class-wpcode-generator-post-type.php:520
#: includes/generator/class-wpcode-generator-post-type.php:531
#: includes/generator/class-wpcode-generator-post-type.php:621
#: includes/generator/class-wpcode-generator-post-type.php:635
#: includes/generator/class-wpcode-generator-post-type.php:646
#: includes/generator/class-wpcode-generator-taxonomy.php:321
#: includes/generator/class-wpcode-generator-taxonomy.php:335
#: includes/generator/class-wpcode-generator-taxonomy.php:346
#: includes/generator/class-wpcode-generator-taxonomy.php:360
#: includes/generator/class-wpcode-generator-taxonomy.php:371
#: includes/generator/class-wpcode-generator-taxonomy.php:416
msgid "Yes - default"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:419
msgid "Enable Archives"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:420
msgid "Enables archives for this post type, the post type key is used as default."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:425
msgid "Yes - using custom slug"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:431
msgid "Custom Archive Slug"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:432
msgid "Custom archive slug (if selected above)."
msgstr ""
#. Translators: Placeholders add a link to the wp.org documentation page.
#: includes/generator/class-wpcode-generator-post-type.php:449
msgid "Should this post type be %1$svisible to authors%2$s?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:459
#: includes/generator/class-wpcode-generator-taxonomy.php:330
msgid "Show UI"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:460
msgid "Should this post type be visible in the Admin?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:473
msgid "Show in Menu?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:474
msgid "Should this post type be visible in the admin menu?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:484
msgid "Menu position"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:485
msgid "Choose the admin menu position."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:489
msgid "Below Posts (5)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:490
msgid "Below Media (10)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:491
msgid "Below Pages (20)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:492
msgid "Below Comments (30)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:493
msgid "Below First Separator (60)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:494
msgid "Below Plugins (65)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:495
msgid "Below Users (70)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:496
msgid "Below Tools (75)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:497
msgid "Below Settings (80)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:498
msgid "Below Second Separator (100)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:503
msgid "Menu Icon"
msgstr ""
#. Translators: Placeholder adds a link to the dashicons page.
#: includes/generator/class-wpcode-generator-post-type.php:505
msgid "Icon used next to the post type label in the admin menu. Use either a %1$sdashicon%2$s name or a full URL to an image file."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:515
msgid "Show in Admin Bar?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:516
msgid "Should this post type be visible in the admin bar?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:526
msgid "Show in Navigation Menus?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:527
msgid "Should this post type be available for use in menus (Appearance > Menus)?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:545
msgid "Publicly Queryable"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:547
msgid "Enable frontend requests using the query variable. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:560
msgid "Query variable"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:562
msgid "Key used for querying posts in the frontend. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:566
#: includes/generator/class-wpcode-generator-post-type.php:598
msgid "Default (post type key)"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:567
msgid "Custom variable"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:575
msgid "Custom Query Variable"
msgstr ""
#. Translators: Placeholder adds a link to the dashicons page.
#: includes/generator/class-wpcode-generator-post-type.php:577
msgid "The custom query variable to use for this post type. %1$sSee documentation%2$s."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:586
#: includes/generator/class-wpcode-generator-taxonomy.php:379
msgid "Permalinks"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:592
msgid "Rewrite Permalinks"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:594
msgid "Use the default permalink structure, disable permalinks for this post type or use custom options. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:599
#: includes/generator/class-wpcode-generator-taxonomy.php:391
msgid "Disable permalink rewrites"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:600
#: includes/generator/class-wpcode-generator-taxonomy.php:392
msgid "Custom permalink structure"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:608
#: includes/generator/class-wpcode-generator-taxonomy.php:400
msgid "URL Slug"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:609
msgid "The slug used for this post types base. (for example: artist in www.example.com/artist/ )"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:616
msgid "Use URL Slug?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:617
msgid "Use the post type name as URL slug base?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:630
msgid "Use pagination?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:631
msgid "Allow the post type to have pagination?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:641
msgid "Use feeds?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:642
msgid "Allow the post type to have feeds?"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:654
#: includes/generator/class-wpcode-generator-post-type.php:660
#: includes/generator/class-wpcode-generator-taxonomy.php:435
#: includes/generator/class-wpcode-generator-taxonomy.php:441
msgid "Capabilities"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:662
msgid "User capabilities in relation to this post type. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:666
#: includes/generator/class-wpcode-generator-taxonomy.php:447
msgid "Base capabilities - default"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:667
#: includes/generator/class-wpcode-generator-post-type.php:686
#: includes/generator/class-wpcode-generator-taxonomy.php:448
#: includes/generator/class-wpcode-generator-taxonomy.php:453
msgid "Custom Capabilities"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:672
msgid "Base Capablities Type"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:673
msgid "Use base capabilities from a core post type."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:677
msgid "Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:678
msgid "Pages"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:687
msgid "Use the fields below to use custom capabilities for this post type."
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:691
msgid "Read Post"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:698
msgid "Read Private Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:705
msgid "Publish Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:715
msgid "Delete Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:722
msgid "Edit Post"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:729
msgid "Edit Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:736
msgid "Edit Others Posts"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:745
#: includes/generator/class-wpcode-generator-taxonomy.php:494
msgid "Rest API"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:751
#: includes/generator/class-wpcode-generator-taxonomy.php:500
msgid "Show in Rest API?"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:753
msgid "Add the post type to the WordPress wp-json API. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:766
#: includes/generator/class-wpcode-generator-taxonomy.php:514
msgid "Rest Base"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:768
msgid "The base slug that this post type will use in the REST API. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-post-type.php:777
#: includes/generator/class-wpcode-generator-taxonomy.php:524
msgid "Rest Controller Class"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-post-type.php:779
msgid "The name of a custom Rest Controller class instead of WP_REST_Posts_Controller. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:42
msgid "WP_Query"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:43
msgid "Generate a snippet using WP_Query to load posts from your website."
msgstr ""
#. Translators: Placeholders add links to the wordpress.org references.
#: includes/generator/class-wpcode-generator-query.php:82
msgid "This generator makes it easy for you to create custom queries using %1$sWP_Query%2$s which you can then extend to display posts or similar."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:108
msgid "You can use this generator to get quickly started with a query for all the posts of an author and display them using the shortcode functionality of WPCode or automatically displaying the posts using the auto-insert option."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:120
msgid "Query variable name"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:121
msgid "If you want to use something more specific. The leading $ will be automatically added."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:131
msgid "Include loop"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:132
msgid "Select yes if you want to include an empty loop of the results that you can fill in for output."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:144
msgid "IDs & Parents"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:150
msgid "Post ID(s)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:151
msgid "Query a specific post ID or comma-separated list of ids. Cannot be combined with \"Post ID not in\" below."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:158
msgid "Post ID not in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:159
msgid "Post ids to exclude from this query. Cannot be combined with \"Post ID(s)\" above."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:169
msgid "Post parent ID(s)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:170
msgid "Comma-separated list of post parent ids if the post type is hierarchical (like pages)."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:177
msgid "Post parent not in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:178
msgid "Comma-separated list of post parent ids to exclude."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:188
msgid "Post slugs"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:189
msgid "Comma-separated list of post slugs to query by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:198
msgid "Type & Status"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:205
msgid "Post type to query by, start typing to get suggestions."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:215
msgid "Post status"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:216
msgid "Post status to query by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:231
msgid "Author ID(s)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:232
msgid "Author ID or comma-separated list of ids."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:238
msgid "Author not in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:239
msgid "Comma-separated list of author ids to exclude from the query."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:250
msgid "Author name"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:251
msgid "Use the \"user_nicename\" parameter to query by author."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:259
msgid "Search"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:265
msgid "Search term"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:266
msgid "Search for posts by this search term."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:274
msgid "Order"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:280
msgid "Results Order"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:284
msgid "Descending order (3, 2, 1; c, b, a)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:285
msgid "Ascending order (1, 2, 3; a, b, c)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:293
msgid "Order by"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:297
msgid "No order (none)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:301
msgid "Slug (name)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:302
msgid "Post type (type)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:303
msgid "Date (default)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:304
msgid "Modified date"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:305
msgid "Parent id"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:306
msgid "Random"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:307
msgid "Comment count"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:308
msgid "Relevance (for search)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:309
msgid "Page Order (menu_order)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:311
msgid "Meta value"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:312
msgid "Numerical meta value (meta_value_num)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:313
msgid "Order of ids in post__in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:314
msgid "Order of names in post_name__in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:315
msgid "Order of ids in post_parent__in"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:320
#: includes/generator/class-wpcode-generator-query.php:493
msgid "Meta Key"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:321
msgid "Meta key to use if you choose to order by meta value."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:331
msgid "Pagination"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:337
msgid "Use Pagination"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:340
msgid "Choose no to display all posts (not recommended)."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:343
msgid "Yes (default)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:348
msgid "Page number"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:349
msgid "Which page to show."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:358
msgid "Posts per page"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:359
msgid "How many posts should be displayed per page."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:365
msgid "Offset"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:366
msgid "Number of posts to skip."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:375
msgid "Ignore sticky posts"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:380
msgid "No (default)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:387
#: includes/generator/class-wpcode-generator-query.php:393
#: includes/generator/class-wpcode-generator-taxonomy.php:35
#: includes/generator/class-wpcode-generator-taxonomy.php:112
msgid "Taxonomy"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:394
msgid "Taxonomy slug that you want to query by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:402
msgid "Field"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:403
msgid "Select taxonomy term by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:409
msgid "Term ID (default)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:410
msgid "Term Name"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:411
msgid "Term Slug"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:412
msgid "Term Taxonomy ID"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:417
msgid "Terms"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:418
msgid "Comma-separated list of terms to query by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:430
msgid "Include Children"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:434
msgid "Whether or not to include children for hierarchical taxonomies."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:443
msgid "Operator"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:447
msgid "Operator to test relation by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:465
msgid "Add another taxonomy"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:466
msgid "Use the \"Add Taxonomy\" button below to query multiple taxonomies."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:470
msgid "Add Taxonomy"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:475
msgid "Tax Relation"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:479
#: includes/generator/class-wpcode-generator-query.php:579
msgid "AND (default)"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:480
#: includes/generator/class-wpcode-generator-query.php:580
msgid "OR"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:494
msgid "The key of the custom field."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:502
msgid "Meta Value"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:503
msgid "Value to query the meta by."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:515
msgid "How to compare the value for querying by meta."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:542
msgid "Type"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:543
msgid "Type of custom field."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:565
msgid "Add another meta query"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:566
msgid "Use the \"Add Meta\" button below to use multiple meta queries."
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:570
msgid "Add Meta"
msgstr ""
#: includes/generator/class-wpcode-generator-query.php:575
msgid "Relation"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:35
msgid "Register Scripts"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:36
msgid "Generate a snippet to load JavaScript scripts using wp_register_script."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:55
msgid "Using this generator you can create a WordPress function to register and enqueue scripts."
msgstr ""
#. Translators: the placeholders add a link to getboostrap.com.
#: includes/generator/class-wpcode-generator-script.php:80
msgid "You can use this to load external scripts or even scripts from a theme or plugin. For example, you could load %1$sbootstrap%2$s from a cdn."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:107
#: includes/generator/class-wpcode-generator-style.php:107
msgid "Action (hook)"
msgstr ""
#. Translators: placeholders add links to documentation on wordpress.org.
#: includes/generator/class-wpcode-generator-script.php:110
msgid "Hook used to add the scripts: %1$sfrontend%2$s, %3$sadmin%4$s, %5$slogin%6$s or %7$sembed%8$s."
msgstr ""
#. Translators: placeholder adds the hook name.
#: includes/generator/class-wpcode-generator-script.php:124
#: includes/generator/class-wpcode-generator-style.php:124
msgid "Frontend (%s)"
msgstr ""
#. Translators: placeholder adds the hook name.
#: includes/generator/class-wpcode-generator-script.php:126
#: includes/generator/class-wpcode-generator-style.php:126
msgid "Admin (%s)"
msgstr ""
#. Translators: placeholder adds the hook name.
#: includes/generator/class-wpcode-generator-script.php:128
#: includes/generator/class-wpcode-generator-style.php:128
msgid "Login (%s)"
msgstr ""
#. Translators: placeholder adds the hook name.
#: includes/generator/class-wpcode-generator-script.php:130
#: includes/generator/class-wpcode-generator-style.php:130
msgid "Embed (%s)"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:137
msgid "Scripts"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:143
msgid "Script name"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:144
#: includes/generator/class-wpcode-generator-style.php:144
msgid "This will be used as an identifier in the code, should be lowercase with no spaces."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:153
msgid "Script URL"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:154
msgid "The full URL for the script e.g. https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:163
#: includes/generator/class-wpcode-generator-style.php:163
msgid "Dependencies"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:164
msgid "Comma-separated list of scripts required for this script to load, e.g. jquery"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:173
msgid "Script Version"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:174
msgid "The script version."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:186
msgid "Header or Footer?"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:187
msgid "Load the script in the page head or in the footer."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:199
msgid "Deregister script?"
msgstr ""
#. Translators: Placeholders for wp.org docs link.
#: includes/generator/class-wpcode-generator-script.php:202
msgid "Should the script be %1$sderegistered%2$s first? (for example, if you are replacing an existing script)."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:217
msgid "Enqueue script?"
msgstr ""
#. Translators: Placeholders for wp.org docs link.
#: includes/generator/class-wpcode-generator-script.php:220
msgid "Should the script be %1$senqueued%2$s or just registered? (select \"No\" only if you intend enqueueing it later."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:241
msgid "Add more scripts"
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:242
msgid "Use the \"Add script\" button below to add multiple scripts in this snippet."
msgstr ""
#: includes/generator/class-wpcode-generator-script.php:246
msgid "Add script"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:35
msgid "Sidebar"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:36
msgid "Generate a snippet to register a sidebar for your widgets."
msgstr ""
#. Translators: Placeholders add links to the wordpress.org references.
#: includes/generator/class-wpcode-generator-sidebar.php:57
msgid "This generator makes it easy to add sidebars to your website using the \"register_sidebar\" function."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:83
msgid "You can add multiple widget areas for your footer or post-type specific sidebars."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:116
msgid "Sidebars"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:122
msgid "Sidebar Id"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:123
msgid "This is the sidebar unique id, used in the code, lowercase with no spaces."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:131
msgid "Add a descriptive label for this sidebar to be used in the admin."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:139
msgid "A short description for the the admin area."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:146
#: includes/generator/class-wpcode-generator-widget.php:158
msgid "CSS Class"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:147
msgid "Use an unique CSS class name for better control over this sidebar's styles in the admin."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:157
msgid "Before Title"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:158
msgid "HTML code to add before each widget title."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:166
msgid "After Title"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:167
msgid "HTML code to add after each widget title."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:175
msgid "Before Widget"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:176
msgid "HTML code to add before each widget."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:184
msgid "After Widget"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:185
msgid "HTML code to add after each widget."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:199
msgid "Add another sidebar"
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:200
msgid "Use the \"Add Sidebar\" button below to add as many sidebars as you need."
msgstr ""
#: includes/generator/class-wpcode-generator-sidebar.php:204
msgid "Add Sidebar"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:35
msgid "Register Stylesheets"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:36
msgid "Generate a snippet to load CSS stylesheets using wp_register_style."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:55
msgid "Using this generator you can create a WordPress function to register and enqueue styles."
msgstr ""
#. Translators: the placeholders add a link to getboostrap.com.
#: includes/generator/class-wpcode-generator-style.php:80
msgid "You can use this to load external styles or even styles from a theme or plugin. For example, you could load %1$sfontawesome%2$s from a cdn."
msgstr ""
#. Translators: placeholders add links to documentation on wordpress.org.
#: includes/generator/class-wpcode-generator-style.php:110
msgid "Hook used to add the styles: %1$sfrontend%2$s, %3$sadmin%4$s, %5$slogin%6$s or %7$sembed%8$s."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:137
msgid "Styles"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:143
msgid "Style name"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:153
msgid "Stylesheet URL"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:154
msgid "The full URL for the stylesheet e.g. https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:164
msgid "Comma-separated list of styles required for this style to load, e.g. jquery"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:173
msgid "Style Version"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:174
msgid "The style version."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:186
msgid "Media"
msgstr ""
#. Translators: placeholders add a link to the W3.org reference.
#: includes/generator/class-wpcode-generator-style.php:189
msgid "Load the style %1$smedia type%2$s, usually \"all\"."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:200
msgid "Deregister style?"
msgstr ""
#. Translators: Placeholders for wp.org docs link.
#: includes/generator/class-wpcode-generator-style.php:203
msgid "Should the style be %1$sderegistered%2$s first? (for example, if you are replacing an existing style)."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:218
msgid "Enqueue style?"
msgstr ""
#. Translators: Placeholders for wp.org docs link.
#: includes/generator/class-wpcode-generator-style.php:221
msgid "Should the style be %1$senqueued%2$s or just registered? (select \"No\" only if you intend enqueueing it later."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:242
msgid "Add more styles"
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:243
msgid "Use the \"Add style\" button below to add multiple styles in this snippet."
msgstr ""
#: includes/generator/class-wpcode-generator-style.php:247
msgid "Add style"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:36
msgid "Create a custom taxonomy for your posts using this generator."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:55
msgid "Use this generator to create custom taxonomies for your WordPress site."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:78
msgid "Use this to add more taxonomies to posts or custom post types. For example, if you used the Post Type generator to create an Artist post type you can use this one to create a Genre taxonomy."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:118
msgid "Taxonomy Key"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:119
msgid "Name of taxonomy used in the code, lowercase maximum 20 characters."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:129
msgid "Name (Singular)"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:130
msgid "The singular taxonomy name (e.g. Genre, Year)."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:138
msgid "The taxonomy plural name (e.g. Genres, Years)."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:148
msgid "Link To Post Type(s)"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:149
msgid "Comma-separated list of Post Types (e.g. post, page)"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:157
msgid "Hierarchical taxonomies can have descendants."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:161
msgid "No, like tags"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:162
msgid "Yes, like categories"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:196
msgid "Parent Item colon"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:203
msgid "New Item Name"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:241
msgid "Separate Items with commas"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:248
msgid "Add or Remove Items"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:255
msgid "Choose From Most Used"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:265
msgid "Popular Items"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:272
msgid "Search Items"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:286
msgid "No items"
msgstr ""
#. Translators: Placeholders add a link to the wp.org documentation page.
#: includes/generator/class-wpcode-generator-taxonomy.php:317
msgid "Should this taxonomy be %1$svisible to authors%2$s?"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:331
msgid "Should this taxonomy have an User Interface for managing?"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:341
msgid "Show Admin Column"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:342
msgid "Should this taxonomy add a column in the list of associated post types?"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:355
msgid "Show Tag Cloud"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:356
msgid "Should this taxonomy be visible in the tag cloud widget?"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:366
msgid "Show in Navigation Menus"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:367
msgid "Should this taxonomy be available in menus (Appearance > Menus)."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:385
msgid "Permalink Rewrite"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:386
msgid "Use Default Permalinks, disable automatic rewriting or use custom permalinks."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:390
msgid "Default (taxonomy key)"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:401
msgid "If you selected custom permalinks use this field for the rewrite base, e.g. taxonomy in https://yoursite.com/taxonomy"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:411
msgid "Prepend permastruct"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:412
msgid "Should the permastruct be prepended to the url (with_front parameter)."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:422
msgid "Hierarchical URL Slug"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:423
msgid "For hierarchical taxonomies use the whole hierarchy in the URL?"
msgstr ""
#. Translators: Placeholders add link to wp.org docs.
#: includes/generator/class-wpcode-generator-taxonomy.php:443
msgid "User capabilities in relation to this taxonomy. %1$sSee Documentation.%2$s"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:454
msgid "Use the fields on the right to assign custom capabilities for this taxonomy."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:461
msgid "Edit Terms"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:468
msgid "Delete Terms"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:478
msgid "Manage Terms"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:485
msgid "Assign Terms"
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:501
msgid "Add the taxonomy to the WordPress wp-json API."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:515
msgid "The base slug that this taxonomy will use in the REST API."
msgstr ""
#: includes/generator/class-wpcode-generator-taxonomy.php:525
msgid "The name of a custom Rest Controller class instead of WP_REST_Terms_Controller."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:35
#: includes/generator/class-wpcode-generator-widget.php:123
msgid "Widget"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:36
msgid "Generate a snippet to register a custom sidebar widget for your website."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:55
msgid "Using this generator you can easily add a custom sidebar widget with settings."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:78
msgid "Sidebar widgets are very useful when you want to display the same content on multiple pages, you can create a widget with contact methods, for example and fields to set a phone number, email, etc."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:90
msgid "Class name"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:91
msgid "Make this unique to avoid conflicts with other similar snippets."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:102
msgid "Prefix"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:103
msgid "Used to prefix all the field names."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:114
msgid "Optional textdomain for translations."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:129
msgid "Widget ID"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:130
msgid "Unique id for the widget, used in the code."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:138
msgid "Widget Title"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:139
msgid "The title of the widget (displayed in the admin)."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:151
msgid "Description used in the admin to explain what the widget is used for."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:159
msgid "Widget-specific CSS class name."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:168
msgid "Widget Output Code"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:169
msgid "PHP Code used for outputting the fields in the frontend. If left empty it will output the fields values in a simple list."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:177
msgid "Fields"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:183
msgid "Field Type"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:184
msgid "Pick the type of field you want to use for this setting."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:188
msgid "Text"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:189
msgid "Email"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:190
msgid "URL"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:191
msgid "Number"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:192
msgid "Textarea"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:193
msgid "Select"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:194
msgid "Checkboxes"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:195
msgid "Radio"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:201
msgid "Field ID"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:202
msgid "Unique id for this field, used in the code."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:209
msgid "Field Label"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:210
msgid "The label displayed next to this field in the admin form."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:224
msgid "Display a short descriptive text below this field."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:231
msgid "Default"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:232
msgid "Set the default value for this field."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:240
msgid "Use value|label for each line to add options for select, checkbox or radio."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:250
msgid "Add another field"
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:251
msgid "Use the \"Add field\" button below to add as many fields as you need."
msgstr ""
#: includes/generator/class-wpcode-generator-widget.php:255
msgid "Add field"
msgstr ""
#: includes/helpers.php:166
msgctxt "Copy to clipboard"
msgid "Copy"
msgstr ""
#: includes/helpers.php:180
msgid "Contains"
msgstr ""
#: includes/helpers.php:181
msgid "Doesn't Contain"
msgstr ""
#: includes/helpers.php:182
msgid "Is"
msgstr ""
#: includes/helpers.php:183
msgid "Is not"
msgstr ""
#: includes/helpers.php:184
msgid "Is Before"
msgstr ""
#: includes/helpers.php:185
msgid "Is After"
msgstr ""
#: includes/helpers.php:186
msgid "Is on or Before"
msgstr ""
#: includes/helpers.php:187
msgid "Is on or After"
msgstr ""
#: includes/lite/admin/class-wpcode-admin-page-loader-lite.php:35
#: includes/lite/admin/class-wpcode-admin-page-loader-lite.php:36
#: includes/lite/class-wpcode-admin-bar-info-lite.php:71
msgid "Upgrade to Pro"
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:67
msgid "You are not allowed to install plugins."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:73
msgid "Please enter your license key to connect."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:77
msgid "Only the Lite version can be upgraded."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:95
msgid "WPCode Pro is installed but not activated."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:148
msgid "There was an error while installing an upgrade. Please download the plugin from wpcode.com and install it manually."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:181
#: includes/lite/admin/class-wpcode-connect.php:194
#: includes/lite/admin/class-wpcode-connect.php:255
msgid "Plugin installed & activated."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:202
msgid "There was an error while installing an upgrade. Please check file system permissions and try again. Also, you can download the plugin from wpcode.com and install it manually."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:229
msgid "No key provided."
msgstr ""
#: includes/lite/admin/class-wpcode-connect.php:259
msgid "Pro version installed but needs to be activated on the Plugins page inside your WordPress admin."
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:64
msgid "Choose the snippets you want to run on this page. Please note: only active snippets will be executed."
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:69
msgid "Select snippets"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:75
msgid "Search snippets"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:81
msgid "Load more snippets"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:88
msgid "+ Choose Snippet"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:140
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:283
#: includes/lite/class-wpcode-admin-bar-info-lite.php:91
msgid "Page Scripts is a Pro Feature"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:143
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:286
#: includes/lite/class-wpcode-admin-bar-info-lite.php:92
msgid "While you can always use global snippets, in the PRO version you can easily add page-specific scripts and snippets directly from the post edit screen."
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:146
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:289
#: includes/lite/class-wpcode-admin-bar-info-lite.php:93
msgid "Upgrade to Pro and Unlock Page Scripts"
msgstr ""
#. Translators: placeholder for the name of the section (header or footer).
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:171
msgid "Add scripts below to the %s section of this page."
msgstr ""
#. Translators: placeholder for the name of the section (header or footer).
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:182
msgid "Disable global %s scripts on this page"
msgstr ""
#. Translators: placeholder for the name of the section (header or footer).
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:193
msgid "%s - any device type"
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:309
msgid "As you make changes to your page scripts and save, you will get a list of previous versions with all the changes made in each revision. You can compare revisions to the current version or see changes as they have been saved by going through each revision. Any of the revisions can then be restored as needed without interfering with your post/page."
msgstr ""
#: includes/lite/admin/class-wpcode-metabox-snippets-lite.php:316
msgid "Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your page scripts."
msgstr ""
#. Translators: more here is used in the sense of "get access to more snippets" and gets replaced with the number of snippets if the library items are loaded correctly.
#: includes/lite/admin/notices.php:37
msgid "more"
msgstr ""
#. Translators: %1$s and %2$s add a link to the settings page. %3$s and %4$s make the text bold. %6$s is replaced with the number of snippets and %5$s adds a "new" icon.
#: includes/lite/admin/notices.php:42
msgid "%5$s%1$sConnect to the WPCode Library%2$s to get access to %3$s%6$s FREE snippets%4$s!"
msgstr ""
#. Translators: %1$s and %2$s add a link to the upgrade page. %3$s and %4$s make the text bold.
#: includes/lite/admin/notices.php:88
msgid "%3$sYou're using WPCode Lite%4$s. To unlock more features consider %1$supgrading to Pro%2$s."
msgstr ""
#: includes/lite/admin/notices.php:116
msgid "Get WPCode Pro and Unlock all the Powerful Features"
msgstr ""
#: includes/lite/admin/notices.php:119
msgid "Save & Reuse snippets in your private Cloud Library"
msgstr ""
#: includes/lite/admin/notices.php:120
msgid "Add page-specific scripts when editing a post/page."
msgstr ""
#: includes/lite/admin/notices.php:121
msgid "Track all snippet changes with Advanced Code Revisions"
msgstr ""
#: includes/lite/admin/notices.php:124
msgid "Load snippets by device (mobile/desktop) with 1-click."
msgstr ""
#: includes/lite/admin/notices.php:125
msgid "Easily insert and reuse content with Custom Shortcodes."
msgstr ""
#: includes/lite/admin/notices.php:126
msgid "Precisely track eCommerce conversions for WooCommerce and EDD."
msgstr ""
#: includes/lite/admin/notices.php:132
msgid "Get WPCode Pro Today and Unlock all the Powerful Features »"
msgstr ""
#. Translators: Placeholders make the text bold.
#: includes/lite/admin/notices.php:137
msgid "%1$sBonus:%2$s WPCode Lite users get %3$s$50 off regular price%4$s, automatically applied at checkout"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:58
msgid "Anywhere (CSS Selector)"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:69
msgid "Before HTML Element"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:70
msgid "Insert snippet before the HTML element specified by the CSS selector."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:73
msgid "After HTML Element"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:74
msgid "Insert snippet after the HTML element specified by the CSS selector."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:77
msgid "At the start of HTML Element"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:78
msgid "Insert snippet before the content of the HTML element specified by CSS selector."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:81
msgid "At the end of HTML Element"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:82
msgid "Insert snippet after the content of the HTML element specified by CSS selector."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:85
msgid "Replace HTML Element"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:86
msgid "Completely replace the HTML element specified by the CSS selector with the output of this snippet."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:97
msgid "Insert Anywhere by CSS Selector is a Premium feature"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-anywhere.php:98
msgid "Upgrade to PRO today and insert snippets anywhere on your site using CSS selectors to target any HTML element."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:70
msgid "Insert After # Words"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:71
msgid "Insert snippet after a minimum number of words."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:74
msgid "Insert Every # Words"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:75
msgid "Insert snippet every # number of words."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:78
msgid "Insert in the Middle of the Content"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:79
msgid "Insert snippet in the middle of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:82
msgid "Insert after first Quarter (25%)"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:83
msgid "Insert snippet after the first quarter of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:86
msgid "Insert after 3rd Quarter (75%)"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:87
msgid "Insert snippet after the third quarter of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:90
msgid "Insert after first Third (33%)"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:91
msgid "Insert snippet after the first third of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:94
msgid "Insert after second Third (66%)"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:95
msgid "Insert snippet after the second third of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:98
msgid "Insert after 80%"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:99
msgid "Insert snippet after 80% of the post content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:110
msgid "Word-based content locations are a PRO feature"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-content.php:111
msgid "Upgrade to PRO today and get access to automatic word-count based insert locations."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:69
msgid "Before the Purchase Button"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:70
msgid "Insert snippet before the EDD purchase button."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:73
msgid "After the Purchase Button"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:74
msgid "Insert snippet after the EDD purchase button."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:77
msgid "Before the Single Download"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:78
msgid "Insert snippet before the single EDD download content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:81
msgid "After the Single Download"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:82
msgid "Insert snippet after the single EDD download content."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:85
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:94
msgid "Before the Cart"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:86
msgid "Insert snippet before the EDD cart."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:89
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:98
msgid "After the Cart"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:90
msgid "Insert snippet after the EDD cart."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:93
msgid "Before the Checkout Cart"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:94
msgid "Insert snippet before the EDD cart on the checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:97
msgid "After the Checkout Cart"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:98
msgid "Insert snippet after the EDD cart on the checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:101
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:102
msgid "Before the Checkout Form"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:102
msgid "Insert snippet before the EDD checkout form on the checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:105
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:106
msgid "After the Checkout Form"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:106
msgid "Insert snippet after the EDD checkout form on the checkout page"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:117
msgid "Easy Digital Downloads Locations are a PRO feature"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-edd.php:118
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:110
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:131
msgid "Upgrade to PRO today and get access to advanced eCommerce auto-insert locations and conditional logic rules for your needs."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:69
msgid "Before the Registration Form"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:70
msgid "Insert snippet before the MemberPress registration form used for checkout."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:73
msgid "Before Checkout Submit Button"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:74
msgid "Insert snippet right before the MemberPress checkout submit button."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:77
msgid "Before Checkout Coupon Field"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:78
msgid "Insert snippet before the MemberPress checkout coupon field."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:81
msgid "Before Account First Name"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:82
msgid "Insert snippet to the Home tab of the MemberPress Account page before First Name field."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:85
msgid "Before Subscriptions Content"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:86
msgid "Insert snippet at the beginning of the Subscriptions tab on the MemberPress Account page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:89
msgid "Before Login Form Submit"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:90
msgid "Insert snippet before the Remember Me checkbox on the MemberPress Login page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:93
msgid "Before the Unauthorized Message"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:94
msgid "Insert a snippet before the notice that access to the content is unauthorized. "
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:97
msgid "After the Unauthorized Message"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:98
msgid "Insert a snippet after the notice that access to the content is unauthorized. "
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-memberpress.php:109
msgid "MemberPress Locations are a PRO feature"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:70
msgid "Before the List of Products"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:71
msgid "Insert snippet before the list of products on a WooCommerce page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:74
msgid "After the List of Products"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:75
msgid "Insert snippet after the list of products on a WooCommerce page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:78
msgid "Before the Single Product"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:79
msgid "Insert snippet before the content on the single WooCommerce product page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:82
msgid "After the Single Product"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:83
msgid "Insert snippet after the content on the single WooCommerce product page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:86
msgid "Before the Single Product Summary"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:87
msgid "Insert snippet before the product summary on the single WooCommerce product page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:90
msgid "After the Single Product Summary"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:91
msgid "Insert snippet after the product summary on the single WooCommerce product page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:95
msgid "Insert snippet before the cart on WooCommerce pages."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:99
msgid "Insert snippet after the cart on WooCommerce pages."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:103
msgid "Insert snippet before the checkout form on the WooCommerce checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:107
msgid "Insert snippet after the checkout form on the WooCommerce checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:110
msgid "Before Checkout Payment Button"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:111
msgid "Insert snippet before the checkout payment button on the WooCommerce checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:114
msgid "After Checkout Payment Button"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:115
msgid "Insert snippet after the checkout payment button on the WooCommerce checkout page."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:118
msgid "Before the Thank You Page"
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:119
msgid "Insert snippet before the thank you page content for WooCommerce."
msgstr ""
#: includes/lite/auto-insert/class-wpcode-auto-insert-woocommerce.php:130
msgid "WooCommerce Locations are a PRO feature"
msgstr ""
#: includes/lite/class-wpcode-admin-bar-info-lite.php:29
msgid "Page Scripts"
msgstr ""
#: includes/lite/class-wpcode-smart-tags-lite.php:20
msgid "Smart Tags are a Premium feature"
msgstr ""
#: includes/lite/class-wpcode-smart-tags-lite.php:21
msgid "Upgrade to PRO today and simplify the way you write advanced snippets using smart tags without having to write any PHP code."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:37
msgid "Device"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:49
msgid "Target either desktop or mobile devices."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:52
msgid "Device Type Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:53
msgid "Get access to advanced device type conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:58
msgid "Desktop"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:63
msgid "Mobile"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:70
msgid "Browser Type"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:71
msgid "Target specific visitor web browsers."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:74
msgid "Browser Type Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:75
msgid "Get access to advanced device conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:80
msgid "Operating System"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:81
msgid "Target operating systems like Windows, Mac OS or Linux."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:84
msgid "Operating System Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:85
msgid "Get access to advanced operating system conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:90
msgid "Cookie Name"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:91
msgid "Load or hide a snippet by cookie name."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:94
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:104
msgid "Cookie-based Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:95
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:105
msgid "Get access to advanced cookie conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:100
msgid "Cookie Value"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-device.php:101
msgid "Load or hide a snippet by cookie value."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:48
msgid "EDD Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:49
msgid "Load the snippet on specific Easy Digital Downloads pages."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:52
msgid "Easy Digital Downloads Page Rules is a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:53
msgid "Get access to advanced conditional logic rules for Easy Digital Downloads by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:58
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:58
msgid "Checkout Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:63
msgid "Confirmation Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:68
msgid "Single Download Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:73
msgid "Download Category Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-edd.php:78
msgid "Download Tag Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:40
msgid "Country"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:41
msgid "Limit loading the snippet based on the visitor's country."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:45
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:56
msgid "Location Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:46
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:57
msgid "Get access to location-based conditional logic rules by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:51
msgid "Continent"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-location.php:52
msgid "Target entire continents with ease."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:49
msgid "MemberPress Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:50
msgid "Load the snippet on specific MemberPress pages."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:53
msgid "MemberPress Page Rules is a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:54
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:83
msgid "Get access to advanced conditional logic rules for MemberPress by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:59
msgid "Registration Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:63
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:63
msgid "Thank You Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:67
msgid "Account Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:71
msgid "Login Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:77
msgid "User active membership"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:78
msgid "Check if the current user has a specific MemberPress subscription active."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-memberpress.php:82
msgid "MemberPress Active Membership Rules is a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:48
msgid "Date"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:49
msgid "Check whether today is before or after a date."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:53
msgid "Date & Time"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:54
msgid "Get more specific by also including a specific time."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:58
msgid "Day of the Week"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:59
msgid "Load the snippet on specific days of the week."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:64
msgid "Current time"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:65
msgid "Check whether it's before or after a specific time"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:72
msgid "Scheduling rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-schedule.php:73
msgid "Upgrade today and get access to advanced scheduling conditional logic rules."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-snippet.php:37
msgid "Snippet"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-snippet.php:49
msgid "Load this snippet based on another snippet being loaded."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-snippet.php:53
msgid "WPCode Snippet Loaded Rules are a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-snippet.php:54
msgid "Upgrade today and use conditional logic rules based on other WPCode snippets being loaded."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:48
msgid "WooCommerce Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:49
msgid "Load the snippet on specific WooCommerce pages."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:52
msgid "WooCommerce Page Rules is a Pro Feature"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:53
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:106
msgid "Get access to advanced conditional logic rules for WooCommerce by upgrading to PRO today."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:68
msgid "Cart Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:73
msgid "Single Product Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:78
msgid "Shop Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:83
msgid "Product Category Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:88
msgid "Product Tag Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:93
msgid "My Account Page"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:100
msgid "WooCommerce Cart"
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:101
msgid "Load the snippet based on the WooCommerce Cart Contents."
msgstr ""
#: includes/lite/conditional-logic/class-wpcode-conditional-woocommerce.php:105
msgid "WooCommerce Cart Contents Rule is a Pro Feature"
msgstr ""
#: includes/safe-mode.php:75
msgid "WPCode is in Safe Mode which means no snippets are getting executed. Please disable any snippets that have caused errors and when done click the button below to exit safe mode."
msgstr ""
#: includes/safe-mode.php:76
msgid "The link will open in a new window so if you are still encountering issues you safely can return to this tab and make further adjustments"
msgstr ""
#: includes/safe-mode.php:78
msgid "Exit safe mode"
msgstr ""
uninstall.php 0000644 00000011612 15021200650 0007256 0 ustar 00 query( "DROP TABLE IF EXISTS {$wpdb->prefix}wpcode_revisions" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange
// Delete settings.
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
// Delete ihaf data.
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'ihaf\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
// Delete plugin user meta.
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE 'wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
// Delete post meta.
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE 'wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
// Remove any transients we've left behind.
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_transient\_wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_site\_transient\_wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_transient\_timeout\_wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_site\_transient\_timeout\_wpcode\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_wpcode\_transient\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
// Delete wpcode post types.
$wpcode_posts = get_posts(
array(
'post_type' => array( 'wpcode', 'wpcode-blocks' ),
'post_status' => array( 'publish', 'draft', 'trash' ),
'numberposts' => - 1,
'fields' => 'ids',
)
);
if ( $wpcode_posts ) {
foreach ( $wpcode_posts as $wpcode_post ) {
wp_delete_post( $wpcode_post, true );
}
}
if ( function_exists( 'wpcode_register_taxonomies' ) ) {
wpcode_register_taxonomies();
}
// Delete all taxonomy terms.
$wpcode_taxonomies = array(
'wpcode_type',
'wpcode_location',
'wpcode_tags',
);
foreach ( $wpcode_taxonomies as $wpcode_taxonomy ) {
$terms = get_terms(
array(
'taxonomy' => $wpcode_taxonomy,
'hide_empty' => false,
'fields' => 'ids',
)
);
if ( $terms ) {
foreach ( $terms as $wpcode_term ) {
wp_delete_term( $wpcode_term, $wpcode_taxonomy );
}
}
}
global $wp_filesystem;
// Remove uploaded files.
$uploads_directory = wp_upload_dir();
if ( empty( $uploads_directory['error'] ) ) {
$wp_filesystem->rmdir( $uploads_directory['basedir'] . '/wpcode/', true );
$wp_filesystem->rmdir( $uploads_directory['basedir'] . '/wpcode-logs/', true );
}
// Remove translation files.
$languages_directory = defined( 'WP_LANG_DIR' ) ? trailingslashit( WP_LANG_DIR ) : trailingslashit( WP_CONTENT_DIR ) . 'languages/';
$translations = glob( wp_normalize_path( $languages_directory . 'plugins/wpcode-*' ) );
if ( ! empty( $translations ) ) {
foreach ( $translations as $file ) {
$wp_filesystem->delete( $file );
}
}
$translations = glob( wp_normalize_path( $languages_directory . 'plugins/insert-headers-and-footers-*' ) );
if ( ! empty( $translations ) ) {
foreach ( $translations as $file ) {
$wp_filesystem->delete( $file );
}
}
}
admin/images/icon-duplicator.png 0000644 00000010010 15021200650 0012662 0 ustar 00 PNG
IHDR kXT APLTE *GG*G*******G*GGG**GG*GGGGGG**GGG**G*G***GGG*GG***G*G****G*GGGGG***G*GGGG*G*G***GGG*GG*GGG*GG*G*G****G*GG*); itRNS ͣd",LD(4d_"ՓIBx[10mR
[~iǽNH*ʞQ;96²m&gs>WrxW@v{
IDATxKkP %KB*nBR\22J̦_`C&4^-OID&d2L&d2+twdi6]n"gUZ3@0d4h2iP#H *#
:i@S]1=R_` /
'E2D_ߊ!o;zŭr1ƸMrd5'`OnQx-
p
_`w_쓰Ny.=Rq!wo=O,z% e2
ָdQ3$$"\t)kCdd\GnD`hGE%B׃Fs{Gܰ>)Q5