Changeset 2297342
- Timestamp:
- 05/03/2020 11:03:46 PM (6 years ago)
- Location:
- wp-studio-tabs
- Files:
-
- 27 added
- 1 deleted
- 4 edited
-
assets/icon-128x128.png (added)
-
assets/icon-256x256.png (added)
-
tags/1.0.5 (added)
-
tags/1.0.5/css (added)
-
tags/1.0.5/css/style.php (added)
-
tags/1.0.5/css/styles-admin.css (added)
-
tags/1.0.5/css/styles-tabby.css (added)
-
tags/1.0.5/css/styles.css (added)
-
tags/1.0.5/images (added)
-
tags/1.0.5/images/icon-128x128.png (added)
-
tags/1.0.5/images/icon-256x256.png (added)
-
tags/1.0.5/images/wpstudio-logo.png (added)
-
tags/1.0.5/includes (added)
-
tags/1.0.5/includes/manage-page.php (added)
-
tags/1.0.5/includes/metabox.php (added)
-
tags/1.0.5/includes/settings-page.php (added)
-
tags/1.0.5/js (added)
-
tags/1.0.5/js/scripts-admin.js (added)
-
tags/1.0.5/js/scripts-tabby.js (added)
-
tags/1.0.5/js/scripts.js (added)
-
tags/1.0.5/readme.txt (added)
-
tags/1.0.5/wpstudio-tabs.php (added)
-
trunk/css/styles-admin.css (modified) (1 diff)
-
trunk/css/styles-tabby.css (added)
-
trunk/css/styles.css (modified) (2 diffs)
-
trunk/images/icon-128x128.png (added)
-
trunk/images/icon-256x256.png (added)
-
trunk/js/scripts-tabby.js (added)
-
trunk/js/scripts.js (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tabs (deleted)
-
trunk/wpstudio-tabs.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-studio-tabs/trunk/css/styles-admin.css
r2242091 r2297342 1 .metabox-holder .wp-studio-logo { 2 width: 177px; 1 #wpst-tab-group li.tab-label { 3 2 display: block; 4 background: #364152; 5 border-radius: 2px; 6 outline: 0; 7 padding-left: 5px; 8 } 9 10 #glt-settings { 3 float: left; 4 font-size: 14px; 5 box-sizing: border-box; 6 line-height: 1.4; 7 font-weight: bold; 8 margin: 0; 9 } 10 11 #wpst-tab-group .wpst-table-body { 12 margin: 0; 13 } 14 15 #wpst-tab-group .wpst-table-body:after { 16 display: block; 17 content: ''; 18 clear: both; 19 height: 0; 20 margin: 0; 21 padding: 0; 22 } 23 24 #wpst-tab-group .wpst-table-head li:first-child, 25 #wpst-tab-group .wpst-table-body li:first-child { 26 width: 15%; 27 } 28 29 #wpst-tab-group .wpst-table-head li:nth-child(2), 30 #wpst-tab-group .wpst-table-body li:nth-child(2) { 31 width: 15%; 32 } 33 34 #wpst-tab-group .wpst-table-head li:nth-child(3), 35 #wpst-tab-group .wpst-table-body li:nth-child(3) { 36 width: 50%; 37 } 38 39 #wpst-tab-group .wpst-table-head li:last-child, 40 #wpst-tab-group .wpst-table-body li:last-child { 41 width: 20%; 42 text-align: center; 43 } 44 45 #wpst-tab-group .wpst-table-body li:last-child input { 46 margin-top: 3px; 47 } 48 49 #wpst-tab-group .wpst-table-body li { 50 line-height: 14px; 51 } 52 53 #wpst-tab-group .wpst-table-body li:nth-child(3) { 54 font-weight: normal; 55 font-size: 12px; 56 } 57 58 #wpst-tab-group .wpst-table-body li:last-child { 59 font-weight: normal; 60 font-size: 12px; 61 } 62 63 .wpst-table-head { 64 border-bottom: #ccd0d4 solid 1px; 65 color: #23282d; 66 margin: 0; 67 } 68 69 .wpst-table-head:after { 70 display: block; 71 content: ''; 72 clear: both; 73 height: 0; 74 margin: 0; 75 padding: 0; 76 } 77 78 .tabs-field-list { 79 background: #f5f5f5; 80 margin-top: -1px; 81 } 82 83 .tabs-field-list .tabs-field-object { 84 background: #fff; 85 border-top: 1px solid #ccd0d4; 86 } 87 88 .tabs-field-list .wpst-tabs-settings { 89 display: none; 90 border-top: 1px solid #ccd0d4; 91 } 92 93 .tabs-field-list .wpst-tabs-settings { 94 display: none; 95 background: #fff; 96 } 97 98 #poststuff .tabs-field-list.ui-sortable .wpst-tabs-settings table { 99 width: 100%; 100 border: 0; 101 background: #fff; 102 border-spacing: 0; 103 } 104 105 #poststuff .tabs-field-list.ui-sortable .wpst-tabs-settings table tbody { 106 border-spacing: 0; 107 } 108 109 #poststuff .tabs-field-list.ui-sortable .wpst-tabs-settings table .setting-label { 110 width: 30%; 111 padding: 15px 12px; 112 } 113 114 #poststuff .tabs-field-list.ui-sortable .wpst-tabs-settings table .setting-input { 115 width: 70%; 116 padding: 15px 12px; 117 border-left-color: #E1E1E1; 118 } 119 120 #poststuff .tabs-field-list.ui-sortable .wpst-tabs-settings table .setting-input input { 121 width: 100%; 122 min-height: 30px; 123 padding: 4px 8px; 124 margin: 0; 125 box-sizing: border-box; 126 font-size: 14px; 127 line-height: 1.4; 128 box-shadow: 0 0 0 transparent; 129 border-radius: 4px; 130 border: 1px solid #7e8993; 131 background-color: #fff; 132 color: #32373c; 133 } 134 135 .tabs-field-object > .handle strong { 136 display: inline-block; 137 padding-bottom: 6px; 138 font-size: 14px; 139 line-height: 14px; 140 min-height: 14px; 141 } 142 143 .tabs-field-list .handle .row-options { 144 visibility: hidden; 145 } 146 147 .tabs-field-object:hover > .handle .row-options, 148 .tabs-field-object.-hover > .handle .row-options { 149 visibility: visible; 150 } 151 152 .tabs-field-object .handle .row-options .delete-field, 153 .tabs-field-object .handle .row-options .edit-field { 154 font-weight: normal; 155 font-size: 12px; 156 margin-right: 4px; 157 } 158 159 .tabs-field-object .handle .row-options .delete-field { 160 color: #a00; 161 } 162 163 .tabs-field-object.open .handle .wpst-table-body { 164 background: #2a9bd9; 165 text-shadow: #268FBB 0 1px 0; 166 color: #fff; 167 position: relative; 168 169 } 170 171 .tabs-field-object.open .handle .edit-field, 172 .tabs-field-object.open .handle .row-options a { 173 color: #fff; 174 padding: 5px 0; 175 } 176 177 .tabs-field-object.open .handle .tabs-order-icon { 178 color: #fff; 179 border: 1px solid #fff 180 } 181 182 .tabs-field-list .handle li, 183 #wpst-tab-group .wpst-table-head li { 184 padding: 10px; 185 } 186 187 .tabs-field-list .handle .tab-label:first-child { 188 text-align: center; 189 } 190 191 .tabs-field-list .handle .tab-label a { 192 color: #0073aa; 193 font-size: 14px; 194 line-height: 14px; 195 text-decoration: none; 196 } 197 198 .tabs-field-list .handle .tabs-order-icon { 199 margin: 1px 0 0; 200 padding-left: 1px; 201 cursor: move; 202 background: transparent; 203 float: left; 204 height: 28px; 205 line-height: 26px; 206 width: 28px; 207 font-size: 13px; 208 font-weight: normal; 209 color: #bbb; 210 position: relative; 211 z-index: 1; 212 border: 1px solid #bbb; 213 border-radius: 100%; 214 } 215 216 .wpst-tabs-footer { 217 width: 100%; 218 padding: 0; 219 margin: 0; 220 background: #f5f5f5; 221 border-top: #d5d9dd solid 1px; 222 } 223 224 /* .wpst-tabs-footer li:last-child { 225 padding-right: 0 226 } */ 227 228 .wpst-tabs-footer:after { 229 content: ''; 230 display: block; 231 clear: both; 232 margin: 0; 233 padding: 0; 234 height: 0; 235 } 236 237 .wpst-tabs-footer li { 238 float: right; 239 padding: 8px 12px; 240 margin: 0; 241 font-size: 12px; 242 line-height: 14px; 243 box-sizing: border-box; 244 padding: 12px 12px 0 8px; 245 } 246 247 #wpstudio__tabs_metabox .inside { 11 248 overflow: hidden; 12 max-width: 120em; 13 } 14 15 #glt-settings .glt-main-settings h3:before { 16 content:'\f108'; 17 } 18 19 #glt-settings .glt-layout-settings h3:before { 20 content:'\f116'; 21 } 22 23 #glt-settings .glt-floating-widget-settings h3:before { 24 content:'\f134'; 25 } 26 27 #glt-settings .glt-behavior-settings h3:before { 28 content:'\f185'; 29 } 30 31 #glt-settings .glt-usage-settings h3:before { 32 content:'\f106'; 33 } 34 35 #glt-settings .glt-preview-settings h3:before { 36 content:'\f115'; 37 } 38 39 #glt-settings .glt-flag-settings h3:before { 40 content:'\f227'; 41 } 42 43 #glt-settings .glt-seo-settings h3:before { 44 content:'\f11e'; 45 } 46 47 #glt-settings .glt-gtranslate-ad h3:before { 48 content:'\f326'; 49 } 50 51 #glt-settings .glt-css-settings h3:before { 52 content:'\f119'; 53 } 54 55 #glt-settings .glt-main-settings h3:before, 56 #glt-settings .glt-layout-settings h3:before, 57 #glt-settings .glt-behavior-settings h3:before, 58 #glt-settings .glt-floating-widget-settings h3:before, 59 #glt-settings .glt-usage-settings h3:before, 60 #glt-settings .glt-preview-settings h3:before, 61 #glt-settings .glt-flag-settings h3:before, 62 #glt-settings .glt-seo-settings h3:before, 63 #glt-settings .glt-gtranslate-ad h3:before, 64 #glt-settings .glt-css-settings h3:before { 65 margin-right: 5px; 66 display: inline-block; 249 } 250 251 #wpstudio__tabs_metabox #wp-simple-tabs-nav > .inside, 252 #wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside { 253 padding-left: 0; 254 padding-right: 0; 255 } 256 257 #wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside { 258 background: #f5f5f5; 259 } 260 261 #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table th { 262 width: 240px 263 } 264 265 #wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside { 266 margin: 0; 267 } 268 269 #wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside .wpst-table-head { 270 background: #fff; 271 } 272 273 #wpstudio__tabs_metabox .handlediv{ 274 color: rgb(255, 255, 255); 275 } 276 277 #wpstudio__tabs_metabox ul.themes-list li { 278 border: 2px solid #fff; 279 cursor: pointer; 280 display: inline-block; 281 height: 80px; 282 overflow: hidden; 283 padding: 5px; 284 width: 150px; 285 } 286 287 #wpstudio__tabs_metabox ul.themes-list li.selected { 288 border: 2px solid #ff5a11; 289 } 290 291 #wpstudio__tabs_metabox ul.themes-list li img { 292 height: auto; 293 width: 100%; 294 } 295 296 #wpstudio__tabs_metabox ul.tabs_bg_img_list li { 297 border: 2px solid #ffffff; 298 cursor: pointer; 299 display: inline-block; 300 height: 50px; 301 margin: 5px; 302 overflow: hidden; 303 vertical-align: top; 304 width: 50px; 305 } 306 307 #wpstudio__tabs_metabox ul.tabs_bg_img_list li img { 308 309 height: auto; 310 width: 100%; 311 } 312 313 #wpstudio__tabs_metabox ul.tabs_bg_img_list li.bg-selected{ 314 border: 2px solid #ff5a11; 315 } 316 317 #wpstudio__tabs_metabox .tabs-content td { 318 background: none repeat scroll 0 0 rgb(245, 245, 245); 319 320 } 321 322 #wpstudio__tabs_metabox .tabs-content td.section-dragHandle { 323 cursor: move; 324 text-align: center; 325 vertical-align: middle; 67 326 width: 20px; 327 } 328 329 330 #wpstudio__tabs_metabox .tabs-content textarea { 331 width: 100%; 332 } 333 334 #wpstudio__tabs_metabox .tabs-header { 335 background: #a7e1ff none repeat scroll 0 0; 336 padding: 5px 5px 10px; 337 } 338 339 #wpstudio__tabs_metabox .tabs-content .active .tabs-header { 340 background: #a7e1ff none repeat scroll 0 0; 341 } 342 343 #wpstudio__tabs_metabox .tabs-header .tabs_active { 344 display: inline-block; 345 float: right; 346 margin-top: 3px; 347 } 348 349 #wpstudio__tabs_metabox .tabs-panel { 350 display: none; 351 } 352 353 #wpstudio__tabs_metabox .tabs-content .active .tabs-panel { 354 background: #bde6fc none repeat scroll 0 0; 355 display: block; 356 padding: 15px 10px 10px; 357 } 358 359 #wpstudio__tabs_metabox .tabs-header .title { 360 display: inline-block; 361 } 362 363 #wpstudio__tabs_metabox .tabs-content .removeTabs { 364 background: rgb(255, 91, 64) none repeat scroll 0 0; 365 color: #fff; 366 cursor: pointer; 367 display: inline-block; 368 float: right; 68 369 height: 20px; 370 margin: 3px; 371 text-align: center; 372 vertical-align: top; 373 width: 20px; 374 } 375 376 #wpstudio__tabs_metabox .tabs-content .removeTabs:hover { 377 background: none repeat scroll 0 0 rgb(255, 134, 87); 378 } 379 380 #wpstudio__tabs_metabox .tabs-content .tabsicon { 381 background: none repeat scroll 0 0 rgb(221, 221, 221); 382 border: 1px solid rgb(153, 153, 153); 383 cursor: pointer; 384 display: inline-block; 385 height: 20px; 386 margin: 3px; 387 text-align: center; 388 vertical-align: top; 389 width: 20px; 390 float: right; 391 } 392 393 #wpstudio__tabs_metabox .tabs-content .tabsicon-custom { 394 background: none repeat scroll 0 0 / 100% auto rgb(221, 221, 221); 395 border: 1px solid rgb(153, 153, 153); 396 cursor: pointer; 397 display: inline-block; 398 height: 20px; 399 margin: 3px; 400 text-align: center; 401 vertical-align: top; 402 width: 20px; 403 float: right; 404 } 405 406 #wpstudio__tabs_metabox .iconholder { 407 background: none repeat scroll 0 0 rgba(221, 221, 221, 0.5); 408 border: 1px solid; 409 display: none; 410 height: 100%; 411 left: 0; 412 padding: 10px; 413 position: fixed; 414 top: 0; 415 width: 100%; 416 z-index: 99; 417 } 418 419 #wpstudio__tabs_metabox .iconholder .iconslist { 420 background: none repeat scroll 0 0 rgb(255, 255, 255); 421 border: 3px solid rgb(221, 221, 221); 422 box-shadow: 0 0 7px -2px rgb(0, 0, 0); 423 height: 150px; 424 margin: 0 auto; 425 overflow-y: scroll; 426 padding: 8px; 427 position: relative; 428 text-align: center; 429 top: 20%; 430 width: 305px; 431 } 432 433 #wpstudio__tabs_metabox .iconholder .iconslist i { 434 border: 1px dotted rgb(153, 153, 153); 435 cursor: pointer; 436 margin: 7px 5px; 437 min-height: 16px; 438 min-width: 16px; 439 padding: 2px; 440 text-align: center; 441 vertical-align: top; 442 } 443 444 #wpstudio__tabs_metabox .tabs-content .tab-new { 445 background: none repeat scroll 0 0 #a3dbff; 446 } 447 448 .para-settings .option-box { 449 margin: 10px 0; 450 padding: 10px; 451 } 452 453 .para-settings .option-box .option-title { 454 font-size: 16px; 455 font-weight: bold; 456 } 457 458 .para-settings .option-box .option-info { 459 color: rgb(153, 153, 153); 460 font-size: 13px; 461 font-weight: normal; 462 margin: 10px 0; 463 } 464 465 .para-settings ul.tab-nav { 466 clear: both; 467 margin: 0; 468 padding: 0; 469 } 470 471 .para-settings ul.tab-nav li { 472 background: none repeat scroll 0 0 rgb(230, 230, 230); 473 cursor: pointer; 474 display: inline-block; 475 float: left; 476 margin: 0; 477 padding: 15px 20px; 478 } 479 480 .para-settings ul.tab-nav li.active{ 481 font-weight: bold; 482 } 483 484 .para-settings ul.box { 485 clear: both; 486 margin: 0; 487 padding: 0; 488 } 489 490 .para-settings ul.box li.tab-box { 491 background: rgb(255, 255, 255) none repeat scroll 0 0; 492 display: none; 493 margin: 0; 494 width: 100%; 495 } 496 497 .para-settings .new_user_profile_social { 498 margin: 15px 5px; 499 } 500 501 .para-settings ul.voting-bg-img-list li { 502 display: inline-block; 503 margin: 5px; 504 } 505 506 .para-settings ul.voting-bg-img-list li img{ 507 border: 2px solid #ffffff; 508 } 509 510 .para-settings ul.voting-bg-img-list li.bg-selected img{ 511 border: 2px solid #ff5a11; 512 } 513 514 .para-settings h2 { 69 515 font-size: 20px; 70 line-height: 1; 71 font-family: dashicons; 72 text-decoration: inherit; 73 font-weight: 400; 74 font-style: normal; 75 vertical-align: top; 76 text-align: center; 77 -webkit-transition: color .1s ease-in 0; 78 transition: color .1s ease-in 0; 79 -webkit-font-smoothing: antialiased; 80 } 516 font-weight: bold; 517 margin: 25px 0; 518 } 519 520 .para-settings .expandable .items { 521 background: none repeat scroll 0 0 rgb(255, 255, 255); 522 border-bottom: 1px solid rgb(153, 153, 153); 523 margin: 2px 0; 524 } 525 526 .para-settings .expandable .items.ui-sortable-helper { 527 border: 1px dashed rgb(153, 153, 153); 528 } 529 530 .para-settings .expandable .header { 531 background: none repeat scroll 0 0 rgb(255, 255, 255); 532 padding: 5px; 533 } 534 535 .para-settings .expandable .active .options { 536 display: block; 537 } 538 539 .para-settings .expandable .options { 540 background: none repeat scroll 0 0 rgb(240, 240, 240); 541 display: none; 542 padding: 10px; 543 } 544 545 #poststuff .postbox .inside h2 { 546 padding-left: 0; 547 margin-left: 0; 548 padding-bottom: 0; 549 } 550 551 #poststuff .postbox .inside h2 .nav-tab:first-child { 552 margin-left: 0; 553 } 554 555 #tabs-width { 556 max-width: 70px; 557 vertical-align: middle; 558 } 559 560 *:focus { 561 outline: 0 !important; 562 box-shadow: none !important; 563 } 564 565 @media (max-width: 799px) { 566 .para-settings ul.tab-nav li { 567 display: block; 568 float: none; 569 } 570 571 .para-settings ul.tab-nav li.active{ 572 font-weight: bold; 573 } 574 575 .para-settings .pricing-table .column { 576 display:block; 577 float:none; 578 width:100%; 579 border-right: 1px solid #ff9601; 580 margin: 50px 0; 581 582 } 583 } /* End max-width: 799px */ 584 585 @media (min-width: 1366px) { 586 #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table { 587 width: 100% 588 } 589 } 590 591 @media (min-width: 1600px) { 592 #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table { 593 width: 75% 594 } 595 } 596 597 @media (min-width: 1920px) { 598 #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table { 599 width: 50% 600 } 601 } -
wp-studio-tabs/trunk/css/styles.css
r2242091 r2297342 1 .tabs-container nav ul li a { 2 padding: 0 .5em; 3 font-size: 1em; 4 text-decoration: none; 5 } 6 7 .tabs-container nav ul li a span { 8 font-family: inherit; 9 font-size: responsive 22px 36px; 10 font-size: calc(16px + 14 * ((100vw - 320px) / 1180)); 11 } 12 13 .tabs-container #tabs nav li.tab-current a { 14 color: #000000; 15 } 16 17 .tabs-container nav ul li.tab-current { 18 border: 1px solid #000000; 19 border-bottom: none; 20 box-shadow: none 21 } 22 23 .tabs-container #tabs nav li.tab-current:before, 24 .tabs-container #tabs nav li.tab-current:after { 25 background: #000000; 26 } 27 28 .tabs-container .content section { 29 padding: 0 1em; 30 } 31 1 32 .tabs-container { 2 33 padding: 20px … … 6 37 padding: 20px 7 38 } 39 40 [role="tablist"] { 41 display: flex; 42 justify-content: center; 43 border-bottom: 1px solid lightgray; 44 list-style: none; 45 margin: 0; 46 padding: 0; 47 } 48 49 [role="tablist"] * { 50 -webkit-box-sizing: border-box; 51 box-sizing: border-box; 52 } 53 54 /** 55 * The tablist item 56 */ 57 @media (min-width: 30em) { 58 [role="tablist"] li { 59 display: inline-block; 60 } 61 } 62 63 /** 64 * The tabs 65 */ 66 67 [role="tab"] { 68 border: 1px solid transparent; 69 border-top-color: lightgray; 70 display: block; 71 padding: 0.5em 1em; 72 text-decoration: none; 73 /** 74 * Active tab styling 75 */ 76 /** 77 * Tabs on hover 78 */ 79 } 80 81 @media (min-width: 30em) { 82 [role="tab"] { 83 border-top-color: transparent; 84 border-top-left-radius: 0.5em; 85 border-top-right-radius: 0.5em; 86 display: inline-block; 87 margin-bottom: -1px; 88 box-shadow: none; 89 outline: 0; 90 } 91 } 92 93 [role="tab"][aria-selected="true"] { 94 background-color: lightgray; 95 } 96 97 [role="presentation"]:first-child { 98 margin-left: 0; 99 } 100 101 [role="tabpanel"] { 102 padding: 3rem; 103 } 104 105 @media (min-width: 30em) { 106 [role="tab"][aria-selected="true"] { 107 background-color: transparent; 108 border: 1px solid lightgray; 109 border-bottom-color: transparent; 110 } 111 } 112 113 [role="tab"]:hover:not([aria-selected="true"]) { 114 background-color: #f7f7f7; 115 } 116 117 @media (min-width: 30em) { 118 [role="tab"]:hover:not([aria-selected="true"]) { 119 border: 1px solid lightgray; 120 } 121 } 122 123 /** 124 * [hidden] fallback for IE10 and lower 125 */ 126 [hidden] { 127 display: none; 128 } 129 130 /* Global styles that override Tabby */ 131 132 @media (max-width: 640px) { 133 [role="tab"] { 134 font-size: 12px 135 } 136 } -
wp-studio-tabs/trunk/readme.txt
r2288475 r2297342 6 6 Requires at least: 2.9 7 7 Tested up to: 5.4 8 Stable tag: 1.0. 48 Stable tag: 1.0.5 9 9 10 10 WP Studio Tabs allows you to create/manage simple animated tabs for your Wordpress website. … … 29 29 == Changelog == 30 30 31 = 1.0.5 = 32 33 * Changed the tab javascript framework, to reduce files and also be more simple. 34 * Added plugin icon logos to add branding. 35 31 36 = 1.0.4 = 32 37 -
wp-studio-tabs/trunk/wpstudio-tabs.php
r2288475 r2297342 5 5 * Plugin URI: http://wp-studio.net 6 6 * Description: WP Studio Tabs allows you to create/manage simple animated tabs for your Wordpress website. 7 * Version: 1.0. 47 * Version: 1.0.5 8 8 * Requires at least: 2.9 9 9 * Author: WP Studio … … 30 30 31 31 add_action( 'init', array(&$this, 'wpstudio__tabs_register_tabs_cpt')); 32 add_action( 'wp_enqueue_scripts', array(&$this, 'load_jquery')); 32 33 add_action( 'wp_enqueue_scripts', array(&$this, 'wpstudio__tabs_enqueues')); 33 34 add_action( 'admin_enqueue_scripts', array(&$this, 'wpstudio__tabs_admin_enqueues')); … … 47 48 public function wpstudio__tabs_deactivate() {} //wpst_deactivate 48 49 50 public function load_jquery() { 51 if (!wp_script_is('jquery','enqueued')) { 52 wp_enqueue_script( 'jquery' ); 53 } 54 } 55 49 56 public function wpstudio__tabs_enqueues() { 57 wp_enqueue_style('styles-tabby', plugins_url('css/styles-tabby.css',__FILE__), '', PLUGIN_VER, ''); 50 58 wp_enqueue_style('styles', plugins_url('css/styles.css',__FILE__), '', PLUGIN_VER, ''); 51 wp_enqueue_style('styles-basic', plugins_url('css/styles-basic.css',__FILE__), '', PLUGIN_VER, ''); 52 wp_enqueue_style('component', plugins_url('tabs/css/component.css',__FILE__), '', PLUGIN_VER, ''); 53 wp_enqueue_script('cbpFWTabs.js', plugins_url('tabs/js/cbpFWTabs.js',__FILE__), array('jquery'), PLUGIN_VER, false); 54 wp_enqueue_script('responsive-tabs', plugins_url('js/responsive-tabs.js',__FILE__), array('jquery'), PLUGIN_VER, false); 59 wp_enqueue_script('scripts-tabby', plugins_url('js/scripts-tabby.js',__FILE__), array('jquery'), PLUGINS_VER, false); 60 //wp_enqueue_script('scripts-polyfills', plugins_url('js/scripts-polyfills.js',__FILE__), array('jquery'), PLUGINS_VER, false); 61 wp_enqueue_script('scripts', plugins_url('js/scripts.js',__FILE__), array('jquery'), PLUGIN_VER, true); 55 62 } 56 63 57 64 public function wpstudio__tabs_admin_enqueues() { 58 65 wp_enqueue_style('dashicons'); 59 wp_enqueue_style('styles-admin-tabsets', plugins_url('css/styles-admin-tabsets.css',__FILE__), '', PLUGIN_VER, '');60 66 wp_enqueue_style( 'styles-admin', plugins_url('css/styles-admin.css',__FILE__), '', PLUGIN_VER, ''); 61 wp_enqueue_style( 'styles-admin-sortables', plugins_url('css/styles-admin-sortables.css',__FILE__), '', PLUGIN_VER, '');62 67 wp_enqueue_script('jquery-ui-sortable'); 63 68 wp_enqueue_script('wp-color-picker'); 64 wp_enqueue_script('scripts-admin', plugins_url('js/scripts-admin.js',__FILE__), '', PLUGIN_VER, false); 65 66 //wp_enqueue_script('scripts-tabs-input', plugins_url('js/scripts-tabs-input.js',__FILE__), '', PLUGIN_VER, ''); 67 //wp_enqueue_script('scripts-tabs-manager', plugins_url('js/scripts-tabs-manager.js',__FILE__), '', PLUGIN_VER, ''); 69 wp_enqueue_script('scripts-admin', plugins_url('js/scripts-admin.js',__FILE__), array('jquery'), PLUGIN_VER, false); 68 70 } 69 71 … … 132 134 $tab_font_color = get_post_meta( $post_id, 'tab_font_color', true ); 133 135 $tab_active = get_post_meta( $post_id, 'wpst_tab_active', true); 136 137 $post_status = get_post_status($post_id); 134 138 135 ob_start(); ?> 139 ob_start(); 140 141 if ($post_status !== 'trash'): ?> 136 142 137 143 <section id="wpst-tabset-<?= $post_id; ?>" class="tabs-container" <?= !empty($tabs_section_bg) ? 'style="background-color:'.$tabs_section_bg.'"' : ''; ?>> 138 144 <div id="tabs-<?= $post_id; ?>" class="tabs"> 139 <nav> 140 <ul> 141 <?php 142 $tabs_order = get_post_meta($post_id, 'wpst_tabs_order', true); 143 $tabs_order_array = explode(',', $tabs_order); 144 $tabs_idx = 0; 145 146 foreach ($tabs_order_array as $ordered_tab): 147 $active_idx = ($tab_active == 'wpst_tab_active_'.$ordered_tab ? $tabs_idx : 0); 148 $id = !empty($ordered_tab) ? $ordered_tab : 'tab-1'; 149 $wpst_tab_label = get_post_meta($post_id, 'wpst_tab_label_'.$id, true); 150 $wpst_tab_content = get_post_meta($post_id, 'wpst_tab_content_'.$id, true); 151 $html = ''; 152 $html .= '<li><a href="#"><span>'.$wpst_tab_label.'</span></a></li>'; 153 echo $html; 154 $tabs_idx++; 155 endforeach; ?> 156 </ul> 157 </nav> 158 159 <div class="content"> 145 <ul data-tabs> 146 <?php 147 148 $tabs_order = get_post_meta($post_id, 'wpst_tabs_order', true); 149 $tabs_order_array = explode(',', $tabs_order); 150 $tabs_idx = 0; 151 $active_idx = array(); 152 153 foreach ($tabs_order_array as $ordered_tab): 154 155 //echo '<pre>'.$tab_active .'<br/>wpst_tab_active_'.$ordered_tab.'</pre>'; 156 $active_idx = ($tab_active == 'wpst_tab_active_'.$ordered_tab ? $tabs_idx : 'undefined'); 157 //echo $active_idx; 158 $id = !empty($ordered_tab) ? $ordered_tab : 'tab-1'; 159 $wpst_tab_label = get_post_meta($post_id, 'wpst_tab_label_'.$id, true); 160 $wpst_tab_content = get_post_meta($post_id, 'wpst_tab_content_'.$id, true); 161 $html = ''; 162 $html .= '<li><a href="#'.$id.'"'.($active_idx !== 'undefined' ? ' data-tabby-default' : '').'><span>'.$wpst_tab_label.'</span></a></li>'; 163 164 $tabs_idx++; 165 echo $html; 166 endforeach; ?> 167 </ul> 168 169 160 170 <?php 161 171 … … 167 177 168 178 $tml = ''; 169 $tml .= '<section id="section-'.$id.'" class="'.(($tab_active == 'wpst_tab_active_'.$ordered_tab) ? 'admin-content-current' : '').'">'; 170 $tml .= '<div>'; 171 $tml .= '<div><p>'.esc_attr($wpst_tab_content).'</p></div>'; 172 $tml .= '</div>'; 173 $tml .= '</section>'; 174 echo $tml; $content_idx++; 179 $tml .= '<div id="'.$id.'">'; 180 //$tml .= '<section id="section-'.$id.'" class="'.(($tab_active == 'wpst_tab_active_'.$ordered_tab) ? 'admin-content-current' : '').'">'; 181 182 $tml .= '<p>'.esc_attr($wpst_tab_content).'</p>'; 183 184 185 $content_idx++; 186 187 $tml .= '</div><!-- .content -->'; 188 189 echo $tml; 175 190 endforeach; ?> 176 </div><!-- .content -->191 177 192 </div><!-- #tabs --> 178 <script> 179 var tabs_id = '<?= 'tabs-'.$post_id; ?>'; 180 var tabs_index = '<?= $active_idx; ?>'; 181 var tab_current = jQuery('.tabs li'); 182 new CBPFWTabs(document.getElementById(tabs_id), tabs_index); 183 </script> 193 194 195 196 184 197 </section> 185 198 199 <?php endif; ?> 200 186 201 <?php $output = ob_get_clean(); return $output; 187 202 }
Note: See TracChangeset
for help on using the changeset viewer.