Skip to content

Instantly share code, notes, and snippets.

View Ezekiel1349's full-sized avatar
💻
Working at Home!

Ezequiel Alonzo Ezekiel1349

💻
Working at Home!
View GitHub Profile
@Ezekiel1349
Ezekiel1349 / np_javascript.js
Created June 16, 2023 09:57
Roaming Destacado
var npSElements = document.querySelectorAll('.np-s');
npSElements.forEach(function(element) {
var roam = element.querySelector('[data-modal="#movistar-roaming"]');
var roamTxt = element.querySelector('[data-modal="#movistar-roaming"] p > em:last-of-type');
var roamBox = element.querySelector('.np-s-content > a');
if (roam !== null) {
var npRoamingBox = document.createElement('span');
npRoamingBox.className = 'np_roaming_box';
@Ezekiel1349
Ezekiel1349 / ax_reboot.scss
Last active March 22, 2023 23:44
Código base para hacer un reboot file
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-size: 16px;
line-height: 1.2;
@Ezekiel1349
Ezekiel1349 / fac_menulateral.php
Last active March 8, 2023 08:23
Menú Lateral Fotoacces
<?php
/**
* 1. Guardar este documento en el directorio "templates" como "fac_menulateral.php"
* 2. Guardar el siguiente codigo en functions.php
* function fac_menulateral_code() {
* ob_start();
* include_once('template/fac_menulateral.php');
* return ob_get_clean();
* } add_shortcode('fac_menulateral', 'fac_menulateral_code');
function my_custom_post_types() {
$args = array(
'label' => 'Recipes',
'hierarchical' => true,
'taxonomies => array( 'post_tag' )
);
register_post_type( 'recipe', $args );
}
add_action( 'init', 'my_custom_post_types' );
@Ezekiel1349
Ezekiel1349 / LICENSE.md
Created December 26, 2021 20:13
Licencia WTFPL
        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                Version 2, December 2004

Copyright (C) 2004 Sam Hocevar [email protected]

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

@Ezekiel1349
Ezekiel1349 / woocommerce-add-new-tab-my-account-page.php
Created October 26, 2021 19:27 — forked from sandeshjangam/woocommerce-add-new-tab-my-account-page.php
WooCommerce - Add New “Tab” at My Account Page
<?php
/**
* @snippet WooCommerce How To Add New Tab @ My Account
* @how-to Watch tutorial @ https://techiesandesh.com
* @author Sandesh Jangam
* @compatible WooCommerce 3.6.2
* @donate $7 https://www.paypal.me/SandeshJangam/7
*/
/**
<?php
if(!function_exists('wc_get_products')) {
return;
}
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
$ordering = WC()->query->get_catalog_ordering_args();
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby']));
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby'];
@Ezekiel1349
Ezekiel1349 / plugin.php
Created July 15, 2021 16:38 — forked from claudiosanches/plugin.php
WooCommerce - Send "New User Registration" email to admins when new customer is created.
<?php
/**
* Send "New User Registration" email to admins when new customer is created on WooCommerce.
*
* @param int $id New customer ID.
*/
function my_wc_customer_created_notification( $id ) {
wp_new_user_notification( $id, null, 'admin' );
}
@Ezekiel1349
Ezekiel1349 / attributes-as-options.php
Created January 28, 2021 11:45 — forked from dazecoop/attributes-as-options.php
WooCommerce product attributes as selectable options without variations
<?php
/**
* List available attributes on product page in a drop-down selection
*/
add_action('woocommerce_before_add_to_cart_button', 'list_attributes_on_product_page');
function list_attributes_on_product_page() {
global $product;
$attributes = $product->get_attributes();
@Ezekiel1349
Ezekiel1349 / countries
Created March 1, 2020 00:08 — forked from kalinchernev/countries
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria