This Gist has been moved to a repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* TABLE OF CONTENTS | |
| ----------------------------- | |
| - Sizes | |
| - Borders | |
| - Colors | |
| - Typo | |
| - Icons | |
| */ | |
| /* SIZES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Hook Debug Output | |
| * Plugin URI: http://unserkaiser.com | |
| * Description: Debug Hooked filter callback functions with adding <code>?debug=secret&hook=your_hook_name</code> to the URl | |
| * Version: 0.1 | |
| * Author: Stephen Harris, Franz Josef Kaiser | |
| * Author URI: http://unserkaiser.com | |
| */ | |
| // Prevent loading this file directly - Busted! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: "Hide Admin Bar"-Button | |
| * Plugin URI: http://unserkaiser.com | |
| * Description: Easier debugging when the error message is hidden behind the admin bar. | |
| * Version: 0.1 | |
| * Author: Franz Josef Kaiser | |
| * Author URI: http://unserkaiser.com | |
| */ | |
| // Prevent loading this file directly - Busted! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Delay post publishing | |
| * Plugin URI: http://unserkaiser.com | |
| * Description: Only allows publishing a post if the user registered one week ago. | |
| * Version: 0.1 | |
| * Author: Franz Josef Kaiser | |
| * Author URI: http://unserkaiser.com | |
| */ | |
| // Not a WordPress context? Stop. Why? Ask @toscho |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $some_var = 'test'; | |
| // With inline var: | |
| echo "{$some_var}-with_trailing_text.png"; | |
| // With prepended var: | |
| echo $some_var.'-with_trailing_text.png'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // No, Thanks. Direct file access forbidden. | |
| ! defined( 'ABSPATH' ) AND exit; | |
| // INIT | |
| add_action( 'after_setup_theme', array( 'unavailable_post_status', 'init' ) ); | |
| class unavailable_post_status extends wp_custom_post_status | |
| { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Get version number from main remote file plugin header comment | |
| * | |
| * @param string $raw_url The path to the plugin @example http://raw.github.com/franz-josef-kaiser/example | |
| * @param string $main_file The main plugin file containing the plugin header comment | |
| * @return mixed string|bool $all_headers FALSE on failure, ARRAY w plugin header comment data on success | |
| */ | |
| public function get_remote_plugin_data( $raw_url, $main_file ) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MOVED TO A REPO NOW: https://github.com/franz-josef-kaiser/current-admin-info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @link http://core.trac.wordpress.org/ticket/16349 | |
| stdClass::__set_state(array( | |
| 'attachment_id' => 15, | |
| 'rel' => 'internal', | |
| 'in_network' => true, | |
| 'object_types' => | |
| array ( | |
| 'post' => | |
| array ( |