Skip to content

Instantly share code, notes, and snippets.

View andresfpatino's full-sized avatar
💻
Coding

Andrés Patiño andresfpatino

💻
Coding
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

{
"info": {
"_postman_id": "fa97ebef-a883-4497-a661-1a09ca4ed528",
"name": "WP REST API",
"description": "Common routes for the WP REST API.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "REST API root",
@andresfpatino
andresfpatino / add-wordpress-settings-page.php
Created April 1, 2021 18:44 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@andresfpatino
andresfpatino / main.js
Created August 12, 2020 03:50
consumo de ciudades y dptos
jQuery(function($) {
$.ajax({
url: "assets/js/colombia.json"
}).done((resp) => {
for (var i = 0; i < resp.length; i++) {
// Print Departamentos
$('#departamento').append('<option value="' + resp[i].id + '">' + resp[i].departamento + '</option>');
@andresfpatino
andresfpatino / colombia.json
Created August 12, 2020 03:47
Ciudades y departamentos Colombia
[
{
"id":0,
"departamento":"Amazonas",
"ciudades":[
"Leticia",
"Puerto Nari\u00f1o"
]
},
{
@andresfpatino
andresfpatino / functions.php
Created June 9, 2020 17:00
Añadir producto cruzado masivamente
function add_cross_sells_ids_tapabocas() {
if( is_cart() ) {
global $woocommerce;
$args = array(
'post_type' => 'product',
'posts_per_page' => 1000
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) {
while ( $loop->have_posts() ) : $loop->the_post();
@andresfpatino
andresfpatino / index.html
Created June 9, 2020 15:22
Mapa con filtro de localización de tiendas - API Google maps
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Api maps</title>
</head>
<body>
<div id="informacion">
<h3 id="titulo">Localiza tu tienda</h3>
<div id="filtrosMapa">