This file contains 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
<?php | |
/** | |
* File Name: extract-data-from-multi-select.php | |
* Description: A Simple way to Extract Data from a Multi Select Input and Store in a variable with spearating each values with comma. | |
* Author: Abdul Awal Uzzal | |
* Author Url: abdulawal.com | |
* Article: http://themencode.com/?p=435 | |
*/ | |
if(isset($_POST['select_name'])){ // select_name will be replaced with your input filed name |
This file contains 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
<?php | |
/** | |
* Hide List of folders from public with php | |
* Article url: http://abdulawal.com/hide-list-of-folders-from-public-with-php/ | |
*/ | |
$access = $_REQUEST['access']; | |
if($access == "admin"){ | |
$dirs = array_filter(glob('*'), 'is_dir'); | |
echo "<ul>"; |
This file contains 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
/* | |
* Register Missing Post Types | |
* Description: This code will check database for all the post types and create the ones that are not registered using register_post_type() function. | |
* Author: Abdul Awal Uzzal | |
* Author URI: https://abdulawal.com/ | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
function tnc_register_unavailable_post_types(){ | |
global $wpdb; |
This file contains 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
<?php | |
/** | |
* Display additional fields data on booking details page, fields added using | |
* Checkout Field Editor (Checkout Manager) for WooCommerce plugin | |
* @author Abdul Awal Uzzal | |
* @url abdulawal.com | |
*/ | |
function tnc_display_additional_checkout_info($booking_id){ |
This file contains 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
$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', |
This file contains 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
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)', |
This file contains 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
#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{ |
This file contains 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
/** | |
* 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; |
This file contains 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
/** | |
* 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; |
This file contains 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_nofollow_pdf_viewer(){ | |
echo '<meta name="robots" content="noindex">'; | |
} | |
add_action('tnc_pvfw_head', 'tnc_nofollow_pdf_viewer'); |
OlderNewer