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
/* Check for updates */ | |
function my_custom_update_checker() { | |
$allowed_pages = array( | |
'update-core', | |
'plugins', | |
'plugin-install', | |
'network/update-core', | |
'network/plugins', | |
'network/plugin-install', | |
'update' |
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
// Run electron app | |
npm run electron | |
// Reload maim window without having to quit and restart electron. | |
npx electronmon . | |
// Install toast module (if you want toast notifications in the app) | |
npm i electron toastify-js | |
// Install Xel UI kit |
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
ssh [email protected] | |
wp core check-update | |
wp core update | |
wp plugin list | |
wp plugin update --all | |
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 | |
// In the main plugin file: | |
/* Register settings */ | |
function my_cool_plugin_settings_init() { | |
register_setting ( | |
'my_cool_plugin_settings', | |
'my_cool_plugin_settings', | |
'my_cool_plugin_settings_validate' |
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
add_action( 'woocommerce_account_content', 'action_woocommerce_account_content' ); | |
function action_woocommerce_account_content( ) { | |
// Do something | |
}; |
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
/* If jQuery is not enqueued, do it */ | |
function enqueue_jquery() { | |
wp_enqueue_script('jquery'); | |
} | |
add_action('wp_enqueue_scripts', 'enqueue_jquery'); |
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 //Custom user profile checkbox: | |
/* Add custom user profile field */ | |
function custom_user_profile_fields($user) { | |
?> | |
<h3>Custom User Fields</h3> | |
<table class="form-table"> | |
<tr> | |
<th> |
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 /* Product names for use in Gravity Forms field */ | |
function ra_all_product_names() { | |
$args = array( | |
'post_type' => 'product', | |
'orderby' => 'title', | |
'order' => 'asc', | |
'posts_per_page' => -1 | |
); | |
$gchoice_count = 1; | |
$input_count = 1; |
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 | |
/* | |
Funds list | |
Usage: | |
funds_list(false); // Include the images | |
or | |
funds_list(); // DOon't include the images | |
*/ | |
function funds_list($output_images = true) { |
NewerOlder