• Resolved transbetty

    (@transbetty)


    Hello, is there a way to directly use PHP functions/classes of this plugin in PHP? It would be great to have possibility to use plugin templates (not just in the page/post content).

    simplified:

    <?php if (customPluginFunction == "US") { .. do something .. "} ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Damian

    (@timersys)

    The free version only have these available:

    function geot_target( $country = '', $region = '', $exclude_country = '', $exclude_region  = '' ) {
     	global $geot;
    
     	return $geot->functions->target( $country, $region, $exclude_country, $exclude_region );
     }
    
    /**
     * Get current user country
     * @return array Current user country array
     */
     function geot_user_country( ){
     	global $geot;
    
     	return $geot->functions->get_user_country();
     }
    
    /** 
     * Displays the 2 character country for the current user
     * [geot_country_code] 
     * @return  string country CODE
     **/
    function geot_country_code( ) {
    	
    	$c = geot_user_country();
    
    	return $c->isoCode;
    }
    
    /** 
     * Displays the country name for the current user
     * [geot_country_name]
     * @return  string country name
     **/
    function geot_country_name() {
    	global $geot;
    
    	$c = $geot->functions->get_user_country();
    
    	return $c->name;
    }

    Thanks

    Thread Starter transbetty

    (@transbetty)

    I will test it. Thank you for the super fast answer!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using this plugin in PHP’ is closed to new replies.