Code Monkey home page Code Monkey logo

bbacoursematchquiz's Introduction

BBA QUIZ MATCH

// Default Begin 0 to 10 layouts 
// Configuration
add_action('init', function() {
	
  if(isset($_GET['begin']))      { BBAQuizMatchPageURL::setURL('begin');
  } else if(isset($_GET['pg1'])) { BBAQuizMatchPageURL::setURL('pg1'); 
  } else if(isset($_GET['pg2'])) { BBAQuizMatchPageURL::setURL('pg2'); 
  } else if(isset($_GET['pg3'])) { BBAQuizMatchPageURL::setURL('pg3'); 
  } else if(isset($_GET['pg4'])) { BBAQuizMatchPageURL::setURL('pg4'); 
  } else { BBAQuizMatchPageURL::setURL('result'); }

   if(BAQuizMatchPageURL::URL() == true ) {	

     add_action( 'bba_qm_top_add_settings_before_parent', function() {

	BBAQMSelf::assetInstall([
	   'rel'  => 'stylesheet',
	   'type' => 'text/css',
	   'href' => '/wp-content/plugins/bbacoursematchquiz/public/css/bootstrap.min.css'
	], 'style');
	BBAQMSelf::launch();
	BBAQMSelf::assetInstall([
	   'rel'  => 'stylesheet',
	   'type' => 'text/css',
	   'href' => '/wp-content/plugins/bbacoursematchquiz/public/css/bbacoursematchquiz-public.css'
	], 'style');
	BBAQMSelf::launch();
	BBAQMSelf::assetInstall([
	   'type' => 'text/javascript',
	   'id'   => 'jQuery',
	   'src'  => '/wp-content/plugins/bbacoursematchquiz/public/js/jquery-3.6.0.min.js'
	]);
	BBAQMSelf::launch();
	BBAQMSelf::assetInstall([
	   'type' => 'text/javascript',
	   'id'   => 'script_id',
	   'src'  => '/wp-content/plugins/bbacoursematchquiz/public/js/bbacoursematchquiz-public.js'
	]);
	BBAQMSelf::launch();
  });   

    add_action( 'bba_qm_add_settings_after_child_parent', function() { print(BBAQMSelf::BBABranding()); });

  }
});
 // Activation page
 add_action('init', function() {
      
  if (class_exists('BBAQMSelection')) {     
 
       BBAQuizMatchPageURL::setURL('begin');
     
     if(BBAQuizMatchPageURL::URL() == true ) {

	  BBAQMSelection::BBATemplate('1-col' , ['box-md' , 'bba_mq'] ); 
	  BBAQMSelection::BBAaddCol1Content([
			   
	     'target'    => 'bba_qm_begin', 
	     'redirect'  =>  get_site_url().'/?pg1', 
	     'question'  => 'BEGIN',
	     'selection' =>  [] 
			 
	  ],'lg', function() {
   
	     $html  = '';
	     $html .= '<h3>Which BBA course is right for me?</h3>';
	     $html .= '<p>Take the quiz to be matched with your perfect lash journey!</p>';

	      return($html);
   
	  });
	  BBAQMSelection::execute();  

	}

 } else {
   echo "PG1 | WP Plugin: BBA Quiz Match was removed or deactivated";
 }  

 });
 # Using Hooks 
  - bba_qm_top_add_settings_before_parent
  - bba_qm_add_settings_before_child_parent
  - bba_qm_add_settings_after_child_parent
  - bba_qm_add_settings_after_child_row_parent
  - bba_qm_add_settings_bottom_child_row_parent
  - bba_qm_add_settings_bottom_child_parent
  - bba_qm_add_settings_after_bottom_child_parent
  - bba_qm_add_settings_after_bottom_parent
 
 # Hook References: plugins/bbacoursematchquiz/admin/class-bbacoursematchquiz-quiz-match.php
 
  add_action( 'bba_qm_add_settings_bottom_child_row_parent', function() {
  
    BBAQMSelection::BBAaddCol1Content([	
       'target'    => 'bba_qm2b_form', 
       'origin'    => 'http://localhost/bba/?begin',
       'redirect'  => 'http://localhost/bba/?bba-qm-pg2', 
       'question'  => "I have some experience",
       'selection' =>  [0,1,0,3] 

    ],'lg', function() { 
						
        return(BBAQMPerform::do_insert());
					
    });
					
    BBAQMSelection::addColContent();
 });

bbacoursematchquiz's People

Contributors

nielsoffice avatar nielsoffice-pro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.