Changeset 2932444
- Timestamp:
- 06/29/2023 09:23:08 PM (3 years ago)
- Location:
- developress-sticky-footer-bar/trunk
- Files:
-
- 4 added
- 1 edited
- 1 moved
-
css/css-backend.css (added)
-
css/css-frontend.css (moved) (moved from developress-sticky-footer-bar/trunk/css/main.css) (1 diff)
-
developress_sticky_footer_bar.php (modified) (17 diffs)
-
js (added)
-
js/js-backend.js (added)
-
js/js-frontend.js (added)
Legend:
- Unmodified
- Added
- Removed
-
developress-sticky-footer-bar/trunk/css/css-frontend.css
r2932443 r2932444 122 122 font-size: 10px; 123 123 } 124 -
developress-sticky-footer-bar/trunk/developress_sticky_footer_bar.php
r2931635 r2932444 10 10 * 11 11 * @link developress.it/roberto_paolucci 12 * @since 2. 0.912 * @since 2.1.0 13 13 * @package Developress_sticky_footer_bar 14 14 * … … 17 17 * Plugin URI: developress.it/plugin/developress_sticky_footer_bar 18 18 * Description: Plugin per la gestione di una footer bar 19 * Version: 2.0.919 * Version: 2.1.0 20 20 * Author: Roberto Paolucci - DeveloPress.it 21 21 * Author URI: developress.it/roberto_paolucci … … 25 25 * Domain Path: /languages 26 26 */ 27 28 29 27 30 28 // Funzione per creare la pagina delle opzioni … … 57 55 ?> 58 56 59 60 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">61 62 57 <div class="wrap"> 63 58 <h1>StickyBar Settings</h1> 64 59 65 <!-- info box - start --> 66 67 <style> 68 .link-info-box { 69 display: inline-block; 70 background-color: #fff; 71 padding: 5px 20px 7px 20px; 72 color: #02a1f0; 73 font-weight: 700; 74 border-radius: 5px; 75 margin-right: 5px; 76 margin-bottom: 10px; 77 border: 1px solid #02a1f0; 78 } 79 80 .link-info-box i { 81 margin-left: 5px; 82 } 83 84 @media (min-width: 768px) { 85 .link-info-box { 86 width: 50%; 87 } 88 } 89 90 @media (min-width: 1024px) { 91 .link-info-box { 92 width: 25%; 93 } 94 } 95 96 .link-info-box a{ 97 text-decoration:none; 98 } 99 100 101 .row-avatar { 102 display: flex; 103 align-items: flex-start; 104 } 105 106 .column { 107 padding: 10px; 108 } 109 110 img { 111 max-width: 100%; 112 height: auto; 113 margin-right: 10px; 114 } 115 116 .column p { 117 margin: 0; 118 } 119 120 .thankyou-rightside { 121 background-color:#ffffff !important; 122 } 123 .icon-headset-developress { 124 color:#009704; 125 } 126 127 .icon-tab-big { 128 color:#009704; 129 font-size:21px; 130 margin-right:20px; 131 } 132 </style> 133 60 <!-- info box - start --> 134 61 <div style="margin-top:30px; margin-bottom:30px;"> 135 62 … … 159 86 <!-- CTAs - end --> 160 87 161 162 163 88 </div> 164 89 <!-- info box - end --> 165 90 166 <form method="post" action="options.php"> 167 168 <!-- tab - start --> 169 170 <style> 171 /* Stili delle tab */ 172 .tab { 173 display: none; 174 } 175 176 /* Stili dei link delle tab */ 177 .tab-label { 178 background-color: #f1f1f1; 179 padding: 8px 16px; 180 cursor: pointer; 181 border: none; 182 outline: none; 183 font-weight: bold; 184 text-decoration:none; 185 } 186 187 /* Stili della tab attiva */ 188 .tab-label.active { 189 background-color: #fff; 190 background-color:#fff; 191 text-decoration:none; 192 } 193 194 /* Stili delle tabelle */ 195 .tab-content { 196 display: none; 197 padding: 16px; 198 background-color:#fff; 199 margin-top:6px; 200 201 202 } 203 204 /* Stili della tab attiva */ 205 .tab-content.active { 206 display: block; 207 208 } 209 210 </style> 211 91 <form method="post" action="options.php"> 212 92 <a href="#" class="tab-label" onclick="openTab(event, 'tab1')"><i class="fas fa-toggle-on"></i> Active Bar</a> 213 93 <a href="#" class="tab-label" onclick="openTab(event, 'tab2')"><i class="fas fa-paint-brush"></i> Style</a> … … 468 348 </table> 469 349 </div> 470 471 <script> 472 function openTab(evt, tabName) { 473 evt.preventDefault(); 474 475 // Nasconde tutti i contenuti delle tab 476 var tabContent = document.getElementsByClassName("tab-content"); 477 for (var i = 0; i < tabContent.length; i++) { 478 tabContent[i].style.display = "none"; 479 } 480 481 // Rimuove la classe "active" da tutti i link delle tab 482 var tabLabels = document.getElementsByClassName("tab-label"); 483 for (var i = 0; i < tabLabels.length; i++) { 484 tabLabels[i].className = tabLabels[i].className.replace(" active", ""); 485 } 486 487 // Mostra il contenuto della tab selezionata e aggiunge la classe "active" al link della tab corrispondente 488 document.getElementById(tabName).style.display = "block"; 489 evt.currentTarget.className += " active"; 490 } 491 492 // Apre la Tab 1 di default al caricamento della pagina 493 document.getElementById("tab1").style.display = "block"; 494 document.getElementsByClassName("tab-label")[0].className += " active"; 495 </script> 350 496 351 497 352 <!-- tab - end --> … … 535 390 add_action('admin_init', 'registra_opzioni_tema'); 536 391 392 393 537 394 // Funzione per mostrare i valori delle opzioni nel footer 538 395 function mostra_valori_opzioni_footer() { … … 545 402 $menu_select = get_option('menu_select'); 546 403 547 548 549 550 404 // start bar html 551 405 … … 555 409 $hyde_bar = "none"; 556 410 } 557 ?> 558 559 560 561 <?php 411 412 562 413 $menu_locations = get_nav_menu_locations(); // Ottiene tutte le posizioni dei menu 563 414 $menu_id = $menu_locations['stikybar']; // Ottiene l'ID del menu nella posizione 'stikybar' … … 576 427 ?> 577 428 578 579 429 <div style="margin-top:5%"></div> 580 581 430 <div class="footer-developress" style="display:<?php echo $hyde_bar; ?>;background-color:<?php echo $background_bar; ?>;"> 582 431 <div class="footer-item sidebar-icon-menu" style="cursor:pointer" onclick="openNav()"> 583 432 <i style="color: <?php echo $font_color;?>" class="fas fa-bars footer-icon"></i> 584 433 <span style="color: <?php echo $font_color;?>" class="footer-label ">Menu</span> 585 586 434 </div> 587 435 … … 637 485 echo '<div class="side-item-box ' . $menu_item->classes[0] . '">'; 638 486 echo '<a class="link-item-bar" href="' . $menu_item->url . '">'; 639 640 echo '<i style="color: ' . $font_color . ';" class="fas fa-' . $menu_item->classes[0] . ' footer-icon"></i>'; // Utilizza la classe CSS assegnata come classe per l'icona 641 642 643 487 echo '<i style="color: ' . $font_color . ';" class="fas fa-' . $menu_item->classes[0] . ' footer-icon"></i>'; // Utilizza la classe CSS assegnata come classe per l'icona 644 488 echo '<span class="footer-label" style="margin-left:20px;color: ' . $font_color . ';">' . $menu_item->title . '</span>'; // Utilizza il titolo della voce di menu come label 645 echo "<div class='linea-div-menu'></div>"; 646 647 648 489 echo "<div class='linea-div-menu'></div>"; 649 490 echo '</a>'; 650 651 491 echo '</div>'; 652 492 } … … 660 500 } 661 501 ?> 662 663 502 </div> 664 503 … … 666 505 667 506 // end bar html 668 669 507 670 508 } … … 673 511 add_action('wp_footer', 'mostra_valori_opzioni_footer'); 674 512 675 // Funzione per mostrare la lista delle voci di menu scelto676 function mostra_voci_menu() {677 $menu_select = get_option('menu_select');678 679 if (!empty($menu_select)) {680 $menu_object = wp_get_nav_menu_object($menu_select);681 682 if ($menu_object) {683 $menu_items = wp_get_nav_menu_items($menu_object->term_id);684 685 if (!empty($menu_items)) {686 echo '<table>';687 echo '<tr><th>Menu Item</th></tr>';688 689 foreach ($menu_items as $menu_item) {690 echo '<tr><td>' . $menu_item->title . '</td></tr>';691 }692 693 echo '</table>';694 }695 }696 }697 }698 699 513 700 514 // Funzione per inserire i codici CSS nel tag <head> 701 function css_ head_developress() {515 function css_js_head_front_developress() { 702 516 $custom_css = get_option('custom_css'); 703 517 if (!empty($custom_css)) { … … 705 519 echo '<style type="text/css">' . $custom_css . '</style>'; 706 520 } 707 ?> 708 709 <?php 521 710 522 $plugin_url = plugin_dir_url( __FILE__ ); 711 523 $visibility = get_option('visibility'); … … 727 539 wp_enqueue_style( 'plugin-style', $plugin_url . 'css/only_phone_tablet.css' ); 728 540 break; 729 730 731 541 default: 732 542 echo ""; 733 543 break; 734 544 } 735 736 737 738 545 ?> 739 546 740 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> 741 <link rel="stylesheet" href="<?php echo $plugin_url;?>css/main.css"> 742 743 744 745 746 <script> 747 function openNav() { 748 document.getElementById("mySidenav").style.width = "250px"; 749 } 750 751 function closeNav() { 752 document.getElementById("mySidenav").style.width = "0"; 753 } 754 </script> 755 547 548 756 549 757 550 <?php 758 759 } 760 add_action('wp_head', 'css_head_developress', 100); 761 762 763 764 765 // Funzione per inserire i codici JS nel tag <head> 766 function js_head_developress() { 767 768 769 ?> 770 771 772 773 774 775 <script> 776 function openNav() { 777 document.getElementById("mySidenav").style.width = "250px"; 778 } 779 780 function closeNav() { 781 document.getElementById("mySidenav").style.width = "0"; 782 } 783 </script> 784 785 786 <?php 787 788 789 } 790 add_action('wp_head', 'js_head_developress', 100); 551 } 552 add_action('wp_head', 'css_js_head_front_developress', 100); 553 791 554 792 555 // Link to settings page from plugins screen … … 799 562 } 800 563 801 ?> 802 564 565 // Gestione CSS e JS 566 567 function developress_enqueue_scripts_js_frontend() { 568 wp_enqueue_script( 'js_frontend_developress', plugin_dir_url( __FILE__ ) . 'js/js-frontend.js', array(), '1.0', true ); 569 } 570 add_action( 'wp_enqueue_scripts', 'developress_enqueue_scripts_js_frontend' ); 571 572 function developress_enqueue_scripts_js_backend() { 573 wp_enqueue_script( 'js_frontend_developress', plugin_dir_url( __FILE__ ) . 'js/js-backend.js', array(), '1.0', true ); 574 } 575 add_action( 'admin_enqueue_scripts', 'developress_enqueue_scripts_js_backend' ); 576 577 function developress_enqueue_scripts_css_backend() { 578 wp_enqueue_style( 'css_frontend_developress', plugin_dir_url( __FILE__ ) . 'css/css-backend.css', array(), '1.0' ); 579 } 580 add_action( 'admin_enqueue_scripts', 'developress_enqueue_scripts_css_backend' ); 581 582 function developress_enqueue_scripts_css_frontend() { 583 wp_enqueue_style( 'css_frontend_developress', plugin_dir_url( __FILE__ ) . 'css/css-frontend.css', array(), '1.0' ); 584 } 585 add_action( 'wp_enqueue_scripts', 'developress_enqueue_scripts_css_frontend' ); 586 587 588 function developress_enqueue_fontawasome_css_frontend() { 589 wp_enqueue_style( 'font_awesome_css', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css', array(), '5.15.3' ); 590 } 591 add_action( 'wp_enqueue_scripts', 'developress_enqueue_fontawasome_css_frontend' ); 592 593 function developress_enqueue_fontawasome_css_backend() { 594 wp_enqueue_style( 'font_awesome_css', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css', array(), '5.15.3' ); 595 } 596 add_action( 'admin_enqueue_scripts', 'developress_enqueue_fontawasome_css_backend' ); 597 598 ?>
Note: See TracChangeset
for help on using the changeset viewer.