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_change_share_image(){ | |
return 'IMAGE_URL_HERE'; // change to the new image url | |
} | |
add_filter('tnc_pvfw_facebook_share_thumb_url', 'tnc_change_share_image'); |
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
button#viewOutline { | |
display: none; | |
} | |
button#viewAttachments { | |
display: none; | |
} |
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 will hide the topbar on viewer page | |
* put the following css in custom css field of PDF Viewer options page | |
* | |
*/ | |
.toolbar{ | |
display: none; | |
} |
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
/** | |
* Css code to hide shadow from pages | |
* in PDF Viewer for WordPress | |
* Put this css in Custom CSS field of PDF Viewer options page | |
*/ | |
.textLayer{ | |
box-shadow: none; | |
-webkit-box-shadow: none; | |
} |
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
/** | |
* Put this code in your theme's functions.php file | |
* this will force all links in pdf file to open in a new tab. | |
* https://codecanyon.net/item/pdf-viewer-for-wordpress/8182815 | |
*/ | |
function tnc_pvfw_links_new_tab(){ | |
$output = '<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
document.addEventListener("textlayerrendered", function (e) { | |
jQuery("a").each(function(){ |
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
[ | |
{ | |
"AllowedHeaders": [], | |
"AllowedMethods": [ | |
"GET" | |
], | |
"AllowedOrigins": [ | |
"*" | |
], | |
"ExposeHeaders": [] |
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
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install composer | |
brew install homebrew/php/composer | |
### PHPCS | |
composer global require "squizlabs/php_codesniffer=*" | |
# Add to your .bash_profile |
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
/** | |
* Please add this code in your active theme's functions.php file | |
* This will exclude PDF Viewer from WordPress Search Results | |
*/ | |
add_action( 'init', 'tnc_hide_pvfw_search', 99 ); | |
function tnc_hide_pvfw_search() { | |
global $wp_post_types; |
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
if( ! function_exists( 'themencode_change_pdfviewer_slug' ) ): | |
add_filter( 'register_post_type_args', 'themencode_change_pdfviewer_slug', 10, 2 ); | |
function themencode_change_pdfviewer_slug( $args, $post_type ) { | |
if ( 'pdfviewer' === $post_type ) { | |
$args['rewrite']['slug'] = 'pdfs'; // replace pdfs with your preferred slug | |
} |