-
Notifications
You must be signed in to change notification settings - Fork 0
/
aha_planEstudio.php
41 lines (32 loc) · 1.1 KB
/
aha_planEstudio.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
Plugin Name: Planes de Estudio
Plugin URI: #/
Description: Plugin que consume web service para mostrar planes de estudio
Version: 1
Author: Anderson Holguin
Author URI: http://#
License: GPLv2 or later
*/
/*
Este programa ha sido creado la Universidad Catolica, para mostrar la información de sus planes de estudio.
*/
define('PLAN_ESTUDIO_PLUGIN_DIR', plugin_dir_path(__FILE__));
//require_once ( PLAN_ESTUDIO_PLUGIN_DIR . 'controllerPe.class.php');
add_action('init', 'setShortCodes');
if (!function_exists('setShortCodes')) {
function setShortCodes() {
add_shortcode('Planes_Estudio_AHA', 'getPlanes');
wp_register_script('script_planEstudio', plugins_url() . '/aha_planEstudio/view/js/vistaPe.js');
}
}
if (!function_exists('getPlanes')) {
function getPlanes($args, $content) {
if (!$args['programacod']) {
die('Por favor asigne código del programa.');
}
wp_enqueue_script('script_planEstudio');
define(__PROGAMA, $args['programacod']);
include_once (PLAN_ESTUDIO_PLUGIN_DIR . '/view/vistaPe.php');
}
}