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 / display-additional-fields-data-on-bookings-page-wc-booking.php
Last active February 23, 2023 03:53
Display additional fields data on booking details page woocommerce bookings
<?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){
@abdulawal39
abdulawal39 / register-missing-post-types-wp.php
Last active February 20, 2017 04:41
This code will check database for all the post types and create the ones that are not registered using register_post_type() function
/*
* 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;
@abdulawal39
abdulawal39 / hide-folder-list-from-public-without-password.php
Last active October 22, 2015 19:31
hide list of folders from public but let authorised people see with a special url
<?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>";
@abdulawal39
abdulawal39 / extract-data-from-multi-select.php
Last active October 1, 2020 17:21
Extract Values from Multi Select DropDown with PHP
<?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