Skip to content

Instantly share code, notes, and snippets.

View dsebao's full-sized avatar
🏠
Working from home

Sebastian Ortiz dsebao

🏠
Working from home
View GitHub Profile
@dsebao
dsebao / master.yml
Created August 22, 2023 22:00 — forked from joseph-farruggio/master.yml
Github Action for deploying a WordPress plugin
name: Build and Publish Production Plugin
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
@dsebao
dsebao / forms.js
Created August 16, 2023 14:55
forms.js
import { getSection, getTitleGroup } from './util/get-content-elements';
import DOMPurify from 'dompurify';
/** Marketo forms */
export const initForms = ( dataLayer, initDataLayer ) => {
// eslint-disable-next-line no-undef
MktoForms2.whenReady( function( form ) {
form.onValidate( function( valid ) {
const formEl = form.getFormElem();
@dsebao
dsebao / home.css
Created December 5, 2022 13:41
Home CSS - Spanish Site 05-12-22
h1.is-class {
font-weight: 100 !important;
}
figure.wp-block-image.is-resized.size-large.connections-logo-banner.is-style-no-border-radius {
margin-bottom: 3rem;
}
.connections-logo-banner img{
margin-left: 0;
@dsebao
dsebao / acf-ajax.php
Created July 22, 2021 15:28 — forked from daronspence/acf-ajax.php
ACF AJAX for Mike
<?php
add_action('admin_head', function(){
?>
<script type="text/javascript">
/*
updated JS file for use with ACF >= 5.7.0
*/
{{#location}}
<li data-markerid="{{markerid}}">
<div class="list-label">{{marker}}</div>
<div class="list-details">
<div class="list-content">
<div class="loc-name">{{name}}</div>
<div class="loc-addr">{{address}}</div>
{{#if phone}}
<div class="loc-phone">{{phone}}</div>
{{/if}}
@dsebao
dsebao / functions.php
Created December 8, 2020 23:56
WordPress WooCommerce - Show price with partials fees
<?php
add_filter('woocommerce_get_price_html', 'custom_price_message', 100, 2);
function custom_price_message($price, $product)
{
//aca se podria realizar diferentes acciones dependiendo del tipo de producto, es solo de muestra
if ($product->get_type() === 'simple') {
}
@dsebao
dsebao / fork-me-fcc-test-suite-template.markdown
Last active July 26, 2020 19:19
Fork Me! FCC: Test Suite Template
//Este es el javascript del boton
function addBtnDirector(){
<sccript>
let btn = document.querySelector('a.btndirectors');
btn.addEventListener('click',function(e){
e.preventDefault();
let nav = document.querySelector('ul.masonry-filter');
nav.classList.toggle('mostrar');
});
</script>
@dsebao
dsebao / functions.php
Last active June 11, 2020 22:35
More readed Shortcode WordPress
/*
*
* More readed Shortcode
*
*/
//Define the function to add counter visits (its a metabox)
function setPostViews($postID) {
//This is the key
$count_key = 'tm_views';
@dsebao
dsebao / functions.php
Created June 11, 2020 22:30
More readed Shortcode
/*
*
* More readed Shortcode
*
*/
//Define the function to add counter visits (its a metabox)
function setPostViews($postID) {
//This is the key
$count_key = 'tm_views';