cosmoswp.php
61 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; |
| 4 | } |
| 5 | |
| 6 | if ( ! class_exists( 'Advanced_Import_Theme_CosmosWP' ) ) { |
| 7 | |
| 8 | /** |
| 9 | * Functions related to About Block |
| 10 | * |
| 11 | * @package Advanced Import |
| 12 | * @subpackage Advanced_Import_Theme_CosmosWP |
| 13 | * @since 1.0.5 |
| 14 | */ |
| 15 | |
| 16 | class Advanced_Import_Theme_CosmosWP extends Advanced_Import_Theme_Template_Library_Base { |
| 17 | |
| 18 | /** |
| 19 | * Theme author |
| 20 | * This class is created for acmethemes theme |
| 21 | * Check for author |
| 22 | * |
| 23 | * @since 1.0.5 |
| 24 | * @access protected |
| 25 | */ |
| 26 | protected $theme_author = 'cosmoswp'; |
| 27 | |
| 28 | /** |
| 29 | * API endpoint for demo data. |
| 30 | * |
| 31 | * @since 2.0.0 |
| 32 | * @access protected |
| 33 | */ |
| 34 | protected $api_url = 'https://demo.patternswp.com/wp-json/patternswp-demo-setup/v1/demo-data'; |
| 35 | |
| 36 | /** |
| 37 | * Gets an instance of this object. |
| 38 | * Prevents duplicate instances which avoid artefacts and improves performance. |
| 39 | * |
| 40 | * @static |
| 41 | * @access public |
| 42 | * @since 1.0.5 |
| 43 | * @return object |
| 44 | */ |
| 45 | public static function get_instance() { |
| 46 | |
| 47 | // Store the instance locally to avoid private static replication. |
| 48 | static $instance = null; |
| 49 | |
| 50 | // Only run these methods if they haven't been ran previously. |
| 51 | if ( null === $instance ) { |
| 52 | $instance = new self(); |
| 53 | } |
| 54 | |
| 55 | // Always return the instance. |
| 56 | return $instance; |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | Advanced_Import_Theme_CosmosWP::get_instance()->run(); |
| 61 |