Skip to content

Instantly share code, notes, and snippets.

View abdulawal39's full-sized avatar
🎯
Focusing

Abdul Awal Uzzal abdulawal39

🎯
Focusing
View GitHub Profile
@abdulawal39
abdulawal39 / hide-topbar-pvfw.css
Created July 18, 2020 10:51
Hide Topbar Completely in PDF Viewer for WordPress
/**
*
* This will hide the topbar on viewer page
* put the following css in custom css field of PDF Viewer options page
*
*/
.toolbar{
display: none;
}
@abdulawal39
abdulawal39 / pagenav-display.css
Created July 15, 2020 06:33
Fix previous and next buttons hiding issue on PDF Viewer for WordPress
/**
* This css is used to fix left and right nav buttons hiding issue on android devices
* for PDF Viewer for WordPress
* This css should be used in custom css section of PDF Viewer settings page. Screenshot: https://prnt.sc/ti13oh
*/
.pvfw_page_prev{
z-index: 100;
}
.pvfw_page_next{
z-index: 100;
@abdulawal39
abdulawal39 / hide-attachments-outline-pvfw.css
Created June 13, 2020 14:35
Css code To hide attachment and outline buttons on PDF Viewer for WordPress.
button#viewOutline {
display: none;
}
button#viewAttachments {
display: none;
}
@abdulawal39
abdulawal39 / change-sharing-thumbnail-pvfw.php
Created June 6, 2020 01:14
put the code in your active theme's functions.php and put thw new image url in line 2 inside the quotes.
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');
@abdulawal39
abdulawal39 / nofollow-pdf-viewer-for-wordpress.php
Created June 5, 2020 07:51
Code to make PDF Viewer for WordPress viewer pages nofollow for search engines.
function tnc_nofollow_pdf_viewer(){
echo '<meta name="robots" content="noindex">';
}
add_action('tnc_pvfw_head', 'tnc_nofollow_pdf_viewer');
@abdulawal39
abdulawal39 / woocommerce-sort-attribute-values-for-specific-attribute.php
Last active May 5, 2020 00:10
Sort WooCommerce Product Attribute Values on single product page only for specific attributes. Details on: https://abdulawal.com/?p=1463
/**
* Sort Attribute values in ascending order for specific attributes
* @param array $args
* @return array return sorted $args array
*/
function abd_sort_wc_attribute_values( $args ){
if( $args['attribute'] == "Attribute Name" ){ // replace Attribute Name with your attribute's name
$get_options = $args['options'];
asort( $get_options );
$args['options'] = $get_options;
@abdulawal39
abdulawal39 / woocommerce-sort-attribute-values-in-dropdown.php
Last active May 4, 2020 23:53
Sort WooCommerce Product Attribute Values on single product page. Details on: https://abdulawal.com/?p=1463
/**
* Sort Attribute values in ascending order for any attribute
* @param array $args
* @return array return sorted $args array
*/
function abd_sort_wc_attribute_values( $args ){
$get_options = $args['options'];
asort( $get_options );
$args['options'] = $get_options;
return $args;
@abdulawal39
abdulawal39 / change-basic-fonts-pdf-viewer-for-wordpress.css
Created April 24, 2020 12:05
To Change fonts of toolbar of PDF Viewer for WordPress Plugin
#toolbarContainer{
font-family: 'Nanum Gothic', sans-serif; // replace with your preferred font family
}
#sidebarContainer{
font-family: 'Nanum Gothic', sans-serif; // replace with your preferred font family
}
#secondaryToolbar{
font-family: 'Nanum Gothic', sans-serif; // replace with your preferred font family
}
input, button, select, label{
@abdulawal39
abdulawal39 / timezones-with-gmt-compare.php
Created March 9, 2020 14:05
contains comparison with GMT
array(
'America/New_York' => '(GMT-5:00) America/New_York (Eastern Standard Time)',
'America/Adak' => '(GMT-10:00) America/Adak (Hawaii-Aleutian Standard Time)',
'America/Atka' => '(GMT-10:00) America/Atka (Hawaii-Aleutian Standard Time)',
'America/Anchorage' => '(GMT-9:00) America/Anchorage (Alaska Standard Time)',
'America/Juneau' => '(GMT-9:00) America/Juneau (Alaska Standard Time)',
'America/Nome' => '(GMT-9:00) America/Nome (Alaska Standard Time)',
'America/Yakutat' => '(GMT-9:00) America/Yakutat (Alaska Standard Time)',
'America/Dawson' => '(GMT-8:00) America/Dawson (Pacific Standard Time)',
'America/Ensenada' => '(GMT-8:00) America/Ensenada (Pacific Standard Time)',
@abdulawal39
abdulawal39 / timezones-list.php
Created March 9, 2020 11:45
Timezones Array
$timezone_list = array(
'America/New_York' => 'Eastern Standard Time',
'America/Adak' => 'Hawaii-Aleutian Standard Time',
'America/Atka' => 'Hawaii-Aleutian Standard Time',
'America/Anchorage' => 'Alaska Standard Time',
'America/Juneau' => 'Alaska Standard Time',
'America/Nome' => 'Alaska Standard Time',
'America/Yakutat' => 'Alaska Standard Time',
'America/Dawson' => 'Pacific Standard Time',
'America/Ensenada' => 'Pacific Standard Time',