This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Custom Redirects for WFAM | |
| */ | |
| $request_uri = $_SERVER['REQUEST_URI']; | |
| $request_path = strtok($request_uri, '?'); | |
| // Match: /wp-content/uploads/anything.extension | |
| if (preg_match('#^/wp-content/uploads(/.*\.\w+)$#', $request_path, $matches)) { | |
| // Set the query parameter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .textLayer{ | |
| box-shadow: none!important; | |
| -webkit-box-shadow: none!important; | |
| -moz-box-shadow: none!important; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tncsupport_pre_get_terms_order( $query ) { | |
| if ( is_admin() && ! wp_doing_ajax() ) { | |
| return; | |
| } | |
| if ( isset( $query->query_vars['orderby'] ) && $query->query_vars['orderby'] === 'name' ) { | |
| $query->query_vars['order'] = 'DESC'; | |
| } | |
| } | |
| add_action( 'pre_get_terms', 'tncsupport_pre_get_terms_order' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tncsupport_change_categories_label($translated_text, $text, $domain) { | |
| if ($text === 'Categories' && $domain === 'display-pdf-viewer-for-wordpress-addon') { | |
| return 'Custom Text'; // Replace this with the desired text. | |
| } | |
| return $translated_text; | |
| } | |
| add_filter('gettext', 'tncsupport_change_categories_label', 10, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tnc_support_modify_a_tags() { | |
| ?> | |
| <script type="text/javascript"> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| function tnc_support_update_links() { | |
| // Find all 'a' tags with the class 'fullscreen-mode' | |
| const fullscreenLinks = document.querySelectorAll('a.fullscreen-mode'); | |
| // Loop through the NodeList and update the target to '_parent' | |
| fullscreenLinks.forEach(function(link) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tncpvfw_support_disable_pdfviewer_archive_and_hide_from_google($args, $post_type) { | |
| if ($post_type === 'pdfviewer') { | |
| $args['has_archive'] = false; | |
| } | |
| return $args; | |
| } | |
| add_filter('register_post_type_args', 'tncpvfw_support_disable_pdfviewer_archive_and_hide_from_google', 10, 2); | |
| function tncpvfw_support_add_noindex_meta_tag() { | |
| echo '<meta name="robots" content="noindex, nofollow" />'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This function allows users to click and drag anywhere to flip | |
| * Specifically for TNC FlipBook: https://codecanyon.net/item/pdf-viewer-for-wordpress/8182815 | |
| * Put this code in your active theme's functions.php file | |
| * | |
| * @return void | |
| */ | |
| function tnc_pvfw_support_allow_drag_flip_anywhere() { | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Bypass Autolink on TNC FlipBook | |
| * This snippet allows you to apply autolink to any domains | |
| * Copy and paste this code in your active theme's functions.php file | |
| * Disable Automatic link/iframe in TNC FlipBook > Global Settings to avoid conflicts. | |
| * | |
| * @return void | |
| */ | |
| function tncsupport_pdf_autolink() { | |
| $get_pvfw_global_settings = get_option( 'pvfw_csf_options' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .pvfw_page_prev img, .pvfw_page_next img{ | |
| transform: rotate(90deg); | |
| } | |
| .pvfw_page_next { | |
| z-index: 100; | |
| bottom: 0; | |
| top: inherit; | |
| left: 45%; | |
| right: inherit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zip -r FILE_NAME.zip FOLDER-NAME -x "*/.*" |
NewerOlder