32 lines
845 B
PHP
32 lines
845 B
PHP
<?php
|
|
/*
|
|
Plugin Name: Toggle Aid
|
|
Description: All of the important functionality of your site belongs in this.
|
|
Version: 0.1
|
|
License: GPL
|
|
Author: Richard Turner
|
|
Author URI: yoururl
|
|
*/
|
|
|
|
if ( get_current_user_id() ){
|
|
include_once 'includes/toggle-aid.php';
|
|
}
|
|
|
|
function ff_enqueue_styles(){
|
|
//error_log(__LINE__." ".__FUNCTION__);
|
|
$template_url = get_template_directory_uri();
|
|
$plugin_url = plugin_dir_url( __FILE__ );
|
|
|
|
if ( get_current_user_id() ){
|
|
wp_register_script('toggle-aid-script', $plugin_url . 'js/toggle-aid.js', array('jquery'), null, true);
|
|
wp_enqueue_script('toggle-aid-script');
|
|
wp_register_style( 'toggle-aid-css', $plugin_url.'css/toggle-aid.css', false, NULL, 'all');
|
|
wp_enqueue_style( 'toggle-aid-css' );
|
|
}
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'ff_enqueue_styles' );
|
|
|
|
|
|
|
|
|
|
?>
|