Responsive Menu - Version 2.8.9

Version Description

(17th June 2016) = * Last Version 2 release with beta notice

Download this release

Release Info

Developer ResponsiveMenu
Plugin Icon 128x128 Responsive Menu
Version 2.8.9
Comparing to
See all releases

Code changes from version 3.0.9 to 2.8.9

Files changed (189) hide show
  1. app/autoload.php +64 -0
  2. app/bootstrap.php +25 -0
  3. app/config.php +324 -0
  4. app/controllers/AdminController.php +168 -0
  5. app/controllers/BaseController.php +22 -0
  6. app/controllers/CSSController.php +74 -0
  7. app/controllers/FrontController.php +50 -0
  8. app/controllers/GlobalController.php +65 -0
  9. app/controllers/HTMLController.php +84 -0
  10. app/controllers/InstallController.php +40 -0
  11. app/controllers/JSController.php +76 -0
  12. app/controllers/UpgradeController.php +66 -0
  13. app/library/responsive-menu/Export.php +49 -0
  14. app/library/responsive-menu/Import.php +50 -0
  15. app/library/responsive-menu/Input.php +82 -0
  16. app/library/responsive-menu/MenuWalker.php +15 -0
  17. app/library/responsive-menu/Registry.php +51 -0
  18. app/library/responsive-menu/ResponsiveMenu.php +144 -0
  19. app/library/responsive-menu/Shortcode.php +24 -0
  20. app/library/responsive-menu/Status.php +48 -0
  21. app/library/responsive-menu/Transient.php +89 -0
  22. app/library/responsive-menu/View.php +96 -0
  23. app/models/AdminModel.php +386 -0
  24. app/models/BaseModel.php +70 -0
  25. app/models/CSSModel.php +542 -0
  26. app/models/FolderModel.php +38 -0
  27. app/models/JSModel.php +725 -0
  28. app/views/admin/page.phtml +2387 -0
  29. app/views/click-button.phtml +66 -0
  30. app/views/menu.phtml +75 -0
  31. autoload.php +0 -13
  32. public/export/export.xml +1 -0
  33. public/imgs/icon.png +0 -0
  34. public/js/touch.js +3 -0
  35. readme.txt +86 -181
  36. responsive-menu.php +36 -72
  37. src/app/Collections/OptionsCollection.php +0 -84
  38. src/app/Controllers/Admin.php +0 -58
  39. src/app/Controllers/Front.php +0 -81
  40. src/app/Database/Database.php +0 -10
  41. src/app/Database/Migration.php +0 -204
  42. src/app/Database/WpDatabase.php +0 -41
  43. src/app/Factories/AdminSaveFactory.php +0 -42
  44. src/app/Factories/CssFactory.php +0 -34
  45. src/app/Factories/FrontDisplayFactory.php +0 -41
  46. src/app/Factories/JsFactory.php +0 -23
  47. src/app/Factories/OptionFactory.php +0 -26
  48. src/app/Filesystem/FileCreator.php +0 -30
  49. src/app/Filters/Filter.php +0 -8
  50. src/app/Filters/HtmlFilter.php +0 -12
  51. src/app/Filters/JsonFilter.php +0 -12
  52. src/app/Filters/TextFilter.php +0 -12
  53. src/app/Form/Checkbox.php +0 -28
  54. src/app/Form/Colour.php +0 -19
  55. src/app/Form/Export.php +0 -13
  56. src/app/Form/FontIconPageList.php +0 -74
  57. src/app/Form/FormComponent.php +0 -8
  58. src/app/Form/HeaderBarOrdering.php +0 -49
  59. src/app/Form/Image.php +0 -25
  60. src/app/Form/Import.php +0 -14
  61. src/app/Form/MenuOrdering.php +0 -49
  62. src/app/Form/Reset.php +0 -13
  63. src/app/Form/Select.php +0 -24
  64. src/app/Form/Text.php +0 -20
  65. src/app/Form/TextArea.php +0 -17
  66. src/app/Formatters/Minify.php +0 -24
  67. src/app/Mappers/JsMapper.php +0 -192
  68. src/app/Mappers/ScssBaseMapper.php +0 -202
  69. src/app/Mappers/ScssButtonMapper.php +0 -63
  70. src/app/Mappers/ScssMapper.php +0 -19
  71. src/app/Mappers/ScssMenuMapper.php +0 -172
  72. src/app/Mappers/scssphp/.travis.yml +0 -7
  73. src/app/Mappers/scssphp/LICENSE.md +0 -660
  74. src/app/Mappers/scssphp/Makefile +0 -3
  75. src/app/Mappers/scssphp/README.md +0 -34
  76. src/app/Mappers/scssphp/composer.json +0 -28
  77. src/app/Mappers/scssphp/phpunit.xml.dist +0 -28
  78. src/app/Mappers/scssphp/pscss +0 -53
  79. src/app/Mappers/scssphp/scss.inc.php +0 -4577
  80. src/app/Mappers/scssphp/tests/ApiTest.php +0 -80
  81. src/app/Mappers/scssphp/tests/ExceptionTest.php +0 -86
  82. src/app/Mappers/scssphp/tests/InputTest.php +0 -83
  83. src/app/Mappers/scssphp/tests/compare-scss.sh +0 -25
  84. src/app/Mappers/scssphp/tests/inputs/builtins.scss +0 -171
  85. src/app/Mappers/scssphp/tests/inputs/comments.scss +0 -28
  86. src/app/Mappers/scssphp/tests/inputs/compass_extract.scss +0 -248
  87. src/app/Mappers/scssphp/tests/inputs/content.scss +0 -61
  88. src/app/Mappers/scssphp/tests/inputs/content_with_function.scss +0 -17
  89. src/app/Mappers/scssphp/tests/inputs/default_args.scss +0 -15
  90. src/app/Mappers/scssphp/tests/inputs/directives.scss +0 -108
  91. src/app/Mappers/scssphp/tests/inputs/extends.scss +0 -184
  92. src/app/Mappers/scssphp/tests/inputs/filter_effects.scss +0 -48
  93. src/app/Mappers/scssphp/tests/inputs/functions.scss +0 -81
  94. src/app/Mappers/scssphp/tests/inputs/ie7.scss +0 -12
  95. src/app/Mappers/scssphp/tests/inputs/if.scss +0 -76
  96. src/app/Mappers/scssphp/tests/inputs/if_on_null.scss +0 -8
  97. src/app/Mappers/scssphp/tests/inputs/import.scss +0 -23
  98. src/app/Mappers/scssphp/tests/inputs/imports/_partial.scss +0 -10
  99. src/app/Mappers/scssphp/tests/inputs/imports/simple.scss +0 -4
  100. src/app/Mappers/scssphp/tests/inputs/interpolation.scss +0 -86
  101. src/app/Mappers/scssphp/tests/inputs/keyword_args.scss +0 -24
  102. src/app/Mappers/scssphp/tests/inputs/list.scss +0 -15
  103. src/app/Mappers/scssphp/tests/inputs/looping.scss +0 -51
  104. src/app/Mappers/scssphp/tests/inputs/media.scss +0 -208
  105. src/app/Mappers/scssphp/tests/inputs/mixins.scss +0 -158
  106. src/app/Mappers/scssphp/tests/inputs/nesting.scss +0 -45
  107. src/app/Mappers/scssphp/tests/inputs/null.scss +0 -41
  108. src/app/Mappers/scssphp/tests/inputs/operators.scss +0 -143
  109. src/app/Mappers/scssphp/tests/inputs/placeholder_selector.scss +0 -18
  110. src/app/Mappers/scssphp/tests/inputs/scss_css.scss +0 -986
  111. src/app/Mappers/scssphp/tests/inputs/selectors.scss +0 -187
  112. src/app/Mappers/scssphp/tests/inputs/values.scss +0 -43
  113. src/app/Mappers/scssphp/tests/inputs/variables.scss +0 -56
  114. src/app/Mappers/scssphp/tests/outputs/builtins.css +0 -126
  115. src/app/Mappers/scssphp/tests/outputs/comments.css +0 -19
  116. src/app/Mappers/scssphp/tests/outputs/compass_extract.css +0 -28
  117. src/app/Mappers/scssphp/tests/outputs/content.css +0 -29
  118. src/app/Mappers/scssphp/tests/outputs/content_with_function.css +0 -2
  119. src/app/Mappers/scssphp/tests/outputs/default_args.css +0 -3
  120. src/app/Mappers/scssphp/tests/outputs/directives.css +0 -77
  121. src/app/Mappers/scssphp/tests/outputs/extends.css +0 -87
  122. src/app/Mappers/scssphp/tests/outputs/filter_effects.css +0 -20
  123. src/app/Mappers/scssphp/tests/outputs/functions.css +0 -22
  124. src/app/Mappers/scssphp/tests/outputs/ie7.css +0 -8
  125. src/app/Mappers/scssphp/tests/outputs/if.css +0 -21
  126. src/app/Mappers/scssphp/tests/outputs/if_on_null.css +0 -2
  127. src/app/Mappers/scssphp/tests/outputs/import.css +0 -27
  128. src/app/Mappers/scssphp/tests/outputs/interpolation.css +0 -54
  129. src/app/Mappers/scssphp/tests/outputs/keyword_args.css +0 -6
  130. src/app/Mappers/scssphp/tests/outputs/list.css +0 -7
  131. src/app/Mappers/scssphp/tests/outputs/looping.css +0 -45
  132. src/app/Mappers/scssphp/tests/outputs/media.css +0 -103
  133. src/app/Mappers/scssphp/tests/outputs/mixins.css +0 -83
  134. src/app/Mappers/scssphp/tests/outputs/nesting.css +0 -22
  135. src/app/Mappers/scssphp/tests/outputs/null.css +0 -21
  136. src/app/Mappers/scssphp/tests/outputs/operators.css +0 -105
  137. src/app/Mappers/scssphp/tests/outputs/placeholder_selector.css +0 -7
  138. src/app/Mappers/scssphp/tests/outputs/scss_css.css +0 -741
  139. src/app/Mappers/scssphp/tests/outputs/selectors.css +0 -335
  140. src/app/Mappers/scssphp/tests/outputs/values.css +0 -34
  141. src/app/Mappers/scssphp/tests/outputs/variables.css +0 -24
  142. src/app/Models/Option.php +0 -45
  143. src/app/Repositories/OptionRepository.php +0 -54
  144. src/app/Routing/Container.php +0 -241
  145. src/app/Routing/Routing.php +0 -8
  146. src/app/Routing/WpRouting.php +0 -65
  147. src/app/Services/OptionService.php +0 -63
  148. src/app/View/AdminView.php +0 -38
  149. src/app/View/FrontView.php +0 -24
  150. src/app/View/View.php +0 -8
  151. src/app/ViewModels/Button.php +0 -19
  152. src/app/ViewModels/Components/Admin/Boxes.php +0 -102
  153. src/app/ViewModels/Components/Admin/Tabs.php +0 -26
  154. src/app/ViewModels/Components/Button/Button.php +0 -39
  155. src/app/ViewModels/Components/Menu/AdditionalContent.php +0 -20
  156. src/app/ViewModels/Components/Menu/Menu.php +0 -35
  157. src/app/ViewModels/Components/Menu/Search.php +0 -21
  158. src/app/ViewModels/Components/Menu/Title.php +0 -49
  159. src/app/ViewModels/Components/ViewComponent.php +0 -11
  160. src/app/ViewModels/Menu.php +0 -32
  161. src/app/WPML/WPML.php +0 -22
  162. src/app/Walkers/WpWalker.php +0 -118
  163. src/config/admin_ordering.php +0 -1167
  164. src/config/default_options.php +0 -157
  165. src/config/option_helpers.php +0 -19
  166. src/config/route_dependencies.php +0 -84
  167. src/public/css/admin/main.css +0 -717
  168. src/public/js/admin/main.js +0 -65
  169. src/public/js/admin/postbox-edit.js +0 -4
  170. src/public/scss/hamburgers/_base.scss +0 -69
  171. src/public/scss/hamburgers/hamburgers.scss +0 -57
  172. src/public/scss/hamburgers/types/_boring.scss +0 -30
  173. src/views/admin/main.phtml +0 -108
  174. src/views/button.phtml +0 -1
  175. src/views/menu.phtml +0 -8
  176. src/views/preview.phtml +0 -16
  177. translations/responsive-menu-de_DE.mo +0 -0
  178. translations/responsive-menu-de_DE.po +958 -0
  179. translations/responsive-menu-es_ES.mo +0 -0
  180. translations/responsive-menu-es_ES.po +872 -488
  181. translations/responsive-menu-fr_FR.mo +0 -0
  182. translations/responsive-menu-fr_FR.po +1093 -0
  183. translations/responsive-menu-hr.mo +0 -0
  184. translations/responsive-menu-hr.po +1131 -0
  185. translations/responsive-menu-nl_NL.mo +0 -0
  186. translations/responsive-menu-nl_NL.po +1089 -0
  187. translations/responsive-menu.mo +0 -0
  188. translations/responsive-menu.po +958 -0
  189. wpml-config.xml +14 -0
app/autoload.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ |--------------------------------------------------------------------------
5
+ | Autoload our application
6
+ |--------------------------------------------------------------------------
7
+ |
8
+ | Here we include all our required files for the application to run correctly.
9
+ | At the moment this is a big mess of require_once calls and needs to be
10
+ | tidied up with an autoloader function
11
+ |
12
+ */
13
+
14
+ define( 'RM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
15
+
16
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Registry.php';
17
+
18
+ require_once RM_PLUGIN_DIR . 'config.php';
19
+
20
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/ResponsiveMenu.php';
21
+
22
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/View.php';
23
+
24
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Status.php';
25
+
26
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Input.php';
27
+
28
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Shortcode.php';
29
+
30
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/MenuWalker.php';
31
+
32
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Import.php';
33
+
34
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Export.php';
35
+
36
+ require_once RM_PLUGIN_DIR . 'library/responsive-menu/Transient.php';
37
+
38
+ require_once RM_PLUGIN_DIR . 'controllers/BaseController.php';
39
+
40
+ require_once RM_PLUGIN_DIR . 'controllers/AdminController.php';
41
+
42
+ require_once RM_PLUGIN_DIR . 'controllers/FrontController.php';
43
+
44
+ require_once RM_PLUGIN_DIR . 'controllers/GlobalController.php';
45
+
46
+ require_once RM_PLUGIN_DIR . 'controllers/InstallController.php';
47
+
48
+ require_once RM_PLUGIN_DIR . 'controllers/HTMLController.php';
49
+
50
+ require_once RM_PLUGIN_DIR . 'controllers/JSController.php';
51
+
52
+ require_once RM_PLUGIN_DIR . 'controllers/CSSController.php';
53
+
54
+ require_once RM_PLUGIN_DIR . 'controllers/UpgradeController.php';
55
+
56
+ require_once RM_PLUGIN_DIR . 'models/BaseModel.php';
57
+
58
+ require_once RM_PLUGIN_DIR . 'models/AdminModel.php';
59
+
60
+ require_once RM_PLUGIN_DIR . 'models/FolderModel.php';
61
+
62
+ require_once RM_PLUGIN_DIR . 'models/CSSModel.php';
63
+
64
+ require_once RM_PLUGIN_DIR . 'models/JSModel.php';
app/bootstrap.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ |--------------------------------------------------------------------------
5
+ | Autoload our application
6
+ |--------------------------------------------------------------------------
7
+ |
8
+ | Here we include our autoloader file that will deal with including all our
9
+ | required class files.
10
+ |
11
+ */
12
+
13
+ require_once dirname( __FILE__ ) . '/autoload.php';
14
+
15
+
16
+ /*
17
+ |--------------------------------------------------------------------------
18
+ | Create The Application
19
+ |--------------------------------------------------------------------------
20
+ |
21
+ | The first real thing we will do is create a new Responsive Menu instance.
22
+ |
23
+ */
24
+
25
+ $app = new ResponsiveMenu;
app/config.php ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ /*
5
+ |--------------------------------------------------------------------------
6
+ | Configuration Settings
7
+ |--------------------------------------------------------------------------
8
+ |
9
+ | Although some people aren't fans of array configurations, here we have one!
10
+ | This is where we set paths and our version number among other things.
11
+ |
12
+ */
13
+
14
+ $config = array(
15
+
16
+
17
+ 'current_version' => "2.8.9",
18
+
19
+
20
+ 'plugins_dir' => plugin_dir_path( __FILE__ ),
21
+
22
+
23
+ 'plugins_base_uri' => plugin_dir_url( dirname( __FILE__ ) ),
24
+
25
+
26
+ 'plugin_base_dir' => dirname( plugin_dir_path( __FILE__ ) ),
27
+
28
+
29
+ 'plugin_base_uri' => plugin_dir_url( dirname( __FILE__ ) ),
30
+
31
+
32
+ 'plugin_data_uri' => plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'responsive-menu-data/',
33
+
34
+
35
+ 'plugin_data_dir' => dirname( dirname( plugin_dir_path( __FILE__ ) ) ) . '/responsive-menu-data/',
36
+
37
+
38
+ );
39
+
40
+ /*
41
+ |--------------------------------------------------------------------------
42
+ | Save Config to the Registry
43
+ |--------------------------------------------------------------------------
44
+ |
45
+ | Again, some people don't like Registry's in PHP Applications, but here we
46
+ | have one and it is very useful for retrieving our settings throughout the app
47
+ |
48
+ */
49
+
50
+ RM_Registry::set( 'config', $config );
51
+
52
+
53
+ /*
54
+ |--------------------------------------------------------------------------
55
+ | Responsive Menu Defaults
56
+ |--------------------------------------------------------------------------
57
+ |
58
+ | Another configuration array of type, this time we hold all the application
59
+ | default options.
60
+ |
61
+ */
62
+
63
+ $defaults = array(
64
+
65
+
66
+ 'RM' => '',
67
+
68
+
69
+ 'RMBreak' => 800,
70
+
71
+
72
+ 'RMDepth' => 2,
73
+
74
+
75
+ 'RMTop' => 10,
76
+
77
+
78
+ 'RMRight' => 5,
79
+
80
+
81
+ 'RMCss' => '',
82
+
83
+
84
+ 'RMTitle' => __( 'Menu Title', 'responsive-menu' ),
85
+
86
+
87
+ 'RMLineCol' => '#FFFFFF',
88
+
89
+
90
+ 'RMClickBkg' => '#000000',
91
+
92
+
93
+ 'RMClickTitle' => '',
94
+
95
+
96
+ 'RMBkgTran' => false,
97
+
98
+
99
+ 'RMFont' => '',
100
+
101
+
102
+ 'RMPos' => '',
103
+
104
+
105
+ 'RMImage' => '',
106
+
107
+
108
+ 'RMWidth' => '75',
109
+
110
+
111
+ 'RMBkg' => '#43494C',
112
+
113
+
114
+ 'RMBkgHov' => '#3C3C3C',
115
+
116
+
117
+ 'RMTitleCol' => '#FFFFFF',
118
+
119
+
120
+ 'RMTextCol' => '#FFFFFF',
121
+
122
+
123
+ 'RMBorCol' => '#3C3C3C',
124
+
125
+
126
+ 'RMTextColHov' => '#FFFFFF',
127
+
128
+
129
+ 'RMTitleColHov' => '#FFFFFF',
130
+
131
+
132
+ /* Added in 1.6 */
133
+
134
+
135
+ 'RMAnim' => 'overlay',
136
+
137
+
138
+ 'RMPushCSS' => '',
139
+
140
+
141
+ 'RMTitleBkg' => '#43494C',
142
+
143
+
144
+ 'RMFontSize' => 13,
145
+
146
+
147
+ 'RMTitleSize' => 14,
148
+
149
+
150
+ 'RMBtnSize' => 13,
151
+
152
+
153
+ 'RMCurBkg' => '#43494C',
154
+
155
+
156
+ 'RMCurCol' => '#FFFFFF',
157
+
158
+
159
+ 'RMAnimSpd' => 0.5,
160
+
161
+
162
+ /* Added in 1.7 */
163
+
164
+
165
+ 'RMTranSpd' => 1,
166
+
167
+
168
+ 'RMTxtAlign' => 'left',
169
+
170
+
171
+ 'RMSearch' => false,
172
+
173
+
174
+ 'RMExpand' => false,
175
+
176
+
177
+ 'RMLinkHeight' => 20,
178
+
179
+
180
+ /* Added in 1.8 */
181
+
182
+
183
+ 'RMExternal' => false,
184
+
185
+
186
+ 'RMSide' => 'left',
187
+
188
+
189
+ /* Added in 1.9 */
190
+
191
+
192
+ 'RMFooter' => true,
193
+
194
+
195
+ 'RMClickImg' => false,
196
+
197
+
198
+ 'RMMinify' => true,
199
+
200
+
201
+ 'RMClickClose' => false,
202
+
203
+
204
+ 'RMRemImp' => false,
205
+
206
+
207
+ 'RMX' => false,
208
+
209
+
210
+ 'RMMinWidth' => null,
211
+
212
+
213
+ /* Added in 2.0 */
214
+
215
+
216
+ 'RMMaxWidth' => null,
217
+
218
+
219
+ 'RMExpandPar' => true,
220
+
221
+
222
+ 'RMIgnParCli' => false,
223
+
224
+
225
+ 'RMCliToClo' => false,
226
+
227
+
228
+ 'RMSearchPos' => 'below',
229
+
230
+
231
+ 'RMTitleLink' => null,
232
+
233
+
234
+ 'RMTitleLoc' => '_self',
235
+
236
+
237
+ 'RMHtml' => null,
238
+
239
+
240
+ 'RMHtmlLoc' => 'bottom',
241
+
242
+
243
+ /* Added in 2.1 */
244
+
245
+ 'RMShortcode' => false,
246
+
247
+
248
+ /* Added in 2.2 */
249
+
250
+ 'RMLineHeight' => 5,
251
+
252
+
253
+ 'RMLineWidth' => 33,
254
+
255
+
256
+ 'RMLineMargin' => 6,
257
+
258
+
259
+ 'RMClickImgClicked' => null,
260
+
261
+
262
+ 'RMAccordion' => false,
263
+
264
+
265
+ 'RMArShpA' => json_encode( '&#x25B2;' ),
266
+
267
+
268
+ 'RMArShpI' => json_encode( '&#x25BC;' ),
269
+
270
+
271
+ 'RMArImgA' => false,
272
+
273
+
274
+ 'RMArImgI' => false,
275
+
276
+
277
+ /* Added in 2.3 */
278
+
279
+ 'RMTrigger' => '#click-menu',
280
+
281
+
282
+ 'RMPushBtn' => false,
283
+
284
+
285
+ 'RMCurBkgHov' => '#43494C',
286
+
287
+
288
+ 'RMCurColHov' => '#FFFFFF',
289
+
290
+
291
+ 'RMWalker' => null,
292
+
293
+ /* Added in 2.4 */
294
+
295
+ 'RMUseTran' => null,
296
+
297
+
298
+ 'RMLoc' => 'right',
299
+
300
+ /* Added in 2.6 by Mkdgs*/
301
+
302
+ 'RMThemeLocation' => null,
303
+
304
+ /* Added in 2.8.7 */
305
+
306
+ 'RMClickTitlePos' => 'bottom',
307
+
308
+ 'RMClickTitleHeight' => '14'
309
+
310
+ );
311
+
312
+
313
+ /*
314
+ |--------------------------------------------------------------------------
315
+ | Save Defaults to the Registry
316
+ |--------------------------------------------------------------------------
317
+ |
318
+ | Again, some people don't like Registry's in PHP Applications, but here we
319
+ | have it again and it is very useful for retrieving our default values
320
+ | throughout the app
321
+ |
322
+ */
323
+
324
+ RM_Registry::set( 'defaults', $defaults );
app/controllers/AdminController.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class RM_AdminController extends RM_BaseController {
5
+
6
+
7
+ /**
8
+ * Prepare our Admin Options
9
+ *
10
+ * @return null
11
+ * @added 2.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+ // Check that we are in the admin area
17
+ if( is_admin() ) :
18
+
19
+ add_filter( 'plugin_action_links', array( 'RM_AdminController', 'addSettingsLink' ), 10, 2 );
20
+ add_action( 'admin_menu', array( 'RM_AdminController', 'addMenus' ) );
21
+
22
+ // Clear Transients on Saving/Updating Menus/Posts
23
+ // Added 2.4
24
+
25
+ if( ResponsiveMenu::getOption( 'RMUseTran' ) ) :
26
+ add_action( 'wp_update_nav_menu', array( 'RM_Transient', 'clearTransientMenus' ) );
27
+ add_action( 'save_post', array( 'RM_Transient', 'clearTransientMenus' ) );
28
+ endif;
29
+
30
+ // Specifically for Responsive Menu Page
31
+ if( isset( $_GET['page'] ) && $_GET['page'] == 'responsive-menu' ) :
32
+
33
+ add_action( 'admin_enqueue_scripts', array( 'RM_AdminController', 'colorpicker' ) );
34
+
35
+ endif;
36
+
37
+
38
+ endif;
39
+
40
+
41
+ }
42
+
43
+
44
+ /**
45
+ * Create our admin menus.
46
+ *
47
+ * @return null
48
+ * @added 1.0
49
+ */
50
+
51
+ static function addMenus() {
52
+
53
+
54
+ add_menu_page(
55
+
56
+ __( 'Responsive Menu', 'responsive-menu' ),
57
+ __( 'Responsive Menu', 'responsive-menu' ),
58
+ 'manage_options',
59
+ 'responsive-menu',
60
+ array( 'RM_AdminController', 'adminPage' ),
61
+ RM_Registry::get( 'config', 'plugins_base_uri' ) . 'public/imgs/icon.png'
62
+
63
+ );
64
+
65
+
66
+ }
67
+
68
+ /**
69
+ * Creates the main admin page and saves the data if submitted
70
+ *
71
+ * @return null
72
+ * @added 1.0
73
+ */
74
+
75
+ static function adminPage() {
76
+
77
+ if( RM_Input::post( 'RMExport' ) ) :
78
+
79
+ RM_Export::export();
80
+
81
+ endif;
82
+
83
+ if( RM_Input::post( 'RMSubmit' )
84
+ || RM_Input::post( 'RMImport' )
85
+ || RM_Input::post( 'RMReset' ) ) :
86
+
87
+ $data = RM_Input::post( 'RMImport' ) ? RM_Import::getData( RM_Input::file( 'RMImportFile' ) ) : RM_Input::post();
88
+
89
+ /* Reset to defaults */
90
+ if( RM_Input::post( 'RMReset' ) ) :
91
+ $data = RM_Registry::get( 'defaults' );
92
+ $data['RMArShpA'] = json_decode( $data['RMArShpA'] );
93
+ $data['RMArShpI'] = json_decode( $data['RMArShpI'] );
94
+ endif;
95
+
96
+ RM_AdminModel::save( $data );
97
+
98
+ if( ResponsiveMenu::getOption( 'RMExternal' ) ) :
99
+
100
+ RM_FolderModel::create();
101
+
102
+ $js = RM_JSModel::getJs( ResponsiveMenu::getOptions() );
103
+ $js = ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_JSModel::Minify( $js ) : $js = $js;
104
+ RM_JSModel::createJSFile( $js );
105
+
106
+
107
+ $css = RM_CSSModel::getCSS( ResponsiveMenu::getOptions() );
108
+ $css = ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_JSModel::Minify( $css ) : $css = $css;
109
+ RM_CSSModel::createCSSFile( $css );
110
+
111
+
112
+ endif;
113
+
114
+
115
+ endif;
116
+
117
+ RM_View::make( 'admin.page', ResponsiveMenu::getOptions() );
118
+
119
+
120
+ }
121
+
122
+ /**
123
+ * Adds the WordPress Colour Picker to the admin options page
124
+ *
125
+ * @return null
126
+ * @added 1.0
127
+ */
128
+
129
+ static function colorpicker(){
130
+
131
+
132
+ wp_enqueue_media();
133
+ wp_enqueue_style( 'wp-color-picker' );
134
+ wp_enqueue_script( 'wp-color-picker' );
135
+
136
+
137
+ }
138
+
139
+
140
+ /**
141
+ * Adds the settings link on the WordPress Plugins Page
142
+ *
143
+ * @param array $links
144
+ * @param string $file
145
+ * @return array
146
+ * @added 2.0
147
+ */
148
+
149
+ static function addSettingsLink( $links, $file ) {
150
+
151
+
152
+ if ( $file == 'responsive-menu/responsive-menu.php' ) :
153
+
154
+ $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=responsive-menu">';
155
+ $settings_link .= __( 'Settings', 'responsive-menu' );
156
+ $settings_link .= '</a>';
157
+
158
+ array_unshift( $links, $settings_link );
159
+
160
+ endif;
161
+
162
+ return $links;
163
+
164
+
165
+ }
166
+
167
+
168
+ }
app/controllers/BaseController.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_BaseController {
4
+
5
+
6
+ /**
7
+ * Determines wether to display scripts in footer
8
+ *
9
+ * @return boolean
10
+ * @added 2.0
11
+ */
12
+
13
+ static function inFooter() {
14
+
15
+
16
+ return ResponsiveMenu::getOption( 'RMFooter' ) && ResponsiveMenu::getOption( 'RMFooter' ) == 'footer' ? true : false;
17
+
18
+
19
+ }
20
+
21
+
22
+ }
app/controllers/CSSController.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class RM_CSSController extends RM_BaseController {
5
+
6
+
7
+ /**
8
+ * Prepare our CSS Outputs
9
+ *
10
+ * @return null
11
+ * @added 2.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+
17
+ if( ResponsiveMenu::getOption( 'RMExternal' ) ) :
18
+
19
+
20
+ add_action( 'wp_enqueue_scripts', array( 'RM_CSSController', 'addExternal' ) );
21
+
22
+
23
+ else :
24
+
25
+
26
+ add_action( 'wp_head', array( 'RM_CSSController', 'addInline' ) );
27
+
28
+
29
+ endif;
30
+
31
+
32
+ }
33
+
34
+
35
+ /**
36
+ * Create and echos the Inline Styles
37
+ *
38
+ * @return string
39
+ * @added 2.0
40
+ */
41
+
42
+ static function addInline() {
43
+
44
+ $opt = ResponsiveMenu::getOptions();
45
+
46
+ echo ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_CSSModel::Minify( RM_CSSModel::getCSS( $opt ) ) : RM_CSSModel::getCSS( $opt );
47
+
48
+
49
+ }
50
+
51
+
52
+ /**
53
+ * Adds External Styles to Header
54
+ *
55
+ * @return null
56
+ * @added 2.0
57
+ */
58
+
59
+ static function addExternal() {
60
+
61
+
62
+ wp_enqueue_style(
63
+ 'responsive-menu',
64
+ RM_Registry::get( 'config', 'plugin_data_uri' ) . 'css/responsive-menu-' . get_current_blog_id() . '.css',
65
+ array(),
66
+ '1.0',
67
+ 'all'
68
+ );
69
+
70
+
71
+ }
72
+
73
+
74
+ }
app/controllers/FrontController.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_FrontController extends RM_BaseController {
4
+
5
+
6
+ /**
7
+ * Prepare our Front End Options
8
+ *
9
+ * @return null
10
+ * @added 2.0
11
+ */
12
+
13
+ static function prepare() {
14
+
15
+ // Check that we are in the admin area
16
+ if( !is_admin() ) :
17
+
18
+
19
+ if( ResponsiveMenu::getOption( 'RMCliToClo' ) ) :
20
+
21
+ add_action( 'wp_enqueue_scripts', array( 'RM_FrontController', 'jQueryMobile' ) );
22
+
23
+ endif;
24
+
25
+
26
+ endif;
27
+
28
+
29
+ }
30
+
31
+
32
+ /**
33
+ * Makes sure jQuery Mobile is added to all front pages if the specific option is selected
34
+ * as it is needed for some of the functions to work
35
+ *
36
+ * @return null
37
+ * @added 2.0
38
+ */
39
+
40
+ static function jQueryMobile() {
41
+
42
+
43
+ wp_register_script( 'touch', RM_Registry::get( 'config', 'plugin_base_uri' ) . 'public/js/touch.js', 'jquery', '', false );
44
+ wp_enqueue_script( 'touch' );
45
+
46
+
47
+ }
48
+
49
+
50
+ }
app/controllers/GlobalController.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class RM_GlobalController extends RM_BaseController {
5
+
6
+
7
+ /**
8
+ * Prepare our Global Options
9
+ *
10
+ * @return null
11
+ * @added 2.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+
17
+ add_action( 'plugins_loaded', array( 'RM_GlobalController', 'Internationalise' ) );
18
+ add_action( 'wp_enqueue_scripts', array( 'RM_GlobalController', 'jQuery' ) );
19
+
20
+
21
+ }
22
+
23
+
24
+ /**
25
+ * Makes sure jQuery is added to all pages as it is needed for the
26
+ * system to work
27
+ *
28
+ * @return null
29
+ * @added 1.0
30
+ */
31
+
32
+ static function jQuery() {
33
+
34
+
35
+ wp_enqueue_script( 'jquery' );
36
+
37
+
38
+ }
39
+
40
+
41
+ /**
42
+ * Loads our Translations for use throughout the program
43
+ *
44
+ * Current Translations:
45
+ *
46
+ * hr_HR - Croatian - With thanks to Neverone Design - https://www.facebook.com/pages/Neverone-design/490262371018076
47
+ * es_ES - Spanish - With thanks to Andrew @ WebHostingHub - http://www.webhostinghub.com
48
+ *
49
+ * @return null
50
+ * @added 1.6
51
+ */
52
+
53
+
54
+ static function Internationalise() {
55
+
56
+
57
+ __( 'Highly Customisable Responsive Menu Plugin for WordPress', 'responsive-menu' );
58
+
59
+ load_plugin_textdomain( 'responsive-menu', false, 'responsive-menu/translations/' );
60
+
61
+
62
+ }
63
+
64
+
65
+ }
app/controllers/HTMLController.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class RM_HTMLController extends RM_BaseController {
5
+
6
+
7
+ /**
8
+ * Prepare the HTML for display on the front end
9
+ *
10
+ * @return null
11
+ * @added 1.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+
17
+ if( !ResponsiveMenu::getOption( 'RMShortcode' ) )
18
+ add_action( 'wp_footer', array( 'RM_HTMLController', 'display' ) );
19
+
20
+
21
+ }
22
+
23
+
24
+ /**
25
+ * Creates the view for the menu and echos it out
26
+ *
27
+ * @return string
28
+ * @added 1.0
29
+ */
30
+
31
+ static function display( $args = null ) {
32
+
33
+ /* Unfortunately this messy section is due to shortcodes converting all args to lowercase */
34
+
35
+ if( $args ) :
36
+
37
+ if( isset( $args['rm'] ) )
38
+ $args['RM'] = $args['rm'];
39
+
40
+ if( isset( $args['menu'] ) )
41
+ $args['RM'] = $args['menu'];
42
+
43
+ if( isset( $args['title'] ) )
44
+ $args['RMTitle'] = $args['title'];
45
+
46
+ if( isset( $args['title_link'] ) )
47
+ $args['RMTitleLink'] = $args['title_link'];
48
+
49
+ if( isset( $args['title_open'] ) )
50
+ $args['RMTitleLoc'] = $args['title_open'];
51
+
52
+ if( isset( $args['html'] ) )
53
+ $args['RMHtml'] = $args['html'];
54
+
55
+ if( isset( $args['html_loc'] ) )
56
+ $args['RMHtmlLoc'] = $args['html_loc'];
57
+
58
+ if( isset( $args['title_img'] ) )
59
+ $args['RMImage'] = $args['title_img'];
60
+
61
+ if( isset( $args['search_loc'] ) )
62
+ $args['RMSearchPos'] = $args['search_loc'];
63
+
64
+ if( isset( $args['btn_img'] ) )
65
+ $args['RMClickImg'] = $args['btn_img'];
66
+
67
+ if( isset( $args['btn_img_clicked'] ) )
68
+ $args['RMClickImgClicked'] = $args['btn_img_clicked'];
69
+
70
+ if( isset( $args['btn_title'] ) )
71
+ $args['RMClickTitle'] = $args['btn_title'];
72
+
73
+ endif;
74
+
75
+ $options = ResponsiveMenu::getOptions();
76
+
77
+ RM_View::make( 'menu', $args ? array_merge( $options, $args ) : $options );
78
+ RM_View::make( 'click-button', $args ? array_merge( $options, $args ) : $options );
79
+
80
+
81
+ }
82
+
83
+
84
+ }
app/controllers/InstallController.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_InstallController extends RM_BaseController {
4
+
5
+
6
+ /**
7
+ * Prepare our Installation Options
8
+ *
9
+ * @return null
10
+ * @added 2.0
11
+ */
12
+
13
+ static function prepare() {
14
+
15
+
16
+ register_activation_hook( __FILE__, array( 'RM_InstallController', 'install' ) );
17
+
18
+
19
+ }
20
+
21
+
22
+ /**
23
+ * Sets our initial default options when menu
24
+ * is first installed
25
+ *
26
+ * @return null
27
+ * @added 1.0
28
+ */
29
+
30
+ static function install() {
31
+
32
+
33
+ add_option( 'RMVer', RM_Registry::get( 'config', 'current_version' ) );
34
+ add_option( 'RMOptions', RM_Registry::get( 'defaults' ) );
35
+
36
+
37
+ }
38
+
39
+
40
+ }
app/controllers/JSController.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class RM_JSController extends RM_BaseController {
5
+
6
+
7
+ /**
8
+ * Prepare our JavaScript for inclusion throughout the site
9
+ *
10
+ * @return null
11
+ * @added 1.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+
17
+ if( ResponsiveMenu::getOption( 'RMExternal' ) ) :
18
+
19
+
20
+ add_action( 'wp_enqueue_scripts', array( 'RM_JSController', 'addExternal' ) );
21
+
22
+
23
+ else :
24
+
25
+
26
+ add_action( self::inFooter() ? 'wp_footer' : 'wp_head', array( 'RM_JSController', 'addInline' ) );
27
+
28
+
29
+ endif;
30
+
31
+
32
+ }
33
+
34
+
35
+ /**
36
+ * Creates and echos the inline styles if used
37
+ *
38
+ * @return string
39
+ * @added 1.0
40
+ */
41
+
42
+ static function addInline() {
43
+
44
+ $opt = ResponsiveMenu::getOptions();
45
+
46
+ echo ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_JSModel::Minify( RM_JSModel::getJs( $opt ) ) : RM_JSModel::getJs( $opt );
47
+
48
+
49
+ }
50
+
51
+
52
+ /**
53
+ * Adds the external scripts to the site if required
54
+ *
55
+ * @return null
56
+ * @added 1.4
57
+ */
58
+
59
+ static function addExternal() {
60
+
61
+
62
+ wp_enqueue_script(
63
+
64
+ 'responsive-menu',
65
+ RM_Registry::get( 'config', 'plugin_data_uri' ) . 'js/responsive-menu-' . get_current_blog_id() . '.js',
66
+ 'jquery.mobile',
67
+ '1.0',
68
+ self::inFooter()
69
+
70
+ );
71
+
72
+
73
+ }
74
+
75
+
76
+ }
app/controllers/UpgradeController.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_UpgradeController extends RM_BaseController {
4
+
5
+
6
+ /**
7
+ * Script that runs if the menu has been upgraded
8
+ *
9
+ * @return mixed
10
+ * @added 2.0
11
+ */
12
+
13
+ static function upgrade() {
14
+
15
+
16
+ if( self::needsUpgrade() ) :
17
+
18
+
19
+ if( ResponsiveMenu::getOption( 'RMExternal' ) ) :
20
+
21
+
22
+ RM_FolderModel::create();
23
+
24
+ $js = RM_JSModel::getJs( ResponsiveMenu::getOptions() );
25
+ $js = ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_JSModel::Minify( $js ) : $js = $js;
26
+
27
+ RM_JSModel::createJSFile( $js );
28
+
29
+ $css = RM_CSSModel::getCSS( ResponsiveMenu::getOptions() );
30
+ $css = ResponsiveMenu::getOption( 'RMMinify' ) == 'minify' ? RM_CSSModel::Minify( $css ) : $css = $css;
31
+
32
+ RM_CSSModel::createCSSFile( $css );
33
+
34
+
35
+ endif;
36
+
37
+ /* Update Version */
38
+ update_option( 'RMVer', RM_Registry::get( 'config', 'current_version' ) );
39
+
40
+ /* Merge Changes */
41
+ update_option( 'RMOptions', array_merge( RM_Registry::get( 'defaults' ), ResponsiveMenu::getOptions() ) );
42
+
43
+
44
+ endif;
45
+
46
+
47
+ }
48
+
49
+
50
+ /**
51
+ * Determines whether or not the site needs upgrading
52
+ *
53
+ * @return boolean
54
+ * @added 2.0
55
+ */
56
+
57
+ static function needsUpgrade() {
58
+
59
+
60
+ return version_compare( get_option( 'RMVer' ), RM_Registry::get( 'config', 'current_version' ), '<' );
61
+
62
+
63
+ }
64
+
65
+
66
+ }
app/library/responsive-menu/Export.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Export {
4
+
5
+
6
+ /**
7
+ * Function to create export XML file
8
+ *
9
+ * @return file xml
10
+ * @added 2.2
11
+ */
12
+
13
+ static function export() {
14
+
15
+ if( !is_admin() ) exit();
16
+
17
+ $fileName = RM_Registry::get( 'config', 'plugin_base_dir' ) . '/public/export/export.xml';
18
+
19
+ $file = fopen( $fileName, 'w+' );
20
+
21
+ if( !$file ) :
22
+
23
+ return RM_Status::set( 'error', __( 'Could not create export file, please check plugin folder permissions', 'responsive-menu' ) );
24
+
25
+ endif;
26
+
27
+ $xml = '<?xml version="1.0" encoding="UTF-8"?>';
28
+ $xml .= '<RMOptions>';
29
+
30
+ foreach( ResponsiveMenu::getOptions() as $option_key => $option_val ) :
31
+
32
+ $xml .= '<' . $option_key . '>' . base64_encode( $option_val ) . '</' . $option_key . '>';
33
+
34
+ endforeach;
35
+
36
+ $xml .= '</RMOptions>';
37
+
38
+ fwrite( $file, $xml );
39
+ fclose( $file );
40
+
41
+ $link = RM_Registry::get( 'config', 'plugin_base_uri' ) . 'public/export/export.xml';
42
+
43
+ RM_Status::set( 'updated', '<a href="' . $link . '">' . __( 'You can download your exported file by clicking here', 'responsive-menu' ) . '</a>' );
44
+
45
+
46
+ }
47
+
48
+
49
+ }
app/library/responsive-menu/Import.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Import {
4
+
5
+ /**
6
+ * Function to get data from imported XML file
7
+ *
8
+ * @return file xml
9
+ * @added 2.2
10
+ */
11
+
12
+ static function getData( $file ) {
13
+
14
+ if( !is_admin() ) exit();
15
+
16
+ if( !$file['tmp_name'] )
17
+ return RM_Status::set( 'error', __( 'No Import File Attached', 'responsive-menu' ) );
18
+
19
+ if( $file['type'] != 'text/xml' )
20
+ return RM_Status::set( 'error', __( 'Incorrect Import File Format', 'responsive-menu' ) );
21
+
22
+ if( $file['size'] > 500000 )
23
+ return RM_Status::set( 'error', __( 'Import File Too Large', 'responsive-menu' ) );
24
+
25
+ if( !is_uploaded_file( $file['tmp_name'] ) )
26
+ return RM_Status::set( 'error', __( 'Import File Not Valid', 'responsive-menu' ) );
27
+
28
+ $data = file_get_contents( $file['tmp_name'] );
29
+
30
+ $xml = simplexml_load_string( $data );
31
+ $json = json_encode( $xml );
32
+ $array = json_decode( $json, TRUE );
33
+ $decoded = array();
34
+
35
+ foreach( $array as $key => $val ) :
36
+ /* Need to JSON Decode HTML Shapes */
37
+ if( $key == 'RMArShpA' || $key == 'RMArShpI' ) :
38
+ $decoded[$key] = is_array( $val ) ? null : json_decode( base64_decode( $val ) );
39
+ else :
40
+ $decoded[$key] = is_array( $val ) ? null : base64_decode( $val );
41
+ endif;
42
+ endforeach;
43
+
44
+ return $decoded;
45
+
46
+
47
+ }
48
+
49
+
50
+ }
app/library/responsive-menu/Input.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Input {
4
+
5
+
6
+ /**
7
+ * Function to get all Input values
8
+ *
9
+ * @param string $name
10
+ * @return array
11
+ * @added 2.0
12
+ */
13
+
14
+ static function all( $name = null ) {
15
+
16
+
17
+ $arrays = array_merge( $_POST, $_GET );
18
+
19
+ return $name ? $arrays[$name] : $arrays;
20
+
21
+
22
+ }
23
+
24
+
25
+ /**
26
+ * Function to get only post values
27
+ *
28
+ * @param string $name
29
+ * @return array
30
+ * @added 2.0
31
+ */
32
+
33
+ static function post( $name = null ) {
34
+
35
+ if( $name )
36
+ return $name && isset( $_POST[$name] ) ? $_POST[$name] : false;
37
+ else
38
+ return $_POST;
39
+
40
+
41
+ }
42
+
43
+ /**
44
+ * Function to get only get values
45
+ *
46
+ * @param string $name
47
+ * @return array
48
+ * @added 2.0
49
+ */
50
+
51
+ static function get( $name = null ) {
52
+
53
+
54
+ if( $name )
55
+ return $name && isset( $_GET[$name] ) ? $_GET[$name] : false;
56
+ else
57
+ return $_GET;
58
+
59
+
60
+ }
61
+
62
+ /**
63
+ * Function to get only file values
64
+ *
65
+ * @param string $name
66
+ * @return array
67
+ * @added 2.0
68
+ */
69
+
70
+ static function file( $name = null ) {
71
+
72
+
73
+ if( $name )
74
+ return $name && isset( $_FILES[$name] ) ? $_FILES[$name] : false;
75
+ else
76
+ return $_FILES;
77
+
78
+
79
+ }
80
+
81
+
82
+ }
app/library/responsive-menu/MenuWalker.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_MenuWalker extends Walker_Nav_Menu {
4
+
5
+
6
+ /**
7
+ * Added for potentially using a Menu Walker in future
8
+ * if needed.
9
+ *
10
+ * @return null
11
+ * @added 2.2
12
+ */
13
+
14
+
15
+ }
app/library/responsive-menu/Registry.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Registry {
4
+
5
+ /**
6
+ * Base array that holds all our further registry key => val pairs
7
+ *
8
+ * @param array $registry
9
+ * @added 2.0
10
+ */
11
+
12
+ static $registry;
13
+
14
+
15
+ /**
16
+ * Function to Get Registry values
17
+ *
18
+ * @param array $array
19
+ * @param string $val
20
+ * @return array
21
+ * @added 2.0
22
+ */
23
+
24
+ public static function get( $array, $val = null ) {
25
+
26
+
27
+ return !$val ? self::$registry[$array] : self::$registry[$array][$val];
28
+
29
+
30
+ }
31
+
32
+
33
+ /**
34
+ * Function to Set Registry values
35
+ *
36
+ * @param string $key
37
+ * @param mixed $val
38
+ * @return null
39
+ * @added 2.0
40
+ */
41
+
42
+ public static function set( $key, $val ) {
43
+
44
+
45
+ self::$registry[$key] = $val;
46
+
47
+
48
+ }
49
+
50
+
51
+ }
app/library/responsive-menu/ResponsiveMenu.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class ResponsiveMenu {
5
+
6
+
7
+ /**
8
+ * Main Construct for the Whole Application
9
+ * Sets Registry and Default Values (if none present)
10
+ *
11
+ * @return null
12
+ * @added 2.0
13
+ */
14
+
15
+ public function __construct() {
16
+
17
+
18
+ if( !get_option( 'RMVer' ) ) :
19
+ add_option( 'RMVer', RM_Registry::get( 'config', 'current_version' ) );
20
+ endif;
21
+
22
+ if( !get_option( 'RMOptions' ) ) :
23
+ add_option( 'RMOptions', RM_Registry::get( 'defaults' ) );
24
+ endif;
25
+
26
+ RM_Registry::set( 'options', get_option( 'RMOptions' ) );
27
+ RM_Registry::set( 'version', get_option( 'RMVer' ) );
28
+
29
+
30
+ }
31
+
32
+
33
+ /**
34
+ * The main application run function, this sets up all the magic and grunt
35
+ * work of the application, firing off all the different controllers.
36
+ *
37
+ * @return null
38
+ * @added 2.0
39
+ */
40
+
41
+ public function run() {
42
+
43
+
44
+ RM_InstallController::prepare();
45
+ RM_UpgradeController::upgrade();
46
+ RM_GlobalController::prepare();
47
+ RM_FrontController::prepare();
48
+ RM_AdminController::prepare();
49
+ RM_HTMLController::prepare();
50
+ RM_CSSController::prepare();
51
+ RM_JSController::prepare();
52
+
53
+ RM_Shortcode::prepare();
54
+
55
+ }
56
+
57
+
58
+ /**
59
+ * Function to return all options throughout the site, it also
60
+ * automatically mixes in any default options that don't exist
61
+ * in the current version
62
+ *
63
+ * @return array
64
+ * @added 2.1
65
+ */
66
+
67
+ static function getOptions() {
68
+
69
+ return array_merge( (array) RM_Registry::get( 'defaults' ), (array) get_option( 'RMOptions' ) );
70
+
71
+ }
72
+
73
+
74
+ /**
75
+ * Function to return individual options throughout the site, it
76
+ * automatically returns the default option if a current value
77
+ * doesn't exist in the current version
78
+ *
79
+ * @return array
80
+ * @added 2.1
81
+ */
82
+
83
+ static function getOption( $option ) {
84
+
85
+ $options = self::getOptions();
86
+
87
+ if( isset( $options[$option] ) )
88
+ return $options[$option];
89
+
90
+ return RM_Registry::get( 'defaults', $option );
91
+
92
+ }
93
+
94
+ /**
95
+ * Function to return if there are created menus in the system
96
+ *
97
+ * @return bool
98
+ * @added 2.3
99
+ */
100
+
101
+ static function hasMenus() {
102
+
103
+ if( count( get_terms( 'nav_menu' ) ) > 0 )
104
+ return true;
105
+
106
+ return false;
107
+
108
+ }
109
+
110
+ /**
111
+ * Function to return currently created menus in the system
112
+ *
113
+ * @return object
114
+ * @added 2.3
115
+ */
116
+
117
+ static function getMenus() {
118
+
119
+ return get_terms( 'nav_menu' );
120
+
121
+ }
122
+
123
+ /*
124
+ * Function to return current theme location menus in the system
125
+ *
126
+ * @return object
127
+ * @added 2.6 Mkdgs
128
+ */
129
+ static function getMenusLocations() {
130
+
131
+ $menus = get_registered_nav_menus();
132
+ $r = array();
133
+
134
+ foreach ( $menus as $location => $description ) {
135
+ $r[] = $o = new stdClass;
136
+ $o->location = $location;
137
+ $o->description = $description;
138
+ }
139
+
140
+ return $r;
141
+
142
+ }
143
+
144
+ }
app/library/responsive-menu/Shortcode.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Shortcode {
4
+
5
+ /**
6
+ * Function to set a new status in the system
7
+ *
8
+ * @param string $type
9
+ * @param string $text
10
+ * @return null
11
+ * @added 2.0
12
+ */
13
+
14
+ static function prepare() {
15
+
16
+
17
+ if( ResponsiveMenu::getOption( 'RMShortcode' ) )
18
+ add_shortcode( 'responsive-menu', array( 'RM_HTMLController', 'display' ) );
19
+
20
+
21
+ }
22
+
23
+
24
+ }
app/library/responsive-menu/Status.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Status {
4
+
5
+ /**
6
+ * Static Array that holds all the current system statuses
7
+ *
8
+ * @param array $status
9
+ * @added 2.0
10
+ */
11
+
12
+ protected static $status = array();
13
+
14
+
15
+ /**
16
+ * Function to set a new status in the system
17
+ *
18
+ * @param string $type
19
+ * @param string $text
20
+ * @return null
21
+ * @added 2.0
22
+ */
23
+
24
+ static function set( $type, $text ) {
25
+
26
+
27
+ array_push( self::$status, array( $type, $text ) );
28
+
29
+
30
+ }
31
+
32
+ /**
33
+ * Function to retrieve all current statuses in the system
34
+ *
35
+ * @return array
36
+ * @added 2.0
37
+ */
38
+
39
+ static function get() {
40
+
41
+
42
+ return self::$status;
43
+
44
+
45
+ }
46
+
47
+
48
+ }
app/library/responsive-menu/Transient.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_Transient {
4
+
5
+ /**
6
+ * Function to get named cached transient menu
7
+ *
8
+ * @param string $name
9
+ * @return string
10
+ * @added 2.3
11
+ * @edited 2.4 - Added option to use transient caching
12
+ */
13
+
14
+ static function getTransientMenu( $data ) {
15
+
16
+ $Transient = ResponsiveMenu::getOption( 'RMUseTran' );
17
+
18
+ if( $Transient ) :
19
+
20
+ $cachedKey = $data['RM'] . '_' . get_current_blog_id();
21
+ $cachedMenu = get_transient( $cachedKey );
22
+
23
+ else :
24
+
25
+ $cachedMenu = false;
26
+
27
+ endif;
28
+
29
+ if( $cachedMenu === false ) :
30
+
31
+ $cachedMenu = self::createTransientMenu( $data );
32
+
33
+ if( $Transient )
34
+ set_transient( $cachedKey, $cachedMenu );
35
+
36
+ endif;
37
+
38
+ return $cachedMenu;
39
+
40
+ }
41
+
42
+ /**
43
+ * Function to create named cached transient menu
44
+ *
45
+ * @param string $name
46
+ * @return array
47
+ * @added 2.3
48
+ */
49
+
50
+ static function createTransientMenu( $data ) {
51
+ if ( $data['RMThemeLocation'] ) { // if theme_location is used, menu is no used
52
+ $data['RM'] = null;
53
+ }
54
+ $cachedMenu = wp_nav_menu( array(
55
+ 'theme_location' => $data['RMThemeLocation'],
56
+ 'menu' => $data['RM'],
57
+ 'menu_class' => 'responsive-menu',
58
+ 'depth' => $data['RMDepth'] ,
59
+ 'walker' => ( !empty( $data['RMWalker'] ) ) ? new $data['RMWalker'] : '', // Add by Mkdgs
60
+ 'echo' => false
61
+ )
62
+ );
63
+
64
+ return $cachedMenu;
65
+
66
+ }
67
+
68
+ /**
69
+ * Function to clear all transient menus
70
+ *
71
+ * @return null
72
+ * @added 2.3
73
+ */
74
+
75
+ static function clearTransientMenus() {
76
+
77
+ if( ResponsiveMenu::hasMenus() ) :
78
+
79
+ foreach( ResponsiveMenu::getMenus() as $menu ) :
80
+
81
+ delete_transient( $menu->slug . '_' . get_current_blog_id() );
82
+
83
+ endforeach;
84
+
85
+ endif;
86
+
87
+ }
88
+
89
+ }
app/library/responsive-menu/View.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_View {
4
+
5
+
6
+ /**
7
+ * Create a new view for display throughout the application
8
+ * Users .phtml files found in the app/views folder
9
+ *
10
+ * @param string $page
11
+ * @param mixed $data
12
+ * @return null
13
+ * @added 2.0
14
+ */
15
+
16
+ static function make( $page, $data ) {
17
+
18
+
19
+ require RM_Registry::get( 'config', 'plugin_base_dir' ) . '/app/views/' . str_replace( '.', '/', $page ) . '.phtml';
20
+
21
+
22
+ }
23
+
24
+
25
+ /**
26
+ * Function to format and display the status bar in the admin pages
27
+ *
28
+ * @param array $status
29
+ * @return string
30
+ * @added 2.0
31
+ */
32
+
33
+ static function statusBar( $status ) {
34
+
35
+
36
+ $message = null;
37
+
38
+ foreach( $status as $stati ) :
39
+
40
+ $message .= '<div id="message" class="' . $stati[0] . ' below-h2 cookieBannerSuccess">';
41
+ $message .= '<p>' . $stati[1] . '</p>';
42
+ $message .= '</div>';
43
+
44
+ endforeach;
45
+
46
+ return $message;
47
+
48
+
49
+ }
50
+
51
+
52
+ /**
53
+ * Function to format and display the search bar in the main menu
54
+ *
55
+ * @return string
56
+ * @added 2.0
57
+ */
58
+
59
+ static function searchBar() {
60
+
61
+ /* Added for WPML Compatibility in 2.2
62
+ * Thanks to miguelcortereal for this */
63
+
64
+ $action = function_exists( 'icl_get_home_url' ) ? icl_get_home_url() : get_home_url(); ?>
65
+
66
+ <form action="<?php echo $action; ?>" id="responsiveSearch" method="get" role="search">
67
+
68
+ <input type="search" name="s" value="" placeholder="<?php _e( 'Search', 'responsive-menu' ); ?>" id="responsiveSearchInput">
69
+ <input type="submit" id="responsiveSearchSubmit" />
70
+
71
+ </form>
72
+
73
+ <?php
74
+
75
+ }
76
+
77
+
78
+ /**
79
+ * Function to format and display the additional content in the main menu
80
+ *
81
+ * @return string
82
+ * @added 2.0
83
+ */
84
+
85
+ static function additionalContent( $html ) { ?>
86
+
87
+ <div id="rm-additional-content">
88
+ <?php echo do_shortcode( $html ); ?>
89
+ </div>
90
+
91
+ <?php
92
+
93
+ }
94
+
95
+
96
+ }
app/models/AdminModel.php ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_AdminModel extends RM_BaseModel {
4
+
5
+
6
+ /**
7
+ * Saves all the data from the admin page to the database
8
+ *
9
+ * @param array $data
10
+ * @return null
11
+ * @added 1.0
12
+ */
13
+
14
+ static public function save( $data ) {
15
+
16
+ // Initialise Variables Correctly
17
+
18
+ $RM = isset($data['RM']) ? $data['RM'] : RM_Registry::get( 'defaults', 'RM' );
19
+
20
+ $RMTitle = isset($data['RMTitle']) ? $data['RMTitle'] : RM_Registry::get( 'defaults', 'RMTitle' );
21
+
22
+ $RMBreak = $data['RMBreak'] ? $data['RMBreak'] : RM_Registry::get( 'defaults', 'RMBreak' );
23
+
24
+ $RMDepth = isset($data['RMDepth']) ? $data['RMDepth'] : RM_Registry::get( 'defaults', 'RMDepth' );
25
+
26
+ $RMTop = isset($data['RMTop']) ? $data['RMTop'] : RM_Registry::get( 'defaults', 'RMTop' );
27
+
28
+ $RMRight = isset($data['RMRight']) ? $data['RMRight'] : RM_Registry::get( 'defaults', 'RMRight' );
29
+
30
+ $RMCss = isset($data['RMCss']) ? $data['RMCss'] : RM_Registry::get( 'defaults', 'RMCss' );
31
+
32
+ $RMLineCol = !empty($data['RMLineCol']) ? $data['RMLineCol'] : RM_Registry::get( 'defaults', 'RMLineCol' );
33
+
34
+ $RMClickBkg = !empty($data['RMClickBkg']) ? $data['RMClickBkg'] : RM_Registry::get( 'defaults', 'RMClickBkg' );
35
+
36
+ $RMClickTitle = isset($data['RMClickTitle']) ? $data['RMClickTitle'] : RM_Registry::get( 'defaults', 'RMClickTitle' );
37
+
38
+ $RMBkgTran = isset($data['RMBkgTran']) ? $data['RMBkgTran'] : false;
39
+
40
+ $RMPos = isset($data['RMPos']) ? $data['RMPos'] : RM_Registry::get( 'defaults', 'RMPos' );
41
+
42
+ $RMImage = isset($data['RMImage']) ? $data['RMImage'] : RM_Registry::get( 'defaults', 'RMImage' );
43
+
44
+ $RMWidth = $data['RMWidth'] ? $data['RMWidth'] : RM_Registry::get( 'defaults', 'RMWidth' );
45
+
46
+ $RMBkg = !empty($data['RMBkg']) ? $data['RMBkg'] : RM_Registry::get( 'defaults', 'RMBkg' );
47
+
48
+ $RMBkgHov = !empty($data['RMBkgHov']) ? $data['RMBkgHov'] : RM_Registry::get( 'defaults', 'RMBkgHov' );
49
+
50
+ $RMTitleCol = !empty($data['RMTitleCol']) ? $data['RMTitleCol'] : RM_Registry::get( 'defaults', 'RMTitleCol' );
51
+
52
+ $RMTextCol = !empty($data['RMTextCol']) ? $data['RMTextCol'] : RM_Registry::get( 'defaults', 'RMTextCol' );
53
+
54
+ $RMBorCol = !empty($data['RMBorCol']) ? $data['RMBorCol'] : RM_Registry::get( 'defaults', 'RMBorCol' );
55
+
56
+ $RMTextColHov = !empty($data['RMTextColHov']) ? $data['RMTextColHov'] : RM_Registry::get( 'defaults', 'RMTextColHov' );
57
+
58
+ $RMTitleColHov = !empty($data['RMTitleColHov']) ? $data['RMTitleColHov'] : RM_Registry::get( 'defaults', 'RMTitleColHov' );
59
+
60
+ /* Added in 1.6 */
61
+
62
+ $RMAnim = isset($data['RMAnim']) ? $data['RMAnim'] : RM_Registry::get( 'defaults', 'RMAnim' );
63
+
64
+ $RMPushCSS = isset($data['RMPushCSS']) ? $data['RMPushCSS'] : RM_Registry::get( 'defaults', 'RMPushCSS' );
65
+
66
+ $RMTitleBkg = !empty($data['RMTitleBkg']) ? $data['RMTitleBkg'] : RM_Registry::get( 'defaults', 'RMTitleBkg' );
67
+
68
+ $RMFont = isset($data['RMFont']) ? $data['RMFont'] : RM_Registry::get( 'defaults', 'RMFont' );
69
+
70
+ $RMFontSize = $data['RMFontSize'] ? $data['RMFontSize'] : RM_Registry::get( 'defaults', 'RMFontSize' );
71
+
72
+ $RMTitleSize = $data['RMTitleSize'] ? $data['RMTitleSize'] : RM_Registry::get( 'defaults', 'RMTitleSize' );
73
+
74
+ $RMBtnSize = $data['RMBtnSize'] ? $data['RMBtnSize'] : RM_Registry::get( 'defaults', 'RMBtnSize' );
75
+
76
+ $RMCurBkg = !empty($data['RMCurBkg']) ? $data['RMCurBkg'] : RM_Registry::get( 'defaults', 'RMCurBkg' );
77
+
78
+ $RMCurCol = !empty($data['RMCurCol']) ? $data['RMCurCol'] : RM_Registry::get( 'defaults', 'RMCurCol' );
79
+
80
+ $RMAnimSpd = $data['RMAnimSpd'] !== false ? $data['RMAnimSpd'] : RM_Registry::get( 'defaults', 'RMAnimSpd' );
81
+
82
+ /* Added in 1.7 */
83
+
84
+ $RMTranSpd = $data['RMTranSpd'] ? $data['RMTranSpd'] : RM_Registry::get( 'defaults', 'RMTranSpd' );
85
+
86
+ $RMTxtAlign = isset($data['RMTxtAlign']) ? $data['RMTxtAlign'] : RM_Registry::get( 'defaults', 'RMTxtAlign' );
87
+
88
+ $RMSearch = isset($data['RMSearch']) ? $data['RMSearch'] : RM_Registry::get( 'defaults', 'RMSearch' );
89
+
90
+ $RMExpand = isset($data['RMExpand']) ? $data['RMExpand'] : RM_Registry::get( 'defaults', 'RMExpand' );
91
+
92
+ $RMLinkHeight = $data['RMLinkHeight'] ? $data['RMLinkHeight'] : RM_Registry::get( 'defaults', 'RMLinkHeight' );
93
+
94
+ /* Added in 1.8 */
95
+
96
+ $RMExternal = isset( $data['RMExternal'] ) ? $data['RMExternal'] : RM_Registry::get( 'defaults', 'RMExternal' );
97
+
98
+ $RMSide = isset( $data['RMSide'] ) ? $data['RMSide'] : RM_Registry::get( 'defaults', 'RMSide' );
99
+
100
+ /* Added in 1.9 */
101
+
102
+ $RMFooter = isset( $data['RMFooter'] ) ? $data['RMFooter'] : RM_Registry::get( 'defaults', 'RMFooter' );
103
+
104
+ $RMClickImg = isset( $data['RMClickImg'] ) ? $data['RMClickImg'] : RM_Registry::get( 'defaults', 'RMClickImg' );
105
+
106
+ $RMMinify = isset( $data['RMMinify'] ) ? $data['RMMinify'] : RM_Registry::get( 'defaults', 'RMMinify' );
107
+
108
+ $RMClickClose = isset( $data['RMClickClose'] ) ? $data['RMClickClose'] : RM_Registry::get( 'defaults', 'RMClickClose' );
109
+
110
+ $RMRemImp = isset( $data['RMRemImp'] ) ? $data['RMRemImp'] : RM_Registry::get( 'defaults', 'RMRemImp' );
111
+
112
+ $RMX = isset( $data['RMX'] ) ? $data['RMX'] : RM_Registry::get( 'defaults', 'RMX' );
113
+
114
+ $RMMinWidth = isset( $data['RMMinWidth'] ) ? $data['RMMinWidth'] : RM_Registry::get( 'defaults', 'RMMinWidth' );
115
+
116
+ /* Added in 2.0 */
117
+
118
+ $RMMaxWidth = isset( $data['RMMaxWidth'] ) ? $data['RMMaxWidth'] : RM_Registry::get( 'defaults', 'RMMaxWidth' );
119
+
120
+ $RMExpandPar = isset( $data['RMExpandPar'] ) ? $data['RMExpandPar'] : false;
121
+
122
+ $RMIgnParCli = isset( $data['RMIgnParCli'] ) ? $data['RMIgnParCli'] : RM_Registry::get( 'defaults', 'RMIgnParCli' );
123
+
124
+ $RMCliToClo = isset( $data['RMCliToClo'] ) ? $data['RMCliToClo'] : RM_Registry::get( 'defaults', 'RMCliToClo' );
125
+
126
+ $RMSearchPos = isset( $data['RMSearchPos'] ) ? $data['RMSearchPos'] : RM_Registry::get( 'defaults', 'RMSearchPos' );
127
+
128
+ $RMTitleLink = isset( $data['RMTitleLink'] ) ? $data['RMTitleLink'] : RM_Registry::get( 'defaults', 'RMTitleLink' );
129
+
130
+ $RMTitleLoc = isset( $data['RMTitleLoc'] ) ? $data['RMTitleLoc'] : RM_Registry::get( 'defaults', 'RMTitleLoc' );
131
+
132
+ $RMHtml = isset( $data['RMHtml'] ) ? $data['RMHtml'] : RM_Registry::get( 'defaults', 'RMHtml' );
133
+
134
+ $RMHtmlLoc = isset( $data['RMHtmlLoc'] ) ? $data['RMHtmlLoc'] : RM_Registry::get( 'defaults', 'RMHtmlLoc' );
135
+
136
+ /* Added in 2.1 */
137
+
138
+ $RMShortcode = isset( $data['RMShortcode'] ) ? $data['RMShortcode'] : RM_Registry::get( 'defaults', 'RMShortcode' );
139
+
140
+ /* Added in 2.2 */
141
+
142
+ $RMLineHeight = isset( $data['RMLineHeight'] ) ? $data['RMLineHeight'] : RM_Registry::get( 'defaults', 'RMLineHeight' );
143
+
144
+ $RMLineWidth = isset( $data['RMLineWidth'] ) ? $data['RMLineWidth'] : RM_Registry::get( 'defaults', 'RMLineWidth' );
145
+
146
+ $RMLineMargin = isset( $data['RMLineMargin'] ) ? $data['RMLineMargin'] : RM_Registry::get( 'defaults', 'RMLineMargin' );
147
+
148
+ $RMClickImgClicked = isset( $data['RMClickImgClicked'] ) ? $data['RMClickImgClicked'] : RM_Registry::get( 'defaults', 'RMClickImgClicked' );
149
+
150
+ $RMAccordion = isset( $data['RMAccordion'] ) ? $data['RMAccordion'] : RM_Registry::get( 'defaults', 'RMAccordion' );
151
+
152
+ $RMArShpA = isset( $data['RMArShpA'] ) ? $data['RMArShpA'] : RM_Registry::get( 'defaults', 'RMArShpA' );
153
+
154
+ $RMArShpI = isset( $data['RMArShpI'] ) ? $data['RMArShpI'] : RM_Registry::get( 'defaults', 'RMArShpI' );
155
+
156
+ $RMArImgA = isset( $data['RMArImgA'] ) ? $data['RMArImgA'] : RM_Registry::get( 'defaults', 'RMArImgA' );
157
+
158
+ $RMArImgI = isset( $data['RMArImgI'] ) ? $data['RMArImgI'] : RM_Registry::get( 'defaults', 'RMArImgI' );
159
+
160
+ /* Added in 2.3 */
161
+
162
+ $RMTrigger = isset( $data['RMTrigger'] ) && !empty( $data['RMTrigger'] ) ? $data['RMTrigger'] : RM_Registry::get( 'defaults', 'RMTrigger' );
163
+
164
+ $RMPushBtn = isset( $data['RMPushBtn'] ) ? $data['RMPushBtn'] : RM_Registry::get( 'defaults', 'RMPushBtn' );
165
+
166
+ $RMCurBkgHov = !empty($data['RMCurBkgHov']) ? $data['RMCurBkgHov'] : RM_Registry::get( 'defaults', 'RMCurBkgHov' );
167
+
168
+ $RMCurColHov = !empty($data['RMCurColHov']) ? $data['RMCurColHov'] : RM_Registry::get( 'defaults', 'RMCurColHov' );
169
+
170
+ /* Add by MKDGS */
171
+ $RMWalker = isset( $data['RMWalker'] ) ? $data['RMWalker'] : RM_Registry::get( 'defaults', 'RMWalker' );
172
+
173
+ /* Added in 2.4 */
174
+
175
+ $RMUseTran = isset( $data['RMUseTran'] ) ? $data['RMUseTran'] : RM_Registry::get( 'defaults', 'RMUseTran' );
176
+
177
+ $RMLoc = isset( $data['RMLoc'] ) ? $data['RMLoc'] : RM_Registry::get( 'defaults', 'RMLoc' );
178
+
179
+ /* Added in 2.6 Mkdgs */
180
+
181
+ $RMThemeLocation = isset( $data['RMThemeLocation'] ) ? $data['RMThemeLocation'] : RM_Registry::get( 'defaults', 'RMThemeLocation' );
182
+
183
+ /* Added in 2.8.7 */
184
+
185
+ $RMClickTitlePos = isset( $data['RMClickTitlePos'] ) ? $data['RMClickTitlePos'] : RM_Registry::get( 'defaults', 'RMClickTitlePos' );
186
+
187
+ $RMClickTitleHeight = isset( $data['RMClickTitleHeight'] ) ? $data['RMClickTitleHeight'] : RM_Registry::get( 'defaults', 'RMClickTitleHeight' );
188
+
189
+ $optionsArray = array(
190
+
191
+ // Filter Input Correctly
192
+
193
+ 'RM' => self::Filter($RM),
194
+
195
+ 'RMBreak' => intval($RMBreak),
196
+
197
+ 'RMDepth' => intval($RMDepth),
198
+
199
+ 'RMTop' => intval($RMTop),
200
+
201
+ 'RMRight' => intval($RMRight),
202
+
203
+ 'RMCss' => self::Filter($RMCss),
204
+
205
+ 'RMTitle' => self::Filter($RMTitle),
206
+
207
+ 'RMLineCol' => self::Filter($RMLineCol),
208
+
209
+ 'RMClickBkg' => self::Filter($RMClickBkg),
210
+
211
+ 'RMClickTitle' => self::Filter($RMClickTitle),
212
+
213
+ 'RMBkgTran' => self::Filter($RMBkgTran),
214
+
215
+ 'RMFont' => self::Filter($RMFont),
216
+
217
+ 'RMPos' => self::Filter($RMPos),
218
+
219
+ 'RMImage' => self::Filter($RMImage),
220
+
221
+ 'RMWidth' => intval($RMWidth),
222
+
223
+ 'RMBkg' => self::Filter($RMBkg),
224
+
225
+ 'RMBkgHov' => self::Filter($RMBkgHov),
226
+
227
+ 'RMTitleCol' => self::Filter($RMTitleCol),
228
+
229
+ 'RMTextCol' => self::Filter($RMTextCol),
230
+
231
+ 'RMBorCol' => self::Filter($RMBorCol),
232
+
233
+ 'RMTextColHov' => self::Filter($RMTextColHov),
234
+
235
+ 'RMTitleColHov' => self::Filter($RMTitleColHov),
236
+
237
+ /* Added in 1.6 */
238
+
239
+ 'RMAnim' => self::Filter($RMAnim),
240
+
241
+ 'RMPushCSS' => self::Filter($RMPushCSS),
242
+
243
+ 'RMTitleBkg' => self::Filter( $RMTitleBkg ),
244
+
245
+ 'RMFontSize' => intval( $RMFontSize ),
246
+
247
+ 'RMTitleSize' => intval( $RMTitleSize ),
248
+
249
+ 'RMBtnSize' => intval( $RMBtnSize ),
250
+
251
+ 'RMCurBkg' => self::Filter( $RMCurBkg ),
252
+
253
+ 'RMCurCol' => self::Filter( $RMCurCol ),
254
+
255
+ 'RMAnimSpd' => floatval( $RMAnimSpd ),
256
+
257
+ /* Added in 1.7 */
258
+
259
+ 'RMTranSpd' => floatval( $RMTranSpd ),
260
+
261
+ 'RMTxtAlign' => self::Filter( $RMTxtAlign ),
262
+
263
+ 'RMSearch' => self::Filter( $RMSearch ),
264
+
265
+ 'RMExpand' => self::Filter( $RMExpand ),
266
+
267
+ 'RMLinkHeight' => intval( $RMLinkHeight ),
268
+
269
+ /* Added in 1.8 */
270
+
271
+ 'RMExternal' => self::Filter( $RMExternal ),
272
+
273
+ 'RMSide' => self::Filter( $RMSide ),
274
+
275
+ /* Added in 1.9 */
276
+
277
+ 'RMFooter' => self::Filter( $RMFooter ),
278
+
279
+ 'RMClickImg' => self::Filter( $RMClickImg ),
280
+
281
+ 'RMMinify' => self::Filter( $RMMinify ),
282
+
283
+ 'RMClickClose' => self::Filter( $RMClickClose ),
284
+
285
+ 'RMRemImp' => self::Filter( $RMRemImp ),
286
+
287
+ 'RMX' => self::Filter( $RMX ),
288
+
289
+ 'RMMinWidth' => intval( $RMMinWidth ),
290
+
291
+ /* Added in 2.0 */
292
+
293
+ 'RMMaxWidth' => intval( $RMMaxWidth ),
294
+
295
+ 'RMExpandPar' => self::Filter( $RMExpandPar ),
296
+
297
+ 'RMIgnParCli' => self::Filter( $RMIgnParCli ),
298
+
299
+ 'RMCliToClo' => self::Filter( $RMCliToClo ),
300
+
301
+ 'RMSearchPos' => self::Filter( $RMSearchPos ),
302
+
303
+ 'RMTitleLink' => self::Filter( $RMTitleLink ),
304
+
305
+ 'RMTitleLoc' => self::Filter( $RMTitleLoc ),
306
+
307
+ 'RMHtml' => self::FilterHtml( $RMHtml ),
308
+
309
+ 'RMHtmlLoc' => self::Filter( $RMHtmlLoc ),
310
+
311
+
312
+ /* Added in 2.1 */
313
+
314
+ 'RMShortcode' => self::Filter( $RMShortcode ),
315
+
316
+
317
+ /* Added in 2.2 */
318
+
319
+ 'RMLineHeight' => intval( $RMLineHeight ),
320
+
321
+ 'RMLineWidth' => intval( $RMLineWidth ),
322
+
323
+ 'RMLineMargin' => intval( $RMLineMargin ),
324
+
325
+ 'RMClickImgClicked' => self::Filter( $RMClickImgClicked ),
326
+
327
+ 'RMAccordion' => self::Filter( $RMAccordion ),
328
+
329
+ 'RMArShpA' => json_encode( $RMArShpA ),
330
+
331
+ 'RMArShpI' => json_encode( $RMArShpI ),
332
+
333
+ 'RMArImgA' => self::Filter( $RMArImgA ),
334
+
335
+ 'RMArImgI' => self::Filter( $RMArImgI ),
336
+
337
+
338
+ /* Added in 2.3 */
339
+
340
+ 'RMTrigger' => self::Filter( $RMTrigger ),
341
+
342
+ 'RMPushBtn' => self::Filter( $RMPushBtn ),
343
+
344
+ 'RMCurBkgHov' => self::Filter( $RMCurBkgHov ),
345
+
346
+ 'RMCurColHov' => self::Filter( $RMCurColHov ),
347
+
348
+ /* Add by Mkdgs */
349
+
350
+ 'RMWalker' => ( class_exists( $RMWalker ) ) ? $RMWalker : '',
351
+
352
+ /* Added in 2.4 */
353
+
354
+ 'RMUseTran' => self::Filter( $RMUseTran ),
355
+
356
+ 'RMLoc' => self::Filter( $RMLoc ),
357
+
358
+ /* Added in 2.6 Mkdgs */
359
+
360
+ 'RMThemeLocation' => self::Filter( $RMThemeLocation ),
361
+
362
+ /* Added in 2.8.7 */
363
+
364
+ 'RMClickTitlePos' => self::Filter( $RMClickTitlePos ),
365
+
366
+ 'RMClickTitleHeight' => self::Filter( $RMClickTitleHeight ),
367
+
368
+ );
369
+
370
+ // Update Submitted Options
371
+
372
+ update_option( 'RMOptions', $optionsArray );
373
+
374
+ // Clear Transient Menus
375
+
376
+ RM_Transient::clearTransientMenus();
377
+
378
+ // And save the status
379
+
380
+ RM_Status::set( 'updated', __( 'You have successfully updated the Responsive Menu options', 'responsive-menu' ) );
381
+
382
+
383
+ }
384
+
385
+
386
+ }
app/models/BaseModel.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_BaseModel {
4
+
5
+
6
+ /**
7
+ * Basic Function to filter Input
8
+ *
9
+ * @param string $input
10
+ * @return string
11
+ * @added 1.0
12
+ */
13
+
14
+ static function Filter( $input ) {
15
+
16
+ if( is_string( $input ) )
17
+ return stripslashes( strip_tags( trim( $input ) ) );
18
+
19
+
20
+ }
21
+
22
+ /**
23
+ * Basic Function to filter HTML allowed Input
24
+ *
25
+ * @param string $input
26
+ * @return string
27
+ * @added 1.0
28
+ */
29
+
30
+ static function FilterHtml( $input ) {
31
+
32
+ if( is_string( $input ) )
33
+ return trim( stripslashes( $input ) );
34
+
35
+
36
+ }
37
+
38
+
39
+ /**
40
+ * Function to minify the Js and CSS files if required
41
+ *
42
+ * Parts taken from
43
+ * http://castlesblog.com/2010/august/14/php-javascript-css-minification
44
+ *
45
+ * @param string $input
46
+ * @return string
47
+ * @added 1.9
48
+ */
49
+
50
+ static function Minify( $input ) {
51
+
52
+
53
+ /* remove comments */
54
+ $output = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $input);
55
+
56
+ /* remove tabs, spaces, newlines, etc. */
57
+ $output = str_replace(array("\r\n","\r","\n","\t",' ',' ',' '), '', $output);
58
+
59
+ /* remove other spaces before/after ; */
60
+ $output = preg_replace(array('(( )+{)','({( )+)'), '{', $output);
61
+ $output = preg_replace(array('(( )+})','(}( )+)','(;( )*})'), '}', $output);
62
+ $output = preg_replace(array('(;( )+)','(( )+;)'), ';', $output);
63
+
64
+ return $output;
65
+
66
+
67
+ }
68
+
69
+
70
+ }
app/models/CSSModel.php ADDED
@@ -0,0 +1,542 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_CSSModel extends RM_BaseModel {
4
+
5
+
6
+ /**
7
+ * Function to create the file to hold the CSS file
8
+ *
9
+ * @param string $css
10
+ * @return file
11
+ * @added 1.6
12
+ */
13
+
14
+ static function createCSSFile( $css ) {
15
+
16
+
17
+ $file = fopen( RM_Registry::get( 'config', 'plugin_data_dir' ) . '/css/responsive-menu-' . get_current_blog_id() . '.css', 'w' );
18
+
19
+ $cssFile = fwrite( $file, $css );
20
+
21
+ fclose( $file );
22
+
23
+ if( !$file )
24
+ RM_Status::set( 'error', __( 'Unable to create CSS file', 'responsive-menu' ) );
25
+
26
+ return $cssFile;
27
+
28
+
29
+ }
30
+
31
+ /**
32
+ * Function to format, create and get the CSS itself
33
+ *
34
+ * @param string $args
35
+ * @return string
36
+ * @added 1.0
37
+ */
38
+
39
+ static function getCSS( $options ) {
40
+
41
+
42
+ $important = empty( $options['RMRemImp'] ) ? ' !important;' : ';';
43
+
44
+ $position = $options['RMPos'] == 'fixed' ? 'fixed' : 'absolute';
45
+ $overflowy = $options['RMPos'] == 'fixed' ? 'overflow-y: auto;' : '';
46
+ $bottom = $options['RMPos'] == 'fixed' ? 'bottom: 0px;' : '';
47
+
48
+ $right = empty($options['RMRight']) ? '0' : $options['RMRight'];
49
+
50
+ $top = empty( $options['RMTop']) ? '0' : $options['RMTop'];
51
+
52
+ $width = empty($options['RMWidth']) ? '75' : $options['RMWidth'];
53
+ $mainBkg = empty($options['RMBkg']) ? "#43494C" : $options['RMBkg'];
54
+ $mainBkgH = empty($options['RMBkgHov']) ? "#3C3C3C" : $options['RMBkgHov'];
55
+ $font = empty($options['RMFont']) ? '' : 'font-family: ' . $options['RMFont'] . $important;
56
+ $titleCol = empty($options['RMTitleCol']) ? '#FFFFFF' : $options['RMTitleCol'];
57
+ $titleColH = empty($options['RMTitleColHov']) ? '#FFFFFF' : $options['RMTitleColHov'];
58
+ $txtCol = empty($options['RMTextCol']) ? "#FFFFFF" : $options['RMTextCol'];
59
+ $txtColH = empty($options['RMTextColHov']) ? "#FFFFFF" : $options['RMTextColHov'];
60
+ $clickCol = empty($options['RMLineCol']) ? "#FFFFFF" : $options['RMLineCol'];
61
+ $clickBkg = empty($options['RMBkgTran']) ? "background: {$options['RMClickBkg']};" : '';
62
+ $borCol = empty($options['RMBorCol']) ? "#3C3C3C" : $options['RMBorCol'];
63
+ $breakpoint = empty($options['RMBreak']) ? "600" : $options['RMBreak'];
64
+ $titleBkg = empty($options['RMTitleBkg']) ? "#43494C" : $options['RMTitleBkg'];
65
+
66
+ $fontSize = empty($options['RMFontSize']) ? 13 : $options['RMFontSize'];
67
+ $titleSize = empty($options['RMTitleSize']) ? 14 : $options['RMTitleSize'];
68
+ $btnSize = empty($options['RMBtnSize']) ? 13 : $options['RMBtnSize'];
69
+
70
+ $curBkg = empty($options['RMCurBkg']) ? $mainBkg : $options['RMCurBkg'];
71
+ $curCol = empty($options['RMCurCol']) ? $txtCol : $options['RMCurCol'];
72
+
73
+ /* Added 1.7 */
74
+ $trans = empty( $options['RMTranSpd'] ) ? 1 : $options['RMTranSpd'];
75
+ $align = empty( $options['RMTxtAlign'] ) ? 'left' : $options['RMTxtAlign'];
76
+ $linkPadding = $options['RMTxtAlign'] == 'right' ? '12px 5% 12px 0px' : '12px 0px 12px 5%';
77
+ $titlePadding = $options['RMTxtAlign'] == 'right' ? '20px 5% 20px 0px' : '20px 0px 20px 5%';
78
+ $paddingAlign = $align == 'center' ? 'left' : $align;
79
+ $height = empty( $options['RMLinkHeight'] ) ? 19 : $options['RMLinkHeight'];
80
+ $subBtnAlign = $align == 'right' ? 'left' : 'right';
81
+
82
+ /* Added 1.8 */
83
+ $side = empty( $options['RMSide'] ) ? 'left' : $options['RMSide'];
84
+
85
+ /* Added 1.9 */
86
+ $minWidth = empty( $options['RMMinWidth'] ) ? '' : 'min-width: ' . $options['RMMinWidth'] . 'px' . $important;
87
+
88
+ /* Added 2.0 */
89
+ $maxWidth = empty( $options['RMMaxWidth'] ) ? '' : 'max-width: ' . $options['RMMaxWidth'] . 'px' . $important;
90
+
91
+ switch( $options['RMSide'] ) :
92
+ case 'left' : $topRM = 'top: 0px'; $botRM = ''; break;
93
+ case 'right' : $topRM = 'top: 0px'; $botRM = ''; break;
94
+ case 'top' : $topRM = 'top: -100%'; $botRM = ''; break;
95
+ case 'bottom' : $topRM = 'top: 100%'; $botRM = 'bottom: 0px'; break;
96
+ endswitch;
97
+
98
+ switch( $side ) :
99
+ case 'left' : $pushSide = $side; $pushWidth = $width; $pushPos = 'relative'; break;
100
+ case 'right' : $pushSide = $side; $pushWidth = $width; $pushPos = 'relative'; break;
101
+ case 'top' : $pushSide = 'top'; $pushWidth = '100'; $pushPos = 'relative'; break;
102
+ case 'bottom' : $pushSide = 'bottom'; $pushWidth = '-100'; $pushPos = 'relative'; break;
103
+ default : $pushSide = $side; $pushWidth = $width; break;
104
+ endswitch;
105
+
106
+ /* Added 2.2 */
107
+
108
+ $lineHeight = empty( $options['RMLineHeight'] ) ? 6 : $options['RMLineHeight'];
109
+ $lineWidth = empty( $options['RMLineWidth'] ) ? 33 : $options['RMLineWidth'];
110
+ $lineMargin = empty( $options['RMLineMargin'] ) ? 6 : $options['RMLineMargin'];
111
+ $clickMenuHeight = ( $lineMargin * 2 ) + ( $lineHeight * 3 );
112
+
113
+ /* Added 2.3 */
114
+
115
+ $curBkgHov = empty( $options['RMCurBkgHov'] ) ? $mainBkg : $options['RMCurBkgHov'];
116
+ $curColHov = empty( $options['RMCurColHov'] ) ? $txtCol : $options['RMCurColHov'];
117
+
118
+ /* Added 2.5 */
119
+
120
+ $location = $options['RMLoc'];
121
+
122
+ /*
123
+ |--------------------------------------------------------------------------
124
+ | Initialise Output
125
+ |--------------------------------------------------------------------------
126
+ |
127
+ | Initialise the JavaScript output variable ready for appending
128
+ |
129
+ */
130
+
131
+ $css = null;
132
+
133
+ /*
134
+ |--------------------------------------------------------------------------
135
+ | Strip Tags If Needed
136
+ |--------------------------------------------------------------------------
137
+ |
138
+ | Determine whether to use the <style> tags
139
+ |
140
+ */
141
+
142
+ $css .= $options['RMExternal'] ? '' : '<style>';
143
+
144
+
145
+ $css .= "
146
+
147
+ #responsive-menu .appendLink,
148
+ #responsive-menu .responsive-menu li a,
149
+ #responsive-menu #responsive-menu-title a,
150
+ #responsive-menu .responsive-menu,
151
+ #responsive-menu div,
152
+ #responsive-menu .responsive-menu li,
153
+ #responsive-menu
154
+ {
155
+ box-sizing: content-box{$important}
156
+ -moz-box-sizing: content-box{$important}
157
+ -webkit-box-sizing: content-box{$important}
158
+ -o-box-sizing: content-box{$important}
159
+ }
160
+
161
+ .RMPushOpen
162
+ {
163
+ width: 100%{$important}
164
+ overflow-x: hidden{$important}
165
+ height: 100%{$important}
166
+ }
167
+
168
+ .RMPushSlide
169
+ {
170
+ position: $pushPos;
171
+ $pushSide: $pushWidth%;
172
+ }
173
+
174
+ #responsive-menu
175
+ {
176
+ position: $position;
177
+ $overflowy
178
+ $bottom
179
+ width: $width%;
180
+ $side: -$width%;
181
+ $topRM;
182
+ background: $mainBkg;
183
+ z-index: 9999;
184
+ box-shadow: 0px 1px 8px #333333;
185
+ font-size: {$fontSize}px{$important}
186
+ max-width: 999px;
187
+ display: none;
188
+ $minWidth
189
+ $maxWidth
190
+ }
191
+
192
+ #responsive-menu.admin-bar-showing
193
+ {
194
+ padding-top: 32px;
195
+ }
196
+
197
+ #click-menu.admin-bar-showing
198
+ {
199
+ margin-top: 32px;
200
+ }
201
+
202
+ #responsive-menu #rm-additional-content
203
+ {
204
+ padding: 10px 5%{$important}
205
+ width: 90%{$important}
206
+ color: $txtCol;
207
+ }
208
+
209
+ #responsive-menu .appendLink
210
+ {
211
+ $subBtnAlign: 0px{$important}
212
+ position: absolute{$important}
213
+ border: 1px solid $borCol{$important}
214
+ padding: 12px 10px{$important}
215
+ color: $txtCol{$important}
216
+ background: $mainBkg{$important}
217
+ height: {$height}px{$important}
218
+ line-height: {$height}px{$important}
219
+ border-right: 0px{$important}
220
+ }
221
+
222
+ #responsive-menu .appendLink:hover
223
+ {
224
+ cursor: pointer;
225
+ background: $mainBkgH{$important}
226
+ color: $txtColH{$important}
227
+ }
228
+
229
+ #responsive-menu .responsive-menu,
230
+ #responsive-menu div,
231
+ #responsive-menu .responsive-menu li,
232
+ #responsive-menu
233
+ {
234
+ text-align: $align{$important}
235
+ }
236
+
237
+ #responsive-menu .RMImage
238
+ {
239
+ vertical-align: middle;
240
+ margin-right: 10px;
241
+ display: inline-block;
242
+ }
243
+
244
+ #responsive-menu.RMOpened
245
+ {
246
+ $botRM;
247
+ }
248
+
249
+ #responsive-menu,
250
+ #responsive-menu input {
251
+ $font
252
+ }
253
+
254
+ #responsive-menu #responsive-menu-title
255
+ {
256
+ width: 95%{$important}
257
+ font-size: {$titleSize}px{$important}
258
+ padding: $titlePadding{$important}
259
+ margin-left: 0px{$important}
260
+ background: $titleBkg{$important}
261
+ white-space: nowrap{$important}
262
+ }
263
+
264
+ #responsive-menu #responsive-menu-title,
265
+ #responsive-menu #responsive-menu-title a
266
+ {
267
+ color: $titleCol{$important}
268
+ text-decoration: none{$important}
269
+ overflow: hidden{$important}
270
+ }
271
+
272
+ #responsive-menu #responsive-menu-title a:hover {
273
+ color: $titleColH{$important}
274
+ text-decoration: none{$important}
275
+ }
276
+
277
+ #responsive-menu .appendLink,
278
+ #responsive-menu .responsive-menu li a,
279
+ #responsive-menu #responsive-menu-title a
280
+ {
281
+
282
+ transition: {$trans}s all;
283
+ -webkit-transition: {$trans}s all;
284
+ -moz-transition: {$trans}s all;
285
+ -o-transition: {$trans}s all;
286
+
287
+ }
288
+
289
+ #responsive-menu .responsive-menu
290
+ {
291
+ width: 100%{$important}
292
+ list-style-type: none{$important}
293
+ margin: 0px{$important}
294
+ }
295
+
296
+ #responsive-menu .responsive-menu li.current-menu-item > a,
297
+ #responsive-menu .responsive-menu li.current-menu-item > .appendLink,
298
+ #responsive-menu .responsive-menu li.current_page_item > a,
299
+ #responsive-menu .responsive-menu li.current_page_item > .appendLink
300
+ {
301
+ background: $curBkg{$important}
302
+ color: $curCol{$important}
303
+ }
304
+
305
+ #responsive-menu .responsive-menu li.current-menu-item > a:hover,
306
+ #responsive-menu .responsive-menu li.current-menu-item > .appendLink:hover,
307
+ #responsive-menu .responsive-menu li.current_page_item > a:hover,
308
+ #responsive-menu .responsive-menu li.current_page_item > .appendLink:hover
309
+ {
310
+ background: $curBkgHov{$important}
311
+ color: $curColHov{$important}
312
+ }
313
+
314
+ #responsive-menu .responsive-menu ul
315
+ {
316
+ margin-left: 0px{$important}
317
+ }
318
+
319
+ #responsive-menu .responsive-menu li
320
+ {
321
+ list-style-type: none{$important}
322
+ position: relative{$important}
323
+ }
324
+
325
+ #responsive-menu .responsive-menu ul li:last-child
326
+ {
327
+ padding-bottom: 0px{$important}
328
+ }
329
+
330
+ #responsive-menu .responsive-menu li a
331
+ {
332
+ padding: $linkPadding{$important}
333
+ width: 95%{$important}
334
+ display: block{$important}
335
+ height: {$height}px{$important}
336
+ line-height: {$height}px{$important}
337
+ overflow: hidden{$important}
338
+ white-space: nowrap{$important}
339
+ color: $txtCol{$important}
340
+ border-top: 1px solid $borCol{$important}
341
+ text-decoration: none{$important}
342
+ }
343
+
344
+ #click-menu
345
+ {
346
+ text-align: center;
347
+ cursor: pointer;
348
+ font-size: {$btnSize}px{$important}
349
+ display: none;
350
+ position: $position;
351
+ $location: $right%;
352
+ top: {$top}px;
353
+ color: $clickCol;
354
+ $clickBkg
355
+ padding: 5px;
356
+ z-index: 9999;
357
+ }
358
+
359
+ #responsive-menu #responsiveSearch
360
+ {
361
+ display: block{$important}
362
+ width: 95%{$important}
363
+ padding-$paddingAlign: 5%{$important}
364
+ border-top: 1px solid $borCol{$important}
365
+ clear: both{$important}
366
+ padding-top: 10px{$important}
367
+ padding-bottom: 10px{$important}
368
+ height: 40px{$important}
369
+ line-height: 40px{$important}
370
+ }
371
+
372
+ #responsive-menu #responsiveSearchSubmit
373
+ {
374
+ display: none{$important}
375
+ }
376
+
377
+ #responsive-menu #responsiveSearchInput
378
+ {
379
+ width: 91%{$important}
380
+ padding: 5px 0px 5px 3%{$important}
381
+ -webkit-appearance: none{$important}
382
+ border-radius: 2px{$important}
383
+ border: 1px solid $borCol{$important}
384
+ }
385
+
386
+ #responsive-menu .responsive-menu,
387
+ #responsive-menu div,
388
+ #responsive-menu .responsive-menu li
389
+ {
390
+ width: 100%{$important}
391
+ margin-left: 0px{$important}
392
+ padding-left: 0px{$important}
393
+ }
394
+
395
+ #responsive-menu .responsive-menu li li a
396
+ {
397
+ padding-$paddingAlign: 10%{$important}
398
+ width: 90%{$important}
399
+ overflow: hidden{$important}
400
+ }
401
+
402
+ #responsive-menu .responsive-menu li li li a
403
+ {
404
+ padding-$paddingAlign: 15%{$important}
405
+ width: 85%{$important}
406
+ overflow: hidden{$important}
407
+ }
408
+
409
+ #responsive-menu .responsive-menu li li li li a
410
+ {
411
+ padding-$paddingAlign: 20%{$important}
412
+ width: 80%{$important}
413
+ overflow: hidden{$important}
414
+ }
415
+
416
+ #responsive-menu .responsive-menu li li li li li a
417
+ {
418
+ padding-$paddingAlign: 25%{$important}
419
+ width: 75%{$important}
420
+ overflow: hidden{$important}
421
+ }
422
+
423
+ #responsive-menu .responsive-menu li a:hover
424
+ {
425
+ background: $mainBkgH{$important}
426
+ color: $txtColH{$important}
427
+ list-style-type: none{$important}
428
+ text-decoration: none{$important}
429
+ }
430
+
431
+ #click-menu #RMX
432
+ {
433
+ display: none;
434
+ font-size: 24px;
435
+ line-height: {$clickMenuHeight}px{$important}
436
+ height: {$clickMenuHeight}px{$important}
437
+ color: $clickCol{$important}
438
+ top: -4px{$important}
439
+ position: relative{$important}
440
+ }
441
+
442
+
443
+ #click-menu #RMX.threelines-float-left,
444
+ #click-menu #RMX.threelines-float-right,
445
+ #click-menu-label
446
+ {
447
+ line-height: {$options['RMClickTitleHeight']}px{$important}
448
+ }
449
+
450
+ #click-menu-label.click-menu-label-left
451
+ {
452
+ float: left{$important}
453
+ margin-right: 10px{$important}
454
+ }
455
+
456
+
457
+ #click-menu-label.click-menu-label-right
458
+ {
459
+ float: right{$important}
460
+ margin-left: 5px{$important}
461
+ }
462
+
463
+ #click-menu img,
464
+ #click-menu .threeLines
465
+ {
466
+ width: {$lineWidth}px{$important}
467
+ height: {$clickMenuHeight}px{$important}
468
+ margin: {$lineMargin}px auto{$important}
469
+ }
470
+
471
+ #click-menu img.rm-img-clicked
472
+ {
473
+ display: none;
474
+ }
475
+
476
+ #click-menu img
477
+ {
478
+ height: auto{$important}
479
+ }
480
+
481
+ #click-menu img.click-menu-float-left,
482
+ #click-menu img.click-menu-float-right,
483
+ #click-menu .threeLines.threelines-float-left
484
+ {
485
+ float: left{$important}
486
+ }
487
+
488
+ #click-menu .threeLines .line
489
+ {
490
+ height: {$lineHeight}px{$important}
491
+ margin-bottom: {$lineMargin}px{$important}
492
+ background: $clickCol{$important}
493
+ width: 100%{$important}
494
+ }
495
+
496
+ #click-menu .threeLines .line.last
497
+ {
498
+ margin-bottom: 0px{$important}
499
+ }
500
+
501
+ @media only screen and ( min-width : 0px ) and ( max-width : {$breakpoint}px ) {
502
+
503
+ #click-menu
504
+ {
505
+ display: block;
506
+ }
507
+
508
+ ";
509
+
510
+ $css .= $options['RMCss'] ? $options['RMCss'] . " { display: none !important; } " : '';
511
+
512
+ $css .= " }";
513
+
514
+ $css .= $options['RMAnim'] == 'push' && $options['RMPushCSS'] ? $options['RMPushCSS'] . " { position: {$pushPos}{$important} left: 0px; } " : '';
515
+
516
+ /*
517
+ |--------------------------------------------------------------------------
518
+ | Strip Tags If Needed
519
+ |--------------------------------------------------------------------------
520
+ |
521
+ | Determine whether to use the <style> tags
522
+ |
523
+ */
524
+
525
+ $css .= $options['RMExternal'] ? '' : '</style>';
526
+
527
+ /*
528
+ |--------------------------------------------------------------------------
529
+ | Return Finished Styles
530
+ |--------------------------------------------------------------------------
531
+ |
532
+ | Finally we return the final script back
533
+ |
534
+ */
535
+
536
+ return $css;
537
+
538
+
539
+ }
540
+
541
+
542
+ }
app/models/FolderModel.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_FolderModel extends RM_BaseModel {
4
+
5
+ /**
6
+ * Function to create the data folders
7
+ *
8
+ * @return null
9
+ * @added 1.6
10
+ */
11
+
12
+ static function create() {
13
+
14
+
15
+ $mainFolder = RM_Registry::get( 'config', 'plugin_data_dir' );
16
+ $cssFolder = RM_Registry::get( 'config', 'plugin_data_dir' ) . '/css';
17
+ $jsFolder = RM_Registry::get( 'config', 'plugin_data_dir' ) . '/js';
18
+
19
+
20
+ if( !file_exists( $mainFolder ) ) mkdir( $mainFolder, 0777 );
21
+ if( !file_exists( $cssFolder ) ) mkdir( $cssFolder, 0777 );
22
+ if( !file_exists( $jsFolder ) ) mkdir( $jsFolder, 0777 );
23
+
24
+
25
+ if( !file_exists( $mainFolder ) )
26
+ RM_Status::set( 'error', __( 'Unable to create data folders', 'responsive-menu' ) );
27
+
28
+ if( !file_exists( $cssFolder ) )
29
+ RM_Status::set( 'error', __( 'Unable to create CSS folders', 'responsive-menu' ) );
30
+
31
+ if( !file_exists( $cssFolder ) )
32
+ RM_Status::set( 'error', __( 'Unable to create JS folders', 'responsive-menu' ) );
33
+
34
+
35
+ }
36
+
37
+
38
+ }
app/models/JSModel.php ADDED
@@ -0,0 +1,725 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RM_JSModel extends RM_BaseModel {
4
+
5
+
6
+ /**
7
+ * Function to create the file to hold the JS file
8
+ *
9
+ * @param string $js
10
+ * @return file
11
+ * @added 1.6
12
+ */
13
+
14
+ static function createJSFile( $js ) {
15
+
16
+
17
+ $file = fopen( RM_Registry::get( 'config', 'plugin_data_dir' ) . '/js/responsive-menu-' . get_current_blog_id() . '.js', 'w' );
18
+
19
+ $jsFile = fwrite( $file, $js );
20
+
21
+ fclose( $file );
22
+
23
+ if( !$file )
24
+ RM_Status::set( 'error', __( 'Unable to create JS file', 'responsive-menu' ) );
25
+
26
+ return $jsFile;
27
+
28
+
29
+ }
30
+
31
+
32
+ /**
33
+ * Function to format, create and get the JS itself
34
+ *
35
+ * @param array $options
36
+ * @return string
37
+ * @added 1.0
38
+ */
39
+
40
+ static function getJS( $options ) {
41
+
42
+
43
+ $setHeight = $options['RMPos'] == 'fixed' ? '' : " \$RMjQuery( '#responsive-menu' ).css( 'height', \$RMjQuery( document ).height() ); ";
44
+ $breakpoint = empty($options['RMBreak']) ? "600" : $options['RMBreak'];
45
+
46
+ $RMPushCSS = empty( $options['RMPushCSS'] ) ? "" : $options['RMPushCSS'];
47
+
48
+ $slideOpen = $options['RMAnim'] == 'push' && !empty($options['RMPushCSS']) ? " \$RMjQuery( 'body' ).addClass( 'RMPushOpen' ); " : '';
49
+ $slideRemove = $options['RMAnim'] == 'push' && !empty($options['RMPushCSS']) ? " \$RMjQuery( 'body' ).removeClass( 'RMPushOpen' ); " : '';
50
+
51
+ /* Added 1.8 */
52
+ switch( $options['RMSide'] ) :
53
+ case 'left' : $side = 'left'; break;
54
+ case 'right' : $side = 'right'; break;
55
+ case 'top' : $side = 'top'; break;
56
+ case 'bottom' : $side = 'top'; break;
57
+ default : $side = 'left'; break;
58
+ endswitch;
59
+
60
+ /* Added 2.0 */
61
+ switch( $options['RMSide'] ) :
62
+ case 'left' : $width = $options['RMWidth']; $neg = '-'; break;
63
+ case 'right' : $width = $options['RMWidth']; $neg = '-'; break;
64
+ case 'top' : $width = '100'; $neg = '-'; break;
65
+ case 'bottom' : $width = '100'; $neg = ''; break;
66
+ default : $width = '75'; break;
67
+ endswitch;
68
+
69
+ switch( $options['RMSide'] ) :
70
+ case 'left' : $pushSide = 'left'; $pos = ''; break;
71
+ case 'right' : $pushSide = 'left'; $pos = '-'; break;
72
+ case 'top' : $pushSide = 'marginTop'; $pos = ''; break;
73
+ case 'bottom' : $pushSide = 'marginTop'; $pos = '-'; break;
74
+ endswitch;
75
+
76
+ switch( $options['RMSide'] ) :
77
+ case 'left' : $pushBtnSide = 'left'; break;
78
+ case 'right' : $pushBtnSide = 'right'; break;
79
+ case 'top' : $pushBtnSide = 'top'; break;
80
+ case 'bottom' : $pushBtnSide = 'bottom'; break;
81
+ endswitch;
82
+
83
+ $sideSlideOpen = $side == 'right' && empty( $slideOpen ) ? " \$RMjQuery( 'body' ).addClass( 'RMPushOpen' ); " : '';
84
+ $sideSlideRemove = $side == 'right' && empty( $slideRemove ) ? " \$RMjQuery( 'body' ).removeClass( 'RMPushOpen' ); " : '';
85
+
86
+ /* Added 2.3 */
87
+
88
+ $trigger = isset( $options['RMTrigger'] ) ? $options['RMTrigger'] : RM_Registry::get( 'defaults', 'RMTrigger' );
89
+
90
+ $speed = $options['RMAnimSpd'] * 1000;
91
+
92
+ /* Added 2.5 */
93
+
94
+ $location = $options['RMLoc'];
95
+
96
+ /*
97
+ |--------------------------------------------------------------------------
98
+ | Slide Push Animation
99
+ |--------------------------------------------------------------------------
100
+ |
101
+ | This is where we deal with the JavaScript needed for the push animations
102
+ |
103
+ */
104
+
105
+ $slideOver = " var MenuWidth = \$RMjQuery('#responsive-menu').width(); ";
106
+
107
+ /* Only for the push animation */
108
+ if( $options['RMAnim'] == 'push' ) :
109
+
110
+ if( $options['RMSide'] == 'top' || $options['RMSide'] == 'bottom' ) :
111
+
112
+ $slideOver .= "
113
+
114
+ var MenuHeight = \$RMjQuery( '#responsive-menu' ).css( 'height' );
115
+
116
+ \$RMjQuery( '$RMPushCSS' ).animate( { $pushSide: \"{$pos}\" + MenuHeight }, {$speed}, 'linear' );
117
+
118
+
119
+ ";
120
+
121
+ if( $options['RMPushBtn'] ) :
122
+
123
+ $slideOver .= "
124
+
125
+ \$RMjQuery( '#click-menu' ).animate( { $pushBtnSide: \"{$pos}\" + MenuHeight }, {$speed}, 'linear' );
126
+ \$RMjQuery( '#click-menu' ).css( '$location', 'auto' );
127
+
128
+ ";
129
+
130
+ endif;
131
+
132
+ else :
133
+
134
+ $slideOver .= "
135
+
136
+ \$RMjQuery( '$RMPushCSS' ).animate( { $pushSide: {$pos}MenuWidth }, {$speed}, 'linear' );
137
+
138
+
139
+ ";
140
+
141
+ if( $options['RMPushBtn'] && ( $pushBtnSide == $location ) ) :
142
+
143
+ $slideOver .= "
144
+
145
+ \$RMjQuery( '#click-menu' ).animate( { $location: MenuWidth + 20 }, {$speed}, 'linear' );
146
+ \$RMjQuery( '#click-menu' ).css( '{$location}', 'auto' );
147
+
148
+ ";
149
+
150
+ endif;
151
+
152
+
153
+ endif;
154
+
155
+ endif;
156
+
157
+ $slideOverCss = $options['RMAnim'] == 'push' && !empty($options['RMPushCSS']) ? " \$RMjQuery( '$RMPushCSS' ).addClass( 'RMPushSlide' ); " : '';
158
+
159
+ $slideBack = $options['RMAnim'] == 'push' && !empty($options['RMPushCSS']) ? " \$RMjQuery( '$RMPushCSS' ).animate( { $pushSide: \"0\" }, {$speed}, 'linear' ); " : '';
160
+
161
+ if( $options['RMPushBtn'] && $options['RMAnim'] == 'push' && ( $pushBtnSide == $location ) ) :
162
+
163
+ $slideBack .= "
164
+
165
+ \$RMjQuery( '#click-menu' ).animate( { $pushBtnSide: '{$options['RMRight']}%' }, {$speed}, 'linear', function() {
166
+
167
+ \$RMjQuery( '#click-menu' ).removeAttr( 'style' );
168
+
169
+ });
170
+
171
+ ";
172
+
173
+ endif;
174
+
175
+ $slideOverCssRemove = $options['RMAnim'] == 'push' && !empty($options['RMPushCSS']) ? " \$RMjQuery( '$RMPushCSS' ).removeClass( 'RMPushSlide' ); " : '';
176
+
177
+
178
+
179
+ /*
180
+ |--------------------------------------------------------------------------
181
+ | Change to X or Clicked Menu Image Option
182
+ |--------------------------------------------------------------------------
183
+ |
184
+ | This is where we deal with the JavaScript needed to change the main lines
185
+ | to an X or click image if this option has been set
186
+ |
187
+ */
188
+
189
+ if( $options['RMX'] || $options['RMClickImgClicked'] ) :
190
+
191
+ $closeX = " \$RMjQuery( '#click-menu #RMX, #click-menu img.rm-img-clicked' ).css( 'display', 'none' );
192
+ \$RMjQuery( '#click-menu #RM3Lines, #click-menu img.rm-img-to-click' ).css( 'display', 'block' ); ";
193
+
194
+ $showX = " \$RMjQuery( '#click-menu #RM3Lines, #click-menu img.rm-img-to-click' ).css( 'display', 'none' );
195
+ \$RMjQuery( '#click-menu #RMX, #click-menu img.rm-img-clicked' ).css( 'display', 'block' ); ";
196
+ else :
197
+
198
+ $closeX = "";
199
+ $showX = "";
200
+
201
+ endif;
202
+
203
+ /*
204
+ |--------------------------------------------------------------------------
205
+ | Menu Expansion Options
206
+ |--------------------------------------------------------------------------
207
+ |
208
+ | This is where we deal with the array of expansion options, the current
209
+ | combinations are:
210
+ |
211
+ | - Auto Expand Current Parent Items ['RMExpandPar']
212
+ | - Auto Expand Current Parent Items + Auto Expand Sub-Menus ['RMExpandPar'] && ['RMExpand']
213
+ | - Auto Expand Sub-Menus ['RMExpand']
214
+ | - None !['RMExpandPar'] && !['RMExpand']
215
+ |
216
+ */
217
+
218
+ $activeArrow = $options['RMArImgA'] ? '<img src="' . $options['RMArImgA'] . '" />' : json_decode( $options['RMArShpA'] );
219
+ $inactiveArrow = $options['RMArImgI'] ? '<img src="' . $options['RMArImgI'] . '" />' : json_decode( $options['RMArShpI'] );
220
+
221
+
222
+ if ( !$options['RMExpand'] ) :
223
+
224
+ $clickedLink = '<span class=\"appendLink rm-append-inactive\">' . $inactiveArrow . '</span>';
225
+ $clickLink = '<span class=\"appendLink rm-append-inactive\">' . $inactiveArrow . '</span>';
226
+
227
+ else :
228
+
229
+ $clickedLink = '<span class=\"appendLink rm-append-active\">' . $activeArrow . '</span>';
230
+ $clickLink = '<span class=\"appendLink rm-append-active\">' . $activeArrow . '</span>';
231
+
232
+ endif;
233
+
234
+ if( $options['RMExpandPar'] ) :
235
+
236
+ $clickedLink = '<span class=\"appendLink rm-append-active\">' . $activeArrow . '</span>';
237
+ $clickLink = '<span class=\"appendLink rm-append-inactive\">' . $inactiveArrow . '</span>';
238
+
239
+ endif;
240
+
241
+ if( $options['RMExpandPar'] && $options['RMExpand'] ) :
242
+
243
+ $clickedLink = '<span class=\"appendLink rm-append-active\">' . $activeArrow . '</span>';
244
+ $clickLink = '<span class=\"appendLink rm-append-active\">' . $activeArrow . '</span>';
245
+
246
+ endif;
247
+
248
+
249
+ /*
250
+ |--------------------------------------------------------------------------
251
+ | Initialise Output
252
+ |--------------------------------------------------------------------------
253
+ |
254
+ | Initialise the JavaScript output variable ready for appending
255
+ |
256
+ */
257
+
258
+ $js = null;
259
+
260
+ /*
261
+ |--------------------------------------------------------------------------
262
+ | Strip Tags If Needed
263
+ |--------------------------------------------------------------------------
264
+ |
265
+ | Determine whether to use the <script> tags (when using internal scripts)
266
+ |
267
+ */
268
+
269
+ $js .= $options['RMExternal'] ? '' : '<script>';
270
+
271
+ /*
272
+ |--------------------------------------------------------------------------
273
+ | Initial Setup
274
+ |--------------------------------------------------------------------------
275
+ |
276
+ | Setup the initial noConflict and document ready checks
277
+ |
278
+ */
279
+
280
+ $js .= "
281
+
282
+ var \$RMjQuery = jQuery.noConflict();
283
+
284
+ \$RMjQuery( document ).ready( function() {
285
+
286
+ ";
287
+
288
+ /*
289
+ |--------------------------------------------------------------------------
290
+ | Stop Main Parent Item Clicks
291
+ |--------------------------------------------------------------------------
292
+ |
293
+ | Stop clicks on the main parent items if option selected
294
+ | Added 2.0
295
+ */
296
+
297
+ if( $options['RMIgnParCli'] ) :
298
+
299
+ $js .= "
300
+
301
+ \$RMjQuery( '#responsive-menu ul > li.menu-item-has-children' ).children( 'a' ).addClass( 'rm-click-disabled' );
302
+
303
+ \$RMjQuery( '#responsive-menu ul > li.menu-item-has-children' ).children( 'a' ).on( 'click', function( e ) {
304
+
305
+ e.preventDefault();
306
+
307
+ });
308
+
309
+ \$RMjQuery( '#responsive-menu ul > li.page_item_has_children' ).children( 'a' ).addClass( 'rm-click-disabled' );
310
+
311
+ \$RMjQuery( '#responsive-menu ul > li.page_item_has_children' ).children( 'a' ).on( 'click', function( e ) {
312
+
313
+ e.preventDefault();
314
+
315
+ });
316
+
317
+ ";
318
+
319
+ endif;
320
+
321
+ /*
322
+ |--------------------------------------------------------------------------
323
+ | Closes the menu on page clicks
324
+ |--------------------------------------------------------------------------
325
+ |
326
+ | Close menu on page clicks if required
327
+ | Added 2.0
328
+ */
329
+
330
+ if( $options['RMCliToClo'] ) :
331
+
332
+ $js .= "
333
+
334
+ \$RMjQuery( document ).bind( 'vclick', function( e ) {
335
+
336
+ if( e.which != 2 && !\$RMjQuery( e.target ).closest( '#responsive-menu, {$trigger}' ).length ) {
337
+
338
+ closeRM();
339
+
340
+ }
341
+
342
+ });
343
+
344
+ ";
345
+
346
+ endif;
347
+
348
+
349
+ /*
350
+ |--------------------------------------------------------------------------
351
+ | Click Menu Function
352
+ |--------------------------------------------------------------------------
353
+ |
354
+ | This is our Click Handler to determine whether or not to open or close
355
+ | the menu when the click menu button has been clicked.
356
+ |
357
+ */
358
+
359
+ $js .= "
360
+
361
+ var isOpen = false;
362
+
363
+ \$RMjQuery( document ).on( 'click', '{$trigger}', function() {
364
+
365
+ $setHeight
366
+
367
+ !isOpen ? openRM() : closeRM();
368
+
369
+ });
370
+
371
+ ";
372
+
373
+ /*
374
+ |--------------------------------------------------------------------------
375
+ | Menu Open Function
376
+ |--------------------------------------------------------------------------
377
+ |
378
+ | This is the main function that deals with opening the menu and then sets
379
+ | its state to open
380
+ |
381
+ */
382
+
383
+ $js.= "
384
+
385
+ function openRM() {
386
+
387
+ $slideOpen
388
+ $sideSlideOpen
389
+ $slideOverCss
390
+ $slideOver
391
+ $showX
392
+
393
+ \$RMjQuery( '#responsive-menu' ).css( 'display', 'block' );
394
+ \$RMjQuery( '#responsive-menu' ).addClass( 'RMOpened' );
395
+ \$RMjQuery( '#click-menu' ).addClass( 'click-menu-active' );
396
+ \$RMjQuery( 'body' ).addClass( 'responsive-menu-open' );
397
+
398
+ \$RMjQuery( '#responsive-menu' ).stop().animate( { $side: \"0\" }, $speed, 'linear', function() {
399
+
400
+ $setHeight
401
+
402
+ isOpen = true;
403
+
404
+ } );
405
+
406
+ }
407
+
408
+ ";
409
+
410
+ /*
411
+ |--------------------------------------------------------------------------
412
+ | Menu Close Function
413
+ |--------------------------------------------------------------------------
414
+ |
415
+ | This is the main function that deals with Closing the Menu and then sets
416
+ | its state to closed
417
+ |
418
+ | Added by Bhupender
419
+ | Modified negative width to take directly width of menu instead of '%',
420
+ | this works for condition where animation is push and max width of menu is less then %
421
+ |
422
+ */
423
+
424
+ $js .= "
425
+
426
+ function closeRM() {
427
+
428
+ $slideBack
429
+
430
+ \$RMjQuery( '#responsive-menu' ).animate( { $side: {$neg}\$RMjQuery( '#responsive-menu' ).width() }, $speed, 'linear', function() {
431
+
432
+ $slideRemove
433
+ $sideSlideRemove
434
+ $slideOverCssRemove
435
+ $closeX
436
+ \$RMjQuery( '#responsive-menu' ).css( 'display', 'none' );
437
+ \$RMjQuery( '#responsive-menu' ).removeClass( 'RMOpened' );
438
+ \$RMjQuery( '#click-menu' ).removeClass( 'click-menu-active' );
439
+ \$RMjQuery( 'body' ).removeClass( 'responsive-menu-open' );
440
+
441
+ isOpen = false;
442
+
443
+ } );
444
+
445
+ }
446
+
447
+ ";
448
+
449
+ /*
450
+ |--------------------------------------------------------------------------
451
+ | Menu Resize Function
452
+ |--------------------------------------------------------------------------
453
+ |
454
+ | This is the main function that deals with resizing the page and is used
455
+ | to judge whether the menu needs closing once the screen is resized
456
+ |
457
+ |
458
+ | Added by Bhupender
459
+ | - Modified negative width to take directly width of menu instead of '%',
460
+ | this works for condition where animation is push and max width of menu is less then %
461
+
462
+ */
463
+
464
+ $js .= "
465
+
466
+ \$RMjQuery( window ).resize( function() {
467
+
468
+ \$RMjQuery( '#responsive-menu' ).stop( true, true );
469
+
470
+ $setHeight
471
+
472
+ if( \$RMjQuery( window ).width() > $breakpoint ) {
473
+
474
+ if( \$RMjQuery( '#responsive-menu' ).css( '$side' ) != -\$RMjQuery( '#responsive-menu' ).width() ) {
475
+
476
+ closeRM();
477
+
478
+ }
479
+
480
+ }
481
+
482
+ });
483
+
484
+ ";
485
+
486
+
487
+ /*
488
+ |--------------------------------------------------------------------------
489
+ | Expand children links of parents
490
+ |--------------------------------------------------------------------------
491
+ |
492
+ | Section to automatically expand children links of parents if necessary
493
+ | Added 2.0
494
+ |
495
+ */
496
+
497
+ if( $options['RMExpandPar'] ) :
498
+
499
+ $js .= "
500
+
501
+ \$RMjQuery( '#responsive-menu ul ul' ).css( 'display', 'none' );
502
+
503
+ \$RMjQuery( '#responsive-menu .current_page_ancestor.menu-item-has-children' ).children( 'ul' ).css( 'display', 'block' );
504
+ \$RMjQuery( '#responsive-menu .current-menu-ancestor.menu-item-has-children' ).children( 'ul' ).css( 'display', 'block' );
505
+ \$RMjQuery( '#responsive-menu .current-menu-item.menu-item-has-children' ).children( 'ul' ).css( 'display', 'block' );
506
+
507
+ \$RMjQuery( '#responsive-menu .current_page_ancestor.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' );
508
+ \$RMjQuery( '#responsive-menu .current-menu-ancestor.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' );
509
+ \$RMjQuery( '#responsive-menu .current-menu-item.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' );
510
+
511
+ ";
512
+
513
+ endif;
514
+
515
+ /*
516
+ |--------------------------------------------------------------------------
517
+ | Add Toggle Buttons
518
+ |--------------------------------------------------------------------------
519
+ |
520
+ | This is the main section that deals with Adding the correct Toggle buttons
521
+ | when needed to the links
522
+ |
523
+ */
524
+
525
+ if( $options['RMExpand'] ) :
526
+ $js .= " \$RMjQuery( '#responsive-menu ul ul' ).css( 'display', 'block' ); ";
527
+ endif;
528
+
529
+ $js .= "
530
+
531
+ var clickLink = '{$clickLink}';
532
+ var clickedLink = '{$clickedLink}';
533
+
534
+ \$RMjQuery( '#responsive-menu .responsive-menu li' ).each( function() {
535
+
536
+ if( \$RMjQuery( this ).children( 'ul' ).length > 0 ) {
537
+
538
+ if( \$RMjQuery( this ).find( '> ul' ).css( 'display' ) == 'none' ) {
539
+
540
+ \$RMjQuery( this ).prepend( clickLink );
541
+
542
+ } else {
543
+
544
+ \$RMjQuery( this ).prepend( clickedLink );
545
+
546
+ }
547
+
548
+ }
549
+
550
+ });
551
+
552
+ ";
553
+
554
+ /*
555
+ |--------------------------------------------------------------------------
556
+ | Accordion Animation
557
+ |--------------------------------------------------------------------------
558
+ |
559
+ | This is the part that deals with the accordion animation
560
+ | Currently only works to one level of depth
561
+ |
562
+ */
563
+
564
+ if( $options['RMAccordion'] && $options['RMAccordion'] == 'accordion' ) :
565
+
566
+ $accordion = "
567
+
568
+ if( \$RMjQuery( this ).closest( 'ul' ).is( '.responsive-menu' ) ) {
569
+
570
+ \$RMjQuery( '.accordion-open' ).removeClass( 'accordion-open' );
571
+
572
+ \$RMjQuery( this ).parent( 'li' ).addClass( 'accordion-open' );
573
+
574
+ \$RMjQuery( '.responsive-menu > li:not( .accordion-open ) > ul' ).slideUp();
575
+
576
+ if( \$RMjQuery( this ).siblings( 'ul' ).is( ':visible' ) ) {
577
+ \$RMjQuery( this ).parent( 'li' ).removeClass( 'accordion-open' );
578
+ } else {
579
+ \$RMjQuery( this ).parent( 'li' ).addClass( 'accordion-open' );
580
+ }
581
+
582
+ \$RMjQuery( '.responsive-menu > li > .appendLink' ).removeClass( 'rm-append-inactive' );
583
+ \$RMjQuery( '.responsive-menu > li > .appendLink' ).addClass( 'rm-append-active' );
584
+
585
+ var AllClosed = true;
586
+
587
+ \$RMjQuery( '.responsive-menu > li > .appendLink' ).each( function( i ) {
588
+ \$RMjQuery( this ).html( \$RMjQuery( this ).hasClass( 'rm-append-active' ) ? '{$inactiveArrow}' : '{$activeArrow}' );
589
+ AllClosed = \$RMjQuery( this ).parent( 'li' ).hasClass( 'accordion-open' )? false : AllClosed;
590
+ });
591
+
592
+ \$RMjQuery( this ).removeClass( 'rm-append-active' );
593
+ \$RMjQuery( this ).addClass( 'rm-append-inactive' );
594
+
595
+ if( AllClosed ) {
596
+ \$RMjQuery( this ).removeClass( 'rm-append-inactive' );
597
+ \$RMjQuery( this ).addClass( 'rm-append-active' );
598
+
599
+ }
600
+
601
+ }
602
+
603
+ ";
604
+
605
+ else :
606
+
607
+ $accordion = null;
608
+
609
+ endif;
610
+
611
+
612
+ /*
613
+ |--------------------------------------------------------------------------
614
+ | Toggle Buttons Function
615
+ |--------------------------------------------------------------------------
616
+ |
617
+ | This is the function that deals with toggling the toggle buttons
618
+ |
619
+ */
620
+
621
+ $js .= "
622
+
623
+ \$RMjQuery( '.appendLink' ).on( 'click', function() {
624
+
625
+ $accordion
626
+
627
+ \$RMjQuery( this ).nextAll( '#responsive-menu ul ul' ).slideToggle();
628
+
629
+ \$RMjQuery( this ).html( \$RMjQuery( this ).hasClass( 'rm-append-active' ) ? '{$inactiveArrow}' : '{$activeArrow}' );
630
+ \$RMjQuery( this ).toggleClass( 'rm-append-active rm-append-inactive' );
631
+
632
+ $setHeight
633
+
634
+ });
635
+
636
+ \$RMjQuery( '.rm-click-disabled' ).on( 'click', function() {
637
+
638
+ $accordion
639
+
640
+ \$RMjQuery( this ).nextAll( '#responsive-menu ul ul' ).slideToggle();
641
+
642
+ \$RMjQuery( this ).siblings( '.appendLink' ).html( \$RMjQuery( this ).hasClass( 'rm-append-active' ) ? '{$inactiveArrow}' : '{$activeArrow}' );
643
+ \$RMjQuery( this ).toggleClass( 'rm-append-active rm-append-inactive' );
644
+
645
+ $setHeight
646
+
647
+ });
648
+
649
+ ";
650
+
651
+ /*
652
+ |--------------------------------------------------------------------------
653
+ | Finally Hide Appropriate Hidden Objects
654
+ |--------------------------------------------------------------------------
655
+ |
656
+ | This is the function that deals with toggling the toggle buttons
657
+ |
658
+ */
659
+
660
+ $js .= "
661
+
662
+ \$RMjQuery( '.rm-append-inactive' ).siblings( 'ul' ).css( 'display', 'none' );
663
+
664
+ ";
665
+
666
+ /*
667
+ |--------------------------------------------------------------------------
668
+ | Menu Closing Options
669
+ |--------------------------------------------------------------------------
670
+ |
671
+ | This is where we set the menu to retract if a link is clicked
672
+ | Added 1.9
673
+ |
674
+ */
675
+
676
+ if ( isset( $options['RMClickClose'] ) && $options['RMClickClose'] == 'close' ) :
677
+
678
+ $js .= "
679
+ \$RMjQuery( '#responsive-menu ul li a' ).on( 'click', function() {
680
+
681
+ closeRM();
682
+
683
+ } );";
684
+
685
+ endif;
686
+
687
+ /*
688
+ |--------------------------------------------------------------------------
689
+ | Close Tags
690
+ |--------------------------------------------------------------------------
691
+ |
692
+ | This closes the initial document ready call
693
+ |
694
+ */
695
+
696
+ $js .= '}); ';
697
+
698
+ /*
699
+ |--------------------------------------------------------------------------
700
+ | Strip Tags If Needed
701
+ |--------------------------------------------------------------------------
702
+ |
703
+ | Determine whether to use the <script> tags (when using internal scripts)
704
+ |
705
+ */
706
+
707
+ $js .= $options['RMExternal'] ? '' : '</script>';
708
+
709
+
710
+ /*
711
+ |--------------------------------------------------------------------------
712
+ | Return Finished Script
713
+ |--------------------------------------------------------------------------
714
+ |
715
+ | Finally we return the final script back
716
+ |
717
+ */
718
+
719
+ return $js;
720
+
721
+
722
+ }
723
+
724
+
725
+ }
app/views/admin/page.phtml ADDED
@@ -0,0 +1,2387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+
3
+ h4
4
+ {
5
+ font-weight: bold;
6
+ margin: 10px 0px;
7
+ }
8
+
9
+ h4.divider
10
+ {
11
+ color: #D44A44;
12
+ font-size: 12px;
13
+ }
14
+
15
+ h5
16
+ {
17
+ font-size: 11px;
18
+ margin: 10px 0px;
19
+ }
20
+
21
+ .numberInput
22
+ {
23
+ width: 50px;
24
+ }
25
+
26
+ textarea
27
+ {
28
+ width: 100%;
29
+ }
30
+
31
+ table
32
+ {
33
+ width: 98%;
34
+ border-left: 4px solid #7AD03A;
35
+ padding-left: 2%;
36
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
37
+ background: white;
38
+ padding-bottom: 15px;
39
+ }
40
+
41
+ table.inner-table
42
+ {
43
+ border: 0px;
44
+ box-shadow: none;
45
+ }
46
+
47
+ table td
48
+ {
49
+ width: 48%;
50
+ padding-right: 2%;
51
+ vertical-align: top;
52
+ }
53
+
54
+ table td .pro-option-inner
55
+ {
56
+ background: #de4b42;
57
+ color: white;
58
+ opacity: 0.8;
59
+ padding: 15px;
60
+ position: relative;
61
+ margin: 15px 0;
62
+ overflow: hidden;
63
+ }
64
+
65
+ table.pro-option-table
66
+ {
67
+ position: relative;
68
+ }
69
+
70
+ table.pro-option-table .pro-option-overlay,
71
+ table td.pro-option .pro-option-overlay
72
+ {
73
+ position: absolute;
74
+ top: 0;
75
+ bottom: 0;
76
+ left: 0;
77
+ right: 0;
78
+ background: rgba( 1, 1, 1, 0.6 );
79
+ height: 0;
80
+ overflow: hidden;
81
+ }
82
+
83
+ table.pro-option-table:hover .pro-option-overlay,
84
+ table td.pro-option:hover .pro-option-overlay
85
+ {
86
+ height: 100%;
87
+ }
88
+
89
+ table.pro-option-table .pro-option-overlay a,
90
+ table td.pro-option .pro-option-overlay a
91
+ {
92
+ position: absolute;
93
+ left: 30%;
94
+ display: block;
95
+ right: 30%;
96
+ padding: 15px 0;
97
+ width: 40%;
98
+ top: 30%;
99
+ background: #DE4B42;
100
+ font-weight: bold;
101
+ font-size: 14px;
102
+ border: 1px solid white;
103
+ border-radius: 3px;
104
+ cursor: pointer;
105
+ color: white;
106
+ text-align: center;
107
+ text-decoration: none;
108
+ }
109
+
110
+ .default
111
+ {
112
+ font-size: 8px;
113
+ font-style: italic;
114
+ }
115
+
116
+ .error
117
+ {
118
+ color: red;
119
+ }
120
+
121
+ .success
122
+ {
123
+ color: green;
124
+ }
125
+
126
+ #RMVersion
127
+ {
128
+ float: right;
129
+ border-left: 4px solid #7AD03A;
130
+ padding: 10px;
131
+ background: white;
132
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
133
+ }
134
+
135
+ .note
136
+ {
137
+ padding: 25px 0px 0px 0px;
138
+ color: green;
139
+ }
140
+
141
+ .button.file
142
+ {
143
+ background: white;
144
+ padding: 0px !important;
145
+ }
146
+
147
+ @media only screen and ( min-width : 0px ) and ( max-width : 600px ) {
148
+ table, table td, table tr
149
+ {
150
+ width: 100%;
151
+ display: block;
152
+ }
153
+ }
154
+
155
+
156
+ .nav-tabs .tab {
157
+ display: table-cell;
158
+ padding: 10px;
159
+ color: white;
160
+ background-color: #DE4B42;
161
+ border:#DE4B42;
162
+ border-radius: 2px 2px 0 0;
163
+ border-style: solid;
164
+ border-width: 1px;
165
+ box-sizing: border-box;
166
+ cursor: pointer;
167
+ display: inline-block;
168
+ font-size: 13px;
169
+ height: 28px;
170
+ line-height: 26px;
171
+ margin: 0;
172
+ padding: 0 10px 1px;
173
+ text-decoration: none;
174
+ white-space: nowrap;
175
+ border-bottom: 0;
176
+ }
177
+ .nav-tabs .tab.active {
178
+ background-color: #EA645D;
179
+ background: #EA645D;
180
+ color: #ffffff;
181
+ }
182
+
183
+ .nav-tabs {
184
+ border-bottom: 1px #333 white;
185
+ width: 98%;
186
+ }
187
+
188
+ .nav-tabs .tab.pro
189
+ {
190
+ background: #55B05A;
191
+ border-color: #55B05A;
192
+ }
193
+
194
+ table.pro-option-table .pro-option-overlay,
195
+ table td.pro-option .pro-option-overlay
196
+ {
197
+ transition: 0.5s all;
198
+ }
199
+
200
+ .beta-available {
201
+ background: #DE4B42;
202
+ padding: 15px 2%;
203
+ width: 96%;
204
+ position: relative;
205
+ margin-top: 15px;
206
+ }
207
+ a.beta-link {
208
+ color: white;
209
+ text-decoration: none;
210
+ }
211
+ .beta-button {
212
+ display: inline-block;
213
+ padding: 5px 15px;
214
+ background: white;
215
+ color: #DE4B42;
216
+ margin: 10px 0;
217
+ }
218
+ .beta-title {
219
+ font-size: 16px;
220
+ margin-bottom: 10px;
221
+ }
222
+ .beta-close {
223
+ position: absolute;
224
+ top: 15px;
225
+ right: 2%;
226
+ font-size: 18px;
227
+ padding: 15px;
228
+ font-weight: bold;
229
+ }
230
+ </style>
231
+
232
+ <script>
233
+
234
+ jQuery(document).ready(function ($) {
235
+
236
+ $( '.pro-option-inner, .pro-option-table' ).append( '<div class="pro-option-overlay"><a target="_blank" href="http://responsive.menu/pricing/">Upgrade now</a>');
237
+
238
+ $('.colourPicker').wpColorPicker( );
239
+
240
+ if (localStorage.rmbetaclosed) {
241
+ $('.beta-available').hide();
242
+ } else {
243
+ $(document).on('click', '.beta-close', function(e) {
244
+ e.stopPropagation();
245
+ e.preventDefault();
246
+ $('.beta-available').fadeOut();
247
+ localStorage.rmbetaclosed = "true";
248
+ });
249
+ }
250
+
251
+
252
+ var custom_uploader;
253
+
254
+ $('.RMImageButton').click(function (e) {
255
+
256
+ e.preventDefault();
257
+ window.imgFor = $(this).attr('for');
258
+
259
+ //If the uploader object has already been created, reopen the dialog
260
+ if (custom_uploader) {
261
+
262
+ custom_uploader.open();
263
+ return;
264
+ }
265
+
266
+ //Extend the wp.media object
267
+ custom_uploader = wp.media.frames.file_frame = wp.media({
268
+ title: 'Choose Image',
269
+ button: {
270
+ text: 'Choose Image',
271
+ id: 'test'
272
+ },
273
+ multiple: false
274
+ });
275
+
276
+ //When a file is selected, grab the URL and set it as the text field's value
277
+ custom_uploader.on('select', function () {
278
+
279
+ attachment = custom_uploader.state().get('selection').first().toJSON();
280
+
281
+ $('#' + window.imgFor).val(attachment.url);
282
+
283
+ });
284
+
285
+ //Open the uploader dialog
286
+ custom_uploader.open();
287
+
288
+ });
289
+
290
+ });
291
+ </script>
292
+
293
+ <script type="text/javascript">
294
+ jQuery(function () {
295
+ var $ = jQuery;
296
+ $('.tab', $('.nav-tabs')).on('click', function () {
297
+ $('.tab', $('.nav-tabs')).each(function () {
298
+ $(this).removeClass('active');
299
+ var hide = $(this).attr('data-show-tab');
300
+ $(hide).hide();
301
+ });
302
+
303
+ $(this).addClass('active');
304
+ var show = $(this).attr('data-show-tab');
305
+ $(show).show();
306
+ });
307
+ $('.tab', $('.nav-tabs')).first().trigger('click');
308
+ });
309
+ </script>
310
+
311
+ <div class="wrap">
312
+
313
+ <div id="RMVersion">
314
+ <?php _e('Version'); ?> <?php echo RM_Registry::get('config', 'current_version'); ?>
315
+ </div>
316
+
317
+ <form action="" method="post" enctype="multipart/form-data">
318
+
319
+ <input
320
+ type="submit"
321
+ class="button button-primary"
322
+ name="RMSubmit"
323
+ value="<?php _e('Update Responsive Menu Options', 'responsive-menu'); ?>"
324
+ style="display: none;"
325
+ />
326
+
327
+ <h2><?php _e('Responsive Menu Options', 'responsive-menu'); ?></h2>
328
+
329
+ <?php
330
+ if ($status = RM_Status::get())
331
+ echo self::statusBar($status);
332
+ ?>
333
+
334
+ <nav class="menu-tabs">
335
+ <ul class="nav nav-tabs">
336
+ <li class="tab active" data-show-tab=".setting">Setting</li>
337
+ <li class="tab" data-show-tab=".look-and-feel">Look & Feel</li>
338
+ <li class="tab" data-show-tab=".advanced-setting">Advanced Setting</li>
339
+ <li class="tab" data-show-tab=".import-export">Import/Export</li>
340
+ <li class="tab pro" data-show-tab=".single-menu">Single Menu [PRO]</li>
341
+ <li class="tab pro" data-show-tab=".themes">Header Bar & Themes [PRO]</li>
342
+ <li class="tab pro" data-show-tab=".custom-css">Custom CSS [PRO]</li>
343
+ </ul>
344
+ </nav>
345
+
346
+ <a target="_blank" class="button" style="background: #55B05A; color: white;" href="http://responsive.menu/pricing"><?php _e( 'Go Pro - Upgrade now for just $9.99' ); ?></a>
347
+
348
+ <a class="beta-link" href="https://downloads.wordpress.org/plugin/responsive-menu.beta.zip" />
349
+ <div class="beta-available">
350
+ <div class="beta-title">Responsive Menu 3.0 Beta now available!</div>
351
+ <div class="beta-content">Please send all bugs and feedback to support@responsive.menu.<br />
352
+ Please remember this is beta software so only use in development environments and not on a live sites.<br />
353
+ Requires PHP 5.4+</div>
354
+ <div class="beta-button">Download now</div>
355
+ <div class="beta-close">x</div>
356
+ </div>
357
+ </a>
358
+ <div class="setting">
359
+ <h3><?php _e('Meta Tag Check', 'responsive-menu'); ?></h3>
360
+
361
+ <table>
362
+ <tr>
363
+ <td>
364
+ <h4><?php _e('Recommended Metaport Tag', 'responsive-menu-pro'); ?></h4>
365
+ </td>
366
+ </tr>
367
+ <tr>
368
+ <td>
369
+
370
+ &lt;meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' /&gt;
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <td>
375
+ <h4 class="divider">
376
+ <?php _e('Note', 'responsive-menu-pro'); ?>:
377
+ <?php _e('This is only a reference guide and yours may vary slightly', 'responsive-menu-pro'); ?>.
378
+ </h4>
379
+ </td>
380
+ </tr>
381
+ </table>
382
+
383
+ <h3><?php _e('Transient Caching', 'responsive-menu'); ?></h3>
384
+
385
+ <table>
386
+
387
+ <tr>
388
+ <td>
389
+ <h4>
390
+ <?php _e('Turn on transient caching', 'responsive-menu'); ?>
391
+ </h4>
392
+ <h5>
393
+ <?php _e('Transient caching will save you ~80% on load times, however please note that this will break active links etc.', 'responsive-menu'); ?>
394
+ </h5>
395
+
396
+ <input
397
+ type="checkbox"
398
+ name="RMUseTran"
399
+ id="RMUseTran"
400
+ value="usetransient"
401
+ <?php echo isset($data['RMUseTran']) && $data['RMUseTran'] == 'usetransient' ? ' checked="checked" ' : ''; ?>
402
+ />
403
+
404
+ </td>
405
+ </tr>
406
+ </table>
407
+
408
+ <h3><?php _e('Shortcode Support', 'responsive-menu'); ?></h3>
409
+
410
+ <table>
411
+ <tr>
412
+ <td>
413
+
414
+ <table class='inner-table'>
415
+ <tr>
416
+ <td>
417
+ <h4><?php _e('Click to use shortcode', 'responsive-menu'); ?></h4>
418
+
419
+ <h5><?php _e('Tick if you would like to use a shortcode instead of the default behaviour', 'responsive-menu'); ?></h5>
420
+
421
+ <input
422
+ type="checkbox"
423
+ name="RMShortcode"
424
+ id="RMShortcode"
425
+ value="shortcode"
426
+ <?php echo isset($data['RMShortcode']) && $data['RMShortcode'] == 'shortcode' ? ' checked="checked" ' : ''; ?>
427
+ /> [responsive-menu]
428
+ <br /><br />
429
+ </td>
430
+ </tr>
431
+ <tr>
432
+ <td colspan="2">
433
+ <?php _e("For a list of available shortcode options with explanations please visit the following page:", 'responsive-menu'); ?>
434
+ <br /><br />
435
+ <a target="_blank" href="http://responsive.menu/faq/shortcode/options/">
436
+ <?php _e("Shortcode Options"); ?>
437
+ </a>
438
+ </td>
439
+ </tr>
440
+ </table>
441
+ </td>
442
+ <td>
443
+
444
+ <h4><?php _e("Available Shortcode Options/Values"); ?></h4>
445
+
446
+ <table>
447
+ <tr>
448
+ <td><strong><?php _e("Option"); ?></strong></td>
449
+ <td><strong><?php _e("Values"); ?></strong></td>
450
+ </tr>
451
+
452
+ <?php
453
+ if (ResponsiveMenu::hasMenus()) :
454
+
455
+ $i = 0;
456
+
457
+ foreach ($menus = ResponsiveMenu::getMenus() as $menu) :
458
+
459
+ $opt = $i == 0 ? 'menu' : '';
460
+
461
+ echo '<tr><td>' . $opt . '</td><td>' . $menu->slug . '</td></tr>';
462
+
463
+ $i++;
464
+
465
+ endforeach;
466
+
467
+ echo '<tr><td colspan="2"><br /><em>e.g - [responsive-menu menu="' . $menus[0]->slug . '"]</em></td></tr>';
468
+
469
+ else :
470
+
471
+ echo '<tr><td colspan="2">' . _e("Sorry, there are no available options") . '</td></tr>';
472
+
473
+ endif;
474
+ ?>
475
+ <tr>
476
+ <td><strong><?php _e("Option"); ?></strong></td>
477
+ <td><strong><?php _e("Example Value"); ?></strong></td>
478
+ </tr>
479
+ <tr>
480
+ <td>title</td>
481
+ <td>Título</td>
482
+ </tr>
483
+ <tr>
484
+ <td>title_link</td>
485
+ <td>http://mipagina.es</td>
486
+ </tr>
487
+ <tr>
488
+ <td>title_open</td>
489
+ <td>_blank</td>
490
+ </tr>
491
+ <tr>
492
+ <td>title_img</td>
493
+ <td>http://example.com/title-img-2.jpg</td>
494
+ </tr>
495
+ <tr>
496
+ <td>html</td>
497
+ <td>&lt;a href='http://www.example.com'&gt;Example&lt;/a&gt;</td>
498
+ </tr>
499
+ <tr>
500
+ <td>html_loc</td>
501
+ <td>above</td>
502
+ </tr>
503
+ <tr>
504
+ <td>search_loc</td>
505
+ <td>below</td>
506
+ </tr>
507
+ <tr>
508
+ <td>btn_img</td>
509
+ <td>http://example.com/btn-img-2.jpg</td>
510
+ </tr>
511
+ <tr>
512
+ <td>btn_img_clicked</td>
513
+ <td>http://example.com/btn-img-clicked-2.jpg</td>
514
+ </tr>
515
+ <tr>
516
+ <td>btn_title</td>
517
+ <td>Menú</td>
518
+ </tr>
519
+ <tr>
520
+ <td>&nbsp;</td>
521
+ <td>&nbsp;</td>
522
+ </tr>
523
+ <tr>
524
+ <td colspan="2">
525
+ <em><?php _e("e.g"); ?> - [responsive-menu title="Título" title_link="http://mipagina.es"]</em>
526
+ </td>
527
+ </tr>
528
+ </table>
529
+
530
+ </td>
531
+ </tr>
532
+
533
+ </table>
534
+
535
+ <h3><?php _e( 'Mobile devices', 'responsive-menu' ); ?></h3>
536
+
537
+ <table>
538
+ <tr>
539
+ <td class="pro-option">
540
+ <div class="pro-option-inner">
541
+ <h4>
542
+ <?php _e( 'Only use Responsive Menu on mobile devices', 'responsive-menu'); ?>
543
+ </h4>
544
+ <h5>
545
+ <?php _e('This will ignore all breakpoint width settings and show the menu only on mobile devices using the wp_is_mobile() function', 'responsive-menu'); ?>
546
+ </h5>
547
+
548
+ <input
549
+ type="checkbox"
550
+ name="use_only_on_mobile"
551
+ />
552
+ </div>
553
+ </td>
554
+ </tr>
555
+ </table>
556
+
557
+ </div>
558
+
559
+ <div class="look-and-feel">
560
+ <h3><?php _e('Click Button Settings', 'responsive-menu'); ?></h3>
561
+
562
+ <table>
563
+
564
+ <tr>
565
+ <td>
566
+ <h4><?php _e('Click Button Title', 'responsive-menu'); ?></h4>
567
+
568
+ <h5><?php _e('This is the title under the 3 lines of the click button', 'responsive-menu'); ?></h5>
569
+
570
+ <input
571
+ type="text"
572
+ name="RMClickTitle"
573
+ value="<?php echo isset($data['RMClickTitle']) ? $data['RMClickTitle'] : ''; ?>"
574
+ />
575
+ </td>
576
+ <td>
577
+
578
+ <h4><?php _e('Click Button Image', 'responsive-menu'); ?></h4>
579
+
580
+ <h5><?php _e('This is the click button that replaces the 3 lines. If empty, the 3 lines will be used', 'responsive-menu'); ?></h5>
581
+
582
+ <input
583
+ type="text"
584
+ id="RMClickImg"
585
+ name="RMClickImg"
586
+ value="<?php echo isset($data['RMClickImg']) ? $data['RMClickImg'] : ''; ?>"
587
+ />
588
+
589
+ <input
590
+ type="button"
591
+ id="RMImageButton"
592
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
593
+ class="button RMImageButton"
594
+ for="RMClickImg"
595
+ />
596
+
597
+ </td>
598
+ </tr>
599
+ <tr>
600
+ <td>
601
+ <h4><?php _e('Change click menu to an X on click', 'responsive-menu'); ?></h4>
602
+
603
+ <h5>
604
+ <?php _e('Tick this if you would like the 3 lines to turn into an x once clicked', 'responsive-menu'); ?>.
605
+ </h5>
606
+ <input
607
+ type="checkbox"
608
+ name="RMX"
609
+ id="RMX"
610
+ value="rmx"
611
+ <?php echo $data['RMX'] == 'rmx' ? ' checked="checked" ' : ''; ?>
612
+ />
613
+ </td>
614
+ <td>
615
+
616
+ <h4><?php _e('Click Button Image When Clicked', 'responsive-menu'); ?></h4>
617
+
618
+ <h5><?php _e('This is the click button image that replaces the 3 lines when clicked. If empty, the 3 lines will be used', 'responsive-menu'); ?></h5>
619
+
620
+ <input
621
+ type="text"
622
+ id="RMClickImgClicked"
623
+ name="RMClickImgClicked"
624
+ value="<?php echo isset($data['RMClickImgClicked']) ? $data['RMClickImgClicked'] : ''; ?>"
625
+ />
626
+
627
+ <input
628
+ type="button"
629
+ id="RMClickHovImgButton"
630
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
631
+ class="button RMImageButton"
632
+ for="RMClickImgClicked"
633
+ />
634
+
635
+ </td>
636
+ </tr>
637
+
638
+
639
+ <tr>
640
+ <td>
641
+
642
+ <h4><?php _e('Fixed Positioning', 'responsive-menu'); ?></h4>
643
+
644
+ <h5><?php _e('Tick this if you would like the click button to remain in the same place when scrolling', 'responsive-menu'); ?>.</h5>
645
+
646
+ <input
647
+ type="checkbox"
648
+ name="RMPos"
649
+ id="RMPos"
650
+ value="fixed"
651
+ <?php echo $data['RMPos'] == 'fixed' ? ' checked="checked" ' : ''; ?>
652
+ />
653
+
654
+ </td>
655
+ <td>
656
+
657
+ <h4><?php _e('Click Trigger', 'responsive-menu'); ?></h4>
658
+
659
+ <h5><?php _e('You can set a custom ID or class for custom triggers here if you wish.', 'responsive-menu'); ?>.</h5>
660
+
661
+ <input
662
+ type="text"
663
+ name="RMTrigger"
664
+ id="RMTrigger"
665
+ value="<?php echo isset($data['RMTrigger']) ? $data['RMTrigger'] : RM_Registry::get('defaults', 'RMTrigger'); ?>"
666
+ />
667
+
668
+ </td>
669
+ </tr>
670
+ <tr>
671
+ <td>
672
+
673
+ <h4><?php _e('Click Button Title Position', 'responsive-menu'); ?></h4>
674
+
675
+ <h5><?php _e('This defines where the menu button title is shown in relation to the 3 lines', 'responsive-menu'); ?></h5>
676
+
677
+ <select name="RMClickTitlePos">
678
+
679
+ <option
680
+ value="bottom"
681
+ <?php echo 'bottom' == $data['RMClickTitlePos'] ? 'selected="selected"' : ''; ?>>
682
+ Below
683
+ </option>
684
+
685
+ <option
686
+ value="top"
687
+ <?php echo 'top' == $data['RMClickTitlePos'] ? 'selected="selected"' : ''; ?>>
688
+ On Top
689
+ </option>
690
+
691
+ <option
692
+ value="left"
693
+ <?php echo 'left' == $data['RMClickTitlePos'] ? 'selected="selected"' : ''; ?>>
694
+ Left
695
+ </option>
696
+
697
+ <option
698
+ value="right"
699
+ <?php echo 'right' == $data['RMClickTitlePos'] ? 'selected="selected"' : ''; ?>>
700
+ Right
701
+ </option>
702
+
703
+ </select>
704
+
705
+ </td>
706
+ <td>
707
+
708
+ <h4><?php _e('Click Menu Title Height', 'responsive-menu'); ?></h4>
709
+
710
+ <h5><?php _e('This is helpful for sorting size issues with menu text set to left/right', 'responsive-menu'); ?>.</h5>
711
+
712
+ <input
713
+ type="text"
714
+ name="RMClickTitleHeight"
715
+ id="RMClickTitleHeight"
716
+ value="<?php echo isset($data['RMClickTitleHeight']) ? $data['RMClickTitleHeight'] : RM_Registry::get('defaults', 'RMClickTitleHeight'); ?>"
717
+ />px
718
+ </td>
719
+ </tr>
720
+ </table>
721
+
722
+ <h3><?php _e('Click Button Size Settings', 'responsive-menu'); ?></h3>
723
+
724
+ <table>
725
+ <tr>
726
+ <td>
727
+
728
+ <h4><?php _e('Width', 'responsive-menu'); ?></h4>
729
+
730
+ <h5><?php _e('This is the width of the individual 3 lines', 'responsive-menu'); ?></h5>
731
+
732
+ <input
733
+ class="numberInput"
734
+ type="text"
735
+ name="RMLineWidth"
736
+ value="<?php echo isset($data['RMLineWidth']) ? $data['RMLineWidth'] : ''; ?>"
737
+ /> <?php _e('px', 'responsive-menu'); ?>
738
+
739
+ </td>
740
+ <td>
741
+
742
+ <h4><?php _e('Height', 'responsive-menu'); ?></h4>
743
+
744
+ <h5><?php _e('This is the height of the individual 3 lines', 'responsive-menu'); ?></h5>
745
+
746
+ <input
747
+ class="numberInput"
748
+ type="text"
749
+ name="RMLineHeight"
750
+ value="<?php echo isset($data['RMLineHeight']) ? $data['RMLineHeight'] : ''; ?>"
751
+ /> <?php _e('px', 'responsive-menu'); ?>
752
+
753
+ </td>
754
+ </tr>
755
+ <tr>
756
+ <td>
757
+
758
+ <h4><?php _e('Margin', 'responsive-menu'); ?></h4>
759
+
760
+ <h5><?php _e('This is the margin between the individual 3 lines', 'responsive-menu'); ?></h5>
761
+
762
+ <input
763
+ class="numberInput"
764
+ type="text"
765
+ name="RMLineMargin"
766
+ value="<?php echo isset($data['RMLineMargin']) ? $data['RMLineMargin'] : ''; ?>"
767
+ /> <?php _e('px', 'responsive-menu'); ?>
768
+
769
+ </td>
770
+ <td>
771
+
772
+ <h4></h4>
773
+
774
+ <h5></h5>
775
+
776
+ </td>
777
+ </tr>
778
+ </table>
779
+
780
+ <h3><?php _e('Click Button Location Settings', 'responsive-menu'); ?></h3>
781
+
782
+ <table>
783
+ <tr>
784
+ <td>
785
+
786
+ <h4><?php _e('Top', 'responsive-menu'); ?></h4>
787
+
788
+ <h5><?php _e('This is the distance from the top of the page in px that the click button will be displayed', 'responsive-menu'); ?></h5>
789
+
790
+ <input
791
+ class="numberInput"
792
+ type="text"
793
+ name="RMTop"
794
+ value="<?php echo isset($data['RMTop']) ? $data['RMTop'] : ''; ?>"
795
+ /> <?php _e('px', 'responsive-menu'); ?>
796
+
797
+ </td>
798
+ <td>
799
+
800
+ <h4><?php _e('Left/Right Distance', 'responsive-menu'); ?></h4>
801
+
802
+ <h5><?php _e('This is the distance from the right/left of the page (as defined below) in % that the menu will be displayed', 'responsive-menu'); ?></h5>
803
+
804
+ <input
805
+ class="numberInput"
806
+ type="text"
807
+ name="RMRight"
808
+ value="<?php echo isset($data['RMRight']) ? $data['RMRight'] : ''; ?>"
809
+ /> %
810
+
811
+ </td>
812
+ </tr>
813
+ <tr>
814
+ <td>
815
+
816
+ <h4><?php _e('Left/Right', 'responsive-menu'); ?></h4>
817
+
818
+ <h5><?php _e('This defines whether the menu button is shown as a percentage from the left or right', 'responsive-menu'); ?></h5>
819
+
820
+ <select name="RMLoc">
821
+
822
+ <option
823
+ value="left"
824
+ <?php echo 'left' == $data['RMLoc'] ? 'selected="selected"' : ''; ?>>
825
+ Left
826
+ </option>
827
+
828
+ <option
829
+ value="right"
830
+ <?php echo 'right' == $data['RMLoc'] ? 'selected="selected"' : ''; ?>>
831
+ Right
832
+ </option>
833
+
834
+ </select>
835
+
836
+ </td>
837
+ <td>
838
+
839
+ <h4></h4>
840
+
841
+ <h5></h5>
842
+
843
+
844
+ </td>
845
+ </tr>
846
+ </table>
847
+
848
+ <h3><?php _e('Menu Settings', 'responsive-menu'); ?></h3>
849
+
850
+ <table>
851
+
852
+ <tr>
853
+ <td>
854
+
855
+ <h4><?php _e('Menu Title', 'responsive-menu'); ?></h4>
856
+
857
+ <h5><?php _e('This is the title at the top of the responsive menu', 'responsive-menu'); ?></h5>
858
+
859
+ <input
860
+ type="text"
861
+ name="RMTitle"
862
+ value="<?php echo isset($data['RMTitle']) ? $data['RMTitle'] : ''; ?>"
863
+ />
864
+
865
+ </td>
866
+ <td>
867
+
868
+ <h4><?php _e('Menu Image', 'responsive-menu'); ?></h4>
869
+
870
+ <h5><?php _e('This is the image that sits next to the responsive menu title. The best size is 32px x 32px', 'responsive-menu'); ?></h5>
871
+
872
+ <input
873
+ type="text"
874
+ id="RMImage"
875
+ name="RMImage"
876
+ value="<?php echo isset($data['RMImage']) ? $data['RMImage'] : ''; ?>"
877
+ />
878
+
879
+ <input
880
+ type="button"
881
+ id="RMImageButton"
882
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
883
+ class="button RMImageButton"
884
+ for="RMImage"
885
+ />
886
+
887
+ </td>
888
+ </tr>
889
+
890
+ <tr>
891
+ <td>
892
+ <h4><?php _e('Choose Menu To Responsify', 'responsive-menu'); ?></h4>
893
+
894
+ <h5><?php _e('This is the menu that will be used responsively', 'responsive-menu'); ?>.</h5>
895
+
896
+ <?php if (ResponsiveMenu::hasMenus()) : ?>
897
+
898
+ <select name="RM">
899
+
900
+ <?php foreach (ResponsiveMenu::getMenus() as $menu) : ?>
901
+
902
+ <option
903
+ value="<?php echo $menu->slug; ?>"
904
+ <?php echo $menu->slug == $data['RM'] ? 'selected="selected">' : '>'; ?>
905
+ <?php echo $menu->name; ?>
906
+ </option>
907
+
908
+ <?php endforeach; ?>
909
+
910
+ </select>
911
+
912
+ <?php else : ?>
913
+
914
+ <span style="color: red;"><?php _e("You haven't set up any site menus yet", "responsive-menu"); ?>.</span>
915
+
916
+ <?php endif; ?>
917
+
918
+
919
+
920
+ </td>
921
+ <td>
922
+
923
+ <h4><?php _e('Slide Side', 'responsive-menu'); ?></h4>
924
+
925
+ <h5><?php _e('This is the side of the screen from which the menu will slide', 'responsive-menu'); ?></h5>
926
+
927
+ <select name="RMSide">
928
+
929
+ <option
930
+ value="left"
931
+ <?php echo isset($data['RMSide']) && $data['RMSide'] == 'left' ? 'selected="selected"' : ''; ?>>
932
+ <?php _e('Left', 'responsive-menu'); ?>
933
+ </option>
934
+
935
+ <option
936
+ value="right"
937
+ <?php echo isset($data['RMSide']) && $data['RMSide'] == 'right' ? 'selected="selected"' : ''; ?>>
938
+ <?php _e('Right', 'responsive-menu'); ?>
939
+ </option>
940
+
941
+ <option
942
+ value="top"
943
+ <?php echo isset($data['RMSide']) && $data['RMSide'] == 'top' ? 'selected="selected"' : ''; ?>>
944
+ <?php _e('Top', 'responsive-menu'); ?>
945
+ </option>
946
+
947
+ <option
948
+ value="bottom"
949
+ <?php echo isset($data['RMSide']) && $data['RMSide'] == 'bottom' ? 'selected="selected"' : ''; ?>>
950
+ <?php _e('Bottom', 'responsive-menu'); ?>
951
+ </option>
952
+
953
+ </select>
954
+
955
+
956
+ </td>
957
+ </tr>
958
+ <tr>
959
+ <td>
960
+
961
+ <?php // Choose Theme Location Menu add by mkdgs ?>
962
+
963
+ <h4><?php _e('Choose Theme Location Menu To Responsify', 'responsive-menu'); ?></h4>
964
+
965
+ <h5><?php _e('The menu assigned to this theme location (registered with register_nav_menu) will be used for displaying the responsive menu (useful if you use a plugin like polylang)', 'responsive-menu'); ?>.</h5>
966
+
967
+ <?php if ($MenusLocations = ResponsiveMenu::getMenusLocations()) : ?>
968
+
969
+ <select name="RMThemeLocation">
970
+ <?php foreach ($MenusLocations as $location) : ?>
971
+
972
+ <option
973
+ value="<?php echo $location->location; ?>"
974
+ <?php echo $location->location == $data['RMThemeLocation'] ? 'selected="selected"' : ''; ?>>
975
+ <?php echo $location->description; ?>
976
+ </option>
977
+
978
+ <?php endforeach; ?>
979
+
980
+ <option
981
+ value=""
982
+ <?php echo ( empty($data['RMThemeLocation']) ) ? 'selected="selected"' : ''; ?>
983
+ >
984
+ <?php echo _e('None', 'responsive-menu'); ?>
985
+ </option>
986
+
987
+ </select>
988
+
989
+ <?php else : ?>
990
+
991
+ <span style="color: red;"><?php _e("You haven't set up any menus location yet", "responsive-menu"); ?>.</span>
992
+
993
+ <?php endif; ?>
994
+
995
+ </td>
996
+
997
+ <td class="pro-option">
998
+
999
+ <div class="pro-option-inner">
1000
+
1001
+ <h4><?php _e('Set auto height on menu', 'responsive-menu'); ?></h4>
1002
+
1003
+ <h5><?php _e('Tick this if you would like the menu to have the height be automatically sized', 'responsive-menu'); ?></h5>
1004
+
1005
+ <input
1006
+ type="checkbox"
1007
+ />
1008
+
1009
+ </div>
1010
+
1011
+ </td>
1012
+
1013
+ </tr>
1014
+ <tr>
1015
+ <td>
1016
+ <h4><?php _e('Menu Title Link', 'responsive-menu'); ?></h4>
1017
+
1018
+ <h5><?php _e('This is the link location for the title', 'responsive-menu'); ?></h5>
1019
+
1020
+ <input
1021
+ type="text"
1022
+ name="RMTitleLink"
1023
+ value="<?php echo isset($data['RMTitleLink']) ? $data['RMTitleLink'] : ''; ?>"
1024
+ />
1025
+ </td>
1026
+ <td>
1027
+
1028
+ <h4><?php _e('Menu Title Link Location', 'responsive-menu'); ?></h4>
1029
+
1030
+ <h5><?php _e('This is where your title page will be opened once clicked', 'responsive-menu'); ?></h5>
1031
+
1032
+ <select name="RMTitleLoc">
1033
+
1034
+ <option
1035
+ value="_blank"
1036
+ <?php echo isset($data['RMTitleLoc']) && $data['RMTitleLoc'] == '_blank' ? 'selected="selected"' : ''; ?>>
1037
+ <?php _e('New Tab', 'responsive-menu'); ?>
1038
+ </option>
1039
+
1040
+ <option
1041
+ value="_self"
1042
+ <?php echo isset($data['RMTitleLoc']) && $data['RMTitleLoc'] == '_self' ? 'selected="selected"' : ''; ?>>
1043
+ <?php _e('Same Page', 'responsive-menu'); ?>
1044
+ </option>
1045
+
1046
+ <option
1047
+ value="_parent"
1048
+ <?php echo isset($data['RMTitleLoc']) && $data['RMTitleLoc'] == '_parent' ? 'selected="selected"' : ''; ?>>
1049
+ <?php _e('Parent Page', 'responsive-menu'); ?>
1050
+ </option>
1051
+
1052
+ <option
1053
+ value="_top"
1054
+ <?php echo isset($data['RMTitleLoc']) && $data['RMTitleLoc'] == '_top' ? 'selected="selected"' : ''; ?>>
1055
+ <?php _e('Full Window Body', 'responsive-menu'); ?>
1056
+ </option>
1057
+
1058
+ </select>
1059
+
1060
+ </td>
1061
+ </tr>
1062
+ </table>
1063
+
1064
+
1065
+
1066
+ <h3><?php _e('Sub Menu Arrow Settings', 'responsive-menu'); ?></h3>
1067
+
1068
+ <table>
1069
+ <tr>
1070
+ <td>
1071
+
1072
+ <h4><?php _e('Active Geometric Shape', 'responsive-menu'); ?></h4>
1073
+
1074
+ <input
1075
+ type="text"
1076
+ name="RMArShpA"
1077
+ value="<?php echo isset($data['RMArShpA']) ? json_decode($data['RMArShpA']) : ''; ?>"
1078
+ />
1079
+
1080
+ </td>
1081
+ <td>
1082
+
1083
+ <h4><?php _e('Inactive Geometric Shape', 'responsive-menu'); ?></h4>
1084
+
1085
+ <input
1086
+ type="text"
1087
+ name="RMArShpI"
1088
+ value="<?php echo isset($data['RMArShpI']) ? json_decode($data['RMArShpI']) : ''; ?>"
1089
+ />
1090
+
1091
+ </td>
1092
+ </tr>
1093
+
1094
+ <tr>
1095
+ <td colspan="2">
1096
+ <h4><?php _e('You can find a list of Geometric HTML shape codes below', 'responsive-menu'); ?>:</h4>
1097
+ <a target="_blank" href="http://responsive.menu/html-geometric-shapes">http://responsive.menu/html-geometric-shapes</a>
1098
+ </td>
1099
+ </tr>
1100
+ <tr>
1101
+ <td>
1102
+
1103
+ <h4><?php _e('Active Image', 'responsive-menu'); ?></h4>
1104
+
1105
+ <input
1106
+ type="text"
1107
+ id="RMArImgA"
1108
+ name="RMArImgA"
1109
+ value="<?php echo isset($data['RMArImgA']) ? $data['RMArImgA'] : ''; ?>"
1110
+ />
1111
+
1112
+ <input
1113
+ type="button"
1114
+ id="RMArImgABtn"
1115
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
1116
+ class="button RMImageButton"
1117
+ for="RMArImgA"
1118
+ />
1119
+
1120
+ </td>
1121
+ <td>
1122
+
1123
+ <h4><?php _e('Inactive Image', 'responsive-menu'); ?></h4>
1124
+
1125
+ <input
1126
+ type="text"
1127
+ id="RMArImgI"
1128
+ name="RMArImgI"
1129
+ value="<?php echo isset($data['RMArImgI']) ? $data['RMArImgI'] : ''; ?>"
1130
+ />
1131
+
1132
+ <input
1133
+ type="button"
1134
+ id="RMArImgIBtn"
1135
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
1136
+ class="button RMImageButton"
1137
+ for="RMArImgI"
1138
+ />
1139
+
1140
+ </td>
1141
+ </tr>
1142
+ <tr>
1143
+ <td colspan="2">
1144
+ <h4 class="divider">
1145
+ <?php _e('Note'); ?>:
1146
+ <?php _e('Images have preference over shapes, to use HTML shapes please leave the image field blank', 'responsive-menu'); ?>.
1147
+ </h4>
1148
+ </td>
1149
+ </tr>
1150
+
1151
+ </table>
1152
+
1153
+ <h3><?php _e('Colour Settings', 'responsive-menu'); ?></h3>
1154
+
1155
+ <h4 class="divider"><?php _e('Background Colours', 'responsive-menu'); ?></h4>
1156
+
1157
+
1158
+
1159
+ <h5 class="sub-divider"><?php _e('Click Button', 'responsive-menu'); ?></h5>
1160
+
1161
+
1162
+
1163
+ <table>
1164
+ <tr>
1165
+ <td>
1166
+
1167
+ <h4><?php _e('Click Button Line & Text Colour', 'responsive-menu'); ?></h4>
1168
+
1169
+ <h5><?php _e('This is the colour of the 3 lines and text for the click button', 'responsive-menu'); ?></h5>
1170
+
1171
+ <input
1172
+ type="text"
1173
+ name="RMLineCol"
1174
+ id="RMLineCol"
1175
+ class="colourPicker"
1176
+ value="<?php echo isset($data['RMLineCol']) ? $data['RMLineCol'] : ''; ?>"
1177
+ />
1178
+
1179
+ </td>
1180
+ <td>
1181
+
1182
+ <h4><?php _e('Click Button Background Colour', 'responsive-menu'); ?></h4>
1183
+
1184
+ <h5><?php _e('This is the background colour of the 3 lines container', 'responsive-menu'); ?></h5>
1185
+
1186
+ <input
1187
+ type="text"
1188
+ name="RMClickBkg"
1189
+ id="RMClickBkg"
1190
+ class="colourPicker"
1191
+ value="<?php echo isset($data['RMClickBkg']) ? $data['RMClickBkg'] : ''; ?>"
1192
+ />
1193
+
1194
+ </td>
1195
+ </tr>
1196
+ <tr>
1197
+ <td>
1198
+
1199
+ <h4><?php _e('Click Button Background Transparent', 'responsive-menu'); ?></h4>
1200
+
1201
+ <h5><?php _e('Tick this if you would like a transparent background on the click button', 'responsive-menu'); ?></h5>
1202
+
1203
+ <input
1204
+ type="checkbox"
1205
+ name="RMBkgTran"
1206
+ id="RMBkgTran"
1207
+ value="checked"
1208
+ <?php echo $data['RMBkgTran'] == 'checked' ? ' checked="checked" ' : ''; ?>
1209
+ />
1210
+
1211
+ </td>
1212
+ <tr>
1213
+ <td>
1214
+ </td>
1215
+ </tr>
1216
+
1217
+ </table>
1218
+
1219
+
1220
+
1221
+ <h5 class="sub-divider"><?php _e('Main Menu', 'responsive-menu'); ?></h5>
1222
+
1223
+
1224
+
1225
+ <table>
1226
+ <tr>
1227
+ <td>
1228
+
1229
+ <h4><?php _e('Menu Background Colour', 'responsive-menu'); ?></h4>
1230
+
1231
+ <h5><?php _e('This is the background colour of the expanded menu', 'responsive-menu'); ?></h5>
1232
+
1233
+ <input
1234
+ type="text"
1235
+ name="RMBkg"
1236
+ id="RMBkg"
1237
+ class="colourPicker"
1238
+ value="<?php echo isset($data['RMBkg']) ? $data['RMBkg'] : ''; ?>"
1239
+ />
1240
+
1241
+ </td>
1242
+ <td>
1243
+
1244
+ <h4><?php _e('Menu Background Hover Colour', 'responsive-menu'); ?></h4>
1245
+
1246
+ <h5><?php _e('This is the hover background colour of the expanded menu', 'responsive-menu'); ?></h5>
1247
+
1248
+ <input
1249
+ type="text"
1250
+ name="RMBkgHov"
1251
+ id="RMBkgHov"
1252
+ class="colourPicker"
1253
+ value="<?php echo isset($data['RMBkgHov']) ? $data['RMBkgHov'] : ''; ?>"
1254
+ />
1255
+
1256
+ </td>
1257
+ </tr>
1258
+ <tr>
1259
+ <td>
1260
+
1261
+ <h4><?php _e('Menu Link Border Colour', 'responsive-menu'); ?></h4>
1262
+
1263
+ <h5><?php _e('This is the border colour of the menu links', 'responsive-menu'); ?></h5>
1264
+
1265
+ <input
1266
+ type="text"
1267
+ name="RMBorCol"
1268
+ id="RMBorCol"
1269
+ class="colourPicker"
1270
+ value="<?php echo isset($data['RMBorCol']) ? $data['RMBorCol'] : ''; ?>"
1271
+ />
1272
+
1273
+ </td>
1274
+ <td>
1275
+
1276
+ <h4><?php _e('Title Background Colour', 'responsive-menu'); ?></h4>
1277
+
1278
+ <h5><?php _e('This is the background colour of the menu title', 'responsive-menu'); ?></h5>
1279
+
1280
+ <input
1281
+ type="text"
1282
+ name="RMTitleBkg"
1283
+ id="RMTitleBkg"
1284
+ class="colourPicker"
1285
+ value="<?php echo isset($data['RMTitleBkg']) ? $data['RMTitleBkg'] : ''; ?>"
1286
+ />
1287
+
1288
+ </td>
1289
+ </tr>
1290
+ <tr>
1291
+ <td>
1292
+
1293
+ <h4><?php _e('Current Page Link Background Colour', 'responsive-menu'); ?></h4>
1294
+
1295
+ <h5><?php _e('This is the background colour of the current page link', 'responsive-menu'); ?></h5>
1296
+
1297
+ <input
1298
+ type="text"
1299
+ name="RMCurBkg"
1300
+ id="RMCurBkg"
1301
+ class="colourPicker"
1302
+ value="<?php echo isset($data['RMCurBkg']) ? $data['RMCurBkg'] : ''; ?>"
1303
+ />
1304
+
1305
+ </td>
1306
+ <td>
1307
+
1308
+ <h4><?php _e('Current Page Link Background Hover Colour', 'responsive-menu'); ?></h4>
1309
+
1310
+ <h5><?php _e('This is the hover background colour of the current page link', 'responsive-menu'); ?></h5>
1311
+
1312
+ <input
1313
+ type="text"
1314
+ name="RMCurBkgHov"
1315
+ id="RMCurBkgHov"
1316
+ class="colourPicker"
1317
+ value="<?php echo isset($data['RMCurBkgHov']) ? $data['RMCurBkgHov'] : ''; ?>"
1318
+ />
1319
+
1320
+ </td>
1321
+ </tr>
1322
+ </table>
1323
+
1324
+ <h4 class="divider"><?php _e('Text Colours', 'responsive-menu'); ?></h4>
1325
+
1326
+
1327
+
1328
+ <table>
1329
+ <tr>
1330
+
1331
+ <td>
1332
+
1333
+ <h4><?php _e('Menu Title Colour', 'responsive-menu'); ?></h4>
1334
+
1335
+ <h5><?php _e('This is the text colour of the menu title', 'responsive-menu'); ?></h5>
1336
+
1337
+ <input
1338
+ type="text"
1339
+ name="RMTitleCol"
1340
+ id="RMTitleCol"
1341
+ class="colourPicker"
1342
+ value="<?php echo isset($data['RMTitleCol']) ? $data['RMTitleCol'] : ''; ?>"
1343
+ />
1344
+
1345
+ </td>
1346
+ <td>
1347
+
1348
+ <h4><?php _e('Menu Title Hover Colour', 'responsive-menu'); ?></h4>
1349
+
1350
+ <h5><?php _e('This is the hover colour of the menu title', 'responsive-menu'); ?></h5>
1351
+
1352
+ <input
1353
+ type="text"
1354
+ name="RMTitleColHov"
1355
+ id="RMTitleColHov"
1356
+ class="colourPicker"
1357
+ value="<?php echo isset($data['RMTitleColHov']) ? $data['RMTitleColHov'] : ''; ?>"
1358
+ />
1359
+
1360
+ </td>
1361
+ </tr>
1362
+ <tr>
1363
+ <td>
1364
+
1365
+ <h4><?php _e('Menu Link Colour', 'responsive-menu'); ?></h4>
1366
+
1367
+ <h5><?php _e('This is the text colour of the menu links', 'responsive-menu'); ?></h5>
1368
+
1369
+ <input
1370
+ type="text"
1371
+ name="RMTextCol"
1372
+ id="RMTextCol"
1373
+ class="colourPicker"
1374
+ value="<?php echo isset($data['RMTextCol']) ? $data['RMTextCol'] : ''; ?>"
1375
+ />
1376
+
1377
+ </td>
1378
+ <td>
1379
+
1380
+ <h4><?php _e('Menu Link Hover Colour', 'responsive-menu'); ?></h4>
1381
+
1382
+ <h5><?php _e('This is the text hover colour of the menu links', 'responsive-menu'); ?></h5>
1383
+
1384
+ <input
1385
+ type="text"
1386
+ name="RMTextColHov"
1387
+ id="RMTextColHov"
1388
+ class="colourPicker"
1389
+ value="<?php echo isset($data['RMTextColHov']) ? $data['RMTextColHov'] : ''; ?>"
1390
+ />
1391
+
1392
+ </td>
1393
+ </tr>
1394
+
1395
+ <tr>
1396
+ <td>
1397
+
1398
+ <h4><?php _e('Current Page Link Colour', 'responsive-menu'); ?></h4>
1399
+
1400
+ <h5><?php _e('This is the text colour of the current page link', 'responsive-menu'); ?></h5>
1401
+
1402
+ <input
1403
+ type="text"
1404
+ name="RMCurCol"
1405
+ id="RMCurCol"
1406
+ class="colourPicker"
1407
+ value="<?php echo isset($data['RMCurCol']) ? $data['RMCurCol'] : ''; ?>"
1408
+ />
1409
+
1410
+ </td>
1411
+ <td>
1412
+
1413
+ <h4><?php _e('Current Page Link Hover Colour', 'responsive-menu'); ?></h4>
1414
+
1415
+ <h5><?php _e('This is the text hover colour of the current page link', 'responsive-menu'); ?></h5>
1416
+
1417
+ <input
1418
+ type="text"
1419
+ name="RMCurColHov"
1420
+ id="RMCurColHov"
1421
+ class="colourPicker"
1422
+ value="<?php echo isset($data['RMCurColHov']) ? $data['RMCurColHov'] : ''; ?>"
1423
+ />
1424
+
1425
+
1426
+ </td>
1427
+ </tr>
1428
+ </table>
1429
+
1430
+
1431
+
1432
+ <h3><?php _e('Style Settings', 'responsive-menu'); ?></h3>
1433
+
1434
+ <table>
1435
+
1436
+ <tr>
1437
+ <td>
1438
+
1439
+ <h4><?php _e('Font', 'responsive-menu'); ?></h4>
1440
+
1441
+ <h5><?php _e('Enter a font name below, if empty your default site font will be used', 'responsive-menu'); ?></h5>
1442
+
1443
+ <input
1444
+ type="text"
1445
+ name="RMFont"
1446
+ value="<?php echo isset($data['RMFont']) ? $data['RMFont'] : ''; ?>"
1447
+ />
1448
+
1449
+ </td>
1450
+ <td>
1451
+
1452
+ <h4><?php _e('Font Size', 'responsive-menu'); ?></h4>
1453
+
1454
+ <h5><?php _e('Enter a font size in pixels below', 'responsive-menu'); ?>. <span class='default'><?php _e('default', 'responsive-menu'); ?>: 13</span></h5>
1455
+
1456
+ <input
1457
+ type="text"
1458
+ name="RMFontSize"
1459
+ class="numberInput"
1460
+ value="<?php echo isset($data['RMFontSize']) ? $data['RMFontSize'] : ''; ?>"
1461
+ /> <?php _e('px', 'responsive-menu'); ?>
1462
+
1463
+ </td>
1464
+ </tr>
1465
+
1466
+ <tr>
1467
+ <td>
1468
+
1469
+ <h4><?php _e('Click Button Font Size', 'responsive-menu'); ?></h4>
1470
+
1471
+ <h5><?php _e('Enter a click button font size in pixels below', 'responsive-menu'); ?>. <span class='default'><?php _e('default', 'responsive-menu'); ?>: 13</span></h5>
1472
+
1473
+ <input
1474
+ type="text"
1475
+ name="RMBtnSize"
1476
+ class="numberInput"
1477
+ value="<?php echo isset($data['RMBtnSize']) ? $data['RMBtnSize'] : ''; ?>"
1478
+ /> <?php _e('px', 'responsive-menu'); ?>
1479
+
1480
+ </td>
1481
+ <td>
1482
+
1483
+ <h4><?php _e('Title Font Size', 'responsive-menu'); ?></h4>
1484
+
1485
+ <h5><?php _e('Enter a title font size in pixels below', 'responsive-menu'); ?>. <span class='default'><?php _e('default', 'responsive-menu'); ?>: 14</span></h5>
1486
+
1487
+ <input
1488
+ type="text"
1489
+ name="RMTitleSize"
1490
+ class="numberInput"
1491
+ value="<?php echo isset($data['RMTitleSize']) ? $data['RMTitleSize'] : ''; ?>"
1492
+ /> <?php _e('px', 'responsive-menu'); ?>
1493
+
1494
+ </td>
1495
+ </tr>
1496
+
1497
+ <tr>
1498
+ <td>
1499
+
1500
+ <h4><?php _e('Text Alignment', 'responsive-menu'); ?></h4>
1501
+
1502
+ <h5><?php _e('Enter a text alignment option below', 'responsive-menu'); ?> <span class='default'><?php _e('default', 'responsive-menu'); ?>: <?php _e('Left', 'responsive-menu'); ?></span></h5>
1503
+
1504
+ <select name="RMTxtAlign">
1505
+
1506
+ <option
1507
+ value="left"
1508
+ <?php echo isset($data['RMTxtAlign']) && 'overlay' == $data['RMTxtAlign'] ? ' selected="selected " ' : ''; ?>>
1509
+ <?php _e('Left', 'responsive-menu'); ?>
1510
+ </option>
1511
+ <option
1512
+ value="center"
1513
+ <?php echo isset($data['RMTxtAlign']) && 'center' == $data['RMTxtAlign'] ? ' selected="selected " ' : ''; ?>>
1514
+ <?php _e('Centre', 'responsive-menu'); ?>
1515
+ </option>
1516
+ <option
1517
+ value="right"
1518
+ <?php echo isset($data['RMTxtAlign']) && 'right' == $data['RMTxtAlign'] ? ' selected="selected " ' : ''; ?>>
1519
+ <?php _e('Right', 'responsive-menu'); ?>
1520
+ </option>
1521
+
1522
+ </select>
1523
+
1524
+ </td>
1525
+ <td>
1526
+
1527
+ <h4><?php _e('Links Height', 'responsive-menu'); ?></h4>
1528
+
1529
+ <h5><?php _e('Enter a link height size in pixels below', 'responsive-menu'); ?>. <span class='default'><?php _e('default', 'responsive-menu'); ?>: 20</span></h5>
1530
+
1531
+ <input
1532
+ type="text"
1533
+ name="RMLinkHeight"
1534
+ class="numberInput"
1535
+ value="<?php echo isset($data['RMLinkHeight']) ? $data['RMLinkHeight'] : ''; ?>"
1536
+ /> <?php _e('px', 'responsive-menu'); ?>
1537
+
1538
+ </td>
1539
+ </tr>
1540
+ </table>
1541
+
1542
+ <h4 class="divider">
1543
+ <strong><?php _e('Note'); ?>: </strong>
1544
+ <?php _e('Setting the below two values to the same number will give you a fixed width effect', 'responsive-menu'); ?>
1545
+ </h4>
1546
+
1547
+
1548
+
1549
+ <table>
1550
+
1551
+ <tr>
1552
+ <td>
1553
+
1554
+ <h4><?php _e('Minimum Width', 'responsive-menu'); ?></h4>
1555
+
1556
+ <h5><?php _e('Enter a minimum menu width size in pixels below', 'responsive-menu'); ?>.</h5>
1557
+
1558
+ <input
1559
+ type="text"
1560
+ name="RMMinWidth"
1561
+ class="numberInput"
1562
+ value="<?php echo isset($data['RMMinWidth']) ? $data['RMMinWidth'] : ''; ?>"
1563
+ /> <?php _e('px', 'responsive-menu'); ?>
1564
+
1565
+ </td>
1566
+ <td>
1567
+
1568
+ <h4><?php _e('Maximum Width', 'responsive-menu'); ?></h4>
1569
+
1570
+ <h5><?php _e('Enter a maximum menu width size in pixels below', 'responsive-menu'); ?>.</h5>
1571
+
1572
+ <input
1573
+ type="text"
1574
+ name="RMMaxWidth"
1575
+ class="numberInput"
1576
+ value="<?php echo isset($data['RMMaxWidth']) ? $data['RMMaxWidth'] : ''; ?>"
1577
+ /> <?php _e('px', 'responsive-menu'); ?>
1578
+
1579
+ </td>
1580
+ </tr>
1581
+ </table>
1582
+
1583
+
1584
+
1585
+ <h3><?php _e('Animation Settings', 'responsive-menu'); ?></h3>
1586
+
1587
+ <table>
1588
+ <tr>
1589
+ <td>
1590
+
1591
+ <h4><?php _e('Slide Animation', 'responsive-menu'); ?></h4>
1592
+
1593
+ <h5><?php _e('Choose the type of animation applied to the menu', 'responsive-menu'); ?></h5>
1594
+
1595
+ <select name="RMAnim">
1596
+
1597
+ <option
1598
+ value="overlay"
1599
+ <?php echo 'overlay' == $data['RMAnim'] ? ' selected="selected " ' : ''; ?>>
1600
+ <?php _e('Overlay', 'responsive-menu'); ?>
1601
+ </option>
1602
+ <option
1603
+ value="push"
1604
+ <?php echo 'push' == $data['RMAnim'] ? ' selected="selected " ' : ''; ?>>
1605
+ <?php _e('Push', 'responsive-menu'); ?>
1606
+ </option>
1607
+
1608
+ </select>
1609
+
1610
+ </td>
1611
+ <td>
1612
+
1613
+ <h4><?php _e('Page Wrappers CSS', 'responsive-menu'); ?></h4>
1614
+
1615
+ <h5><?php _e('This is the CSS of the wrapper you want to push when using the push animation', 'responsive-menu'); ?> (<?php _e('e.g', 'responsive-menu'); ?> - #pushWrapper)</h5>
1616
+
1617
+ <input
1618
+ type="text"
1619
+ name="RMPushCSS"
1620
+ value="<?php echo isset($data['RMPushCSS']) ? $data['RMPushCSS'] : ''; ?>"
1621
+ />
1622
+
1623
+ </td>
1624
+ </tr>
1625
+
1626
+ <tr>
1627
+ <td>
1628
+
1629
+ <h4><?php _e('Animation Speed', 'responsive-menu'); ?></h4>
1630
+
1631
+ <h5><?php _e('Enter a speed in seconds below of the slide animation', 'responsive-menu'); ?>. <span class="default"><?php _e('default', 'responsive-menu'); ?>: 0.5</span></h5>
1632
+
1633
+ <input
1634
+ type="text"
1635
+ name="RMAnimSpd"
1636
+ class="numberInput"
1637
+ value="<?php echo isset($data['RMAnimSpd']) ? $data['RMAnimSpd'] : ''; ?>"
1638
+ /> <?php _e('seconds', 'responsive-menu'); ?>
1639
+
1640
+ </td>
1641
+ <td>
1642
+
1643
+ <h4><?php _e('Transition Speed', 'responsive-menu'); ?></h4>
1644
+
1645
+ <h5><?php _e('Enter a speed in seconds below of the hover transition effect', 'responsive-menu'); ?>. <span class="default"><?php _e('default', 'responsive-menu'); ?>: 1</span></h5>
1646
+
1647
+ <input
1648
+ type="text"
1649
+ name="RMTranSpd"
1650
+ class="numberInput"
1651
+ value="<?php echo isset($data['RMTranSpd']) ? $data['RMTranSpd'] : ''; ?>"
1652
+ /> <?php _e('seconds', 'responsive-menu'); ?>
1653
+
1654
+ </td>
1655
+ </tr>
1656
+ <tr>
1657
+ <td>
1658
+
1659
+ <h4><?php _e('Accordion Animation For Sub-Menus', 'responsive-menu'); ?></h4>
1660
+
1661
+ <h5><?php _e('Tick to enable the accordion animation for sub-menu items', 'responsive-menu'); ?>.</h5>
1662
+
1663
+ <input
1664
+ type="checkbox"
1665
+ name="RMAccordion"
1666
+ id="RMAccordion"
1667
+ value="accordion"
1668
+ <?php echo isset($data['RMAccordion']) && $data['RMAccordion'] == 'accordion' ? ' checked="checked" ' : ''; ?>
1669
+ />
1670
+
1671
+ </td>
1672
+ <td>
1673
+
1674
+ <h4><?php _e('Push button with Animation', 'responsive-menu'); ?></h4>
1675
+
1676
+ <h5><?php _e('Tick to enable the click button to be pushed with animation', 'responsive-menu'); ?>.</h5>
1677
+
1678
+ <input
1679
+ type="checkbox"
1680
+ name="RMPushBtn"
1681
+ id="RMPushBtn"
1682
+ value="RMPushBtn"
1683
+ <?php echo isset($data['RMPushBtn']) && $data['RMPushBtn'] == 'RMPushBtn' ? ' checked="checked" ' : ''; ?>
1684
+ />
1685
+
1686
+
1687
+ </td>
1688
+ </tr>
1689
+
1690
+ </table>
1691
+
1692
+
1693
+
1694
+ <h3><?php _e('Additional HTML Content Settings', 'responsive-menu'); ?></h3>
1695
+
1696
+ <table>
1697
+
1698
+ <tr>
1699
+ <td>
1700
+
1701
+ <h4><?php _e('Additional HTML Content', 'responsive-menu'); ?></h4>
1702
+
1703
+ <h5><?php _e('Enter any additional HTML you may want below, useful for advertisement banners etc. (accepts shortcodes)', 'responsive-menu'); ?></h5>
1704
+
1705
+ <textarea name="RMHtml"><?php echo isset($data['RMHtml']) ? $data['RMHtml'] : ''; ?></textarea>
1706
+
1707
+ </td>
1708
+ <td>
1709
+
1710
+ <h4><?php _e('Additional HTML Content Positioning', 'responsive-menu'); ?></h4>
1711
+
1712
+ <h5><?php _e('Select where you would like the additional HTML content to appear', 'responsive-menu'); ?></h5>
1713
+
1714
+ <select name="RMHtmlLoc">
1715
+
1716
+ <option
1717
+ value="above"
1718
+ <?php echo isset($data['RMHtmlLoc']) && 'above' == $data['RMHtmlLoc'] ? ' selected="selected " ' : ''; ?>>
1719
+ <?php _e('Above Menu Links', 'responsive-menu'); ?>
1720
+ </option>
1721
+ <option
1722
+ value="below"
1723
+ <?php echo isset($data['RMHtmlLoc']) && 'below' == $data['RMHtmlLoc'] ? ' selected="selected " ' : ''; ?>>
1724
+ <?php _e('Below Menu Links', 'responsive-menu'); ?>
1725
+ </option>
1726
+
1727
+ </select>
1728
+
1729
+ </td>
1730
+ </tr>
1731
+
1732
+ </table>
1733
+
1734
+ </div>
1735
+
1736
+ <div class="advanced-setting">
1737
+ <h3><?php _e('Menu Advanced Settings', 'responsive-menu'); ?></h4>
1738
+
1739
+ <table>
1740
+ <tr>
1741
+ <td>
1742
+
1743
+ <h4><?php _e('Menu Breakpoint', 'responsive-menu'); ?></h4>
1744
+
1745
+ <h5><?php _e('This is the point where the responsive menu will be visible in px width of the browser', 'responsive-menu'); ?></h5>
1746
+
1747
+ <input
1748
+ class="numberInput"
1749
+ type="text"
1750
+ name="RMBreak"
1751
+ value="<?php echo isset($data['RMBreak']) ? $data['RMBreak'] : ''; ?>"
1752
+ /> <?php _e('px', 'responsive-menu'); ?>
1753
+
1754
+ </td>
1755
+ <td>
1756
+
1757
+ <h4><?php _e('CSS of Menu To Hide', 'responsive-menu'); ?></h4>
1758
+
1759
+ <h5><?php _e('This is the CSS of the menu you want to hide once the responsive menu shows', 'responsive-menu'); ?> - <?php _e('e.g', 'responsive-menu'); ?> #primary-nav, .menu</h5>
1760
+
1761
+ <input
1762
+ type="text"
1763
+ name="RMCss"
1764
+ value="<?php echo isset($data['RMCss']) ? $data['RMCss'] : ''; ?>"
1765
+ />
1766
+
1767
+ </td>
1768
+ </tr>
1769
+
1770
+ <tr>
1771
+ <td>
1772
+
1773
+ <h4><?php _e('Menu Depth', 'responsive-menu'); ?></h4>
1774
+
1775
+ <h5><?php _e('This is how deep into your menu tree will be visible (max', 'responsive-menu'); ?>5)</h5>
1776
+
1777
+ <select name="RMDepth">
1778
+
1779
+ <?php for ($i = 1; $i < 6; $i++) : ?>
1780
+
1781
+ <option
1782
+ value="<?php echo $i; ?>"
1783
+ <?php echo isset($data['RMDepth']) && $i == $data['RMDepth'] ? 'selected="selected"' : ''; ?>>
1784
+ <?php echo $i; ?>
1785
+ </option>
1786
+
1787
+ <?php endfor; ?>
1788
+
1789
+ </select>
1790
+
1791
+ </td>
1792
+ <td>
1793
+
1794
+ <h4><?php _e('Menu Width', 'responsive-menu'); ?></h4>
1795
+
1796
+ <h5><?php _e('This is the width the menu takes up across the page once expanded', 'responsive-menu'); ?>.
1797
+ <span class="default"><?php _e('default', 'responsive-menu'); ?>: 75</span>
1798
+ </h5>
1799
+
1800
+ <input
1801
+ class="numberInput"
1802
+ type="text"
1803
+ name="RMWidth"
1804
+ value="<?php echo isset($data['RMWidth']) ? $data['RMWidth'] : ''; ?>"
1805
+ /> %
1806
+
1807
+ </td>
1808
+ </tr>
1809
+ <tr>
1810
+ <td class="pro-option">
1811
+ <div class="pro-option-inner">
1812
+ <h4><?php _e('Word Wrap', 'responsive-menu'); ?></h4>
1813
+
1814
+ <h5><?php _e('Tick if you would like the link items to wrap around', 'responsive-menu'); ?></h5>
1815
+
1816
+ <input
1817
+ type="checkbox"
1818
+ />
1819
+ </div>
1820
+ </td>
1821
+ <td></td>
1822
+ </tr>
1823
+ </table>
1824
+
1825
+
1826
+
1827
+ <table>
1828
+
1829
+ <tr>
1830
+ <td>
1831
+
1832
+ <h4><?php _e('Remove Search Box', 'responsive-menu'); ?></h4>
1833
+
1834
+ <h5><?php _e('Tick if you would like to remove the search box', 'responsive-menu'); ?></h5>
1835
+
1836
+ <input
1837
+ type="checkbox"
1838
+ name="RMSearch"
1839
+ id="RMSearch"
1840
+ value="search"
1841
+ <?php echo isset($data['RMSearch']) && $data['RMSearch'] == 'search' ? ' checked="checked" ' : ''; ?>
1842
+ />
1843
+
1844
+ </td>
1845
+ <td>
1846
+
1847
+ <h4><?php _e('Search Box Positioning', 'responsive-menu'); ?></h4>
1848
+
1849
+ <h5><?php _e('Select where you would like the search box to appear', 'responsive-menu'); ?></h5>
1850
+
1851
+ <select name="RMSearchPos">
1852
+
1853
+ <option
1854
+ value="above"
1855
+ <?php echo isset($data['RMSearchPos']) && 'above' == $data['RMSearchPos'] ? ' selected="selected " ' : ''; ?>>
1856
+ <?php _e('Above Menu Links', 'responsive-menu'); ?>
1857
+ </option>
1858
+ <option
1859
+ value="below"
1860
+ <?php echo isset($data['RMSearchPos']) && 'below' == $data['RMSearchPos'] ? ' selected="selected " ' : ''; ?>>
1861
+ <?php _e('Below Menu Links', 'responsive-menu'); ?>
1862
+ </option>
1863
+
1864
+ </select>
1865
+
1866
+ </td>
1867
+ </tr>
1868
+
1869
+ <tr>
1870
+ <td class="pro-option">
1871
+ <div class="pro-option-inner">
1872
+
1873
+ <h4><?php _e('Search Box Text', 'responsive-menu'); ?></h4>
1874
+
1875
+ <h5><?php _e('This is the placeholder text that shows in the search box', 'responsive-menu'); ?></h5>
1876
+
1877
+ <input
1878
+ type="text"
1879
+ value="Search"
1880
+ />
1881
+ </div>
1882
+ </td>
1883
+ <td>
1884
+
1885
+ </td>
1886
+ </tr>
1887
+
1888
+ <tr>
1889
+ <td>
1890
+ <h4><?php _e('Click to Close Menu on Link Click', 'responsive-menu'); ?></h4>
1891
+
1892
+ <h5><?php _e('Tick if you would like to close the menu on each link click, useful for single page sites', 'responsive-menu'); ?></h5>
1893
+
1894
+ <input
1895
+ type="checkbox"
1896
+ name="RMClickClose"
1897
+ id="RMClickClose"
1898
+ value="close"
1899
+ <?php echo isset($data['RMClickClose']) && $data['RMClickClose'] == 'close' ? ' checked="checked" ' : ''; ?>
1900
+ />
1901
+
1902
+
1903
+ </td>
1904
+ <td>
1905
+ <h4><?php _e('Auto Expand Current Parent Items', 'responsive-menu'); ?></h4>
1906
+
1907
+ <h5><?php _e('Tick if you would like to make the current pages children expanded automatically', 'responsive-menu'); ?></h5>
1908
+
1909
+ <input
1910
+ type="checkbox"
1911
+ name="RMExpandPar"
1912
+ id="RMExpandPar"
1913
+ value="expand"
1914
+ <?php echo isset($data['RMExpandPar']) && $data['RMExpandPar'] == 'expand' ? ' checked="checked" ' : ''; ?>
1915
+ />
1916
+ </td>
1917
+ </tr>
1918
+
1919
+ <tr>
1920
+ <td>
1921
+ <h4><?php _e('Auto Expand Sub-Menus', 'responsive-menu'); ?></h4>
1922
+
1923
+ <h5><?php _e('Tick if you would like sub-menus to be automatically expanded', 'responsive-menu'); ?></h5>
1924
+
1925
+ <input
1926
+ type="checkbox"
1927
+ name="RMExpand"
1928
+ id="RMExpand"
1929
+ value="expand"
1930
+ <?php echo isset($data['RMExpand']) && $data['RMExpand'] == 'expand' ? ' checked="checked" ' : ''; ?>
1931
+ />
1932
+
1933
+
1934
+ </td>
1935
+ <td>
1936
+ <h4><?php _e('Ignore Parent Clicks', 'responsive-menu'); ?></h4>
1937
+
1938
+ <h5><?php _e('Tick if you would like to ignore clicks on parent links', 'responsive-menu'); ?></h5>
1939
+
1940
+ <input
1941
+ type="checkbox"
1942
+ name="RMIgnParCli"
1943
+ id="RMIgnParCli"
1944
+ value="ignoreparentclick"
1945
+ <?php echo isset($data['RMIgnParCli']) && $data['RMIgnParCli'] == 'ignoreparentclick' ? ' checked="checked" ' : ''; ?>
1946
+ />
1947
+ </td>
1948
+ </tr>
1949
+
1950
+ <tr>
1951
+ <td>
1952
+ <h4><?php _e('Click to Close Menu on Page Click', 'responsive-menu'); ?></h4>
1953
+
1954
+ <h5><?php _e('Tick if you would like to close the current menu on page clicks', 'responsive-menu'); ?></h5>
1955
+
1956
+ <input
1957
+ type="checkbox"
1958
+ name="RMCliToClo"
1959
+ id="RMCliToClo"
1960
+ value="clicktoclose"
1961
+ <?php echo isset($data['RMCliToClo']) && $data['RMCliToClo'] == 'clicktoclose' ? ' checked="checked" ' : ''; ?>
1962
+ />
1963
+
1964
+
1965
+ </td>
1966
+ <td class="pro-option">
1967
+ <div class="pro-option-inner">
1968
+ <h4><?php _e('Disable background scrolling when Menu is active', 'responsive-menu'); ?></h4>
1969
+
1970
+ <h5><?php _e('This will create a background overlay and disable scrolling', 'responsive-menu'); ?></h5>
1971
+
1972
+ <input
1973
+ type="checkbox"
1974
+ />
1975
+ </div>
1976
+
1977
+ </td>
1978
+ </tr>
1979
+
1980
+ </table>
1981
+
1982
+ <h3><?php _e('Technical Settings', 'responsive-menu'); ?></h3>
1983
+
1984
+ <table>
1985
+ <tr>
1986
+ <td>
1987
+
1988
+ <h4><?php _e('Minify output', 'responsive-menu'); ?></h4>
1989
+
1990
+ <h5><?php _e('Tick if you would like to minify the script/style output. Saves up to 50% in file size', 'responsive-menu'); ?></h5>
1991
+
1992
+ <input
1993
+ type="checkbox"
1994
+ name="RMMinify"
1995
+ id="RMMinify"
1996
+ value="minify"
1997
+ <?php echo isset($data['RMMinify']) && $data['RMMinify'] == 'minify' ? ' checked="checked" ' : ''; ?>
1998
+ />
1999
+
2000
+ </td>
2001
+ <td>
2002
+
2003
+ <h4><?php _e('Include script in footer', 'responsive-menu'); ?></h4>
2004
+
2005
+ <h5><?php _e('Tick if you would like to include your jQuery script in footer', 'responsive-menu'); ?></h5>
2006
+
2007
+ <input
2008
+ type="checkbox"
2009
+ name="RMFooter"
2010
+ id="RMFooter"
2011
+ value="footer"
2012
+ <?php echo isset($data['RMFooter']) && $data['RMFooter'] == 'footer' ? ' checked="checked" ' : ''; ?>
2013
+ />
2014
+
2015
+ </td>
2016
+ </tr>
2017
+ <tr>
2018
+ <td>
2019
+ <h4><?php _e('Include CSS/JS as external files', 'responsive-menu'); ?></h4>
2020
+
2021
+ <h5><?php _e('Tick if you would like to include CSS and jQuery as external files', 'responsive-menu'); ?></h5>
2022
+
2023
+ <input
2024
+ type="checkbox"
2025
+ name="RMExternal"
2026
+ id="RMExternal"
2027
+ value="external"
2028
+ <?php echo isset($data['RMExternal']) && $data['RMExternal'] == 'external' ? ' checked="checked" ' : ''; ?>
2029
+ />
2030
+ </td>
2031
+ <td>
2032
+ <h4><?php _e('Remove CSS !important tags', 'responsive-menu'); ?></h4>
2033
+
2034
+ <h5>
2035
+ <?php _e('Tick this if you would like to remove the !important tags from the CSS', 'responsive-menu'); ?>.
2036
+ <?php _e('Ticking this will make it easier to over-ride the styles but may make the default settings not display well', 'responsive-menu'); ?>
2037
+ </h5>
2038
+ <input
2039
+ type="checkbox"
2040
+ name="RMRemImp"
2041
+ id="RMRemImp"
2042
+ value="remove"
2043
+ <?php echo $data['RMRemImp'] == 'remove' ? ' checked="checked" ' : ''; ?>
2044
+ />
2045
+ </td>
2046
+ </tr>
2047
+
2048
+ </table>
2049
+
2050
+ <h3><?php _e('Custom Walker', 'responsive-menu'); ?></h3>
2051
+
2052
+ <table>
2053
+
2054
+ <!-- Add by Mkdgs -->
2055
+ <tr>
2056
+ <td>
2057
+
2058
+ <h4><?php _e('Specify you own Walker for the menu (wp_nav_menu parameter)', 'responsive-menu'); ?></h4>
2059
+ <h5><?php _e('For advanced users only - if you don\'t know what you\'re doing please leave alone', 'responsive-menu'); ?></h5>
2060
+
2061
+ <input name="RMWalker" type="text"
2062
+ value="<?php echo isset($data['RMWalker']) ? $data['RMWalker'] : ''; ?>" />
2063
+
2064
+ </td>
2065
+
2066
+ <td>
2067
+
2068
+ </td>
2069
+ </tr>
2070
+
2071
+ </table>
2072
+ </div>
2073
+ <div class="import-export">
2074
+
2075
+ <h3>Import Options</h3>
2076
+
2077
+ <table>
2078
+
2079
+ <tr>
2080
+
2081
+ <td>
2082
+ <br />
2083
+
2084
+ <input
2085
+ type="file"
2086
+ class="button file"
2087
+ name="RMImportFile"
2088
+ value="<?php _e('Import File', 'responsive-menu-pro'); ?>"
2089
+ />
2090
+
2091
+ <input
2092
+ type="submit"
2093
+ class="button"
2094
+ name="RMImport"
2095
+ value="<?php _e('Import Options From XML', 'responsive-menu-pro'); ?>"
2096
+ />
2097
+ </td>
2098
+
2099
+ </tr>
2100
+
2101
+ </table>
2102
+
2103
+ <h3>Export Options</h3>
2104
+
2105
+ <table>
2106
+
2107
+ <tr>
2108
+ <td>
2109
+ <br />
2110
+ <input
2111
+ type="submit"
2112
+ class="button"
2113
+ name="RMExport"
2114
+ value="<?php _e('Export Current Options', 'responsive-menu-pro'); ?>"
2115
+ />
2116
+ </td>
2117
+ </tr>
2118
+ </table>
2119
+
2120
+ <h3>Reset to defaults</h3>
2121
+
2122
+ <table>
2123
+
2124
+ <tr>
2125
+
2126
+ <td>
2127
+ <h4 class="divider">
2128
+ <?php _e('Note'); ?>:
2129
+ <?php _e('Please be warned this will reset all your current settings, please export your current files first', 'responsive-menu-pro'); ?>.
2130
+ </h4>
2131
+ <input
2132
+ type="submit"
2133
+ class="button"
2134
+ name="RMReset"
2135
+ value="<?php _e('Reset ALL Current Options', 'responsive-menu' ); ?>"
2136
+ />
2137
+
2138
+ </td>
2139
+
2140
+ </tr>
2141
+
2142
+ </table>
2143
+
2144
+ </div>
2145
+
2146
+ <div class="single-menu">
2147
+
2148
+ <h3><?php _e('Use Responsive Menu as your only site menu', 'responsive-menu'); ?></h3>
2149
+
2150
+ <table class="pro-option-table">
2151
+
2152
+ <tr>
2153
+ <td>
2154
+ <h4>
2155
+ <?php _e('Turn on single menu option', 'responsive-menu'); ?>
2156
+ </h4>
2157
+ <h5>
2158
+ <?php _e('This will replace your whole site menu and just use this plugin to control the menu on your whole site.', 'responsive-menu'); ?>
2159
+ <h4 class="divider">
2160
+ <?php _e('Note', 'responsive-menu'); ?>:
2161
+ <?php _e('You must not be using the mobile only option and must use the shortcode for this to work', 'responsive-menu-pro'); ?>.
2162
+ </h4>
2163
+ </h5>
2164
+
2165
+ <input
2166
+ type="checkbox"
2167
+ />
2168
+
2169
+ </td>
2170
+ </tr>
2171
+ <tr>
2172
+ <td>
2173
+
2174
+ <h4><?php _e('Menu Height', 'responsive-menu'); ?></h4>
2175
+
2176
+ <h5><?php _e('Enter the height you wish for the menu and links', 'responsive-menu'); ?>.</h5>
2177
+
2178
+ <input
2179
+ type="text"
2180
+ class="numberInput"
2181
+
2182
+ </td>
2183
+ <td></td>
2184
+ </tr>
2185
+ <tr>
2186
+ <td>
2187
+
2188
+ <h4><?php _e('Single Menu Link Colour', 'responsive-menu'); ?></h4>
2189
+
2190
+ <h5><?php _e('This is the colour of the single menu links', 'responsive-menu'); ?></h5>
2191
+
2192
+ <input
2193
+ type="text"
2194
+ class="colourPicker"
2195
+ />
2196
+ </td>
2197
+ <td>
2198
+
2199
+ <h4><?php _e('Single Menu Link Hover Colour', 'responsive-menu'); ?></h4>
2200
+
2201
+ <h5><?php _e('This is the hover colour of the single menu links', 'responsive-menu'); ?></h5>
2202
+
2203
+ <input
2204
+ type="text"
2205
+ class="colourPicker"
2206
+ />
2207
+ </td>
2208
+ </tr>
2209
+ </table>
2210
+
2211
+ </div>
2212
+
2213
+ <div class="themes">
2214
+
2215
+ <h3><?php _e( 'Header Bar', 'responsive-menu' ); ?></h3>
2216
+
2217
+ <table class="pro-option-table">
2218
+
2219
+ <tr>
2220
+ <td>
2221
+ <h4>
2222
+ <?php _e( 'Create header bar for use with Responsive Menu', 'responsive-menu' ); ?>
2223
+ </h4>
2224
+ <h5>
2225
+ <?php _e('This will create a sticky header bar that follows you down the page with the menu and logo', 'responsive-menu'); ?>
2226
+ </h5>
2227
+
2228
+ <input
2229
+ type="checkbox"
2230
+ />
2231
+
2232
+ </td>
2233
+ </tr>
2234
+
2235
+ <tr>
2236
+ <td><h4><?php _e( 'Header Bar Logo/HTML' ); ?></h4></td>
2237
+ </tr>
2238
+ <tr>
2239
+ <td>
2240
+ <h4><?php _e('Header Bar Logo', 'responsive-menu'); ?></h4>
2241
+
2242
+ <h5><?php _e('This is the header bar logo that is displayed on the bar', 'responsive-menu'); ?></h5>
2243
+
2244
+ <input
2245
+ type="text"
2246
+ id="header_bar_logo"
2247
+ />
2248
+
2249
+ <input
2250
+ type="button"
2251
+ value="<?php _e('Upload Image', 'responsive-menu'); ?>"
2252
+ class="button RMImageButton"
2253
+ for="header_bar_logo"
2254
+ />
2255
+
2256
+ </td>
2257
+
2258
+ <td>
2259
+ <h4><?php _e('Header Bar HTML Content', 'responsive-menu'); ?></h4>
2260
+
2261
+ <h5><?php _e('You can set HTML in the header bar instead of the logo', 'responsive-menu'); ?></h5>
2262
+
2263
+ <textarea></textarea>
2264
+
2265
+ </td>
2266
+
2267
+ </tr>
2268
+
2269
+ <tr>
2270
+ <td>
2271
+
2272
+ <h4><?php _e('Header Bar Logo Link', 'responsive-menu'); ?></h4>
2273
+
2274
+ <h5><?php _e('This is the header bar logo link', 'responsive-menu'); ?></h5>
2275
+
2276
+ <input
2277
+ type="text"
2278
+ />
2279
+
2280
+ </td>
2281
+ <td>
2282
+ </td>
2283
+ </tr>
2284
+
2285
+ <tr>
2286
+ <td><h4><?php _e( 'Size & Colour Settings' ); ?></h4></td>
2287
+ </tr>
2288
+ <tr>
2289
+ <td>
2290
+
2291
+ <h4><?php _e('Header Bar Height', 'responsive-menu'); ?></h4>
2292
+ <h5><?php _e('This is the header bar height', 'responsive-menu'); ?></h5>
2293
+
2294
+ <input
2295
+ type="text"
2296
+ /> px
2297
+
2298
+ </td>
2299
+
2300
+ <td>
2301
+ <h4><?php _e('Header Bar Background Colour', 'responsive-menu'); ?></h4>
2302
+
2303
+ <h5><?php _e('This is the background colour for the header bar', 'responsive-menu'); ?></h5>
2304
+
2305
+ <input
2306
+ type="text"
2307
+ class="colourPicker"
2308
+ />
2309
+
2310
+ </td>
2311
+
2312
+ </tr>
2313
+
2314
+ </table>
2315
+
2316
+ <h3><?php _e( 'Themes', 'responsive-menu' ); ?></h3>
2317
+
2318
+ <table class="pro-option-table">
2319
+
2320
+ <tr>
2321
+ <td>
2322
+ <h4>
2323
+ <?php _e( 'Apply preset colour schemes to your Responsive Menu', 'responsive-menu' ); ?>
2324
+ </h4>
2325
+ <h5>
2326
+ <?php _e('This will replace all your current colours only and will not touch other settings', 'responsive-menu'); ?>
2327
+ </h5>
2328
+
2329
+ <select name="theme">
2330
+ <option value="blue">Blue</option>
2331
+ <option value="red">Red</option>
2332
+ <option value="green">Green</option>
2333
+ <option value="yellow">Yellow</option>
2334
+ <option value="default">Default</option>
2335
+ </select>
2336
+
2337
+ <input
2338
+ type="submit"
2339
+ class="button"
2340
+ value="Update Theme"
2341
+ />
2342
+
2343
+ </td>
2344
+ </tr>
2345
+
2346
+ </table>
2347
+
2348
+ </div>
2349
+
2350
+ <div class="custom-css">
2351
+
2352
+ <h3><?php _e( 'Custom CSS/HTML', 'responsive-menu' ); ?></h3>
2353
+
2354
+ <table class="pro-option-table">
2355
+
2356
+ <tr>
2357
+
2358
+ <td>
2359
+ <h4><?php _e('Custom CSS', 'responsive-menu'); ?></h4>
2360
+
2361
+ <h5><?php _e('These will be the final CSS rules applied to the Responsive Menu and are upgrade proof', 'responsive-menu'); ?></h5>
2362
+
2363
+ <textarea rows="15"></textarea>
2364
+
2365
+ </td>
2366
+
2367
+ </tr>
2368
+
2369
+ </table>
2370
+
2371
+ </div>
2372
+
2373
+ <br /><br />
2374
+
2375
+ <input
2376
+ type="submit"
2377
+ class="button button-primary"
2378
+ name="RMSubmit"
2379
+ value="<?php _e('Update Responsive Menu Options', 'responsive-menu'); ?>"
2380
+ />
2381
+
2382
+ <a target="_blank" class="button" style="background: #55B05A; color: white;" href="http://responsive.menu/pricing"><?php _e( 'Go Pro - Upgrade now for just $9.99' ); ?></a>
2383
+
2384
+
2385
+ </form>
2386
+
2387
+ </div>
app/views/click-button.phtml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Added by Responsive Menu Plugin for WordPress - http://responsive.menu -->
2
+
3
+
4
+ <?php
5
+ if($data['RMClickTitlePos'] == 'left' || $data['RMClickTitlePos'] == 'right')
6
+ $title_pos_class = 'threelines-float-left';
7
+ else
8
+ $title_pos_class = '';
9
+ ?>
10
+
11
+ <div id="click-menu"
12
+ class="<?php echo is_admin_bar_showing() ? 'admin-bar-showing ' : ''; ?>
13
+ <?php echo $data['RMAnim']; ?>"
14
+ role="button"
15
+ aria-label="Responsive Menu Button"
16
+ >
17
+
18
+ <?php if( $data['RMClickTitle'] && ( $data['RMClickTitlePos'] == 'top' || $data['RMClickTitlePos'] == 'left' ) ) : ?>
19
+
20
+ <div id="click-menu-label" class="click-menu-label-<?php echo $data['RMClickTitlePos']; ?>"><?php echo $data['RMClickTitle']; ?></div>
21
+
22
+ <?php endif; ?>
23
+
24
+ <?php if( $data['RMX'] || $data['RMClickImgClicked'] ) : ?>
25
+
26
+ <?php if( $data['RMClickImgClicked'] ) : ?>
27
+
28
+ <img
29
+ src="<?php echo $data['RMClickImgClicked']; ?>"
30
+ class="click-menu-image rm-img-clicked <?php echo 'click-menu-float-' . $data['RMClickTitlePos']; ?>"
31
+ alt="Responsive Menu Image"
32
+ title="Responsive Menu Image" />
33
+
34
+ <?php else : ?>
35
+
36
+ <div class="threeLines <?php echo $title_pos_class; ?>" id="RMX">×</div>
37
+
38
+ <?php endif; ?>
39
+
40
+ <?php endif; ?>
41
+
42
+ <?php if( !$data['RMClickImg'] ) : ?>
43
+
44
+ <div class="threeLines <?php echo $title_pos_class; ?>" id="RM3Lines">
45
+ <div class="line"></div>
46
+ <div class="line"></div>
47
+ <div class="line"></div>
48
+ </div>
49
+
50
+ <?php else : ?>
51
+
52
+ <img
53
+ src="<?php echo $data['RMClickImg']; ?>"
54
+ class="click-menu-image rm-img-to-click <?php echo 'click-menu-float-' . $data['RMClickTitlePos']; ?>"
55
+ alt="Responsive Menu Clicked Image"
56
+ title="Responsive Menu Clicked Image" />
57
+
58
+ <?php endif; ?>
59
+
60
+ <?php if( $data['RMClickTitle'] && ($data['RMClickTitlePos'] == 'bottom' || $data['RMClickTitlePos'] == 'right' ) ) : ?>
61
+
62
+ <div id="click-menu-label" class="click-menu-label-<?php echo $data['RMClickTitlePos']; ?>"><?php echo $data['RMClickTitle']; ?></div>
63
+
64
+ <?php endif; ?>
65
+
66
+ </div>
app/views/menu.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Added by Responsive Menu Plugin for WordPress - http://responsive.menu -->
2
+
3
+ <div id="responsive-menu" <?php echo is_admin_bar_showing() ? 'class="admin-bar-showing"' : ''; ?>>
4
+
5
+ <?php if( $data['RMTitle'] || $data['RMImage'] ) : ?>
6
+
7
+ <div id="responsive-menu-title">
8
+
9
+ <?php if( $data['RMImage'] ) : ?>
10
+
11
+ <?php if( isset( $data['RMTitleLink'] ) && !empty( $data['RMTitleLink'] ) ) : ?>
12
+
13
+ <a href="<?php echo $data['RMTitleLink']; ?>" target="<?php echo $data['RMTitleLoc']; ?>">
14
+
15
+ <?php endif; ?>
16
+
17
+ <img src="<?php echo $data['RMImage']; ?>"
18
+ class="RMImage"
19
+ alt="<?php echo $data['RMTitle']; ?>"
20
+ title="<?php echo $data['RMTitle']; ?>" />
21
+
22
+ <?php if( isset( $data['RMTitleLink'] ) && !empty( $data['RMTitleLink'] ) ) : ?>
23
+
24
+ </a>
25
+
26
+ <?php endif; ?>
27
+
28
+ <?php endif; ?>
29
+
30
+ <?php if( isset( $data['RMTitleLink'] ) && !empty( $data['RMTitleLink'] ) ) : ?>
31
+
32
+ <a href="<?php echo $data['RMTitleLink']; ?>" target="<?php echo $data['RMTitleLoc']; ?>">
33
+
34
+ <?php endif; ?>
35
+
36
+ <?php echo $data['RMTitle']; ?>
37
+
38
+ <?php if( isset( $data['RMTitleLink'] ) && !empty( $data['RMTitleLink'] ) ) : ?>
39
+
40
+ </a>
41
+
42
+ <?php endif; ?>
43
+
44
+ </div>
45
+
46
+ <?php endif;
47
+
48
+ if( isset( $data['RMHtml'] ) && !empty( $data['RMHtml'] ) && $data['RMHtmlLoc'] == 'above' ) :
49
+ self::additionalContent( $data['RMHtml'] );
50
+ endif;
51
+
52
+ if( !$data['RMSearch'] && $data['RMSearchPos'] == 'above' ) :
53
+ self::searchBar();
54
+ endif;
55
+
56
+ /*
57
+ * Cache Menu to save Memory/Time
58
+ * Added 19/01/15 v2.3
59
+ */
60
+
61
+ echo RM_Transient::getTransientMenu( $data );
62
+
63
+ /* End Caching */
64
+
65
+ if( !$data['RMSearch'] && $data['RMSearchPos'] == 'below' ) :
66
+ self::searchBar();
67
+ endif;
68
+
69
+ if( isset( $data['RMHtml'] ) && !empty( $data['RMHtml'] ) && $data['RMHtmlLoc'] == 'below' ) :
70
+ self::additionalContent( $data['RMHtml'] );
71
+ endif;
72
+
73
+ ?>
74
+
75
+ </div>
autoload.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- spl_autoload_register( function( $class_name ) {
4
-
5
- $strip_namespace = str_replace( 'ResponsiveMenu\\', '', $class_name );
6
- $file_name = str_replace( '\\', '/', $strip_namespace );
7
-
8
- $file = __DIR__ . '/src/app/' . $file_name . '.php';
9
-
10
- if(file_exists($file))
11
- include $file;
12
-
13
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
public/export/export.xml ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" encoding="UTF-8"?><RMOptions><RM></RM><RMBreak>ODAw</RMBreak><RMDepth>Mg==</RMDepth><RMTop>MTA=</RMTop><RMRight>NQ==</RMRight><RMCss></RMCss><RMTitle>TWVudSBUaXRsZQ==</RMTitle><RMLineCol>I0ZGRkZGRg==</RMLineCol><RMClickBkg>IzAwMDAwMA==</RMClickBkg><RMClickTitle></RMClickTitle><RMBkgTran></RMBkgTran><RMFont></RMFont><RMPos></RMPos><RMImage></RMImage><RMWidth>NzU=</RMWidth><RMBkg>IzQzNDk0Qw==</RMBkg><RMBkgHov>IzNDM0MzQw==</RMBkgHov><RMTitleCol>I0ZGRkZGRg==</RMTitleCol><RMTextCol>I0ZGRkZGRg==</RMTextCol><RMBorCol>IzNDM0MzQw==</RMBorCol><RMTextColHov>I0ZGRkZGRg==</RMTextColHov><RMTitleColHov>I0ZGRkZGRg==</RMTitleColHov><RMAnim>b3ZlcmxheQ==</RMAnim><RMPushCSS></RMPushCSS><RMTitleBkg>IzQzNDk0Qw==</RMTitleBkg><RMFontSize>MTM=</RMFontSize><RMTitleSize>MTQ=</RMTitleSize><RMBtnSize>MTM=</RMBtnSize><RMCurBkg>IzQzNDk0Qw==</RMCurBkg><RMCurCol>I0ZGRkZGRg==</RMCurCol><RMAnimSpd>MC41</RMAnimSpd><RMTranSpd>MQ==</RMTranSpd><RMTxtAlign>bGVmdA==</RMTxtAlign><RMSearch></RMSearch><RMExpand></RMExpand><RMLinkHeight>MjA=</RMLinkHeight><RMExternal></RMExternal><RMSide>bGVmdA==</RMSide><RMFooter></RMFooter><RMClickImg></RMClickImg><RMMinify></RMMinify><RMClickClose></RMClickClose><RMRemImp></RMRemImp><RMX></RMX><RMMinWidth>MA==</RMMinWidth><RMMaxWidth>MA==</RMMaxWidth><RMExpandPar></RMExpandPar><RMIgnParCli></RMIgnParCli><RMCliToClo></RMCliToClo><RMSearchPos>YmVsb3c=</RMSearchPos><RMTitleLink></RMTitleLink><RMTitleLoc>X3NlbGY=</RMTitleLoc><RMHtml></RMHtml><RMHtmlLoc>Ym90dG9t</RMHtmlLoc><RMShortcode></RMShortcode><RMLineHeight>NQ==</RMLineHeight><RMLineWidth>MzM=</RMLineWidth><RMLineMargin>Ng==</RMLineMargin><RMClickImgClicked></RMClickImgClicked><RMAccordion></RMAccordion><RMArShpA>IiYjeDI1QjI7Ig==</RMArShpA><RMArShpI>IiYjeDI1QkM7Ig==</RMArShpI><RMArImgA></RMArImgA><RMArImgI></RMArImgI><RMTrigger>I2NsaWNrLW1lbnU=</RMTrigger><RMPushBtn></RMPushBtn><RMCurBkgHov>IzQzNDk0Qw==</RMCurBkgHov><RMCurColHov>I0ZGRkZGRg==</RMCurColHov><RMWalker></RMWalker><RMUseTran></RMUseTran><RMLoc>cmlnaHQ=</RMLoc><RMThemeLocation></RMThemeLocation><RMClickTitlePos>Ym90dG9t</RMClickTitlePos><RMClickTitleHeight>MTQ=</RMClickTitleHeight></RMOptions>
public/imgs/icon.png ADDED
Binary file
public/js/touch.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! jQuery Mobile v1.4.3 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
+
3
+ (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o)return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Responsive Menu ===
2
  Contributors: ResponsiveMenu
3
- Donate link: https://responsive.menu/donate
4
  Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, mobile, tablet, 3 lines, 3 line, three line, three lines
5
  Requires at least: 3.5.0
6
- Tested up to: 4.6
7
- Stable tag: 3.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,102 +12,98 @@ This is a Highly Customisable Responsive Menu Plugin for WordPress
12
 
13
  == Description ==
14
 
15
- This is a Highly Customisable Responsive Menu Plugin for WordPress, with over 120 customisable options giving you a combination of 14,000 options!
16
- <br /><br />
17
- **Requires PHP 5.4+**, please ensure you have this installed before upgrading.
18
- <br /><br />
19
- With this plugin, you can edit the following and more:
20
  <ul>
21
- <li>Menu Title</li>
22
- <li>Menu Title Image</li>
23
- <li>Button Title</li>
24
- <li>Button Title Image</li>
25
- <li>Menu To Responsify</li>
26
- <li>Media Query Breakpoint Width</li>
27
- <li>CSS Options For Hiding Specific Elements</li>
28
- <li>Menu Depth To Display</li>
29
- <li>Top Location</li>
30
- <li>Right Percentage Location</li>
31
- <li>Line & Text Colour</li>
32
- <li>Menu Button Background Colour</li>
33
- <li>Absolute and Fixed Positioning</li>
34
- <li>Menu Font</li>
35
- <li>Menu Title Colour</li>
36
- <li>Menu Title Hover Colour</li>
37
- <li>Menu Title Background Colour</li>
38
- <li>Menu Text Colour</li>
39
- <li>Menu Text Hover Colour</li>
40
- <li>Menu Background Colour</li>
41
- <li>Menu Link Background Hover Colour</li>
42
- <li>Menu Text Size</li>
43
- <li>Menu Button Text Size</li>
44
- <li>Menu Links Text Size</li>
45
- <li>Choose Overlay or Push Animations</li>
46
- <li>Slide Animation Speed</li>
47
- <li>Ability to auto expand/hide sub-menus</li>
48
- <li>Inclusion/Exclusion of Search Box</li>
49
- <li>Choice of Positioning of Search Box</li>
50
- <li>Transition speed</li>
51
- <li>Slide Animation Speed</li>
52
- <li>Menu Link Heights</li>
53
- <li>Text Alignment</li>
54
- <li>Choice of side to slide in from (left, right, top, bottom)</li>
55
- <li>Choice to use inline/external stylesheets and scripts</li>
56
- <li>Option to include JavaScript in footer</li>
57
- <li>Option to remove CSS !important tags</li>
58
- <li>Choice to Minify created CSS and JS files (saves up to 50% file space)</li>
59
- <li>Choice to auto-close menu items on click (for single page sites)</li>
60
- <li>Choice to replace 3 lines with an x on click</li>
61
- <li>Minimum width of menu</li>
62
- <li>Maximum width of menu</li>
63
- <li>Choice to Auto Expand Parent Links</li>
64
- <li>Choice to Ignore Clicks on Ancestor Links</li>
65
- <li>Choice to Close Menu Automatically on Page Clicks</li>
66
- <li>Choice to Specify Title Menu Link</li>
67
- <li>Choice to Specify Title Menu Link Location</li>
68
- <li>Ability to add custom HTML snippet inside the menu</li>
69
- <li>Choice of location for custom HTML snippet inside the menu</li>
70
- <li>Choice of using shortode or not</li>
71
- <li>Ability to change the 3 lines height</li>
72
- <li>Ability to change the 3 lines width</li>
73
- <li>Ability to Export Options</li>
74
- <li>Ability to Import Options</li>
75
- <li>Ability to set sub menu arrow shape/image Options</li>
76
- <li>Ability to set custom click trigger</li>
77
- <li>Ability to push menu button with animation</li>
78
- <li>Ability to change Current Page background hover colour</li>
79
- <li>Ability to change Current Page Link hover colour</li>
80
- <li>Ability to provide a custom walker option</li>
81
- <li>Ability to choose to use transient caching or not</li>
82
- <li>Ability to choose if menu is shown on left or right of screen</li>
83
- <li>Ability to set theme location menu</li>
84
- <li>Ability to reset to default</li>
85
- <li>Ability to set menu text location</li>
86
- <li>Ability to set menu text line height</li>
87
- <li>Plus more...</li>
88
  </ul>
89
- The plugin creates a nice three-lined mobile menu button (or custom image if you choose) that users can click on to bring a slide out menu (from the left, right, top or bottom - again your choice), which is easily navigated.
90
  <br /><br />
91
- It is fully responsive if you have the viewport meta tag on your site, using media queries with the widths defined by you. It can be used as a responsive menu, mobile menu, tablet menu or full dedicated menu for your main site.
92
  <br /><br />
93
- It requires no shortcodes (although you can use them) or fancy php code to be inserted by yourself making it very easy to install and you can design it to look exactly as you want to or leave it with its default values to have it looking amazing in just a matter of seconds.
94
  <br /><br />
95
  You have the choice to include the stylesheets and scripts inline to avoid adding any extra HTTP requests to your site or through external stylesheets created by the plug-in. Either way, the code added is extremely small (only a little jQuery and CSS) and there is even an option to minify the output if you wish saving a further 50% on file space.
96
  <br /><br />
97
  It also includes the following functionality:
98
  <ul>
99
- <li>WPML/Polylang Support</li>
100
- </ul>
101
- If you decide to go Pro then you will also get the following functionality:
102
- <ul>
103
- <li>FontIcon Support for individual menu items</li>
104
- <li>Button Animation Effects</li>
105
- <li>Colour Opacity option</li>
106
- <li>Header Bar</li>
107
- <li>Single Menu Option</li>
108
  </ul>
109
- For more reasons to go Pro, please visit <a target="_blank" href="https://responsive.menu/why-go-pro/">this page</a>.
110
- If you would like to see any other options added to the plugin or would like to help with translating the plugin into various languages then please email me or place them in a support ticket.
 
 
 
111
  <br />
112
 
113
  == Installation ==
@@ -126,15 +122,7 @@ Alternatively:
126
 
127
  == Frequently Asked Questions ==
128
 
129
- 1. Why do I get the error `Parse error: syntax error, unexpected '[' in /home/..../wp-content/plugins/responsive-menu/src/app/Routing/WpRouting.php on line 19`?
130
-
131
- This is due to your PHP version not being high enough, you need at least PHP 5.4 for the plugin to work.
132
-
133
- 2. I am getting a message similar to `Fatal error: Uncaught exception 'Exception' with message 'parse error: failed at $hamburger-layer-color: ;`, why?
134
-
135
- All you need to do is login to your WordPress admin, go to my plugin page and hit 'Update Options' to fix this.
136
-
137
- To view our whole FAQ, please go to https://responsive.menu/faq/
138
 
139
  == Screenshots ==
140
 
@@ -146,83 +134,6 @@ To view our whole FAQ, please go to https://responsive.menu/faq/
146
 
147
  == Changelog ==
148
 
149
- = 3.0.9 (2nd August 2016) =
150
- * **Requires PHP 5.4**
151
- * Added current item border colour option
152
- * Added current item border hover colour option
153
- * Apply title link to title image
154
- * Fixed transition bug with iPhone Safari iOS on links
155
- * Fixed Import option bug
156
- * Import native jquery-ui-core instead of externally
157
- * Minor bug fixes
158
-
159
- = 3.0.8 (25th July 2016) =
160
- * **Requires PHP 5.4**
161
- * Added placeholder search text colour option
162
- * Improved update process (no longer need to login to admin to trigger)
163
- * Bug fixes
164
-
165
- = 3.0.7 (22nd July 2016) =
166
- * **Requires PHP 5.4**
167
- * Added preview option - Pro only
168
- * Added search box text colour option
169
- * Added search box background colour option
170
- * Added search box border colour option
171
- * Fixed header bar bug with disabled scrolling - PRO
172
- * Fixed smooth scrolling issue on iOS with disabled scrolling - PRO
173
- * Added string translation to Search text
174
-
175
- = 3.0.6 (13th July 2016) =
176
- * **Requires PHP 5.4**
177
- * Improved Database Migration Scripts
178
- * Changed sub-arrows to only show border on left edge
179
- * Improved button title text spacing
180
- * Improved PHP version checking process
181
-
182
- = 3.0.5 (13th July 2016) =
183
- * **Requires PHP 5.4**
184
- * Fixed bug with push animation
185
- * Improved PHP version check functionality
186
- * Fixed issue where custom menu classes weren't being added
187
-
188
- = 3.0.4 (9th July 2016) =
189
- * **Requires PHP 5.4**
190
- * Fixed bug with overwriting values with shortcode
191
-
192
- = 3.0.3 (9th July 2016) =
193
- * **Requires PHP 5.4**
194
- * Fixed bug with custom trigger
195
- * Updated Polylang Support
196
- * Removed extend() function from Pimple Container as it was throwing security notices in VaultPress - thanks to Brin @ WinningWp.com
197
-
198
- = 3.0.2 (8th July 2016) =
199
- * **Requires PHP 5.4**
200
- * Fixed issue with close on link click option
201
- * Improved database migration scripts
202
- * Updated default button size
203
- * Improved License Checks (Pro)
204
- * Removed tab memory (too resource intensive)
205
- * Fixed Query Monitor "IF" error - thanks to KTS915
206
- * Bug fixes
207
-
208
- = 3.0.1 (7th July 2016) =
209
- * **Requires PHP 5.4**
210
- * Initial Bug Fixes
211
- * Catch non-updated option errors
212
- * Those using under PHP 5.4 will not crash their site but deactivate
213
- * License Key Checking Fixed (Pro)
214
-
215
- = 3.0.0 (5th July 2016) =
216
- * **Requires PHP 5.4** - Please ensure you have it installed to work
217
- * Version 3 released!
218
- * Please login to your admin and hit 'Update Options' upon installing on all sites
219
- * Awesome FontIcon integration
220
- * Much Smoother Animations
221
- * Button Animations
222
- * And much, much more
223
- * Many bug fixes
224
- * Completely re-written from the ground up
225
-
226
  = 2.8.9 (17th June 2016) =
227
  * Last Version 2 release with beta notice
228
 
@@ -435,9 +346,3 @@ To view our whole FAQ, please go to https://responsive.menu/faq/
435
  * Initial Version Released.
436
 
437
  == Upgrade Notice ==
438
-
439
- = 2.8.9 =
440
- Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
441
-
442
- = 2.8.8 =
443
- Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
1
  === Responsive Menu ===
2
  Contributors: ResponsiveMenu
3
+ Donate link: http://responsive.menu/donate/
4
  Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, mobile, tablet, 3 lines, 3 line, three line, three lines
5
  Requires at least: 3.5.0
6
+ Tested up to: 4.5
7
+ Stable tag: 2.8.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ This is a Highly Customisable Responsive Menu Plugin for WordPress, with 70 customisable options for a nice mobile menu or tablet menu experience enabling you to change the:
16
+ <br />
 
 
 
17
  <ul>
18
+ <li> - Menu Title</li>
19
+ <li> - Menu Title Image</li>
20
+ <li> - Button Title</li>
21
+ <li> - Button Title Image</li>
22
+ <li> - Menu To Responsify</li>
23
+ <li> - Media Query Breakpoint Width</li>
24
+ <li> - CSS Options For Hiding Specific Elements</li>
25
+ <li> - Menu Depth To Display</li>
26
+ <li> - Top Location</li>
27
+ <li> - Right Percentage Location</li>
28
+ <li> - Line & Text Colour</li>
29
+ <li> - Menu Button Background Colour</li>
30
+ <li> - Absolute and Fixed Positioning</li>
31
+ <li> - Menu Font</li>
32
+ <li> - Menu Title Colour</li>
33
+ <li> - Menu Title Hover Colour</li>
34
+ <li> - Menu Title Background Colour</li>
35
+ <li> - Menu Text Colour</li>
36
+ <li> - Menu Text Hover Colour</li>
37
+ <li> - Menu Background Colour</li>
38
+ <li> - Menu Link Background Hover Colour</li>
39
+ <li> - Menu Text Size</li>
40
+ <li> - Menu Button Text Size</li>
41
+ <li> - Menu Links Text Size</li>
42
+ <li> - Choose Overlay or Push Animations</li>
43
+ <li> - Slide Animation Speed</li>
44
+ <li> - Ability to auto expand/hide sub-menus</li>
45
+ <li> - Inclusion/Exclusion of Search Box</li>
46
+ <li> - Choice of Positioning of Search Box</li>
47
+ <li> - Transition speed</li>
48
+ <li> - Slide Animation Speed</li>
49
+ <li> - Menu Link Heights</li>
50
+ <li> - Text Alignment</li>
51
+ <li> - Choice of side to slide in from (left, right, top, bottom)</li>
52
+ <li> - Choice to use inline/external stylesheets and scripts</li>
53
+ <li> - Option to include JavaScript in footer</li>
54
+ <li> - Option to remove CSS !important tags</li>
55
+ <li> - Choice to Minify created CSS and JS files (saves up to 50% file space)</li>
56
+ <li> - Choice to auto-close menu items on click (for single page sites)</li>
57
+ <li> - Choice to replace 3 lines with an x on click</li>
58
+ <li> - Minimum width of menu</li>
59
+ <li> - Maximum width of menu</li>
60
+ <li> - Choice to Auto Expand Parent Links</li>
61
+ <li> - Choice to Ignore Clicks on Ancestor Links</li>
62
+ <li> - Choice to Close Menu Automatically on Page Clicks</li>
63
+ <li> - Choice to Specify Title Menu Link</li>
64
+ <li> - Choice to Specify Title Menu Link Location</li>
65
+ <li> - Ability to add custom HTML snippet inside the menu</li>
66
+ <li> - Choice of location for custom HTML snippet inside the menu</li>
67
+ <li> - Choice of using shortode or not</li>
68
+ <li> - Ability to change the 3 lines height</li>
69
+ <li> - Ability to change the 3 lines width</li>
70
+ <li> - Ability to Export Options</li>
71
+ <li> - Ability to Import Options</li>
72
+ <li> - Ability to set sub menu arrow shape/image Options</li>
73
+ <li> - Ability to set custom click trigger</li>
74
+ <li> - Ability to push menu button with animation</li>
75
+ <li> - Ability to change Current Page background hover colour</li>
76
+ <li> - Ability to change Current Page Link hover colour</li>
77
+ <li> - Ability to provide a custom walker option</li>
78
+ <li> - Ability to choose to use transient caching or not</li>
79
+ <li> - Ability to choose if menu is shown on left or right of screen</li>
80
+ <li> - Ability to set theme location menu</li>
81
+ <li> - Ability to reset to default</li>
82
+ <li> - Ability to set menu text location</li>
83
+ <li> - Ability to set menu text line height</li>
84
+ <li> - Plus more...</li>
85
  </ul>
86
+ The plugin creates a nice three-lined mobile menu button (or custom image if you choose) that users can click to bring a slide out menu (from the left, right, top or bottom - again your choice), which is easily navigated. A lot nicer and neater than the select drop-down menu alternative.
87
  <br /><br />
88
+ The plugin is fully responsive if you have the viewport meta tag on your site, using media queries with the widths defined by you. It can be used as a responsive menu, mobile menu, tablet menu or full dedicated menu for your main site.
89
  <br /><br />
90
+ It requires no shortcodes (although you can use them) or fancy php code to be inserted by yourself making it very easy to install, with 70 customisable options, you can get it to look exactly as you want it to or leave it with its default values to have it looking amazing in just a matter of seconds.
91
  <br /><br />
92
  You have the choice to include the stylesheets and scripts inline to avoid adding any extra HTTP requests to your site or through external stylesheets created by the plug-in. Either way, the code added is extremely small (only a little jQuery and CSS) and there is even an option to minify the output if you wish saving a further 50% on file space.
93
  <br /><br />
94
  It also includes the following functionality:
95
  <ul>
96
+ <li> - WPML/Polylang Support</li>
97
+ <li> - Transient Caching to serious increase load speed</li>
98
+ <li> - Croatian translation - Massive thanks to <a href="https://www.facebook.com/pages/Neverone-design/490262371018076">Neverone Design</a> for this!</li>
99
+ <li> - Spanish Translation - Massive thanks to Andrew @ <a href="http://www.webhostinghub.com">WebHostingHub</a> for this!</li>
100
+ <li> - Dutch Translation - Massive thanks to Carlo @ <a href="http://www.quinex.nl/">Quinex</a> for this!</li>
 
 
 
 
101
  </ul>
102
+ Please see the current development list on the below page:
103
+
104
+ <a href="http://responsive.menu/development-list/">Development List</a>
105
+
106
+ If you would like to see any other options added to the plugin or would like to help with translating the plugin into various versions then please email me or place them in a support ticket.
107
  <br />
108
 
109
  == Installation ==
122
 
123
  == Frequently Asked Questions ==
124
 
125
+ <a target="_blank" href="http://responsive.menu/faq/">http://responsive.menu/faq/</a>
 
 
 
 
 
 
 
 
126
 
127
  == Screenshots ==
128
 
134
 
135
  == Changelog ==
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  = 2.8.9 (17th June 2016) =
138
  * Last Version 2 release with beta notice
139
 
346
  * Initial Version Released.
347
 
348
  == Upgrade Notice ==
 
 
 
 
 
 
responsive-menu.php CHANGED
@@ -1,72 +1,36 @@
1
- <?php
2
-
3
- /*
4
- Plugin Name: Responsive Menu
5
- Plugin URI: https://responsive.menu
6
- Description: Highly Customisable Responsive Menu Plugin for WordPress
7
- Version: 3.0.9
8
- Author: Responsive Menu
9
- Text Domain: responsive-menu
10
- Author URI: https://responsive.menu
11
- License: GPL2
12
- Tags: responsive, menu, responsive menu
13
- */
14
-
15
- /* Check correct PHP version first */
16
- add_action('admin_init', 'check_responsive_menu_php_version');
17
- function check_responsive_menu_php_version() {
18
- if(version_compare(PHP_VERSION, '5.4', '<')):
19
- add_action('admin_notices', 'responsive_menu_deactivation_text');
20
- deactivate_plugins(plugin_basename(__FILE__));
21
- endif;
22
- }
23
-
24
- function responsive_menu_deactivation_text() {
25
- echo '<div class="error"><p>' . sprintf(__('Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. You are still on %s.%sPlease speak to your webhost about upgrading your PHP version. For more information please visit %s', 'responsive-menu'), PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>';
26
- }
27
-
28
- if(version_compare(PHP_VERSION, '5.4', '<'))
29
- return;
30
-
31
- /* Required includes for plugin to function */
32
- include dirname(__FILE__) . '/autoload.php';
33
- include dirname(__FILE__) . '/src/config/route_dependencies.php';
34
-
35
- /* Internationalise the plugin */
36
- add_action('plugins_loaded', function() {
37
- load_plugin_textdomain('responsive-menu', false, basename(dirname(__FILE__)) . '/translations/');
38
- });
39
-
40
- /* Route the plugin */
41
- $wp_router = new ResponsiveMenu\Routing\WpRouting($container);
42
- $wp_router->route();
43
-
44
- /*
45
- * Initial Migration and Version Check synchronisation */
46
- add_action('init', function() use($container) {
47
- $migration = $container['migration'];
48
- $migration->setup();
49
- $migration->synchronise();
50
- });
51
-
52
- if(is_admin()):
53
-
54
- /*
55
- Polylang Integration Section */
56
- add_action('plugins_loaded', function() use($container) {
57
- if(function_exists('pll_register_string')):
58
- $service = $container['option_service'];
59
- $options = $service->all();
60
-
61
- $menu_to_use = isset($options['menu_to_use']) ? $options['menu_to_use']->getValue() : '';
62
- $button_title = isset($options['button_title']) ? $options['button_title']->getValue() : '';
63
- $menu_title = isset($options['menu_title']) ? $options['menu_title']->getValue() : '';
64
- $menu_title_link = isset($options['menu_title_link']) ? $options['menu_title_link']->getValue() : '';
65
-
66
- pll_register_string('Menu Slug', $menu_to_use, 'Responsive Menu');
67
- pll_register_string('Button Title', $button_title, 'Responsive Menu');
68
- pll_register_string('Menu Title', $menu_title, 'Responsive Menu');
69
- pll_register_string('Menu Title Link', $menu_title_link, 'Responsive Menu');
70
- endif;
71
- });
72
- endif;
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: Responsive Menu
5
+ Plugin URI: http://responsive.menu
6
+ Description: Highly Customisable Responsive Menu Plugin for WordPress
7
+ Version: 2.8.9
8
+ Author: Responsive Menu
9
+ Text Domain: responsive-menu
10
+ Author URI: http://responsive.menu
11
+ License: GPL2
12
+ Tags: responsive, menu, responsive menu
13
+
14
+ |--------------------------------------------------------------------------
15
+ | Bootstrap The Application
16
+ |--------------------------------------------------------------------------
17
+ |
18
+ | This bootstraps the Responsive Menu and gets it ready for use, then it
19
+ | will load up the Responsive Menu application so that we can run it.
20
+ |
21
+ */
22
+
23
+ require_once dirname( __FILE__ ) . '/app/bootstrap.php';
24
+
25
+ /*
26
+ |--------------------------------------------------------------------------
27
+ | Run The Application
28
+ |--------------------------------------------------------------------------
29
+ |
30
+ | Once we have the application, we can simply call the run method,
31
+ | which will setup everything we need to display the Responsive Menu
32
+ | straight out the box with no extra customisation needed.
33
+ |
34
+ */
35
+
36
+ $app->run();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Collections/OptionsCollection.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Collections;
4
- use ResponsiveMenu\Models\Option as Option;
5
-
6
- class OptionsCollection implements \ArrayAccess {
7
-
8
- private $options;
9
-
10
- public function add(Option $option) {
11
- $this->options[$option->getName()] = $option;
12
- }
13
-
14
- public function get($name) {
15
- return $this->options[$name];
16
- }
17
-
18
- public function all() {
19
- return $this->options;
20
- }
21
-
22
- public function usesFontIcons() {
23
- return false;
24
- }
25
-
26
- public function getActiveArrow() {
27
- if($this->options['active_arrow_image'] && $this->options['active_arrow_image']->getValue())
28
- return '<img src="' . $this->options['active_arrow_image'] .'" />';
29
- else
30
- return $this->options['active_arrow_shape'];
31
-
32
- }
33
-
34
- public function getInActiveArrow() {
35
- if($this->options['inactive_arrow_image'] && $this->options['inactive_arrow_image']->getValue())
36
- return '<img src="' . $this->options['inactive_arrow_image'] .'" />';
37
- else
38
- return $this->options['inactive_arrow_shape'];
39
-
40
- }
41
-
42
- public function getTitleImage() {
43
- if($this->options['menu_title_image'] && $this->options['menu_title_image']->getValue())
44
- return '<img src="' . $this->options['menu_title_image'] .'" />';
45
- else
46
- return null;
47
-
48
- }
49
-
50
- public function getButtonIcon() {
51
- if($this->options['button_image'] && $this->options['button_image']->getValue())
52
- return '<img src="' . $this->options['button_image'] .'" class="responsive-menu-button-icon responsive-menu-button-icon-active" />';
53
- else
54
- return '<span class="responsive-menu-inner"></span>';
55
- }
56
-
57
- public function getButtonIconActive() {
58
- if($this->options['button_image'] && $this->options['button_image']->getValue())
59
- return '<img src="' . $this->options['button_image_when_clicked'] .'" class=" responsive-menu-button-icon responsive-menu-button-icon-inactive" />';
60
- }
61
-
62
- public function offsetExists($offset) {
63
- return array_key_exists($offset, $this->options);
64
- }
65
-
66
- public function offsetGet($offset) {
67
- return isset($this->options[$offset]) ? $this->options[$offset] : null;
68
- }
69
-
70
- public function offsetSet($offset, $value) {
71
- if(isset($this->options[$offset]))
72
- $this->options[$offset]->setValue($value);
73
- }
74
-
75
- public function offsetUnset($offset) {
76
- if(isset($this->options[$offset]))
77
- unset($this->options[$offset]);
78
- }
79
-
80
- public function isEmpty() {
81
- return isset($this->options) && count($this->options) > 0 ? false : true;
82
- }
83
-
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Controllers/Admin.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Controllers;
4
- use ResponsiveMenu\View\View as View;
5
- use ResponsiveMenu\Services\OptionService as OptionService;
6
-
7
- class Admin {
8
-
9
- public function __construct(OptionService $service, View $view) {
10
- $this->service = $service;
11
- $this->view = $view;
12
- }
13
-
14
- public function update($default_options, $new_options) {
15
- $this->view->render('main', [
16
- 'options' => $this->service->updateOptions(array_merge($default_options, array_filter($new_options))),
17
- 'flash' => ['success' => __('Responsive Menu Options Updated Successfully', 'responsive-menu')]
18
- ]);
19
- }
20
-
21
- public function reset($default_options) {
22
- $this->view->render('main', [
23
- 'options' => $this->service->updateOptions($default_options),
24
- 'flash' => ['success' => __('Responsive Menu Options Reset Successfully', 'responsive-menu')]
25
- ]);
26
- }
27
-
28
- public function index() {
29
- $this->view->render('main', ['options' => $this->service->all()]);
30
- }
31
-
32
- public function import($default_options, $file) {
33
- if(!empty($file['tmp_name'])):
34
- $file = file_get_contents($file['tmp_name']);
35
- $decoded = (array) json_decode($file);
36
- $options = $this->service->updateOptions(array_merge($default_options, array_filter($decoded)));
37
- $flash['success'] = __('Responsive Menu Options Reset Successfully', 'responsive-menu');
38
- else:
39
- $flash['errors'][] = __('No file selected', 'responsive-menu');
40
- $options = $this->service->all();
41
- endif;
42
-
43
- $this->view->render('main', ['options' => $options, 'flash' => $flash]);
44
- }
45
-
46
- public function export() {
47
- nocache_headers();
48
- header( 'Content-Type: application/json; charset=utf-8' );
49
- header( 'Content-Disposition: attachment; filename=export.json' );
50
- header( "Expires: 0" );
51
- $final = [];
52
- foreach($this->service->all()->all() as $option)
53
- $final[$option->getName()] = $option->getValue();
54
- echo json_encode($final);
55
- exit();
56
- }
57
-
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Controllers/Front.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Controllers;
4
- use ResponsiveMenu\View\View as View;
5
- use ResponsiveMenu\Services\OptionService as OptionService;
6
- use ResponsiveMenu\ViewModels\Menu as MenuViewModel;
7
- use ResponsiveMenu\ViewModels\Button as ButtonViewModel;
8
- use ResponsiveMenu\Factories\FrontDisplayFactory as DisplayFactory;
9
-
10
- class Front {
11
-
12
- public function __construct(OptionService $service, View $view) {
13
- $this->service = $service;
14
- $this->view = $view;
15
- }
16
-
17
- public function index() {
18
- # Get Latest Options
19
- $options = $this->service->all();
20
-
21
- # This needs refactoring - Martin Fowler HELP!
22
- $display_factory = new DisplayFactory();
23
- $display_factory->build($options);
24
-
25
- # Build Our Menu Display
26
- $menu = new MenuViewModel($options);
27
- $html = new ButtonViewModel($options);
28
-
29
- # Only render if we don't have shortcodes turned on
30
- if($options['shortcode'] == 'off'):
31
- $this->view->render('button', ['options' => $options, 'button' => $html->getHtml()]);
32
- $this->view->render('menu', ['options' => $options, 'menu' => $menu->getHtml()]);
33
- else:
34
- add_shortcode('responsive_menu', function($atts) use($options, $html, $menu) {
35
-
36
- if($atts)
37
- array_walk($atts, function($a, $b) use ($options) { $options[$b] = $a; });
38
-
39
- $html = $this->view->make('button', ['options' => $options, 'button' => $html->getHtml()]);
40
-
41
- return $html . $this->view->make('menu', ['options' => $options, 'menu' => $menu->getHtml()]);
42
-
43
- });
44
- endif;
45
-
46
- }
47
-
48
- public function preview() {
49
- # Get Latest Options
50
- $options = $this->service->all();
51
-
52
- # This needs refactoring - Martin Fowler HELP!
53
- $display_factory = new DisplayFactory();
54
- $display_factory->build($options);
55
-
56
- # Build Our Menu Display
57
- $menu = new MenuViewModel($options);
58
- $html = new ButtonViewModel($options);
59
-
60
- $this->view->render('preview');
61
-
62
- # Only render if we don't have shortcodes turned on
63
- if($options['shortcode'] == 'off'):
64
- $this->view->render('button', ['options' => $options, 'button' => $html->getHtml()]);
65
- $this->view->render('menu', ['options' => $options, 'menu' => $menu->getHtml()]);
66
- else:
67
- add_shortcode('responsive_menu', function($atts) use($options, $html, $menu) {
68
-
69
- if($atts)
70
- array_walk($atts, function($a, $b) use ($options) { $options[$b] = $a; });
71
-
72
- $html = $this->view->make('button', ['options' => $options, 'button' => $html->getHtml()]);
73
-
74
- return $html . $this->view->make('menu', ['options' => $options, 'menu' => $menu->getHtml()]);
75
-
76
- });
77
- endif;
78
-
79
- }
80
-
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Database/Database.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Database;
4
-
5
- interface Database {
6
- public function update($table, array $to_update, array $where);
7
- public function delete($table, $name);
8
- public function all($table);
9
- public function insert($table, array $arguments);
10
- }
 
 
 
 
 
 
 
 
 
 
src/app/Database/Migration.php DELETED
@@ -1,204 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Database;
4
- use ResponsiveMenu\Collections\OptionsCollection as OptionsCollection;
5
- use ResponsiveMenu\Database\Database as Database;
6
- use ResponsiveMenu\Services\OptionService as OptionService;
7
-
8
- class Migration {
9
-
10
- protected $db;
11
-
12
- protected $current_version;
13
- protected $old_version;
14
- protected $old_options;
15
- protected $defaults;
16
-
17
- protected static $table = 'responsive_menu';
18
- protected static $version_var = 'RMVer';
19
-
20
- public function __construct(Database $db, OptionService $service, $defaults, $current_version, $old_version, $old_options) {
21
- $this->db = $db;
22
- $this->service = $service;
23
- $this->defaults = $defaults;
24
- $this->current_version = $current_version;
25
- $this->old_version = $old_version;
26
- $this->old_options = $old_options;
27
- }
28
-
29
- public function addNewOptions() {
30
- $options = $this->service->all();
31
- if($options->isEmpty())
32
- $this->service->createOptions($this->defaults);
33
- else
34
- $this->service->createOptions($this->getNewOptions($options));
35
- }
36
-
37
- public function tidyUpOptions() {
38
- foreach($this->getOptionsToDelete() as $delete)
39
- $this->db->delete(self::$table, array('name' => $delete));
40
- }
41
-
42
- public function getNewOptions(OptionsCollection $options) {
43
- $current = [];
44
- foreach($options->all() as $converted)
45
- $current[$converted->getName()] = $converted->getValue();
46
- return array_diff_key($this->defaults, $current);
47
- }
48
-
49
- /*
50
- Can't be tested :-( */
51
- public function setup() {
52
- # Create the database table if it doesn't exist
53
- if(!$this->isVersion3()):
54
- $sql = "CREATE TABLE " . $this->db->getPrefix() . self::$table . " (
55
- name varchar(50) NOT NULL,
56
- value varchar(5000) DEFAULT NULL,
57
- created_at datetime NOT NULL,
58
- updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
59
- PRIMARY KEY (name)
60
- ) " . $this->db->getCharset() . ";";
61
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php' );
62
- dbDelta($sql);
63
- $this->synchronise();
64
- endif;
65
- }
66
-
67
- public function synchronise() {
68
-
69
- # First Thing we need to do is migrate any old options
70
- if($this->old_options && !$this->isVersion3())
71
- $this->migrateVersion2Options();
72
-
73
- if($this->needsUpdate()):
74
-
75
- # Now we can add any new options
76
- $this->addNewOptions();
77
-
78
- # Finally delete any that are no longer used
79
- $this->tidyUpOptions();
80
-
81
- # And Update Version
82
- $this->updateVersion();
83
-
84
- endif;
85
-
86
- }
87
-
88
- public function needsUpdate() {
89
- return version_compare($this->old_version, $this->current_version, '<');
90
- }
91
-
92
- protected function updateVersion() {
93
- update_option(self::$version_var, $this->current_version);
94
- $this->old_version = $this->current_version;
95
- }
96
-
97
- public function isVersion3() {
98
- return substr($this->old_version, 0, 1) == 3;
99
- }
100
-
101
- public function migrateVersion2Options() {
102
- $this->service->createOptions($this->getMigratedOptions());
103
- $this->addNewOptions();
104
- $this->updateVersion();
105
- }
106
-
107
- public function getOptionsToDelete() {
108
- return array_diff(
109
- array_map(function($a) { return $a->getName(); }, $this->service->all()->all()),
110
- array_keys($this->defaults)
111
- );
112
- }
113
-
114
- public function getMigratedOptions() {
115
- $old_options = $this->old_options;
116
-
117
- $new_options = [
118
- 'menu_to_use' => $old_options['RM'] ? $old_options['RM'] : '',
119
- 'breakpoint' => $old_options['RMBreak'] ? $old_options['RMBreak'] : '',
120
- 'menu_depth' => $old_options['RMDepth'] ? $old_options['RMDepth'] : '',
121
- 'button_top' => $old_options['RMTop'] ? $old_options['RMTop'] : '',
122
- 'button_distance_from_side' => $old_options['RMRight'] ? $old_options['RMRight'] : '',
123
- 'menu_to_hide' => $old_options['RMCss'] ? $old_options['RMCss'] : '',
124
- 'menu_title' => $old_options['RMTitle'] ? $old_options['RMTitle'] : '',
125
- 'button_line_colour' => $old_options['RMLineCol'] ? $old_options['RMLineCol'] : '',
126
- 'button_background_colour' => $old_options['RMClickBkg'] ? $old_options['RMClickBkg'] : '',
127
- 'button_title' => $old_options['RMClickTitle'] ? $old_options['RMClickTitle'] : '',
128
- 'button_transparent_background' => $old_options['RMBkgTran'] ? 'on' : '',
129
- 'menu_font' => $old_options['RMFont'] ? $old_options['RMFont'] : '',
130
- 'button_position_type' => $old_options['RMPos'] ? 'fixed' : '',
131
- 'menu_title_image' => $old_options['RMImage'] ? $old_options['RMImage'] : '',
132
- 'menu_width' => $old_options['RMWidth'] ? $old_options['RMWidth'] : '',
133
- 'menu_item_background_colour' => $old_options['RMBkg'] ? $old_options['RMBkg'] : '',
134
- 'menu_background_colour' => $old_options['RMBkg'] ? $old_options['RMBkg'] : '',
135
- 'menu_sub_arrow_background_colour' => $old_options['RMBkg'] ? $old_options['RMBkg'] : '',
136
- 'menu_item_background_hover_colour' => $old_options['RMBkgHov'] ? $old_options['RMBkgHov'] : '',
137
- 'menu_sub_arrow_background_hover_colour' => $old_options['RMBkgHov'] ? $old_options['RMBkgHov'] : '',
138
- 'menu_title_colour' => $old_options['RMTitleCol'] ? $old_options['RMTitleCol'] : '',
139
- 'menu_link_colour' => $old_options['RMTextCol'] ? $old_options['RMTextCol'] : '',
140
- 'menu_sub_arrow_shape_colour' => $old_options['RMTextCol'] ? $old_options['RMTextCol'] : '',
141
- 'menu_item_border_colour' => $old_options['RMBorCol'] ? $old_options['RMBorCol'] : '',
142
- 'menu_item_border_colour_hover' => $old_options['RMBorCol'] ? $old_options['RMBorCol'] : '',
143
- 'menu_sub_arrow_border_colour' => $old_options['RMBorCol'] ? $old_options['RMBorCol'] : '',
144
- 'menu_sub_arrow_border_hover_colour' => $old_options['RMBorCol'] ? $old_options['RMBorCol'] : '',
145
- 'menu_link_hover_colour' => $old_options['RMTextColHov'] ? $old_options['RMTextColHov'] : '',
146
- 'menu_sub_arrow_shape_hover_colour' => $old_options['RMTextColHov'] ? $old_options['RMTextColHov'] : '',
147
- 'menu_title_hover_colour' => $old_options['RMTitleColHov'] ? $old_options['RMTitleColHov'] : '',
148
- 'animation_type' => $old_options['RMAnim'] == 'push' ? 'push' : '',
149
- 'page_wrapper' => $old_options['RMPushCSS'] ? $old_options['RMPushCSS'] : '',
150
- 'menu_title_background_colour' => $old_options['RMTitleBkg'] ? $old_options['RMTitleBkg'] : '',
151
- 'menu_title_background_hover_colour' => $old_options['RMTitleBkg'] ? $old_options['RMTitleBkg'] : '',
152
- 'menu_font_size' => $old_options['RMFontSize'] ? $old_options['RMFontSize'] : '',
153
- 'menu_title_font_size' => $old_options['RMTitleSize'] ? $old_options['RMTitleSize'] : '',
154
- 'button_font_size' => $old_options['RMBtnSize'] ? $old_options['RMBtnSize'] : '',
155
- 'menu_current_item_background_colour' => $old_options['RMCurBkg'] ? $old_options['RMCurBkg'] : '',
156
- 'menu_current_link_colour' => $old_options['RMCurCol'] ? $old_options['RMCurCol'] : '',
157
- 'animation_speed' => $old_options['RMAnimSpd'] ? $old_options['RMAnimSpd'] : '',
158
- 'transition_speed' => $old_options['RMTranSpd'] ? $old_options['RMTranSpd'] : '',
159
- 'menu_text_alignment' => $old_options['RMTxtAlign'] ? $old_options['RMTxtAlign'] : '',
160
- 'auto_expand_all_submenus' => $old_options['RMExpand'] ? 'on' : '',
161
- 'menu_links_height' => $old_options['RMLinkHeight'] ? $old_options['RMLinkHeight'] + 24 : '',
162
- 'submenu_arrow_height' => $old_options['RMLinkHeight'] ? $old_options['RMLinkHeight'] + 24 : '',
163
- 'submenu_arrow_width' => $old_options['RMLinkHeight'] ? $old_options['RMLinkHeight'] + 24 : '',
164
- 'external_files' => $old_options['RMExternal'] ? 'on' : '',
165
- 'menu_appear_from' => $old_options['RMSide'] ? $old_options['RMSide'] : '',
166
- 'scripts_in_footer' => $old_options['RMFooter'] ? 'on' : '',
167
- 'button_image' => $old_options['RMClickImg'] ? $old_options['RMClickImg'] : '',
168
- 'minify_scripts' => $old_options['RMMinify'] ? 'on' : '',
169
- 'menu_close_on_link_click' => $old_options['RMClickClose'] ? 'on' : '',
170
- 'menu_minimum_width' => $old_options['RMMinWidth'] ? $old_options['RMMinWidth'] : '',
171
- 'menu_maximum_width' => $old_options['RMMaxWidth'] ? $old_options['RMMaxWidth'] : '',
172
- 'auto_expand_current_submenus' => $old_options['RMExpandPar'] ? 'on' : '',
173
- 'menu_item_click_to_trigger_submenu' => $old_options['RMIgnParCli'] ? 'on' : '',
174
- 'menu_close_on_body_click' => $old_options['RMCliToClo'] ? 'on' : '',
175
- 'menu_title_link' => $old_options['RMTitleLink'] ? $old_options['RMTitleLink'] : '',
176
- 'menu_additional_content' => $old_options['RMHtml'] ? $old_options['RMHtml'] : '',
177
- 'shortcode' => $old_options['RMShortcode'] ? 'on' : '',
178
- 'button_line_height' => $old_options['RMLineHeight'] ? $old_options['RMLineHeight'] : '',
179
- 'button_line_width' => $old_options['RMLineWidth'] ? $old_options['RMLineWidth'] : '',
180
- 'button_line_margin' => $old_options['RMLineMargin'] ? $old_options['RMLineMargin'] : '',
181
- 'button_image_when_clicked' => $old_options['RMClickImgClicked'] ? $old_options['RMClickImgClicked'] : '',
182
- 'accordion_animation' => $old_options['RMAccordion'] ? 'on' : '',
183
- 'active_arrow_shape' => $old_options['RMArShpA'] ? json_decode($old_options['RMArShpA']) : '',
184
- 'inactive_arrow_shape' => $old_options['RMArShpI'] ? json_decode($old_options['RMArShpI']) : '',
185
- 'active_arrow_image' => $old_options['RMArImgA'] ? $old_options['RMArImgA'] : '',
186
- 'inactive_arrow_image' => $old_options['RMArImgI'] ? $old_options['RMArImgI'] : '',
187
- 'button_push_with_animation' => $old_options['RMPushBtn'] ? 'on' : '',
188
- 'menu_current_item_background_hover_colour' => $old_options['RMCurBkgHov'] ? $old_options['RMCurBkgHov'] : '',
189
- 'menu_current_link_hover_colour' => $old_options['RMCurColHov'] ? $old_options['RMCurColHov'] : '',
190
- 'custom_walker' => $old_options['RMWalker'] ? $old_options['RMWalker'] : '',
191
- 'button_left_or_right' => $old_options['RMLoc'] ? $old_options['RMLoc'] : '',
192
- 'theme_location_menu' => $old_options['RMThemeLocation'] ? $old_options['RMThemeLocation'] : '',
193
- 'button_title_position' => $old_options['RMClickTitlePos'] ? $old_options['RMClickTitlePos'] : '',
194
- ];
195
-
196
- $to_save = [];
197
-
198
- foreach(array_filter($new_options) as $key => $val)
199
- $to_save[$key] = $val;
200
-
201
- return $to_save;
202
- }
203
-
204
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Database/WpDatabase.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Database;
4
-
5
- class WpDatabase implements Database {
6
-
7
- public function __construct() {
8
- global $wpdb;
9
- $this->db = $wpdb;
10
- }
11
-
12
- public function update($table, array $to_update, array $where) {
13
- $this->db->update($this->db->prefix . $table, $to_update, $where);
14
- }
15
-
16
- public function delete($table, $name) {
17
- $this->db->delete($this->db->prefix . $table, $name);
18
- }
19
-
20
- public function all($table) {
21
- return $this->db->get_results("SELECT * FROM {$this->db->prefix}{$table}");
22
- }
23
-
24
- public function insert($table, array $arguments) {
25
- $arguments['created_at'] = current_time('mysql');
26
- $this->db->insert($this->db->prefix . $table, $arguments);
27
- }
28
-
29
- public function select($table, $column, $value) {
30
- return $this->db->get_results("SELECT * FROM {$this->prexix}{$table} WHERE $column = '$value';");
31
- }
32
-
33
- public function getPrefix() {
34
- return $this->db->prefix;
35
- }
36
-
37
- public function getCharset() {
38
- return $this->db->get_charset_collate();
39
- }
40
-
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Factories/AdminSaveFactory.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Factories;
4
- use ResponsiveMenu\Filesystem\FileCreator as FileCreator;
5
- use ResponsiveMenu\Factories\CssFactory as CssFactory;
6
- use ResponsiveMenu\Factories\JsFactory as JsFactory;
7
- use ResponsiveMenu\Collections\OptionsCollection as OptionsCollection;
8
-
9
- class AdminSaveFactory {
10
-
11
- public function build(OptionsCollection $options) {
12
-
13
- $flash = [];
14
-
15
- $css_factory = new CssFactory;
16
- $js_factory = new JsFactory;
17
- $file_creator = new FileCreator;
18
-
19
- # Create Data Folders if They don't exist
20
- $data_folder_dir = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/responsive-menu-data';
21
- $js_folder = $data_folder_dir . '/js';
22
- $css_folder = $data_folder_dir . '/css';
23
- if($options['external_files'] == 'on' && !is_dir($data_folder_dir)):
24
- if(!mkdir($data_folder_dir)) $flash['errors'][] = __('Unable to make data directory', 'responsive-menu');
25
- if(!mkdir($css_folder)) $flass['errors'][] = __('Unable to make CSS data directory', 'responsive-menu');
26
- if(!mkdir($js_folder)) $flash['errors'][] = __('Unable to make JS data directory', 'responsive-menu');
27
- endif;
28
-
29
- $css = $css_factory->build($options);
30
- $js = $js_factory->build($options);
31
-
32
- if(!$file_creator->createCssFile($css_folder, 'responsive-menu-' . get_current_blog_id() . '.css', $css))
33
- $flash['errors'][] = __('Unable to create CSS file', 'responsive-menu');
34
-
35
- if(!$file_creator->createJsFile($js_folder, 'responsive-menu-' . get_current_blog_id() . '.js', $js))
36
- $flash['errors'][] = __('Unable to create JS file', 'responsive-menu');
37
-
38
- return empty($flash) ? null : $flash;
39
-
40
- }
41
-
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Factories/CssFactory.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Factories;
4
- use ResponsiveMenu\Mappers\ScssBaseMapper as ScssBaseMapper;
5
- use ResponsiveMenu\Mappers\ScssButtonMapper as ScssButtonMapper;
6
- use ResponsiveMenu\Mappers\ScssMenuMapper as ScssMenuMapper;
7
- use ResponsiveMenu\Formatters\Minify as Minify;
8
- use ResponsiveMenu\Collections\OptionsCollection as OptionsCollection;
9
-
10
- class CssFactory {
11
-
12
- public function build(OptionsCollection $options) {
13
-
14
- $css_base_mapper = new ScssBaseMapper($options);
15
- $css_base = $css_base_mapper->map();
16
-
17
- $css_button_mapper = new ScssButtonMapper($options);
18
- $css_button = $css_button_mapper->map();
19
-
20
- $css_menu_mapper = new ScssMenuMapper($options);
21
- $css_menu = $css_menu_mapper->map();
22
-
23
- $css = $css_base . $css_button . $css_menu;
24
-
25
- if($options['minify_scripts'] == 'on'):
26
- $minifier = new Minify;
27
- $css = $minifier->minify($css);
28
- endif;
29
-
30
- return $css;
31
-
32
- }
33
-
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Factories/FrontDisplayFactory.php DELETED
@@ -1,41 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Factories;
4
- use ResponsiveMenu\Factories\CssFactory as CssFactory;
5
- use ResponsiveMenu\Factories\JsFactory as JsFactory;
6
- use ResponsiveMenu\Collections\OptionsCollection as OptionsCollection;
7
-
8
- class FrontDisplayFactory {
9
-
10
- public function build(OptionsCollection $options) {
11
-
12
- $css_factory = new CssFactory;
13
- $js_factory = new JsFactory;
14
-
15
- $css = $css_factory->build($options);
16
- $js = $js_factory->build($options);
17
-
18
- add_filter('body_class', function($classes) use($options) {
19
- $classes[] = 'responsive-menu-' . $options['animation_type'] . '-' . $options['menu_appear_from'];
20
- return $classes;
21
- });
22
-
23
- wp_enqueue_script('jquery');
24
-
25
- if($options['external_files'] == 'on') :
26
- $data_folder_dir = plugins_url(). '/responsive-menu-data';
27
- $css_file = $data_folder_dir . '/css/responsive-menu-' . get_current_blog_id() . '.css';
28
- $js_file = $data_folder_dir . '/js/responsive-menu-' . get_current_blog_id() . '.js';
29
- wp_enqueue_style('responsive-menu', $css_file, null, false);
30
- wp_enqueue_script('responsive-menu', $js_file, ['jquery'], false, $options['scripts_in_footer'] == 'on' ? true : false);
31
- else :
32
- add_action('wp_head', function() use ($css) {
33
- echo '<style>' . $css . '</style>';
34
- }, 100);
35
- add_action($options['scripts_in_footer'] == 'on' ? 'wp_footer' : 'wp_head', function() use ($js) {
36
- echo '<script>' . $js . '</script>';
37
- }, 100);
38
- endif;
39
-
40
- }
41
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Factories/JsFactory.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Factories;
4
- use ResponsiveMenu\Mappers\JsMapper as JsMapper;
5
- use ResponsiveMenu\Formatters\Minify as Minify;
6
- use ResponsiveMenu\Collections\OptionsCollection as OptionsCollection;
7
-
8
- class JsFactory {
9
-
10
- public function build(OptionsCollection $options) {
11
-
12
- $js_mapper = new JsMapper($options);
13
- $js = $js_mapper->map();
14
-
15
- if($options['minify_scripts'] == 'on'):
16
- $minifier = new Minify;
17
- $js = $minifier->minify($js);
18
- endif;
19
-
20
- return $js;
21
-
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Factories/OptionFactory.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- namespace ResponsiveMenu\Factories;
4
- use ResponsiveMenu\Models\Option as Option;
5
-
6
- class OptionFactory {
7
-
8
- public function __construct($default_options, $option_helpers) {
9
- $this->defaults = $default_options;
10
- $this->helper = $option_helpers;
11
- }
12
-
13
- public function build($name, $value) {
14
-
15
- $filter = isset($this->helper[$name]['filter'])
16
- ? new $this->helper[$name]['filter']
17
- : new \ResponsiveMenu\Filters\TextFilter;
18
-
19
- $value = isset($value) || $value === '0' ? $value : $this->defaults[$name];
20
- $value = stripslashes_deep($value);
21
- $option = new Option($name, $value);
22
- $option->setFilter($filter);
23
- return $option;
24
- }
25
-
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/app/Filesystem/FileCreator.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
-
3