/* Plugin Name: One Click Demo Import Plugin URI: https://wordpress.org/plugins/one-click-demo-import/ Description: Import your content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data. Version: 3.3.0 Requires at least: 5.5 Requires PHP: 5.6 Author: OCDI Author URI: https://ocdi.com License: GPL3 License URI: http://www.gnu.org/licenses/gpl.html Text Domain: one-click-demo-import Domain Path: /languages */ // Block direct access to the main plugin file. defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); /** * Main plugin class with initialization tasks. */ class OCDI_Plugin { /** * Constructor for this class. */ public function __construct() { /** * Display admin error message if PHP version is older than 5.6. * Otherwise execute the main plugin class. */ if ( version_compare( phpversion(), '5.6', '<' ) ) { add_action( 'admin_notices', array( $this, 'old_php_admin_error_notice' ) ); } else { // Set plugin constants. $this->set_plugin_constants(); // Composer autoloader. require_once OCDI_PATH . 'vendor/autoload.php'; // Instantiate the main plugin class *Singleton*. $one_click_demo_import = OCDI\OneClickDemoImport::get_instance(); // Register WP CLI commands if ( defined( 'WP_CLI' ) && WP_CLI ) { WP_CLI::add_command( 'ocdi list', array( 'OCDI\WPCLICommands', 'list_predefined' ) ); WP_CLI::add_command( 'ocdi import', array( 'OCDI\WPCLICommands', 'import' ) ); } } } /** * Display an admin error notice when PHP is older the version 5.6. * Hook it to the 'admin_notices' action. */ public function old_php_admin_error_notice() { /* translators: %1$s - the PHP version, %2$s and %3$s - strong HTML tags, %4$s - br HTMl tag. */ $message = sprintf( esc_html__( 'The %2$sOne Click Demo Import%3$s plugin requires %2$sPHP 5.6+%3$s to run properly. Please contact your hosting company and ask them to update the PHP version of your site to at least PHP 7.4%4$s Your current version of PHP: %2$s%1$s%3$s', 'one-click-demo-import' ), phpversion(), '', '', '
' ); printf( '

%1$s

', wp_kses_post( $message ) ); } /** * Set plugin constants. * * Path/URL to root of this plugin, with trailing slash and plugin version. */ private function set_plugin_constants() { // Path/URL to root of this plugin, with trailing slash. if ( ! defined( 'OCDI_PATH' ) ) { define( 'OCDI_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'OCDI_URL' ) ) { define( 'OCDI_URL', plugin_dir_url( __FILE__ ) ); } // Used for backward compatibility. if ( ! defined( 'PT_OCDI_PATH' ) ) { define( 'PT_OCDI_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'PT_OCDI_URL' ) ) { define( 'PT_OCDI_URL', plugin_dir_url( __FILE__ ) ); } // Action hook to set the plugin version constant. add_action( 'admin_init', array( $this, 'set_plugin_version_constant' ) ); } /** * Set plugin version constant -> OCDI_VERSION. */ public function set_plugin_version_constant() { $plugin_data = get_plugin_data( __FILE__ ); if ( ! defined( 'OCDI_VERSION' ) ) { define( 'OCDI_VERSION', $plugin_data['Version'] ); } // Used for backward compatibility. if ( ! defined( 'PT_OCDI_VERSION' ) ) { define( 'PT_OCDI_VERSION', $plugin_data['Version'] ); } } } // Instantiate the plugin class. $ocdi_plugin = new OCDI_Plugin();{"id":837,"date":"2022-05-07T14:46:50","date_gmt":"2022-05-07T14:46:50","guid":{"rendered":"https:\/\/demo.adorethemes.com\/adore-blog-pro\/?page_id=16"},"modified":"2026-08-21T17:37:18","modified_gmt":"2026-08-21T17:37:18","slug":"home","status":"publish","type":"page","link":"https:\/\/www.gaininfotech.com\/blog\/","title":{"rendered":"Home"},"content":{"rendered":"
https:\/\/ffdd.com<\/a><\/div>\n
https:\/\/fdfd.com\/<\/a><\/div>\n
https:\/\/fdfd.com\/<\/a><\/div>\n
https:\/\/fdfd.com\/<\/a><\/div>\n
https:\/\/test.com\/<\/a><\/div>\n
https:\/\/test123.com\/<\/a><\/div>\n
https:\/\/test123.com\/<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"

https:\/\/ffdd.com https:\/\/fdfd.com\/ https:\/\/fdfd.com\/ https:\/\/fdfd.com\/ https:\/\/test.com\/ https:\/\/test123.com\/ https:\/\/test123.com\/<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-837","page","type-page","status-publish","hentry"],"yoast_head":"\nRead Our Latest Blogs - Gain Infotech<\/title>\n<meta name=\"description\" content=\"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.gaininfotech.com\/blog\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Read Our Latest Blogs - Gain Infotech\" \/>\n<meta property=\"og:description\" content=\"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gaininfotech.com\/blog\/\" \/>\n<meta property=\"og:site_name\" content=\"Read Our Latest Blogs - Gain Infotech\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-21T17:37:18+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/\",\"url\":\"https:\/\/www.gaininfotech.com\/blog\/\",\"name\":\"Read Our Latest Blogs - Gain Infotech\",\"isPartOf\":{\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#website\"},\"datePublished\":\"2022-05-07T14:46:50+00:00\",\"dateModified\":\"2026-08-21T17:37:18+00:00\",\"description\":\"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.gaininfotech.com\/blog\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.gaininfotech.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#website\",\"url\":\"https:\/\/www.gaininfotech.com\/blog\/\",\"name\":\"Read Our Latest Blogs - Gain Infotech\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.gaininfotech.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#organization\",\"name\":\"Read Our Latest Blogs - Gain Infotech\",\"url\":\"https:\/\/www.gaininfotech.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.gaininfotech.com\/blog\/wp-content\/uploads\/2023\/10\/logo.png\",\"contentUrl\":\"https:\/\/www.gaininfotech.com\/blog\/wp-content\/uploads\/2023\/10\/logo.png\",\"width\":250,\"height\":105,\"caption\":\"Read Our Latest Blogs - Gain Infotech\"},\"image\":{\"@id\":\"https:\/\/www.gaininfotech.com\/blog\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Read Our Latest Blogs - Gain Infotech","description":"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gaininfotech.com\/blog\/","og_locale":"en_US","og_type":"article","og_title":"Read Our Latest Blogs - Gain Infotech","og_description":"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!","og_url":"https:\/\/www.gaininfotech.com\/blog\/","og_site_name":"Read Our Latest Blogs - Gain Infotech","article_modified_time":"2026-08-21T17:37:18+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.gaininfotech.com\/blog\/","url":"https:\/\/www.gaininfotech.com\/blog\/","name":"Read Our Latest Blogs - Gain Infotech","isPartOf":{"@id":"https:\/\/www.gaininfotech.com\/blog\/#website"},"datePublished":"2022-05-07T14:46:50+00:00","dateModified":"2026-08-21T17:37:18+00:00","description":"Here you can read our latest blogs. We are sharing information about the business. To read our blog visit here today!","breadcrumb":{"@id":"https:\/\/www.gaininfotech.com\/blog\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gaininfotech.com\/blog\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.gaininfotech.com\/blog\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gaininfotech.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Home"}]},{"@type":"WebSite","@id":"https:\/\/www.gaininfotech.com\/blog\/#website","url":"https:\/\/www.gaininfotech.com\/blog\/","name":"Read Our Latest Blogs - Gain Infotech","description":"","publisher":{"@id":"https:\/\/www.gaininfotech.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gaininfotech.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.gaininfotech.com\/blog\/#organization","name":"Read Our Latest Blogs - Gain Infotech","url":"https:\/\/www.gaininfotech.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gaininfotech.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.gaininfotech.com\/blog\/wp-content\/uploads\/2023\/10\/logo.png","contentUrl":"https:\/\/www.gaininfotech.com\/blog\/wp-content\/uploads\/2023\/10\/logo.png","width":250,"height":105,"caption":"Read Our Latest Blogs - Gain Infotech"},"image":{"@id":"https:\/\/www.gaininfotech.com\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/pages\/837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/comments?post=837"}],"version-history":[{"count":8,"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/pages\/837\/revisions"}],"predecessor-version":[{"id":33672,"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/pages\/837\/revisions\/33672"}],"wp:attachment":[{"href":"https:\/\/www.gaininfotech.com\/blog\/wp-json\/wp\/v2\/media?parent=837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}