Skip to content

Instantly share code, notes, and snippets.

@dieppon
dieppon / sitemap-crawler.php
Last active July 5, 2022 16:13 — forked from iamstoick/sitemap-crawler.php
Sitemap crawler to test 301, 401, 403 and 404.
<?php
/**
* Crawl the sitemap.xml for 301 redirections and 404 errors.
* Source: http://edmondscommerce.github.io/php/crawl-an-xml-sitemap-quality-check-301-and-404.html
*
* To use this script you need to allocate a huge amount of time to maximum_execution_time to
* avoid Fatal error: Maximum execution time...I suggest to run this script on terminal.
* Ex: $ php test-xml.php > ~/Desktop/sitemap-curl-result.txt
*
* For 3000 links the average time the script consumed is around 45 minutes to 1 hour.
diff --git a/assets/css/blocks.css b/assets/css/blocks.css
index 2758e7a..a1cfc91 100644
--- a/assets/css/blocks.css
+++ b/assets/css/blocks.css
@@ -1 +1 @@
-.clearfix:after,.clearfix:before{content:'';display:block;clear:both}#editor .editor-writing-flow{max-width:750px;margin:auto}#editor .editor-writing-flow>div>div>div>.editor-block-list__layout>.wp-block{max-width:unset;width:100%}#editor .components-range-control__number{width:65px}.editor-styles-wrapper .wp-block .wp-block{max-width:100%;width:100%}.slick-arrow:focus{background:transparent}.components-range-control .components-range-control__slider{margin-left:8px}.components-base-control__label .component-color-indicator{vertical-align:text-bottom}#editor .advgb-accordion-block .advgb-accordion-header p.mce-content-body,#editor .advgb-accordion-block .advgb-accordion-body p.mce-content-body{color:inherit}#editor .advgb-accordion-block{padding:15px 0}#editor .advgb-accordion-body{border-top:none !important}.advgb-accordion-header,.advgb-accordion-heade
diff --git a/kint-debugger.php b/kint-debugger.php
index fcb653b..bb3ab5d 100755
--- a/kint-debugger.php
+++ b/kint-debugger.php
@@ -6,7 +6,7 @@
* Version: 1.2
* Author: Brian Fegter, Chris Dillon
* Author URI: https://strongplugins.com
- * Requires: 2.5 or higher
+ * Requires: 5.0
@dieppon
dieppon / kint-debugger-PHP-7-4.patch
Last active February 8, 2022 16:14
Kint Debugger » Please update for PHP 7.4 Please update for PHP 7.4
diff --git a/vendor/kint/inc/kintParser.class.php b/vendor/kint/inc/kintParser.class.php
index 7d57fe9..5b5984b 100644
--- a/vendor/kint/inc/kintParser.class.php
+++ b/vendor/kint/inc/kintParser.class.php
@@ -460,9 +460,9 @@ abstract class kintParser extends kintVariableData
* These prepended values have null bytes on either side.
* http://www.php.net/manual/en/language.types.array.php#language.types.array.casting
*/
- if ( $key{0} === "\x00" ) {
+ if ( $key[0] === "\x00" ) {
@dieppon
dieppon / WPML-via-composer.json
Last active September 16, 2021 09:39
WPML via composer [not working]
WPML_USERID='<your_user_id>'
WPML_SUBSCRIPTION_KEY='<your_subscription_key>'
{
"type": "package",
"package": {
"name": "wpml/wpml-multilingual-cms",
"version": "4.4.12",
"type": "wordpress-plugin",
"dist": {
@dieppon
dieppon / advanced-menu-widget-php-errors.patch
Last active May 18, 2024 12:39
Fixes walker php error on Wordpress Advanced Menu Widget
diff --git a/class-advanced-menu-walker.php b/class-advanced-menu-walker.php
index 324777f..c97c831 100644
--- a/class-advanced-menu-walker.php
+++ b/class-advanced-menu-walker.php
@@ -160,7 +160,7 @@ class AMW_Related_Sub_Items_Walker extends Walker_Nav_Menu {
}
}
- function walk( $elements, $max_depth ) {
+ function walk( $elements, $max_depth, ...$args ) {
@dieppon
dieppon / 0001-Fix-autoptimize-making-new-files-with-600-permission.patch
Last active April 24, 2020 15:27
Fix autoptimize making new files with 600 permissions
From 78f71273f3152048786edac8690ffae22cbd1001 Mon Sep 17 00:00:00 2001
From: Victor Dieppa Garriga <[email protected]>
Date: Fri, 24 Apr 2020 12:46:23 +0100
Subject: [PATCH] Fix autoptimize making new files with 600 permissions
---
.../autoptimize/classes/autoptimizeCache.php | 33 +++++++++++++------
.../plugins/autoptimize/config/default.php | 4 +--
2 files changed, 25 insertions(+), 12 deletions(-)
@dieppon
dieppon / auto-add-terms-to-menu.php
Created January 31, 2020 15:01
Automatically add terms to a menu on Wordpress
<?php
/**
* Display Categories on the Primary menu
*/
add_filter('wp_get_nav_menu_items', function ($items, $menu, $args) {
$primary_menu_id = 47; // the id of the main menu;
$shop_menu_item_id = 1248; // the id of the main item that serves as the parent;
$taxonomy_name = 'product_cat'; // the machine name of the vocavulary you want to use;
@dieppon
dieppon / _only-browser.scss
Created May 21, 2019 10:37
Target browsers with css
@mixin only-browser($browser) {
// Firefox
@if $browser == 'mozilla' or $browser == 'firefox' {
@-moz-document url-prefix() { @content; }
}
// IE
@if $browser == 'ie' {
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { @content; }
@dieppon
dieppon / css-rules.txt
Last active March 25, 2019 12:24
List of css rules grouped with most common rules first
/* Display & Box Model */
-webkit-box-sizing: inherit;
box-sizing: inherit;
content: inherit;
display: inherit;
float: inherit;
clear: inherit;
overflow: inherit;
overflow-wrap: inherit;
overflow-x: inherit;