0

class contactform{

public function __construct(){

add_action('home.php', array($this, 'enqueue')); add_shortcode('contact', array($this, 'enqueue')); }

function activate(){

}

function deactivate(){

} function register(){ add_action('admin_enqueue_style', array($this, 'enqueue'));

}

function enqueue(){

wp_enqueue_style('myPlugin', plugins_url('home.css', __FILE__));

}

}

$contact = new contactform(); $contact->register();

register_activation_hook(FILE, array($contact, 'activate')); register_deactivation_hook(FILE, array($contact, 'deactivate'));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.