Skip to content

Instantly share code, notes, and snippets.

View larbous's full-sized avatar

Luiz Sobral larbous

View GitHub Profile
@lukecav
lukecav / functions.php
Last active March 13, 2025 12:48 — forked from eteubert/wordpress-passwort-reset-unmultisite.php
WordPress Multisite: Password Reset on a Subsite.
/**
* Password reset on sub site (1 of 4)
* Replace login page "Lost Password?" urls.
*
* @param string $lostpassword_url The URL for retrieving a lost password.
* @param string $redirect The path to redirect to.
*
* @return string
*
* @since 1.0.0
@strangerstudios
strangerstudios / pmpro-customizations.php
Last active December 5, 2023 12:19
A blank plugin file for customizations to your Paid Memberships Pro setup.
<?php
/*
Plugin Name: PMPro Customizations
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Customizations for my Paid Memberships Pro Setup
Version: .1
Author: Paid Memberships Pro
Author URI: https://www.paidmembershipspro.com
*/
@kierzniak
kierzniak / functions.php
Last active March 8, 2024 15:19
Remove accents from url slug before WordPress search for a post
<?php
/**
* Remove accents from url slug before WordPress search for a post
*
* When you access page with accents you will not find any posts because
* WordPress is removing accents from url before saving it to database.
* This function will remove accents from url before WordPress start looking
* for post.
*
#==========================================
# Exemplo de crontab para listas grandes com mais de 5 mil leads
#
# Neste exemplo damos um tempo para que
# cada tarefa tenha tempo de ser executada
# antes da próxima tarefa entrar em execução
#===========================================
# atualiza as listas nos minutos 1 e 30
@mehrshaddarzi
mehrshaddarzi / metabox_order.php
Last active July 18, 2024 02:42
wordpress meta box order
<?php
// meta-box-order_toplevel_page_wps_overview_page
// metaboxhidden_toplevel_page_wps_overview_page
// closedpostboxes_toplevel_page_wps_overview_page
// meta-box-order_toplevel_page_wps_overview_page
// a:2:{s:4:"side";s:127:"wps_summary_postbox,wps_browsers_postbox,wps_referring_postbox,wps_users_online_postbox,wps_countries_postbox,wps_about_postbox";s:6:"normal";s:160:"wps_hits_postbox,wps_top_visitors_postbox,wps_search_postbox,wps_searched_phrases_postbox,wps_words_postbox,wps_recent_postbox,wps_map_postbox,wps_pages_postbox";}
@frontend-coder
frontend-coder / Simple Jquery Accordion
Created August 12, 2019 06:11
Simple Jquery Accordion #accordion
<div>
<div class="acc-btn">Button 1</div>
<div class="acc-content">
Content 1
</div>
</div>
<div>
<div class="acc-btn">Button 2</div>
<div class="acc-content show">
Content 2
@MjHead
MjHead / options-values-in-code.php
Last active December 21, 2024 14:42
Get option values for JetEngine options pages inside the PHP code
<?php
/**
* Method 1
* Can be used for: Any storage type
*
* page-slug - replace this with your Option Page slug
* option-name - replace this with your option Name/ID
*/
$value = jet_engine()->listings->data->get_option( 'page-slug::option-name' );
@Preciousomonze
Preciousomonze / woo-create-product.php
Last active June 27, 2024 09:07
A snippet code for creating Products, use at your discretion
<?php
/**
* Creates a woocommerce product from a loystar product
*
* @param int $product_id(optional
* @param array $product_list(optional) | the loystar product list, this saves resources incase this function is called in the loop, the
* endpoint shouldn't be called everything
* @param bool $link_product(optional) | if set to true, the created woocommerce product will be linked to the loystar product
* @param bool $update(optional) | if set to true, it updates an existing product
* @param bool $only_import(optional) | if set to true, it updates only products that were imported from loystar direct.relevant when $update is true
@stevedrobinson
stevedrobinson / mautic-form-preload.js
Last active June 15, 2023 20:45 — forked from shawncarr/mautic-form-preload.js
Pre-populate Mautic Form Data from Query String Parameters
(function(document){
function populateForms(){
if (document.readyState == 'interactive') {
if (document.forms.length !== 0 && location.search) {
var query = location.search.substr(1);
query.split('&').forEach(function (part) {
if (part.indexOf('=') !== -1) {
var item = part.split('=');
var key = item[0];
var value = decodeURIComponent(item[1]);
@kidino
kidino / toggle-button.css
Last active October 5, 2022 12:22
Creating a Toggle Button with Elementor Pro - The CSS & Javascript Code
/*
This is the CSS code for creating your own Toggle Button Widget using
Elementor Pro.
You still need the Javascript code for this to work.
The Youtube tutorial is here. Make sure you watch this to understand
how this works.
https://youtu.be/ZhBGPIU1bq0