Changeset 3364114
- Timestamp:
- 09/18/2025 04:46:47 PM (6 months ago)
- Location:
- wpyog-documents/trunk
- Files:
-
- 2 edited
-
index.php (modified) (4 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpyog-documents/trunk/index.php
r3051728 r3364114 5 5 Author: WPYog 6 6 Author URI: http://wpyog.com/ 7 Version: 1.3. 37 Version: 1.3.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 164 164 function save_wpyog_document_meta_data($post_id , $post ) { 165 165 if($post->post_type == 'wpyog_document') { 166 $document_link = !empty($_POST['document_link']) ? $_POST['document_link']: '';166 $document_link = !empty($_POST['document_link']) ? sanitize_text_field($_POST['document_link']) : ''; 167 167 update_post_meta($post_id, 'document_link', $document_link); 168 168 } … … 313 313 314 314 if (isset($_REQUEST['download_url']) && !empty($_REQUEST['download_url'])) { 315 $downloadUrl = $_REQUEST['download_url'];315 $downloadUrl = sanitize_text_field($_REQUEST['download_url']); 316 316 $post_id = base64_decode( urldecode( $downloadUrl)); 317 317 $document_link = get_post_meta( $post_id, 'document_link', true ); … … 410 410 $taxonomy = 'wpyog_document_category'; // change to your taxonomy 411 411 if ($typenow == $post_type) { 412 $selected = isset($_GET[$taxonomy]) ? $_GET[$taxonomy]: '';412 $selected = isset($_GET[$taxonomy]) ? sanitize_text_field($_GET[$taxonomy]) : ''; 413 413 $info_taxonomy = get_taxonomy($taxonomy); 414 414 wp_dropdown_categories(array( -
wpyog-documents/trunk/readme.txt
r3037244 r3364114 3 3 Contributors: wpyog 4 4 Donate link: http://wpyog.com/ 5 Tags: Document Management, Document, Simple Documents , Topics, PDF document upload,Word document upload5 Tags: Simple Document Management, Documents, PDF & Word document upload 6 6 Requires at least: 4.0 7 Tested up to: 6.4.3 8 Stable tag: trunk 7 Tested up to: 6.8.2 8 Stable tag: 1.3.4 9 Requires PHP: 7.0 9 10 License: GPLv2 or later 10 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 38 * This attribute filters the shortcode view to only show documents that are in the specified category. 38 39 * Only accepts category ID. 39 * Examples: [wpyog-document-list category= ”7”]40 * Examples: [wpyog-document-list category="7"] 40 41 * Desc 41 42 This attribute turns on or off the display of description of the document in the document list. 42 Only accepts “0” or “1”. 1 is to display and 0 is to hide.43 Examples: [wpyog-document-list desc= ”0”]43 Only accepts "0" or "1". 1 is to display and 0 is to hide. 44 Examples: [wpyog-document-list desc="0"] 44 45 * Date 45 46 * This attribute turns on or off the display of document uploaded date in the document list. 46 * Only accepts “0” or “1”. 1 is to display and 0 is to hide.47 * Examples: [wpyog-document-list date= ”0”]47 * Only accepts "0" or "1". 1 is to display and 0 is to hide. 48 * Examples: [wpyog-document-list date="0"] 48 49 * Order By 49 50 * This attribute tells which field to use to order the document list. 50 * Only accepts “date”to order documents by date.51 * Examples: [wpyog-document-list orderby= ”date”]51 * Only accepts "date" to order documents by date. 52 * Examples: [wpyog-document-list orderby="date"] 52 53 * Order 53 54 * This attribute decides the order of the document list. By default documents are listed by Descending date. 54 * Only accepts “desc” or “asc”. Desc is to display in descending order and ASC is to display in Ascending order. This is used together with OrderBy Attribute55 * Examples: [wpyog-document-list order= ”desc”]55 * Only accepts "desc" or "asc". Desc is to display in descending order and ASC is to display in Ascending order. This is used together with OrderBy Attribute 56 * Examples: [wpyog-document-list order="desc"] 56 57 * Download 57 58 * This attribute turns on or off the display of the download option in the document list. 58 * Only accepts “0” or “1”. 1 is to display and 0 is to hide.59 * Examples: [wpyog-document-list download= ”0”]59 * Only accepts "0" or "1". 1 is to display and 0 is to hide. 60 * Examples: [wpyog-document-list download="0"] 60 61 * Limit 61 62 * This attribute limits the number of records/documents to list. By default it lists all documents. 62 * Accepts numeric values like “3” or “4”. 3 is to limit 3 documents.63 * Examples: [wpyog-document-list limit= ”3”]63 * Accepts numeric values like "3" or "4". 3 is to limit 3 documents. 64 * Examples: [wpyog-document-list limit="3"] 64 65 * ID 65 66 * This attribute is used to display individual documents. 66 * Accepts numeric values like “3” or “4”. 3 is the ID of the document that you wish to display.67 * Examples: [wpyog-document-list id= ”4”]67 * Accepts numeric values like '3' or "4". 3 is the ID of the document that you wish to display. 68 * Examples: [wpyog-document-list id="4"] 68 69 * This is a VARSHYL TECH Project. 69 70 * SUMMARY … … 76 77 3. Activate the plugin from the plugins tab of your Wordpress admin. 77 78 4. Upload documents to "WPYog Document". 78 5. Place shortcodes [wpyog-document-list] or single document shortcode [wpyog-document id=16] id=“16” is the id of the document, replace with your own document id or copy from “WPYog Document”section.79 5. Place shortcodes [wpyog-document-list] or single document shortcode [wpyog-document id=16] where id=16 is the id of the document, replace with your own document id or copy from "WPYog Document" section. 79 80 80 81 == Frequently Asked Questions == … … 92 93 93 94 1. The WPYog Documents menu. 95 96 == Changelog == 97 98 = 1.3.4 = 99 * Added Sanitize function for the text input field. 100 101 102 == Upgrade Notice == 103 104 = 1.3.4 = 105 Sanitized the text input field to prevent XSS attack.
Note: See TracChangeset
for help on using the changeset viewer.