mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-31 15:59:44 +01:00
Use get_option instead of get_settings. Just 'cause.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c6019230fc
commit
849a0d29d7
@ -335,10 +335,10 @@ function get_default_post_to_edit() {
|
|||||||
$post_excerpt = '';
|
$post_excerpt = '';
|
||||||
|
|
||||||
$post->post_status = 'draft';
|
$post->post_status = 'draft';
|
||||||
$post->comment_status = get_settings('default_comment_status');
|
$post->comment_status = get_option('default_comment_status');
|
||||||
$post->ping_status = get_settings('default_ping_status');
|
$post->ping_status = get_option('default_ping_status');
|
||||||
$post->post_pingback = get_settings('default_pingback_flag');
|
$post->post_pingback = get_option('default_pingback_flag');
|
||||||
$post->post_category = get_settings('default_category');
|
$post->post_category = get_option('default_category');
|
||||||
$post->post_content = apply_filters('default_content', $post_content);
|
$post->post_content = apply_filters('default_content', $post_content);
|
||||||
$post->post_title = apply_filters('default_title', $post_title);
|
$post->post_title = apply_filters('default_title', $post_title);
|
||||||
$post->post_excerpt = apply_filters('default_excerpt', $post_excerpt);
|
$post->post_excerpt = apply_filters('default_excerpt', $post_excerpt);
|
||||||
@ -1106,7 +1106,7 @@ function touch_time($edit = 1, $for_post = 1) {
|
|||||||
|
|
||||||
echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__('Edit timestamp').'</label></legend>';
|
echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__('Edit timestamp').'</label></legend>';
|
||||||
|
|
||||||
$time_adj = time() + (get_settings('gmt_offset') * 3600);
|
$time_adj = time() + (get_option('gmt_offset') * 3600);
|
||||||
$post_date = ($for_post) ? $post->post_date : $comment->comment_date;
|
$post_date = ($for_post) ? $post->post_date : $comment->comment_date;
|
||||||
$jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj);
|
$jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj);
|
||||||
$mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj);
|
$mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj);
|
||||||
@ -1623,8 +1623,8 @@ function validate_file_to_edit($file, $allowed_files = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_home_path() {
|
function get_home_path() {
|
||||||
$home = get_settings('home');
|
$home = get_option('home');
|
||||||
if ($home != '' && $home != get_settings('siteurl')) {
|
if ($home != '' && $home != get_option('siteurl')) {
|
||||||
$home_path = parse_url($home);
|
$home_path = parse_url($home);
|
||||||
$home_path = $home_path['path'];
|
$home_path = $home_path['path'];
|
||||||
$root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"]);
|
$root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"]);
|
||||||
|
@ -15,9 +15,9 @@ get_admin_page_title();
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
||||||
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
||||||
@ -41,9 +41,9 @@ do_action('admin_head');
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="wphead">
|
<div id="wphead">
|
||||||
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>
|
<h1><?php echo wptexturize(get_option(('blogname'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div>
|
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require(ABSPATH . '/wp-admin/menu-header.php');
|
require(ABSPATH . '/wp-admin/menu-header.php');
|
||||||
|
@ -19,10 +19,10 @@ update_category_cache();
|
|||||||
|
|
||||||
wp_get_current_user();
|
wp_get_current_user();
|
||||||
|
|
||||||
$posts_per_page = get_settings('posts_per_page');
|
$posts_per_page = get_option('posts_per_page');
|
||||||
$what_to_show = get_settings('what_to_show');
|
$what_to_show = get_option('what_to_show');
|
||||||
$date_format = get_settings('date_format');
|
$date_format = get_option('date_format');
|
||||||
$time_format = get_settings('time_format');
|
$time_format = get_option('time_format');
|
||||||
|
|
||||||
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));
|
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ $popupurl = wp_specialchars($_REQUEST['popupurl']);
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
|
<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
@ -62,7 +62,7 @@ case 'mailapprovecomment':
|
|||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";
|
echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";
|
||||||
|
|
||||||
echo "<form action='".get_settings('siteurl')."/wp-admin/comment.php' method='get'>\n";
|
echo "<form action='".get_option('siteurl')."/wp-admin/comment.php' method='get'>\n";
|
||||||
wp_nonce_field($nonce_action);
|
wp_nonce_field($nonce_action);
|
||||||
echo "<input type='hidden' name='action' value='$formaction' />\n";
|
echo "<input type='hidden' name='action' value='$formaction' />\n";
|
||||||
if ( 'spam' == $_GET['delete_type'] )
|
if ( 'spam' == $_GET['delete_type'] )
|
||||||
@ -72,7 +72,7 @@ case 'mailapprovecomment':
|
|||||||
echo "<input type='hidden' name='noredir' value='1' />\n";
|
echo "<input type='hidden' name='noredir' value='1' />\n";
|
||||||
echo "<input type='submit' value='" . __('Yes') . "' />";
|
echo "<input type='submit' value='" . __('Yes') . "' />";
|
||||||
echo " ";
|
echo " ";
|
||||||
echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit-comments.php';\" />\n";
|
echo "<input type='button' value='" . __('No') . "' onclick=\"self.location='". get_option('siteurl') ."/wp-admin/edit-comments.php';\" />\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ case 'deletecomment':
|
|||||||
if ((wp_get_referer() != '') && (false == $noredir)) {
|
if ((wp_get_referer() != '') && (false == $noredir)) {
|
||||||
wp_redirect(wp_get_referer());
|
wp_redirect(wp_get_referer());
|
||||||
} else {
|
} else {
|
||||||
wp_redirect(get_settings('siteurl') .'/wp-admin/edit-comments.php');
|
wp_redirect(get_option('siteurl') .'/wp-admin/edit-comments.php');
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
break;
|
break;
|
||||||
@ -133,7 +133,7 @@ case 'unapprovecomment':
|
|||||||
if ((wp_get_referer() != "") && (false == $noredir)) {
|
if ((wp_get_referer() != "") && (false == $noredir)) {
|
||||||
wp_redirect(wp_get_referer());
|
wp_redirect(wp_get_referer());
|
||||||
} else {
|
} else {
|
||||||
wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
wp_redirect(get_option('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
break;
|
break;
|
||||||
@ -156,7 +156,7 @@ case 'approvecomment':
|
|||||||
wp_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
|
wp_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
|
||||||
|
|
||||||
wp_set_comment_status($comment->comment_ID, "approve");
|
wp_set_comment_status($comment->comment_ID, "approve");
|
||||||
if (get_settings("comments_notify") == true) {
|
if (get_option("comments_notify") == true) {
|
||||||
wp_notify_postauthor($comment->comment_ID);
|
wp_notify_postauthor($comment->comment_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ case 'approvecomment':
|
|||||||
if ((wp_get_referer() != "") && (false == $noredir)) {
|
if ((wp_get_referer() != "") && (false == $noredir)) {
|
||||||
wp_redirect(wp_get_referer());
|
wp_redirect(wp_get_referer());
|
||||||
} else {
|
} else {
|
||||||
wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
wp_redirect(get_option('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
break;
|
break;
|
||||||
|
@ -75,7 +75,7 @@ addLoadEvent(focusit);
|
|||||||
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
||||||
<div class="dbx-content">
|
<div class="dbx-content">
|
||||||
<p id="jaxcat"></p>
|
<p id="jaxcat"></p>
|
||||||
<ul id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></ul></div>
|
<ul id="categorychecklist"><?php dropdown_categories(get_option('default_category')); ?></ul></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="commentstatusdiv" class="dbx-box">
|
<fieldset id="commentstatusdiv" class="dbx-box">
|
||||||
|
@ -34,7 +34,7 @@ addLoadEvent(focusit);
|
|||||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
|
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
|
||||||
<?php the_quicktags(); ?>
|
<?php the_quicktags(); ?>
|
||||||
<?php
|
<?php
|
||||||
$rows = get_settings('default_post_edit_rows');
|
$rows = get_option('default_post_edit_rows');
|
||||||
if (($rows < 3) || ($rows > 100)) {
|
if (($rows < 3) || ($rows > 100)) {
|
||||||
$rows = 10;
|
$rows = 10;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ function xfn_check($class, $value = '', $type = 'check') {
|
|||||||
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
||||||
<div class="dbx-content">
|
<div class="dbx-content">
|
||||||
<p id="jaxcat"></p>
|
<p id="jaxcat"></p>
|
||||||
<ul id="categorychecklist"><?php dropdown_link_categories(get_settings('default_link_category')); ?></ul>
|
<ul id="categorychecklist"><?php dropdown_link_categories(get_option('default_link_category')); ?></ul>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ function export_wp() {
|
|||||||
header('Content-Description: File Transfer');
|
header('Content-Description: File Transfer');
|
||||||
header('Content-Type: application/octet-stream');
|
header('Content-Type: application/octet-stream');
|
||||||
header("Content-Disposition: attachment; filename=$filename");
|
header("Content-Disposition: attachment; filename=$filename");
|
||||||
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
//$posts = query_posts('');
|
//$posts = query_posts('');
|
||||||
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC");
|
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC");
|
||||||
?>
|
?>
|
||||||
|
@ -601,7 +601,7 @@ class Blogger_Import {
|
|||||||
if ( isset($_GET['noheader']) ) {
|
if ( isset($_GET['noheader']) ) {
|
||||||
header('Content-Type: text/html; charset=utf-8');
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
|
||||||
$this->import = get_settings('import-blogger');
|
$this->import = get_option('import-blogger');
|
||||||
|
|
||||||
if ( false === $this->import ) {
|
if ( false === $this->import ) {
|
||||||
$step = 0;
|
$step = 0;
|
||||||
|
@ -283,7 +283,7 @@ wp_die(__('This script was not meant to be called directly.'));
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<title></title>
|
<title></title>
|
||||||
<meta http-equiv="imagetoolbar" content="no" />
|
<meta http-equiv="imagetoolbar" content="no" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -27,7 +27,7 @@ require('admin-header.php');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you’re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we’re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
|
<?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you’re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we’re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once('admin.php');
|
require_once('admin.php');
|
||||||
cache_javascript_headers();
|
cache_javascript_headers();
|
||||||
$handler = get_settings( 'siteurl' ) . '/wp-admin/admin-ajax.php';
|
$handler = get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php';
|
||||||
?>
|
?>
|
||||||
addLoadEvent(function(){theList=new listMan();});
|
addLoadEvent(function(){theList=new listMan();});
|
||||||
function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="<?php printf(__('Are you sure you want to delete this %s?'),"'+what+'"); ?>";if(confirm(message))return obj.ajaxDelete(what,id);else return false;}
|
function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="<?php printf(__('Are you sure you want to delete this %s?'),"'+what+'"); ?>";if(confirm(message))return obj.ajaxDelete(what,id);else return false;}
|
||||||
|
@ -13,9 +13,9 @@ foreach ($menu as $item) {
|
|||||||
|
|
||||||
if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
|
if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) {
|
||||||
if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") )
|
if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") )
|
||||||
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
else
|
else
|
||||||
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,11 +42,11 @@ $menu_hook = get_plugin_page_hook($item[2], $parent_file);
|
|||||||
|
|
||||||
if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {
|
if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {
|
||||||
if ( 'admin.php' == $pagenow )
|
if ( 'admin.php' == $pagenow )
|
||||||
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
else
|
else
|
||||||
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
} else {
|
} else {
|
||||||
echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";
|
||||||
}
|
}
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
|
@ -47,7 +47,7 @@ case 'update':
|
|||||||
break;
|
break;
|
||||||
case 'approve':
|
case 'approve':
|
||||||
wp_set_comment_status($key, 'approve');
|
wp_set_comment_status($key, 'approve');
|
||||||
if ( get_settings('comments_notify') == true ) {
|
if ( get_option('comments_notify') == true ) {
|
||||||
wp_notify_postauthor($key);
|
wp_notify_postauthor($key);
|
||||||
}
|
}
|
||||||
++$item_approved;
|
++$item_approved;
|
||||||
@ -125,7 +125,7 @@ if ($comments) {
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($comments as $comment) {
|
foreach($comments as $comment) {
|
||||||
++$i;
|
++$i;
|
||||||
$comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date);
|
$comment_date = mysql2date(get_option("date_format") . " @ " . get_option("time_format"), $comment->comment_date);
|
||||||
$post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'");
|
$post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'");
|
||||||
if ($i % 2) $class = 'js-unapproved alternate';
|
if ($i % 2) $class = 'js-unapproved alternate';
|
||||||
else $class = 'js-unapproved';
|
else $class = 'js-unapproved';
|
||||||
|
@ -27,17 +27,17 @@ if ($action == 'retrospam') {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="default_pingback_flag">
|
<label for="default_pingback_flag">
|
||||||
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_settings('default_pingback_flag')); ?> />
|
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
|
||||||
<?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label>
|
<?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="default_ping_status">
|
<label for="default_ping_status">
|
||||||
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_settings('default_ping_status')); ?> />
|
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
|
||||||
<?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label>
|
<?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="default_comment_status">
|
<label for="default_comment_status">
|
||||||
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_settings('default_comment_status')); ?> />
|
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
|
||||||
<?php _e('Allow people to post comments on the article') ?></label>
|
<?php _e('Allow people to post comments on the article') ?></label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -47,12 +47,12 @@ if ($action == 'retrospam') {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="comments_notify">
|
<label for="comments_notify">
|
||||||
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_settings('comments_notify')); ?> />
|
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
|
||||||
<?php _e('Anyone posts a comment') ?> </label>
|
<?php _e('Anyone posts a comment') ?> </label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="moderation_notify">
|
<label for="moderation_notify">
|
||||||
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_settings('moderation_notify')); ?> />
|
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
|
||||||
<?php _e('A comment is held for moderation') ?> </label>
|
<?php _e('A comment is held for moderation') ?> </label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -62,16 +62,16 @@ if ($action == 'retrospam') {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="comment_moderation">
|
<label for="comment_moderation">
|
||||||
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_settings('comment_moderation')); ?> />
|
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
|
||||||
<?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label>
|
<?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label>
|
||||||
</li>
|
</li>
|
||||||
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_settings('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
|
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
|
||||||
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_settings('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
|
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="options">
|
<fieldset class="options">
|
||||||
<legend><?php _e('Comment Moderation') ?></legend>
|
<legend><?php _e('Comment Moderation') ?></legend>
|
||||||
<p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_settings('comment_max_links'). '" />' ) ?></p>
|
<p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p>
|
||||||
|
|
||||||
<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://codex.wordpress.org/Spam_Words">Common spam words</a>.') ?></p>
|
<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://codex.wordpress.org/Spam_Words">Common spam words</a>.') ?></p>
|
||||||
<p>
|
<p>
|
||||||
@ -88,7 +88,7 @@ if ($action == 'retrospam') {
|
|||||||
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
|
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
|
||||||
</p>
|
</p>
|
||||||
<p><label for="open_proxy_check">
|
<p><label for="open_proxy_check">
|
||||||
<input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_settings('open_proxy_check')); ?> />
|
<input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_option('open_proxy_check')); ?> />
|
||||||
<?php _e('Blacklist comments from open and insecure proxies.') ?></label></p>
|
<?php _e('Blacklist comments from open and insecure proxies.') ?></label></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
|
@ -39,10 +39,10 @@ include('./admin-header.php');
|
|||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><?php _e('Membership:') ?></th>
|
<th scope="row"><?php _e('Membership:') ?></th>
|
||||||
<td> <label for="users_can_register">
|
<td> <label for="users_can_register">
|
||||||
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_settings('users_can_register')); ?> />
|
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
|
||||||
<?php _e('Anyone can register') ?></label><br />
|
<?php _e('Anyone can register') ?></label><br />
|
||||||
<label for="comment_registration">
|
<label for="comment_registration">
|
||||||
<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_settings('comment_registration')); ?> />
|
<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
|
||||||
<?php _e('Users must be registered and logged in to comment') ?>
|
<?php _e('Users must be registered and logged in to comment') ?>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
@ -50,7 +50,7 @@ include('./admin-header.php');
|
|||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><?php _e('New User Default Role:') ?></th>
|
<th scope="row"><?php _e('New User Default Role:') ?></th>
|
||||||
<td><label for="default_role">
|
<td><label for="default_role">
|
||||||
<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_settings('default_role') ); ?></select></label>
|
<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -69,12 +69,12 @@ include('./admin-header.php');
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e('Default date format:') ?></th>
|
<th scope="row"><?php _e('Default date format:') ?></th>
|
||||||
<td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
|
<td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
|
||||||
<?php _e('Output:') ?> <strong><?php echo mysql2date(get_settings('date_format'), current_time('mysql')); ?></strong></td>
|
<?php _e('Output:') ?> <strong><?php echo mysql2date(get_option('date_format'), current_time('mysql')); ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e('Default time format:') ?></th>
|
<th scope="row"><?php _e('Default time format:') ?></th>
|
||||||
<td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
|
<td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
|
||||||
<?php _e('Output:') ?> <strong><?php echo gmdate(get_settings('time_format'), current_time('timestamp')); ?></strong></td>
|
<?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"> </th>
|
<th scope="row"> </th>
|
||||||
@ -85,7 +85,7 @@ include('./admin-header.php');
|
|||||||
<td><select name="start_of_week" id="start_of_week">
|
<td><select name="start_of_week" id="start_of_week">
|
||||||
<?php
|
<?php
|
||||||
for ($day_index = 0; $day_index <= 6; $day_index++) :
|
for ($day_index = 0; $day_index <= 6; $day_index++) :
|
||||||
$selected = (get_settings('start_of_week') == $day_index) ? 'selected="selected"' : '';
|
$selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
|
||||||
echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
|
echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
|
||||||
endfor;
|
endfor;
|
||||||
?>
|
?>
|
||||||
|
@ -17,7 +17,7 @@ include('admin-header.php');
|
|||||||
<table class="editform optiontable">
|
<table class="editform optiontable">
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><?php _e('Store uploads in this folder'); ?>:</th>
|
<th scope="row"><?php _e('Store uploads in this folder'); ?>:</th>
|
||||||
<td><input name="upload_path" type="text" id="upload_path" class="code" value="<?php echo wp_specialchars(str_replace(ABSPATH, '', get_settings('upload_path')), 1); ?>" size="40" />
|
<td><input name="upload_path" type="text" id="upload_path" class="code" value="<?php echo wp_specialchars(str_replace(ABSPATH, '', get_option('upload_path')), 1); ?>" size="40" />
|
||||||
<br />
|
<br />
|
||||||
<?php _e('Default is <code>wp-content/uploads</code>'); ?>
|
<?php _e('Default is <code>wp-content/uploads</code>'); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -26,7 +26,7 @@ include('admin-header.php');
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<label for="uploads_use_yearmonth_folders">
|
<label for="uploads_use_yearmonth_folders">
|
||||||
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1" <?php checked('1', get_settings('uploads_use_yearmonth_folders')); ?> />
|
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1" <?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
|
||||||
<?php _e('Organize my uploads into month- and year-based folders'); ?>
|
<?php _e('Organize my uploads into month- and year-based folders'); ?>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
@ -34,10 +34,10 @@ include('admin-header.php');
|
|||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<p><input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_settings('use_linksupdate')); ?> />
|
<p><input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_option('use_linksupdate')); ?> />
|
||||||
<label for="use_linksupdate"><?php _e('Track Bookmarks’ Update Times') ?></label></p>
|
<label for="use_linksupdate"><?php _e('Track Bookmarks’ Update Times') ?></label></p>
|
||||||
<p>
|
<p>
|
||||||
<label><input type="checkbox" name="hack_file" value="1" <?php checked('1', get_settings('hack_file')); ?> /> <?php _e('Use legacy <code>my-hacks.php</code> file support') ?></label>
|
<label><input type="checkbox" name="hack_file" value="1" <?php checked('1', get_option('hack_file')); ?> /> <?php _e('Use legacy <code>my-hacks.php</code> file support') ?></label>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
|
@ -75,8 +75,8 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_option('permalink_structure');
|
||||||
$category_base = get_settings('category_base');
|
$category_base = get_option('category_base');
|
||||||
|
|
||||||
if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') )
|
if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') )
|
||||||
$writable = true;
|
$writable = true;
|
||||||
@ -122,19 +122,19 @@ $structures = array(
|
|||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> />
|
<input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> />
|
||||||
<?php _e('Default'); ?><br /> <span> » <code><?php echo get_settings('home'); ?>/?p=123</code></span>
|
<?php _e('Default'); ?><br /> <span> » <code><?php echo get_option('home'); ?>/?p=123</code></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> />
|
<input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> />
|
||||||
<?php _e('Date and name based'); ?><br /> <span> » <code><?php echo get_settings('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span>
|
<?php _e('Date and name based'); ?><br /> <span> » <code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> />
|
<input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> />
|
||||||
<?php _e('Numeric'); ?><br /> <span> » <code><?php echo get_settings('home') . $prefix ; ?>/archives/123</code></span>
|
<?php _e('Numeric'); ?><br /> <span> » <code><?php echo get_option('home') . $prefix ; ?>/archives/123</code></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -54,8 +54,8 @@ include('admin-header.php');
|
|||||||
<td>
|
<td>
|
||||||
<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" />
|
<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" />
|
||||||
<select name="what_to_show" id="what_to_show" >
|
<select name="what_to_show" id="what_to_show" >
|
||||||
<option value="days" <?php selected('days', get_settings('what_to_show')); ?>><?php _e('days') ?></option>
|
<option value="days" <?php selected('days', get_option('what_to_show')); ?>><?php _e('days') ?></option>
|
||||||
<option value="posts" <?php selected('posts', get_settings('what_to_show')); ?>><?php _e('posts') ?></option>
|
<option value="posts" <?php selected('posts', get_option('what_to_show')); ?>><?php _e('posts') ?></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -72,8 +72,8 @@ include('admin-header.php');
|
|||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><?php _e('For each article, show:') ?> </th>
|
<th scope="row"><?php _e('For each article, show:') ?> </th>
|
||||||
<td>
|
<td>
|
||||||
<label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_settings('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
|
<label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
|
||||||
<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_settings('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label>
|
<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -86,7 +86,7 @@ include('admin-header.php');
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> />
|
<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_option('gzipcompression')); ?> />
|
||||||
<?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label>
|
<?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label>
|
||||||
</p>
|
</p>
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
|
@ -21,12 +21,12 @@ include('admin-header.php');
|
|||||||
<th scope="row"><?php _e('Formatting:') ?></th>
|
<th scope="row"><?php _e('Formatting:') ?></th>
|
||||||
<td>
|
<td>
|
||||||
<label for="rich_editing">
|
<label for="rich_editing">
|
||||||
<input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_settings('rich_editing')); ?> />
|
<input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_option('rich_editing')); ?> />
|
||||||
<?php _e('Users should use the visual rich editor by default') ?></label><br />
|
<?php _e('Users should use the visual rich editor by default') ?></label><br />
|
||||||
<label for="use_smilies">
|
<label for="use_smilies">
|
||||||
<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
|
<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> />
|
||||||
<?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
|
<?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
|
||||||
<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
|
<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_option('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
@ -35,7 +35,7 @@ include('admin-header.php');
|
|||||||
<?php
|
<?php
|
||||||
$categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
|
$categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
|
||||||
foreach ($categories as $category) :
|
foreach ($categories as $category) :
|
||||||
if ($category->cat_ID == get_settings('default_category')) $selected = " selected='selected'";
|
if ($category->cat_ID == get_option('default_category')) $selected = " selected='selected'";
|
||||||
else $selected = '';
|
else $selected = '';
|
||||||
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
||||||
endforeach;
|
endforeach;
|
||||||
@ -47,7 +47,7 @@ endforeach;
|
|||||||
<td><select name="default_link_category" id="default_link_category">
|
<td><select name="default_link_category" id="default_link_category">
|
||||||
<?php
|
<?php
|
||||||
foreach ($categories as $category) :
|
foreach ($categories as $category) :
|
||||||
if ($category->cat_ID == get_settings('default_link_category')) $selected = " selected='selected'";
|
if ($category->cat_ID == get_option('default_link_category')) $selected = " selected='selected'";
|
||||||
else $selected = '';
|
else $selected = '';
|
||||||
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
||||||
endforeach;
|
endforeach;
|
||||||
@ -84,7 +84,7 @@ endforeach;
|
|||||||
<?php
|
<?php
|
||||||
//Alreay have $categories from default_category
|
//Alreay have $categories from default_category
|
||||||
foreach ($categories as $category) :
|
foreach ($categories as $category) :
|
||||||
if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
|
if ($category->cat_ID == get_option('default_email_category')) $selected = " selected='selected'";
|
||||||
else $selected = '';
|
else $selected = '';
|
||||||
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
|
||||||
endforeach;
|
endforeach;
|
||||||
|
@ -87,8 +87,8 @@ case 'update':
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save for later.
|
// Save for later.
|
||||||
$old_siteurl = get_settings('siteurl');
|
$old_siteurl = get_option('siteurl');
|
||||||
$old_home = get_settings('home');
|
$old_home = get_option('home');
|
||||||
|
|
||||||
if ($options) {
|
if ($options) {
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
@ -104,13 +104,13 @@ case 'update':
|
|||||||
|
|
||||||
if ($any_changed) {
|
if ($any_changed) {
|
||||||
// If siteurl or home changed, reset cookies.
|
// If siteurl or home changed, reset cookies.
|
||||||
if ( get_settings('siteurl') != $old_siteurl || get_settings('home') != $old_home ) {
|
if ( get_option('siteurl') != $old_siteurl || get_option('home') != $old_home ) {
|
||||||
// If home changed, write rewrite rules to new location.
|
// If home changed, write rewrite rules to new location.
|
||||||
$wp_rewrite->flush_rules();
|
$wp_rewrite->flush_rules();
|
||||||
// Clear cookies for old paths.
|
// Clear cookies for old paths.
|
||||||
wp_clearcookie();
|
wp_clearcookie();
|
||||||
// Set cookies for new paths.
|
// Set cookies for new paths.
|
||||||
wp_setcookie($user_login, $user_pass_md5, true, get_settings('home'), get_settings('siteurl'));
|
wp_setcookie($user_login, $user_pass_md5, true, get_option('home'), get_option('siteurl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//$message = sprintf(__('%d setting(s) saved... '), $any_changed);
|
//$message = sprintf(__('%d setting(s) saved... '), $any_changed);
|
||||||
|
@ -144,8 +144,8 @@ case 'delete':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sendback = wp_get_referer();
|
$sendback = wp_get_referer();
|
||||||
if (strstr($sendback, 'page.php')) $sendback = get_settings('siteurl') .'/wp-admin/page.php';
|
if (strstr($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php';
|
||||||
elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php';
|
elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
|
||||||
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
||||||
wp_redirect($sendback);
|
wp_redirect($sendback);
|
||||||
exit();
|
exit();
|
||||||
|
@ -4,7 +4,7 @@ require_once('admin.php');
|
|||||||
if ( isset($_GET['action']) ) {
|
if ( isset($_GET['action']) ) {
|
||||||
if ('activate' == $_GET['action']) {
|
if ('activate' == $_GET['action']) {
|
||||||
check_admin_referer('activate-plugin_' . $_GET['plugin']);
|
check_admin_referer('activate-plugin_' . $_GET['plugin']);
|
||||||
$current = get_settings('active_plugins');
|
$current = get_option('active_plugins');
|
||||||
if (!in_array($_GET['plugin'], $current)) {
|
if (!in_array($_GET['plugin'], $current)) {
|
||||||
$current[] = trim( $_GET['plugin'] );
|
$current[] = trim( $_GET['plugin'] );
|
||||||
sort($current);
|
sort($current);
|
||||||
@ -15,7 +15,7 @@ if ( isset($_GET['action']) ) {
|
|||||||
wp_redirect('plugins.php?activate=true');
|
wp_redirect('plugins.php?activate=true');
|
||||||
} else if ('deactivate' == $_GET['action']) {
|
} else if ('deactivate' == $_GET['action']) {
|
||||||
check_admin_referer('deactivate-plugin_' . $_GET['plugin']);
|
check_admin_referer('deactivate-plugin_' . $_GET['plugin']);
|
||||||
$current = get_settings('active_plugins');
|
$current = get_option('active_plugins');
|
||||||
array_splice($current, array_search( $_GET['plugin'], $current), 1 ); // Array-fu!
|
array_splice($current, array_search( $_GET['plugin'], $current), 1 ); // Array-fu!
|
||||||
update_option('active_plugins', $current);
|
update_option('active_plugins', $current);
|
||||||
do_action('deactivate_' . trim( $_GET['plugin'] ));
|
do_action('deactivate_' . trim( $_GET['plugin'] ));
|
||||||
@ -30,7 +30,7 @@ require_once('admin-header.php');
|
|||||||
// Clean up options
|
// Clean up options
|
||||||
// If any plugins don't exist, axe 'em
|
// If any plugins don't exist, axe 'em
|
||||||
|
|
||||||
$check_plugins = get_settings('active_plugins');
|
$check_plugins = get_option('active_plugins');
|
||||||
|
|
||||||
// Sanity check. If the active plugin list is not an array, make it an
|
// Sanity check. If the active plugin list is not an array, make it an
|
||||||
// empty array.
|
// empty array.
|
||||||
@ -43,7 +43,7 @@ if ( !is_array($check_plugins) ) {
|
|||||||
// plugins.
|
// plugins.
|
||||||
foreach ($check_plugins as $check_plugin) {
|
foreach ($check_plugins as $check_plugin) {
|
||||||
if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {
|
if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {
|
||||||
$current = get_settings('active_plugins');
|
$current = get_option('active_plugins');
|
||||||
$key = array_search($check_plugin, $current);
|
$key = array_search($check_plugin, $current);
|
||||||
if ( false !== $key && NULL !== $key ) {
|
if ( false !== $key && NULL !== $key ) {
|
||||||
unset($current[$key]);
|
unset($current[$key]);
|
||||||
@ -67,8 +67,8 @@ foreach ($check_plugins as $check_plugin) {
|
|||||||
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
|
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( get_settings('active_plugins') )
|
if ( get_option('active_plugins') )
|
||||||
$current_plugins = get_settings('active_plugins');
|
$current_plugins = get_option('active_plugins');
|
||||||
|
|
||||||
$plugins = get_plugins();
|
$plugins = get_plugins();
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ if ( ! current_user_can('edit_posts') ) { ?>
|
|||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />
|
<p><?php printf(__('Since you’re a newcomer, you’ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />
|
||||||
You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
|
You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
|
||||||
When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?>
|
When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_option('admin_email')); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@ -62,11 +62,11 @@ include('edit-form-advanced.php');
|
|||||||
<?php
|
<?php
|
||||||
if ($is_NS4 || $is_gecko) {
|
if ($is_NS4 || $is_gecko) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>
|
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_option('blogname'))); ?></a>
|
||||||
<?php
|
<?php
|
||||||
} else if ($is_winIE) {
|
} else if ($is_winIE) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
|
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
function oneclickbookmarklet(blah) {
|
function oneclickbookmarklet(blah) {
|
||||||
@ -81,11 +81,11 @@ window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=50
|
|||||||
<?php
|
<?php
|
||||||
} else if ($is_opera) {
|
} else if ($is_opera) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
|
<a href="javascript:location.href='<?php echo get_option('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||||
<?php
|
<?php
|
||||||
} else if ($is_macIE) {
|
} else if ($is_macIE) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
|
<a href="javascript:Q='';location.href='<?php echo get_option('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -157,8 +157,8 @@ case 'delete':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sendback = wp_get_referer();
|
$sendback = wp_get_referer();
|
||||||
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post-new.php';
|
if (strstr($sendback, 'post.php')) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';
|
||||||
elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php';
|
elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
|
||||||
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
||||||
wp_redirect($sendback);
|
wp_redirect($sendback);
|
||||||
exit();
|
exit();
|
||||||
|
@ -16,7 +16,7 @@ $query_string = "uris=$link_uris";
|
|||||||
|
|
||||||
$http_request = "POST /updated-batch/ HTTP/1.0\r\n";
|
$http_request = "POST /updated-batch/ HTTP/1.0\r\n";
|
||||||
$http_request .= "Host: api.pingomatic.com\r\n";
|
$http_request .= "Host: api.pingomatic.com\r\n";
|
||||||
$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_settings('blog_charset')."\r\n";
|
$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_option('blog_charset')."\r\n";
|
||||||
$http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
|
$http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
|
||||||
$http_request .= 'User-Agent: WordPress/' . $wp_version . "\r\n";
|
$http_request .= 'User-Agent: WordPress/' . $wp_version . "\r\n";
|
||||||
$http_request .= "\r\n";
|
$http_request .= "\r\n";
|
||||||
|
@ -436,7 +436,7 @@ foreach ( (array) $roleclass as $user_object ) {
|
|||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2 id="add-new-user"><?php _e('Add New User') ?></h2>
|
<h2 id="add-new-user"><?php _e('Add New User') ?></h2>
|
||||||
<?php echo '<p>'.sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_settings('siteurl').'/wp-register.php').'</p>'; ?>
|
<?php echo '<p>'.sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php').'</p>'; ?>
|
||||||
<form action="#add-new-user" method="post" name="adduser" id="adduser">
|
<form action="#add-new-user" method="post" name="adduser" id="adduser">
|
||||||
<?php wp_nonce_field('add-user') ?>
|
<?php wp_nonce_field('add-user') ?>
|
||||||
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
||||||
@ -475,7 +475,7 @@ foreach ( (array) $roleclass as $user_object ) {
|
|||||||
<td><select name="role" id="role">
|
<td><select name="role" id="role">
|
||||||
<?php
|
<?php
|
||||||
if ( !$new_user_role )
|
if ( !$new_user_role )
|
||||||
$new_user_role = get_settings('default_role');
|
$new_user_role = get_option('default_role');
|
||||||
wp_dropdown_roles($new_user_role);
|
wp_dropdown_roles($new_user_role);
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
@ -5,11 +5,11 @@ if (empty($wp)) {
|
|||||||
wp('feed=atom');
|
wp('feed=atom');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: application/atom+xml; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
<feed version="0.3"
|
<feed version="0.3"
|
||||||
xmlns="http://purl.org/atom/ns#"
|
xmlns="http://purl.org/atom/ns#"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
@ -35,11 +35,11 @@ $more = 1;
|
|||||||
<issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued>
|
<issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued>
|
||||||
<?php the_category_rss('rdf') ?>
|
<?php the_category_rss('rdf') ?>
|
||||||
<summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
|
<summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
|
||||||
<?php if ( !get_settings('rss_use_excerpt') ) : ?>
|
<?php if ( !get_option('rss_use_excerpt') ) : ?>
|
||||||
<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
|
<content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php rss_enclosure(); ?>
|
<?php rss_enclosure(); ?>
|
||||||
<?php do_action('atom_entry'); ?>
|
<?php do_action('atom_entry'); ?>
|
||||||
</entry>
|
</entry>
|
||||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
<?php $items_count++; if (($items_count == get_option('posts_per_rss')) && empty($m)) { break; } } } ?>
|
||||||
</feed>
|
</feed>
|
||||||
|
@ -36,7 +36,7 @@ endif;
|
|||||||
|
|
||||||
$comment_type = '';
|
$comment_type = '';
|
||||||
|
|
||||||
if ( get_settings('require_name_email') && !$user->ID ) {
|
if ( get_option('require_name_email') && !$user->ID ) {
|
||||||
if ( 6 > strlen($comment_author_email) || '' == $comment_author )
|
if ( 6 > strlen($comment_author_email) || '' == $comment_author )
|
||||||
wp_die( __('Error: please fill the required fields (name, email).') );
|
wp_die( __('Error: please fill the required fields (name, email).') );
|
||||||
elseif ( !is_email($comment_author_email))
|
elseif ( !is_email($comment_author_email))
|
||||||
|
@ -5,9 +5,9 @@ if (empty($wp)) {
|
|||||||
wp('feed=rss2&withcomments=1');
|
wp('feed=rss2&withcomments=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: text/xml;charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml;charset=' . get_option('blog_charset'), true);
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>';
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
?>
|
?>
|
||||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
@ -34,14 +34,14 @@ if (have_posts()) :
|
|||||||
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
|
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
|
||||||
AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
|
AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
|
||||||
AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
|
AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
|
||||||
ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
|
ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss') );
|
||||||
} else { // if no post id passed in, we'll just ue the last 10 comments.
|
} else { // if no post id passed in, we'll just ue the last 10 comments.
|
||||||
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
|
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
|
||||||
comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
|
comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
|
||||||
$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
|
$wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
|
||||||
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
|
LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
|
||||||
AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'
|
AND $wpdb->comments.comment_approved = '1' AND post_date_gmt < '" . gmdate("Y-m-d H:i:s") . "'
|
||||||
ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss') );
|
ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss') );
|
||||||
}
|
}
|
||||||
// this line is WordPress' motor, do not delete it.
|
// this line is WordPress' motor, do not delete it.
|
||||||
if ($comments) {
|
if ($comments) {
|
||||||
|
@ -163,7 +163,7 @@ class wpdbBackup {
|
|||||||
';
|
';
|
||||||
|
|
||||||
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
||||||
$download_uri = get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$backup_filename}";
|
$download_uri = get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$backup_filename}";
|
||||||
switch($_POST['deliver']) {
|
switch($_POST['deliver']) {
|
||||||
case 'http':
|
case 'http':
|
||||||
echo '
|
echo '
|
||||||
@ -315,7 +315,7 @@ class wpdbBackup {
|
|||||||
$this->deliver_backup ($this->backup_file, $_POST['deliver'], $_POST['backup_recipient']);
|
$this->deliver_backup ($this->backup_file, $_POST['deliver'], $_POST['backup_recipient']);
|
||||||
} elseif ('http' == $_POST['deliver']) {
|
} elseif ('http' == $_POST['deliver']) {
|
||||||
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
||||||
header('Refresh: 3; ' . get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$this->backup_file}");
|
header('Refresh: 3; ' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}&backup={$this->backup_file}");
|
||||||
}
|
}
|
||||||
// we do this to say we're done.
|
// we do this to say we're done.
|
||||||
$this->backup_complete = true;
|
$this->backup_complete = true;
|
||||||
@ -619,7 +619,7 @@ class wpdbBackup {
|
|||||||
if (! file_exists($diskfile)) {
|
if (! file_exists($diskfile)) {
|
||||||
$msg = sprintf(__('File not found:%s'), "<br /><strong>$filename</strong><br />");
|
$msg = sprintf(__('File not found:%s'), "<br /><strong>$filename</strong><br />");
|
||||||
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
$this_basename = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', __FILE__);
|
||||||
$msg .= '<br /><a href="' . get_settings('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup');
|
$msg .= '<br /><a href="' . get_option('siteurl') . "/wp-admin/edit.php?page={$this_basename}" . '">' . __('Return to Backup');
|
||||||
die($msg);
|
die($msg);
|
||||||
}
|
}
|
||||||
header('Content-Description: File Transfer');
|
header('Content-Description: File Transfer');
|
||||||
@ -632,7 +632,7 @@ class wpdbBackup {
|
|||||||
if (! file_exists($diskfile)) return false;
|
if (! file_exists($diskfile)) return false;
|
||||||
|
|
||||||
if (! is_email ($recipient)) {
|
if (! is_email ($recipient)) {
|
||||||
$recipient = get_settings('admin_email');
|
$recipient = get_option('admin_email');
|
||||||
}
|
}
|
||||||
$randomish = md5(time());
|
$randomish = md5(time());
|
||||||
$boundary = "==WPBACKUP-BY-SKIPPY-$randomish";
|
$boundary = "==WPBACKUP-BY-SKIPPY-$randomish";
|
||||||
@ -642,7 +642,7 @@ class wpdbBackup {
|
|||||||
$data = chunk_split(base64_encode($file));
|
$data = chunk_split(base64_encode($file));
|
||||||
$headers = "MIME-Version: 1.0\n";
|
$headers = "MIME-Version: 1.0\n";
|
||||||
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
|
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
|
||||||
$headers .= 'From: ' . get_settings('admin_email') . "\n";
|
$headers .= 'From: ' . get_option('admin_email') . "\n";
|
||||||
|
|
||||||
$message = sprintf(__("Attached to this email is\n %1s\n Size:%2s kilobytes\n"), $filename, round(filesize($diskfile)/1024));
|
$message = sprintf(__("Attached to this email is\n %1s\n Size:%2s kilobytes\n"), $filename, round(filesize($diskfile)/1024));
|
||||||
// Add a multipart boundary above the plain message
|
// Add a multipart boundary above the plain message
|
||||||
@ -685,11 +685,11 @@ class wpdbBackup {
|
|||||||
$file = $this->backup_file;
|
$file = $this->backup_file;
|
||||||
switch($_POST['deliver']) {
|
switch($_POST['deliver']) {
|
||||||
case 'http':
|
case 'http':
|
||||||
$feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.'), get_settings('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
|
$feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.'), get_option('siteurl') . "/{$this->backup_dir}{$this->backup_file}", $this->backup_file);
|
||||||
break;
|
break;
|
||||||
case 'smtp':
|
case 'smtp':
|
||||||
if (! is_email($_POST['backup_recipient'])) {
|
if (! is_email($_POST['backup_recipient'])) {
|
||||||
$feedback .= get_settings('admin_email');
|
$feedback .= get_option('admin_email');
|
||||||
} else {
|
} else {
|
||||||
$feedback .= $_POST['backup_recipient'];
|
$feedback .= $_POST['backup_recipient'];
|
||||||
}
|
}
|
||||||
@ -697,7 +697,7 @@ class wpdbBackup {
|
|||||||
break;
|
break;
|
||||||
case 'none':
|
case 'none':
|
||||||
$feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"');
|
$feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"');
|
||||||
$feedback .= ':<br /> <a href="' . get_settings('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes'), filesize(ABSPATH . $this->backup_dir . $file));
|
$feedback .= ':<br /> <a href="' . get_option('siteurl') . "/{$this->backup_dir}$file\">$file</a> : " . sprintf(__('%s bytes'), filesize(ABSPATH . $this->backup_dir . $file));
|
||||||
}
|
}
|
||||||
$feedback .= '</p></div>';
|
$feedback .= '</p></div>';
|
||||||
}
|
}
|
||||||
@ -781,7 +781,7 @@ class wpdbBackup {
|
|||||||
echo '<label style="display:block;"><input type="radio" name="deliver" value="none" /> ' . __('Save to server') . " ({$this->backup_dir})</label>";
|
echo '<label style="display:block;"><input type="radio" name="deliver" value="none" /> ' . __('Save to server') . " ({$this->backup_dir})</label>";
|
||||||
echo '<label style="display:block;"><input type="radio" checked="checked" name="deliver" value="http" /> ' . __('Download to your computer') . '</label>';
|
echo '<label style="display:block;"><input type="radio" checked="checked" name="deliver" value="http" /> ' . __('Download to your computer') . '</label>';
|
||||||
echo '<div><input type="radio" name="deliver" id="do_email" value="smtp" /> ';
|
echo '<div><input type="radio" name="deliver" id="do_email" value="smtp" /> ';
|
||||||
echo '<label for="do_email">'.__('Email backup to:').'</label><input type="text" name="backup_recipient" size="20" value="' . get_settings('admin_email') . '" />';
|
echo '<label for="do_email">'.__('Email backup to:').'</label><input type="text" name="backup_recipient" size="20" value="' . get_option('admin_email') . '" />';
|
||||||
|
|
||||||
// Check DB dize.
|
// Check DB dize.
|
||||||
$table_status = $wpdb->get_results("SHOW TABLE STATUS FROM " . $this->backquote(DB_NAME));
|
$table_status = $wpdb->get_results("SHOW TABLE STATUS FROM " . $this->backquote(DB_NAME));
|
||||||
@ -809,7 +809,7 @@ class wpdbBackup {
|
|||||||
// this stuff only displays if wp_cron is installed
|
// this stuff only displays if wp_cron is installed
|
||||||
if (function_exists('wp_cron_init')) {
|
if (function_exists('wp_cron_init')) {
|
||||||
echo '<fieldset class="options"><legend>' . __('Scheduled Backup') . '</legend>';
|
echo '<fieldset class="options"><legend>' . __('Scheduled Backup') . '</legend>';
|
||||||
$datetime = get_settings('date_format') . ' @ ' . get_settings('time_format');
|
$datetime = get_option('date_format') . ' @ ' . get_option('time_format');
|
||||||
echo '<p>' . __('Last WP-Cron Daily Execution') . ': ' . date($datetime, get_option('wp_cron_daily_lastrun')) . '<br />';
|
echo '<p>' . __('Last WP-Cron Daily Execution') . ': ' . date($datetime, get_option('wp_cron_daily_lastrun')) . '<br />';
|
||||||
echo __('Next WP-Cron Daily Execution') . ': ' . date($datetime, (get_option('wp_cron_daily_lastrun') + 86400)) . '</p>';
|
echo __('Next WP-Cron Daily Execution') . ': ' . date($datetime, (get_option('wp_cron_daily_lastrun') + 86400)) . '</p>';
|
||||||
echo '<form method="post">';
|
echo '<form method="post">';
|
||||||
@ -828,7 +828,7 @@ class wpdbBackup {
|
|||||||
echo '</td><td align="center">';
|
echo '</td><td align="center">';
|
||||||
$cron_recipient = get_option('wp_cron_backup_recipient');
|
$cron_recipient = get_option('wp_cron_backup_recipient');
|
||||||
if (! is_email($cron_recipient)) {
|
if (! is_email($cron_recipient)) {
|
||||||
$cron_recipient = get_settings('admin_email');
|
$cron_recipient = get_option('admin_email');
|
||||||
}
|
}
|
||||||
echo __('Email backup to:') . ' <input type="text" name="cron_backup_recipient" size="20" value="' . $cron_recipient . '" />';
|
echo __('Email backup to:') . ' <input type="text" name="cron_backup_recipient" size="20" value="' . $cron_recipient . '" />';
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
@ -6,9 +6,9 @@ foreach ($posts as $post) { start_wp();
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>
|
<title><?php echo get_option('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import url( <?php bloginfo('stylesheet_url'); ?> );
|
@import url( <?php bloginfo('stylesheet_url'); ?> );
|
||||||
body { margin: 3px; }
|
body { margin: 3px; }
|
||||||
@ -17,11 +17,11 @@ foreach ($posts as $post) { start_wp();
|
|||||||
</head>
|
</head>
|
||||||
<body id="commentspopup">
|
<body id="commentspopup">
|
||||||
|
|
||||||
<h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1>
|
<h1 id="header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
|
||||||
|
|
||||||
<h2 id="comments"><?php _e("Comments"); ?></h2>
|
<h2 id="comments"><?php _e("Comments"); ?></h2>
|
||||||
|
|
||||||
<p><a href="<?php echo get_settings('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><?php _e("<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."); ?></a></p>
|
<p><a href="<?php echo get_option('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><?php _e("<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on this post."); ?></a></p>
|
||||||
|
|
||||||
<?php if ('open' == $post->ping_status) { ?>
|
<?php if ('open' == $post->ping_status) { ?>
|
||||||
<p><?php _e("The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is:"); ?> <em><?php trackback_url() ?></em></p>
|
<p><?php _e("The <abbr title=\"Universal Resource Locator\">URL</abbr> to TrackBack this entry is:"); ?> <em><?php trackback_url() ?></em></p>
|
||||||
@ -55,7 +55,7 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
|
|||||||
<h2><?php _e("Leave a comment"); ?></h2>
|
<h2><?php _e("Leave a comment"); ?></h2>
|
||||||
<p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
|
<p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author"><?php _e("Name"); ?></label>
|
<label for="author"><?php _e("Name"); ?></label>
|
||||||
|
@ -6,9 +6,9 @@ foreach ($posts as $post) { start_wp();
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo get_settings('blogname'); ?> - Comments on <?php the_title(); ?></title>
|
<title><?php echo get_option('blogname'); ?> - Comments on <?php the_title(); ?></title>
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import url( <?php bloginfo('stylesheet_url'); ?> );
|
@import url( <?php bloginfo('stylesheet_url'); ?> );
|
||||||
body { margin: 3px; }
|
body { margin: 3px; }
|
||||||
@ -17,11 +17,11 @@ foreach ($posts as $post) { start_wp();
|
|||||||
</head>
|
</head>
|
||||||
<body id="commentspopup">
|
<body id="commentspopup">
|
||||||
|
|
||||||
<h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1>
|
<h1 id="header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
|
||||||
|
|
||||||
<h2 id="comments">Comments</h2>
|
<h2 id="comments">Comments</h2>
|
||||||
|
|
||||||
<p><a href="<?php echo get_settings('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
|
<p><a href="<?php echo get_option('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
|
||||||
|
|
||||||
<?php if ('open' == $post->ping_status) { ?>
|
<?php if ('open' == $post->ping_status) { ?>
|
||||||
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
<p>The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
||||||
@ -55,7 +55,7 @@ if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $pos
|
|||||||
<h2>Leave a comment</h2>
|
<h2>Leave a comment</h2>
|
||||||
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author">Name</label>
|
<label for="author">Name</label>
|
||||||
|
@ -21,7 +21,7 @@ function kubrick_head() {
|
|||||||
add_action('wp_head', 'kubrick_head');
|
add_action('wp_head', 'kubrick_head');
|
||||||
|
|
||||||
function kubrick_header_image() {
|
function kubrick_header_image() {
|
||||||
return apply_filters('kubrick_header_image', get_settings('kubrick_header_image'));
|
return apply_filters('kubrick_header_image', get_option('kubrick_header_image'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function kubrick_upper_color() {
|
function kubrick_upper_color() {
|
||||||
@ -50,7 +50,7 @@ function kubrick_header_image_url() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function kubrick_header_color() {
|
function kubrick_header_color() {
|
||||||
return apply_filters('kubrick_header_color', get_settings('kubrick_header_color'));
|
return apply_filters('kubrick_header_color', get_option('kubrick_header_color'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function kubrick_header_color_string() {
|
function kubrick_header_color_string() {
|
||||||
@ -62,7 +62,7 @@ function kubrick_header_color_string() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function kubrick_header_display() {
|
function kubrick_header_display() {
|
||||||
return apply_filters('kubrick_header_display', get_settings('kubrick_header_display'));
|
return apply_filters('kubrick_header_display', get_option('kubrick_header_display'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function kubrick_header_display_string() {
|
function kubrick_header_display_string() {
|
||||||
@ -93,7 +93,7 @@ function kubrick_add_theme_page() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( isset($_REQUEST['toggledisplay']) ) {
|
if ( isset($_REQUEST['toggledisplay']) ) {
|
||||||
if ( false === get_settings('kubrick_header_display') )
|
if ( false === get_option('kubrick_header_display') )
|
||||||
update_option('kubrick_header_display', 'none');
|
update_option('kubrick_header_display', 'none');
|
||||||
else
|
else
|
||||||
delete_option('kubrick_header_display');
|
delete_option('kubrick_header_display');
|
||||||
|
@ -33,7 +33,7 @@ if ( !$withcomments && !is_single() ) {
|
|||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="headerimg">
|
<div id="headerimg">
|
||||||
<h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
|
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
|
||||||
<div class="description"><?php bloginfo('description'); ?></div>
|
<div class="description"><?php bloginfo('description'); ?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -174,7 +174,7 @@ function get_author_posts_url($author_id, $author_nicename = '') {
|
|||||||
$link = $wp_rewrite->get_author_permastruct();
|
$link = $wp_rewrite->get_author_permastruct();
|
||||||
|
|
||||||
if ( empty($link) ) {
|
if ( empty($link) ) {
|
||||||
$file = get_settings('home') . '/';
|
$file = get_option('home') . '/';
|
||||||
$link = $file . '?author=' . $auth_ID;
|
$link = $file . '?author=' . $auth_ID;
|
||||||
} else {
|
} else {
|
||||||
if ( '' == $author_nicename ) {
|
if ( '' == $author_nicename ) {
|
||||||
@ -183,7 +183,7 @@ function get_author_posts_url($author_id, $author_nicename = '') {
|
|||||||
$author_nicename = $user->user_nicename;
|
$author_nicename = $user->user_nicename;
|
||||||
}
|
}
|
||||||
$link = str_replace('%author%', $author_nicename, $link);
|
$link = str_replace('%author%', $author_nicename, $link);
|
||||||
$link = get_settings('home') . trailingslashit($link);
|
$link = get_option('home') . trailingslashit($link);
|
||||||
}
|
}
|
||||||
|
|
||||||
$link = apply_filters('author_link', $link, $author_id, $author_nicename);
|
$link = apply_filters('author_link', $link, $author_id, $author_nicename);
|
||||||
|
@ -93,7 +93,7 @@ function get_links($category = -1,
|
|||||||
$row->recently_updated = false;
|
$row->recently_updated = false;
|
||||||
$output .= $before;
|
$output .= $before;
|
||||||
if ( $show_updated && $row->recently_updated )
|
if ( $show_updated && $row->recently_updated )
|
||||||
$output .= get_settings('links_recently_updated_prepend');
|
$output .= get_option('links_recently_updated_prepend');
|
||||||
$the_link = '#';
|
$the_link = '#';
|
||||||
if ( !empty($row->link_url) )
|
if ( !empty($row->link_url) )
|
||||||
$the_link = wp_specialchars($row->link_url);
|
$the_link = wp_specialchars($row->link_url);
|
||||||
@ -107,7 +107,7 @@ function get_links($category = -1,
|
|||||||
|
|
||||||
if ( $show_updated )
|
if ( $show_updated )
|
||||||
if (substr($row->link_updated_f, 0, 2) != '00')
|
if (substr($row->link_updated_f, 0, 2) != '00')
|
||||||
$title .= ' (Last updated ' . date(get_settings('links_updated_date_format'), $row->link_updated_f + (get_settings('gmt_offset') * 3600)) . ')';
|
$title .= ' (Last updated ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
|
||||||
|
|
||||||
if ( '' != $title )
|
if ( '' != $title )
|
||||||
$title = ' title="' . $title . '"';
|
$title = ' title="' . $title . '"';
|
||||||
@ -124,7 +124,7 @@ function get_links($category = -1,
|
|||||||
if ( strpos($row->link_image, 'http') !== false )
|
if ( strpos($row->link_image, 'http') !== false )
|
||||||
$output .= "<img src=\"$row->link_image\" $alt $title />";
|
$output .= "<img src=\"$row->link_image\" $alt $title />";
|
||||||
else // If it's a relative path
|
else // If it's a relative path
|
||||||
$output .= "<img src=\"" . get_settings('siteurl') . "$row->link_image\" $alt $title />";
|
$output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
|
||||||
} else {
|
} else {
|
||||||
$output .= $name;
|
$output .= $name;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ function get_links($category = -1,
|
|||||||
$output .= '</a>';
|
$output .= '</a>';
|
||||||
|
|
||||||
if ( $show_updated && $row->recently_updated )
|
if ( $show_updated && $row->recently_updated )
|
||||||
$output .= get_settings('links_recently_updated_append');
|
$output .= get_option('links_recently_updated_append');
|
||||||
|
|
||||||
if ( $show_description && '' != $desc )
|
if ( $show_description && '' != $desc )
|
||||||
$output .= $between . $desc;
|
$output .= $between . $desc;
|
||||||
@ -256,7 +256,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||||||
$bookmark->recently_updated = false;
|
$bookmark->recently_updated = false;
|
||||||
$output .= $before;
|
$output .= $before;
|
||||||
if ( $show_updated && $bookmark->recently_updated )
|
if ( $show_updated && $bookmark->recently_updated )
|
||||||
$output .= get_settings('links_recently_updated_prepend');
|
$output .= get_option('links_recently_updated_prepend');
|
||||||
|
|
||||||
$the_link = '#';
|
$the_link = '#';
|
||||||
if ( !empty($bookmark->link_url) )
|
if ( !empty($bookmark->link_url) )
|
||||||
@ -272,7 +272,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||||||
|
|
||||||
if ( $show_updated )
|
if ( $show_updated )
|
||||||
if ( '00' != substr($bookmark->link_updated_f, 0, 2) )
|
if ( '00' != substr($bookmark->link_updated_f, 0, 2) )
|
||||||
$title .= ' (Last updated ' . date(get_settings('links_updated_date_format'), $bookmark->link_updated_f + (get_settings('gmt_offset') * 3600)) . ')';
|
$title .= ' (Last updated ' . date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
|
||||||
|
|
||||||
if ( '' != $title )
|
if ( '' != $title )
|
||||||
$title = ' title="' . $title . '"';
|
$title = ' title="' . $title . '"';
|
||||||
@ -289,7 +289,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||||||
if ( strpos($bookmark->link_image, 'http') !== false )
|
if ( strpos($bookmark->link_image, 'http') !== false )
|
||||||
$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
|
$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
|
||||||
else // If it's a relative path
|
else // If it's a relative path
|
||||||
$output .= "<img src=\"" . get_settings('siteurl') . "$bookmark->link_image\" $alt $title />";
|
$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
|
||||||
} else {
|
} else {
|
||||||
$output .= $name;
|
$output .= $name;
|
||||||
}
|
}
|
||||||
@ -297,7 +297,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||||||
$output .= '</a>';
|
$output .= '</a>';
|
||||||
|
|
||||||
if ( $show_updated && $bookmark->recently_updated )
|
if ( $show_updated && $bookmark->recently_updated )
|
||||||
$output .= get_settings('links_recently_updated_append');
|
$output .= get_option('links_recently_updated_append');
|
||||||
|
|
||||||
if ( $show_description && '' != $desc )
|
if ( $show_description && '' != $desc )
|
||||||
$output .= $between . $desc;
|
$output .= $between . $desc;
|
||||||
|
@ -91,8 +91,8 @@ function get_bookmarks($args = '') {
|
|||||||
$join = " LEFT JOIN $wpdb->link2cat ON ($wpdb->links.link_id = $wpdb->link2cat.link_id) ";
|
$join = " LEFT JOIN $wpdb->link2cat ON ($wpdb->links.link_id = $wpdb->link2cat.link_id) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_settings('links_recently_updated_time')) {
|
if (get_option('links_recently_updated_time')) {
|
||||||
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_settings('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated ";
|
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_option('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated ";
|
||||||
} else {
|
} else {
|
||||||
$recently_updated_test = '';
|
$recently_updated_test = '';
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ function get_category_link($category_id) {
|
|||||||
$catlink = $wp_rewrite->get_category_permastruct();
|
$catlink = $wp_rewrite->get_category_permastruct();
|
||||||
|
|
||||||
if ( empty($catlink) ) {
|
if ( empty($catlink) ) {
|
||||||
$file = get_settings('home') . '/';
|
$file = get_option('home') . '/';
|
||||||
$catlink = $file . '?cat=' . $category_id;
|
$catlink = $file . '?cat=' . $category_id;
|
||||||
} else {
|
} else {
|
||||||
$category = &get_category($category_id);
|
$category = &get_category($category_id);
|
||||||
@ -33,7 +33,7 @@ function get_category_link($category_id) {
|
|||||||
$category_nicename = get_category_parents($parent, false, '/', true) . $category_nicename . '/';
|
$category_nicename = get_category_parents($parent, false, '/', true) . $category_nicename . '/';
|
||||||
|
|
||||||
$catlink = str_replace('%category%', $category_nicename, $catlink);
|
$catlink = str_replace('%category%', $category_nicename, $catlink);
|
||||||
$catlink = get_settings('home') . trailingslashit($catlink);
|
$catlink = get_option('home') . trailingslashit($catlink);
|
||||||
}
|
}
|
||||||
return apply_filters('category_link', $catlink, $category_id);
|
return apply_filters('category_link', $catlink, $category_id);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ class retrospam_mgr {
|
|||||||
function retrospam_mgr() {
|
function retrospam_mgr() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$list = explode("\n", get_settings('moderation_keys') );
|
$list = explode("\n", get_option('moderation_keys') );
|
||||||
$list = array_unique( $list );
|
$list = array_unique( $list );
|
||||||
$this->spam_words = $list;
|
$this->spam_words = $list;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class WP {
|
|||||||
$req_uri_array = explode('?', $req_uri);
|
$req_uri_array = explode('?', $req_uri);
|
||||||
$req_uri = $req_uri_array[0];
|
$req_uri = $req_uri_array[0];
|
||||||
$self = $_SERVER['PHP_SELF'];
|
$self = $_SERVER['PHP_SELF'];
|
||||||
$home_path = parse_url(get_settings('home'));
|
$home_path = parse_url(get_option('home'));
|
||||||
$home_path = $home_path['path'];
|
$home_path = $home_path['path'];
|
||||||
$home_path = trim($home_path, '/');
|
$home_path = trim($home_path, '/');
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ function comment_author_url_link( $linktext = '', $before = '', $after = '' ) {
|
|||||||
function get_comment_date( $d = '' ) {
|
function get_comment_date( $d = '' ) {
|
||||||
global $comment;
|
global $comment;
|
||||||
if ( '' == $d )
|
if ( '' == $d )
|
||||||
$date = mysql2date( get_settings('date_format'), $comment->comment_date);
|
$date = mysql2date( get_option('date_format'), $comment->comment_date);
|
||||||
else
|
else
|
||||||
$date = mysql2date($d, $comment->comment_date);
|
$date = mysql2date($d, $comment->comment_date);
|
||||||
return apply_filters('get_comment_date', $date);
|
return apply_filters('get_comment_date', $date);
|
||||||
@ -187,7 +187,7 @@ function get_comment_time( $d = '', $gmt = false ) {
|
|||||||
global $comment;
|
global $comment;
|
||||||
$comment_date = $gmt? $comment->comment_date_gmt : $comment->comment_date;
|
$comment_date = $gmt? $comment->comment_date_gmt : $comment->comment_date;
|
||||||
if ( '' == $d )
|
if ( '' == $d )
|
||||||
$date = mysql2date(get_settings('time_format'), $comment_date);
|
$date = mysql2date(get_option('time_format'), $comment_date);
|
||||||
else
|
else
|
||||||
$date = mysql2date($d, $comment_date);
|
$date = mysql2date($d, $comment_date);
|
||||||
return apply_filters('get_comment_time', $date);
|
return apply_filters('get_comment_time', $date);
|
||||||
@ -222,9 +222,9 @@ function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pin
|
|||||||
|
|
||||||
function get_trackback_url() {
|
function get_trackback_url() {
|
||||||
global $id;
|
global $id;
|
||||||
$tb_url = get_settings('siteurl') . '/wp-trackback.php?p=' . $id;
|
$tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id;
|
||||||
|
|
||||||
if ( '' != get_settings('permalink_structure') )
|
if ( '' != get_option('permalink_structure') )
|
||||||
$tb_url = trailingslashit(get_permalink()) . 'trackback/';
|
$tb_url = trailingslashit(get_permalink()) . 'trackback/';
|
||||||
|
|
||||||
return $tb_url;
|
return $tb_url;
|
||||||
@ -276,7 +276,7 @@ function comments_template( $file = '/comments.php' ) {
|
|||||||
if ( ! (is_single() || is_page() || $withcomments) )
|
if ( ! (is_single() || is_page() || $withcomments) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$req = get_settings('require_name_email');
|
$req = get_option('require_name_email');
|
||||||
$commenter = wp_get_current_commenter();
|
$commenter = wp_get_current_commenter();
|
||||||
extract($commenter);
|
extract($commenter);
|
||||||
|
|
||||||
@ -334,9 +334,9 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
|||||||
echo '<a href="';
|
echo '<a href="';
|
||||||
if ($wpcommentsjavascript) {
|
if ($wpcommentsjavascript) {
|
||||||
if ( empty($wpcommentspopupfile) )
|
if ( empty($wpcommentspopupfile) )
|
||||||
$home = get_settings('home');
|
$home = get_option('home');
|
||||||
else
|
else
|
||||||
$home = get_settings('siteurl');
|
$home = get_option('siteurl');
|
||||||
echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
echo $home . '/' . $wpcommentspopupfile.'?comments_popup='.$id;
|
||||||
echo '" onclick="wpopen(this.href); return false"';
|
echo '" onclick="wpopen(this.href); return false"';
|
||||||
} else { // if comments_popup_script() is not in the template, display simple comment link
|
} else { // if comments_popup_script() is not in the template, display simple comment link
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) {
|
function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual
|
if (1 == get_option('comment_moderation')) return false; // If moderation is set to manual
|
||||||
|
|
||||||
if ( (count(explode('http:', $comment)) - 1) >= get_settings('comment_max_links') )
|
if ( (count(explode('http:', $comment)) - 1) >= get_option('comment_max_links') )
|
||||||
return false; // Check # of external links
|
return false; // Check # of external links
|
||||||
|
|
||||||
$mod_keys = trim( get_settings('moderation_keys') );
|
$mod_keys = trim( get_option('moderation_keys') );
|
||||||
if ( !empty($mod_keys) ) {
|
if ( !empty($mod_keys) ) {
|
||||||
$words = explode("\n", $mod_keys );
|
$words = explode("\n", $mod_keys );
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Comment whitelisting:
|
// Comment whitelisting:
|
||||||
if ( 1 == get_settings('comment_whitelist')) {
|
if ( 1 == get_option('comment_whitelist')) {
|
||||||
if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
|
if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
|
||||||
$uri = parse_url($url);
|
$uri = parse_url($url);
|
||||||
$domain = $uri['host'];
|
$domain = $uri['host'];
|
||||||
@ -124,7 +124,7 @@ function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = fals
|
|||||||
|
|
||||||
function get_lastcommentmodified($timezone = 'server') {
|
function get_lastcommentmodified($timezone = 'server') {
|
||||||
global $cache_lastcommentmodified, $pagenow, $wpdb;
|
global $cache_lastcommentmodified, $pagenow, $wpdb;
|
||||||
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
$add_seconds_blog = get_option('gmt_offset') * 3600;
|
||||||
$add_seconds_server = date('Z');
|
$add_seconds_server = date('Z');
|
||||||
$now = current_time('mysql', 1);
|
$now = current_time('mysql', 1);
|
||||||
if ( !isset($cache_lastcommentmodified[$timezone]) ) {
|
if ( !isset($cache_lastcommentmodified[$timezone]) ) {
|
||||||
@ -233,7 +233,7 @@ function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_age
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mod_keys = trim( get_settings('blacklist_keys') );
|
$mod_keys = trim( get_option('blacklist_keys') );
|
||||||
if ('' == $mod_keys )
|
if ('' == $mod_keys )
|
||||||
return false; // If moderation keys are empty
|
return false; // If moderation keys are empty
|
||||||
$words = explode("\n", $mod_keys );
|
$words = explode("\n", $mod_keys );
|
||||||
@ -386,7 +386,7 @@ function wp_new_comment( $commentdata ) {
|
|||||||
|
|
||||||
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
||||||
|
|
||||||
if ( get_settings('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] )
|
if ( get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] )
|
||||||
wp_notify_postauthor($comment_ID, $commentdata['comment_type']);
|
wp_notify_postauthor($comment_ID, $commentdata['comment_type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -616,7 +616,7 @@ function do_trackbacks($post_id) {
|
|||||||
$excerpt = str_replace(']]>', ']]>', $excerpt);
|
$excerpt = str_replace(']]>', ']]>', $excerpt);
|
||||||
$excerpt = strip_tags($excerpt);
|
$excerpt = strip_tags($excerpt);
|
||||||
if ( function_exists('mb_strcut') ) // For international trackbacks
|
if ( function_exists('mb_strcut') ) // For international trackbacks
|
||||||
$excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...';
|
$excerpt = mb_strcut($excerpt, 0, 252, get_option('blog_charset')) . '...';
|
||||||
else
|
else
|
||||||
$excerpt = substr($excerpt, 0, 252) . '...';
|
$excerpt = substr($excerpt, 0, 252) . '...';
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ function do_trackbacks($post_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generic_ping($post_id = 0) {
|
function generic_ping($post_id = 0) {
|
||||||
$services = get_settings('ping_sites');
|
$services = get_option('ping_sites');
|
||||||
$services = preg_replace("|(\s)+|", '$1', $services); // Kill dupe lines
|
$services = preg_replace("|(\s)+|", '$1', $services); // Kill dupe lines
|
||||||
$services = trim($services);
|
$services = trim($services);
|
||||||
if ( '' != $services ) {
|
if ( '' != $services ) {
|
||||||
@ -744,14 +744,14 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
|
|||||||
|
|
||||||
$title = urlencode($title);
|
$title = urlencode($title);
|
||||||
$excerpt = urlencode($excerpt);
|
$excerpt = urlencode($excerpt);
|
||||||
$blog_name = urlencode(get_settings('blogname'));
|
$blog_name = urlencode(get_option('blogname'));
|
||||||
$tb_url = $trackback_url;
|
$tb_url = $trackback_url;
|
||||||
$url = urlencode(get_permalink($ID));
|
$url = urlencode(get_permalink($ID));
|
||||||
$query_string = "title=$title&url=$url&blog_name=$blog_name&excerpt=$excerpt";
|
$query_string = "title=$title&url=$url&blog_name=$blog_name&excerpt=$excerpt";
|
||||||
$trackback_url = parse_url($trackback_url);
|
$trackback_url = parse_url($trackback_url);
|
||||||
$http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?'.$trackback_url['query'] : '') . " HTTP/1.0\r\n";
|
$http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?'.$trackback_url['query'] : '') . " HTTP/1.0\r\n";
|
||||||
$http_request .= 'Host: '.$trackback_url['host']."\r\n";
|
$http_request .= 'Host: '.$trackback_url['host']."\r\n";
|
||||||
$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_settings('blog_charset')."\r\n";
|
$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_option('blog_charset')."\r\n";
|
||||||
$http_request .= 'Content-Length: '.strlen($query_string)."\r\n";
|
$http_request .= 'Content-Length: '.strlen($query_string)."\r\n";
|
||||||
$http_request .= "User-Agent: WordPress/" . $wp_version;
|
$http_request .= "User-Agent: WordPress/" . $wp_version;
|
||||||
$http_request .= "\r\n\r\n";
|
$http_request .= "\r\n\r\n";
|
||||||
@ -789,8 +789,8 @@ function weblog_ping($server = '', $path = '') {
|
|||||||
// when set to true, this outputs debug messages by itself
|
// when set to true, this outputs debug messages by itself
|
||||||
$client->debug = false;
|
$client->debug = false;
|
||||||
$home = trailingslashit( get_option('home') );
|
$home = trailingslashit( get_option('home') );
|
||||||
if ( !$client->query('weblogUpdates.extendedPing', get_settings('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping
|
if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping
|
||||||
$client->query('weblogUpdates.ping', get_settings('blogname'), $home);
|
$client->query('weblogUpdates.ping', get_option('blogname'), $home);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -80,7 +80,7 @@ function spawn_cron() {
|
|||||||
if ( array_shift( $keys ) > time() )
|
if ( array_shift( $keys ) > time() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$cron_url = get_settings( 'siteurl' ) . '/wp-cron.php';
|
$cron_url = get_option( 'siteurl' ) . '/wp-cron.php';
|
||||||
$parts = parse_url( $cron_url );
|
$parts = parse_url( $cron_url );
|
||||||
|
|
||||||
$argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 );
|
$argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01 );
|
||||||
|
@ -491,4 +491,8 @@ function link_pages($before='<br />', $after='<br />', $next_or_number='number',
|
|||||||
return wp_link_pages($args);
|
return wp_link_pages($args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_settings($option) {
|
||||||
|
return get_option($option);
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -87,20 +87,20 @@ function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = '
|
|||||||
function comments_rss($commentsrssfilename = '') {
|
function comments_rss($commentsrssfilename = '') {
|
||||||
global $id;
|
global $id;
|
||||||
|
|
||||||
if ('' != get_settings('permalink_structure'))
|
if ('' != get_option('permalink_structure'))
|
||||||
$url = trailingslashit( get_permalink() ) . 'feed/';
|
$url = trailingslashit( get_permalink() ) . 'feed/';
|
||||||
else
|
else
|
||||||
$url = get_settings('home') . "/$commentsrssfilename?feed=rss2&p=$id";
|
$url = get_option('home') . "/$commentsrssfilename?feed=rss2&p=$id";
|
||||||
|
|
||||||
return apply_filters('post_comments_feed_link', $url);
|
return apply_filters('post_comments_feed_link', $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_author_rss_link($echo = false, $author_id, $author_nicename) {
|
function get_author_rss_link($echo = false, $author_id, $author_nicename) {
|
||||||
$auth_ID = $author_id;
|
$auth_ID = $author_id;
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_option('permalink_structure');
|
||||||
|
|
||||||
if ('' == $permalink_structure) {
|
if ('' == $permalink_structure) {
|
||||||
$link = get_settings('home') . '?feed=rss2&author=' . $author_id;
|
$link = get_option('home') . '?feed=rss2&author=' . $author_id;
|
||||||
} else {
|
} else {
|
||||||
$link = get_author_link(0, $author_id, $author_nicename);
|
$link = get_author_link(0, $author_id, $author_nicename);
|
||||||
$link = $link . "feed/";
|
$link = $link . "feed/";
|
||||||
@ -113,10 +113,10 @@ function get_author_rss_link($echo = false, $author_id, $author_nicename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_category_rss_link($echo = false, $cat_ID, $category_nicename) {
|
function get_category_rss_link($echo = false, $cat_ID, $category_nicename) {
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_option('permalink_structure');
|
||||||
|
|
||||||
if ('' == $permalink_structure) {
|
if ('' == $permalink_structure) {
|
||||||
$link = get_settings('home') . '?feed=rss2&cat=' . $cat_ID;
|
$link = get_option('home') . '?feed=rss2&cat=' . $cat_ID;
|
||||||
} else {
|
} else {
|
||||||
$link = get_category_link($cat_ID);
|
$link = get_category_link($cat_ID);
|
||||||
$link = $link . "feed/";
|
$link = $link . "feed/";
|
||||||
|
@ -606,7 +606,7 @@ function wp_rel_nofollow( $text ) {
|
|||||||
function convert_smilies($text) {
|
function convert_smilies($text) {
|
||||||
global $wp_smiliessearch, $wp_smiliesreplace;
|
global $wp_smiliessearch, $wp_smiliesreplace;
|
||||||
$output = '';
|
$output = '';
|
||||||
if (get_settings('use_smilies')) {
|
if (get_option('use_smilies')) {
|
||||||
// HTML loop taken from texturize function, could possible be consolidated
|
// HTML loop taken from texturize function, could possible be consolidated
|
||||||
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
|
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
|
||||||
$stop = count($textarr);// loop stuff
|
$stop = count($textarr);// loop stuff
|
||||||
@ -656,7 +656,7 @@ function get_gmt_from_date($string) {
|
|||||||
// note: this only substracts $time_difference from the given date
|
// note: this only substracts $time_difference from the given date
|
||||||
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
|
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
|
||||||
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
|
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
|
||||||
$string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_settings('gmt_offset') * 3600);
|
$string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_option('gmt_offset') * 3600);
|
||||||
return $string_gmt;
|
return $string_gmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ function get_date_from_gmt($string) {
|
|||||||
// note: this only adds $time_difference to the given date
|
// note: this only adds $time_difference to the given date
|
||||||
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
|
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
|
||||||
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
|
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
|
||||||
$string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_settings('gmt_offset')*3600);
|
$string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_option('gmt_offset')*3600);
|
||||||
return $string_localtime;
|
return $string_localtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -690,7 +690,7 @@ function iso8601_to_datetime($date_string, $timezone = USER) {
|
|||||||
if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
|
if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
|
||||||
$offset = iso8601_timezone_to_offset($date_bits[7]);
|
$offset = iso8601_timezone_to_offset($date_bits[7]);
|
||||||
} else { // we don't have a timezone, so we assume user local timezone (not server's!)
|
} else { // we don't have a timezone, so we assume user local timezone (not server's!)
|
||||||
$offset = 3600 * get_settings('gmt_offset');
|
$offset = 3600 * get_option('gmt_offset');
|
||||||
}
|
}
|
||||||
$timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
|
$timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
|
||||||
$timestamp -= $offset;
|
$timestamp -= $offset;
|
||||||
|
@ -45,12 +45,12 @@ function current_time($type, $gmt = 0) {
|
|||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
if ( $gmt ) $d = gmdate('Y-m-d H:i:s');
|
if ( $gmt ) $d = gmdate('Y-m-d H:i:s');
|
||||||
else $d = gmdate('Y-m-d H:i:s', (time() + (get_settings('gmt_offset') * 3600)));
|
else $d = gmdate('Y-m-d H:i:s', (time() + (get_option('gmt_offset') * 3600)));
|
||||||
return $d;
|
return $d;
|
||||||
break;
|
break;
|
||||||
case 'timestamp':
|
case 'timestamp':
|
||||||
if ( $gmt ) $d = time();
|
if ( $gmt ) $d = time();
|
||||||
else $d = time() + (get_settings('gmt_offset') * 3600);
|
else $d = time() + (get_option('gmt_offset') * 3600);
|
||||||
return $d;
|
return $d;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -88,13 +88,13 @@ function get_weekstartend($mysqlstring, $start_of_week) {
|
|||||||
$weekday = date('w',$day);
|
$weekday = date('w',$day);
|
||||||
$i = 86400;
|
$i = 86400;
|
||||||
|
|
||||||
if ( $weekday < get_settings('start_of_week') )
|
if ( $weekday < get_option('start_of_week') )
|
||||||
$weekday = 7 - (get_settings('start_of_week') - $weekday);
|
$weekday = 7 - (get_option('start_of_week') - $weekday);
|
||||||
|
|
||||||
while ($weekday > get_settings('start_of_week')) {
|
while ($weekday > get_option('start_of_week')) {
|
||||||
$weekday = date('w',$day);
|
$weekday = date('w',$day);
|
||||||
if ( $weekday < get_settings('start_of_week') )
|
if ( $weekday < get_option('start_of_week') )
|
||||||
$weekday = 7 - (get_settings('start_of_week') - $weekday);
|
$weekday = 7 - (get_option('start_of_week') - $weekday);
|
||||||
|
|
||||||
$day = $day - 86400;
|
$day = $day - 86400;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -107,7 +107,7 @@ function get_weekstartend($mysqlstring, $start_of_week) {
|
|||||||
|
|
||||||
function get_lastpostdate($timezone = 'server') {
|
function get_lastpostdate($timezone = 'server') {
|
||||||
global $cache_lastpostdate, $pagenow, $wpdb;
|
global $cache_lastpostdate, $pagenow, $wpdb;
|
||||||
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
$add_seconds_blog = get_option('gmt_offset') * 3600;
|
||||||
$add_seconds_server = date('Z');
|
$add_seconds_server = date('Z');
|
||||||
if ( !isset($cache_lastpostdate[$timezone]) ) {
|
if ( !isset($cache_lastpostdate[$timezone]) ) {
|
||||||
switch(strtolower($timezone)) {
|
switch(strtolower($timezone)) {
|
||||||
@ -130,7 +130,7 @@ function get_lastpostdate($timezone = 'server') {
|
|||||||
|
|
||||||
function get_lastpostmodified($timezone = 'server') {
|
function get_lastpostmodified($timezone = 'server') {
|
||||||
global $cache_lastpostmodified, $pagenow, $wpdb;
|
global $cache_lastpostmodified, $pagenow, $wpdb;
|
||||||
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
$add_seconds_blog = get_option('gmt_offset') * 3600;
|
||||||
$add_seconds_server = date('Z');
|
$add_seconds_server = date('Z');
|
||||||
if ( !isset($cache_lastpostmodified[$timezone]) ) {
|
if ( !isset($cache_lastpostmodified[$timezone]) ) {
|
||||||
switch(strtolower($timezone)) {
|
switch(strtolower($timezone)) {
|
||||||
@ -164,7 +164,7 @@ function maybe_unserialize($original) {
|
|||||||
|
|
||||||
/* Options functions */
|
/* Options functions */
|
||||||
|
|
||||||
function get_settings($setting) {
|
function get_option($setting) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$value = wp_cache_get($setting, 'options');
|
$value = wp_cache_get($setting, 'options');
|
||||||
@ -186,7 +186,7 @@ function get_settings($setting) {
|
|||||||
|
|
||||||
// If home is not set use siteurl.
|
// If home is not set use siteurl.
|
||||||
if ( 'home' == $setting && '' == $value )
|
if ( 'home' == $setting && '' == $value )
|
||||||
return get_settings('siteurl');
|
return get_option('siteurl');
|
||||||
|
|
||||||
if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting )
|
if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting )
|
||||||
$value = preg_replace('|/+$|', '', $value);
|
$value = preg_replace('|/+$|', '', $value);
|
||||||
@ -194,10 +194,6 @@ function get_settings($setting) {
|
|||||||
return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
|
return apply_filters( 'option_' . $setting, maybe_unserialize($value) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_option($option) {
|
|
||||||
return get_settings($option);
|
|
||||||
}
|
|
||||||
|
|
||||||
function form_option($option) {
|
function form_option($option) {
|
||||||
echo wp_specialchars( get_option($option), 1 );
|
echo wp_specialchars( get_option($option), 1 );
|
||||||
}
|
}
|
||||||
@ -290,7 +286,7 @@ function delete_option($name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gzip_compression() {
|
function gzip_compression() {
|
||||||
if ( !get_settings('gzipcompression') ) return false;
|
if ( !get_option('gzipcompression') ) return false;
|
||||||
|
|
||||||
if ( extension_loaded('zlib') ) {
|
if ( extension_loaded('zlib') ) {
|
||||||
ob_start('ob_gzhandler');
|
ob_start('ob_gzhandler');
|
||||||
@ -324,7 +320,7 @@ function make_url_footnote($content) {
|
|||||||
$link_url = $matches[2][$i];
|
$link_url = $matches[2][$i];
|
||||||
$link_text = $matches[4][$i];
|
$link_text = $matches[4][$i];
|
||||||
$content = str_replace($link_match, $link_text.' '.$link_number, $content);
|
$content = str_replace($link_match, $link_text.' '.$link_number, $content);
|
||||||
$link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,8)) != 'https://')) ? get_settings('home') . $link_url : $link_url;
|
$link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,8)) != 'https://')) ? get_option('home') . $link_url : $link_url;
|
||||||
$links_summary .= "\n".$link_number.' '.$link_url;
|
$links_summary .= "\n".$link_number.' '.$link_url;
|
||||||
}
|
}
|
||||||
$content = strip_tags($content);
|
$content = strip_tags($content);
|
||||||
@ -881,9 +877,9 @@ function wp_mkdir_p($target) {
|
|||||||
|
|
||||||
// Returns an array containing the current upload directory's path and url, or an error message.
|
// Returns an array containing the current upload directory's path and url, or an error message.
|
||||||
function wp_upload_dir() {
|
function wp_upload_dir() {
|
||||||
$siteurl = get_settings('siteurl');
|
$siteurl = get_option('siteurl');
|
||||||
//prepend ABSPATH to $dir and $siteurl to $url if they're not already there
|
//prepend ABSPATH to $dir and $siteurl to $url if they're not already there
|
||||||
$path = str_replace(ABSPATH, '', trim(get_settings('upload_path')));
|
$path = str_replace(ABSPATH, '', trim(get_option('upload_path')));
|
||||||
$dir = ABSPATH . $path;
|
$dir = ABSPATH . $path;
|
||||||
$url = trailingslashit($siteurl) . $path;
|
$url = trailingslashit($siteurl) . $path;
|
||||||
|
|
||||||
@ -896,7 +892,7 @@ function wp_upload_dir() {
|
|||||||
$url = trailingslashit($siteurl) . UPLOADS;
|
$url = trailingslashit($siteurl) . UPLOADS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_settings('uploads_use_yearmonth_folders')) {
|
if ( get_option('uploads_use_yearmonth_folders')) {
|
||||||
// Generate the yearly and monthly dirs
|
// Generate the yearly and monthly dirs
|
||||||
$time = current_time( 'mysql' );
|
$time = current_time( 'mysql' );
|
||||||
$y = substr( $time, 0, 4 );
|
$y = substr( $time, 0, 4 );
|
||||||
@ -1101,7 +1097,7 @@ function wp_explain_nonce($action) {
|
|||||||
function wp_nonce_ays($action) {
|
function wp_nonce_ays($action) {
|
||||||
global $pagenow, $menu, $submenu, $parent_file, $submenu_file;
|
global $pagenow, $menu, $submenu, $parent_file, $submenu_file;
|
||||||
|
|
||||||
$adminurl = get_settings('siteurl') . '/wp-admin';
|
$adminurl = get_option('siteurl') . '/wp-admin';
|
||||||
if ( wp_get_referer() )
|
if ( wp_get_referer() )
|
||||||
$adminurl = wp_get_referer();
|
$adminurl = wp_get_referer();
|
||||||
|
|
||||||
@ -1176,7 +1172,7 @@ function wp_die($message, $title = '') {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="logo"><img alt="WordPress" src="<?php echo get_settings('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1>
|
<h1 id="logo"><img alt="WordPress" src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1>
|
||||||
<p><?php echo $message; ?></p>
|
<p><?php echo $message; ?></p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -28,9 +28,9 @@ function get_sidebar() {
|
|||||||
|
|
||||||
function wp_loginout() {
|
function wp_loginout() {
|
||||||
if ( ! is_user_logged_in() )
|
if ( ! is_user_logged_in() )
|
||||||
$link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
|
$link = '<a href="' . get_option('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
|
||||||
else
|
else
|
||||||
$link = '<a href="' . get_settings('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
|
$link = '<a href="' . get_option('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
|
||||||
|
|
||||||
echo apply_filters('loginout', $link);
|
echo apply_filters('loginout', $link);
|
||||||
}
|
}
|
||||||
@ -39,12 +39,12 @@ function wp_loginout() {
|
|||||||
function wp_register( $before = '<li>', $after = '</li>' ) {
|
function wp_register( $before = '<li>', $after = '</li>' ) {
|
||||||
|
|
||||||
if ( ! is_user_logged_in() ) {
|
if ( ! is_user_logged_in() ) {
|
||||||
if ( get_settings('users_can_register') )
|
if ( get_option('users_can_register') )
|
||||||
$link = $before . '<a href="' . get_settings('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after;
|
$link = $before . '<a href="' . get_option('siteurl') . '/wp-register.php">' . __('Register') . '</a>' . $after;
|
||||||
else
|
else
|
||||||
$link = '';
|
$link = '';
|
||||||
} else {
|
} else {
|
||||||
$link = $before . '<a href="' . get_settings('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
|
$link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo apply_filters('register', $link);
|
echo apply_filters('register', $link);
|
||||||
@ -75,13 +75,13 @@ function get_bloginfo($show='') {
|
|||||||
case 'url' :
|
case 'url' :
|
||||||
case 'home' :
|
case 'home' :
|
||||||
case 'siteurl' :
|
case 'siteurl' :
|
||||||
$output = get_settings('home');
|
$output = get_option('home');
|
||||||
break;
|
break;
|
||||||
case 'wpurl' :
|
case 'wpurl' :
|
||||||
$output = get_settings('siteurl');
|
$output = get_option('siteurl');
|
||||||
break;
|
break;
|
||||||
case 'description':
|
case 'description':
|
||||||
$output = get_settings('blogdescription');
|
$output = get_option('blogdescription');
|
||||||
break;
|
break;
|
||||||
case 'rdf_url':
|
case 'rdf_url':
|
||||||
$output = get_feed_link('rdf');
|
$output = get_feed_link('rdf');
|
||||||
@ -99,7 +99,7 @@ function get_bloginfo($show='') {
|
|||||||
$output = get_feed_link('comments_rss2');
|
$output = get_feed_link('comments_rss2');
|
||||||
break;
|
break;
|
||||||
case 'pingback_url':
|
case 'pingback_url':
|
||||||
$output = get_settings('siteurl') .'/xmlrpc.php';
|
$output = get_option('siteurl') .'/xmlrpc.php';
|
||||||
break;
|
break;
|
||||||
case 'stylesheet_url':
|
case 'stylesheet_url':
|
||||||
$output = get_stylesheet_uri();
|
$output = get_stylesheet_uri();
|
||||||
@ -112,10 +112,10 @@ function get_bloginfo($show='') {
|
|||||||
$output = get_template_directory_uri();
|
$output = get_template_directory_uri();
|
||||||
break;
|
break;
|
||||||
case 'admin_email':
|
case 'admin_email':
|
||||||
$output = get_settings('admin_email');
|
$output = get_option('admin_email');
|
||||||
break;
|
break;
|
||||||
case 'charset':
|
case 'charset':
|
||||||
$output = get_settings('blog_charset');
|
$output = get_option('blog_charset');
|
||||||
if ('' == $output) $output = 'UTF-8';
|
if ('' == $output) $output = 'UTF-8';
|
||||||
break;
|
break;
|
||||||
case 'html_type' :
|
case 'html_type' :
|
||||||
@ -127,7 +127,7 @@ function get_bloginfo($show='') {
|
|||||||
break;
|
break;
|
||||||
case 'name':
|
case 'name':
|
||||||
default:
|
default:
|
||||||
$output = get_settings('blogname');
|
$output = get_option('blogname');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
@ -309,13 +309,13 @@ function wp_get_archives($args = '') {
|
|||||||
$archive_week_end_date_format = 'Y/m/d';
|
$archive_week_end_date_format = 'Y/m/d';
|
||||||
|
|
||||||
if ( !$archive_date_format_over_ride ) {
|
if ( !$archive_date_format_over_ride ) {
|
||||||
$archive_day_date_format = get_settings('date_format');
|
$archive_day_date_format = get_option('date_format');
|
||||||
$archive_week_start_date_format = get_settings('date_format');
|
$archive_week_start_date_format = get_option('date_format');
|
||||||
$archive_week_end_date_format = get_settings('date_format');
|
$archive_week_end_date_format = get_option('date_format');
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_hours = intval(get_settings('gmt_offset'));
|
$add_hours = intval(get_option('gmt_offset'));
|
||||||
$add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
|
$add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
|
||||||
|
|
||||||
if ( 'monthly' == $type ) {
|
if ( 'monthly' == $type ) {
|
||||||
$arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit);
|
$arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit);
|
||||||
@ -358,7 +358,7 @@ function wp_get_archives($args = '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ( 'weekly' == $type ) {
|
} elseif ( 'weekly' == $type ) {
|
||||||
$start_of_week = get_settings('start_of_week');
|
$start_of_week = get_option('start_of_week');
|
||||||
$arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
|
$arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
|
||||||
$arc_w_last = '';
|
$arc_w_last = '';
|
||||||
if ( $arcresults ) {
|
if ( $arcresults ) {
|
||||||
@ -366,10 +366,10 @@ function wp_get_archives($args = '') {
|
|||||||
if ( $arcresult->week != $arc_w_last ) {
|
if ( $arcresult->week != $arc_w_last ) {
|
||||||
$arc_year = $arcresult->yr;
|
$arc_year = $arcresult->yr;
|
||||||
$arc_w_last = $arcresult->week;
|
$arc_w_last = $arcresult->week;
|
||||||
$arc_week = get_weekstartend($arcresult->yyyymmdd, get_settings('start_of_week'));
|
$arc_week = get_weekstartend($arcresult->yyyymmdd, get_option('start_of_week'));
|
||||||
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
|
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
|
||||||
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
|
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
|
||||||
$url = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week);
|
$url = sprintf('%s/%s%sm%s%s%sw%s%d', get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week);
|
||||||
$text = $arc_week_start . $archive_week_separator . $arc_week_end;
|
$text = $arc_week_start . $archive_week_separator . $arc_week_end;
|
||||||
echo get_archives_link($url, $text, $format, $before, $after);
|
echo get_archives_link($url, $text, $format, $before, $after);
|
||||||
}
|
}
|
||||||
@ -416,9 +416,9 @@ function get_calendar($initial = true) {
|
|||||||
$w = ''.intval($_GET['w']);
|
$w = ''.intval($_GET['w']);
|
||||||
|
|
||||||
// week_begins = 0 stands for Sunday
|
// week_begins = 0 stands for Sunday
|
||||||
$week_begins = intval(get_settings('start_of_week'));
|
$week_begins = intval(get_option('start_of_week'));
|
||||||
$add_hours = intval(get_settings('gmt_offset'));
|
$add_hours = intval(get_option('gmt_offset'));
|
||||||
$add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
|
$add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
|
||||||
|
|
||||||
// Let's figure out when we are
|
// Let's figure out when we are
|
||||||
if ( !empty($monthnum) && !empty($year) ) {
|
if ( !empty($monthnum) && !empty($year) ) {
|
||||||
@ -437,8 +437,8 @@ function get_calendar($initial = true) {
|
|||||||
else
|
else
|
||||||
$thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
|
$thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
|
||||||
} else {
|
} else {
|
||||||
$thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
|
$thisyear = gmdate('Y', current_time('timestamp') + get_option('gmt_offset') * 3600);
|
||||||
$thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);
|
$thismonth = gmdate('m', current_time('timestamp') + get_option('gmt_offset') * 3600);
|
||||||
}
|
}
|
||||||
|
|
||||||
$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
|
$unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);
|
||||||
@ -558,7 +558,7 @@ function get_calendar($initial = true) {
|
|||||||
echo "\n\t</tr>\n\t<tr>\n\t\t";
|
echo "\n\t</tr>\n\t<tr>\n\t\t";
|
||||||
$newrow = false;
|
$newrow = false;
|
||||||
|
|
||||||
if ( $day == gmdate('j', (time() + (get_settings('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_settings('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_settings('gmt_offset') * 3600)) )
|
if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) )
|
||||||
echo '<td id="today">';
|
echo '<td id="today">';
|
||||||
else
|
else
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
@ -613,7 +613,7 @@ function the_date($d='', $before='', $after='', $echo = true) {
|
|||||||
if ( $day != $previousday ) {
|
if ( $day != $previousday ) {
|
||||||
$the_date .= $before;
|
$the_date .= $before;
|
||||||
if ( $d=='' )
|
if ( $d=='' )
|
||||||
$the_date .= mysql2date(get_settings('date_format'), $post->post_date);
|
$the_date .= mysql2date(get_option('date_format'), $post->post_date);
|
||||||
else
|
else
|
||||||
$the_date .= mysql2date($d, $post->post_date);
|
$the_date .= mysql2date($d, $post->post_date);
|
||||||
$the_date .= $after;
|
$the_date .= $after;
|
||||||
@ -634,7 +634,7 @@ function the_modified_date($d = '') {
|
|||||||
|
|
||||||
function get_the_modified_date($d = '') {
|
function get_the_modified_date($d = '') {
|
||||||
if ( '' == $d )
|
if ( '' == $d )
|
||||||
$the_time = get_post_modified_time(get_settings('date_format'));
|
$the_time = get_post_modified_time(get_option('date_format'));
|
||||||
else
|
else
|
||||||
$the_time = get_post_modified_time($d);
|
$the_time = get_post_modified_time($d);
|
||||||
return apply_filters('get_the_modified_date', $the_time, $d);
|
return apply_filters('get_the_modified_date', $the_time, $d);
|
||||||
@ -648,7 +648,7 @@ function the_time( $d = '' ) {
|
|||||||
|
|
||||||
function get_the_time( $d = '' ) {
|
function get_the_time( $d = '' ) {
|
||||||
if ( '' == $d )
|
if ( '' == $d )
|
||||||
$the_time = get_post_time(get_settings('time_format'));
|
$the_time = get_post_time(get_option('time_format'));
|
||||||
else
|
else
|
||||||
$the_time = get_post_time($d);
|
$the_time = get_post_time($d);
|
||||||
return apply_filters('get_the_time', $the_time, $d);
|
return apply_filters('get_the_time', $the_time, $d);
|
||||||
@ -674,7 +674,7 @@ function the_modified_time($d = '') {
|
|||||||
|
|
||||||
function get_the_modified_time($d = '') {
|
function get_the_modified_time($d = '') {
|
||||||
if ( '' == $d )
|
if ( '' == $d )
|
||||||
$the_time = get_post_modified_time(get_settings('time_format'));
|
$the_time = get_post_modified_time(get_option('time_format'));
|
||||||
else
|
else
|
||||||
$the_time = get_post_modified_time($d);
|
$the_time = get_post_modified_time($d);
|
||||||
return apply_filters('get_the_modified_time', $the_time, $d);
|
return apply_filters('get_the_modified_time', $the_time, $d);
|
||||||
@ -741,7 +741,7 @@ function noindex() {
|
|||||||
* @param string (optional) Previous form field's ID (for tabbing support)
|
* @param string (optional) Previous form field's ID (for tabbing support)
|
||||||
*/
|
*/
|
||||||
function the_editor($content, $id = 'content', $prev_id = 'title') {
|
function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||||
$rows = get_settings('default_post_edit_rows');
|
$rows = get_option('default_post_edit_rows');
|
||||||
if (($rows < 3) || ($rows > 100))
|
if (($rows < 3) || ($rows > 100))
|
||||||
$rows = 12;
|
$rows = 12;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ require_once('../../../wp-config.php');
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title><?php _e('Rich Editor Help') ?></title>
|
<title><?php _e('Rich Editor Help') ?></title>
|
||||||
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#wphead {
|
#wphead {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
@ -47,7 +47,7 @@ function get_permalink($id = 0) {
|
|||||||
elseif ($post->post_type == 'attachment')
|
elseif ($post->post_type == 'attachment')
|
||||||
return get_attachment_link($post->ID);
|
return get_attachment_link($post->ID);
|
||||||
|
|
||||||
$permalink = get_settings('permalink_structure');
|
$permalink = get_option('permalink_structure');
|
||||||
|
|
||||||
if ( '' != $permalink && 'draft' != $post->post_status ) {
|
if ( '' != $permalink && 'draft' != $post->post_status ) {
|
||||||
$unixtime = strtotime($post->post_date);
|
$unixtime = strtotime($post->post_date);
|
||||||
@ -77,9 +77,9 @@ function get_permalink($id = 0) {
|
|||||||
$author,
|
$author,
|
||||||
$post->post_name,
|
$post->post_name,
|
||||||
);
|
);
|
||||||
return apply_filters('post_link', get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post);
|
return apply_filters('post_link', get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post);
|
||||||
} else { // if they're not using the fancy permalink option
|
} else { // if they're not using the fancy permalink option
|
||||||
$permalink = get_settings('home') . '/?p=' . $post->ID;
|
$permalink = get_option('home') . '/?p=' . $post->ID;
|
||||||
return apply_filters('post_link', $permalink, $post);
|
return apply_filters('post_link', $permalink, $post);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,13 +100,13 @@ function get_page_link($id = false) {
|
|||||||
if ( '' != $pagestruct && 'draft' != $post->post_status ) {
|
if ( '' != $pagestruct && 'draft' != $post->post_status ) {
|
||||||
$link = get_page_uri($id);
|
$link = get_page_uri($id);
|
||||||
$link = str_replace('%pagename%', $link, $pagestruct);
|
$link = str_replace('%pagename%', $link, $pagestruct);
|
||||||
$link = get_settings('home') . "/$link/";
|
$link = get_option('home') . "/$link/";
|
||||||
} else {
|
} else {
|
||||||
$link = get_settings('home') . "/?page_id=$id";
|
$link = get_option('home') . "/?page_id=$id";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') )
|
if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') )
|
||||||
$link = get_settings('home');
|
$link = get_option('home');
|
||||||
|
|
||||||
return apply_filters('page_link', $link, $id);
|
return apply_filters('page_link', $link, $id);
|
||||||
}
|
}
|
||||||
@ -138,56 +138,56 @@ function get_attachment_link($id = false) {
|
|||||||
function get_year_link($year) {
|
function get_year_link($year) {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
if ( !$year )
|
if ( !$year )
|
||||||
$year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
|
$year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
|
||||||
$yearlink = $wp_rewrite->get_year_permastruct();
|
$yearlink = $wp_rewrite->get_year_permastruct();
|
||||||
if ( !empty($yearlink) ) {
|
if ( !empty($yearlink) ) {
|
||||||
$yearlink = str_replace('%year%', $year, $yearlink);
|
$yearlink = str_replace('%year%', $year, $yearlink);
|
||||||
return apply_filters('year_link', get_settings('home') . trailingslashit($yearlink), $year);
|
return apply_filters('year_link', get_option('home') . trailingslashit($yearlink), $year);
|
||||||
} else {
|
} else {
|
||||||
return apply_filters('year_link', get_settings('home') . '/?m=' . $year, $year);
|
return apply_filters('year_link', get_option('home') . '/?m=' . $year, $year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_month_link($year, $month) {
|
function get_month_link($year, $month) {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
if ( !$year )
|
if ( !$year )
|
||||||
$year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
|
$year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
|
||||||
if ( !$month )
|
if ( !$month )
|
||||||
$month = gmdate('m', time()+(get_settings('gmt_offset') * 3600));
|
$month = gmdate('m', time()+(get_option('gmt_offset') * 3600));
|
||||||
$monthlink = $wp_rewrite->get_month_permastruct();
|
$monthlink = $wp_rewrite->get_month_permastruct();
|
||||||
if ( !empty($monthlink) ) {
|
if ( !empty($monthlink) ) {
|
||||||
$monthlink = str_replace('%year%', $year, $monthlink);
|
$monthlink = str_replace('%year%', $year, $monthlink);
|
||||||
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
|
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
|
||||||
return apply_filters('month_link', get_settings('home') . trailingslashit($monthlink), $year, $month);
|
return apply_filters('month_link', get_option('home') . trailingslashit($monthlink), $year, $month);
|
||||||
} else {
|
} else {
|
||||||
return apply_filters('month_link', get_settings('home') . '/?m=' . $year . zeroise($month, 2), $year, $month);
|
return apply_filters('month_link', get_option('home') . '/?m=' . $year . zeroise($month, 2), $year, $month);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_day_link($year, $month, $day) {
|
function get_day_link($year, $month, $day) {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
if ( !$year )
|
if ( !$year )
|
||||||
$year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
|
$year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
|
||||||
if ( !$month )
|
if ( !$month )
|
||||||
$month = gmdate('m', time()+(get_settings('gmt_offset') * 3600));
|
$month = gmdate('m', time()+(get_option('gmt_offset') * 3600));
|
||||||
if ( !$day )
|
if ( !$day )
|
||||||
$day = gmdate('j', time()+(get_settings('gmt_offset') * 3600));
|
$day = gmdate('j', time()+(get_option('gmt_offset') * 3600));
|
||||||
|
|
||||||
$daylink = $wp_rewrite->get_day_permastruct();
|
$daylink = $wp_rewrite->get_day_permastruct();
|
||||||
if ( !empty($daylink) ) {
|
if ( !empty($daylink) ) {
|
||||||
$daylink = str_replace('%year%', $year, $daylink);
|
$daylink = str_replace('%year%', $year, $daylink);
|
||||||
$daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
|
$daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
|
||||||
$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
|
$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
|
||||||
return apply_filters('day_link', get_settings('home') . trailingslashit($daylink), $year, $month, $day);
|
return apply_filters('day_link', get_option('home') . trailingslashit($daylink), $year, $month, $day);
|
||||||
} else {
|
} else {
|
||||||
return apply_filters('day_link', get_settings('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);
|
return apply_filters('day_link', get_option('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_feed_link($feed='rss2') {
|
function get_feed_link($feed='rss2') {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
$do_perma = 0;
|
$do_perma = 0;
|
||||||
$feed_url = get_settings('siteurl');
|
$feed_url = get_option('siteurl');
|
||||||
$comment_feed_url = $feed_url;
|
$comment_feed_url = $feed_url;
|
||||||
|
|
||||||
$permalink = $wp_rewrite->get_feed_permastruct();
|
$permalink = $wp_rewrite->get_feed_permastruct();
|
||||||
@ -202,12 +202,12 @@ function get_feed_link($feed='rss2') {
|
|||||||
|
|
||||||
$permalink = str_replace('%feed%', $feed, $permalink);
|
$permalink = str_replace('%feed%', $feed, $permalink);
|
||||||
$permalink = preg_replace('#/+#', '/', "/$permalink/");
|
$permalink = preg_replace('#/+#', '/', "/$permalink/");
|
||||||
$output = get_settings('home') . $permalink;
|
$output = get_option('home') . $permalink;
|
||||||
} else {
|
} else {
|
||||||
if ( false !== strpos($feed, 'comments_') )
|
if ( false !== strpos($feed, 'comments_') )
|
||||||
$feed = str_replace('comments_', 'comments-', $feed);
|
$feed = str_replace('comments_', 'comments-', $feed);
|
||||||
|
|
||||||
$output = get_settings('home') . "/?feed={$feed}";
|
$output = get_option('home') . "/?feed={$feed}";
|
||||||
}
|
}
|
||||||
|
|
||||||
return apply_filters('feed_link', $output, $feed);
|
return apply_filters('feed_link', $output, $feed);
|
||||||
@ -229,7 +229,7 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
|||||||
$file = 'post';
|
$file = 'post';
|
||||||
}
|
}
|
||||||
|
|
||||||
$location = get_settings('siteurl') . "/wp-admin/{$file}.php?action=edit&post=$post->ID";
|
$location = get_option('siteurl') . "/wp-admin/{$file}.php?action=edit&post=$post->ID";
|
||||||
echo $before . "<a href=\"$location\">$link</a>" . $after;
|
echo $before . "<a href=\"$location\">$link</a>" . $after;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ function edit_comment_link($link = 'Edit This', $before = '', $after = '') {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$location = get_settings('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID";
|
$location = get_option('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID";
|
||||||
echo $before . "<a href='$location'>$link</a>" . $after;
|
echo $before . "<a href='$location'>$link</a>" . $after;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ function get_pagenum_link($pagenum = 1) {
|
|||||||
$page_modregex = "page/?";
|
$page_modregex = "page/?";
|
||||||
$permalink = 0;
|
$permalink = 0;
|
||||||
|
|
||||||
$home_root = parse_url(get_settings('home'));
|
$home_root = parse_url(get_option('home'));
|
||||||
$home_root = $home_root['path'];
|
$home_root = $home_root['path'];
|
||||||
$home_root = trailingslashit($home_root);
|
$home_root = trailingslashit($home_root);
|
||||||
$qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
|
$qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
|
||||||
@ -390,7 +390,7 @@ function get_pagenum_link($pagenum = 1) {
|
|||||||
// so append the query string (using &, since we already have ?)
|
// so append the query string (using &, since we already have ?)
|
||||||
$qstr .= '&' . $page_querystring . '=' . $pagenum;
|
$qstr .= '&' . $page_querystring . '=' . $pagenum;
|
||||||
// otherwise, it could be rewritten, OR just the default index ...
|
// otherwise, it could be rewritten, OR just the default index ...
|
||||||
} elseif( '' != get_settings('permalink_structure') && ! is_admin() ) {
|
} elseif( '' != get_option('permalink_structure') && ! is_admin() ) {
|
||||||
$permalink = 1;
|
$permalink = 1;
|
||||||
$index = $wp_rewrite->index;
|
$index = $wp_rewrite->index;
|
||||||
// If it's not a path info permalink structure, trim the index.
|
// If it's not a path info permalink structure, trim the index.
|
||||||
@ -412,7 +412,7 @@ function get_pagenum_link($pagenum = 1) {
|
|||||||
$qstr = preg_replace('|^/+|', '', $qstr);
|
$qstr = preg_replace('|^/+|', '', $qstr);
|
||||||
if ( $permalink )
|
if ( $permalink )
|
||||||
$qstr = trailingslashit($qstr);
|
$qstr = trailingslashit($qstr);
|
||||||
$qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
|
$qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_option('home') ) . $qstr );
|
||||||
|
|
||||||
// showing /page/1/ or ?paged=1 is redundant
|
// showing /page/1/ or ?paged=1 is redundant
|
||||||
if ( 1 === $pagenum ) {
|
if ( 1 === $pagenum ) {
|
||||||
|
@ -163,7 +163,7 @@ function wp_mail($to, $subject, $message, $headers = '') {
|
|||||||
if( $headers == '' ) {
|
if( $headers == '' ) {
|
||||||
$headers = "MIME-Version: 1.0\n" .
|
$headers = "MIME-Version: 1.0\n" .
|
||||||
"From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" .
|
"From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" .
|
||||||
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
|
"Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return @mail($to, $subject, $message, $headers);
|
return @mail($to, $subject, $message, $headers);
|
||||||
@ -221,7 +221,7 @@ function auth_redirect() {
|
|||||||
(empty($_COOKIE[USER_COOKIE])) ) {
|
(empty($_COOKIE[USER_COOKIE])) ) {
|
||||||
nocache_headers();
|
nocache_headers();
|
||||||
|
|
||||||
wp_redirect(get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
|
wp_redirect(get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ endif;
|
|||||||
|
|
||||||
if ( !function_exists('check_admin_referer') ) :
|
if ( !function_exists('check_admin_referer') ) :
|
||||||
function check_admin_referer($action = -1) {
|
function check_admin_referer($action = -1) {
|
||||||
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
|
$adminurl = strtolower(get_option('siteurl')).'/wp-admin';
|
||||||
$referer = strtolower(wp_get_referer());
|
$referer = strtolower(wp_get_referer());
|
||||||
if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) &&
|
if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) &&
|
||||||
!(-1 == $action && strstr($referer, $adminurl)) ) {
|
!(-1 == $action && strstr($referer, $adminurl)) ) {
|
||||||
@ -337,7 +337,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
|
|||||||
|
|
||||||
$comment_author_domain = gethostbyaddr($comment->comment_author_IP);
|
$comment_author_domain = gethostbyaddr($comment->comment_author_IP);
|
||||||
|
|
||||||
$blogname = get_settings('blogname');
|
$blogname = get_option('blogname');
|
||||||
|
|
||||||
if ( empty( $comment_type ) ) $comment_type = 'comment';
|
if ( empty( $comment_type ) ) $comment_type = 'comment';
|
||||||
|
|
||||||
@ -366,8 +366,8 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
|
|||||||
$subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
|
$subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
|
||||||
}
|
}
|
||||||
$notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
|
$notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
|
||||||
$notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
$notify_message .= sprintf( __('To delete this comment, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
$notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
||||||
|
|
||||||
$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
|
$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
|
|||||||
|
|
||||||
$message_headers = "MIME-Version: 1.0\n"
|
$message_headers = "MIME-Version: 1.0\n"
|
||||||
. "$from\n"
|
. "$from\n"
|
||||||
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
|
. "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
|
||||||
|
|
||||||
if ( isset($reply_to) )
|
if ( isset($reply_to) )
|
||||||
$message_headers .= $reply_to . "\n";
|
$message_headers .= $reply_to . "\n";
|
||||||
@ -407,7 +407,7 @@ if ( !function_exists('wp_notify_moderator') ) :
|
|||||||
function wp_notify_moderator($comment_id) {
|
function wp_notify_moderator($comment_id) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
if( get_settings( "moderation_notify" ) == 0 )
|
if( get_option( "moderation_notify" ) == 0 )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
|
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
|
||||||
@ -423,14 +423,14 @@ function wp_notify_moderator($comment_id) {
|
|||||||
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
|
$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
|
||||||
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||||
$notify_message .= sprintf( __('To approve this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
$notify_message .= sprintf( __('To approve this comment, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
$notify_message .= sprintf( __('To delete this comment, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
$notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . "\r\n";
|
$notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . "\r\n";
|
||||||
$notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
|
$notify_message .= get_option('siteurl') . "/wp-admin/moderation.php\r\n";
|
||||||
|
|
||||||
$subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title );
|
$subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_option('blogname'), $post->post_title );
|
||||||
$admin_email = get_settings('admin_email');
|
$admin_email = get_option('admin_email');
|
||||||
|
|
||||||
$notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id);
|
$notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id);
|
||||||
$subject = apply_filters('comment_moderation_subject', $subject, $comment_id);
|
$subject = apply_filters('comment_moderation_subject', $subject, $comment_id);
|
||||||
@ -448,20 +448,20 @@ function wp_new_user_notification($user_id, $plaintext_pass = '') {
|
|||||||
$user_login = stripslashes($user->user_login);
|
$user_login = stripslashes($user->user_login);
|
||||||
$user_email = stripslashes($user->user_email);
|
$user_email = stripslashes($user->user_email);
|
||||||
|
|
||||||
$message = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n";
|
$message = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . "\r\n\r\n";
|
||||||
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||||
$message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
|
$message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
|
||||||
|
|
||||||
@wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
|
@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);
|
||||||
|
|
||||||
if ( empty($plaintext_pass) )
|
if ( empty($plaintext_pass) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$message = sprintf(__('Username: %s'), $user_login) . "\r\n";
|
$message = sprintf(__('Username: %s'), $user_login) . "\r\n";
|
||||||
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
|
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
|
||||||
$message .= get_settings('siteurl') . "/wp-login.php\r\n";
|
$message .= get_option('siteurl') . "/wp-login.php\r\n";
|
||||||
|
|
||||||
wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_settings('blogname')), $message);
|
wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);
|
||||||
|
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
@ -151,7 +151,7 @@ function wp_link_pages($args = '') {
|
|||||||
$j = str_replace('%',"$i",$pagelink);
|
$j = str_replace('%',"$i",$pagelink);
|
||||||
$output .= ' ';
|
$output .= ' ';
|
||||||
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
|
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
|
||||||
if ( '' == get_settings('permalink_structure') )
|
if ( '' == get_option('permalink_structure') )
|
||||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">';
|
||||||
else
|
else
|
||||||
$output .= '<a href="' . trailingslashit( get_permalink() ) . $i . '/">';
|
$output .= '<a href="' . trailingslashit( get_permalink() ) . $i . '/">';
|
||||||
@ -166,14 +166,14 @@ function wp_link_pages($args = '') {
|
|||||||
$output .= $before;
|
$output .= $before;
|
||||||
$i = $page - 1;
|
$i = $page - 1;
|
||||||
if ( $i && $more ) {
|
if ( $i && $more ) {
|
||||||
if ( '' == get_settings('permalink_structure') )
|
if ( '' == get_option('permalink_structure') )
|
||||||
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">'.$previouspagelink.'</a>';
|
$output .= '<a href="' . get_permalink() . '&page=' . $i . '">'.$previouspagelink.'</a>';
|
||||||
else
|
else
|
||||||
$output .= '<a href="' . get_permalink() . $i . '/">'.$previouspagelink.'</a>';
|
$output .= '<a href="' . get_permalink() . $i . '/">'.$previouspagelink.'</a>';
|
||||||
}
|
}
|
||||||
$i = $page + 1;
|
$i = $page + 1;
|
||||||
if ( $i <= $numpages && $more ) {
|
if ( $i <= $numpages && $more ) {
|
||||||
if ( '' == get_settings('permalink_structure') )
|
if ( '' == get_option('permalink_structure') )
|
||||||
$output .= '<a href="'.get_permalink() . '&page=' . $i . '">'.$nextpagelink.'</a>';
|
$output .= '<a href="'.get_permalink() . '&page=' . $i . '">'.$nextpagelink.'</a>';
|
||||||
else
|
else
|
||||||
$output .= '<a href="'.get_permalink().$i.'/">'.$nextpagelink.'</a>';
|
$output .= '<a href="'.get_permalink().$i.'/">'.$nextpagelink.'</a>';
|
||||||
@ -264,7 +264,7 @@ function wp_list_pages($args = '') {
|
|||||||
else
|
else
|
||||||
parse_str($args, $r);
|
parse_str($args, $r);
|
||||||
|
|
||||||
$defaults = array('depth' => 0, 'show_date' => '', 'date_format' => get_settings('date_format'),
|
$defaults = array('depth' => 0, 'show_date' => '', 'date_format' => get_option('date_format'),
|
||||||
'child_of' => 0, 'title_li' => __('Pages'), 'echo' => 1);
|
'child_of' => 0, 'title_li' => __('Pages'), 'echo' => 1);
|
||||||
$r = array_merge($defaults, $r);
|
$r = array_merge($defaults, $r);
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ function prepend_attachment($content) {
|
|||||||
//
|
//
|
||||||
|
|
||||||
function get_the_password_form() {
|
function get_the_password_form() {
|
||||||
$output = '<form action="' . get_settings('siteurl') . '/wp-pass.php" method="post">
|
$output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post">
|
||||||
<p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
|
<p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
|
||||||
<p><label>' . __("Password:") . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p>
|
<p><label>' . __("Password:") . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
@ -560,10 +560,10 @@ function wp_insert_post($postarr = array()) {
|
|||||||
if ( $update )
|
if ( $update )
|
||||||
$comment_status = 'closed';
|
$comment_status = 'closed';
|
||||||
else
|
else
|
||||||
$comment_status = get_settings('default_comment_status');
|
$comment_status = get_option('default_comment_status');
|
||||||
}
|
}
|
||||||
if ( empty($ping_status) )
|
if ( empty($ping_status) )
|
||||||
$ping_status = get_settings('default_ping_status');
|
$ping_status = get_option('default_ping_status');
|
||||||
if ( empty($post_pingback) )
|
if ( empty($post_pingback) )
|
||||||
$post_pingback = get_option('default_pingback_flag');
|
$post_pingback = get_option('default_pingback_flag');
|
||||||
|
|
||||||
@ -1199,10 +1199,10 @@ function wp_insert_attachment($object, $file = false, $post_parent = 0) {
|
|||||||
if ( $update )
|
if ( $update )
|
||||||
$comment_status = 'closed';
|
$comment_status = 'closed';
|
||||||
else
|
else
|
||||||
$comment_status = get_settings('default_comment_status');
|
$comment_status = get_option('default_comment_status');
|
||||||
}
|
}
|
||||||
if ( empty($ping_status) )
|
if ( empty($ping_status) )
|
||||||
$ping_status = get_settings('default_ping_status');
|
$ping_status = get_option('default_ping_status');
|
||||||
if ( empty($post_pingback) )
|
if ( empty($post_pingback) )
|
||||||
$post_pingback = get_option('default_pingback_flag');
|
$post_pingback = get_option('default_pingback_flag');
|
||||||
|
|
||||||
|
@ -545,9 +545,9 @@ class WP_Query {
|
|||||||
$q['post_type'] = 'post';
|
$q['post_type'] = 'post';
|
||||||
$post_type = $q['post_type'];
|
$post_type = $q['post_type'];
|
||||||
if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 )
|
if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 )
|
||||||
$q['posts_per_page'] = get_settings('posts_per_page');
|
$q['posts_per_page'] = get_option('posts_per_page');
|
||||||
if ( !isset($q['what_to_show']) )
|
if ( !isset($q['what_to_show']) )
|
||||||
$q['what_to_show'] = get_settings('what_to_show');
|
$q['what_to_show'] = get_option('what_to_show');
|
||||||
if ( isset($q['showposts']) && $q['showposts'] ) {
|
if ( isset($q['showposts']) && $q['showposts'] ) {
|
||||||
$q['showposts'] = (int) $q['showposts'];
|
$q['showposts'] = (int) $q['showposts'];
|
||||||
$q['posts_per_page'] = $q['showposts'];
|
$q['posts_per_page'] = $q['showposts'];
|
||||||
@ -562,7 +562,7 @@ class WP_Query {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $this->is_feed ) {
|
if ( $this->is_feed ) {
|
||||||
$q['posts_per_page'] = get_settings('posts_per_rss');
|
$q['posts_per_page'] = get_option('posts_per_rss');
|
||||||
$q['what_to_show'] = 'posts';
|
$q['what_to_show'] = 'posts';
|
||||||
}
|
}
|
||||||
$q['posts_per_page'] = (int) $q['posts_per_page'];
|
$q['posts_per_page'] = (int) $q['posts_per_page'];
|
||||||
@ -583,8 +583,8 @@ class WP_Query {
|
|||||||
$q['page'] = abs($q['page']);
|
$q['page'] = abs($q['page']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_hours = intval(get_settings('gmt_offset'));
|
$add_hours = intval(get_option('gmt_offset'));
|
||||||
$add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));
|
$add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours));
|
||||||
$wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)";
|
$wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)";
|
||||||
|
|
||||||
// If a month is specified in the querystring, load that month
|
// If a month is specified in the querystring, load that month
|
||||||
|
@ -109,7 +109,7 @@ function wp_insert_user($userdata) {
|
|||||||
|
|
||||||
if ( !$update ) {
|
if ( !$update ) {
|
||||||
$user = new WP_User($user_id);
|
$user = new WP_User($user_id);
|
||||||
$user->set_role(get_settings('default_role'));
|
$user->set_role(get_option('default_role'));
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_cache_delete($user_id, 'users');
|
wp_cache_delete($user_id, 'users');
|
||||||
|
@ -89,23 +89,23 @@ function url_to_postid($url) {
|
|||||||
$url = $url_split[0];
|
$url = $url_split[0];
|
||||||
|
|
||||||
// Add 'www.' if it is absent and should be there
|
// Add 'www.' if it is absent and should be there
|
||||||
if ( false !== strpos(get_settings('home'), '://www.') && false === strpos($url, '://www.') )
|
if ( false !== strpos(get_option('home'), '://www.') && false === strpos($url, '://www.') )
|
||||||
$url = str_replace('://', '://www.', $url);
|
$url = str_replace('://', '://www.', $url);
|
||||||
|
|
||||||
// Strip 'www.' if it is present and shouldn't be
|
// Strip 'www.' if it is present and shouldn't be
|
||||||
if ( false === strpos(get_settings('home'), '://www.') )
|
if ( false === strpos(get_option('home'), '://www.') )
|
||||||
$url = str_replace('://www.', '://', $url);
|
$url = str_replace('://www.', '://', $url);
|
||||||
|
|
||||||
// Strip 'index.php/' if we're not using path info permalinks
|
// Strip 'index.php/' if we're not using path info permalinks
|
||||||
if ( false === strpos($rewrite, 'index.php/') )
|
if ( false === strpos($rewrite, 'index.php/') )
|
||||||
$url = str_replace('index.php/', '', $url);
|
$url = str_replace('index.php/', '', $url);
|
||||||
|
|
||||||
if ( false !== strpos($url, get_settings('home')) ) {
|
if ( false !== strpos($url, get_option('home')) ) {
|
||||||
// Chop off http://domain.com
|
// Chop off http://domain.com
|
||||||
$url = str_replace(get_settings('home'), '', $url);
|
$url = str_replace(get_option('home'), '', $url);
|
||||||
} else {
|
} else {
|
||||||
// Chop off /path/to/blog
|
// Chop off /path/to/blog
|
||||||
$home_path = parse_url(get_settings('home'));
|
$home_path = parse_url(get_option('home'));
|
||||||
$home_path = $home_path['path'];
|
$home_path = $home_path['path'];
|
||||||
$url = str_replace($home_path, '', $url);
|
$url = str_replace($home_path, '', $url);
|
||||||
}
|
}
|
||||||
@ -259,8 +259,8 @@ class WP_Rewrite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function page_rewrite_rules() {
|
function page_rewrite_rules() {
|
||||||
$uris = get_settings('page_uris');
|
$uris = get_option('page_uris');
|
||||||
$attachment_uris = get_settings('page_attachment_uris');
|
$attachment_uris = get_option('page_attachment_uris');
|
||||||
|
|
||||||
$rewrite_rules = array();
|
$rewrite_rules = array();
|
||||||
$page_structure = $this->get_page_permastruct();
|
$page_structure = $this->get_page_permastruct();
|
||||||
@ -757,10 +757,10 @@ class WP_Rewrite {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$site_root = parse_url(get_settings('siteurl'));
|
$site_root = parse_url(get_option('siteurl'));
|
||||||
$site_root = trailingslashit($site_root['path']);
|
$site_root = trailingslashit($site_root['path']);
|
||||||
|
|
||||||
$home_root = parse_url(get_settings('home'));
|
$home_root = parse_url(get_option('home'));
|
||||||
$home_root = trailingslashit($home_root['path']);
|
$home_root = trailingslashit($home_root['path']);
|
||||||
|
|
||||||
$rules = "<IfModule mod_rewrite.c>\n";
|
$rules = "<IfModule mod_rewrite.c>\n";
|
||||||
@ -853,13 +853,13 @@ class WP_Rewrite {
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
$this->extra_rules = $this->non_wp_rules = $this->endpoints = array();
|
$this->extra_rules = $this->non_wp_rules = $this->endpoints = array();
|
||||||
$this->permalink_structure = get_settings('permalink_structure');
|
$this->permalink_structure = get_option('permalink_structure');
|
||||||
$this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%'));
|
$this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%'));
|
||||||
$this->root = '';
|
$this->root = '';
|
||||||
if ($this->using_index_permalinks()) {
|
if ($this->using_index_permalinks()) {
|
||||||
$this->root = $this->index . '/';
|
$this->root = $this->index . '/';
|
||||||
}
|
}
|
||||||
$this->category_base = get_settings('category_base');
|
$this->category_base = get_option('category_base');
|
||||||
unset($this->category_structure);
|
unset($this->category_structure);
|
||||||
unset($this->author_structure);
|
unset($this->author_structure);
|
||||||
unset($this->date_structure);
|
unset($this->date_structure);
|
||||||
|
@ -65,7 +65,7 @@ class WP_Scripts {
|
|||||||
$ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version;
|
$ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version;
|
||||||
if ( isset($this->args[$handle]) )
|
if ( isset($this->args[$handle]) )
|
||||||
$ver .= '&' . $this->args[$handle];
|
$ver .= '&' . $this->args[$handle];
|
||||||
$src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_settings( 'siteurl' ) . $this->scripts[$handle]->src;
|
$src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src;
|
||||||
echo "<script type='text/javascript' src='$src?ver=$ver'></script>\n";
|
echo "<script type='text/javascript' src='$src?ver=$ver'></script>\n";
|
||||||
$this->printed[] = $handle;
|
$this->printed[] = $handle;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function get_stylesheet() {
|
function get_stylesheet() {
|
||||||
return apply_filters('stylesheet', get_settings('stylesheet'));
|
return apply_filters('stylesheet', get_option('stylesheet'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_stylesheet_directory() {
|
function get_stylesheet_directory() {
|
||||||
@ -26,7 +26,7 @@ function get_stylesheet_uri() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_template() {
|
function get_template() {
|
||||||
return apply_filters('template', get_settings('template'));
|
return apply_filters('template', get_option('template'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_template_directory() {
|
function get_template_directory() {
|
||||||
@ -237,8 +237,8 @@ function get_theme($theme) {
|
|||||||
function get_current_theme() {
|
function get_current_theme() {
|
||||||
$themes = get_themes();
|
$themes = get_themes();
|
||||||
$theme_names = array_keys($themes);
|
$theme_names = array_keys($themes);
|
||||||
$current_template = get_settings('template');
|
$current_template = get_option('template');
|
||||||
$current_stylesheet = get_settings('stylesheet');
|
$current_stylesheet = get_option('stylesheet');
|
||||||
$current_theme = 'WordPress Default';
|
$current_theme = 'WordPress Default';
|
||||||
|
|
||||||
if ( $themes ) {
|
if ( $themes ) {
|
||||||
@ -259,7 +259,7 @@ function get_theme_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_theme_root_uri() {
|
function get_theme_root_uri() {
|
||||||
return apply_filters('theme_root_uri', get_settings('siteurl') . "/wp-content/themes", get_settings('siteurl'));
|
return apply_filters('theme_root_uri', get_option('siteurl') . "/wp-content/themes", get_option('siteurl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_query_template($type) {
|
function get_query_template($type) {
|
||||||
|
@ -89,7 +89,7 @@ if (!isset($wpsmiliestrans)) {
|
|||||||
foreach($wpsmiliestrans as $smiley => $img) {
|
foreach($wpsmiliestrans as $smiley => $img) {
|
||||||
$wp_smiliessearch[] = $smiley;
|
$wp_smiliessearch[] = $smiley;
|
||||||
$smiley_masked = htmlspecialchars( trim($smiley) , ENT_QUOTES);
|
$smiley_masked = htmlspecialchars( trim($smiley) , ENT_QUOTES);
|
||||||
$wp_smiliesreplace[] = " <img src='" . get_settings('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
|
$wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -5,7 +5,7 @@ if (empty($wp)) {
|
|||||||
wp();
|
wp();
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
$link_cat = $_GET['link_cat'];
|
$link_cat = $_GET['link_cat'];
|
||||||
if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
|
if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
|
||||||
$link_cat = '';
|
$link_cat = '';
|
||||||
|
20
wp-login.php
20
wp-login.php
@ -16,7 +16,7 @@ if ( defined('RELOCATE') ) { // Move flag is set
|
|||||||
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
||||||
|
|
||||||
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
|
$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
|
||||||
if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
|
if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('siteurl') )
|
||||||
update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
|
update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ do_action('lost_password');
|
|||||||
<head>
|
<head>
|
||||||
<title>WordPress » <?php _e('Lost Password') ?></title>
|
<title>WordPress » <?php _e('Lost Password') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||||
<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_option('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function focusit() {
|
function focusit() {
|
||||||
// focus on first input field
|
// focus on first input field
|
||||||
@ -80,7 +80,7 @@ if ($error)
|
|||||||
</form>
|
</form>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">« <?php _e('Back to blog') ?></a></li>
|
<li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">« <?php _e('Back to blog') ?></a></li>
|
||||||
<?php if (get_settings('users_can_register')) : ?>
|
<?php if (get_option('users_can_register')) : ?>
|
||||||
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
|
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
|
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
|
||||||
@ -111,9 +111,9 @@ do_action('retrieve_password', $user_login);
|
|||||||
$message .= get_option('siteurl') . "\r\n\r\n";
|
$message .= get_option('siteurl') . "\r\n\r\n";
|
||||||
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||||
$message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
|
$message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
|
||||||
$message .= get_settings('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
|
$message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
|
||||||
|
|
||||||
$m = wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_settings('blogname')), $message);
|
$m = wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message);
|
||||||
|
|
||||||
if ($m == false) {
|
if ($m == false) {
|
||||||
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
|
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
|
||||||
@ -145,9 +145,9 @@ case 'rp' :
|
|||||||
wp_cache_delete($user->user_login, 'userlogins');
|
wp_cache_delete($user->user_login, 'userlogins');
|
||||||
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
|
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
|
||||||
$message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
|
$message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
|
||||||
$message .= get_settings('siteurl') . "/wp-login.php\r\n";
|
$message .= get_option('siteurl') . "/wp-login.php\r\n";
|
||||||
|
|
||||||
$m = wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_settings('blogname')), $message);
|
$m = wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_option('blogname')), $message);
|
||||||
|
|
||||||
if ($m == false) {
|
if ($m == false) {
|
||||||
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
|
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
|
||||||
@ -158,7 +158,7 @@ case 'rp' :
|
|||||||
echo "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
|
echo "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
|
||||||
// send a copy of password change notification to the admin
|
// send a copy of password change notification to the admin
|
||||||
$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
|
$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
|
||||||
wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_settings('blogname')), $message);
|
wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), get_option('blogname')), $message);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -195,7 +195,7 @@ default:
|
|||||||
|
|
||||||
// If the user can't edit posts, send them to their profile.
|
// If the user can't edit posts, send them to their profile.
|
||||||
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
|
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
|
||||||
$redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
|
$redirect_to = get_option('siteurl') . '/wp-admin/profile.php';
|
||||||
|
|
||||||
if ( wp_login($user_login, $user_pass, $using_cookie) ) {
|
if ( wp_login($user_login, $user_pass, $using_cookie) ) {
|
||||||
if ( !$using_cookie )
|
if ( !$using_cookie )
|
||||||
@ -246,7 +246,7 @@ if ( $error )
|
|||||||
</form>
|
</form>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">« <?php _e('Back to blog') ?></a></li>
|
<li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">« <?php _e('Back to blog') ?></a></li>
|
||||||
<?php if (get_settings('users_can_register')) : ?>
|
<?php if (get_option('users_can_register')) : ?>
|
||||||
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
|
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
|
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
|
||||||
|
10
wp-mail.php
10
wp-mail.php
@ -5,16 +5,16 @@ require_once(ABSPATH.WPINC.'/class-pop3.php');
|
|||||||
|
|
||||||
error_reporting(2037);
|
error_reporting(2037);
|
||||||
|
|
||||||
$time_difference = get_settings('gmt_offset') * 3600;
|
$time_difference = get_option('gmt_offset') * 3600;
|
||||||
|
|
||||||
$phone_delim = '::';
|
$phone_delim = '::';
|
||||||
|
|
||||||
$pop3 = new POP3();
|
$pop3 = new POP3();
|
||||||
|
|
||||||
if (!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port')))
|
if (!$pop3->connect(get_option('mailserver_url'), get_option('mailserver_port')))
|
||||||
wp_die($pop3->ERROR);
|
wp_die($pop3->ERROR);
|
||||||
|
|
||||||
$count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass'));
|
$count = $pop3->login(get_option('mailserver_login'), get_option('mailserver_pass'));
|
||||||
if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.'));
|
if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.'));
|
||||||
|
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ for ($i=1; $i <= $count; $i++) :
|
|||||||
}
|
}
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
$subject = trim(str_replace(get_settings('subjectprefix'), '', $subject));
|
$subject = trim(str_replace(get_option('subjectprefix'), '', $subject));
|
||||||
|
|
||||||
if ($content_type == 'multipart/alternative') {
|
if ($content_type == 'multipart/alternative') {
|
||||||
$content = explode('--'.$boundary, $content);
|
$content = explode('--'.$boundary, $content);
|
||||||
@ -126,7 +126,7 @@ for ($i=1; $i <= $count; $i++) :
|
|||||||
|
|
||||||
if ($post_title == '') $post_title = $subject;
|
if ($post_title == '') $post_title = $subject;
|
||||||
|
|
||||||
if (empty($post_categories)) $post_categories[] = get_settings('default_email_category');
|
if (empty($post_categories)) $post_categories[] = get_option('default_email_category');
|
||||||
|
|
||||||
$post_category = $post_categories;
|
$post_category = $post_categories;
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@ if (empty($wp)) {
|
|||||||
wp('feed=rdf');
|
wp('feed=rdf');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: application/rdf+xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||||
<rdf:RDF
|
<rdf:RDF
|
||||||
xmlns="http://purl.org/rss/1.0/"
|
xmlns="http://purl.org/rss/1.0/"
|
||||||
@ -45,10 +45,10 @@ $more = 1;
|
|||||||
<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
|
<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
|
||||||
<dc:creator><?php the_author() ?></dc:creator>
|
<dc:creator><?php the_author() ?></dc:creator>
|
||||||
<?php the_category_rss('rdf') ?>
|
<?php the_category_rss('rdf') ?>
|
||||||
<?php if (get_settings('rss_use_excerpt')) : ?>
|
<?php if (get_option('rss_use_excerpt')) : ?>
|
||||||
<description><?php the_excerpt_rss() ?></description>
|
<description><?php the_excerpt_rss() ?></description>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description>
|
<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>
|
||||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php do_action('rdf_item'); ?>
|
<?php do_action('rdf_item'); ?>
|
||||||
|
@ -3,7 +3,7 @@ require('./wp-config.php');
|
|||||||
require_once( ABSPATH . WPINC . '/registration.php');
|
require_once( ABSPATH . WPINC . '/registration.php');
|
||||||
|
|
||||||
$action = $_REQUEST['action'];
|
$action = $_REQUEST['action'];
|
||||||
if ( !get_settings('users_can_register') )
|
if ( !get_option('users_can_register') )
|
||||||
$action = 'disabled';
|
$action = 'disabled';
|
||||||
|
|
||||||
header( 'Content-Type: ' . get_bloginfo('html_type') . '; charset=' . get_bloginfo('charset') );
|
header( 'Content-Type: ' . get_bloginfo('html_type') . '; charset=' . get_bloginfo('charset') );
|
||||||
@ -44,7 +44,7 @@ case 'register':
|
|||||||
|
|
||||||
$user_id = wp_create_user( $user_login, $password, $user_email );
|
$user_id = wp_create_user( $user_login, $password, $user_email );
|
||||||
if ( !$user_id )
|
if ( !$user_id )
|
||||||
$errors['user_id'] = sprintf(__('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_settings('admin_email'));
|
$errors['user_id'] = sprintf(__('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email'));
|
||||||
else
|
else
|
||||||
wp_new_user_notification($user_id, $password);
|
wp_new_user_notification($user_id, $password);
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ case 'register':
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress » <?php _e('Registration Complete') ?></title>
|
<title>WordPress » <?php _e('Registration Complete') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.submit {
|
.submit {
|
||||||
@ -87,7 +87,7 @@ default:
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress » <?php _e('Registration Form') ?></title>
|
<title>WordPress » <?php _e('Registration Form') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#user_email, #user_login, #submit {
|
#user_email, #user_login, #submit {
|
||||||
@ -136,7 +136,7 @@ case 'disabled':
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress » <?php _e('Registration Currently Disabled') ?></title>
|
<title>WordPress » <?php _e('Registration Currently Disabled') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
|
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ case 'disabled':
|
|||||||
<div id="login">
|
<div id="login">
|
||||||
<h2><?php _e('Registration Disabled') ?></h2>
|
<h2><?php _e('Registration Disabled') ?></h2>
|
||||||
<p><?php _e('User registration is currently not allowed.') ?><br />
|
<p><?php _e('User registration is currently not allowed.') ?><br />
|
||||||
<a href="<?php echo get_settings('home'); ?>/" title="<?php _e('Go back to the blog') ?>"><?php _e('Home') ?></a>
|
<a href="<?php echo get_option('home'); ?>/" title="<?php _e('Go back to the blog') ?>"><?php _e('Home') ?></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
10
wp-rss.php
10
wp-rss.php
@ -5,11 +5,11 @@ if (empty($wp)) {
|
|||||||
wp('feed=rss');
|
wp('feed=rss');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||||
<rss version="0.92">
|
<rss version="0.92">
|
||||||
<channel>
|
<channel>
|
||||||
@ -24,14 +24,14 @@ $more = 1;
|
|||||||
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
|
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
|
||||||
<item>
|
<item>
|
||||||
<title><?php the_title_rss() ?></title>
|
<title><?php the_title_rss() ?></title>
|
||||||
<?php if (get_settings('rss_use_excerpt')) { ?>
|
<?php if (get_option('rss_use_excerpt')) { ?>
|
||||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
||||||
<?php } else { // use content ?>
|
<?php } else { // use content ?>
|
||||||
<description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length')) ?></description>
|
<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length')) ?></description>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<link><?php permalink_single_rss() ?></link>
|
<link><?php permalink_single_rss() ?></link>
|
||||||
<?php do_action('rss_item'); ?>
|
<?php do_action('rss_item'); ?>
|
||||||
</item>
|
</item>
|
||||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
<?php $items_count++; if (($items_count == get_option('posts_per_rss')) && empty($m)) { break; } } } ?>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
@ -5,11 +5,11 @@ if (empty($wp)) {
|
|||||||
wp('feed=rss2');
|
wp('feed=rss2');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
|
|
||||||
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
|
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
@ -37,7 +37,7 @@ $more = 1;
|
|||||||
<?php the_category_rss() ?>
|
<?php the_category_rss() ?>
|
||||||
|
|
||||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||||
<?php if (get_settings('rss_use_excerpt')) : ?>
|
<?php if (get_option('rss_use_excerpt')) : ?>
|
||||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
||||||
@ -51,6 +51,6 @@ $more = 1;
|
|||||||
<?php rss_enclosure(); ?>
|
<?php rss_enclosure(); ?>
|
||||||
<?php do_action('rss2_item'); ?>
|
<?php do_action('rss2_item'); ?>
|
||||||
</item>
|
</item>
|
||||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && !is_date()) { break; } } } ?>
|
<?php $items_count++; if (($items_count == get_option('posts_per_rss')) && !is_date()) { break; } } } ?>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
@ -141,7 +141,7 @@ require (ABSPATH . WPINC . '/script-loader.php');
|
|||||||
|
|
||||||
if (!strstr($_SERVER['PHP_SELF'], 'install.php')) :
|
if (!strstr($_SERVER['PHP_SELF'], 'install.php')) :
|
||||||
// Used to guarantee unique hash cookies
|
// Used to guarantee unique hash cookies
|
||||||
$cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
|
$cookiehash = md5(get_option('siteurl')); // Remove in 1.4
|
||||||
define('COOKIEHASH', $cookiehash);
|
define('COOKIEHASH', $cookiehash);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
@ -150,22 +150,22 @@ if ( !defined('USER_COOKIE') )
|
|||||||
if ( !defined('PASS_COOKIE') )
|
if ( !defined('PASS_COOKIE') )
|
||||||
define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
|
define('PASS_COOKIE', 'wordpresspass_'. COOKIEHASH);
|
||||||
if ( !defined('COOKIEPATH') )
|
if ( !defined('COOKIEPATH') )
|
||||||
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) );
|
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
|
||||||
if ( !defined('SITECOOKIEPATH') )
|
if ( !defined('SITECOOKIEPATH') )
|
||||||
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('siteurl') . '/' ) );
|
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
|
||||||
if ( !defined('COOKIE_DOMAIN') )
|
if ( !defined('COOKIE_DOMAIN') )
|
||||||
define('COOKIE_DOMAIN', false);
|
define('COOKIE_DOMAIN', false);
|
||||||
|
|
||||||
require (ABSPATH . WPINC . '/vars.php');
|
require (ABSPATH . WPINC . '/vars.php');
|
||||||
|
|
||||||
// Check for hacks file if the option is enabled
|
// Check for hacks file if the option is enabled
|
||||||
if (get_settings('hack_file')) {
|
if (get_option('hack_file')) {
|
||||||
if (file_exists(ABSPATH . '/my-hacks.php'))
|
if (file_exists(ABSPATH . '/my-hacks.php'))
|
||||||
require(ABSPATH . '/my-hacks.php');
|
require(ABSPATH . '/my-hacks.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_settings('active_plugins') ) {
|
if ( get_option('active_plugins') ) {
|
||||||
$current_plugins = get_settings('active_plugins');
|
$current_plugins = get_option('active_plugins');
|
||||||
if ( is_array($current_plugins) ) {
|
if ( is_array($current_plugins) ) {
|
||||||
foreach ($current_plugins as $plugin) {
|
foreach ($current_plugins as $plugin) {
|
||||||
if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))
|
if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))
|
||||||
|
@ -42,9 +42,9 @@ else
|
|||||||
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
|
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
|
||||||
|
|
||||||
if ( function_exists('mb_convert_encoding') ) { // For international trackbacks
|
if ( function_exists('mb_convert_encoding') ) { // For international trackbacks
|
||||||
$title = mb_convert_encoding($title, get_settings('blog_charset'), $charset);
|
$title = mb_convert_encoding($title, get_option('blog_charset'), $charset);
|
||||||
$excerpt = mb_convert_encoding($excerpt, get_settings('blog_charset'), $charset);
|
$excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset);
|
||||||
$blog_name = mb_convert_encoding($blog_name, get_settings('blog_charset'), $charset);
|
$blog_name = mb_convert_encoding($blog_name, get_option('blog_charset'), $charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_single() || is_page() )
|
if ( is_single() || is_page() )
|
||||||
@ -70,8 +70,8 @@ if ( !empty($tb_url) && !empty($title) && !empty($tb_url) ) {
|
|||||||
$title = wp_specialchars( strip_tags( $title ) );
|
$title = wp_specialchars( strip_tags( $title ) );
|
||||||
$excerpt = strip_tags($excerpt);
|
$excerpt = strip_tags($excerpt);
|
||||||
if ( function_exists('mb_strcut') ) { // For international trackbacks
|
if ( function_exists('mb_strcut') ) { // For international trackbacks
|
||||||
$excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...';
|
$excerpt = mb_strcut($excerpt, 0, 252, get_option('blog_charset')) . '...';
|
||||||
$title = mb_strcut($title, 0, 250, get_settings('blog_charset')) . '...';
|
$title = mb_strcut($title, 0, 250, get_option('blog_charset')) . '...';
|
||||||
} else {
|
} else {
|
||||||
$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
|
$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
|
||||||
$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
|
$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
|
||||||
|
22
xmlrpc.php
22
xmlrpc.php
@ -12,10 +12,10 @@ if ( isset($HTTP_RAW_POST_DATA) )
|
|||||||
include('./wp-config.php');
|
include('./wp-config.php');
|
||||||
|
|
||||||
if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
|
if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
|
||||||
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
|
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
|
<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
|
||||||
<service>
|
<service>
|
||||||
<engineName>WordPress</engineName>
|
<engineName>WordPress</engineName>
|
||||||
@ -190,9 +190,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
|
|
||||||
$struct = array(
|
$struct = array(
|
||||||
'isAdmin' => $is_admin,
|
'isAdmin' => $is_admin,
|
||||||
'url' => get_settings('home') . '/',
|
'url' => get_option('home') . '/',
|
||||||
'blogid' => '1',
|
'blogid' => '1',
|
||||||
'blogName' => get_settings('blogname')
|
'blogName' => get_option('blogname')
|
||||||
);
|
);
|
||||||
|
|
||||||
return array($struct);
|
return array($struct);
|
||||||
@ -329,7 +329,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* warning: here we make the assumption that the weblog's URL is on the same server */
|
/* warning: here we make the assumption that the weblog's URL is on the same server */
|
||||||
$filename = get_settings('home') . '/';
|
$filename = get_option('home') . '/';
|
||||||
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||||
|
|
||||||
$f = fopen($filename, 'r');
|
$f = fopen($filename, 'r');
|
||||||
@ -364,7 +364,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* warning: here we make the assumption that the weblog's URL is on the same server */
|
/* warning: here we make the assumption that the weblog's URL is on the same server */
|
||||||
$filename = get_settings('home') . '/';
|
$filename = get_option('home') . '/';
|
||||||
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
|
||||||
|
|
||||||
if ($f = fopen($filename, 'w+')) {
|
if ($f = fopen($filename, 'w+')) {
|
||||||
@ -544,11 +544,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
$post_more = $content_struct['mt_text_more'];
|
$post_more = $content_struct['mt_text_more'];
|
||||||
|
|
||||||
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
|
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
|
||||||
get_settings('default_comment_status')
|
get_option('default_comment_status')
|
||||||
: $content_struct['mt_allow_comments'];
|
: $content_struct['mt_allow_comments'];
|
||||||
|
|
||||||
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
|
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
|
||||||
get_settings('default_ping_status')
|
get_option('default_ping_status')
|
||||||
: $content_struct['mt_allow_pings'];
|
: $content_struct['mt_allow_pings'];
|
||||||
|
|
||||||
if ($post_more) {
|
if ($post_more) {
|
||||||
@ -641,11 +641,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
$to_ping = $content_struct['mt_tb_ping_urls'];
|
$to_ping = $content_struct['mt_tb_ping_urls'];
|
||||||
|
|
||||||
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
|
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
|
||||||
get_settings('default_comment_status')
|
get_option('default_comment_status')
|
||||||
: $content_struct['mt_allow_comments'];
|
: $content_struct['mt_allow_comments'];
|
||||||
|
|
||||||
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
|
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
|
||||||
get_settings('default_ping_status')
|
get_option('default_ping_status')
|
||||||
: $content_struct['mt_allow_pings'];
|
: $content_struct['mt_allow_pings'];
|
||||||
|
|
||||||
// Do some timestamp voodoo
|
// Do some timestamp voodoo
|
||||||
@ -1111,7 +1111,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
$error_code = -1;
|
$error_code = -1;
|
||||||
|
|
||||||
// Check if the page linked to is in our site
|
// Check if the page linked to is in our site
|
||||||
$pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_settings('home')));
|
$pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_option('home')));
|
||||||
if( !$pos1 )
|
if( !$pos1 )
|
||||||
return new IXR_Error(0, 'Is there no link to us?');
|
return new IXR_Error(0, 'Is there no link to us?');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user