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
type WhenStringThenStringElseCustom<T, K> = T extends string ? string : K | |
type ProcessEnvValue = string | undefined | |
export const getEnv = <T extends string | undefined>( | |
key: string, | |
fallback?: T | |
): WhenStringThenStringElseCustom<T, ProcessEnvValue> => { | |
return ( | |
process.env[key] ?? |
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 | |
/** | |
* QuotesOfTheDay Uninstall | |
* | |
* @since 1.0.0 | |
* @package QuotesOfTheDay | |
*/ | |
// If not called by WordPress |
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
/** | |
* QuotesOfTheDay Deactivation Hook | |
* @since 1.0.0 | |
*/ | |
function quotesoftheday_deactivation_hook() { | |
//wp_die("Deactivation Hook"); | |
} | |
register_deactivation_hook(QUOTESOFTHEDAY_PLUGIN_FILE, 'quotesoftheday_deactivation_hook'); |
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
/** | |
* QuotesOfTheDay Activation Hook | |
* @since 1.0.0 | |
*/ | |
function quotesoftheday_activation_hook() { | |
//wp_die("Activation Hook"); | |
} | |
register_activation_hook(QUOTESOFTHEDAY_PLUGIN_FILE, 'quotesoftheday_activation_hook'); |
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 | |
/** | |
* Plugin Name: Quotes Of The Day | |
* Plugin URI: https://www.ashiish.me/ | |
* Description: Everyday is a quote day, welcome your users with a quotes every time they visit your website. | |
* Version: 1.0.0 | |
* Author: Ashish Yadav | |
* Author URI: https://www.ashiish.me | |
* License: GPLv2 or later |
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 | |
/** | |
* | |
* @package hello-world | |
* | |
* Plugin Name: Hello World | |
* Plugin URI: https://www.ashiish.me/ | |
* Description: A plugin to greet the visitors or just another test plugin to be honest. | |
* Version: 1.0.0 |
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 | |
// Class in php | |
class MyClass { | |
// our private variable | |
private $name; | |
// MyClass Constructor | |
function __construct() { |
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 | |
// Class in php | |
class Parents { | |
public function eye_color() { | |
echo "Black"; | |
} | |
} |
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 | |
// Class in php | |
class MyClass { | |
// MyClass Constructor | |
function __construct() { | |
// empty | |
} |
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 | |
// Class in php | |
class MyClass { | |
// our data and methods goes here | |
} | |
?> |
NewerOlder