Skip to content

Instantly share code, notes, and snippets.

View raazon's full-sized avatar
❤️
Eat - Sleep - Code

Razon Komar Pal raazon

❤️
Eat - Sleep - Code
View GitHub Profile
// Less project settings, you can edit it and set custom settings.
{
// The mappings of source directory and output directory
"mappings": [
{
"src": "styles/main.less",
"dest": "css/main.css"
},
{
"src": "js/main.js",
@raazon
raazon / admin-ssl-vesta.sh
Created November 10, 2020 19:34 — forked from hasinhayder/admin-ssl-vesta.sh
Install Admin Panel SSL Cert for VestaCP using LetsEncrypt
v-change-sys-hostname somedomain.com
v-add-letsencrypt-domain 'admin' $HOSTNAME '' 'yes'
# v-add-letsencrypt-domain 'admin' $HOSTNAME '' 'no'#mail domain = no
v-update-host-certificate admin $HOSTNAME
echo "UPDATE_HOSTNAME_SSL='yes'" >> /usr/local/vesta/conf/vesta.conf
/**
* Adding custom icon to icon control in Elementor
*/
function jet_add_custom_icons_tab( $tabs = array() ) {
// Append new icons
$new_icons = array(
'account',
'airplane',
'wordpress',
@raazon
raazon / README.md
Created November 23, 2020 07:23 — forked from ControlledChaos/README.md
Sanitization of WordPress Customizer controls

Sanitize the WordPress Customizer

WordPress Snippets

/* Add custom menu item and endpoint to WooCommerce My-Account page */
function my_custom_endpoints() {
add_rewrite_endpoint( 'refunds-returns', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'my_custom_endpoints' );
function my_custom_query_vars( $vars ) {
$vars[] = 'refunds-returns';
@raazon
raazon / elementor-disable-all-wp-widgets.php
Created December 12, 2020 17:49 — forked from obiPlabon/elementor-disable-all-wp-widgets.php
Disable or remove elementor widget from editor panel
<?php
/**
* Disable elementor registered widget.
*
* This will disable all WordPress native widgets
*
* @param \Elementor\Widgets_Manager $widgets_manager Instance of elementor widgets manager
*
* @author obiPlabon <https://obiPlabon.im>
*
@raazon
raazon / elementor-assign-category-snippet.php
Created December 12, 2020 17:49 — forked from obiPlabon/elementor-assign-category-snippet.php
Asssign any elementor widget to a different category
<?php
/**
* Asssign any elementor widget to a different category
*
* To override the existing category just pass [ 'your-custom-category' ]
* And to keep existing [ 'your-custom-category', 'basic' ]
* here 'your-custom-category' is any registered category slug
*
* @param array $config