I hereby claim:
- I am bueltge on github.
- I am bueltge (https://keybase.io/bueltge) on keybase.
- I have a public key whose fingerprint is 5EA5 319F D531 1C84 7094 2FE4 1A56 7625 5969 6D2D
To claim this, I am signing this object:
<?php | |
/** | |
* Plugin Name: Deactivate oEmbed | |
* Description: Deactivate oEmbed in WordPress 3.5 and earlier | |
* Version: 0.0.1 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de/ | |
*/ | |
remove_filter( 'the_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 ); |
// path/to/theme/tinymce/en.js | |
// plugin.jsと同じディレクトリに設置 | |
tinyMCE.addI18n("en.test_plugin",{ | |
test_listbox : "Test listbox", | |
test_button : "Test button", | |
}); |
When I want to store some session data with the wrapper class, such as when a customer adds an item to the shopping cart, I simply do this: | |
```php | |
$cart = array( | |
array( | |
'item_id' => 43, | |
'item_name' => 'My Product Name' | |
), | |
array( |
<?php | |
/* Register custom post types on the 'init' hook. */ | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 0.1.0 | |
* @access public |
#! /bin/bash | |
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn | |
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo. | |
# main config | |
PLUGINSLUG="______your-plugin-name______" | |
CURRENTDIR=`pwd` | |
MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin | |
# git config |
// @see http://dnaber.de/blog/2015/wordpress-antipattern-filter-im-constructor-zuweisen/ | |
class MetaBoxRegistrar { | |
private $metaBox; | |
public function __construct( MetaBoxInterface $metaBox ) { | |
$this->metaBox = $metaBox; | |
} | |
//@see http://blog.codeinside.eu/2016/05/12/copy-to-clipboard-with-javascript | |
function detectIE() { | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); | |
if (msie > 0) { | |
// IE 10 or older => return version number | |
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); | |
} |
<?php | |
/* | |
Template Name: Submit Event | |
Author: Frank Bueltge | |
Author URI: http://bueltge.de/ | |
*/ | |
function add_errormessage_style() { ?> | |
<style type="text/css"> | |
.errormessage { border: 3px solid red; padding: 5px; color: #000; } |
I hereby claim:
To claim this, I am signing this object:
# Step 3. | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options |