This file contains 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: HowTo Plugin | |
Plugin URI: | |
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine | |
Author: Heiko, Frank | |
Author URI: http://bueltge.de | |
Version: 0.1 | |
License: |
This file contains 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 | |
/* | |
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; } |
This file contains 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: Comment meta data test | |
Version: 1.0 | |
Plugin URI: http://wpengineer.com | |
Description: Comment meta data test | |
Author: Latz | |
Author URI: http://wpengineer.com | |
*/ |
This file contains 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: Comment meta data test | |
Version: 1.0 | |
Plugin URI: http://wpengineer.com | |
Description: Comment meta data test | |
Author: Latz | |
Author URI: http://wpengineer.com | |
*/ |
This file contains 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
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/comment.js"></script> | |
<?php if (!empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?> | |
<div class="errorbox"> | |
<?php _e('Enter your password to view comments.', 'inove'); ?> | |
</div> | |
<?php return; endif; ?> | |
<?php | |
$options = get_option('inove_options'); |
This file contains 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
add_action( 'request', array( &$this, 'add_to_feed' ) ); | |
// add to post-feed | |
function add_to_feed($request) { | |
if ( isset($request['feed']) && !isset($request['post_type']) ) { | |
$request['post_type'] = get_post_types( $args = array( | |
'public' => true, | |
'capability_type' => 'post' | |
) ); |
This file contains 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
// add custom post type to wp loop | |
add_action( 'pre_get_posts', 'add_to_query' ); | |
// ads to query | |
function add_to_query( $query ) { | |
if ( is_admin() || is_preview() ) | |
return; | |
// only filter on front page |
This file contains 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: Instrument Hooks for WordPress | |
Plugin URI: http://bueltge.de/ | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>. | |
Version: 0.0.1 | |
Author: Frank Bültge | |
Author URI: http://bueltge.de/ | |
*/ |
This file contains 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
via http://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search/5404#5404 | |
function atom_search_where($where){ | |
global $wpdb; | |
if ( is_search() ) | |
$where .= "OR (t.name LIKE '%".get_search_query() . "%' AND {$wpdb->posts} . post_status = 'publish')"; | |
return $where; | |
} |
This file contains 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
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('99', 'my_login_name', MD5('my_password'), 'My Name', '[email protected]', '', '2011-06-09 00:00:00', '', '0', 'display_name'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_user_level', '10'); |
OlderNewer