configuration panel for more settings. Visit my Blog Undolog.com or Saidmade.com for others plugin
Version: 1.24
Author: Giovambattista Fazioli
Author URI: http://www.undolog.com/
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
*/
/*
Copyright 2009 Saidmade srl (email : g.fazioli@saidmade.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
define('OPENSEARCH_XML', 'opensearch.xml');
define('WPABS_OPTIONSKEY', 'wp_abs_settings');
define('WPABS_VERSION', '1.24');
add_action("wp_head", 'abs_wp_header', 1);
add_action('parse_query', 'abs_parse_query', 1);
// ________________________________________________________________________________ INIT OPTIONS
// setting start default value
$wb_abs_init_options = array(
'wp_abs_blogname' => get_option( 'blogname' ),
'wp_abs_description' => get_option( 'blogdescription' ),
'wp_abs_contact' => get_option( 'admin_email' ),
'wp_abs_tags' => '',
'wp_abs_favicon' => get_option( 'home' ).'/favicon.ico',
'wp_abs_image' => '',
'wp_abs_searchurl' => get_option( 'home' ).'/?s={searchTerms}',
'wp_abs_searchform' => get_option( 'home' )
);
// add to database
add_option(WPABS_OPTIONSKEY,$wb_abs_init_options,'WP ABS Options');
// retrive: load setting
$wb_abs_options = get_option( WPABS_OPTIONSKEY );
/**
* Add link rel search
*/
function abs_wp_header() {
$o = ''."\n".
''."\n".
''."\n";
echo $o;
}
/**
* Parse the query string
*
* @param Object WP query
*/
function abs_parse_query( $query ) { if( $query->query_vars['pagename'] == OPENSEARCH_XML ) add_action('template_redirect', 'abs_template_redirect', 1); }
/**
* Overwrite standard template and create runtime xml file
*/
function abs_template_redirect() {
global $wb_abs_options;
//
ob_end_clean();
//
header("HTTP/1.0 200 OK");
header("Content-type: text/html; charset=utf-8");
//
$o = ''."\n".
'
' . $any_error . '
Set some info for OpenSearch file | * Required
'. ''; echo $o; ?>Developed by
more Wordpress plugins on labs.saidmade.com and Undolog.com