@@ -11,840 +11,840 @@ |
||
| 11 | 11 | |
| 12 | 12 | if ( ! class_exists( 'Redux_Social_Profiles_Defaults' ) ) { |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Class Redux_Social_Profiles_Defaults |
|
| 16 | - */ |
|
| 17 | - class Redux_Social_Profiles_Defaults { |
|
| 14 | + /** |
|
| 15 | + * Class Redux_Social_Profiles_Defaults |
|
| 16 | + */ |
|
| 17 | + class Redux_Social_Profiles_Defaults { |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Get defaults array. |
|
| 21 | - * |
|
| 22 | - * @return array |
|
| 23 | - */ |
|
| 24 | - public static function get_social_media_defaults(): array { |
|
| 25 | - return array( |
|
| 26 | - 0 => array( |
|
| 27 | - 'id' => 'adn', |
|
| 28 | - 'icon' => 'fa-adn', |
|
| 29 | - 'enabled' => false, |
|
| 30 | - 'name' => esc_html__( 'ADN', 'redux-framework' ), |
|
| 31 | - 'background' => '', |
|
| 32 | - 'color' => '#000000', |
|
| 33 | - 'url' => '', |
|
| 34 | - 'order' => 0, |
|
| 35 | - ), |
|
| 36 | - 1 => array( |
|
| 37 | - 'id' => 'android', |
|
| 38 | - 'icon' => 'fa-android', |
|
| 39 | - 'enabled' => false, |
|
| 40 | - 'name' => esc_html__( 'Android', 'redux-framework' ), |
|
| 41 | - 'background' => '', |
|
| 42 | - 'color' => '#A4C639', |
|
| 43 | - 'url' => '', |
|
| 44 | - 'order' => 1, |
|
| 45 | - ), |
|
| 46 | - 2 => array( |
|
| 47 | - 'id' => 'apple', |
|
| 48 | - 'icon' => 'fa-apple', |
|
| 49 | - 'enabled' => false, |
|
| 50 | - 'name' => esc_html__( 'Apple', 'redux-framework' ), |
|
| 51 | - 'style' => '', |
|
| 52 | - 'background' => '', |
|
| 53 | - 'color' => '#e4e4e5', |
|
| 54 | - 'url' => '', |
|
| 55 | - 'order' => 2, |
|
| 56 | - ), |
|
| 57 | - 3 => array( |
|
| 58 | - 'id' => 'behance', |
|
| 59 | - 'icon' => 'fa-behance', |
|
| 60 | - 'enabled' => false, |
|
| 61 | - 'name' => esc_html__( 'behance', 'redux-framework' ), |
|
| 62 | - 'background' => '', |
|
| 63 | - 'color' => '#1769ff', |
|
| 64 | - 'url' => '', |
|
| 65 | - 'order' => 3, |
|
| 66 | - ), |
|
| 67 | - 4 => array( |
|
| 68 | - 'id' => 'behance-square', |
|
| 69 | - 'icon' => 'fa-behance-square', |
|
| 70 | - 'enabled' => false, |
|
| 71 | - 'name' => esc_html__( 'behance square', 'redux-framework' ), |
|
| 72 | - 'background' => '', |
|
| 73 | - 'color' => '#1769ff', |
|
| 74 | - 'url' => '', |
|
| 75 | - 'order' => 4, |
|
| 76 | - ), |
|
| 77 | - 5 => array( |
|
| 78 | - 'id' => 'bitbucket', |
|
| 79 | - 'icon' => 'fa-bitbucket', |
|
| 80 | - 'enabled' => false, |
|
| 81 | - 'name' => esc_html__( 'Bitbucket', 'redux-framework' ), |
|
| 82 | - 'background' => '', |
|
| 83 | - 'color' => '#205081', |
|
| 84 | - 'url' => '', |
|
| 85 | - 'order' => 5, |
|
| 86 | - ), |
|
| 87 | - 6 => array( |
|
| 88 | - 'id' => 'bitbucket-square', |
|
| 89 | - 'icon' => 'fa-bitbucket-square', |
|
| 90 | - 'enabled' => false, |
|
| 91 | - 'name' => esc_html__( 'Bitbucket square', 'redux-framework' ), |
|
| 92 | - 'background' => '', |
|
| 93 | - 'color' => '#205081', |
|
| 94 | - 'url' => '', |
|
| 95 | - 'order' => 6, |
|
| 96 | - ), |
|
| 97 | - 7 => array( |
|
| 98 | - 'id' => 'bitcoin', |
|
| 99 | - 'icon' => 'fa-btc', |
|
| 100 | - 'enabled' => false, |
|
| 101 | - 'name' => esc_html__( 'Bitcoin', 'redux-framework' ), |
|
| 102 | - 'background' => '', |
|
| 103 | - 'color' => '#000000', |
|
| 104 | - 'url' => '', |
|
| 105 | - 'order' => 7, |
|
| 106 | - ), |
|
| 107 | - 8 => array( |
|
| 108 | - 'id' => 'codepen', |
|
| 109 | - 'icon' => 'fa-codepen', |
|
| 110 | - 'enabled' => false, |
|
| 111 | - 'name' => esc_html__( 'CodePen', 'redux-framework' ), |
|
| 112 | - 'background' => '', |
|
| 113 | - 'color' => '#000000', |
|
| 114 | - 'url' => '', |
|
| 115 | - 'order' => 8, |
|
| 116 | - ), |
|
| 117 | - 9 => array( |
|
| 118 | - 'id' => 'css3', |
|
| 119 | - 'icon' => 'fa-css3', |
|
| 120 | - 'enabled' => false, |
|
| 121 | - 'name' => esc_html__( 'CSS3', 'redux-framework' ), |
|
| 122 | - 'background' => '', |
|
| 123 | - 'color' => '#000000', |
|
| 124 | - 'url' => '', |
|
| 125 | - 'order' => 9, |
|
| 126 | - ), |
|
| 127 | - 10 => array( |
|
| 128 | - 'id' => 'delicious', |
|
| 129 | - 'icon' => 'fa-delicious', |
|
| 130 | - 'enabled' => false, |
|
| 131 | - 'name' => esc_html__( 'Delicious', 'redux-framework' ), |
|
| 132 | - 'background' => '', |
|
| 133 | - 'color' => '#3399ff', |
|
| 134 | - 'url' => '', |
|
| 135 | - 'order' => 10, |
|
| 136 | - ), |
|
| 137 | - 11 => array( |
|
| 138 | - 'id' => 'deviantart', |
|
| 139 | - 'icon' => 'fa-deviantart', |
|
| 140 | - 'enabled' => false, |
|
| 141 | - 'name' => esc_html__( 'Deviantart', 'redux-framework' ), |
|
| 142 | - 'background' => '', |
|
| 143 | - 'color' => '#4e6252', |
|
| 144 | - 'url' => '', |
|
| 145 | - 'order' => 11, |
|
| 146 | - ), |
|
| 147 | - 12 => array( |
|
| 148 | - 'id' => 'digg', |
|
| 149 | - 'icon' => 'fa-digg', |
|
| 150 | - 'enabled' => false, |
|
| 151 | - 'name' => esc_html__( 'Digg', 'redux-framework' ), |
|
| 152 | - 'background' => '', |
|
| 153 | - 'color' => '#000000', |
|
| 154 | - 'url' => '', |
|
| 155 | - 'order' => 12, |
|
| 156 | - ), |
|
| 157 | - 13 => array( |
|
| 158 | - 'id' => 'dribbble', |
|
| 159 | - 'icon' => 'fa-dribbble', |
|
| 160 | - 'enabled' => false, |
|
| 161 | - 'name' => esc_html__( 'Dribbble', 'redux-framework' ), |
|
| 162 | - 'background' => '', |
|
| 163 | - 'color' => '#444444', |
|
| 164 | - 'url' => '', |
|
| 165 | - 'order' => 13, |
|
| 166 | - ), |
|
| 167 | - 14 => array( |
|
| 168 | - 'id' => 'dropbox', |
|
| 169 | - 'icon' => 'fa-dropbox', |
|
| 170 | - 'enabled' => false, |
|
| 171 | - 'name' => esc_html__( 'Dropbox', 'redux-framework' ), |
|
| 172 | - 'background' => '', |
|
| 173 | - 'color' => '#007ee5', |
|
| 174 | - 'url' => '', |
|
| 175 | - 'order' => 14, |
|
| 176 | - ), |
|
| 177 | - 15 => array( |
|
| 178 | - 'id' => 'drupal', |
|
| 179 | - 'icon' => 'fa-drupal', |
|
| 180 | - 'enabled' => false, |
|
| 181 | - 'name' => esc_html__( 'Drupal', 'redux-framework' ), |
|
| 182 | - 'background' => '', |
|
| 183 | - 'color' => '#0077c0', |
|
| 184 | - 'url' => '', |
|
| 185 | - 'order' => 15, |
|
| 186 | - ), |
|
| 187 | - 16 => array( |
|
| 188 | - 'id' => 'empire', |
|
| 189 | - 'icon' => 'fa-empire', |
|
| 190 | - 'enabled' => false, |
|
| 191 | - 'name' => esc_html__( 'Empire', 'redux-framework' ), |
|
| 192 | - 'background' => '', |
|
| 193 | - 'color' => '#000000', |
|
| 194 | - 'url' => '', |
|
| 195 | - 'order' => 16, |
|
| 196 | - ), |
|
| 197 | - 17 => array( |
|
| 198 | - 'id' => 'facebook', |
|
| 199 | - 'icon' => 'fa-facebook', |
|
| 200 | - 'enabled' => false, |
|
| 201 | - 'name' => esc_html__( 'Facebook', 'redux-framework' ), |
|
| 202 | - 'background' => '', |
|
| 203 | - 'color' => '#3b5998', |
|
| 204 | - 'url' => '', |
|
| 205 | - 'order' => 17, |
|
| 206 | - ), |
|
| 207 | - 18 => array( |
|
| 208 | - 'id' => 'facebook-square', |
|
| 209 | - 'icon' => 'fa-facebook-square', |
|
| 210 | - 'enabled' => false, |
|
| 211 | - 'name' => esc_html__( 'Facebook square', 'redux-framework' ), |
|
| 212 | - 'background' => '', |
|
| 213 | - 'color' => '#3b5998', |
|
| 214 | - 'url' => '', |
|
| 215 | - 'order' => 18, |
|
| 216 | - ), |
|
| 217 | - 19 => array( |
|
| 218 | - 'id' => 'flickr', |
|
| 219 | - 'icon' => 'fa-flickr', |
|
| 220 | - 'enabled' => false, |
|
| 221 | - 'name' => esc_html__( 'Flickr', 'redux-framework' ), |
|
| 222 | - 'background' => '', |
|
| 223 | - 'color' => '#0063dc', |
|
| 224 | - 'url' => '', |
|
| 225 | - 'order' => 19, |
|
| 226 | - ), |
|
| 227 | - 20 => array( |
|
| 228 | - 'id' => 'foursquare', |
|
| 229 | - 'icon' => 'fa-foursquare', |
|
| 230 | - 'enabled' => false, |
|
| 231 | - 'name' => esc_html__( 'FourSquare', 'redux-framework' ), |
|
| 232 | - 'background' => '', |
|
| 233 | - 'color' => '#0072b1', |
|
| 234 | - 'url' => '', |
|
| 235 | - 'order' => 20, |
|
| 236 | - ), |
|
| 237 | - 21 => array( |
|
| 238 | - 'id' => 'git', |
|
| 239 | - 'icon' => 'fa-git', |
|
| 240 | - 'enabled' => false, |
|
| 241 | - 'name' => esc_html__( 'git', 'redux-framework' ), |
|
| 242 | - 'background' => '', |
|
| 243 | - 'color' => '#000000', |
|
| 244 | - 'url' => '', |
|
| 245 | - 'order' => 21, |
|
| 246 | - ), |
|
| 247 | - 22 => array( |
|
| 248 | - 'id' => 'git-square', |
|
| 249 | - 'icon' => 'fa-git-square', |
|
| 250 | - 'enabled' => false, |
|
| 251 | - 'name' => esc_html__( 'git square', 'redux-framework' ), |
|
| 252 | - 'background' => '', |
|
| 253 | - 'color' => '#000000', |
|
| 254 | - 'url' => '', |
|
| 255 | - 'order' => 22, |
|
| 256 | - ), |
|
| 257 | - 23 => array( |
|
| 258 | - 'id' => 'github', |
|
| 259 | - 'icon' => 'fa-github', |
|
| 260 | - 'enabled' => false, |
|
| 261 | - 'name' => esc_html__( 'github', 'redux-framework' ), |
|
| 262 | - 'background' => '', |
|
| 263 | - 'color' => '#4183c4', |
|
| 264 | - 'url' => '', |
|
| 265 | - 'order' => 23, |
|
| 266 | - ), |
|
| 267 | - 24 => array( |
|
| 268 | - 'id' => 'github-alt', |
|
| 269 | - 'icon' => 'fa-github-alt', |
|
| 270 | - 'enabled' => false, |
|
| 271 | - 'name' => esc_html__( 'github alt', 'redux-framework' ), |
|
| 272 | - 'background' => '', |
|
| 273 | - 'color' => '#4183c4', |
|
| 274 | - 'url' => '', |
|
| 275 | - 'order' => 24, |
|
| 276 | - ), |
|
| 277 | - 25 => array( |
|
| 278 | - 'id' => 'github-square', |
|
| 279 | - 'icon' => 'fa-github-square', |
|
| 280 | - 'enabled' => false, |
|
| 281 | - 'name' => esc_html__( 'github square', 'redux-framework' ), |
|
| 282 | - 'background' => '', |
|
| 283 | - 'color' => '#4183c4', |
|
| 284 | - 'url' => '', |
|
| 285 | - 'order' => 25, |
|
| 286 | - ), |
|
| 287 | - 26 => array( |
|
| 288 | - 'id' => 'gittip', |
|
| 289 | - 'icon' => 'fa-gittip', |
|
| 290 | - 'enabled' => false, |
|
| 291 | - 'name' => esc_html__( 'git tip', 'redux-framework' ), |
|
| 292 | - 'background' => '', |
|
| 293 | - 'color' => '#000000', |
|
| 294 | - 'url' => '', |
|
| 295 | - 'order' => 26, |
|
| 296 | - ), |
|
| 297 | - 27 => array( |
|
| 298 | - 'id' => 'google', |
|
| 299 | - 'icon' => 'fa-google', |
|
| 300 | - 'enabled' => false, |
|
| 301 | - 'name' => esc_html__( 'Google', 'redux-framework' ), |
|
| 302 | - 'background' => '', |
|
| 303 | - 'color' => '#dd4b39', |
|
| 304 | - 'url' => '', |
|
| 305 | - 'order' => 27, |
|
| 306 | - ), |
|
| 307 | - 28 => array( |
|
| 308 | - 'id' => 'google-plus', |
|
| 309 | - 'icon' => 'fa-google-plus', |
|
| 310 | - 'enabled' => false, |
|
| 311 | - 'name' => esc_html__( 'Google Plus', 'redux-framework' ), |
|
| 312 | - 'background' => '', |
|
| 313 | - 'color' => '#dd4b39', |
|
| 314 | - 'url' => '', |
|
| 315 | - 'order' => 28, |
|
| 316 | - ), |
|
| 317 | - 29 => array( |
|
| 318 | - 'id' => 'google-plus-square', |
|
| 319 | - 'icon' => 'fa-google-plus-square', |
|
| 320 | - 'enabled' => false, |
|
| 321 | - 'name' => esc_html__( 'Google Plus square', 'redux-framework' ), |
|
| 322 | - 'background' => '', |
|
| 323 | - 'color' => '#dd4b39', |
|
| 324 | - 'url' => '', |
|
| 325 | - 'order' => 29, |
|
| 326 | - ), |
|
| 327 | - 30 => array( |
|
| 328 | - 'id' => 'hacker-news', |
|
| 329 | - 'icon' => 'fa-hacker-news', |
|
| 330 | - 'enabled' => false, |
|
| 331 | - 'name' => esc_html__( 'Hacker News', 'redux-framework' ), |
|
| 332 | - 'background' => '', |
|
| 333 | - 'color' => '#ff6600', |
|
| 334 | - 'url' => '', |
|
| 335 | - 'order' => 30, |
|
| 336 | - ), |
|
| 337 | - 31 => array( |
|
| 338 | - 'id' => 'html5', |
|
| 339 | - 'icon' => 'fa-html5', |
|
| 340 | - 'enabled' => false, |
|
| 341 | - 'name' => esc_html__( 'HTML5', 'redux-framework' ), |
|
| 342 | - 'background' => '', |
|
| 343 | - 'color' => '#e34f26', |
|
| 344 | - 'url' => '', |
|
| 345 | - 'order' => 31, |
|
| 346 | - ), |
|
| 347 | - 32 => array( |
|
| 348 | - 'id' => 'instagram', |
|
| 349 | - 'icon' => 'fa-instagram', |
|
| 350 | - 'enabled' => false, |
|
| 351 | - 'name' => esc_html__( 'Instagram', 'redux-framework' ), |
|
| 352 | - 'background' => '', |
|
| 353 | - 'color' => '#3f729b', |
|
| 354 | - 'url' => '', |
|
| 355 | - 'order' => 32, |
|
| 356 | - ), |
|
| 357 | - 33 => array( |
|
| 358 | - 'id' => 'joomla', |
|
| 359 | - 'icon' => 'fa-joomla', |
|
| 360 | - 'enabled' => false, |
|
| 361 | - 'name' => esc_html__( 'Joomla', 'redux-framework' ), |
|
| 362 | - 'background' => '', |
|
| 363 | - 'color' => '#000000', |
|
| 364 | - 'url' => '', |
|
| 365 | - 'order' => 33, |
|
| 366 | - ), |
|
| 367 | - 34 => array( |
|
| 368 | - 'id' => 'jsfiddle', |
|
| 369 | - 'icon' => 'fa-jsfiddle', |
|
| 370 | - 'enabled' => false, |
|
| 371 | - 'name' => esc_html__( 'JS Fiddle', 'redux-framework' ), |
|
| 372 | - 'background' => '', |
|
| 373 | - 'color' => '#000000', |
|
| 374 | - 'url' => '', |
|
| 375 | - 'order' => 34, |
|
| 376 | - ), |
|
| 377 | - 35 => array( |
|
| 378 | - 'id' => 'linkedin', |
|
| 379 | - 'icon' => 'fa-linkedin', |
|
| 380 | - 'enabled' => false, |
|
| 381 | - 'name' => esc_html__( 'LinkedIn', 'redux-framework' ), |
|
| 382 | - 'background' => '', |
|
| 383 | - 'color' => '#0976b4', |
|
| 384 | - 'url' => '', |
|
| 385 | - 'order' => 35, |
|
| 386 | - ), |
|
| 387 | - 36 => array( |
|
| 388 | - 'id' => 'linkedin-square', |
|
| 389 | - 'icon' => 'fa-linkedin-square', |
|
| 390 | - 'enabled' => false, |
|
| 391 | - 'name' => esc_html__( 'LinkedIn square', 'redux-framework' ), |
|
| 392 | - 'background' => '', |
|
| 393 | - 'color' => '#0976b4', |
|
| 394 | - 'url' => '', |
|
| 395 | - 'order' => 36, |
|
| 396 | - ), |
|
| 397 | - 37 => array( |
|
| 398 | - 'id' => 'linux', |
|
| 399 | - 'icon' => 'fa-linux', |
|
| 400 | - 'enabled' => false, |
|
| 401 | - 'name' => esc_html__( 'Linux', 'redux-framework' ), |
|
| 402 | - 'background' => '', |
|
| 403 | - 'color' => '#333333', |
|
| 404 | - 'url' => '', |
|
| 405 | - 'order' => 37, |
|
| 406 | - ), |
|
| 407 | - 38 => array( |
|
| 408 | - 'id' => 'maxcdn', |
|
| 409 | - 'icon' => 'fa-maxcdn', |
|
| 410 | - 'enabled' => false, |
|
| 411 | - 'name' => esc_html__( 'MaxCDN', 'redux-framework' ), |
|
| 412 | - 'background' => '', |
|
| 413 | - 'color' => '#f8711e', |
|
| 414 | - 'url' => '', |
|
| 415 | - 'order' => 38, |
|
| 416 | - ), |
|
| 417 | - 39 => array( |
|
| 418 | - 'id' => 'openid', |
|
| 419 | - 'icon' => 'fa-openid', |
|
| 420 | - 'enabled' => false, |
|
| 421 | - 'name' => esc_html__( 'OpenID', 'redux-framework' ), |
|
| 422 | - 'background' => '', |
|
| 423 | - 'color' => '#000000', |
|
| 424 | - 'url' => '', |
|
| 425 | - 'order' => 39, |
|
| 426 | - ), |
|
| 427 | - 40 => array( |
|
| 428 | - 'id' => 'pagelines', |
|
| 429 | - 'icon' => 'fa-pagelines', |
|
| 430 | - 'enabled' => false, |
|
| 431 | - 'name' => esc_html__( 'Page Lines', 'redux-framework' ), |
|
| 432 | - 'background' => '', |
|
| 433 | - 'color' => '#000000', |
|
| 434 | - 'url' => '', |
|
| 435 | - 'order' => 40, |
|
| 436 | - ), |
|
| 437 | - 41 => array( |
|
| 438 | - 'id' => 'pied-piper', |
|
| 439 | - 'icon' => 'fa-pied-piper', |
|
| 440 | - 'enabled' => false, |
|
| 441 | - 'name' => esc_html__( 'Pied Piper', 'redux-framework' ), |
|
| 442 | - 'background' => '', |
|
| 443 | - 'color' => '#000000', |
|
| 444 | - 'url' => '', |
|
| 445 | - 'order' => 41, |
|
| 446 | - ), |
|
| 447 | - 42 => array( |
|
| 448 | - 'id' => 'pied-piper-alt', |
|
| 449 | - 'icon' => 'fa-pied-piper-alt', |
|
| 450 | - 'enabled' => false, |
|
| 451 | - 'name' => esc_html__( 'Pied Piper alt', 'redux-framework' ), |
|
| 452 | - 'background' => '', |
|
| 453 | - 'color' => '#000000', |
|
| 454 | - 'url' => '', |
|
| 455 | - 'order' => 42, |
|
| 456 | - ), |
|
| 457 | - 43 => array( |
|
| 458 | - 'id' => 'pinterest', |
|
| 459 | - 'icon' => 'fa-pinterest', |
|
| 460 | - 'enabled' => false, |
|
| 461 | - 'name' => esc_html__( 'Pinterest', 'redux-framework' ), |
|
| 462 | - 'background' => '', |
|
| 463 | - 'color' => '#1769ff', |
|
| 464 | - 'url' => '', |
|
| 465 | - 'order' => 43, |
|
| 466 | - ), |
|
| 467 | - 44 => array( |
|
| 468 | - 'id' => 'pinterest-square', |
|
| 469 | - 'icon' => 'fa-pinterest-square', |
|
| 470 | - 'enabled' => false, |
|
| 471 | - 'name' => esc_html__( 'Pinterest square', 'redux-framework' ), |
|
| 472 | - 'background' => '', |
|
| 473 | - 'color' => '#1769ff', |
|
| 474 | - 'url' => '', |
|
| 475 | - 'order' => 44, |
|
| 476 | - ), |
|
| 477 | - 45 => array( |
|
| 478 | - 'id' => 'qq', |
|
| 479 | - 'icon' => 'fa-qq', |
|
| 480 | - 'enabled' => false, |
|
| 481 | - 'name' => esc_html__( 'QQ', 'redux-framework' ), |
|
| 482 | - 'background' => '', |
|
| 483 | - 'color' => '#000000', |
|
| 484 | - 'url' => '', |
|
| 485 | - 'order' => 45, |
|
| 486 | - ), |
|
| 487 | - 46 => array( |
|
| 488 | - 'id' => 'rebel', |
|
| 489 | - 'icon' => 'fa-rebel', |
|
| 490 | - 'enabled' => false, |
|
| 491 | - 'name' => esc_html__( 'Rebel', 'redux-framework' ), |
|
| 492 | - 'background' => '', |
|
| 493 | - 'color' => '#517fa4', |
|
| 494 | - 'url' => '', |
|
| 495 | - 'order' => 46, |
|
| 496 | - ), |
|
| 497 | - 47 => array( |
|
| 498 | - 'id' => 'reddit', |
|
| 499 | - 'icon' => 'fa-reddit', |
|
| 500 | - 'enabled' => false, |
|
| 501 | - 'name' => esc_html__( 'Reddit', 'redux-framework' ), |
|
| 502 | - 'background' => '', |
|
| 503 | - 'color' => '#ff4500', |
|
| 504 | - 'url' => '', |
|
| 505 | - 'order' => 47, |
|
| 506 | - ), |
|
| 507 | - 48 => array( |
|
| 508 | - 'id' => 'reddit-square', |
|
| 509 | - 'icon' => 'fa-reddit-square', |
|
| 510 | - 'enabled' => false, |
|
| 511 | - 'name' => esc_html__( 'Reddit square', 'redux-framework' ), |
|
| 512 | - 'background' => '', |
|
| 513 | - 'color' => '#ff4500', |
|
| 514 | - 'url' => '', |
|
| 515 | - 'order' => 48, |
|
| 516 | - ), |
|
| 517 | - 49 => array( |
|
| 518 | - 'id' => 'renren', |
|
| 519 | - 'icon' => 'fa-renren', |
|
| 520 | - 'enabled' => false, |
|
| 521 | - 'name' => esc_html__( 'Ren Ren', 'redux-framework' ), |
|
| 522 | - 'background' => '', |
|
| 523 | - 'color' => '#007bb6', |
|
| 524 | - 'url' => '', |
|
| 525 | - 'order' => 49, |
|
| 526 | - ), |
|
| 527 | - 50 => array( |
|
| 528 | - 'id' => 'share-alt', |
|
| 529 | - 'icon' => 'fa-share-alt', |
|
| 530 | - 'enabled' => false, |
|
| 531 | - 'name' => esc_html__( 'Share alt', 'redux-framework' ), |
|
| 532 | - 'background' => '', |
|
| 533 | - 'color' => '#000000', |
|
| 534 | - 'url' => '', |
|
| 535 | - 'order' => 50, |
|
| 536 | - ), |
|
| 537 | - 51 => array( |
|
| 538 | - 'id' => 'share-alt-square', |
|
| 539 | - 'icon' => 'fa-share-alt-square', |
|
| 540 | - 'enabled' => false, |
|
| 541 | - 'name' => esc_html__( 'Share square', 'redux-framework' ), |
|
| 542 | - 'background' => '', |
|
| 543 | - 'color' => '#000000', |
|
| 544 | - 'url' => '', |
|
| 545 | - 'order' => 51, |
|
| 546 | - ), |
|
| 547 | - 52 => array( |
|
| 548 | - 'id' => 'skype', |
|
| 549 | - 'icon' => 'fa-skype', |
|
| 550 | - 'enabled' => false, |
|
| 551 | - 'name' => esc_html__( 'Skype', 'redux-framework' ), |
|
| 552 | - 'background' => '', |
|
| 553 | - 'color' => '#00aff0', |
|
| 554 | - 'url' => '', |
|
| 555 | - 'order' => 52, |
|
| 556 | - ), |
|
| 557 | - 53 => array( |
|
| 558 | - 'id' => 'slack', |
|
| 559 | - 'icon' => 'fa-slack', |
|
| 560 | - 'enabled' => false, |
|
| 561 | - 'name' => esc_html__( 'Slack', 'redux-framework' ), |
|
| 562 | - 'background' => '', |
|
| 563 | - 'color' => '#000000', |
|
| 564 | - 'url' => '', |
|
| 565 | - 'order' => 53, |
|
| 566 | - ), |
|
| 567 | - 54 => array( |
|
| 568 | - 'id' => 'soundcloud', |
|
| 569 | - 'icon' => 'fa-soundcloud', |
|
| 570 | - 'enabled' => false, |
|
| 571 | - 'name' => esc_html__( 'Sound Cloud', 'redux-framework' ), |
|
| 572 | - 'background' => '', |
|
| 573 | - 'color' => '#f80', |
|
| 574 | - 'url' => '', |
|
| 575 | - 'order' => 54, |
|
| 576 | - ), |
|
| 577 | - 55 => array( |
|
| 578 | - 'id' => 'spotify', |
|
| 579 | - 'icon' => 'fa-spotify', |
|
| 580 | - 'enabled' => false, |
|
| 581 | - 'name' => esc_html__( 'Spotify', 'redux-framework' ), |
|
| 582 | - 'background' => '', |
|
| 583 | - 'color' => '#7ab800', |
|
| 584 | - 'url' => '', |
|
| 585 | - 'order' => 55, |
|
| 586 | - ), |
|
| 587 | - 56 => array( |
|
| 588 | - 'id' => 'stack-exchange', |
|
| 589 | - 'icon' => 'fa-stack-exchange', |
|
| 590 | - 'enabled' => false, |
|
| 591 | - 'name' => esc_html__( 'Stack Exchange', 'redux-framework' ), |
|
| 592 | - 'background' => '', |
|
| 593 | - 'color' => '#000000', |
|
| 594 | - 'url' => '', |
|
| 595 | - 'order' => 56, |
|
| 596 | - ), |
|
| 597 | - 57 => array( |
|
| 598 | - 'id' => 'stack-overflow', |
|
| 599 | - 'icon' => 'fa-stack-overflow', |
|
| 600 | - 'enabled' => false, |
|
| 601 | - 'name' => esc_html__( 'Stack Overflow', 'redux-framework' ), |
|
| 602 | - 'background' => '', |
|
| 603 | - 'color' => '#fe7a15', |
|
| 604 | - 'url' => '', |
|
| 605 | - 'order' => 57, |
|
| 606 | - ), |
|
| 607 | - 58 => array( |
|
| 608 | - 'id' => 'steam', |
|
| 609 | - 'icon' => 'fa-steam', |
|
| 610 | - 'enabled' => false, |
|
| 611 | - 'name' => esc_html__( 'Steam', 'redux-framework' ), |
|
| 612 | - 'background' => '', |
|
| 613 | - 'color' => '#000000', |
|
| 614 | - 'url' => '', |
|
| 615 | - 'order' => 58, |
|
| 616 | - ), |
|
| 617 | - 59 => array( |
|
| 618 | - 'id' => 'steam-square', |
|
| 619 | - 'icon' => 'fa-steam-square', |
|
| 620 | - 'enabled' => false, |
|
| 621 | - 'name' => esc_html__( 'Steam square', 'redux-framework' ), |
|
| 622 | - 'background' => '', |
|
| 623 | - 'color' => '#000000', |
|
| 624 | - 'url' => '', |
|
| 625 | - 'order' => 59, |
|
| 626 | - ), |
|
| 627 | - 60 => array( |
|
| 628 | - 'id' => 'stumbleupon', |
|
| 629 | - 'icon' => 'fa-stumbleupon', |
|
| 630 | - 'enabled' => false, |
|
| 631 | - 'name' => esc_html__( 'Stumble Upon', 'redux-framework' ), |
|
| 632 | - 'background' => '', |
|
| 633 | - 'color' => '#eb4924', |
|
| 634 | - 'url' => '', |
|
| 635 | - 'order' => 60, |
|
| 636 | - ), |
|
| 637 | - 61 => array( |
|
| 638 | - 'id' => 'stumbleupon-circle', |
|
| 639 | - 'icon' => 'fa-stumbleupon-circle', |
|
| 640 | - 'enabled' => false, |
|
| 641 | - 'name' => esc_html__( 'Stumble Upon circle', 'redux-framework' ), |
|
| 642 | - 'background' => '', |
|
| 643 | - 'color' => '#eb4924', |
|
| 644 | - 'url' => '', |
|
| 645 | - 'order' => 61, |
|
| 646 | - ), |
|
| 647 | - 62 => array( |
|
| 648 | - 'id' => 'tencent-weibo', |
|
| 649 | - 'icon' => 'fa-tencent-weibo', |
|
| 650 | - 'enabled' => false, |
|
| 651 | - 'name' => esc_html__( 'Tencent Weibo', 'redux-framework' ), |
|
| 652 | - 'background' => '', |
|
| 653 | - 'color' => '#000000', |
|
| 654 | - 'url' => '', |
|
| 655 | - 'order' => 62, |
|
| 656 | - ), |
|
| 657 | - 63 => array( |
|
| 658 | - 'id' => 'trello', |
|
| 659 | - 'icon' => 'fa-trello', |
|
| 660 | - 'enabled' => false, |
|
| 661 | - 'name' => esc_html__( 'Trello', 'redux-framework' ), |
|
| 662 | - 'background' => '', |
|
| 663 | - 'color' => '#256a92', |
|
| 664 | - 'url' => '', |
|
| 665 | - 'order' => 63, |
|
| 666 | - ), |
|
| 667 | - 64 => array( |
|
| 668 | - 'id' => 'tumblr', |
|
| 669 | - 'icon' => 'fa-tumblr', |
|
| 670 | - 'enabled' => false, |
|
| 671 | - 'name' => esc_html__( 'Tumblr', 'redux-framework' ), |
|
| 672 | - 'background' => '', |
|
| 673 | - 'color' => '#35465c', |
|
| 674 | - 'url' => '', |
|
| 675 | - 'order' => 64, |
|
| 676 | - ), |
|
| 677 | - 65 => array( |
|
| 678 | - 'id' => 'tumblr-square', |
|
| 679 | - 'icon' => 'fa-tumblr-square', |
|
| 680 | - 'enabled' => false, |
|
| 681 | - 'name' => esc_html__( 'Tumblr square', 'redux-framework' ), |
|
| 682 | - 'background' => '', |
|
| 683 | - 'color' => '#35465c', |
|
| 684 | - 'url' => '', |
|
| 685 | - 'order' => 65, |
|
| 686 | - ), |
|
| 687 | - 66 => array( |
|
| 688 | - 'id' => 'twitter', |
|
| 689 | - 'icon' => 'fa-twitter', |
|
| 690 | - 'enabled' => false, |
|
| 691 | - 'name' => esc_html__( 'Twitter', 'redux-framework' ), |
|
| 692 | - 'background' => '', |
|
| 693 | - 'color' => '#55acee', |
|
| 694 | - 'url' => '', |
|
| 695 | - 'order' => 66, |
|
| 696 | - ), |
|
| 697 | - 67 => array( |
|
| 698 | - 'id' => 'twitter-square', |
|
| 699 | - 'icon' => 'fa-twitter-square', |
|
| 700 | - 'enabled' => false, |
|
| 701 | - 'name' => esc_html__( 'Twitter square', 'redux-framework' ), |
|
| 702 | - 'background' => '', |
|
| 703 | - 'color' => '#55acee', |
|
| 704 | - 'url' => '', |
|
| 705 | - 'order' => 67, |
|
| 706 | - ), |
|
| 707 | - 68 => array( |
|
| 708 | - 'id' => 'vimeo-square', |
|
| 709 | - 'icon' => 'fa-vimeo-square', |
|
| 710 | - 'enabled' => false, |
|
| 711 | - 'name' => esc_html__( 'Vimeo square', 'redux-framework' ), |
|
| 712 | - 'background' => '', |
|
| 713 | - 'color' => '#1ab7ea', |
|
| 714 | - 'url' => '', |
|
| 715 | - 'order' => 68, |
|
| 716 | - ), |
|
| 717 | - 69 => array( |
|
| 718 | - 'id' => 'vine', |
|
| 719 | - 'icon' => 'fa-vine', |
|
| 720 | - 'enabled' => false, |
|
| 721 | - 'name' => esc_html__( 'Vine', 'redux-framework' ), |
|
| 722 | - 'background' => '', |
|
| 723 | - 'color' => '#00b488', |
|
| 724 | - 'url' => '', |
|
| 725 | - 'order' => 69, |
|
| 726 | - ), |
|
| 727 | - 70 => array( |
|
| 728 | - 'id' => 'vk', |
|
| 729 | - 'icon' => 'fa-vk', |
|
| 730 | - 'enabled' => false, |
|
| 731 | - 'name' => esc_html__( 'VK', 'redux-framework' ), |
|
| 732 | - 'background' => '', |
|
| 733 | - 'color' => '#000000', |
|
| 734 | - 'url' => '', |
|
| 735 | - 'order' => 70, |
|
| 736 | - ), |
|
| 737 | - 71 => array( |
|
| 738 | - 'id' => 'weibo', |
|
| 739 | - 'icon' => 'fa-weibo', |
|
| 740 | - 'enabled' => false, |
|
| 741 | - 'name' => esc_html__( 'Weibo', 'redux-framework' ), |
|
| 742 | - 'background' => '', |
|
| 743 | - 'color' => '#000000', |
|
| 744 | - 'url' => '', |
|
| 745 | - 'order' => 71, |
|
| 746 | - ), |
|
| 747 | - 72 => array( |
|
| 748 | - 'id' => 'weixin', |
|
| 749 | - 'icon' => 'fa-weixin', |
|
| 750 | - 'enabled' => false, |
|
| 751 | - 'name' => esc_html__( 'Weixin', 'redux-framework' ), |
|
| 752 | - 'background' => '', |
|
| 753 | - 'color' => '#000000', |
|
| 754 | - 'url' => '', |
|
| 755 | - 'order' => 72, |
|
| 756 | - ), |
|
| 757 | - 73 => array( |
|
| 758 | - 'id' => 'windows', |
|
| 759 | - 'icon' => 'fa-windows', |
|
| 760 | - 'enabled' => false, |
|
| 761 | - 'name' => esc_html__( 'Windows', 'redux-framework' ), |
|
| 762 | - 'background' => '', |
|
| 763 | - 'color' => '#00bcf2', |
|
| 764 | - 'url' => '', |
|
| 765 | - 'order' => 73, |
|
| 766 | - ), |
|
| 767 | - 74 => array( |
|
| 768 | - 'id' => 'wordpress', |
|
| 769 | - 'icon' => 'fa-wordpress', |
|
| 770 | - 'enabled' => false, |
|
| 771 | - 'name' => esc_html__( 'WordPress', 'redux-framework' ), |
|
| 772 | - 'background' => '', |
|
| 773 | - 'color' => '#21759b', |
|
| 774 | - 'url' => '', |
|
| 775 | - 'order' => 74, |
|
| 776 | - ), |
|
| 777 | - 75 => array( |
|
| 778 | - 'id' => 'xing', |
|
| 779 | - 'icon' => 'fa-xing', |
|
| 780 | - 'enabled' => false, |
|
| 781 | - 'name' => esc_html__( 'Xing', 'redux-framework' ), |
|
| 782 | - 'background' => '', |
|
| 783 | - 'color' => '#026466', |
|
| 784 | - 'url' => '', |
|
| 785 | - 'order' => 75, |
|
| 786 | - ), |
|
| 787 | - 76 => array( |
|
| 788 | - 'id' => 'xing-square', |
|
| 789 | - 'icon' => 'fa-xing-square', |
|
| 790 | - 'enabled' => false, |
|
| 791 | - 'name' => esc_html__( 'Xing square', 'redux-framework' ), |
|
| 792 | - 'background' => '', |
|
| 793 | - 'color' => '#026466', |
|
| 794 | - 'url' => '', |
|
| 795 | - 'order' => 76, |
|
| 796 | - ), |
|
| 797 | - 77 => array( |
|
| 798 | - 'id' => 'yahoo', |
|
| 799 | - 'icon' => 'fa-yahoo', |
|
| 800 | - 'enabled' => false, |
|
| 801 | - 'name' => esc_html__( 'Yahoo', 'redux-framework' ), |
|
| 802 | - 'background' => '', |
|
| 803 | - 'color' => '#400191', |
|
| 804 | - 'url' => '', |
|
| 805 | - 'order' => 77, |
|
| 806 | - ), |
|
| 807 | - 78 => array( |
|
| 808 | - 'id' => 'yelp', |
|
| 809 | - 'icon' => 'fa-yelp', |
|
| 810 | - 'enabled' => false, |
|
| 811 | - 'name' => esc_html__( 'Yelp', 'redux-framework' ), |
|
| 812 | - 'background' => '', |
|
| 813 | - 'color' => '#C93C27', |
|
| 814 | - 'url' => '', |
|
| 815 | - 'order' => 78, |
|
| 816 | - ), |
|
| 817 | - 79 => array( |
|
| 818 | - 'id' => 'youtube', |
|
| 819 | - 'icon' => 'fa-youtube', |
|
| 820 | - 'enabled' => false, |
|
| 821 | - 'name' => esc_html__( 'YouTube', 'redux-framework' ), |
|
| 822 | - 'background' => '', |
|
| 823 | - 'color' => '#e52d27', |
|
| 824 | - 'url' => '', |
|
| 825 | - 'order' => 79, |
|
| 826 | - ), |
|
| 827 | - 80 => array( |
|
| 828 | - 'id' => 'youtube-play', |
|
| 829 | - 'icon' => 'fa-youtube-play', |
|
| 830 | - 'enabled' => false, |
|
| 831 | - 'name' => esc_html__( 'YouTube play', 'redux-framework' ), |
|
| 832 | - 'background' => '', |
|
| 833 | - 'color' => '#e52d27', |
|
| 834 | - 'url' => '', |
|
| 835 | - 'order' => 80, |
|
| 836 | - ), |
|
| 837 | - 81 => array( |
|
| 838 | - 'id' => 'youtube-square', |
|
| 839 | - 'icon' => 'fa-youtube-square', |
|
| 840 | - 'enabled' => false, |
|
| 841 | - 'name' => esc_html__( 'YouTube square', 'redux-framework' ), |
|
| 842 | - 'background' => '', |
|
| 843 | - 'color' => '#e52d27', |
|
| 844 | - 'url' => '', |
|
| 845 | - 'order' => 81, |
|
| 846 | - ), |
|
| 847 | - ); |
|
| 848 | - } |
|
| 849 | - } |
|
| 19 | + /** |
|
| 20 | + * Get defaults array. |
|
| 21 | + * |
|
| 22 | + * @return array |
|
| 23 | + */ |
|
| 24 | + public static function get_social_media_defaults(): array { |
|
| 25 | + return array( |
|
| 26 | + 0 => array( |
|
| 27 | + 'id' => 'adn', |
|
| 28 | + 'icon' => 'fa-adn', |
|
| 29 | + 'enabled' => false, |
|
| 30 | + 'name' => esc_html__( 'ADN', 'redux-framework' ), |
|
| 31 | + 'background' => '', |
|
| 32 | + 'color' => '#000000', |
|
| 33 | + 'url' => '', |
|
| 34 | + 'order' => 0, |
|
| 35 | + ), |
|
| 36 | + 1 => array( |
|
| 37 | + 'id' => 'android', |
|
| 38 | + 'icon' => 'fa-android', |
|
| 39 | + 'enabled' => false, |
|
| 40 | + 'name' => esc_html__( 'Android', 'redux-framework' ), |
|
| 41 | + 'background' => '', |
|
| 42 | + 'color' => '#A4C639', |
|
| 43 | + 'url' => '', |
|
| 44 | + 'order' => 1, |
|
| 45 | + ), |
|
| 46 | + 2 => array( |
|
| 47 | + 'id' => 'apple', |
|
| 48 | + 'icon' => 'fa-apple', |
|
| 49 | + 'enabled' => false, |
|
| 50 | + 'name' => esc_html__( 'Apple', 'redux-framework' ), |
|
| 51 | + 'style' => '', |
|
| 52 | + 'background' => '', |
|
| 53 | + 'color' => '#e4e4e5', |
|
| 54 | + 'url' => '', |
|
| 55 | + 'order' => 2, |
|
| 56 | + ), |
|
| 57 | + 3 => array( |
|
| 58 | + 'id' => 'behance', |
|
| 59 | + 'icon' => 'fa-behance', |
|
| 60 | + 'enabled' => false, |
|
| 61 | + 'name' => esc_html__( 'behance', 'redux-framework' ), |
|
| 62 | + 'background' => '', |
|
| 63 | + 'color' => '#1769ff', |
|
| 64 | + 'url' => '', |
|
| 65 | + 'order' => 3, |
|
| 66 | + ), |
|
| 67 | + 4 => array( |
|
| 68 | + 'id' => 'behance-square', |
|
| 69 | + 'icon' => 'fa-behance-square', |
|
| 70 | + 'enabled' => false, |
|
| 71 | + 'name' => esc_html__( 'behance square', 'redux-framework' ), |
|
| 72 | + 'background' => '', |
|
| 73 | + 'color' => '#1769ff', |
|
| 74 | + 'url' => '', |
|
| 75 | + 'order' => 4, |
|
| 76 | + ), |
|
| 77 | + 5 => array( |
|
| 78 | + 'id' => 'bitbucket', |
|
| 79 | + 'icon' => 'fa-bitbucket', |
|
| 80 | + 'enabled' => false, |
|
| 81 | + 'name' => esc_html__( 'Bitbucket', 'redux-framework' ), |
|
| 82 | + 'background' => '', |
|
| 83 | + 'color' => '#205081', |
|
| 84 | + 'url' => '', |
|
| 85 | + 'order' => 5, |
|
| 86 | + ), |
|
| 87 | + 6 => array( |
|
| 88 | + 'id' => 'bitbucket-square', |
|
| 89 | + 'icon' => 'fa-bitbucket-square', |
|
| 90 | + 'enabled' => false, |
|
| 91 | + 'name' => esc_html__( 'Bitbucket square', 'redux-framework' ), |
|
| 92 | + 'background' => '', |
|
| 93 | + 'color' => '#205081', |
|
| 94 | + 'url' => '', |
|
| 95 | + 'order' => 6, |
|
| 96 | + ), |
|
| 97 | + 7 => array( |
|
| 98 | + 'id' => 'bitcoin', |
|
| 99 | + 'icon' => 'fa-btc', |
|
| 100 | + 'enabled' => false, |
|
| 101 | + 'name' => esc_html__( 'Bitcoin', 'redux-framework' ), |
|
| 102 | + 'background' => '', |
|
| 103 | + 'color' => '#000000', |
|
| 104 | + 'url' => '', |
|
| 105 | + 'order' => 7, |
|
| 106 | + ), |
|
| 107 | + 8 => array( |
|
| 108 | + 'id' => 'codepen', |
|
| 109 | + 'icon' => 'fa-codepen', |
|
| 110 | + 'enabled' => false, |
|
| 111 | + 'name' => esc_html__( 'CodePen', 'redux-framework' ), |
|
| 112 | + 'background' => '', |
|
| 113 | + 'color' => '#000000', |
|
| 114 | + 'url' => '', |
|
| 115 | + 'order' => 8, |
|
| 116 | + ), |
|
| 117 | + 9 => array( |
|
| 118 | + 'id' => 'css3', |
|
| 119 | + 'icon' => 'fa-css3', |
|
| 120 | + 'enabled' => false, |
|
| 121 | + 'name' => esc_html__( 'CSS3', 'redux-framework' ), |
|
| 122 | + 'background' => '', |
|
| 123 | + 'color' => '#000000', |
|
| 124 | + 'url' => '', |
|
| 125 | + 'order' => 9, |
|
| 126 | + ), |
|
| 127 | + 10 => array( |
|
| 128 | + 'id' => 'delicious', |
|
| 129 | + 'icon' => 'fa-delicious', |
|
| 130 | + 'enabled' => false, |
|
| 131 | + 'name' => esc_html__( 'Delicious', 'redux-framework' ), |
|
| 132 | + 'background' => '', |
|
| 133 | + 'color' => '#3399ff', |
|
| 134 | + 'url' => '', |
|
| 135 | + 'order' => 10, |
|
| 136 | + ), |
|
| 137 | + 11 => array( |
|
| 138 | + 'id' => 'deviantart', |
|
| 139 | + 'icon' => 'fa-deviantart', |
|
| 140 | + 'enabled' => false, |
|
| 141 | + 'name' => esc_html__( 'Deviantart', 'redux-framework' ), |
|
| 142 | + 'background' => '', |
|
| 143 | + 'color' => '#4e6252', |
|
| 144 | + 'url' => '', |
|
| 145 | + 'order' => 11, |
|
| 146 | + ), |
|
| 147 | + 12 => array( |
|
| 148 | + 'id' => 'digg', |
|
| 149 | + 'icon' => 'fa-digg', |
|
| 150 | + 'enabled' => false, |
|
| 151 | + 'name' => esc_html__( 'Digg', 'redux-framework' ), |
|
| 152 | + 'background' => '', |
|
| 153 | + 'color' => '#000000', |
|
| 154 | + 'url' => '', |
|
| 155 | + 'order' => 12, |
|
| 156 | + ), |
|
| 157 | + 13 => array( |
|
| 158 | + 'id' => 'dribbble', |
|
| 159 | + 'icon' => 'fa-dribbble', |
|
| 160 | + 'enabled' => false, |
|
| 161 | + 'name' => esc_html__( 'Dribbble', 'redux-framework' ), |
|
| 162 | + 'background' => '', |
|
| 163 | + 'color' => '#444444', |
|
| 164 | + 'url' => '', |
|
| 165 | + 'order' => 13, |
|
| 166 | + ), |
|
| 167 | + 14 => array( |
|
| 168 | + 'id' => 'dropbox', |
|
| 169 | + 'icon' => 'fa-dropbox', |
|
| 170 | + 'enabled' => false, |
|
| 171 | + 'name' => esc_html__( 'Dropbox', 'redux-framework' ), |
|
| 172 | + 'background' => '', |
|
| 173 | + 'color' => '#007ee5', |
|
| 174 | + 'url' => '', |
|
| 175 | + 'order' => 14, |
|
| 176 | + ), |
|
| 177 | + 15 => array( |
|
| 178 | + 'id' => 'drupal', |
|
| 179 | + 'icon' => 'fa-drupal', |
|
| 180 | + 'enabled' => false, |
|
| 181 | + 'name' => esc_html__( 'Drupal', 'redux-framework' ), |
|
| 182 | + 'background' => '', |
|
| 183 | + 'color' => '#0077c0', |
|
| 184 | + 'url' => '', |
|
| 185 | + 'order' => 15, |
|
| 186 | + ), |
|
| 187 | + 16 => array( |
|
| 188 | + 'id' => 'empire', |
|
| 189 | + 'icon' => 'fa-empire', |
|
| 190 | + 'enabled' => false, |
|
| 191 | + 'name' => esc_html__( 'Empire', 'redux-framework' ), |
|
| 192 | + 'background' => '', |
|
| 193 | + 'color' => '#000000', |
|
| 194 | + 'url' => '', |
|
| 195 | + 'order' => 16, |
|
| 196 | + ), |
|
| 197 | + 17 => array( |
|
| 198 | + 'id' => 'facebook', |
|
| 199 | + 'icon' => 'fa-facebook', |
|
| 200 | + 'enabled' => false, |
|
| 201 | + 'name' => esc_html__( 'Facebook', 'redux-framework' ), |
|
| 202 | + 'background' => '', |
|
| 203 | + 'color' => '#3b5998', |
|
| 204 | + 'url' => '', |
|
| 205 | + 'order' => 17, |
|
| 206 | + ), |
|
| 207 | + 18 => array( |
|
| 208 | + 'id' => 'facebook-square', |
|
| 209 | + 'icon' => 'fa-facebook-square', |
|
| 210 | + 'enabled' => false, |
|
| 211 | + 'name' => esc_html__( 'Facebook square', 'redux-framework' ), |
|
| 212 | + 'background' => '', |
|
| 213 | + 'color' => '#3b5998', |
|
| 214 | + 'url' => '', |
|
| 215 | + 'order' => 18, |
|
| 216 | + ), |
|
| 217 | + 19 => array( |
|
| 218 | + 'id' => 'flickr', |
|
| 219 | + 'icon' => 'fa-flickr', |
|
| 220 | + 'enabled' => false, |
|
| 221 | + 'name' => esc_html__( 'Flickr', 'redux-framework' ), |
|
| 222 | + 'background' => '', |
|
| 223 | + 'color' => '#0063dc', |
|
| 224 | + 'url' => '', |
|
| 225 | + 'order' => 19, |
|
| 226 | + ), |
|
| 227 | + 20 => array( |
|
| 228 | + 'id' => 'foursquare', |
|
| 229 | + 'icon' => 'fa-foursquare', |
|
| 230 | + 'enabled' => false, |
|
| 231 | + 'name' => esc_html__( 'FourSquare', 'redux-framework' ), |
|
| 232 | + 'background' => '', |
|
| 233 | + 'color' => '#0072b1', |
|
| 234 | + 'url' => '', |
|
| 235 | + 'order' => 20, |
|
| 236 | + ), |
|
| 237 | + 21 => array( |
|
| 238 | + 'id' => 'git', |
|
| 239 | + 'icon' => 'fa-git', |
|
| 240 | + 'enabled' => false, |
|
| 241 | + 'name' => esc_html__( 'git', 'redux-framework' ), |
|
| 242 | + 'background' => '', |
|
| 243 | + 'color' => '#000000', |
|
| 244 | + 'url' => '', |
|
| 245 | + 'order' => 21, |
|
| 246 | + ), |
|
| 247 | + 22 => array( |
|
| 248 | + 'id' => 'git-square', |
|
| 249 | + 'icon' => 'fa-git-square', |
|
| 250 | + 'enabled' => false, |
|
| 251 | + 'name' => esc_html__( 'git square', 'redux-framework' ), |
|
| 252 | + 'background' => '', |
|
| 253 | + 'color' => '#000000', |
|
| 254 | + 'url' => '', |
|
| 255 | + 'order' => 22, |
|
| 256 | + ), |
|
| 257 | + 23 => array( |
|
| 258 | + 'id' => 'github', |
|
| 259 | + 'icon' => 'fa-github', |
|
| 260 | + 'enabled' => false, |
|
| 261 | + 'name' => esc_html__( 'github', 'redux-framework' ), |
|
| 262 | + 'background' => '', |
|
| 263 | + 'color' => '#4183c4', |
|
| 264 | + 'url' => '', |
|
| 265 | + 'order' => 23, |
|
| 266 | + ), |
|
| 267 | + 24 => array( |
|
| 268 | + 'id' => 'github-alt', |
|
| 269 | + 'icon' => 'fa-github-alt', |
|
| 270 | + 'enabled' => false, |
|
| 271 | + 'name' => esc_html__( 'github alt', 'redux-framework' ), |
|
| 272 | + 'background' => '', |
|
| 273 | + 'color' => '#4183c4', |
|
| 274 | + 'url' => '', |
|
| 275 | + 'order' => 24, |
|
| 276 | + ), |
|
| 277 | + 25 => array( |
|
| 278 | + 'id' => 'github-square', |
|
| 279 | + 'icon' => 'fa-github-square', |
|
| 280 | + 'enabled' => false, |
|
| 281 | + 'name' => esc_html__( 'github square', 'redux-framework' ), |
|
| 282 | + 'background' => '', |
|
| 283 | + 'color' => '#4183c4', |
|
| 284 | + 'url' => '', |
|
| 285 | + 'order' => 25, |
|
| 286 | + ), |
|
| 287 | + 26 => array( |
|
| 288 | + 'id' => 'gittip', |
|
| 289 | + 'icon' => 'fa-gittip', |
|
| 290 | + 'enabled' => false, |
|
| 291 | + 'name' => esc_html__( 'git tip', 'redux-framework' ), |
|
| 292 | + 'background' => '', |
|
| 293 | + 'color' => '#000000', |
|
| 294 | + 'url' => '', |
|
| 295 | + 'order' => 26, |
|
| 296 | + ), |
|
| 297 | + 27 => array( |
|
| 298 | + 'id' => 'google', |
|
| 299 | + 'icon' => 'fa-google', |
|
| 300 | + 'enabled' => false, |
|
| 301 | + 'name' => esc_html__( 'Google', 'redux-framework' ), |
|
| 302 | + 'background' => '', |
|
| 303 | + 'color' => '#dd4b39', |
|
| 304 | + 'url' => '', |
|
| 305 | + 'order' => 27, |
|
| 306 | + ), |
|
| 307 | + 28 => array( |
|
| 308 | + 'id' => 'google-plus', |
|
| 309 | + 'icon' => 'fa-google-plus', |
|
| 310 | + 'enabled' => false, |
|
| 311 | + 'name' => esc_html__( 'Google Plus', 'redux-framework' ), |
|
| 312 | + 'background' => '', |
|
| 313 | + 'color' => '#dd4b39', |
|
| 314 | + 'url' => '', |
|
| 315 | + 'order' => 28, |
|
| 316 | + ), |
|
| 317 | + 29 => array( |
|
| 318 | + 'id' => 'google-plus-square', |
|
| 319 | + 'icon' => 'fa-google-plus-square', |
|
| 320 | + 'enabled' => false, |
|
| 321 | + 'name' => esc_html__( 'Google Plus square', 'redux-framework' ), |
|
| 322 | + 'background' => '', |
|
| 323 | + 'color' => '#dd4b39', |
|
| 324 | + 'url' => '', |
|
| 325 | + 'order' => 29, |
|
| 326 | + ), |
|
| 327 | + 30 => array( |
|
| 328 | + 'id' => 'hacker-news', |
|
| 329 | + 'icon' => 'fa-hacker-news', |
|
| 330 | + 'enabled' => false, |
|
| 331 | + 'name' => esc_html__( 'Hacker News', 'redux-framework' ), |
|
| 332 | + 'background' => '', |
|
| 333 | + 'color' => '#ff6600', |
|
| 334 | + 'url' => '', |
|
| 335 | + 'order' => 30, |
|
| 336 | + ), |
|
| 337 | + 31 => array( |
|
| 338 | + 'id' => 'html5', |
|
| 339 | + 'icon' => 'fa-html5', |
|
| 340 | + 'enabled' => false, |
|
| 341 | + 'name' => esc_html__( 'HTML5', 'redux-framework' ), |
|
| 342 | + 'background' => '', |
|
| 343 | + 'color' => '#e34f26', |
|
| 344 | + 'url' => '', |
|
| 345 | + 'order' => 31, |
|
| 346 | + ), |
|
| 347 | + 32 => array( |
|
| 348 | + 'id' => 'instagram', |
|
| 349 | + 'icon' => 'fa-instagram', |
|
| 350 | + 'enabled' => false, |
|
| 351 | + 'name' => esc_html__( 'Instagram', 'redux-framework' ), |
|
| 352 | + 'background' => '', |
|
| 353 | + 'color' => '#3f729b', |
|
| 354 | + 'url' => '', |
|
| 355 | + 'order' => 32, |
|
| 356 | + ), |
|
| 357 | + 33 => array( |
|
| 358 | + 'id' => 'joomla', |
|
| 359 | + 'icon' => 'fa-joomla', |
|
| 360 | + 'enabled' => false, |
|
| 361 | + 'name' => esc_html__( 'Joomla', 'redux-framework' ), |
|
| 362 | + 'background' => '', |
|
| 363 | + 'color' => '#000000', |
|
| 364 | + 'url' => '', |
|
| 365 | + 'order' => 33, |
|
| 366 | + ), |
|
| 367 | + 34 => array( |
|
| 368 | + 'id' => 'jsfiddle', |
|
| 369 | + 'icon' => 'fa-jsfiddle', |
|
| 370 | + 'enabled' => false, |
|
| 371 | + 'name' => esc_html__( 'JS Fiddle', 'redux-framework' ), |
|
| 372 | + 'background' => '', |
|
| 373 | + 'color' => '#000000', |
|
| 374 | + 'url' => '', |
|
| 375 | + 'order' => 34, |
|
| 376 | + ), |
|
| 377 | + 35 => array( |
|
| 378 | + 'id' => 'linkedin', |
|
| 379 | + 'icon' => 'fa-linkedin', |
|
| 380 | + 'enabled' => false, |
|
| 381 | + 'name' => esc_html__( 'LinkedIn', 'redux-framework' ), |
|
| 382 | + 'background' => '', |
|
| 383 | + 'color' => '#0976b4', |
|
| 384 | + 'url' => '', |
|
| 385 | + 'order' => 35, |
|
| 386 | + ), |
|
| 387 | + 36 => array( |
|
| 388 | + 'id' => 'linkedin-square', |
|
| 389 | + 'icon' => 'fa-linkedin-square', |
|
| 390 | + 'enabled' => false, |
|
| 391 | + 'name' => esc_html__( 'LinkedIn square', 'redux-framework' ), |
|
| 392 | + 'background' => '', |
|
| 393 | + 'color' => '#0976b4', |
|
| 394 | + 'url' => '', |
|
| 395 | + 'order' => 36, |
|
| 396 | + ), |
|
| 397 | + 37 => array( |
|
| 398 | + 'id' => 'linux', |
|
| 399 | + 'icon' => 'fa-linux', |
|
| 400 | + 'enabled' => false, |
|
| 401 | + 'name' => esc_html__( 'Linux', 'redux-framework' ), |
|
| 402 | + 'background' => '', |
|
| 403 | + 'color' => '#333333', |
|
| 404 | + 'url' => '', |
|
| 405 | + 'order' => 37, |
|
| 406 | + ), |
|
| 407 | + 38 => array( |
|
| 408 | + 'id' => 'maxcdn', |
|
| 409 | + 'icon' => 'fa-maxcdn', |
|
| 410 | + 'enabled' => false, |
|
| 411 | + 'name' => esc_html__( 'MaxCDN', 'redux-framework' ), |
|
| 412 | + 'background' => '', |
|
| 413 | + 'color' => '#f8711e', |
|
| 414 | + 'url' => '', |
|
| 415 | + 'order' => 38, |
|
| 416 | + ), |
|
| 417 | + 39 => array( |
|
| 418 | + 'id' => 'openid', |
|
| 419 | + 'icon' => 'fa-openid', |
|
| 420 | + 'enabled' => false, |
|
| 421 | + 'name' => esc_html__( 'OpenID', 'redux-framework' ), |
|
| 422 | + 'background' => '', |
|
| 423 | + 'color' => '#000000', |
|
| 424 | + 'url' => '', |
|
| 425 | + 'order' => 39, |
|
| 426 | + ), |
|
| 427 | + 40 => array( |
|
| 428 | + 'id' => 'pagelines', |
|
| 429 | + 'icon' => 'fa-pagelines', |
|
| 430 | + 'enabled' => false, |
|
| 431 | + 'name' => esc_html__( 'Page Lines', 'redux-framework' ), |
|
| 432 | + 'background' => '', |
|
| 433 | + 'color' => '#000000', |
|
| 434 | + 'url' => '', |
|
| 435 | + 'order' => 40, |
|
| 436 | + ), |
|
| 437 | + 41 => array( |
|
| 438 | + 'id' => 'pied-piper', |
|
| 439 | + 'icon' => 'fa-pied-piper', |
|
| 440 | + 'enabled' => false, |
|
| 441 | + 'name' => esc_html__( 'Pied Piper', 'redux-framework' ), |
|
| 442 | + 'background' => '', |
|
| 443 | + 'color' => '#000000', |
|
| 444 | + 'url' => '', |
|
| 445 | + 'order' => 41, |
|
| 446 | + ), |
|
| 447 | + 42 => array( |
|
| 448 | + 'id' => 'pied-piper-alt', |
|
| 449 | + 'icon' => 'fa-pied-piper-alt', |
|
| 450 | + 'enabled' => false, |
|
| 451 | + 'name' => esc_html__( 'Pied Piper alt', 'redux-framework' ), |
|
| 452 | + 'background' => '', |
|
| 453 | + 'color' => '#000000', |
|
| 454 | + 'url' => '', |
|
| 455 | + 'order' => 42, |
|
| 456 | + ), |
|
| 457 | + 43 => array( |
|
| 458 | + 'id' => 'pinterest', |
|
| 459 | + 'icon' => 'fa-pinterest', |
|
| 460 | + 'enabled' => false, |
|
| 461 | + 'name' => esc_html__( 'Pinterest', 'redux-framework' ), |
|
| 462 | + 'background' => '', |
|
| 463 | + 'color' => '#1769ff', |
|
| 464 | + 'url' => '', |
|
| 465 | + 'order' => 43, |
|
| 466 | + ), |
|
| 467 | + 44 => array( |
|
| 468 | + 'id' => 'pinterest-square', |
|
| 469 | + 'icon' => 'fa-pinterest-square', |
|
| 470 | + 'enabled' => false, |
|
| 471 | + 'name' => esc_html__( 'Pinterest square', 'redux-framework' ), |
|
| 472 | + 'background' => '', |
|
| 473 | + 'color' => '#1769ff', |
|
| 474 | + 'url' => '', |
|
| 475 | + 'order' => 44, |
|
| 476 | + ), |
|
| 477 | + 45 => array( |
|
| 478 | + 'id' => 'qq', |
|
| 479 | + 'icon' => 'fa-qq', |
|
| 480 | + 'enabled' => false, |
|
| 481 | + 'name' => esc_html__( 'QQ', 'redux-framework' ), |
|
| 482 | + 'background' => '', |
|
| 483 | + 'color' => '#000000', |
|
| 484 | + 'url' => '', |
|
| 485 | + 'order' => 45, |
|
| 486 | + ), |
|
| 487 | + 46 => array( |
|
| 488 | + 'id' => 'rebel', |
|
| 489 | + 'icon' => 'fa-rebel', |
|
| 490 | + 'enabled' => false, |
|
| 491 | + 'name' => esc_html__( 'Rebel', 'redux-framework' ), |
|
| 492 | + 'background' => '', |
|
| 493 | + 'color' => '#517fa4', |
|
| 494 | + 'url' => '', |
|
| 495 | + 'order' => 46, |
|
| 496 | + ), |
|
| 497 | + 47 => array( |
|
| 498 | + 'id' => 'reddit', |
|
| 499 | + 'icon' => 'fa-reddit', |
|
| 500 | + 'enabled' => false, |
|
| 501 | + 'name' => esc_html__( 'Reddit', 'redux-framework' ), |
|
| 502 | + 'background' => '', |
|
| 503 | + 'color' => '#ff4500', |
|
| 504 | + 'url' => '', |
|
| 505 | + 'order' => 47, |
|
| 506 | + ), |
|
| 507 | + 48 => array( |
|
| 508 | + 'id' => 'reddit-square', |
|
| 509 | + 'icon' => 'fa-reddit-square', |
|
| 510 | + 'enabled' => false, |
|
| 511 | + 'name' => esc_html__( 'Reddit square', 'redux-framework' ), |
|
| 512 | + 'background' => '', |
|
| 513 | + 'color' => '#ff4500', |
|
| 514 | + 'url' => '', |
|
| 515 | + 'order' => 48, |
|
| 516 | + ), |
|
| 517 | + 49 => array( |
|
| 518 | + 'id' => 'renren', |
|
| 519 | + 'icon' => 'fa-renren', |
|
| 520 | + 'enabled' => false, |
|
| 521 | + 'name' => esc_html__( 'Ren Ren', 'redux-framework' ), |
|
| 522 | + 'background' => '', |
|
| 523 | + 'color' => '#007bb6', |
|
| 524 | + 'url' => '', |
|
| 525 | + 'order' => 49, |
|
| 526 | + ), |
|
| 527 | + 50 => array( |
|
| 528 | + 'id' => 'share-alt', |
|
| 529 | + 'icon' => 'fa-share-alt', |
|
| 530 | + 'enabled' => false, |
|
| 531 | + 'name' => esc_html__( 'Share alt', 'redux-framework' ), |
|
| 532 | + 'background' => '', |
|
| 533 | + 'color' => '#000000', |
|
| 534 | + 'url' => '', |
|
| 535 | + 'order' => 50, |
|
| 536 | + ), |
|
| 537 | + 51 => array( |
|
| 538 | + 'id' => 'share-alt-square', |
|
| 539 | + 'icon' => 'fa-share-alt-square', |
|
| 540 | + 'enabled' => false, |
|
| 541 | + 'name' => esc_html__( 'Share square', 'redux-framework' ), |
|
| 542 | + 'background' => '', |
|
| 543 | + 'color' => '#000000', |
|
| 544 | + 'url' => '', |
|
| 545 | + 'order' => 51, |
|
| 546 | + ), |
|
| 547 | + 52 => array( |
|
| 548 | + 'id' => 'skype', |
|
| 549 | + 'icon' => 'fa-skype', |
|
| 550 | + 'enabled' => false, |
|
| 551 | + 'name' => esc_html__( 'Skype', 'redux-framework' ), |
|
| 552 | + 'background' => '', |
|
| 553 | + 'color' => '#00aff0', |
|
| 554 | + 'url' => '', |
|
| 555 | + 'order' => 52, |
|
| 556 | + ), |
|
| 557 | + 53 => array( |
|
| 558 | + 'id' => 'slack', |
|
| 559 | + 'icon' => 'fa-slack', |
|
| 560 | + 'enabled' => false, |
|
| 561 | + 'name' => esc_html__( 'Slack', 'redux-framework' ), |
|
| 562 | + 'background' => '', |
|
| 563 | + 'color' => '#000000', |
|
| 564 | + 'url' => '', |
|
| 565 | + 'order' => 53, |
|
| 566 | + ), |
|
| 567 | + 54 => array( |
|
| 568 | + 'id' => 'soundcloud', |
|
| 569 | + 'icon' => 'fa-soundcloud', |
|
| 570 | + 'enabled' => false, |
|
| 571 | + 'name' => esc_html__( 'Sound Cloud', 'redux-framework' ), |
|
| 572 | + 'background' => '', |
|
| 573 | + 'color' => '#f80', |
|
| 574 | + 'url' => '', |
|
| 575 | + 'order' => 54, |
|
| 576 | + ), |
|
| 577 | + 55 => array( |
|
| 578 | + 'id' => 'spotify', |
|
| 579 | + 'icon' => 'fa-spotify', |
|
| 580 | + 'enabled' => false, |
|
| 581 | + 'name' => esc_html__( 'Spotify', 'redux-framework' ), |
|
| 582 | + 'background' => '', |
|
| 583 | + 'color' => '#7ab800', |
|
| 584 | + 'url' => '', |
|
| 585 | + 'order' => 55, |
|
| 586 | + ), |
|
| 587 | + 56 => array( |
|
| 588 | + 'id' => 'stack-exchange', |
|
| 589 | + 'icon' => 'fa-stack-exchange', |
|
| 590 | + 'enabled' => false, |
|
| 591 | + 'name' => esc_html__( 'Stack Exchange', 'redux-framework' ), |
|
| 592 | + 'background' => '', |
|
| 593 | + 'color' => '#000000', |
|
| 594 | + 'url' => '', |
|
| 595 | + 'order' => 56, |
|
| 596 | + ), |
|
| 597 | + 57 => array( |
|
| 598 | + 'id' => 'stack-overflow', |
|
| 599 | + 'icon' => 'fa-stack-overflow', |
|
| 600 | + 'enabled' => false, |
|
| 601 | + 'name' => esc_html__( 'Stack Overflow', 'redux-framework' ), |
|
| 602 | + 'background' => '', |
|
| 603 | + 'color' => '#fe7a15', |
|
| 604 | + 'url' => '', |
|
| 605 | + 'order' => 57, |
|
| 606 | + ), |
|
| 607 | + 58 => array( |
|
| 608 | + 'id' => 'steam', |
|
| 609 | + 'icon' => 'fa-steam', |
|
| 610 | + 'enabled' => false, |
|
| 611 | + 'name' => esc_html__( 'Steam', 'redux-framework' ), |
|
| 612 | + 'background' => '', |
|
| 613 | + 'color' => '#000000', |
|
| 614 | + 'url' => '', |
|
| 615 | + 'order' => 58, |
|
| 616 | + ), |
|
| 617 | + 59 => array( |
|
| 618 | + 'id' => 'steam-square', |
|
| 619 | + 'icon' => 'fa-steam-square', |
|
| 620 | + 'enabled' => false, |
|
| 621 | + 'name' => esc_html__( 'Steam square', 'redux-framework' ), |
|
| 622 | + 'background' => '', |
|
| 623 | + 'color' => '#000000', |
|
| 624 | + 'url' => '', |
|
| 625 | + 'order' => 59, |
|
| 626 | + ), |
|
| 627 | + 60 => array( |
|
| 628 | + 'id' => 'stumbleupon', |
|
| 629 | + 'icon' => 'fa-stumbleupon', |
|
| 630 | + 'enabled' => false, |
|
| 631 | + 'name' => esc_html__( 'Stumble Upon', 'redux-framework' ), |
|
| 632 | + 'background' => '', |
|
| 633 | + 'color' => '#eb4924', |
|
| 634 | + 'url' => '', |
|
| 635 | + 'order' => 60, |
|
| 636 | + ), |
|
| 637 | + 61 => array( |
|
| 638 | + 'id' => 'stumbleupon-circle', |
|
| 639 | + 'icon' => 'fa-stumbleupon-circle', |
|
| 640 | + 'enabled' => false, |
|
| 641 | + 'name' => esc_html__( 'Stumble Upon circle', 'redux-framework' ), |
|
| 642 | + 'background' => '', |
|
| 643 | + 'color' => '#eb4924', |
|
| 644 | + 'url' => '', |
|
| 645 | + 'order' => 61, |
|
| 646 | + ), |
|
| 647 | + 62 => array( |
|
| 648 | + 'id' => 'tencent-weibo', |
|
| 649 | + 'icon' => 'fa-tencent-weibo', |
|
| 650 | + 'enabled' => false, |
|
| 651 | + 'name' => esc_html__( 'Tencent Weibo', 'redux-framework' ), |
|
| 652 | + 'background' => '', |
|
| 653 | + 'color' => '#000000', |
|
| 654 | + 'url' => '', |
|
| 655 | + 'order' => 62, |
|
| 656 | + ), |
|
| 657 | + 63 => array( |
|
| 658 | + 'id' => 'trello', |
|
| 659 | + 'icon' => 'fa-trello', |
|
| 660 | + 'enabled' => false, |
|
| 661 | + 'name' => esc_html__( 'Trello', 'redux-framework' ), |
|
| 662 | + 'background' => '', |
|
| 663 | + 'color' => '#256a92', |
|
| 664 | + 'url' => '', |
|
| 665 | + 'order' => 63, |
|
| 666 | + ), |
|
| 667 | + 64 => array( |
|
| 668 | + 'id' => 'tumblr', |
|
| 669 | + 'icon' => 'fa-tumblr', |
|
| 670 | + 'enabled' => false, |
|
| 671 | + 'name' => esc_html__( 'Tumblr', 'redux-framework' ), |
|
| 672 | + 'background' => '', |
|
| 673 | + 'color' => '#35465c', |
|
| 674 | + 'url' => '', |
|
| 675 | + 'order' => 64, |
|
| 676 | + ), |
|
| 677 | + 65 => array( |
|
| 678 | + 'id' => 'tumblr-square', |
|
| 679 | + 'icon' => 'fa-tumblr-square', |
|
| 680 | + 'enabled' => false, |
|
| 681 | + 'name' => esc_html__( 'Tumblr square', 'redux-framework' ), |
|
| 682 | + 'background' => '', |
|
| 683 | + 'color' => '#35465c', |
|
| 684 | + 'url' => '', |
|
| 685 | + 'order' => 65, |
|
| 686 | + ), |
|
| 687 | + 66 => array( |
|
| 688 | + 'id' => 'twitter', |
|
| 689 | + 'icon' => 'fa-twitter', |
|
| 690 | + 'enabled' => false, |
|
| 691 | + 'name' => esc_html__( 'Twitter', 'redux-framework' ), |
|
| 692 | + 'background' => '', |
|
| 693 | + 'color' => '#55acee', |
|
| 694 | + 'url' => '', |
|
| 695 | + 'order' => 66, |
|
| 696 | + ), |
|
| 697 | + 67 => array( |
|
| 698 | + 'id' => 'twitter-square', |
|
| 699 | + 'icon' => 'fa-twitter-square', |
|
| 700 | + 'enabled' => false, |
|
| 701 | + 'name' => esc_html__( 'Twitter square', 'redux-framework' ), |
|
| 702 | + 'background' => '', |
|
| 703 | + 'color' => '#55acee', |
|
| 704 | + 'url' => '', |
|
| 705 | + 'order' => 67, |
|
| 706 | + ), |
|
| 707 | + 68 => array( |
|
| 708 | + 'id' => 'vimeo-square', |
|
| 709 | + 'icon' => 'fa-vimeo-square', |
|
| 710 | + 'enabled' => false, |
|
| 711 | + 'name' => esc_html__( 'Vimeo square', 'redux-framework' ), |
|
| 712 | + 'background' => '', |
|
| 713 | + 'color' => '#1ab7ea', |
|
| 714 | + 'url' => '', |
|
| 715 | + 'order' => 68, |
|
| 716 | + ), |
|
| 717 | + 69 => array( |
|
| 718 | + 'id' => 'vine', |
|
| 719 | + 'icon' => 'fa-vine', |
|
| 720 | + 'enabled' => false, |
|
| 721 | + 'name' => esc_html__( 'Vine', 'redux-framework' ), |
|
| 722 | + 'background' => '', |
|
| 723 | + 'color' => '#00b488', |
|
| 724 | + 'url' => '', |
|
| 725 | + 'order' => 69, |
|
| 726 | + ), |
|
| 727 | + 70 => array( |
|
| 728 | + 'id' => 'vk', |
|
| 729 | + 'icon' => 'fa-vk', |
|
| 730 | + 'enabled' => false, |
|
| 731 | + 'name' => esc_html__( 'VK', 'redux-framework' ), |
|
| 732 | + 'background' => '', |
|
| 733 | + 'color' => '#000000', |
|
| 734 | + 'url' => '', |
|
| 735 | + 'order' => 70, |
|
| 736 | + ), |
|
| 737 | + 71 => array( |
|
| 738 | + 'id' => 'weibo', |
|
| 739 | + 'icon' => 'fa-weibo', |
|
| 740 | + 'enabled' => false, |
|
| 741 | + 'name' => esc_html__( 'Weibo', 'redux-framework' ), |
|
| 742 | + 'background' => '', |
|
| 743 | + 'color' => '#000000', |
|
| 744 | + 'url' => '', |
|
| 745 | + 'order' => 71, |
|
| 746 | + ), |
|
| 747 | + 72 => array( |
|
| 748 | + 'id' => 'weixin', |
|
| 749 | + 'icon' => 'fa-weixin', |
|
| 750 | + 'enabled' => false, |
|
| 751 | + 'name' => esc_html__( 'Weixin', 'redux-framework' ), |
|
| 752 | + 'background' => '', |
|
| 753 | + 'color' => '#000000', |
|
| 754 | + 'url' => '', |
|
| 755 | + 'order' => 72, |
|
| 756 | + ), |
|
| 757 | + 73 => array( |
|
| 758 | + 'id' => 'windows', |
|
| 759 | + 'icon' => 'fa-windows', |
|
| 760 | + 'enabled' => false, |
|
| 761 | + 'name' => esc_html__( 'Windows', 'redux-framework' ), |
|
| 762 | + 'background' => '', |
|
| 763 | + 'color' => '#00bcf2', |
|
| 764 | + 'url' => '', |
|
| 765 | + 'order' => 73, |
|
| 766 | + ), |
|
| 767 | + 74 => array( |
|
| 768 | + 'id' => 'wordpress', |
|
| 769 | + 'icon' => 'fa-wordpress', |
|
| 770 | + 'enabled' => false, |
|
| 771 | + 'name' => esc_html__( 'WordPress', 'redux-framework' ), |
|
| 772 | + 'background' => '', |
|
| 773 | + 'color' => '#21759b', |
|
| 774 | + 'url' => '', |
|
| 775 | + 'order' => 74, |
|
| 776 | + ), |
|
| 777 | + 75 => array( |
|
| 778 | + 'id' => 'xing', |
|
| 779 | + 'icon' => 'fa-xing', |
|
| 780 | + 'enabled' => false, |
|
| 781 | + 'name' => esc_html__( 'Xing', 'redux-framework' ), |
|
| 782 | + 'background' => '', |
|
| 783 | + 'color' => '#026466', |
|
| 784 | + 'url' => '', |
|
| 785 | + 'order' => 75, |
|
| 786 | + ), |
|
| 787 | + 76 => array( |
|
| 788 | + 'id' => 'xing-square', |
|
| 789 | + 'icon' => 'fa-xing-square', |
|
| 790 | + 'enabled' => false, |
|
| 791 | + 'name' => esc_html__( 'Xing square', 'redux-framework' ), |
|
| 792 | + 'background' => '', |
|
| 793 | + 'color' => '#026466', |
|
| 794 | + 'url' => '', |
|
| 795 | + 'order' => 76, |
|
| 796 | + ), |
|
| 797 | + 77 => array( |
|
| 798 | + 'id' => 'yahoo', |
|
| 799 | + 'icon' => 'fa-yahoo', |
|
| 800 | + 'enabled' => false, |
|
| 801 | + 'name' => esc_html__( 'Yahoo', 'redux-framework' ), |
|
| 802 | + 'background' => '', |
|
| 803 | + 'color' => '#400191', |
|
| 804 | + 'url' => '', |
|
| 805 | + 'order' => 77, |
|
| 806 | + ), |
|
| 807 | + 78 => array( |
|
| 808 | + 'id' => 'yelp', |
|
| 809 | + 'icon' => 'fa-yelp', |
|
| 810 | + 'enabled' => false, |
|
| 811 | + 'name' => esc_html__( 'Yelp', 'redux-framework' ), |
|
| 812 | + 'background' => '', |
|
| 813 | + 'color' => '#C93C27', |
|
| 814 | + 'url' => '', |
|
| 815 | + 'order' => 78, |
|
| 816 | + ), |
|
| 817 | + 79 => array( |
|
| 818 | + 'id' => 'youtube', |
|
| 819 | + 'icon' => 'fa-youtube', |
|
| 820 | + 'enabled' => false, |
|
| 821 | + 'name' => esc_html__( 'YouTube', 'redux-framework' ), |
|
| 822 | + 'background' => '', |
|
| 823 | + 'color' => '#e52d27', |
|
| 824 | + 'url' => '', |
|
| 825 | + 'order' => 79, |
|
| 826 | + ), |
|
| 827 | + 80 => array( |
|
| 828 | + 'id' => 'youtube-play', |
|
| 829 | + 'icon' => 'fa-youtube-play', |
|
| 830 | + 'enabled' => false, |
|
| 831 | + 'name' => esc_html__( 'YouTube play', 'redux-framework' ), |
|
| 832 | + 'background' => '', |
|
| 833 | + 'color' => '#e52d27', |
|
| 834 | + 'url' => '', |
|
| 835 | + 'order' => 80, |
|
| 836 | + ), |
|
| 837 | + 81 => array( |
|
| 838 | + 'id' => 'youtube-square', |
|
| 839 | + 'icon' => 'fa-youtube-square', |
|
| 840 | + 'enabled' => false, |
|
| 841 | + 'name' => esc_html__( 'YouTube square', 'redux-framework' ), |
|
| 842 | + 'background' => '', |
|
| 843 | + 'color' => '#e52d27', |
|
| 844 | + 'url' => '', |
|
| 845 | + 'order' => 81, |
|
| 846 | + ), |
|
| 847 | + ); |
|
| 848 | + } |
|
| 849 | + } |
|
| 850 | 850 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @param null $param Who knows. |
| 73 | 73 | */ |
| 74 | 74 | public function register( $widget, $param = null ) { |
| 75 | - $this->widgets[ $widget ] = new $widget( $param ); |
|
| 75 | + $this->widgets[$widget] = new $widget( $param ); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $title = $instance['title']; |
| 126 | 126 | $redux_options = get_option( $this->parent->args['opt_name'] ); |
| 127 | 127 | |
| 128 | - $social_items = $redux_options[ $this->field_id ]; |
|
| 128 | + $social_items = $redux_options[$this->field_id]; |
|
| 129 | 129 | |
| 130 | 130 | echo $before_widget; // phpcs:ignore WordPress.Security.EscapeOutput |
| 131 | 131 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | 'title' => esc_html__( 'Social', 'redux-framework' ), |
| 191 | 191 | ); |
| 192 | 192 | |
| 193 | - $instance = wp_parse_args( (array) $instance, $defaults ); |
|
| 193 | + $instance = wp_parse_args( ( array ) $instance, $defaults ); |
|
| 194 | 194 | ?> |
| 195 | 195 | <p> |
| 196 | 196 | <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"> |
@@ -13,187 +13,187 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | if ( ! class_exists( 'Redux_Social_Profiles_Widget' ) ) { |
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Class Redux_Social_Profiles_Widget |
|
| 18 | - */ |
|
| 19 | - class Redux_Social_Profiles_Widget { |
|
| 20 | - |
|
| 21 | - /** |
|
| 22 | - * Field ID. |
|
| 23 | - * |
|
| 24 | - * @var string|null |
|
| 25 | - */ |
|
| 26 | - public ?string $field_id = ''; |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * ReduxFramework object pointer. |
|
| 30 | - * |
|
| 31 | - * @var ReduxFramework|null |
|
| 32 | - */ |
|
| 33 | - public ?ReduxFramework $parent = null; |
|
| 34 | - |
|
| 35 | - /** |
|
| 36 | - * Redux_Social_Profiles_Widget constructor. |
|
| 37 | - * |
|
| 38 | - * @param ReduxFramework $redux ReduxFramework object. |
|
| 39 | - * @param string $field_id Field ID. |
|
| 40 | - */ |
|
| 41 | - public function __construct( ReduxFramework $redux, string $field_id ) { |
|
| 42 | - return; |
|
| 43 | - |
|
| 44 | - $this->parent = $redux; |
|
| 45 | - $this->field_id = $field_id; |
|
| 46 | - |
|
| 47 | - |
|
| 48 | - $this->params = array( |
|
| 49 | - 'parent' => $this->parent, |
|
| 50 | - 'field_id' => $this->field_id, |
|
| 51 | - ); |
|
| 52 | - |
|
| 53 | - add_action( 'widgets_init', array( $this, 'load_widget' ), 0 ); |
|
| 54 | - } |
|
| 55 | - |
|
| 56 | - /** |
|
| 57 | - * Load widget |
|
| 58 | - */ |
|
| 59 | - public function load_widget() { |
|
| 60 | - $x = new Extend_WP_Widget_Factory(); |
|
| 61 | - $x->register( 'Redux_Social_Widget_Display', $this->params ); |
|
| 62 | - } |
|
| 63 | - } |
|
| 64 | - |
|
| 65 | - /** |
|
| 66 | - * Class Extend_WP_Widget_Factory |
|
| 67 | - */ |
|
| 68 | - // phpcs:ignore Generic.Files.OneClassPerFile |
|
| 69 | - class Extend_WP_Widget_Factory extends WP_Widget_Factory { |
|
| 70 | - /** |
|
| 71 | - * Register widget. |
|
| 72 | - * |
|
| 73 | - * @param string|WP_Widget $widget Widget class. |
|
| 74 | - * @param null $param Who knows. |
|
| 75 | - */ |
|
| 76 | - public function register( $widget, $param = null ) { |
|
| 77 | - $this->widgets[ $widget ] = new $widget( $param ); |
|
| 78 | - } |
|
| 79 | - } |
|
| 80 | - |
|
| 81 | - /** |
|
| 82 | - * Class Redux_Social_Widget_Display |
|
| 83 | - */ |
|
| 84 | - class Redux_Social_Widget_Display extends WP_Widget { |
|
| 85 | - |
|
| 86 | - public $show_instance_in_rest = true; |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * Redux_Social_Widget_Display constructor. |
|
| 90 | - * |
|
| 91 | - * @param array $params Params. |
|
| 92 | - */ |
|
| 93 | - public function __construct( $params ) { |
|
| 94 | - |
|
| 95 | - extract( $params ); // phpcs:ignore WordPress.PHP.DontExtract |
|
| 96 | - |
|
| 97 | - $this->parent = $parent; |
|
| 98 | - $this->field_id = $field_id; |
|
| 99 | - |
|
| 100 | - $widget_ops = array( |
|
| 101 | - 'classname' => 'redux-social-icons-display', |
|
| 102 | - 'description' => __( 'Display social media links', 'redux-framework' ), |
|
| 103 | - 'show_instance_in_rest' => true |
|
| 104 | - ); |
|
| 105 | - |
|
| 106 | - $control_ops = array( |
|
| 107 | - 'width' => 250, |
|
| 108 | - 'height' => 200, |
|
| 109 | - 'id_base' => 'redux-social-icons-display', |
|
| 110 | - 'show_instance_in_rest' => true, |
|
| 111 | - ); |
|
| 112 | - |
|
| 113 | - parent::__construct( 'redux-social-icons-display', 'Redux Social Widget', $widget_ops, $control_ops ); |
|
| 114 | - } |
|
| 115 | - |
|
| 116 | - /** |
|
| 117 | - * Widget render. |
|
| 118 | - * |
|
| 119 | - * @param array $args Args. |
|
| 120 | - * @param array $instance Instance. |
|
| 121 | - */ |
|
| 122 | - public function widget( $args, $instance ) { |
|
| 123 | - include_once 'class-redux-social-profiles-functions.php'; |
|
| 124 | - |
|
| 125 | - extract( $args, EXTR_SKIP ); // phpcs:ignore WordPress.PHP.DontExtract |
|
| 126 | - |
|
| 127 | - $title = $instance['title']; |
|
| 128 | - $redux_options = get_option( $this->parent->args['opt_name'] ); |
|
| 129 | - |
|
| 130 | - $social_items = $redux_options[ $this->field_id ]; |
|
| 131 | - |
|
| 132 | - echo $before_widget; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 133 | - |
|
| 134 | - if ( $title ) { |
|
| 135 | - echo $before_title . esc_html( $title ) . $after_title; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 136 | - } |
|
| 137 | - |
|
| 138 | - ?> |
|
| 16 | + /** |
|
| 17 | + * Class Redux_Social_Profiles_Widget |
|
| 18 | + */ |
|
| 19 | + class Redux_Social_Profiles_Widget { |
|
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * Field ID. |
|
| 23 | + * |
|
| 24 | + * @var string|null |
|
| 25 | + */ |
|
| 26 | + public ?string $field_id = ''; |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * ReduxFramework object pointer. |
|
| 30 | + * |
|
| 31 | + * @var ReduxFramework|null |
|
| 32 | + */ |
|
| 33 | + public ?ReduxFramework $parent = null; |
|
| 34 | + |
|
| 35 | + /** |
|
| 36 | + * Redux_Social_Profiles_Widget constructor. |
|
| 37 | + * |
|
| 38 | + * @param ReduxFramework $redux ReduxFramework object. |
|
| 39 | + * @param string $field_id Field ID. |
|
| 40 | + */ |
|
| 41 | + public function __construct( ReduxFramework $redux, string $field_id ) { |
|
| 42 | + return; |
|
| 43 | + |
|
| 44 | + $this->parent = $redux; |
|
| 45 | + $this->field_id = $field_id; |
|
| 46 | + |
|
| 47 | + |
|
| 48 | + $this->params = array( |
|
| 49 | + 'parent' => $this->parent, |
|
| 50 | + 'field_id' => $this->field_id, |
|
| 51 | + ); |
|
| 52 | + |
|
| 53 | + add_action( 'widgets_init', array( $this, 'load_widget' ), 0 ); |
|
| 54 | + } |
|
| 55 | + |
|
| 56 | + /** |
|
| 57 | + * Load widget |
|
| 58 | + */ |
|
| 59 | + public function load_widget() { |
|
| 60 | + $x = new Extend_WP_Widget_Factory(); |
|
| 61 | + $x->register( 'Redux_Social_Widget_Display', $this->params ); |
|
| 62 | + } |
|
| 63 | + } |
|
| 64 | + |
|
| 65 | + /** |
|
| 66 | + * Class Extend_WP_Widget_Factory |
|
| 67 | + */ |
|
| 68 | + // phpcs:ignore Generic.Files.OneClassPerFile |
|
| 69 | + class Extend_WP_Widget_Factory extends WP_Widget_Factory { |
|
| 70 | + /** |
|
| 71 | + * Register widget. |
|
| 72 | + * |
|
| 73 | + * @param string|WP_Widget $widget Widget class. |
|
| 74 | + * @param null $param Who knows. |
|
| 75 | + */ |
|
| 76 | + public function register( $widget, $param = null ) { |
|
| 77 | + $this->widgets[ $widget ] = new $widget( $param ); |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * Class Redux_Social_Widget_Display |
|
| 83 | + */ |
|
| 84 | + class Redux_Social_Widget_Display extends WP_Widget { |
|
| 85 | + |
|
| 86 | + public $show_instance_in_rest = true; |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * Redux_Social_Widget_Display constructor. |
|
| 90 | + * |
|
| 91 | + * @param array $params Params. |
|
| 92 | + */ |
|
| 93 | + public function __construct( $params ) { |
|
| 94 | + |
|
| 95 | + extract( $params ); // phpcs:ignore WordPress.PHP.DontExtract |
|
| 96 | + |
|
| 97 | + $this->parent = $parent; |
|
| 98 | + $this->field_id = $field_id; |
|
| 99 | + |
|
| 100 | + $widget_ops = array( |
|
| 101 | + 'classname' => 'redux-social-icons-display', |
|
| 102 | + 'description' => __( 'Display social media links', 'redux-framework' ), |
|
| 103 | + 'show_instance_in_rest' => true |
|
| 104 | + ); |
|
| 105 | + |
|
| 106 | + $control_ops = array( |
|
| 107 | + 'width' => 250, |
|
| 108 | + 'height' => 200, |
|
| 109 | + 'id_base' => 'redux-social-icons-display', |
|
| 110 | + 'show_instance_in_rest' => true, |
|
| 111 | + ); |
|
| 112 | + |
|
| 113 | + parent::__construct( 'redux-social-icons-display', 'Redux Social Widget', $widget_ops, $control_ops ); |
|
| 114 | + } |
|
| 115 | + |
|
| 116 | + /** |
|
| 117 | + * Widget render. |
|
| 118 | + * |
|
| 119 | + * @param array $args Args. |
|
| 120 | + * @param array $instance Instance. |
|
| 121 | + */ |
|
| 122 | + public function widget( $args, $instance ) { |
|
| 123 | + include_once 'class-redux-social-profiles-functions.php'; |
|
| 124 | + |
|
| 125 | + extract( $args, EXTR_SKIP ); // phpcs:ignore WordPress.PHP.DontExtract |
|
| 126 | + |
|
| 127 | + $title = $instance['title']; |
|
| 128 | + $redux_options = get_option( $this->parent->args['opt_name'] ); |
|
| 129 | + |
|
| 130 | + $social_items = $redux_options[ $this->field_id ]; |
|
| 131 | + |
|
| 132 | + echo $before_widget; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 133 | + |
|
| 134 | + if ( $title ) { |
|
| 135 | + echo $before_title . esc_html( $title ) . $after_title; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 136 | + } |
|
| 137 | + |
|
| 138 | + ?> |
|
| 139 | 139 | <ul class="redux-social-media-list clearfix"> |
| 140 | 140 | <?php |
| 141 | - if ( is_array( $social_items ) ) { |
|
| 142 | - foreach ( $social_items as $social_item ) { |
|
| 143 | - if ( $social_item['enabled'] ) { |
|
| 144 | - $icon = $social_item['icon']; |
|
| 145 | - $color = $social_item['color']; |
|
| 146 | - $background = $social_item['background']; |
|
| 147 | - $base_url = $social_item['url']; |
|
| 148 | - $id = $social_item['id']; |
|
| 149 | - |
|
| 150 | - // phpcs:ignore WordPress.NamingConventions.ValidHookName |
|
| 151 | - $url = apply_filters( 'redux/extensions/social_profiles/' . $this->parent->args['opt_name'] . '/icon_url', $id, $base_url ); |
|
| 152 | - |
|
| 153 | - echo '<li>'; |
|
| 154 | - echo '<a href="' . esc_url( $url ) . '">'; |
|
| 155 | - Redux_Social_Profiles_Functions::render_icon( $icon, $color, $background, '' ); |
|
| 156 | - echo '</a>'; |
|
| 157 | - echo '</li>'; |
|
| 158 | - } |
|
| 159 | - } |
|
| 160 | - } |
|
| 161 | - ?> |
|
| 141 | + if ( is_array( $social_items ) ) { |
|
| 142 | + foreach ( $social_items as $social_item ) { |
|
| 143 | + if ( $social_item['enabled'] ) { |
|
| 144 | + $icon = $social_item['icon']; |
|
| 145 | + $color = $social_item['color']; |
|
| 146 | + $background = $social_item['background']; |
|
| 147 | + $base_url = $social_item['url']; |
|
| 148 | + $id = $social_item['id']; |
|
| 149 | + |
|
| 150 | + // phpcs:ignore WordPress.NamingConventions.ValidHookName |
|
| 151 | + $url = apply_filters( 'redux/extensions/social_profiles/' . $this->parent->args['opt_name'] . '/icon_url', $id, $base_url ); |
|
| 152 | + |
|
| 153 | + echo '<li>'; |
|
| 154 | + echo '<a href="' . esc_url( $url ) . '">'; |
|
| 155 | + Redux_Social_Profiles_Functions::render_icon( $icon, $color, $background, '' ); |
|
| 156 | + echo '</a>'; |
|
| 157 | + echo '</li>'; |
|
| 158 | + } |
|
| 159 | + } |
|
| 160 | + } |
|
| 161 | + ?> |
|
| 162 | 162 | </ul> |
| 163 | 163 | <?php |
| 164 | 164 | |
| 165 | - echo $after_widget; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 166 | - } |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * Update Widget. |
|
| 170 | - * |
|
| 171 | - * @param array $new_instance New instance. |
|
| 172 | - * @param array $old_instance Old instance. |
|
| 173 | - * |
|
| 174 | - * @return array |
|
| 175 | - */ |
|
| 176 | - public function update( $new_instance, $old_instance ): array { |
|
| 177 | - $instance = $old_instance; |
|
| 178 | - $instance['title'] = wp_strip_all_tags( $new_instance['title'] ?? '' ); |
|
| 179 | - |
|
| 180 | - return $instance; |
|
| 181 | - } |
|
| 182 | - |
|
| 183 | - /** |
|
| 184 | - * Render widget form. |
|
| 185 | - * |
|
| 186 | - * @param array $instance Instance. |
|
| 187 | - * |
|
| 188 | - * @return void |
|
| 189 | - */ |
|
| 190 | - public function form( $instance ) { |
|
| 191 | - $defaults = array( |
|
| 192 | - 'title' => esc_html__( 'Social', 'redux-framework' ), |
|
| 193 | - ); |
|
| 194 | - |
|
| 195 | - $instance = wp_parse_args( (array) $instance, $defaults ); |
|
| 196 | - ?> |
|
| 165 | + echo $after_widget; // phpcs:ignore WordPress.Security.EscapeOutput |
|
| 166 | + } |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * Update Widget. |
|
| 170 | + * |
|
| 171 | + * @param array $new_instance New instance. |
|
| 172 | + * @param array $old_instance Old instance. |
|
| 173 | + * |
|
| 174 | + * @return array |
|
| 175 | + */ |
|
| 176 | + public function update( $new_instance, $old_instance ): array { |
|
| 177 | + $instance = $old_instance; |
|
| 178 | + $instance['title'] = wp_strip_all_tags( $new_instance['title'] ?? '' ); |
|
| 179 | + |
|
| 180 | + return $instance; |
|
| 181 | + } |
|
| 182 | + |
|
| 183 | + /** |
|
| 184 | + * Render widget form. |
|
| 185 | + * |
|
| 186 | + * @param array $instance Instance. |
|
| 187 | + * |
|
| 188 | + * @return void |
|
| 189 | + */ |
|
| 190 | + public function form( $instance ) { |
|
| 191 | + $defaults = array( |
|
| 192 | + 'title' => esc_html__( 'Social', 'redux-framework' ), |
|
| 193 | + ); |
|
| 194 | + |
|
| 195 | + $instance = wp_parse_args( (array) $instance, $defaults ); |
|
| 196 | + ?> |
|
| 197 | 197 | <p> |
| 198 | 198 | <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"> |
| 199 | 199 | <?php esc_html_e( 'Title', 'redux-framework' ); ?> |
@@ -206,15 +206,15 @@ discard block |
||
| 206 | 206 | </label> |
| 207 | 207 | <label for="redux-social-icons-info"> |
| 208 | 208 | <?php |
| 209 | - $tab = Redux_Helpers::tab_from_field( $this->parent, 'social_profiles' ); |
|
| 210 | - $slug = $this->parent->args['page_slug']; |
|
| 209 | + $tab = Redux_Helpers::tab_from_field( $this->parent, 'social_profiles' ); |
|
| 210 | + $slug = $this->parent->args['page_slug']; |
|
| 211 | 211 | |
| 212 | - // translators: %1$s: Settings page URL. %2$s: Closing a tag. |
|
| 213 | - printf( esc_html__( 'Control which icons are displayed and their urls on the %1$sssettings page%2$s', 'redux-framework' ), '<a href="' . esc_url( admin_url( 'admin.php?page=' . esc_attr( $slug ) . '&tab=' . esc_attr( $tab ) ) ) . '">', '</a>' ); |
|
| 214 | - ?> |
|
| 212 | + // translators: %1$s: Settings page URL. %2$s: Closing a tag. |
|
| 213 | + printf( esc_html__( 'Control which icons are displayed and their urls on the %1$sssettings page%2$s', 'redux-framework' ), '<a href="' . esc_url( admin_url( 'admin.php?page=' . esc_attr( $slug ) . '&tab=' . esc_attr( $tab ) ) ) . '">', '</a>' ); |
|
| 214 | + ?> |
|
| 215 | 215 | </label> |
| 216 | 216 | </p> |
| 217 | 217 | <?php |
| 218 | - } |
|
| 219 | - } |
|
| 218 | + } |
|
| 219 | + } |
|
| 220 | 220 | } |
@@ -18,50 +18,50 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | class Template_Overrides { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * ReduxTemplates Template_Overrides. |
|
| 23 | - * |
|
| 24 | - * @since 4.0.0 |
|
| 25 | - */ |
|
| 26 | - public function __construct() { |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - /** |
|
| 30 | - * Detects if the current page has blocks or not. |
|
| 31 | - * |
|
| 32 | - * @return bool |
|
| 33 | - * @since 4.0.0 |
|
| 34 | - */ |
|
| 35 | - public static function is_gutenberg(): bool { |
|
| 36 | - global $post; |
|
| 37 | - if ( function_exists( 'has_blocks' ) && has_blocks( $post->ID ) ) { |
|
| 38 | - return true; |
|
| 39 | - } |
|
| 40 | - |
|
| 41 | - return false; |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - /** |
|
| 45 | - * Detects the current theme and provides overrides. |
|
| 46 | - * |
|
| 47 | - * @return string |
|
| 48 | - * @since 4.0.0 |
|
| 49 | - */ |
|
| 50 | - public static function get_overrides(): string { |
|
| 51 | - |
|
| 52 | - if ( ! self::is_gutenberg() ) { |
|
| 53 | - return ''; |
|
| 54 | - } |
|
| 55 | - |
|
| 56 | - $template = mb_strtolower( get_template() ); |
|
| 57 | - |
|
| 58 | - $css = ''; |
|
| 59 | - if ( method_exists( __CLASS__, $template ) ) { |
|
| 60 | - $css = call_user_func( array( __CLASS__, $template ) ); |
|
| 61 | - $css = preg_replace( '/\s+/S', ' ', $css ); |
|
| 62 | - } |
|
| 63 | - |
|
| 64 | - $css .= <<<'EOD' |
|
| 21 | + /** |
|
| 22 | + * ReduxTemplates Template_Overrides. |
|
| 23 | + * |
|
| 24 | + * @since 4.0.0 |
|
| 25 | + */ |
|
| 26 | + public function __construct() { |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + /** |
|
| 30 | + * Detects if the current page has blocks or not. |
|
| 31 | + * |
|
| 32 | + * @return bool |
|
| 33 | + * @since 4.0.0 |
|
| 34 | + */ |
|
| 35 | + public static function is_gutenberg(): bool { |
|
| 36 | + global $post; |
|
| 37 | + if ( function_exists( 'has_blocks' ) && has_blocks( $post->ID ) ) { |
|
| 38 | + return true; |
|
| 39 | + } |
|
| 40 | + |
|
| 41 | + return false; |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + /** |
|
| 45 | + * Detects the current theme and provides overrides. |
|
| 46 | + * |
|
| 47 | + * @return string |
|
| 48 | + * @since 4.0.0 |
|
| 49 | + */ |
|
| 50 | + public static function get_overrides(): string { |
|
| 51 | + |
|
| 52 | + if ( ! self::is_gutenberg() ) { |
|
| 53 | + return ''; |
|
| 54 | + } |
|
| 55 | + |
|
| 56 | + $template = mb_strtolower( get_template() ); |
|
| 57 | + |
|
| 58 | + $css = ''; |
|
| 59 | + if ( method_exists( __CLASS__, $template ) ) { |
|
| 60 | + $css = call_user_func( array( __CLASS__, $template ) ); |
|
| 61 | + $css = preg_replace( '/\s+/S', ' ', $css ); |
|
| 62 | + } |
|
| 63 | + |
|
| 64 | + $css .= <<<'EOD' |
|
| 65 | 65 | #main { |
| 66 | 66 | padding: unset !important; |
| 67 | 67 | } |
@@ -78,68 +78,68 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | EOD; |
| 81 | - // Remove comments. |
|
| 82 | - $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); |
|
| 83 | - // Remove space after colons. |
|
| 84 | - $css = str_replace( ': ', ':', $css ); |
|
| 85 | - // Remove space after commas. |
|
| 86 | - $css = str_replace( ', ', ',', $css ); |
|
| 87 | - // Remove space after opening bracket. |
|
| 88 | - $css = str_replace( ' {', '{', $css ); |
|
| 89 | - // Remove whitespace. |
|
| 90 | - return str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css ); |
|
| 91 | - } |
|
| 92 | - |
|
| 93 | - /** |
|
| 94 | - * Consulting theme overrides. |
|
| 95 | - * |
|
| 96 | - * @return string |
|
| 97 | - * @since 4.0.0 |
|
| 98 | - */ |
|
| 99 | - public static function consulting(): string { |
|
| 100 | - return <<<'EOD' |
|
| 81 | + // Remove comments. |
|
| 82 | + $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); |
|
| 83 | + // Remove space after colons. |
|
| 84 | + $css = str_replace( ': ', ':', $css ); |
|
| 85 | + // Remove space after commas. |
|
| 86 | + $css = str_replace( ', ', ',', $css ); |
|
| 87 | + // Remove space after opening bracket. |
|
| 88 | + $css = str_replace( ' {', '{', $css ); |
|
| 89 | + // Remove whitespace. |
|
| 90 | + return str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css ); |
|
| 91 | + } |
|
| 92 | + |
|
| 93 | + /** |
|
| 94 | + * Consulting theme overrides. |
|
| 95 | + * |
|
| 96 | + * @return string |
|
| 97 | + * @since 4.0.0 |
|
| 98 | + */ |
|
| 99 | + public static function consulting(): string { |
|
| 100 | + return <<<'EOD' |
|
| 101 | 101 | #content-core { |
| 102 | 102 | max-width: 100%; |
| 103 | 103 | } |
| 104 | 104 | EOD; |
| 105 | - } |
|
| 106 | - |
|
| 107 | - /** |
|
| 108 | - * Avada theme overrides. |
|
| 109 | - * |
|
| 110 | - * @return string |
|
| 111 | - * @since 4.0.0 |
|
| 112 | - */ |
|
| 113 | - public static function avada(): string { |
|
| 114 | - return <<<'EOD' |
|
| 105 | + } |
|
| 106 | + |
|
| 107 | + /** |
|
| 108 | + * Avada theme overrides. |
|
| 109 | + * |
|
| 110 | + * @return string |
|
| 111 | + * @since 4.0.0 |
|
| 112 | + */ |
|
| 113 | + public static function avada(): string { |
|
| 114 | + return <<<'EOD' |
|
| 115 | 115 | #main .fusion-row { |
| 116 | 116 | max-width: unset; |
| 117 | 117 | } |
| 118 | 118 | EOD; |
| 119 | - } |
|
| 120 | - |
|
| 121 | - /** |
|
| 122 | - * GeneratePress theme overrides. |
|
| 123 | - * |
|
| 124 | - * @return string |
|
| 125 | - * @since 4.1.24 |
|
| 126 | - */ |
|
| 127 | - public static function generatepress(): string { |
|
| 128 | - return <<<'EOD' |
|
| 119 | + } |
|
| 120 | + |
|
| 121 | + /** |
|
| 122 | + * GeneratePress theme overrides. |
|
| 123 | + * |
|
| 124 | + * @return string |
|
| 125 | + * @since 4.1.24 |
|
| 126 | + */ |
|
| 127 | + public static function generatepress(): string { |
|
| 128 | + return <<<'EOD' |
|
| 129 | 129 | .site-content { |
| 130 | 130 | display: block!important; |
| 131 | 131 | } |
| 132 | 132 | EOD; |
| 133 | - } |
|
| 134 | - |
|
| 135 | - /** |
|
| 136 | - * TwentyTwenty theme overrides. |
|
| 137 | - * |
|
| 138 | - * @return string |
|
| 139 | - * @since 4.0.0 |
|
| 140 | - */ |
|
| 141 | - public static function twentytwenty(): string { |
|
| 142 | - return <<<'EOD' |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * TwentyTwenty theme overrides. |
|
| 137 | + * |
|
| 138 | + * @return string |
|
| 139 | + * @since 4.0.0 |
|
| 140 | + */ |
|
| 141 | + public static function twentytwenty(): string { |
|
| 142 | + return <<<'EOD' |
|
| 143 | 143 | [class*="__inner-container"] > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide) { |
| 144 | 144 | max-width: unset !important; |
| 145 | 145 | } |
@@ -148,6 +148,6 @@ discard block |
||
| 148 | 148 | margin-bottom: unset; |
| 149 | 149 | } |
| 150 | 150 | EOD; |
| 151 | - } |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | 153 | } |
@@ -19,23 +19,23 @@ |
||
| 19 | 19 | <title><?php echo esc_html( wp_get_document_title() ); ?></title> |
| 20 | 20 | <?php endif; ?> |
| 21 | 21 | <?php |
| 22 | - wp_head(); |
|
| 23 | - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 24 | - echo '<style id="redux-template-overrides">' . ReduxTemplates\Template_Overrides::get_overrides() . '</style>'; |
|
| 25 | - ?> |
|
| 22 | + wp_head(); |
|
| 23 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 24 | + echo '<style id="redux-template-overrides">' . ReduxTemplates\Template_Overrides::get_overrides() . '</style>'; |
|
| 25 | + ?> |
|
| 26 | 26 | </head> |
| 27 | 27 | <body <?php body_class(); ?>> |
| 28 | 28 | <?php wp_body_open(); ?> |
| 29 | 29 | <?php |
| 30 | 30 | while ( have_posts() ) : |
| 31 | - the_post(); |
|
| 32 | - the_content(); |
|
| 31 | + the_post(); |
|
| 32 | + the_content(); |
|
| 33 | 33 | |
| 34 | - // If comments are open, or we have at least one comment, load up the comment template. |
|
| 35 | - if ( comments_open() || get_comments_number() ) : |
|
| 36 | - comments_template(); |
|
| 37 | - endif; |
|
| 38 | - ?> |
|
| 34 | + // If comments are open, or we have at least one comment, load up the comment template. |
|
| 35 | + if ( comments_open() || get_comments_number() ) : |
|
| 36 | + comments_template(); |
|
| 37 | + endif; |
|
| 38 | + ?> |
|
| 39 | 39 | <?php endwhile; ?> |
| 40 | 40 | <?php wp_footer(); ?> |
| 41 | 41 | </body> |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | echo '<style id="redux-template-overrides">' . ReduxTemplates\Template_Overrides::get_overrides() . '</style>'; |
| 15 | 15 | |
| 16 | 16 | while ( have_posts() ) : |
| 17 | - the_post(); |
|
| 18 | - the_content(); |
|
| 17 | + the_post(); |
|
| 18 | + the_content(); |
|
| 19 | 19 | |
| 20 | - // If comments are open, or we have at least one comment, load up the comment template. |
|
| 21 | - if ( comments_open() || get_comments_number() ) : |
|
| 22 | - comments_template(); |
|
| 23 | - endif; |
|
| 20 | + // If comments are open, or we have at least one comment, load up the comment template. |
|
| 21 | + if ( comments_open() || get_comments_number() ) : |
|
| 22 | + comments_template(); |
|
| 23 | + endif; |
|
| 24 | 24 | endwhile; // End of the loop. |
| 25 | 25 | |
| 26 | 26 | get_footer(); |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | echo '<style id="redux-template-overrides">' . ReduxTemplates\Template_Overrides::get_overrides() . '</style>'; |
| 15 | 15 | |
| 16 | 16 | while ( have_posts() ) : |
| 17 | - the_post(); |
|
| 18 | - the_content(); |
|
| 17 | + the_post(); |
|
| 18 | + the_content(); |
|
| 19 | 19 | |
| 20 | - // If comments are open, or we have at least one comment, load up the comment template. |
|
| 21 | - if ( comments_open() || get_comments_number() ) : |
|
| 22 | - comments_template(); |
|
| 23 | - endif; |
|
| 20 | + // If comments are open, or we have at least one comment, load up the comment template. |
|
| 21 | + if ( comments_open() || get_comments_number() ) : |
|
| 22 | + comments_template(); |
|
| 23 | + endif; |
|
| 24 | 24 | endwhile; // End of the loop. |
| 25 | 25 | |
| 26 | 26 | get_footer(); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | if ( ! is_numeric( $counter ) ) { |
| 162 | 162 | $new_name = $name . ' 1'; |
| 163 | 163 | } else { |
| 164 | - $new_name = substr( $name, 0, - 1 ) . ( (int) $counter + 1 ); |
|
| 164 | + $new_name = substr( $name, 0, - 1 ) . ( ( int ) $counter + 1 ); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | $name = $this->check_widget_area_name( $new_name ); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $key = array_search( $name, $this->widget_areas, true ); |
| 253 | 253 | |
| 254 | 254 | if ( $key >= 0 ) { |
| 255 | - unset( $this->widget_areas[ $key ] ); |
|
| 255 | + unset( $this->widget_areas[$key] ); |
|
| 256 | 256 | $this->save_widget_areas(); |
| 257 | 257 | } |
| 258 | 258 | |
@@ -12,82 +12,82 @@ discard block |
||
| 12 | 12 | // Don't duplicate me! |
| 13 | 13 | if ( ! class_exists( 'Redux_Widget_Areas' ) ) { |
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * Main ReduxFramework customizer extension class |
|
| 17 | - * |
|
| 18 | - * @since 1.0.0 |
|
| 19 | - */ |
|
| 20 | - class Redux_Widget_Areas { |
|
| 21 | - |
|
| 22 | - /** |
|
| 23 | - * Extension URI. |
|
| 24 | - * |
|
| 25 | - * @var null|string |
|
| 26 | - */ |
|
| 27 | - private ?string $extension_url; |
|
| 28 | - |
|
| 29 | - /** Extension directory. |
|
| 30 | - * |
|
| 31 | - * @var string |
|
| 32 | - */ |
|
| 33 | - private string $extension_dir; |
|
| 34 | - |
|
| 35 | - /** |
|
| 36 | - * Array of enabled widget_areas |
|
| 37 | - * |
|
| 38 | - * @since 1.0.0 |
|
| 39 | - * @var array |
|
| 40 | - */ |
|
| 41 | - protected array $widget_areas = array(); |
|
| 42 | - |
|
| 43 | - /** |
|
| 44 | - * Widget array. |
|
| 45 | - * |
|
| 46 | - * @var array |
|
| 47 | - */ |
|
| 48 | - protected array $orig = array(); |
|
| 49 | - |
|
| 50 | - /** |
|
| 51 | - * ReduxFramework object. |
|
| 52 | - * |
|
| 53 | - * @var ReduxFramework |
|
| 54 | - */ |
|
| 55 | - private ReduxFramework $parent; |
|
| 56 | - |
|
| 57 | - /** |
|
| 58 | - * Redux_Widget_Areas constructor. |
|
| 59 | - * |
|
| 60 | - * @param ReduxFramework $redux ReduxFramework pointer. |
|
| 61 | - */ |
|
| 62 | - public function __construct( ReduxFramework $redux ) { |
|
| 63 | - global $pagenow; |
|
| 64 | - |
|
| 65 | - $this->parent = $redux; |
|
| 66 | - |
|
| 67 | - if ( empty( $this->extension_dir ) ) { |
|
| 68 | - $this->extension_dir = trailingslashit( str_replace( '\\', '/', __DIR__ ) ); |
|
| 69 | - $this->extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->extension_dir ) ); |
|
| 70 | - } |
|
| 71 | - |
|
| 72 | - add_action( 'init', array( &$this, 'register_custom_widget_areas' ), 1000 ); |
|
| 73 | - |
|
| 74 | - if ( 'widgets.php' === $pagenow ) { |
|
| 75 | - add_action( 'admin_print_scripts', array( $this, 'add_new_widget_area_box' ) ); |
|
| 76 | - add_action( 'load-widgets.php', array( $this, 'add_widget_area_area' ), 100 ); |
|
| 77 | - add_action( 'load-widgets.php', array( $this, 'enqueue' ), 100 ); |
|
| 78 | - } |
|
| 79 | - } |
|
| 80 | - |
|
| 81 | - /** |
|
| 82 | - * Function to create the HTML used to create widget_areas. |
|
| 83 | - * |
|
| 84 | - * @since 1.0.0 |
|
| 85 | - */ |
|
| 86 | - public function add_new_widget_area_box() { |
|
| 87 | - $nonce = wp_create_nonce( 'add-redux-widget_area-nonce' ); |
|
| 88 | - $del_nonce = wp_create_nonce( 'delete-redux-widget_area-nonce' ); |
|
| 89 | - |
|
| 90 | - ?> |
|
| 15 | + /** |
|
| 16 | + * Main ReduxFramework customizer extension class |
|
| 17 | + * |
|
| 18 | + * @since 1.0.0 |
|
| 19 | + */ |
|
| 20 | + class Redux_Widget_Areas { |
|
| 21 | + |
|
| 22 | + /** |
|
| 23 | + * Extension URI. |
|
| 24 | + * |
|
| 25 | + * @var null|string |
|
| 26 | + */ |
|
| 27 | + private ?string $extension_url; |
|
| 28 | + |
|
| 29 | + /** Extension directory. |
|
| 30 | + * |
|
| 31 | + * @var string |
|
| 32 | + */ |
|
| 33 | + private string $extension_dir; |
|
| 34 | + |
|
| 35 | + /** |
|
| 36 | + * Array of enabled widget_areas |
|
| 37 | + * |
|
| 38 | + * @since 1.0.0 |
|
| 39 | + * @var array |
|
| 40 | + */ |
|
| 41 | + protected array $widget_areas = array(); |
|
| 42 | + |
|
| 43 | + /** |
|
| 44 | + * Widget array. |
|
| 45 | + * |
|
| 46 | + * @var array |
|
| 47 | + */ |
|
| 48 | + protected array $orig = array(); |
|
| 49 | + |
|
| 50 | + /** |
|
| 51 | + * ReduxFramework object. |
|
| 52 | + * |
|
| 53 | + * @var ReduxFramework |
|
| 54 | + */ |
|
| 55 | + private ReduxFramework $parent; |
|
| 56 | + |
|
| 57 | + /** |
|
| 58 | + * Redux_Widget_Areas constructor. |
|
| 59 | + * |
|
| 60 | + * @param ReduxFramework $redux ReduxFramework pointer. |
|
| 61 | + */ |
|
| 62 | + public function __construct( ReduxFramework $redux ) { |
|
| 63 | + global $pagenow; |
|
| 64 | + |
|
| 65 | + $this->parent = $redux; |
|
| 66 | + |
|
| 67 | + if ( empty( $this->extension_dir ) ) { |
|
| 68 | + $this->extension_dir = trailingslashit( str_replace( '\\', '/', __DIR__ ) ); |
|
| 69 | + $this->extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->extension_dir ) ); |
|
| 70 | + } |
|
| 71 | + |
|
| 72 | + add_action( 'init', array( &$this, 'register_custom_widget_areas' ), 1000 ); |
|
| 73 | + |
|
| 74 | + if ( 'widgets.php' === $pagenow ) { |
|
| 75 | + add_action( 'admin_print_scripts', array( $this, 'add_new_widget_area_box' ) ); |
|
| 76 | + add_action( 'load-widgets.php', array( $this, 'add_widget_area_area' ), 100 ); |
|
| 77 | + add_action( 'load-widgets.php', array( $this, 'enqueue' ), 100 ); |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * Function to create the HTML used to create widget_areas. |
|
| 83 | + * |
|
| 84 | + * @since 1.0.0 |
|
| 85 | + */ |
|
| 86 | + public function add_new_widget_area_box() { |
|
| 87 | + $nonce = wp_create_nonce( 'add-redux-widget_area-nonce' ); |
|
| 88 | + $del_nonce = wp_create_nonce( 'delete-redux-widget_area-nonce' ); |
|
| 89 | + |
|
| 90 | + ?> |
|
| 91 | 91 | <script type="text/html" id="redux-add-widget-template"> |
| 92 | 92 | <div id="redux-add-widget" class="widgets-holder-wrap"> |
| 93 | 93 | <div class=""> |
@@ -120,191 +120,191 @@ discard block |
||
| 120 | 120 | </div> |
| 121 | 121 | </script> |
| 122 | 122 | <?php |
| 123 | - } |
|
| 124 | - |
|
| 125 | - /** |
|
| 126 | - * Add widget area. |
|
| 127 | - */ |
|
| 128 | - public function add_widget_area_area() { |
|
| 129 | - if ( isset( $_POST ) && isset( $_POST['redux-add-widget-nonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['redux-add-widget-nonce'] ) ), 'add-redux-widget_area-nonce' ) ) { |
|
| 130 | - if ( ! empty( $_POST['redux-add-widget-input'] ) ) { |
|
| 131 | - $this->widget_areas = $this->get_widget_areas(); |
|
| 132 | - |
|
| 133 | - $this->widget_areas[] = $this->check_widget_area_name( sanitize_text_field( wp_unslash( $_POST['redux-add-widget-input'] ) ) ); |
|
| 134 | - |
|
| 135 | - $this->save_widget_areas(); |
|
| 136 | - |
|
| 137 | - wp_safe_redirect( admin_url( 'widgets.php' ) ); |
|
| 138 | - |
|
| 139 | - die(); |
|
| 140 | - } |
|
| 141 | - } |
|
| 142 | - } |
|
| 143 | - |
|
| 144 | - /** |
|
| 145 | - * Before we create a new widget_area, verify it doesn't already exist. If it does, append a number to the name. |
|
| 146 | - * |
|
| 147 | - * @param string $name Name of the widget_area to be created. |
|
| 148 | - * |
|
| 149 | - * @return string|void $name Name of the new widget_area just created. |
|
| 150 | - * @since 1.0.0 |
|
| 151 | - */ |
|
| 152 | - private function check_widget_area_name( string $name ) { |
|
| 153 | - if ( empty( $GLOBALS['wp_registered_widget_areas'] ) ) { |
|
| 154 | - return $name; |
|
| 155 | - } |
|
| 156 | - |
|
| 157 | - $taken = array(); |
|
| 158 | - |
|
| 159 | - foreach ( $GLOBALS['wp_registered_widget_areas'] as $widget_area ) { |
|
| 160 | - $taken[] = $widget_area['name']; |
|
| 161 | - } |
|
| 162 | - |
|
| 163 | - $taken = array_merge( $taken, $this->widget_areas ); |
|
| 164 | - |
|
| 165 | - if ( in_array( $name, $taken, true ) ) { |
|
| 166 | - $counter = substr( $name, - 1 ); |
|
| 167 | - |
|
| 168 | - if ( ! is_numeric( $counter ) ) { |
|
| 169 | - $new_name = $name . ' 1'; |
|
| 170 | - } else { |
|
| 171 | - $new_name = substr( $name, 0, - 1 ) . ( (int) $counter + 1 ); |
|
| 172 | - } |
|
| 173 | - |
|
| 174 | - $name = $this->check_widget_area_name( $new_name ); |
|
| 175 | - } |
|
| 176 | - |
|
| 177 | - echo $name; // phpcs:disable WordPress.Security.EscapeOutput |
|
| 178 | - |
|
| 179 | - exit(); |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - /** |
|
| 183 | - * Save Widget Areas. |
|
| 184 | - */ |
|
| 185 | - private function save_widget_areas() { |
|
| 186 | - set_theme_mod( 'redux-widget-areas', array_unique( $this->widget_areas ) ); |
|
| 187 | - } |
|
| 188 | - |
|
| 189 | - /** |
|
| 190 | - * Register and display the custom widget_area areas we have set. |
|
| 191 | - * |
|
| 192 | - * @since 1.0.0 |
|
| 193 | - */ |
|
| 194 | - public function register_custom_widget_areas() { |
|
| 195 | - |
|
| 196 | - // If the single instance hasn't been set, set it now. |
|
| 197 | - if ( empty( $this->widget_areas ) ) { |
|
| 198 | - $this->widget_areas = $this->get_widget_areas(); |
|
| 199 | - } |
|
| 200 | - |
|
| 201 | - // phpcs:ignore WordPress.NamingConventions.ValidHookName |
|
| 202 | - $this->orig = array_unique( apply_filters( 'redux/' . $this->parent->args['opt_name'] . '/widget_areas', array() ) ); |
|
| 203 | - |
|
| 204 | - if ( ! empty( $this->orig ) && $this->orig !== $this->widget_areas ) { |
|
| 205 | - $this->widget_areas = array_unique( array_merge( $this->widget_areas, $this->orig ) ); |
|
| 206 | - $this->save_widget_areas(); |
|
| 207 | - } |
|
| 208 | - |
|
| 209 | - $options = array( |
|
| 210 | - 'before_title' => '<h3 class="widgettitle">', |
|
| 211 | - 'after_title' => '</h3>', |
|
| 212 | - 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', |
|
| 213 | - 'after_widget' => '</div>', |
|
| 214 | - ); |
|
| 215 | - |
|
| 216 | - $options = apply_filters( 'redux_custom_widget_args', $options ); |
|
| 217 | - |
|
| 218 | - foreach ( array_unique( $this->widget_areas ) as $widget_area ) { |
|
| 219 | - $options['class'] = 'redux-custom'; |
|
| 220 | - $options['name'] = $widget_area; |
|
| 221 | - $options['id'] = sanitize_key( $widget_area ); |
|
| 222 | - |
|
| 223 | - register_sidebar( $options ); |
|
| 224 | - } |
|
| 225 | - } |
|
| 226 | - |
|
| 227 | - |
|
| 228 | - /** |
|
| 229 | - * Return the widget_areas array. |
|
| 230 | - * |
|
| 231 | - * @since 1.0.0 |
|
| 232 | - * @return array If not empty, active redux widget_areas are returned. |
|
| 233 | - */ |
|
| 234 | - public function get_widget_areas(): array { |
|
| 235 | - |
|
| 236 | - // If the single instance hasn't been set, set it now. |
|
| 237 | - if ( ! empty( $this->widget_areas ) ) { |
|
| 238 | - return $this->widget_areas; |
|
| 239 | - } |
|
| 240 | - |
|
| 241 | - $db = get_theme_mod( 'redux-widget-areas' ); |
|
| 242 | - |
|
| 243 | - if ( ! empty( $db ) ) { |
|
| 244 | - $this->widget_areas = array_unique( array_merge( $this->widget_areas, $db ) ); |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - return $this->widget_areas; |
|
| 248 | - } |
|
| 249 | - |
|
| 250 | - /** |
|
| 251 | - * Delete widget area. |
|
| 252 | - */ |
|
| 253 | - public function redux_delete_widget_area_area() { |
|
| 254 | - if ( isset( $_POST ) && isset( $_POST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ), 'delete-redux-widget_area-nonce' ) ) { |
|
| 255 | - if ( isset( $_POST['name'] ) && ! empty( sanitize_text_field( wp_unslash( $_POST['name'] ) ) ) ) { |
|
| 256 | - $name = sanitize_text_field( wp_unslash( $_POST['name'] ) ); |
|
| 257 | - $this->widget_areas = $this->get_widget_areas(); |
|
| 258 | - $key = array_search( $name, $this->widget_areas, true ); |
|
| 259 | - |
|
| 260 | - if ( $key >= 0 ) { |
|
| 261 | - unset( $this->widget_areas[ $key ] ); |
|
| 262 | - $this->save_widget_areas(); |
|
| 263 | - } |
|
| 264 | - |
|
| 265 | - echo 'widget_area-deleted'; |
|
| 266 | - } |
|
| 267 | - } |
|
| 268 | - |
|
| 269 | - die(); |
|
| 270 | - } |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * Enqueue support files. |
|
| 274 | - */ |
|
| 275 | - public function enqueue() { |
|
| 276 | - $min = Redux_Functions::is_min(); |
|
| 277 | - |
|
| 278 | - wp_enqueue_style( 'dashicons' ); |
|
| 279 | - |
|
| 280 | - wp_enqueue_script( |
|
| 281 | - 'redux-widget-areas', |
|
| 282 | - $this->extension_url . 'redux-extension-widget-areas' . $min . '.js', |
|
| 283 | - array( 'jquery' ), |
|
| 284 | - Redux_Extension_Widget_Areas::$version, |
|
| 285 | - true |
|
| 286 | - ); |
|
| 287 | - |
|
| 288 | - if ( $this->parent->args['dev_mode'] ) { |
|
| 289 | - wp_enqueue_style( |
|
| 290 | - 'redux-widget-areas', |
|
| 291 | - $this->extension_url . 'redux-extension-widget-areas.css', |
|
| 292 | - array(), |
|
| 293 | - Redux_Extension_Widget_Areas::$version |
|
| 294 | - ); |
|
| 295 | - } |
|
| 296 | - |
|
| 297 | - // Localize script. |
|
| 298 | - wp_localize_script( |
|
| 299 | - 'redux-widget-areas', |
|
| 300 | - 'reduxWidgetAreasLocalize', |
|
| 301 | - array( |
|
| 302 | - 'count' => count( $this->orig ), |
|
| 303 | - 'delete' => esc_html__( 'Delete', 'redux-framework' ), |
|
| 304 | - 'confirm' => esc_html__( 'Confirm', 'redux-framework' ), |
|
| 305 | - 'cancel' => esc_html__( 'Cancel', 'redux-framework' ), |
|
| 306 | - ) |
|
| 307 | - ); |
|
| 308 | - } |
|
| 309 | - } |
|
| 123 | + } |
|
| 124 | + |
|
| 125 | + /** |
|
| 126 | + * Add widget area. |
|
| 127 | + */ |
|
| 128 | + public function add_widget_area_area() { |
|
| 129 | + if ( isset( $_POST ) && isset( $_POST['redux-add-widget-nonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['redux-add-widget-nonce'] ) ), 'add-redux-widget_area-nonce' ) ) { |
|
| 130 | + if ( ! empty( $_POST['redux-add-widget-input'] ) ) { |
|
| 131 | + $this->widget_areas = $this->get_widget_areas(); |
|
| 132 | + |
|
| 133 | + $this->widget_areas[] = $this->check_widget_area_name( sanitize_text_field( wp_unslash( $_POST['redux-add-widget-input'] ) ) ); |
|
| 134 | + |
|
| 135 | + $this->save_widget_areas(); |
|
| 136 | + |
|
| 137 | + wp_safe_redirect( admin_url( 'widgets.php' ) ); |
|
| 138 | + |
|
| 139 | + die(); |
|
| 140 | + } |
|
| 141 | + } |
|
| 142 | + } |
|
| 143 | + |
|
| 144 | + /** |
|
| 145 | + * Before we create a new widget_area, verify it doesn't already exist. If it does, append a number to the name. |
|
| 146 | + * |
|
| 147 | + * @param string $name Name of the widget_area to be created. |
|
| 148 | + * |
|
| 149 | + * @return string|void $name Name of the new widget_area just created. |
|
| 150 | + * @since 1.0.0 |
|
| 151 | + */ |
|
| 152 | + private function check_widget_area_name( string $name ) { |
|
| 153 | + if ( empty( $GLOBALS['wp_registered_widget_areas'] ) ) { |
|
| 154 | + return $name; |
|
| 155 | + } |
|
| 156 | + |
|
| 157 | + $taken = array(); |
|
| 158 | + |
|
| 159 | + foreach ( $GLOBALS['wp_registered_widget_areas'] as $widget_area ) { |
|
| 160 | + $taken[] = $widget_area['name']; |
|
| 161 | + } |
|
| 162 | + |
|
| 163 | + $taken = array_merge( $taken, $this->widget_areas ); |
|
| 164 | + |
|
| 165 | + if ( in_array( $name, $taken, true ) ) { |
|
| 166 | + $counter = substr( $name, - 1 ); |
|
| 167 | + |
|
| 168 | + if ( ! is_numeric( $counter ) ) { |
|
| 169 | + $new_name = $name . ' 1'; |
|
| 170 | + } else { |
|
| 171 | + $new_name = substr( $name, 0, - 1 ) . ( (int) $counter + 1 ); |
|
| 172 | + } |
|
| 173 | + |
|
| 174 | + $name = $this->check_widget_area_name( $new_name ); |
|
| 175 | + } |
|
| 176 | + |
|
| 177 | + echo $name; // phpcs:disable WordPress.Security.EscapeOutput |
|
| 178 | + |
|
| 179 | + exit(); |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + /** |
|
| 183 | + * Save Widget Areas. |
|
| 184 | + */ |
|
| 185 | + private function save_widget_areas() { |
|
| 186 | + set_theme_mod( 'redux-widget-areas', array_unique( $this->widget_areas ) ); |
|
| 187 | + } |
|
| 188 | + |
|
| 189 | + /** |
|
| 190 | + * Register and display the custom widget_area areas we have set. |
|
| 191 | + * |
|
| 192 | + * @since 1.0.0 |
|
| 193 | + */ |
|
| 194 | + public function register_custom_widget_areas() { |
|
| 195 | + |
|
| 196 | + // If the single instance hasn't been set, set it now. |
|
| 197 | + if ( empty( $this->widget_areas ) ) { |
|
| 198 | + $this->widget_areas = $this->get_widget_areas(); |
|
| 199 | + } |
|
| 200 | + |
|
| 201 | + // phpcs:ignore WordPress.NamingConventions.ValidHookName |
|
| 202 | + $this->orig = array_unique( apply_filters( 'redux/' . $this->parent->args['opt_name'] . '/widget_areas', array() ) ); |
|
| 203 | + |
|
| 204 | + if ( ! empty( $this->orig ) && $this->orig !== $this->widget_areas ) { |
|
| 205 | + $this->widget_areas = array_unique( array_merge( $this->widget_areas, $this->orig ) ); |
|
| 206 | + $this->save_widget_areas(); |
|
| 207 | + } |
|
| 208 | + |
|
| 209 | + $options = array( |
|
| 210 | + 'before_title' => '<h3 class="widgettitle">', |
|
| 211 | + 'after_title' => '</h3>', |
|
| 212 | + 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', |
|
| 213 | + 'after_widget' => '</div>', |
|
| 214 | + ); |
|
| 215 | + |
|
| 216 | + $options = apply_filters( 'redux_custom_widget_args', $options ); |
|
| 217 | + |
|
| 218 | + foreach ( array_unique( $this->widget_areas ) as $widget_area ) { |
|
| 219 | + $options['class'] = 'redux-custom'; |
|
| 220 | + $options['name'] = $widget_area; |
|
| 221 | + $options['id'] = sanitize_key( $widget_area ); |
|
| 222 | + |
|
| 223 | + register_sidebar( $options ); |
|
| 224 | + } |
|
| 225 | + } |
|
| 226 | + |
|
| 227 | + |
|
| 228 | + /** |
|
| 229 | + * Return the widget_areas array. |
|
| 230 | + * |
|
| 231 | + * @since 1.0.0 |
|
| 232 | + * @return array If not empty, active redux widget_areas are returned. |
|
| 233 | + */ |
|
| 234 | + public function get_widget_areas(): array { |
|
| 235 | + |
|
| 236 | + // If the single instance hasn't been set, set it now. |
|
| 237 | + if ( ! empty( $this->widget_areas ) ) { |
|
| 238 | + return $this->widget_areas; |
|
| 239 | + } |
|
| 240 | + |
|
| 241 | + $db = get_theme_mod( 'redux-widget-areas' ); |
|
| 242 | + |
|
| 243 | + if ( ! empty( $db ) ) { |
|
| 244 | + $this->widget_areas = array_unique( array_merge( $this->widget_areas, $db ) ); |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + return $this->widget_areas; |
|
| 248 | + } |
|
| 249 | + |
|
| 250 | + /** |
|
| 251 | + * Delete widget area. |
|
| 252 | + */ |
|
| 253 | + public function redux_delete_widget_area_area() { |
|
| 254 | + if ( isset( $_POST ) && isset( $_POST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ), 'delete-redux-widget_area-nonce' ) ) { |
|
| 255 | + if ( isset( $_POST['name'] ) && ! empty( sanitize_text_field( wp_unslash( $_POST['name'] ) ) ) ) { |
|
| 256 | + $name = sanitize_text_field( wp_unslash( $_POST['name'] ) ); |
|
| 257 | + $this->widget_areas = $this->get_widget_areas(); |
|
| 258 | + $key = array_search( $name, $this->widget_areas, true ); |
|
| 259 | + |
|
| 260 | + if ( $key >= 0 ) { |
|
| 261 | + unset( $this->widget_areas[ $key ] ); |
|
| 262 | + $this->save_widget_areas(); |
|
| 263 | + } |
|
| 264 | + |
|
| 265 | + echo 'widget_area-deleted'; |
|
| 266 | + } |
|
| 267 | + } |
|
| 268 | + |
|
| 269 | + die(); |
|
| 270 | + } |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * Enqueue support files. |
|
| 274 | + */ |
|
| 275 | + public function enqueue() { |
|
| 276 | + $min = Redux_Functions::is_min(); |
|
| 277 | + |
|
| 278 | + wp_enqueue_style( 'dashicons' ); |
|
| 279 | + |
|
| 280 | + wp_enqueue_script( |
|
| 281 | + 'redux-widget-areas', |
|
| 282 | + $this->extension_url . 'redux-extension-widget-areas' . $min . '.js', |
|
| 283 | + array( 'jquery' ), |
|
| 284 | + Redux_Extension_Widget_Areas::$version, |
|
| 285 | + true |
|
| 286 | + ); |
|
| 287 | + |
|
| 288 | + if ( $this->parent->args['dev_mode'] ) { |
|
| 289 | + wp_enqueue_style( |
|
| 290 | + 'redux-widget-areas', |
|
| 291 | + $this->extension_url . 'redux-extension-widget-areas.css', |
|
| 292 | + array(), |
|
| 293 | + Redux_Extension_Widget_Areas::$version |
|
| 294 | + ); |
|
| 295 | + } |
|
| 296 | + |
|
| 297 | + // Localize script. |
|
| 298 | + wp_localize_script( |
|
| 299 | + 'redux-widget-areas', |
|
| 300 | + 'reduxWidgetAreasLocalize', |
|
| 301 | + array( |
|
| 302 | + 'count' => count( $this->orig ), |
|
| 303 | + 'delete' => esc_html__( 'Delete', 'redux-framework' ), |
|
| 304 | + 'confirm' => esc_html__( 'Confirm', 'redux-framework' ), |
|
| 305 | + 'cancel' => esc_html__( 'Cancel', 'redux-framework' ), |
|
| 306 | + ) |
|
| 307 | + ); |
|
| 308 | + } |
|
| 309 | + } |
|
| 310 | 310 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | 'full_width' => true, |
| 41 | 41 | 'default' => array( |
| 42 | 42 | 'latitude' => 38.8976758, |
| 43 | - 'longitude' => - 77.03648229999999, |
|
| 43 | + 'longitude' => -77.03648229999999, |
|
| 44 | 44 | 'zoom' => 7, |
| 45 | 45 | ), |
| 46 | 46 | ), |
@@ -10,42 +10,42 @@ |
||
| 10 | 10 | defined( 'ABSPATH' ) || exit; |
| 11 | 11 | |
| 12 | 12 | Redux::set_section( |
| 13 | - $opt_name, |
|
| 14 | - array( |
|
| 15 | - 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 16 | - 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/google-maps.html" target="_blank">https://devs.redux.io/core-extensions/google-maps.html</a>', |
|
| 17 | - 'subsection' => true, |
|
| 18 | - 'fields' => array( |
|
| 19 | - array( |
|
| 20 | - 'id' => 'location_geocode', |
|
| 21 | - 'type' => 'google_maps', |
|
| 22 | - 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 23 | - 'subtitle' => esc_html__( 'This map is set using only address information with a zoom factor of 3. Lat/Long is returned automatically.', 'your-textdomain-here' ), |
|
| 24 | - 'show_api_key' => true, |
|
| 25 | - 'default' => array( |
|
| 26 | - 'zoom' => '17', // Zoom far: 3 zoom close 17. |
|
| 27 | - 'street_number' => '1600', // Address. |
|
| 28 | - 'route' => 'Pennsylvania Avenue', // STREET. |
|
| 29 | - 'locality' => 'Washington', // CITY. |
|
| 30 | - 'administrative_area_level_1' => 'DC', // STATE. |
|
| 31 | - 'postal_code' => '20500', |
|
| 32 | - 'country' => 'United States', |
|
| 33 | - ), |
|
| 34 | - ), |
|
| 35 | - array( |
|
| 36 | - 'id' => 'location_geocode2', |
|
| 37 | - 'type' => 'google_maps', |
|
| 38 | - 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 39 | - 'subtitle' => esc_html__( 'This map is set using only latitude and longitude with a zoom factor of 7. When setting a Google map using lat/long, address information will not be returned.', 'your-textdomain-here' ), |
|
| 40 | - 'show_api_key' => false, |
|
| 41 | - 'full_width' => true, |
|
| 42 | - 'default' => array( |
|
| 43 | - 'latitude' => 38.8976758, |
|
| 44 | - 'longitude' => - 77.03648229999999, |
|
| 45 | - 'zoom' => 7, |
|
| 46 | - ), |
|
| 47 | - ), |
|
| 48 | - ), |
|
| 49 | - ) |
|
| 13 | + $opt_name, |
|
| 14 | + array( |
|
| 15 | + 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 16 | + 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/google-maps.html" target="_blank">https://devs.redux.io/core-extensions/google-maps.html</a>', |
|
| 17 | + 'subsection' => true, |
|
| 18 | + 'fields' => array( |
|
| 19 | + array( |
|
| 20 | + 'id' => 'location_geocode', |
|
| 21 | + 'type' => 'google_maps', |
|
| 22 | + 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 23 | + 'subtitle' => esc_html__( 'This map is set using only address information with a zoom factor of 3. Lat/Long is returned automatically.', 'your-textdomain-here' ), |
|
| 24 | + 'show_api_key' => true, |
|
| 25 | + 'default' => array( |
|
| 26 | + 'zoom' => '17', // Zoom far: 3 zoom close 17. |
|
| 27 | + 'street_number' => '1600', // Address. |
|
| 28 | + 'route' => 'Pennsylvania Avenue', // STREET. |
|
| 29 | + 'locality' => 'Washington', // CITY. |
|
| 30 | + 'administrative_area_level_1' => 'DC', // STATE. |
|
| 31 | + 'postal_code' => '20500', |
|
| 32 | + 'country' => 'United States', |
|
| 33 | + ), |
|
| 34 | + ), |
|
| 35 | + array( |
|
| 36 | + 'id' => 'location_geocode2', |
|
| 37 | + 'type' => 'google_maps', |
|
| 38 | + 'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ), |
|
| 39 | + 'subtitle' => esc_html__( 'This map is set using only latitude and longitude with a zoom factor of 7. When setting a Google map using lat/long, address information will not be returned.', 'your-textdomain-here' ), |
|
| 40 | + 'show_api_key' => false, |
|
| 41 | + 'full_width' => true, |
|
| 42 | + 'default' => array( |
|
| 43 | + 'latitude' => 38.8976758, |
|
| 44 | + 'longitude' => - 77.03648229999999, |
|
| 45 | + 'zoom' => 7, |
|
| 46 | + ), |
|
| 47 | + ), |
|
| 48 | + ), |
|
| 49 | + ) |
|
| 50 | 50 | ); |
| 51 | 51 | // phpcs:enable |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | 'street_number' => $def_street_number, |
| 59 | 59 | 'route' => $def_route, |
| 60 | 60 | 'locality' => $def_locality, |
| 61 | - 'administrative_area_level_1' => $def_state, // <-dickheads at google. lol, srsly...wtf? |
|
| 61 | + 'administrative_area_level_1' => $def_state, // <-dickheads at google. lol, srsly...wtf? |
|
| 62 | 62 | // level_1 huh? maybe It's for multiple planets one day. |
| 63 | 63 | 'postal_code' => $def_postal, |
| 64 | 64 | 'country' => $def_country, |
@@ -11,145 +11,145 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | if ( ! class_exists( 'Redux_Google_Maps' ) ) { |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Main ReduxFramework_google_maps class |
|
| 16 | - * |
|
| 17 | - * @since 1.0.0 |
|
| 18 | - */ |
|
| 19 | - class Redux_Google_Maps extends Redux_Field { |
|
| 20 | - |
|
| 21 | - /** |
|
| 22 | - * API Key. |
|
| 23 | - * |
|
| 24 | - * @var string|null |
|
| 25 | - */ |
|
| 26 | - private ?string $api_key = ''; |
|
| 27 | - |
|
| 28 | - /** |
|
| 29 | - * Get field defaults. |
|
| 30 | - */ |
|
| 31 | - public function set_defaults() { |
|
| 32 | - $field = array( |
|
| 33 | - 'api_key' => '', |
|
| 34 | - 'map_version' => 'weekly', |
|
| 35 | - ); |
|
| 36 | - |
|
| 37 | - $this->field = wp_parse_args( $this->field, $field ); |
|
| 38 | - |
|
| 39 | - $this->api_key = null; |
|
| 40 | - |
|
| 41 | - $this->field['api_key'] = $this->field['api_key'] ?? ''; |
|
| 42 | - |
|
| 43 | - if ( empty( $this->field['api_key'] ) ) { |
|
| 44 | - $redux = get_option( $this->parent->args['opt_name'] ); |
|
| 45 | - $this->api_key = $redux['google_map_api_key'] ?? ''; |
|
| 46 | - } else { |
|
| 47 | - $this->api_key = $this->field['api_key']; |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - // Necessary, in case the user doesn't fill out a default array. |
|
| 51 | - $def_street_number = $this->field['default']['street_number'] ?? ''; |
|
| 52 | - $def_route = $this->field['default']['route'] ?? ''; |
|
| 53 | - $def_locality = $this->field['default']['locality'] ?? ''; |
|
| 54 | - $def_state = $this->field['default']['administrative_area_level_1'] ?? ''; |
|
| 55 | - $def_postal = $this->field['default']['postal_code'] ?? ''; |
|
| 56 | - $def_country = $this->field['default']['country'] ?? ''; |
|
| 57 | - $def_lat = $this->field['default']['latitude'] ?? ''; |
|
| 58 | - $def_long = $this->field['default']['longitude'] ?? ''; |
|
| 59 | - $def_marker_info = $this->field['default']['marker_info'] ?? ''; |
|
| 60 | - $def_zoom = $this->field['default']['zoom'] ?? ''; |
|
| 61 | - |
|
| 62 | - $defaults = array( |
|
| 63 | - 'latitude' => $def_lat, |
|
| 64 | - 'longitude' => $def_long, |
|
| 65 | - 'street_number' => $def_street_number, |
|
| 66 | - 'route' => $def_route, |
|
| 67 | - 'locality' => $def_locality, |
|
| 68 | - 'administrative_area_level_1' => $def_state, // <-dickheads at google. lol, srsly...wtf? |
|
| 69 | - // level_1 huh? maybe It's for multiple planets one day. |
|
| 70 | - 'postal_code' => $def_postal, |
|
| 71 | - 'country' => $def_country, |
|
| 72 | - 'marker_info' => $def_marker_info, |
|
| 73 | - 'zoom' => $def_zoom, |
|
| 74 | - ); |
|
| 75 | - |
|
| 76 | - $this->value = wp_parse_args( $this->value, $defaults ); |
|
| 77 | - } |
|
| 78 | - |
|
| 79 | - |
|
| 80 | - /** |
|
| 81 | - * Field Render Function. |
|
| 82 | - * Takes the vars and outputs the HTML for the field in the settings |
|
| 83 | - * |
|
| 84 | - * @since 1.0.0 |
|
| 85 | - * @access public |
|
| 86 | - * @return void |
|
| 87 | - */ |
|
| 88 | - public function render() { |
|
| 89 | - |
|
| 90 | - // Set default or saved zoom |
|
| 91 | - // USA: 39.11676722061108,-100.47761000000003 |
|
| 92 | - // Zoom far: 3 |
|
| 93 | - // zoom close 17. |
|
| 94 | - if ( empty( $this->value['zoom'] ) ) { |
|
| 95 | - if ( $this->value['street_number'] ) { |
|
| 96 | - $the_zoom = 17; // make it close if the street is included. |
|
| 97 | - } else { |
|
| 98 | - $the_zoom = 3; // make it far if it's not. |
|
| 99 | - } |
|
| 100 | - } else { |
|
| 101 | - $the_zoom = $this->value['zoom']; |
|
| 102 | - } |
|
| 103 | - |
|
| 104 | - // Make full address. |
|
| 105 | - $locality = ! empty( $this->value['locality'] ) ? $this->value['locality'] . ', ' : ''; |
|
| 106 | - $route = ! empty( $this->value['route'] ) ? $this->value['route'] . ', ' : ''; |
|
| 107 | - $country = ! empty( $this->value['country'] ) ? ', ' . $this->value['country'] : ''; |
|
| 108 | - |
|
| 109 | - $full = $this->value['street_number'] . ' ' . $route . ' ' . $locality . $this->value['administrative_area_level_1'] . ' ' . $this->value['postal_code'] . $country; |
|
| 110 | - $data_full = rawurlencode( $full ); |
|
| 111 | - |
|
| 112 | - // Hide/show various input fields. |
|
| 113 | - $show_address = $this->field['show_address'] ?? true; |
|
| 114 | - $show_city = $this->field['show_city'] ?? true; |
|
| 115 | - $show_state = $this->field['show_state'] ?? true; |
|
| 116 | - $show_postal = $this->field['show_postal'] ?? true; |
|
| 117 | - $show_country = $this->field['show_country'] ?? true; |
|
| 118 | - $show_lat = $this->field['show_latitude'] ?? true; |
|
| 119 | - $show_long = $this->field['show_longitude'] ?? true; |
|
| 120 | - $show_marker_info = $this->field['show_marker_info'] ?? true; |
|
| 121 | - $show_controls = $this->field['show_controls'] ?? true; |
|
| 122 | - |
|
| 123 | - $this->field['placeholder'] = $this->field['placeholder'] ?? esc_html__( 'Enter your address', 'redux-framework' ); |
|
| 124 | - $this->field['marker_tooltip'] = $this->field['marker_tooltip'] ?? esc_html__( 'Left mouse down on top of me to move me!', 'redux-framework' ); |
|
| 125 | - $this->field['no_geometry_alert'] = $this->field['no_geometry_alert'] ?? esc_html__( 'The returned place contains no geometric data.', 'redux-framework' ); |
|
| 126 | - $this->field['delay_render'] = $this->field['delay_render'] ?? false; |
|
| 127 | - $this->field['class'] = $this->field['class'] ?? ''; |
|
| 128 | - $this->field['show_api_key'] = $this->field['show_api_key'] ?? true; |
|
| 129 | - $this->field['street_view_control'] = $this->field['street_view_control'] ?? true; |
|
| 130 | - $this->field['map_type_control'] = $this->field['map_type_control'] ?? true; |
|
| 131 | - $this->field['scroll_wheel'] = $this->field['scroll_wheel'] ?? false; |
|
| 132 | - $this->field['map_height'] = $this->field['map_height'] ?? ''; |
|
| 133 | - |
|
| 134 | - $map_height = ''; |
|
| 135 | - |
|
| 136 | - if ( ! empty( $this->field['map_height'] ) ) { |
|
| 137 | - $map_height = 'style="height:' . esc_attr( $this->field['map_height'] ) . ';"'; |
|
| 138 | - } |
|
| 139 | - |
|
| 140 | - $geo_alert = rawurlencode( $this->field['no_geometry_alert'] ); |
|
| 141 | - |
|
| 142 | - // admin defined. |
|
| 143 | - $the_lat = $this->value['latitude']; |
|
| 144 | - $the_long = $this->value['longitude']; |
|
| 145 | - $marker_tooltip = rawurlencode( $this->field['marker_tooltip'] ); |
|
| 146 | - |
|
| 147 | - if ( ! empty( $the_lat ) && ! empty( $the_long ) ) { |
|
| 148 | - $full = ''; |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - $hidden_style = ' style="display: none!important;" '; |
|
| 152 | - ?> |
|
| 14 | + /** |
|
| 15 | + * Main ReduxFramework_google_maps class |
|
| 16 | + * |
|
| 17 | + * @since 1.0.0 |
|
| 18 | + */ |
|
| 19 | + class Redux_Google_Maps extends Redux_Field { |
|
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * API Key. |
|
| 23 | + * |
|
| 24 | + * @var string|null |
|
| 25 | + */ |
|
| 26 | + private ?string $api_key = ''; |
|
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * Get field defaults. |
|
| 30 | + */ |
|
| 31 | + public function set_defaults() { |
|
| 32 | + $field = array( |
|
| 33 | + 'api_key' => '', |
|
| 34 | + 'map_version' => 'weekly', |
|
| 35 | + ); |
|
| 36 | + |
|
| 37 | + $this->field = wp_parse_args( $this->field, $field ); |
|
| 38 | + |
|
| 39 | + $this->api_key = null; |
|
| 40 | + |
|
| 41 | + $this->field['api_key'] = $this->field['api_key'] ?? ''; |
|
| 42 | + |
|
| 43 | + if ( empty( $this->field['api_key'] ) ) { |
|
| 44 | + $redux = get_option( $this->parent->args['opt_name'] ); |
|
| 45 | + $this->api_key = $redux['google_map_api_key'] ?? ''; |
|
| 46 | + } else { |
|
| 47 | + $this->api_key = $this->field['api_key']; |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + // Necessary, in case the user doesn't fill out a default array. |
|
| 51 | + $def_street_number = $this->field['default']['street_number'] ?? ''; |
|
| 52 | + $def_route = $this->field['default']['route'] ?? ''; |
|
| 53 | + $def_locality = $this->field['default']['locality'] ?? ''; |
|
| 54 | + $def_state = $this->field['default']['administrative_area_level_1'] ?? ''; |
|
| 55 | + $def_postal = $this->field['default']['postal_code'] ?? ''; |
|
| 56 | + $def_country = $this->field['default']['country'] ?? ''; |
|
| 57 | + $def_lat = $this->field['default']['latitude'] ?? ''; |
|
| 58 | + $def_long = $this->field['default']['longitude'] ?? ''; |
|
| 59 | + $def_marker_info = $this->field['default']['marker_info'] ?? ''; |
|
| 60 | + $def_zoom = $this->field['default']['zoom'] ?? ''; |
|
| 61 | + |
|
| 62 | + $defaults = array( |
|
| 63 | + 'latitude' => $def_lat, |
|
| 64 | + 'longitude' => $def_long, |
|
| 65 | + 'street_number' => $def_street_number, |
|
| 66 | + 'route' => $def_route, |
|
| 67 | + 'locality' => $def_locality, |
|
| 68 | + 'administrative_area_level_1' => $def_state, // <-dickheads at google. lol, srsly...wtf? |
|
| 69 | + // level_1 huh? maybe It's for multiple planets one day. |
|
| 70 | + 'postal_code' => $def_postal, |
|
| 71 | + 'country' => $def_country, |
|
| 72 | + 'marker_info' => $def_marker_info, |
|
| 73 | + 'zoom' => $def_zoom, |
|
| 74 | + ); |
|
| 75 | + |
|
| 76 | + $this->value = wp_parse_args( $this->value, $defaults ); |
|
| 77 | + } |
|
| 78 | + |
|
| 79 | + |
|
| 80 | + /** |
|
| 81 | + * Field Render Function. |
|
| 82 | + * Takes the vars and outputs the HTML for the field in the settings |
|
| 83 | + * |
|
| 84 | + * @since 1.0.0 |
|
| 85 | + * @access public |
|
| 86 | + * @return void |
|
| 87 | + */ |
|
| 88 | + public function render() { |
|
| 89 | + |
|
| 90 | + // Set default or saved zoom |
|
| 91 | + // USA: 39.11676722061108,-100.47761000000003 |
|
| 92 | + // Zoom far: 3 |
|
| 93 | + // zoom close 17. |
|
| 94 | + if ( empty( $this->value['zoom'] ) ) { |
|
| 95 | + if ( $this->value['street_number'] ) { |
|
| 96 | + $the_zoom = 17; // make it close if the street is included. |
|
| 97 | + } else { |
|
| 98 | + $the_zoom = 3; // make it far if it's not. |
|
| 99 | + } |
|
| 100 | + } else { |
|
| 101 | + $the_zoom = $this->value['zoom']; |
|
| 102 | + } |
|
| 103 | + |
|
| 104 | + // Make full address. |
|
| 105 | + $locality = ! empty( $this->value['locality'] ) ? $this->value['locality'] . ', ' : ''; |
|
| 106 | + $route = ! empty( $this->value['route'] ) ? $this->value['route'] . ', ' : ''; |
|
| 107 | + $country = ! empty( $this->value['country'] ) ? ', ' . $this->value['country'] : ''; |
|
| 108 | + |
|
| 109 | + $full = $this->value['street_number'] . ' ' . $route . ' ' . $locality . $this->value['administrative_area_level_1'] . ' ' . $this->value['postal_code'] . $country; |
|
| 110 | + $data_full = rawurlencode( $full ); |
|
| 111 | + |
|
| 112 | + // Hide/show various input fields. |
|
| 113 | + $show_address = $this->field['show_address'] ?? true; |
|
| 114 | + $show_city = $this->field['show_city'] ?? true; |
|
| 115 | + $show_state = $this->field['show_state'] ?? true; |
|
| 116 | + $show_postal = $this->field['show_postal'] ?? true; |
|
| 117 | + $show_country = $this->field['show_country'] ?? true; |
|
| 118 | + $show_lat = $this->field['show_latitude'] ?? true; |
|
| 119 | + $show_long = $this->field['show_longitude'] ?? true; |
|
| 120 | + $show_marker_info = $this->field['show_marker_info'] ?? true; |
|
| 121 | + $show_controls = $this->field['show_controls'] ?? true; |
|
| 122 | + |
|
| 123 | + $this->field['placeholder'] = $this->field['placeholder'] ?? esc_html__( 'Enter your address', 'redux-framework' ); |
|
| 124 | + $this->field['marker_tooltip'] = $this->field['marker_tooltip'] ?? esc_html__( 'Left mouse down on top of me to move me!', 'redux-framework' ); |
|
| 125 | + $this->field['no_geometry_alert'] = $this->field['no_geometry_alert'] ?? esc_html__( 'The returned place contains no geometric data.', 'redux-framework' ); |
|
| 126 | + $this->field['delay_render'] = $this->field['delay_render'] ?? false; |
|
| 127 | + $this->field['class'] = $this->field['class'] ?? ''; |
|
| 128 | + $this->field['show_api_key'] = $this->field['show_api_key'] ?? true; |
|
| 129 | + $this->field['street_view_control'] = $this->field['street_view_control'] ?? true; |
|
| 130 | + $this->field['map_type_control'] = $this->field['map_type_control'] ?? true; |
|
| 131 | + $this->field['scroll_wheel'] = $this->field['scroll_wheel'] ?? false; |
|
| 132 | + $this->field['map_height'] = $this->field['map_height'] ?? ''; |
|
| 133 | + |
|
| 134 | + $map_height = ''; |
|
| 135 | + |
|
| 136 | + if ( ! empty( $this->field['map_height'] ) ) { |
|
| 137 | + $map_height = 'style="height:' . esc_attr( $this->field['map_height'] ) . ';"'; |
|
| 138 | + } |
|
| 139 | + |
|
| 140 | + $geo_alert = rawurlencode( $this->field['no_geometry_alert'] ); |
|
| 141 | + |
|
| 142 | + // admin defined. |
|
| 143 | + $the_lat = $this->value['latitude']; |
|
| 144 | + $the_long = $this->value['longitude']; |
|
| 145 | + $marker_tooltip = rawurlencode( $this->field['marker_tooltip'] ); |
|
| 146 | + |
|
| 147 | + if ( ! empty( $the_lat ) && ! empty( $the_long ) ) { |
|
| 148 | + $full = ''; |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + $hidden_style = ' style="display: none!important;" '; |
|
| 152 | + ?> |
|
| 153 | 153 | |
| 154 | 154 | <div |
| 155 | 155 | class="redux_framework_google_maps <?php echo esc_attr( $this->field['class'] ); ?>" |
@@ -317,12 +317,12 @@ discard block |
||
| 317 | 317 | <div class="google_m_api_key_wrapper"> |
| 318 | 318 | <p class="description" id="google_m_api_key_description"> |
| 319 | 319 | <?php |
| 320 | - $api_key_site = ' ' . sprintf( '<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">%s</a>', esc_html__( 'Get an API Key', 'redux-framework' ) ) . ' '; |
|
| 321 | - $usage_limit_site = ' ' . sprintf( '<a href="https://developers.google.com/maps/documentation/javascript/usage" target="_blank">%s</a>', esc_html__( 'Google Map Usage Limits', 'redux-framework' ) ) . ' '; |
|
| 320 | + $api_key_site = ' ' . sprintf( '<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">%s</a>', esc_html__( 'Get an API Key', 'redux-framework' ) ) . ' '; |
|
| 321 | + $usage_limit_site = ' ' . sprintf( '<a href="https://developers.google.com/maps/documentation/javascript/usage" target="_blank">%s</a>', esc_html__( 'Google Map Usage Limits', 'redux-framework' ) ) . ' '; |
|
| 322 | 322 | |
| 323 | - // translators: %1$s: Google Maps API Key url. %2$s: Google Maps Usage URL. |
|
| 324 | - echo sprintf( esc_html__( 'Google Maps supports 25,000 free map loads per 24 hours for 90 consecutive days. In the events you run a high volume site, you may need to obtain an API Key to continue using Google Map output beyond the free quota. To sign up for an API Key, please visit the %1$s site. For more information about Google Map usage limits, please visit the %2$s guide.', 'redux-framework' ), $api_key_site, $usage_limit_site ) . '<br><br>' . esc_html__( 'Once you have obtained an API Key, please enter it in the text box below and save the options panel.', 'redux-framework' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 325 | - ?> |
|
| 323 | + // translators: %1$s: Google Maps API Key url. %2$s: Google Maps Usage URL. |
|
| 324 | + echo sprintf( esc_html__( 'Google Maps supports 25,000 free map loads per 24 hours for 90 consecutive days. In the events you run a high volume site, you may need to obtain an API Key to continue using Google Map output beyond the free quota. To sign up for an API Key, please visit the %1$s site. For more information about Google Map usage limits, please visit the %2$s guide.', 'redux-framework' ), $api_key_site, $usage_limit_site ) . '<br><br>' . esc_html__( 'Once you have obtained an API Key, please enter it in the text box below and save the options panel.', 'redux-framework' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
|
| 325 | + ?> |
|
| 326 | 326 | </p> |
| 327 | 327 | <label for="google_m_api_key_input"><?php esc_html_e( 'API Key', 'redux-framework' ); ?></label> |
| 328 | 328 | <input |
@@ -336,51 +336,51 @@ discard block |
||
| 336 | 336 | </div> |
| 337 | 337 | |
| 338 | 338 | <?php |
| 339 | - } |
|
| 340 | - |
|
| 341 | - /** |
|
| 342 | - * Enqueue Function. |
|
| 343 | - * If this field requires any scripts, or css define this function and register/enqueue the scripts/css |
|
| 344 | - * |
|
| 345 | - * @since 1.0.0 |
|
| 346 | - * @access public |
|
| 347 | - * @return void |
|
| 348 | - */ |
|
| 349 | - public function enqueue() { |
|
| 350 | - $min = Redux_Functions::isMin(); |
|
| 351 | - |
|
| 352 | - $api_key = ''; |
|
| 353 | - if ( ! empty( $this->api_key ) ) { |
|
| 354 | - $api_key = $this->api_key; |
|
| 355 | - } |
|
| 356 | - |
|
| 357 | - wp_register_script( |
|
| 358 | - 'redux-field-google-maps', |
|
| 359 | - $this->url . 'redux-google-maps' . $min . '.js', |
|
| 360 | - array( 'jquery', 'redux-js' ), |
|
| 361 | - Redux_Extension_Google_Maps::$version, |
|
| 362 | - true |
|
| 363 | - ); |
|
| 364 | - |
|
| 365 | - if ( ! wp_script_is( 'redux-field-google-maps' ) ) { |
|
| 366 | - $script = '(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({ |
|
| 339 | + } |
|
| 340 | + |
|
| 341 | + /** |
|
| 342 | + * Enqueue Function. |
|
| 343 | + * If this field requires any scripts, or css define this function and register/enqueue the scripts/css |
|
| 344 | + * |
|
| 345 | + * @since 1.0.0 |
|
| 346 | + * @access public |
|
| 347 | + * @return void |
|
| 348 | + */ |
|
| 349 | + public function enqueue() { |
|
| 350 | + $min = Redux_Functions::isMin(); |
|
| 351 | + |
|
| 352 | + $api_key = ''; |
|
| 353 | + if ( ! empty( $this->api_key ) ) { |
|
| 354 | + $api_key = $this->api_key; |
|
| 355 | + } |
|
| 356 | + |
|
| 357 | + wp_register_script( |
|
| 358 | + 'redux-field-google-maps', |
|
| 359 | + $this->url . 'redux-google-maps' . $min . '.js', |
|
| 360 | + array( 'jquery', 'redux-js' ), |
|
| 361 | + Redux_Extension_Google_Maps::$version, |
|
| 362 | + true |
|
| 363 | + ); |
|
| 364 | + |
|
| 365 | + if ( ! wp_script_is( 'redux-field-google-maps' ) ) { |
|
| 366 | + $script = '(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({ |
|
| 367 | 367 | key:"' . $api_key . '", |
| 368 | 368 | v:"' . $this->field['map_version'] . '", |
| 369 | 369 | });'; |
| 370 | 370 | |
| 371 | - wp_add_inline_script( 'redux-field-google-maps', $script ); |
|
| 372 | - } |
|
| 373 | - |
|
| 374 | - wp_enqueue_script( 'redux-field-google-maps' ); |
|
| 375 | - |
|
| 376 | - if ( $this->parent->args['dev_mode'] ) { |
|
| 377 | - wp_enqueue_style( |
|
| 378 | - 'redux-field-google-maps', |
|
| 379 | - $this->url . 'redux-google-maps.css', |
|
| 380 | - array(), |
|
| 381 | - Redux_Extension_Google_Maps::$version |
|
| 382 | - ); |
|
| 383 | - } |
|
| 384 | - } |
|
| 385 | - } |
|
| 371 | + wp_add_inline_script( 'redux-field-google-maps', $script ); |
|
| 372 | + } |
|
| 373 | + |
|
| 374 | + wp_enqueue_script( 'redux-field-google-maps' ); |
|
| 375 | + |
|
| 376 | + if ( $this->parent->args['dev_mode'] ) { |
|
| 377 | + wp_enqueue_style( |
|
| 378 | + 'redux-field-google-maps', |
|
| 379 | + $this->url . 'redux-google-maps.css', |
|
| 380 | + array(), |
|
| 381 | + Redux_Extension_Google_Maps::$version |
|
| 382 | + ); |
|
| 383 | + } |
|
| 384 | + } |
|
| 385 | + } |
|
| 386 | 386 | } |