Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page - Version 19.6.8

Version Description

  • readme changes
    • add admin loader
Download this release

Release Info

Developer kucaahbe
Plugin Icon 128x128 Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page
Version 19.6.8
Comparing to
See all releases

Code changes from version 19.6.7 to 19.6.8

admin/admin-page-loader.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ class OpinionStageAdminPageLoader {
6
+ protected static $instance = false;
7
+ protected $slug = false;
8
+ protected $assetsPath = "resources/";
9
+ protected $helpersPath = "helpers/";
10
+ protected $viewsPath = "views/";
11
+
12
+ protected function __construct() {
13
+
14
+ $this->OSAPL_Debug('OSAPL: Constructor Invoked');
15
+
16
+ // Check if page is for OpinionStage plugin and prepare page slug
17
+ $this->OSAPL_PrepareSlug();
18
+
19
+ // Apply page loader actions if it is OpinionStage plugin page
20
+ if($this->slug != false){
21
+
22
+ $this->OSAPL_Debug('OSAPL: Load Page Loader for Slug - '.$this->slug);
23
+
24
+ $this->OSAPL_LoadFile();
25
+ add_action( 'admin_enqueue_scripts',array( $this, 'OSAPL_LoadAssets' ) );
26
+ add_action( 'admin_head', array( $this, 'OSAPL_LoadHeader' ) );
27
+ add_action('admin_footer',array( $this, 'OSAPL_LoadFooter' ));
28
+ }else{
29
+ $this->OSAPL_Debug('OSAPL: Not OpinionStage Page. Loading Content Popup File.');
30
+ // Load content popup javascript
31
+ include_once( plugin_dir_path( __FILE__ ).'content-popup.php' );
32
+ }
33
+ }
34
+
35
+ public function OSAPL_Debug($string){
36
+ if( (defined('WP_DEBUG') && WP_DEBUG == true) || (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG == true) ){
37
+ error_log($string."\r\n");
38
+ }
39
+ }
40
+
41
+ public function OSAPL_PrepareSlug(){
42
+ if(isset($_REQUEST['page'])){
43
+ $qryStrCheckOs = sanitize_text_field($_REQUEST['page']);
44
+ $qryStrCheckOs = explode("-",$qryStrCheckOs);
45
+ if($qryStrCheckOs[0] == 'opinionstage'){
46
+ $querystring = str_replace('opinionstage-', '', sanitize_text_field($_REQUEST['page']));
47
+
48
+ $this->OSAPL_Debug('OSAPL: Slug applied - '.$querystring);
49
+ $this->slug = $querystring;
50
+ }
51
+ }
52
+ }
53
+
54
+ public function OSAPL_LoadFile(){
55
+
56
+ if(file_exists(plugin_dir_path( __FILE__ ).$this->assetsPath."common.php")){
57
+ include_once(plugin_dir_path( __FILE__ ).$this->assetsPath."common.php");
58
+ $this->OSAPL_Debug('OSAPL: Loaded Common Assets File');
59
+ }else{
60
+ $this->OSAPL_Debug('OSAPL: Common Assets File Not Found');
61
+ }
62
+
63
+ if(file_exists(plugin_dir_path( __FILE__ ).$this->assetsPath.$this->slug.".php")){
64
+ include_once(plugin_dir_path( __FILE__ ).$this->assetsPath.$this->slug.".php");
65
+ $this->OSAPL_Debug('OSAPL: Loaded '.$this->slug.' Assets File');
66
+ }else{
67
+ $this->OSAPL_Debug('OSAPL: '.$this->slug.' Assets File Not Found');
68
+ }
69
+ }
70
+
71
+ public function OSAPL_LoadAssets(){
72
+ $function_name = str_replace("-", "_", $this->slug);
73
+ $function_name = "opinionstage_".$function_name."_load_resources";
74
+ if( function_exists($function_name) ){
75
+ $this->OSAPL_Debug('OSAPL: Calling resources function - '.$function_name);
76
+ call_user_func($function_name);
77
+ }else{
78
+ $this->OSAPL_Debug('OSAPL: Resources function does not exist: '.$function_name);
79
+ }
80
+ $function_name_common = "opinionstage_common_load_resources";
81
+ if( function_exists($function_name_common) ){
82
+ $this->OSAPL_Debug('OSAPL: Calling common resources function - '.$function_name_common);
83
+ call_user_func($function_name_common);
84
+ }else{
85
+ $this->OSAPL_Debug('OSAPL: Resources function does not exist: '.$function_name_common);
86
+ }
87
+ }
88
+
89
+ public function OSAPL_LoadHeader(){
90
+ $function_name_header = str_replace("-", "_", $this->slug);
91
+ $function_name_header = "opinionstage_".$function_name_header."_load_header";
92
+ if( function_exists($function_name_header) ){
93
+ $this->OSAPL_Debug('OSAPL: Calling header function - '.$function_name_header);
94
+ call_user_func($function_name_header);
95
+ }else{
96
+ $this->OSAPL_Debug('OSAPL: Header function does not exist: '.$function_name_header);
97
+ }
98
+
99
+ $function_name_header_common = "opinionstage_common_load_header";
100
+ if( function_exists($function_name_header_common) ){
101
+ $this->OSAPL_Debug('OSAPL: Calling common header function - '.$function_name_header_common);
102
+ call_user_func($function_name_header_common);
103
+ }else{
104
+ $this->OSAPL_Debug('OSAPL: Header common function does not exist: '.$function_name_header_common);
105
+ }
106
+ }
107
+
108
+ public function OSAPL_LoadFooter(){
109
+ $function_name_footer = str_replace("-", "_", $this->slug);
110
+ $function_name_footer = "opinionstage_".$function_name_footer."_load_footer";
111
+ if( function_exists($function_name_footer) ){
112
+ $this->OSAPL_Debug('OSAPL: Calling footer function - '.$function_name_footer);
113
+ call_user_func($function_name_footer);
114
+ }else{
115
+ $this->OSAPL_Debug('OSAPL: Footer function does not exist: '.$function_name_footer);
116
+ }
117
+ $function_name_footer_common = "opinionstage_common_load_footer";
118
+ if( function_exists($function_name_footer_common) ){
119
+ $this->OSAPL_Debug('OSAPL: Calling common footer function - '.$function_name_footer_common);
120
+ call_user_func($function_name_footer_common);
121
+ }else{
122
+ $this->OSAPL_Debug('OSAPL: Footer common function does not exist: '.$function_name_footer_common);
123
+ }
124
+ }
125
+
126
+ public function OSAPL_LoadTemplateFile(){
127
+ $file_name = str_replace("-", "_", $this->slug);
128
+ $file_name = $file_name.".php";
129
+ if(file_exists(plugin_dir_path( __FILE__ ).$this->helpersPath."common.php")){
130
+ $this->OSAPL_Debug('OSAPL: Loading common file - '.'common.php');
131
+ include plugin_dir_path( __FILE__ ).$this->helpersPath."common.php";
132
+ }else{
133
+ $this->OSAPL_Debug('OSAPL: Common file does not exist: '.'common.php');
134
+ }
135
+ if(file_exists(plugin_dir_path( __FILE__ ).$this->helpersPath.$file_name)){
136
+ $this->OSAPL_Debug('OSAPL: Loading helpers file - '.$file_name);
137
+ include plugin_dir_path( __FILE__ ).$this->helpersPath.$file_name;
138
+ }else{
139
+ $this->OSAPL_Debug('OSAPL: Helpers file does not exist: '.$file_name);
140
+ }
141
+ if(file_exists(plugin_dir_path( __FILE__ ).$this->viewsPath.$file_name)){
142
+ $this->OSAPL_Debug('OSAPL: Loading views file - '.$file_name);
143
+ include plugin_dir_path( __FILE__ ).$this->viewsPath.$file_name;
144
+ }else{
145
+ $this->OSAPL_Debug('OSAPL: Views file does not exist: '.$file_name);
146
+ }
147
+ }
148
+
149
+ public static function getInstance(){
150
+ if(self::$instance == false){
151
+ self::$instance = new OpinionStageAdminPageLoader();
152
+ }
153
+ return self::$instance;
154
+ }
155
+ }
156
+
157
+ OpinionStageAdminPageLoader::getInstance();
158
+ ?>
admin/content-popup.php CHANGED
@@ -14,16 +14,13 @@ function opinionstage_content_popup_add_editor_button() {
14
  function opinionstage_content_popup_js() {
15
 
16
  // asset loader hotfix TODO: improve this loader machanism
17
- if ( !(isset($_REQUEST['page']) && ($_REQUEST['page'] == OPINIONSTAGE_MENU_SLUG || $_REQUEST['page'] == OPINIONSTAGE_PLACEMENT_SLUG || $_REQUEST['page'] == OPINIONSTAGE_GETTING_STARTED_SLUG)) ) {
18
  opinionstage_register_javascript_asset(
19
  'content-popup',
20
  'content-popup.js',
21
  array('jquery')
22
  );
23
 
24
- opinionstage_enqueue_js_asset('content-popup');
25
- }
26
-
27
  }
28
 
29
  function opinionstage_content_popup_html() {
14
  function opinionstage_content_popup_js() {
15
 
16
  // asset loader hotfix TODO: improve this loader machanism
 
17
  opinionstage_register_javascript_asset(
18
  'content-popup',
19
  'content-popup.js',
20
  array('jquery')
21
  );
22
 
23
+ opinionstage_enqueue_js_asset('content-popup');
 
 
24
  }
25
 
26
  function opinionstage_content_popup_html() {
admin/css/menu-page.css CHANGED
@@ -5,6 +5,7 @@
5
  width: 100%;
6
  -webkit-font-smoothing: antialiased;
7
  padding-top: 20px;
 
8
  }
9
  #opinionstage-content a {
10
  color: #3499c2;
@@ -345,6 +346,7 @@
345
  width: 100%;
346
  max-width: 100%;
347
  padding: 30px;
 
348
  }
349
  .gettingStartedSection p {
350
  font-size: 20px;
@@ -354,15 +356,13 @@
354
  .gettingStartedSection .Video-Section {
355
  display: block;
356
  width: 100%;
357
- max-width: 700px;
358
- /*margin: 0px auto;*/
359
  }
360
  .Video-Section .iframe-new {
361
  display: block;
362
  width: 100%;
363
- max-width: 700px;
364
- margin: 0 auto;
365
- margin-bottom: 30px;
366
  }
367
  h1.gettingStartedHeading {
368
  letter-spacing: 1px;
@@ -389,7 +389,6 @@ h1.gettingStartedHeading_logo {
389
  max-width: fit-content;
390
  font-size: 20px;
391
  margin-top: 20px;
392
- margin-bottom: 20px;
393
  letter-spacing: 1px;
394
  }
395
  /* Getting Started Not Connected */
@@ -401,4 +400,41 @@ h1.gettingStartedHeading_logo {
401
  }
402
  .gettingStartedSectionNotConnect p {
403
  font-size: 20px;
404
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  width: 100%;
6
  -webkit-font-smoothing: antialiased;
7
  padding-top: 20px;
8
+ overflow: hidden;
9
  }
10
  #opinionstage-content a {
11
  color: #3499c2;
346
  width: 100%;
347
  max-width: 100%;
348
  padding: 30px;
349
+ overflow: hidden;
350
  }
351
  .gettingStartedSection p {
352
  font-size: 20px;
356
  .gettingStartedSection .Video-Section {
357
  display: block;
358
  width: 100%;
359
+ max-width: 650px;
360
+ float: left;
361
  }
362
  .Video-Section .iframe-new {
363
  display: block;
364
  width: 100%;
365
+ max-width: 600px;
 
 
366
  }
367
  h1.gettingStartedHeading {
368
  letter-spacing: 1px;
389
  max-width: fit-content;
390
  font-size: 20px;
391
  margin-top: 20px;
 
392
  letter-spacing: 1px;
393
  }
394
  /* Getting Started Not Connected */
400
  }
401
  .gettingStartedSectionNotConnect p {
402
  font-size: 20px;
403
+ }
404
+ .text-section-getting-stared-os {
405
+ width: 100%;
406
+ max-width: 400px;
407
+ float: left;
408
+ }
409
+ @media only screen and (max-width: 1230px) {
410
+ .text-section-getting-stared-os {
411
+ margin-top: 39px;
412
+ padding-left: 25px;
413
+ }
414
+ }
415
+ @media only screen and (max-width: 375px) {
416
+ .gettingStartedSection {
417
+ padding-left: 0 !important;
418
+ padding-right: 0 !important;
419
+ padding-top: 20px !important;
420
+ }
421
+ #opinionstage-content .opinionstage-status-content {
422
+ height: 160px !important;
423
+ }
424
+ #opinionstage-content .opinionstage-status-content-connected {
425
+ height: 162px !important;
426
+ }
427
+ .gettingStartedSection p {
428
+ text-align: center;
429
+ }
430
+ #opinionstage-content .opinionstage-blue-btn {
431
+ margin-top: 15px;
432
+ margin-left: 30px;
433
+ }
434
+ #opinionstage-content a.gettingStartedCreate.button {
435
+ margin: 20px auto 0px !important;
436
+ }
437
+ .text-section-getting-stared-os p{
438
+ text-align: left;
439
+ }
440
+ }
admin/enqueue-scripts.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- // block direct access to plugin PHP files:
3
- defined( 'ABSPATH' ) or die();
4
-
5
- function opinionstage_admin_page_assets() {
6
-
7
- if ( isset($_REQUEST['page']) && ($_REQUEST['page'] == OPINIONSTAGE_MENU_SLUG || $_REQUEST['page'] == OPINIONSTAGE_PLACEMENT_SLUG || $_REQUEST['page'] == OPINIONSTAGE_GETTING_STARTED_SLUG)) {
8
-
9
- opinionstage_register_css_asset( 'menu-page', 'menu-page.css' );
10
- opinionstage_register_css_asset( 'icon-font', 'icon-font.css' );
11
- opinionstage_register_javascript_asset( 'menu-page', 'menu-page.js', array('jquery') );
12
-
13
- opinionstage_enqueue_css_asset('menu-page');
14
- opinionstage_enqueue_css_asset('icon-font');
15
- opinionstage_enqueue_js_asset('menu-page');
16
-
17
- }
18
- }
19
-
20
- add_action( 'admin_enqueue_scripts', 'opinionstage_admin_page_assets' );
21
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/helpers/common.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
6
+ $os_client_logged_in = opinionstage_user_logged_in();
7
+
8
+ ?>
admin/helpers/getting_started.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ // Declare functions here needed for the page
6
+
7
+ ?>
admin/helpers/my_placements.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ // Declare functions here needed for the page
6
+
7
+ ?>
admin/helpers/settings.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ // Declare functions here needed for the page
6
+
7
+ ?>
admin/init.php CHANGED
@@ -2,12 +2,12 @@
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
4
 
5
- require( plugin_dir_path( __FILE__ ).'enqueue-scripts.php' );
6
  require( plugin_dir_path( __FILE__ ).'opinionstage-login-callback.php' );
7
  require( plugin_dir_path( __FILE__ ).'opinionstage-disconnect.php' );
8
  require( plugin_dir_path( __FILE__ ).'opinionstage-content-login-callback.php' );
9
  require( plugin_dir_path( __FILE__ ).'menu-page.php' );
10
- require( plugin_dir_path( __FILE__ ).'content-popup.php' );
11
  require( plugin_dir_path( __FILE__ ).'deactivate-feedback.php' );
 
 
12
 
13
  ?>
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
4
 
 
5
  require( plugin_dir_path( __FILE__ ).'opinionstage-login-callback.php' );
6
  require( plugin_dir_path( __FILE__ ).'opinionstage-disconnect.php' );
7
  require( plugin_dir_path( __FILE__ ).'opinionstage-content-login-callback.php' );
8
  require( plugin_dir_path( __FILE__ ).'menu-page.php' );
 
9
  require( plugin_dir_path( __FILE__ ).'deactivate-feedback.php' );
10
+ require( plugin_dir_path( __FILE__ ).'admin-page-loader.php' );
11
+ require( plugin_dir_path( __FILE__ ).'menu-target.php' );
12
 
13
  ?>
admin/menu-page.php CHANGED
@@ -1,28 +1,25 @@
1
  <?php
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
4
-
5
  require_once( plugin_dir_path( __FILE__ ).'../includes/opinionstage-client-session.php' );
6
-
7
  add_action( 'admin_menu', 'opinionstage_register_menu_page' );
8
-
9
  function opinionstage_register_menu_page() {
10
  if (function_exists('add_menu_page')) {
11
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
12
  $os_client_logged_in = opinionstage_user_logged_in();
13
- if ($os_client_logged_in) {
14
  add_menu_page(
15
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
16
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
17
  'edit_posts',
18
  OPINIONSTAGE_MENU_SLUG,
19
- 'opinionstage_menu_page',
20
  plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
21
  '25.234323221'
22
- );
23
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG);
24
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_my_placements' );
25
- add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_getting_started' );
26
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
27
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Live Examples', 'Live Examples', 'edit_posts', 'https://www.opinionstage.com/discover?utm_campaign=WPMainPI&utm_medium=linkexamples&utm_source=wordpress&o=wp35e8' );
28
  }else{
@@ -31,36 +28,22 @@ function opinionstage_register_menu_page() {
31
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
32
  'edit_posts',
33
  OPINIONSTAGE_GETTING_STARTED_SLUG,
34
- 'opinionstage_getting_started',
35
  plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
36
  '25.234323221'
37
  );
38
-
39
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_getting_started' );
40
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_menu_page');
41
-
42
- add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_my_placements' );
43
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
44
-
45
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Live Examples', 'Live Examples', 'edit_posts', 'https://www.opinionstage.com/discover?utm_campaign=WPMainPI&utm_medium=linkexamples&utm_source=wordpress&o=wp35e8' );
46
  }
47
  }
48
  }
49
 
50
- function opinionstage_menu_page() {
51
- $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
52
- $os_client_logged_in = opinionstage_user_logged_in();
53
- require( plugin_dir_path( __FILE__ ).'create-page-template.php' );
54
- }
55
- function opinionstage_my_placements(){
56
- $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
57
- $os_client_logged_in = opinionstage_user_logged_in();
58
- require( plugin_dir_path( __FILE__ ).'/views/placement-page-template.php' );
59
- }
60
- function opinionstage_getting_started(){
61
- $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
62
- $os_client_logged_in = opinionstage_user_logged_in();
63
- require( plugin_dir_path( __FILE__ ).'/views/getting-started-page-template.php' );
64
- }
65
 
66
  ?>
1
  <?php
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
 
4
  require_once( plugin_dir_path( __FILE__ ).'../includes/opinionstage-client-session.php' );
 
5
  add_action( 'admin_menu', 'opinionstage_register_menu_page' );
 
6
  function opinionstage_register_menu_page() {
7
  if (function_exists('add_menu_page')) {
8
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
9
  $os_client_logged_in = opinionstage_user_logged_in();
10
+ if ($os_client_logged_in) {
11
  add_menu_page(
12
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
13
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
14
  'edit_posts',
15
  OPINIONSTAGE_MENU_SLUG,
16
+ 'opinionstage_load_template',
17
  plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
18
  '25.234323221'
19
+ );
20
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG);
21
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
22
+ add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
23
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
24
  add_submenu_page(OPINIONSTAGE_MENU_SLUG, 'Live Examples', 'Live Examples', 'edit_posts', 'https://www.opinionstage.com/discover?utm_campaign=WPMainPI&utm_medium=linkexamples&utm_source=wordpress&o=wp35e8' );
25
  }else{
28
  __('Opinion Stage', OPINIONSTAGE_TEXT_DOMAIN),
29
  'edit_posts',
30
  OPINIONSTAGE_GETTING_STARTED_SLUG,
31
+ 'opinionstage_load_template',
32
  plugins_url('admin/images/os.png', plugin_dir_path( __FILE__ )),
33
  '25.234323221'
34
  );
35
+ add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Getting Started', 'Getting Started', 'edit_posts', OPINIONSTAGE_GETTING_STARTED_SLUG,'opinionstage_load_template' );
36
+ add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Create...', 'Create...', 'edit_posts', OPINIONSTAGE_MENU_SLUG, 'opinionstage_load_template');
37
+ add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Placements', 'Placements', 'edit_posts', OPINIONSTAGE_PLACEMENT_SLUG , 'opinionstage_load_template' );
 
 
38
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Help Center', 'Help Center', 'edit_posts', 'https://help.opinionstage.com/?utm_campaign=WPMainPI&utm_medium=linkhelpcenter&utm_source=wordpress&o=wp35e8' );
 
39
  add_submenu_page(OPINIONSTAGE_GETTING_STARTED_SLUG, 'Live Examples', 'Live Examples', 'edit_posts', 'https://www.opinionstage.com/discover?utm_campaign=WPMainPI&utm_medium=linkexamples&utm_source=wordpress&o=wp35e8' );
40
  }
41
  }
42
  }
43
 
44
+ function opinionstage_load_template() {
45
+ $OSAPL = OpinionStageAdminPageLoader::getInstance();
46
+ $OSAPL->OSAPL_LoadTemplateFile();
47
+ }
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  ?>
admin/menu-target.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('admin_footer', 'OpinionStage_addMenuTargetLink');
3
+
4
+ function OpinionStage_addMenuTargetLink(){ ?>
5
+ <script type="text/javascript">
6
+ jQuery(document).ready(function(){
7
+ jQuery("li.toplevel_page_opinionstage-getting-started ul li:nth-last-child(2) a,li.toplevel_page_opinionstage-settings ul li:nth-last-child(2) a").attr('target', '_blank');
8
+ jQuery("li.toplevel_page_opinionstage-getting-started ul li:nth-last-child(1) a,li.toplevel_page_opinionstage-settings ul li:nth-last-child(1) a").attr('target', '_blank');
9
+ });
10
+ </script>
11
+ <?php
12
+ }
13
+ ?>
admin/resources/common.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ function opinionstage_common_load_resources(){
6
+
7
+ // Register common assets for admin pages
8
+ opinionstage_register_css_asset( 'menu-page', 'menu-page.css' );
9
+ opinionstage_register_css_asset( 'icon-font', 'icon-font.css' );
10
+ opinionstage_register_javascript_asset( 'menu-page', 'menu-page.js', array('jquery') );
11
+
12
+ // Load common assets
13
+ opinionstage_enqueue_css_asset('menu-page');
14
+ opinionstage_enqueue_css_asset('icon-font');
15
+ opinionstage_enqueue_js_asset('menu-page');
16
+
17
+ }
18
+
19
+ function opinionstage_common_load_header(){
20
+
21
+ }
22
+ function opinionstage_common_load_footer(){
23
+
24
+ }
25
+ ?>
admin/resources/getting-started.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ function opinionstage_getting_started_load_resources(){
6
+ // load assets here
7
+ }
8
+
9
+ function opinionstage_getting_started_load_header(){
10
+ // load anything in header here
11
+ }
12
+
13
+ function opinionstage_getting_started_load_footer(){
14
+ // load anything in footer here
15
+ }
16
+ ?>
admin/resources/my-placements.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ function opinionstage_my_placements_load_resources(){
6
+ // load assets here
7
+ }
8
+
9
+ function opinionstage_my_placements_load_header(){
10
+ // load anything in header here
11
+ }
12
+
13
+ function opinionstage_my_placements_load_footer(){
14
+ // load anything in footer here
15
+ }
16
+ ?>
admin/resources/settings.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // block direct access to plugin PHP files:
3
+ defined( 'ABSPATH' ) or die();
4
+
5
+ function opinionstage_settings_load_resources(){
6
+ // load assets here
7
+ }
8
+
9
+ function opinionstage_settings_load_header(){
10
+ // load anything in header here
11
+ }
12
+
13
+ function opinionstage_settings_load_footer(){
14
+ // load anything in footer here
15
+ }
16
+ ?>
admin/views/{getting-started-page-template.php → getting_started.php} RENAMED
@@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die();
9
  </div>
10
  <?php if ( !$os_client_logged_in ) {?>
11
  <div class="opinionstage-status-content">
12
- <div class='opinionstage-status-title'>Connect WordPress with Opinion Stage to Get Started</div>
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
  <i class="os-icon icon-os-poll-client"></i>
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
@@ -37,19 +37,23 @@ defined( 'ABSPATH' ) or die();
37
  <div class="gettingStartedSection">
38
  <div class="Video-Section">
39
  <p><b>We recommend that you start by viewing this short introduction video</b></p>
40
- <iframe class="iframe-new" width="900" height="400px" src="https://www.youtube.com/embed/zwcRWGsOxxQ?rel=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
41
  <a href="<?php echo admin_url( 'admin.php?page='.OPINIONSTAGE_MENU_SLUG); ?>" class="gettingStartedCreate button">Start Creating Interactive Content</a>
42
  </div>
43
  </div>
44
  <?php }else{ ?>
45
  <div class="gettingStartedSection">
46
- <p><b>Need more information?</b></p>
47
- <ul>
48
- <li><a href="https://www.youtube.com/watch?v=zwcRWGsOxxQ" target="_blank">Getting started video tutorial</a></li>
49
- <li><a href="https://www.opinionstage.com/blog/how-to-add-interactive-content-on-wordpress/?utm_campaign=WPMainPI&amp;utm_medium=linkgettingstarted&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">Getting started article tutorial</a></li>
50
- <li><a href="https://www.opinionstage.com/discover?utm_campaign=WPMainPI&amp;utm_medium=linkexamples&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">View examples</a></li>
51
- <li><a href="https://help.opinionstage.com/?utm_campaign=WPMainPI&amp;utm_medium=linkhelpcenter&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">Opinion Stage help center</a></li>
52
- </ul>
 
 
 
 
53
  </div>
54
  <?php } ?>
55
  </div>
9
  </div>
10
  <?php if ( !$os_client_logged_in ) {?>
11
  <div class="opinionstage-status-content">
12
+ <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
  <i class="os-icon icon-os-poll-client"></i>
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
37
  <div class="gettingStartedSection">
38
  <div class="Video-Section">
39
  <p><b>We recommend that you start by viewing this short introduction video</b></p>
40
+ <iframe class="iframe-new" width="600" height="338" src="https://www.youtube.com/embed/zwcRWGsOxxQ?rel=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
41
  <a href="<?php echo admin_url( 'admin.php?page='.OPINIONSTAGE_MENU_SLUG); ?>" class="gettingStartedCreate button">Start Creating Interactive Content</a>
42
  </div>
43
  </div>
44
  <?php }else{ ?>
45
  <div class="gettingStartedSection">
46
+ <div class="Video-Section">
47
+ <iframe class="iframe-new" width="600" height="338" src="https://www.youtube.com/embed/zwcRWGsOxxQ?rel=0&showinfo=0" frameborder="0" allowfullscreen=""></iframe>
48
+ </div>
49
+ <div class="text-section-getting-stared-os">
50
+ <p><b>Need more information?</b></p>
51
+ <ul>
52
+ <li><a href="https://www.opinionstage.com/blog/how-to-add-interactive-content-on-wordpress/?utm_campaign=WPMainPI&amp;utm_medium=linkgettingstarted&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">Getting started tutorial</a></li>
53
+ <li><a href="https://www.opinionstage.com/discover?utm_campaign=WPMainPI&amp;utm_medium=linkexamples&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">View examples</a></li>
54
+ <li><a href="https://help.opinionstage.com/?utm_campaign=WPMainPI&amp;utm_medium=linkhelpcenter&amp;utm_source=wordpress&amp;o=wp35e8" target="_blank">Opinion Stage help center</a></li>
55
+ </ul>
56
+ </div>
57
  </div>
58
  <?php } ?>
59
  </div>
admin/views/{placement-page-template.php → my_placements.php} RENAMED
@@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die();
9
  </div>
10
  <?php if ( !$os_client_logged_in ) {?>
11
  <div class="opinionstage-status-content">
12
- <div class='opinionstage-status-title'>Connect WordPress with Opinion Stage to get started</div>
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
  <i class="os-icon icon-os-poll-client"></i>
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
9
  </div>
10
  <?php if ( !$os_client_logged_in ) {?>
11
  <div class="opinionstage-status-content">
12
+ <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
13
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
14
  <i class="os-icon icon-os-poll-client"></i>
15
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
admin/{create-page-template.php → views/settings.php} RENAMED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die();
10
  </div>
11
  <?php if ( !$os_client_logged_in ) {?>
12
  <div class="opinionstage-status-content">
13
- <div class='opinionstage-status-title'>Connect WordPress with Opinion Stage to get started</div>
14
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
15
  <i class="os-icon icon-os-poll-client"></i>
16
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
10
  </div>
11
  <?php if ( !$os_client_logged_in ) {?>
12
  <div class="opinionstage-status-content">
13
+ <div class='opinionstage-status-title'><b>Connect WordPress with Opinion Stage to Get Started</b></div>
14
  <form action="<?php echo OPINIONSTAGE_LOGIN_PATH ?>" method="get" class="opinionstage-connect-form">
15
  <i class="os-icon icon-os-poll-client"></i>
16
  <input type="hidden" name="utm_source" value="<?php echo OPINIONSTAGE_UTM_SOURCE ?>">
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.7
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.8
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.7
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
@@ -24,7 +24,7 @@ if ( defined('WP_DEBUG') && true === WP_DEBUG ) {
24
  }
25
  }
26
 
27
- define('OPINIONSTAGE_WIDGET_VERSION', '19.6.7');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.8
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
24
  }
25
  }
26
 
27
+ define('OPINIONSTAGE_WIDGET_VERSION', '19.6.8');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
readme.txt CHANGED
@@ -4,13 +4,13 @@ Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, form, interactive content
5
  Requires at least: 2.8
6
  Tested up to: 5.0
7
- Stable tag: 19.6.7
8
 
9
- Add a Poll, Quiz, Survey & Form Plugin to your WordPress Site. Easily create a beautiful & top performing Poll, Quiz, Survey or Form in Minutes.
10
 
11
  == Description ==
12
 
13
- Looking for a Top-Notch WordPress Poll, Survey,Form and Quiz Maker Plugin?
14
 
15
  Check out:
16
 
@@ -162,6 +162,9 @@ Polls include one question and are used for getting a quick answer on a question
162
  N/A
163
 
164
  == Changelog ==
 
 
 
165
  = 19.6.7 =
166
  * new getting started experience
167
  = 19.6.6 =
4
  Tags: poll, quiz, survey, form, interactive content
5
  Requires at least: 2.8
6
  Tested up to: 5.0
7
+ Stable tag: 19.6.8
8
 
9
+ Add a beautiful & top performing Poll, Survey, Quiz or Form to your site. Create from scratch or use templates. Set it up in Minutes.
10
 
11
  == Description ==
12
 
13
+ Looking for a Top-Notch Poll, Survey, Form & Quiz Wordpress Plugin?
14
 
15
  Check out:
16
 
162
  N/A
163
 
164
  == Changelog ==
165
+ = 19.6.8 =
166
+ * readme changes
167
+ * add admin loader
168
  = 19.6.7 =
169
  * new getting started experience
170
  = 19.6.6 =