-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqualtrics-embed.php
52 lines (45 loc) · 1.39 KB
/
qualtrics-embed.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
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
Plugin Name: Qualtrics Survey Embeds
Description: Adds a Qualtrics Embed Handler to WordPress allowing for quick survey embeds.
Plugin URI: https://github.com/michaelryanmcneill/qualtrics-embed/
Author: Michael McNeill (webdotunc)
Version: 1.0
Author URI: http://michaelryanmcneill.com
License: MIT License - http://opensource.org/licenses/MIT
*/
class QSEmbed {
private $plugin_path;
private $qse;
function __construct()
{
$this->plugin_path = plugin_dir_path( __FILE__ );
add_action( 'admin_menu', array(&$this, 'admin_menu'), 99 );
require_once( $this->plugin_path .'inc/options.php' );
require_once( $this->plugin_path .'inc/embed.php' );
$this->qse = new QSEmbedSettings( $this->plugin_path .'inc/settings/default.php', 'qse_settings' );
add_filter( $this->qse->get_option_group() .'_settings_validate', array(&$this, 'validate_settings') );
}
function admin_menu()
{
add_options_page( __( 'Qualtrics Settings', 'qse' ), __( 'Qualtrics Settings', 'qse' ), 'manage_options', 'qse', array(&$this, 'settings_page') );
}
function settings_page()
{
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"></div>
<h2>Qualtrics Survey Embeds</h2>
<?php
$this->qse->settings();
?>
</div>
<?php
}
function validate_settings( $input )
{
return $input;
}
}
new QSEmbed();
?>