Skip to content

Instantly share code, notes, and snippets.

View neverything's full-sized avatar
🍀
Good vibes for you

Silvan Hagen neverything

🍀
Good vibes for you
View GitHub Profile
@michael-cannon
michael-cannon / cbqe-learndash-lms.php
Last active February 3, 2021 12:02
LearnDash LMS for Custom Bulk/Quick Edit plugin
<?php
/**
* LearnDash LMS for Custom Bulk/Quick Edit plugin
*
* Download and unpack this Gist into your theme folder. Then include this script itself in your theme's `functions.php` file via…
*
* require_once get_stylesheet_directory() . '/35b676bb68eee50737f3/cbqe-learndash-lms.php';
*
* In WordPress Admin > Settings > Custom Bulk/Quick, configure your fields as needed, per below. If configuration updates are needed, either manually edit them or remove the current field configuration and click Save Changes for automatic updates.
*
@LateButEarly
LateButEarly / dequeue_learndash.php
Last active February 3, 2021 12:09
Dequeue LearnDash scripts on the homepage.
/**
* Remove the LearnDash related scripts / styles from the homepage.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_learndash_styles', 99 );
function child_manage_learndash_styles() {
// Check if LearnDash exists to prevent fatal errors.
if ( class_exists( 'SFWD_LMS' ) ) {
// Make sure we are on the front page.
<?php
/**
* Make an internal REST request
*
* @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server).
* @param $request_or_method WP_REST_Request|string A WP_REST_Request object or a request method
* @param $path (optional) if the path is not specific in the rest request, specify it here
* @param $data (optional) option data for the request.
* @return WP_Error|mixed

I thought it would be pertinent to respond to some points presented by Andrey "Rarst" Savchenko in recent post Progressive Enhancement.

Progressive Enhancement

Unlike Rarst, I don't value progressive enhancement very highly and don't agree it's a fundamental principle of the web that should be universally employed. Quite frankly, I don't care about not supporting JavaScript, and neither does virtually anyone else. It's not that it doesn't have any value, or utility - but in a world where we don't have unlimited resources and time, one has to prioritise what we'll support and not support.

I'm a proponent of putting my ideas and creations into the world for people to make use of; and if I had to cover 100% of use cases for doing that, I wouldn't put much out there. I'm fine with losing the 1.1% of

@mathetos
mathetos / plugin.php
Last active April 13, 2023 16:48
Dependent Plugin Activation/Deactivation and Alert
<?php
/*
* Dependent Plugin Activation/Deactivation
*
* Sources:
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/
*
*/
@weiserr
weiserr / README.md
Last active February 22, 2025 20:37
Postfinance YNAB Export

PostFinance YNAB 4 Export

This scripts allows the export of PostFinance account flow data for YNAB 4 using Tampermonkey. The export is not based on the CSV generated by the Post as it does not adhere to the standard but makes use of the data loaded on the client side for doing said CSV export.

Installation

If Tampermonkey is installed you can click on the RAW view of the postfinance-ynab.user.js file of this Gist. Tampermonkey should ask you whether or not you would like to install this script.

Usage

@bueltge
bueltge / wp-i18n-cheatsheet.md
Last active April 2, 2022 13:57
WordPress i18n Cheatsheet

WordPress i18n CheatSheet

Whenever I write plugins or themes, there is one thing that needs a little extra attention and is quite frankly hard to get right: Translatable text. This list should helps me to find the right way fast.

Props to Alex Kirk, there list it inside a quiz.

You want to output the username in a sentence.

Assume that the $username has been escaped using esc_html().

@swissspidy
swissspidy / language-updates-table.php
Last active April 4, 2020 11:20
Display a table with available translation updates on the WordPress update screen
<?php
/**
* Plugin Name: Translation Updates Table
*
* @author Pascal Birchler <[email protected]>
* @license GPL2+
*/
/**
* Displays a table with available translation updates.
<?php
/*
* Plugin Name: Post Likes
* Description: WP REST API Post Likes
* Author: Joe Hoyle
* Version: 1.0
* Author URI: http://joehoyle.co.uk
*/
@protorob
protorob / artowoo.sh
Last active May 4, 2024 11:52
Bash Sript to Automate the Configuration of the Artomultiplo's Woocommerce Starter Kit
#!/bin/bash -e
# Start allways the same
wpuser='yourusername'
wpuseremail='[email protected]'
wpuserpass=$(date +%s | sha256sum | base64 | head -c 16)
dpprefix=$(date +%s | sha256sum | base64 | head -c 6)
clear