Skip to content

Instantly share code, notes, and snippets.

View mdibrahimk48's full-sized avatar
🎯
Focusing

Md. Ibrahim Khalil mdibrahimk48

🎯
Focusing
View GitHub Profile
<?php
$login_url = add_filter( 'wpto_login_url', 'smyles_custom_login_url');
function smyles_custom_login_url( $login_url ){
// This will append /custom-login/ to you main site URL as configured in general settings (ie https://domain.com/custom-login/)
$login_url = "https://wooproducttable.com/documentation/";
return $login_url;
}
@mdibrahimk48
mdibrahimk48 / sortingStringAlgorithmJS.html
Created April 7, 2023 17:02
This program takes a user input string, sorts it using the selection sort algorithm, and displays the sorted string and the count of each character in the string.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UV-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorting string using selection sort algorithm</title>
<!-- Made by Md. Ibrahim Khalil -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UV-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorting string using recursive sort algorithm</title>
<!-- Made by Md. Ibrahim Khalil -->
@mdibrahimk48
mdibrahimk48 / file-upload.php
Last active April 26, 2023 09:04
PHP script
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = $_POST["name"];
$image = $_FILES["image"];
// Validate name format with regular expression
if (!preg_match("/^[A-Z][a-z]+\s[A-Z][a-z]+$/", $name)) {
die("Invalid name format");
}
.qib-button-wrapper button.qib-button {
padding: 6px 12px 8px;
height: 41px;
background: #fff;
border: 1px solid #efefef;
cursor: pointer;
font-size: 20px;
line-height: 20px;
width: 41px;
color: #000;
<?php
function codeastrology_custom_scripts() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
//Will click on the ".ct-decrease" class
$(".ct-decrease").click();
});
</script>
@mdibrahimk48
mdibrahimk48 / ca_ssl_verify.php
Created June 1, 2023 04:55
CodeAstrology Plugin's HTTP request verify filter
<?php
add_filter( 'https_ssl_verify', '__return_true', PHP_INT_MAX );
add_filter( 'http_request_args', 'codeAstrology_http_request_ssl_verify', PHP_INT_MAX );
function codeAstrology_http_request_ssl_verify( $args ) {
$args[ 'sslverify' ] = true;
return $args;
@mdibrahimk48
mdibrahimk48 / date-format.php
Created June 7, 2023 13:07
JavaScript customizer code for convert date timestamp to human readable format (For Plugin - Woo Product Table by CodeAstrology)
<?php
function codeastrology_wpt_date_format()
{
?>
<script>
jQuery(function($) {
'use strict';
$(document).ready(function() {
/**
@mdibrahimk48
mdibrahimk48 / wpt_custom_design_tab
Created June 8, 2023 05:14
Woo Product Table Custom Design Tab (Using Filter)
add_filter('wpt_design_tab_fields','wpt_custom_design_tab');
function wpt_custom_design_tab( $args ){
$args['body']['item'][] = [
'title' => 'Table Border Width',
'selector' => 'tbody tr td',
'property' => 'border-width',
'type' => 'text'
];
$args['body']['item'][] = [
'title' => 'Table Border Width',