Changeset 2498331
- Timestamp:
- 03/17/2021 10:41:18 PM (5 years ago)
- Location:
- documents-for-woocommerce/trunk
- Files:
-
- 5 edited
-
README.md (modified) (1 diff)
-
assets/main.css (modified) (1 diff)
-
documents-for-woocommerce.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
templates/html-product-document.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
documents-for-woocommerce/trunk/README.md
r2497391 r2498331 13 13 ## Changelog ## 14 14 15 ### 1.0.2 ### 16 Bug fix 17 18 ### 1.0.1 ### 19 Bug fix 20 15 21 ### 1.0.0 ### 16 22 Released plugin -
documents-for-woocommerce/trunk/assets/main.css
r2497391 r2498331 40 40 align-items: center; 41 41 justify-content: center; 42 width: 20px; 42 width: 40px; 43 margin: 0; 43 44 } -
documents-for-woocommerce/trunk/documents-for-woocommerce.php
r2497407 r2498331 124 124 echo '<div id="documents_product_data" class="panel woocommerce_options_panel hidden">'; 125 125 126 woocommerce_wp_text_input( array(127 'id' => 'document_main_title',128 'value' => $tab_title,129 'label' => 'Documents Tab Title',130 'description' => 'This is the name of the tab shown on the frontend',131 'desc_tip' => true,132 ) );126 woocommerce_wp_text_input( array( 127 'id' => 'document_main_title', 128 'value' => $tab_title, 129 'label' => 'Documents Tab Title', 130 'description' => 'This is the name of the tab shown on the frontend', 131 'desc_tip' => true, 132 ) ); 133 133 134 $documents = get_post_meta( get_the_ID(), 'documents', true ); 135 if( $documents ){ 136 $i = 1; 134 $documents = get_post_meta( get_the_ID(), 'documents', true ); 137 135 echo '<table class="widefat woocommerce_documents">'; 138 136 echo '<thead>'; … … 146 144 echo '</thead>'; 147 145 echo '<tbody>'; 146 if( $documents ){ 147 $i = 1; 148 148 foreach( $documents as $key => $each_document ) { 149 149 echo '<tr>'; … … 152 152 echo '</tr>'; 153 153 } 154 } else { 155 echo '<tr>'; 156 include __DIR__ . '/templates/html-product-document.php'; 157 echo '</tr>'; 158 } 154 159 echo '</tbody>'; 155 160 echo '</table>'; 156 161 echo '<a href="#" class="button add_doc_button">' . esc_html__( "Add document", "woocommerce" ) . '</a>'; 157 }158 162 159 163 echo '</div>'; -
documents-for-woocommerce/trunk/readme.txt
r2497692 r2498331 5 5 Tested up to: 5.7 6 6 Requires PHP: 5.6 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GNU General Public License v3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 16 16 Documents for WooCommerce allows you to add downloadable documents to products in WooCommerce and display them on the frontend under a separate tab. 17 17 18 Ideal for adding downloadable User Guides, User Manuals, Size Charts, etc to your product pages. 19 18 20 == Installation == 19 21 … … 23 25 24 26 1. Backend options 25 2. Storefront example 27 2. Backend options 28 3. Backend options 29 4. Storefront example 26 30 27 31 == Changelog == 32 33 = 1.0.2 = 34 Bug fix 35 36 = 1.0.1 = 37 Bug fix 28 38 29 39 = 1.0.0 = -
documents-for-woocommerce/trunk/templates/html-product-document.php
r2497391 r2498331 7 7 </td> 8 8 <td colspan="2"> 9 <input type="text" class="document_title" value="<?php echo $each_document["name"]; ?>" name="document_title[]" placeholder="File name">9 <input type="text" class="document_title" value="<?php echo isset($each_document) ? $each_document["name"] : ''; ?>" name="document_title[]" placeholder="File name"> 10 10 </td> 11 11 <td colspan="2" class="file_url"> 12 <input type="text" class="document_url" value="<?php echo $each_document["url"]; ?>" name="document_url[]" placeholder="https://">12 <input type="text" class="document_url" value="<?php echo isset($each_document) ? $each_document["url"] : ''; ?>" name="document_url[]" placeholder="https://"> 13 13 </td> 14 14 <td>
Note: See TracChangeset
for help on using the changeset viewer.