Skip to content

Instantly share code, notes, and snippets.

View josanua's full-sized avatar
🎯
Focusing

Andrew josanua

🎯
Focusing
View GitHub Profile
@josanua
josanua / plugin-text-utils.txt
Last active May 12, 2020 10:08
Plugins text utils
// Contact Form 7 for pipes USA states list select
"Alabama|AL"
"Alaska|AK"
"Arizona|AZ"
"Arkansas|AR"
"California|CA"
"Colorado|CO"
"Connecticut|CT"
"Delaware|DE"
"District of Columbia|DC"
@josanua
josanua / sass.css
Last active May 24, 2023 13:30
sass helper
https://sass-lang.com/guide
https://sass-scss.ru/guide/
/*** Setup watcher in IDE ***/
/usr/local/bin/scss
--no-cache
--update
--sourcemap=none
$FileName$:$ProjectFileDir$/css/$FileNameWithoutExtension$.css
@josanua
josanua / js-helper.js
Last active November 18, 2024 11:09
JS Helper
// Books to read
https://exploringjs.com/impatient-js/
// Defines that JavaScript code should be executed in "strict mode".
'use strict';
// Need to study, in order:
https://www.digitalocean.com/community/tutorials/understanding-variables-scope-hoisting-in-javascript
https://www.digitalocean.com/community/tutorials/understanding-syntax-and-code-structure-in-javascript
@josanua
josanua / woocommerce.php
Last active February 8, 2024 13:34
woo helper
<?php
// Custom templates, Overrade template
https://docs.woocommerce.com/document/template-structure/
// Get order info on thankyou page
https://businessbloomer.com/woocommerce-easily-get-order-info-total-items-etc-from-order-object/
// Get Order ID
$order->get_id();
@josanua
josanua / godaddy-helper.txt
Last active November 6, 2019 11:10
godaddy helper
// Settings PHP
https://in.godaddy.com/help/what-filename-does-my-php-initialization-file-need-to-use-8913
https://www.godaddy.com/help/php-upload-limits-on-shared-hosting-1475
Managed WordPress .user.ini /html (one per website)
@josanua
josanua / wp-remove-dashboard.php
Last active January 25, 2024 23:53 — forked from chrisguitarguy/wp-remove-dashboard.php
Remove all the default WordPress dashboard widgets.
<?php
/*
Plugin Name: Remove Dashboard Meta Boxes
Plugin URI: http://pmg.co/category/wordpress
Description: Removes the default dashboard widgets from the WordPress admin.
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: GPL2
*/
@josanua
josanua / wp-users.php
Last active December 24, 2022 03:57
wp users
<?php
/************ user system ************/
https://wordpress.stackexchange.com/questions/61353/how-to-check-username-password-without-signing-in-the-user
// Authenticate a user, confirming the username and password are valid.
wp_authenticate_username_password( $user, $username, $password );
username_exists( $username);
https://developer.wordpress.org/reference/functions/get_userdata/
get_userdata(int $user_id)
@josanua
josanua / paypal-helper.php
Last active September 7, 2019 19:59
paypall helper
<?php
// ppl ipn, test paypal
// sitename.com/?action=ipn_handler
add_action( 'init', 'paypal_ipn' );
// Custom IPN
@josanua
josanua / git.txt
Last active September 26, 2024 12:48
git
https://githowto.com/
https://training.github.com/
https://www.godaddy.com/help/use-git-to-manage-your-site-12067
https://www.nobledesktop.com/learn/git/git-branches
// conventions
https://dev.to/varbsan/a-simplified-convention-for-naming-branches-and-commits-in-git-il4
@josanua
josanua / wp-ajax.php
Last active November 10, 2024 22:15
wp ajax
<?php
https://wp-kama.ru/id_2018/ajax-v-wordpress.html
https://codex.wordpress.org/AJAX_in_Plugins
// Additional good resources
https://premium.wpmudev.org/blog/load-posts-ajax/
ajaxurl // variabila care este declarata global pe toate paginile de administrator,
// deobicei are valoare /wp-admin/admin-ajax.php
// aceasta variabila nu este declarata in template (thema) site-ului