<?php


/*
 * Copyright (c) 2012-2022, Squirrly.
 * The copyrights to the software code in this file are licensed under the (revised) BSD open source license.

 * Plugin Name: Starbox New
 * Plugin URI: https://wordpress.org/plugins/squirrly-seo/
 * Description: Starbox New
 * Author: Squirrly
 * Author URI: https://plugin.squirrly.co
 * Version: 2.1.2
 * License: GPLv2 or later
 * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Text Domain: starbox-new
 * Domain Path: /languages
 */


    function add_media_button() {
        printf( '<a href="%s" class="button my-button my-custom-button" id="my-custom-button">hello</a>', '#', __( 'My Custom Button', 'textdomain' ) );
    }
         
    add_action( 'media_buttons', 'add_media_button' );
         
    if (!defined('STRB_VERSION')) {}
    /* SET THE CURRENT VERSION ABOVE AND BELOW */
    define('STRB_VERSION', '2.1.2');

    // Call config files
    try {
            include_once dirname(__FILE__) . '/config/config.php';
            include_once dirname(__FILE__) . '/debug/index.php';
           
            //require_once(plugin_dir_path(__FILE__)."/myRegistration/register_script.php");
            /* important to check the PHP version */
            // inport main classes
            include_once _STRB_CLASSES_DIR_ . 'ObjController.php';

            // Load helpers
            STRB_Classes_ObjController::getClass('STRB_Classes_Helpers_Tools');
            STRB_Classes_ObjController::getClass('STRB_Classes_Helpers_Sanitize');
            // Load the Front and Block controller
            STRB_Classes_ObjController::getClass('STRB_Classes_FrontController');

         
            include_once _STRB_MODEL_DIR_ . 'JSONDataModel.php';
            include_once _STRB_MODEL_DIR_ . 'ThemeUserData.php';

 
            //include_once _STRB_CLASSES_DIR_ . 'StarboxAuth.php';
            
            //add extra user fields
             include_once _STRB_CLASSES_DIR_ . 'AuthEditor.php';
             Strb_Edit_Author::add();
             
            
            require_once(plugin_dir_path(__FILE__) . '/update.php');

            if (STRB_Classes_Helpers_Tools::isBackedAdmin()) {
                STRB_Classes_ObjController::getClass('STRB_Classes_FrontController')->runAdmin();

                //Upgrade Squirrly call.
                register_activation_hook(__FILE__, array(STRB_Classes_ObjController::getClass('STRB_Classes_Helpers_Tools'), 'strb_activate'));

                if(STRB_Classes_Helpers_Tools::getOption('deleteDataCheck')=='true'){
                    register_deactivation_hook(__FILE__, array(STRB_Classes_ObjController::getClass('STRB_Classes_Helpers_Tools'),'strb_deactivate'));}
                    
            } else {
                STRB_Classes_ObjController::getClass('STRB_Classes_FrontController')->runFrontend();
            }
            //register_uninstall_hook(__FILE__,STRB_Classes_ObjController::getClass('STRB_Classes_Helpers_Tools')->strb_deactivate());           

        } catch (Exception $e) {
        };
    
       