Skip to content

Instantly share code, notes, and snippets.

View wp-entwickler-at's full-sized avatar

wp-entwickler.at wp-entwickler-at

View GitHub Profile
@slushman
slushman / jquery-datepicker-wp-admin
Last active October 19, 2022 14:25
How to Add the jQuery UI Datepicker to the WordPress Admin
/**
* Adds the datepicker settings to the admin footer.
* Only loads on the plugin-name settings page
*/
function admin_footer() {
$screen = get_current_screen();
if ( $screen->id == 'settings_page_plugin-name' ) {
@franz-josef-kaiser
franz-josef-kaiser / disable_metabox_order.php
Last active August 29, 2015 13:56
WordPress plugin that temporarily disables the user defined order (user settings). The plugin is targeted at developers. Often it's annoying when you add a meta box to the admin UI and can't be sure if it's in the right position because you might have already moved it around and added a user setting. The plugin can be reused to temporarily overr…
<?php
namespace WCM;
/**
* Plugin Name: (WCM) Meta Box Order Debug
* Description: Temporarily overrides the MetaBox-order by dismissing the user setting.
* Author: Franz Josef Kaiser
* Author URI: https://unserkaiser.com
* Version: 1.0
@thomasgriffin
thomasgriffin / gist:7944588
Created December 13, 2013 13:56
Here is a surefire way to hook into save_post if you need to save stuff. In my case, it is for custom metaboxes.
<?php
/**
* Callback for saving values from metaboxes.
*
* @since 1.0.0
*
* @param int $post_id The current post ID.
* @param object $post The current post object.
*/
function tgm_save_meta_boxes( $post_id, $post ) {
@bastjan
bastjan / jdheadless.md
Created November 17, 2013 15:05 — forked from thde/jdheadless.md

JDownloader headless Installation

für Ubuntu 10.04

codezero.ch schliesst aus Gründen der Kapazität und der motivation seine Pforten =). Die vielbesuchten Artikel sollen jedoch erhalten bleiben. Darum diese Gists.

Der JDownloader ist ja eigentlich nicht für die Konsole gemacht… Er lässt sich jedoch auch gut in der Konsole betreiben:

Installation des JDownloader

@bigdawggi
bigdawggi / mailtrap-filter.php
Last active June 3, 2019 19:11
Mailtrap filter for WordPress
/**
* Routes all email from WP installation to specific Mailtrap
* account inbox.
*
* All you need to do is change the "Username" and "Password"
* settings to the appropriate box in Mailtrap. Then all
* mail **should** be routed to that box. Exceptions would
* be other functionality that overwrite the wp_mail() functions
* and may not use this filter, or other filters that change
* this behavior after we set it, or millions of other things.
@tommcfarlin
tommcfarlin / meta-data-serialization.php
Last active November 4, 2022 00:28
An example function used to demonstrate how meta data is typically saved in a WordPress theme or plugin. The gist is made public so that developers can contribute to the standard security boilerplate functionality in order to simplify, reduce, and improve our serialization functions.
<?php
/**
* An example function used to demonstrate how to use the `user_can_save` function
* that provides boilerplate security checks when saving custom post meta data.
*
* The ultimate goal is provide a simple helper function to be used in themes and
* plugins without the need to use a set of complex conditionals and constants.
*
* Instead, the aim is to have a simplified function that's easy to read and that uses
* WordPress APIs.
@billerickson
billerickson / gist:1238281
Last active March 28, 2019 19:59
Customize Event Query using Post Meta
<?php
/**
* Customize Event Query using Post Meta
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
*/