mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Remove trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
642135072a
commit
04c9051a7d
@ -27,7 +27,7 @@ get_admin_page_title();
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress</title>
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css();
|
||||
?>
|
||||
|
@ -51,7 +51,7 @@ if ( !empty($content) ) {
|
||||
<head>
|
||||
<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css();
|
||||
?>
|
||||
|
@ -97,7 +97,7 @@ default:
|
||||
|
||||
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'admin-categories' );
|
||||
|
@ -50,7 +50,7 @@ td input { font-size: 1.5em; }
|
||||
margin-left: 0;
|
||||
font-size: 13px !important;
|
||||
-moz-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
color: #246;
|
||||
|
@ -29,7 +29,7 @@ form .submit input {
|
||||
border: none;
|
||||
margin-top: -6px;
|
||||
-moz-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ p#widget-search {
|
||||
|
||||
div#widget-content {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
ul#widget-list {
|
||||
list-style: none;
|
||||
|
@ -9,7 +9,7 @@ wp_enqueue_script('admin-forms');
|
||||
if ( !empty( $_REQUEST['delete_comments'] ) ) {
|
||||
check_admin_referer('bulk-comments');
|
||||
|
||||
$comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
|
||||
$comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
|
||||
foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each
|
||||
$comment = (int) $comment;
|
||||
$post_id = (int) $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment");
|
||||
@ -40,7 +40,7 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) {
|
||||
wp_redirect( $redirect_to );
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once('admin-header.php');
|
||||
|
@ -178,7 +178,7 @@ if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" />
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
|
@ -22,7 +22,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
$title = __('Link Categories');
|
||||
|
@ -153,7 +153,7 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" />
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
$title = __('Pages');
|
||||
@ -72,7 +72,7 @@ printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matchin
|
||||
<?php
|
||||
|
||||
$avail_post_stati = get_available_post_statuses('page');
|
||||
|
||||
|
||||
$status_links = array();
|
||||
$num_posts = wp_count_posts('page', 'readable');
|
||||
foreach ( $post_stati as $status => $label ) {
|
||||
@ -80,7 +80,7 @@ foreach ( $post_stati as $status => $label ) {
|
||||
|
||||
if ( !in_array($status, $avail_post_stati) )
|
||||
continue;
|
||||
|
||||
|
||||
if ( $status == $_GET['post_status'] )
|
||||
$class = ' class="current"';
|
||||
|
||||
|
@ -87,7 +87,7 @@ default:
|
||||
|
||||
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'admin-tags' );
|
||||
|
@ -28,7 +28,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
$title = __('Posts');
|
||||
@ -154,12 +154,12 @@ foreach ($arc_result as $arc_row) {
|
||||
if ( $arc_row->yyear == 0 )
|
||||
continue;
|
||||
$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
|
||||
|
||||
|
||||
if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
|
||||
$default = ' selected="selected"';
|
||||
else
|
||||
$default = '';
|
||||
|
||||
|
||||
echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
|
||||
echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
|
||||
echo "</option>\n";
|
||||
|
@ -14,7 +14,7 @@ class ftp_base {
|
||||
var $Verbose;
|
||||
var $OS_local;
|
||||
var $OS_remote;
|
||||
|
||||
|
||||
/* Private variables */
|
||||
var $_lastaction;
|
||||
var $_errors;
|
||||
@ -601,7 +601,7 @@ class ftp_base {
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function mget($remote, $local=".", $continious=false) {
|
||||
@ -649,13 +649,13 @@ class ftp_base {
|
||||
$this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
foreach($list as $k=>$v) {
|
||||
$list[$k]=$this->parselisting($v);
|
||||
if($list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
|
||||
}
|
||||
$ret=true;
|
||||
|
||||
|
||||
foreach($list as $el) {
|
||||
if ( empty($el) )
|
||||
continue;
|
||||
@ -673,7 +673,7 @@ class ftp_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!$this->rmdir($remote)) {
|
||||
$this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\"");
|
||||
$ret=false;
|
||||
@ -813,7 +813,7 @@ class ftp_base {
|
||||
$this->SendMSG($fctname.': '.$msg.$tmp);
|
||||
return(array_push($this->_error_array,$error));
|
||||
}
|
||||
|
||||
|
||||
// Rcupre une erreur externe
|
||||
function PopError(){
|
||||
if(count($this->_error_array)) return(array_pop($this->_error_array));
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
// ----- Constants
|
||||
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
|
||||
|
||||
|
||||
// ----- File list separator
|
||||
// In version 1.x of PclZip, the separator for file list is a space
|
||||
// (which is not a very smart choice, specifically for windows paths !).
|
||||
@ -126,7 +126,7 @@
|
||||
// which is not correctly supported by PHP ...
|
||||
//define( 'PCLZIP_OPT_CRYPT', 77018 );
|
||||
define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 );
|
||||
|
||||
|
||||
// ----- File description attributes
|
||||
define( 'PCLZIP_ATT_FILE_NAME', 79001 );
|
||||
define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 );
|
||||
@ -169,7 +169,7 @@
|
||||
// ----- Internal error handling
|
||||
var $error_code = 1;
|
||||
var $error_string = '';
|
||||
|
||||
|
||||
// ----- Current status of the magic_quotes_runtime
|
||||
// This value store the php configuration for magic_quotes
|
||||
// The class can then disable the magic_quotes and reset it after
|
||||
@ -315,16 +315,16 @@
|
||||
$v_att_list = array();
|
||||
$v_filedescr_list = array();
|
||||
$p_result_list = array();
|
||||
|
||||
|
||||
// ----- Look if the $p_filelist is really an array
|
||||
if (is_array($p_filelist)) {
|
||||
|
||||
|
||||
// ----- Look if the first element is also an array
|
||||
// This will mean that this is a file description entry
|
||||
if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
|
||||
$v_att_list = $p_filelist;
|
||||
}
|
||||
|
||||
|
||||
// ----- The list is a list of string names
|
||||
else {
|
||||
$v_string_list = $p_filelist;
|
||||
@ -343,7 +343,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ----- Reformat the string list
|
||||
if (sizeof($v_string_list) != 0) {
|
||||
foreach ($v_string_list as $v_string) {
|
||||
@ -355,7 +355,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- For each file in the list check the attributes
|
||||
$v_supported_attributes
|
||||
= array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
|
||||
@ -505,16 +505,16 @@
|
||||
$v_att_list = array();
|
||||
$v_filedescr_list = array();
|
||||
$p_result_list = array();
|
||||
|
||||
|
||||
// ----- Look if the $p_filelist is really an array
|
||||
if (is_array($p_filelist)) {
|
||||
|
||||
|
||||
// ----- Look if the first element is also an array
|
||||
// This will mean that this is a file description entry
|
||||
if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
|
||||
$v_att_list = $p_filelist;
|
||||
}
|
||||
|
||||
|
||||
// ----- The list is a list of string names
|
||||
else {
|
||||
$v_string_list = $p_filelist;
|
||||
@ -533,14 +533,14 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ----- Reformat the string list
|
||||
if (sizeof($v_string_list) != 0) {
|
||||
foreach ($v_string_list as $v_string) {
|
||||
$v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- For each file in the list check the attributes
|
||||
$v_supported_attributes
|
||||
= array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
|
||||
@ -990,7 +990,7 @@
|
||||
// Options :
|
||||
// PCLZIP_OPT_BY_INDEX :
|
||||
// PCLZIP_OPT_BY_NAME :
|
||||
// PCLZIP_OPT_BY_EREG :
|
||||
// PCLZIP_OPT_BY_EREG :
|
||||
// PCLZIP_OPT_BY_PREG :
|
||||
// Return Values :
|
||||
// 0 on failure,
|
||||
@ -1065,7 +1065,7 @@
|
||||
function deleteByIndex($p_index)
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
|
||||
|
||||
|
||||
$p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
|
||||
|
||||
// ----- Return
|
||||
@ -1119,7 +1119,7 @@
|
||||
if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
|
||||
{
|
||||
$this->privSwapBackMagicQuotes();
|
||||
|
||||
|
||||
// ----- Error log
|
||||
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
|
||||
|
||||
@ -1448,7 +1448,7 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- Read the options
|
||||
$i=0;
|
||||
while ($i<$p_size) {
|
||||
@ -1645,7 +1645,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
|
||||
return PclZip::errorCode();
|
||||
}
|
||||
|
||||
|
||||
// ----- Reduce the index list
|
||||
// each index item in the list must be a couple with a start and
|
||||
// an end value : [0,3], [5-5], [8-10], ...
|
||||
@ -1656,10 +1656,10 @@
|
||||
// ----- Explode the item
|
||||
$v_item_list = explode("-", $v_work_list[$j]);
|
||||
$v_size_item_list = sizeof($v_item_list);
|
||||
|
||||
|
||||
// ----- TBC : Here we might check that each item is a
|
||||
// real integer ...
|
||||
|
||||
|
||||
// ----- Look for single value
|
||||
if ($v_size_item_list == 1) {
|
||||
// ----- Set the option value
|
||||
@ -1697,7 +1697,7 @@
|
||||
}
|
||||
$v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
|
||||
}
|
||||
|
||||
|
||||
// ----- Sort the items
|
||||
if ($v_sort_flag) {
|
||||
// TBC : To Be Completed
|
||||
@ -1829,10 +1829,10 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", "");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- For each file in the list check the attributes
|
||||
foreach ($p_file_list as $v_key => $v_value) {
|
||||
|
||||
|
||||
// ----- Check if the option is supported
|
||||
if (!isset($v_requested_options[$v_key])) {
|
||||
// ----- Error log
|
||||
@ -1854,7 +1854,7 @@
|
||||
|
||||
$p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
|
||||
|
||||
|
||||
if ($p_filedescr['filename'] == '') {
|
||||
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
|
||||
@ -1922,10 +1922,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// end foreach
|
||||
}
|
||||
|
||||
|
||||
// ----- Return
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
@ -1944,21 +1944,21 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", "");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- Create a result list
|
||||
$v_result_list = array();
|
||||
|
||||
|
||||
// ----- Look each entry
|
||||
for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
|
||||
// ----- Get filedescr
|
||||
$v_descr = $p_filedescr_list[$i];
|
||||
|
||||
|
||||
// ----- Reduce the filename
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr before reduction :'".$v_descr['filename']."'");
|
||||
$v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename']);
|
||||
$v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr after reduction :'".$v_descr['filename']."'");
|
||||
|
||||
|
||||
// ----- Get type of descr
|
||||
if (!file_exists($v_descr['filename'])) {
|
||||
// ----- Error log
|
||||
@ -1987,13 +1987,13 @@
|
||||
// skip
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// ----- Calculate the stored filename
|
||||
$this->privCalculateStoredFilename($v_descr, $p_options);
|
||||
|
||||
|
||||
// ----- Add the descriptor in result list
|
||||
$v_result_list[sizeof($v_result_list)] = $v_descr;
|
||||
|
||||
|
||||
// ----- Look for folder
|
||||
if ($v_descr['type'] == 'folder') {
|
||||
// ----- List of items in folder
|
||||
@ -2007,17 +2007,17 @@
|
||||
if (($v_item_handler == '.') || ($v_item_handler == '..')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// ----- Compose the full filename
|
||||
$v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
|
||||
|
||||
|
||||
// ----- Look for different stored filename
|
||||
// Because the name of the folder was changed, the name of the
|
||||
// files/sub-folders also change
|
||||
if ($v_descr['stored_filename'] != $v_descr['filename']) {
|
||||
$v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler;
|
||||
}
|
||||
|
||||
|
||||
$v_dirlist_nb++;
|
||||
}
|
||||
}
|
||||
@ -2025,7 +2025,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped.");
|
||||
// TBC : unable to open folder in read mode
|
||||
}
|
||||
|
||||
|
||||
// ----- Expand each element of the list
|
||||
if ($v_dirlist_nb != 0) {
|
||||
// ----- Expand
|
||||
@ -2033,7 +2033,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
}
|
||||
|
||||
|
||||
// ----- Concat the resulting list
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')");
|
||||
$v_result_list = array_merge($v_result_list, $v_dirlist_descr);
|
||||
@ -2042,12 +2042,12 @@
|
||||
else {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand.");
|
||||
}
|
||||
|
||||
|
||||
// ----- Free local array
|
||||
unset($v_dirlist_descr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- Get the result list
|
||||
$p_filedescr_list = $v_result_list;
|
||||
|
||||
@ -2068,7 +2068,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list");
|
||||
$v_result=1;
|
||||
$v_list_detail = array();
|
||||
|
||||
|
||||
// ----- Magic quotes trick
|
||||
$this->privDisableMagicQuotes();
|
||||
|
||||
@ -2429,7 +2429,7 @@
|
||||
// Function : privAddFileList()
|
||||
// Description :
|
||||
// Parameters :
|
||||
// $p_filedescr_list : An array containing the file description
|
||||
// $p_filedescr_list : An array containing the file description
|
||||
// or directory names to add in the zip
|
||||
// $p_result_list : list of added files with their properties (specially the status field)
|
||||
// Return Values :
|
||||
@ -2449,7 +2449,7 @@
|
||||
// ----- Format the filename
|
||||
$p_filedescr_list[$j]['filename']
|
||||
= PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
|
||||
|
||||
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'");
|
||||
|
||||
// ----- Skip empty file names
|
||||
@ -2503,7 +2503,7 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- Working variable
|
||||
$p_filename = $p_filedescr['filename'];
|
||||
|
||||
@ -2516,8 +2516,8 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
|
||||
return PclZip::errorCode();
|
||||
}
|
||||
|
||||
// ----- Look for a stored different filename
|
||||
|
||||
// ----- Look for a stored different filename
|
||||
if (isset($p_filedescr['stored_filename'])) {
|
||||
$v_stored_filename = $p_filedescr['stored_filename'];
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"');
|
||||
@ -2583,7 +2583,7 @@
|
||||
if ($p_header['stored_filename'] == "") {
|
||||
$p_header['status'] = "filtered";
|
||||
}
|
||||
|
||||
|
||||
// ----- Check the path length
|
||||
if (strlen($p_header['stored_filename']) > 0xFF) {
|
||||
$p_header['status'] = 'filename_too_long';
|
||||
@ -2630,13 +2630,13 @@
|
||||
$p_header['compressed_size'] = strlen($v_content_compressed);
|
||||
$p_header['compression'] = 8;
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for encryption
|
||||
/*
|
||||
if ((isset($p_options[PCLZIP_OPT_CRYPT]))
|
||||
&& ($p_options[PCLZIP_OPT_CRYPT] != "")) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ....");
|
||||
|
||||
|
||||
// Should be a random header
|
||||
$v_header = 'xxxxxxxxxxxx';
|
||||
$v_content_compressed = PclZipUtilZipEncrypt($v_content_compressed,
|
||||
@ -2644,10 +2644,10 @@
|
||||
$v_header,
|
||||
$p_header['crc'],
|
||||
"test");
|
||||
|
||||
|
||||
$p_header['compressed_size'] += 12;
|
||||
$p_header['flag'] = 1;
|
||||
|
||||
|
||||
// ----- Add the header to the data
|
||||
$v_content_compressed = $v_header.$v_content_compressed;
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size after header : ".strlen($v_content_compressed)."");
|
||||
@ -2662,9 +2662,9 @@
|
||||
}
|
||||
|
||||
// ----- Write the compressed (or not) content
|
||||
@fwrite($this->zip_fd,
|
||||
@fwrite($this->zip_fd,
|
||||
$v_content_compressed, $p_header['compressed_size']);
|
||||
|
||||
|
||||
// ----- Close the file
|
||||
@fclose($v_file);
|
||||
}
|
||||
@ -2730,7 +2730,7 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- Working variables
|
||||
$p_filename = $p_filedescr['filename'];
|
||||
if (isset($p_options[PCLZIP_OPT_ADD_PATH])) {
|
||||
@ -2757,7 +2757,7 @@
|
||||
$v_stored_filename = $p_filedescr['new_full_name'];
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'");
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for path and/or short name change
|
||||
else {
|
||||
|
||||
@ -2788,7 +2788,7 @@
|
||||
|
||||
if ( (substr($p_filename, 0, 2) == "./")
|
||||
|| (substr($p_remove_dir, 0, 2) == "./")) {
|
||||
|
||||
|
||||
if ( (substr($p_filename, 0, 2) == "./")
|
||||
&& (substr($p_remove_dir, 0, 2) != "./")) {
|
||||
$p_remove_dir = "./".$p_remove_dir;
|
||||
@ -2828,7 +2828,7 @@
|
||||
$v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
|
||||
$p_filedescr['stored_filename'] = $v_stored_filename;
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename']));
|
||||
|
||||
|
||||
// ----- Return
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
@ -2991,7 +2991,7 @@
|
||||
{
|
||||
// ----- Magic quotes trick
|
||||
$this->privSwapBackMagicQuotes();
|
||||
|
||||
|
||||
// ----- Error log
|
||||
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
|
||||
|
||||
@ -3270,7 +3270,7 @@
|
||||
else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
|
||||
&& ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
|
||||
|
||||
|
||||
// ----- Look if the index is in the list
|
||||
for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
|
||||
@ -3310,7 +3310,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
|
||||
|
||||
$this->privSwapBackMagicQuotes();
|
||||
|
||||
|
||||
PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
|
||||
"Filename '".$v_header['stored_filename']."' is "
|
||||
."compressed by an unsupported compression "
|
||||
@ -3320,7 +3320,7 @@
|
||||
return PclZip::errorCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- Check encrypted files
|
||||
if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption");
|
||||
@ -3357,7 +3357,7 @@
|
||||
|
||||
$v_extract = false;
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for real extraction
|
||||
if ($v_extract)
|
||||
{
|
||||
@ -3411,7 +3411,7 @@
|
||||
|
||||
// ----- Next extracted file
|
||||
$v_nb_extracted++;
|
||||
|
||||
|
||||
// ----- Look for user callback abort
|
||||
if ($v_result1 == 2) {
|
||||
break;
|
||||
@ -3563,13 +3563,13 @@
|
||||
if ($p_path != '') {
|
||||
$p_entry['filename'] = $p_path."/".$p_entry['filename'];
|
||||
}
|
||||
|
||||
|
||||
// ----- Check a base_dir_restriction
|
||||
if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction");
|
||||
$v_inclusion
|
||||
= PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
|
||||
$p_entry['filename']);
|
||||
$p_entry['filename']);
|
||||
if ($v_inclusion == 0) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction");
|
||||
|
||||
@ -3599,7 +3599,7 @@
|
||||
$p_entry['status'] = "skipped";
|
||||
$v_result = 1;
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for abort result
|
||||
if ($v_result == 2) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
|
||||
@ -3631,7 +3631,7 @@
|
||||
|
||||
// ----- Change the file status
|
||||
$p_entry['status'] = "already_a_directory";
|
||||
|
||||
|
||||
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
|
||||
// For historical reason first PclZip implementation does not stop
|
||||
// when this kind of error occurs.
|
||||
@ -3764,7 +3764,7 @@
|
||||
$v_binary_data = pack('a'.$v_read_size, $v_buffer);
|
||||
@fwrite($v_dest_file, $v_binary_data, $v_read_size);
|
||||
*/
|
||||
@fwrite($v_dest_file, $v_buffer, $v_read_size);
|
||||
@fwrite($v_dest_file, $v_buffer, $v_read_size);
|
||||
$v_size -= $v_read_size;
|
||||
}
|
||||
|
||||
@ -3773,7 +3773,7 @@
|
||||
|
||||
// ----- Change the file mtime
|
||||
touch($p_entry['filename'], $p_entry['mtime']);
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
@ -3786,11 +3786,11 @@
|
||||
// ----- Read the encryption header
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes");
|
||||
$v_encryption_header = @fread($this->zip_fd, 12);
|
||||
|
||||
|
||||
// ----- Read the encrypted & compressed file in a buffer
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes");
|
||||
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12);
|
||||
|
||||
|
||||
// ----- Decrypt the buffer
|
||||
$this->privDecrypt($v_encryption_header, $v_buffer,
|
||||
$p_entry['compressed_size']-12, $p_entry['crc']);
|
||||
@ -3802,7 +3802,7 @@
|
||||
// ----- Read the compressed file in a buffer (one shot)
|
||||
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
|
||||
}
|
||||
|
||||
|
||||
// ----- Decompress the file
|
||||
$v_file_content = @gzinflate($v_buffer);
|
||||
unset($v_buffer);
|
||||
@ -3812,11 +3812,11 @@
|
||||
// ----- Change the file status
|
||||
// TBC
|
||||
$p_entry['status'] = "error";
|
||||
|
||||
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
}
|
||||
|
||||
|
||||
// ----- Opening destination file
|
||||
if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
|
||||
@ -3855,7 +3855,7 @@
|
||||
if ($p_entry['status'] == "aborted") {
|
||||
$p_entry['status'] = "skipped";
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for post-extract callback
|
||||
elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
|
||||
@ -3964,7 +3964,7 @@
|
||||
|
||||
// ----- Read the compressed file in a buffer (one shot)
|
||||
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
|
||||
|
||||
|
||||
// ----- Decompress the file
|
||||
$v_file_content = gzinflate($v_buffer);
|
||||
unset($v_buffer);
|
||||
@ -4053,7 +4053,7 @@
|
||||
|
||||
// ----- Reading the file
|
||||
$v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
|
||||
|
||||
|
||||
// ----- Decompress the file
|
||||
if (($p_string = @gzinflate($v_data)) === FALSE) {
|
||||
// TBC
|
||||
@ -4803,7 +4803,7 @@
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
}
|
||||
|
||||
|
||||
// ----- Check that local file header is same as central file header
|
||||
if ($this->privCheckFileHeaders($v_local_header,
|
||||
$v_header_list[$i]) != 1) {
|
||||
@ -4896,11 +4896,11 @@
|
||||
// TBC : I should test the result ...
|
||||
//@rename($v_zip_temp_name, $this->zipname);
|
||||
PclZipUtilRename($v_zip_temp_name, $this->zipname);
|
||||
|
||||
|
||||
// ----- Destroy the temporary archive
|
||||
unset($v_temp_zip);
|
||||
}
|
||||
|
||||
|
||||
// ----- Remove every files : reset the file
|
||||
else if ($v_central_dir['entries'] != 0) {
|
||||
$this->privCloseFd();
|
||||
@ -5315,13 +5315,13 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size."");
|
||||
$v_result=1;
|
||||
|
||||
|
||||
// ----- To Be Modified ;-)
|
||||
$v_pwd = "test";
|
||||
|
||||
|
||||
$p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header,
|
||||
$p_crc, $v_pwd);
|
||||
|
||||
|
||||
// ----- Return
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
return $v_result;
|
||||
@ -5471,7 +5471,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- Look for skip
|
||||
if ($v_skip > 0) {
|
||||
while ($v_skip > 0) {
|
||||
@ -5506,7 +5506,7 @@
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
|
||||
$v_result = 1;
|
||||
|
||||
|
||||
// ----- Look for path beginning by ./
|
||||
if ( ($p_dir == '.')
|
||||
|| ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {
|
||||
@ -5697,7 +5697,7 @@
|
||||
function PclZipUtilOptionText($p_option)
|
||||
{
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
|
||||
|
||||
|
||||
$v_list = get_defined_constants();
|
||||
for (reset($v_list); $v_key = key($v_list); next($v_list)) {
|
||||
$v_prefix = substr($v_key, 0, 10);
|
||||
@ -5709,7 +5709,7 @@
|
||||
return $v_key;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$v_result = 'Unknown';
|
||||
|
||||
//--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
|
||||
|
@ -87,7 +87,7 @@ class WP_Filesystem_Direct{
|
||||
return false;
|
||||
if( !function_exists('posix_getpwuid') )
|
||||
return $owneruid;
|
||||
$ownerarray=posix_getpwuid($owneruid);
|
||||
$ownerarray=posix_getpwuid($owneruid);
|
||||
return $ownerarray['name'];
|
||||
}
|
||||
function getchmod($file){
|
||||
@ -121,21 +121,21 @@ class WP_Filesystem_Direct{
|
||||
// Unknown
|
||||
$info = 'u';
|
||||
}
|
||||
|
||||
|
||||
// Owner
|
||||
$info .= (($perms & 0x0100) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0080) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0040) ?
|
||||
(($perms & 0x0800) ? 's' : 'x' ) :
|
||||
(($perms & 0x0800) ? 'S' : '-'));
|
||||
|
||||
|
||||
// Group
|
||||
$info .= (($perms & 0x0020) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0010) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0008) ?
|
||||
(($perms & 0x0400) ? 's' : 'x' ) :
|
||||
(($perms & 0x0400) ? 'S' : '-'));
|
||||
|
||||
|
||||
// World
|
||||
$info .= (($perms & 0x0004) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0002) ? 'w' : '-');
|
||||
@ -168,10 +168,10 @@ class WP_Filesystem_Direct{
|
||||
return false;
|
||||
if( !function_exists('posix_getgrgid') )
|
||||
return $gid;
|
||||
$grouparray=posix_getgrgid($gid);
|
||||
$grouparray=posix_getgrgid($gid);
|
||||
return $grouparray['name'];
|
||||
}
|
||||
|
||||
|
||||
function copy($source,$destination,$overwrite=false){
|
||||
if( $overwrite && $this->exists($destination) )
|
||||
return false;
|
||||
@ -210,7 +210,7 @@ class WP_Filesystem_Direct{
|
||||
return false;
|
||||
return $retval;
|
||||
}
|
||||
|
||||
|
||||
function exists($file){
|
||||
return @file_exists($file);
|
||||
}
|
||||
@ -230,7 +230,7 @@ class WP_Filesystem_Direct{
|
||||
function is_writable($file){
|
||||
return @is_writable($file);
|
||||
}
|
||||
|
||||
|
||||
function atime($file){
|
||||
return @fileatime($file);
|
||||
}
|
||||
@ -249,11 +249,11 @@ class WP_Filesystem_Direct{
|
||||
$atime = time();
|
||||
return @touch($file,$time,$atime);
|
||||
}
|
||||
|
||||
|
||||
function mkdir($path,$chmod=false,$chown=false,$chgrp=false){
|
||||
if( ! $chmod)
|
||||
$chmod = $this->permission;
|
||||
|
||||
|
||||
if( !@mkdir($path,$chmod) )
|
||||
return false;
|
||||
if( $chown )
|
||||
@ -275,7 +275,7 @@ class WP_Filesystem_Direct{
|
||||
}
|
||||
return @rmdir($path);
|
||||
}
|
||||
|
||||
|
||||
function dirlist($path,$incdot=false,$recursive=false){
|
||||
if( $this->is_file($path) ){
|
||||
$limitFile = basename($path);
|
||||
@ -291,12 +291,12 @@ class WP_Filesystem_Direct{
|
||||
while (false !== ($entry = $dir->read())) {
|
||||
$struc = array();
|
||||
$struc['name'] = $entry;
|
||||
|
||||
|
||||
if( '.' == $struc['name'][0] && !$incdot)
|
||||
continue;
|
||||
if( $limitFile && $struc['name'] != $limitFile)
|
||||
continue;
|
||||
|
||||
|
||||
$struc['perms'] = $this->gethchmod($path.'/'.$entry);
|
||||
$struc['permsn'] = $this->getnumchmodfromh($struc['perms']);
|
||||
$struc['number'] = false;
|
||||
@ -309,7 +309,7 @@ class WP_Filesystem_Direct{
|
||||
$struc['type'] = $this->is_dir($path.'/'.$entry) ? 'd' : 'f';
|
||||
if ('d' == $struc['type'] ){
|
||||
$struc['files'] = array();
|
||||
|
||||
|
||||
if( $incdot ){
|
||||
//We're including the doted starts
|
||||
if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder
|
||||
|
@ -4,10 +4,10 @@ class WP_Filesystem_FTPext{
|
||||
var $timeout = 5;
|
||||
var $errors = array();
|
||||
var $options = array();
|
||||
|
||||
|
||||
var $wp_base = '';
|
||||
var $permission = null;
|
||||
|
||||
|
||||
var $filetypes = array(
|
||||
'php'=>FTP_ASCII,
|
||||
'css'=>FTP_ASCII,
|
||||
@ -16,13 +16,13 @@ class WP_Filesystem_FTPext{
|
||||
'html'=>FTP_ASCII,
|
||||
'htm'=>FTP_ASCII,
|
||||
'xml'=>FTP_ASCII,
|
||||
|
||||
|
||||
'jpg'=>FTP_BINARY,
|
||||
'png'=>FTP_BINARY,
|
||||
'gif'=>FTP_BINARY,
|
||||
'bmp'=>FTP_BINARY
|
||||
);
|
||||
|
||||
|
||||
function WP_Filesystem_FTPext($opt='') {
|
||||
$this->errors = new WP_Error();
|
||||
|
||||
@ -53,10 +53,10 @@ class WP_Filesystem_FTPext{
|
||||
$this->options['username'] = $opt['username'];
|
||||
|
||||
if ( empty ($opt['password']) )
|
||||
$this->errors->add('empty_password', __('FTP password is required'));
|
||||
$this->errors->add('empty_password', __('FTP password is required'));
|
||||
else
|
||||
$this->options['password'] = $opt['password'];
|
||||
|
||||
|
||||
$this->options['ssl'] = ( !empty($opt['ssl']) );
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ class WP_Filesystem_FTPext{
|
||||
if( empty( $base ) || '.' == $base ) $base = $this->cwd();
|
||||
if( empty( $base ) ) $base = '/';
|
||||
if( '/' != substr($base, -1) ) $base .= '/';
|
||||
|
||||
|
||||
if($echo) echo sprintf(__('Changing to %s'), $base) .'<br>';
|
||||
if( false === ftp_chdir($this->link, $base) )
|
||||
return false;
|
||||
@ -219,21 +219,21 @@ class WP_Filesystem_FTPext{
|
||||
// Unknown
|
||||
$info = 'u';
|
||||
}
|
||||
|
||||
|
||||
// Owner
|
||||
$info .= (($perms & 0x0100) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0080) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0040) ?
|
||||
(($perms & 0x0800) ? 's' : 'x' ) :
|
||||
(($perms & 0x0800) ? 'S' : '-'));
|
||||
|
||||
|
||||
// Group
|
||||
$info .= (($perms & 0x0020) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0010) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0008) ?
|
||||
(($perms & 0x0400) ? 's' : 'x' ) :
|
||||
(($perms & 0x0400) ? 'S' : '-'));
|
||||
|
||||
|
||||
// World
|
||||
$info .= (($perms & 0x0004) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0002) ? 'w' : '-');
|
||||
@ -338,11 +338,11 @@ class WP_Filesystem_FTPext{
|
||||
function rmdir($path,$recursive=false){
|
||||
if( ! $recursive )
|
||||
return ftp_rmdir($this->link, $file);
|
||||
|
||||
|
||||
//TODO: Recursive Directory delete, Have to delete files from the folder first.
|
||||
//$dir = $this->dirlist($path);
|
||||
//foreach($dir as $file)
|
||||
|
||||
|
||||
}
|
||||
|
||||
function parselisting($line) {
|
||||
@ -439,7 +439,7 @@ class WP_Filesystem_FTPext{
|
||||
|
||||
$ret = array();
|
||||
foreach ( $dirlist as $struc ) {
|
||||
|
||||
|
||||
if ( 'd' == $struc['type'] ) {
|
||||
$struc['files'] = array();
|
||||
|
||||
|
@ -4,10 +4,10 @@ class WP_Filesystem_ftpsockets{
|
||||
var $timeout = 5;
|
||||
var $errors;
|
||||
var $options = array();
|
||||
|
||||
|
||||
var $wp_base = '';
|
||||
var $permission = null;
|
||||
|
||||
|
||||
var $filetypes = array(
|
||||
'php'=>FTP_ASCII,
|
||||
'css'=>FTP_ASCII,
|
||||
@ -16,13 +16,13 @@ class WP_Filesystem_ftpsockets{
|
||||
'html'=>FTP_ASCII,
|
||||
'htm'=>FTP_ASCII,
|
||||
'xml'=>FTP_ASCII,
|
||||
|
||||
|
||||
'jpg'=>FTP_BINARY,
|
||||
'png'=>FTP_BINARY,
|
||||
'gif'=>FTP_BINARY,
|
||||
'bmp'=>FTP_BINARY
|
||||
);
|
||||
|
||||
|
||||
function WP_Filesystem_ftpsockets($opt='') {
|
||||
$this->errors = new WP_Error();
|
||||
|
||||
@ -52,7 +52,7 @@ class WP_Filesystem_ftpsockets{
|
||||
$this->options['username'] = $opt['username'];
|
||||
|
||||
if ( empty ($opt['password']) )
|
||||
$this->errors->add('empty_password', __('FTP password is required'));
|
||||
$this->errors->add('empty_password', __('FTP password is required'));
|
||||
else
|
||||
$this->options['password'] = $opt['password'];
|
||||
}
|
||||
@ -90,7 +90,7 @@ class WP_Filesystem_ftpsockets{
|
||||
if( empty( $base ) || '.' == $base ) $base = $this->cwd();
|
||||
if( empty( $base ) ) $base = '/';
|
||||
if( '/' != substr($base, -1) ) $base .= '/';
|
||||
|
||||
|
||||
if($echo) echo __('Changing to ') . $base .'<br>';
|
||||
if( false === $this->ftp->chdir($base) )
|
||||
return false;
|
||||
@ -157,7 +157,7 @@ class WP_Filesystem_ftpsockets{
|
||||
$type = isset($this->filetypes[ $extension ]) ? $this->filetypes[ $extension ] : FTP_ASCII;
|
||||
}
|
||||
$this->ftp->SetType($type);
|
||||
|
||||
|
||||
$temp = tmpfile();
|
||||
fwrite($temp,$contents);
|
||||
fseek($temp, 0); //Skip back to the start of the file being written to
|
||||
@ -173,7 +173,7 @@ class WP_Filesystem_ftpsockets{
|
||||
function chgrp($file,$group,$recursive=false){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function chmod($file,$mode=false,$recursive=false){
|
||||
if( ! $mode )
|
||||
$mode = $this->permission;
|
||||
@ -191,16 +191,16 @@ class WP_Filesystem_ftpsockets{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function chown($file,$owner,$recursive=false){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function owner($file){
|
||||
$dir = $this->dirlist($file);
|
||||
return $dir[$file]['owner'];
|
||||
}
|
||||
|
||||
|
||||
function getchmod($file){
|
||||
$dir = $this->dirlist($file);
|
||||
return $dir[$file]['permsn'];
|
||||
@ -234,21 +234,21 @@ class WP_Filesystem_ftpsockets{
|
||||
// Unknown
|
||||
$info = 'u';
|
||||
}
|
||||
|
||||
|
||||
// Owner
|
||||
$info .= (($perms & 0x0100) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0080) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0040) ?
|
||||
(($perms & 0x0800) ? 's' : 'x' ) :
|
||||
(($perms & 0x0800) ? 'S' : '-'));
|
||||
|
||||
|
||||
// Group
|
||||
$info .= (($perms & 0x0020) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0010) ? 'w' : '-');
|
||||
$info .= (($perms & 0x0008) ?
|
||||
(($perms & 0x0400) ? 's' : 'x' ) :
|
||||
(($perms & 0x0400) ? 'S' : '-'));
|
||||
|
||||
|
||||
// World
|
||||
$info .= (($perms & 0x0004) ? 'r' : '-');
|
||||
$info .= (($perms & 0x0002) ? 'w' : '-');
|
||||
@ -385,7 +385,7 @@ class WP_Filesystem_ftpsockets{
|
||||
|
||||
$ret = array();
|
||||
foreach ( $list as $struc ) {
|
||||
|
||||
|
||||
if ( 'd' == $struc['type'] ) {
|
||||
$struc['files'] = array();
|
||||
|
||||
|
@ -80,7 +80,7 @@ function floated_admin_avatar( $name ) {
|
||||
return "$avatar $name";
|
||||
}
|
||||
|
||||
if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) {
|
||||
if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) {
|
||||
if ( get_option('show_avatars') )
|
||||
add_filter( 'comment_author', 'floated_admin_avatar' );
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ function wp_dashboard_setup() {
|
||||
$wp_dashboard_empty_callback (only needed if using 'wp_dashboard_empty' as your $output_callback),
|
||||
$arg, $arg, $arg... (further args passed to callbacks)
|
||||
);
|
||||
|
||||
|
||||
// optional: if you want users to be able to edit the settings of your widget, you need to register a widget_control
|
||||
wp_register_widget_control( $widget_id, $widget_control_title, $control_output_callback,
|
||||
array(), // leave an empty array here: oddity in widget code
|
||||
@ -316,17 +316,17 @@ function wp_dashboard_incoming_links_output() {
|
||||
$content = '';
|
||||
$date = '';
|
||||
$link = clean_url( strip_tags( $item['link'] ) );
|
||||
|
||||
|
||||
if ( isset( $item['author_uri'] ) )
|
||||
$site_link = clean_url( strip_tags( $item['author_uri'] ) );
|
||||
|
||||
|
||||
if ( !$publisher = wp_specialchars( strip_tags( isset($item['dc']['publisher']) ? $item['dc']['publisher'] : $item['author_name'] ) ) )
|
||||
$publisher = __( 'Somebody' );
|
||||
if ( $site_link )
|
||||
$publisher = "<a href='$site_link'>$publisher</a>";
|
||||
else
|
||||
$publisher = "<strong>$publisher</strong>";
|
||||
|
||||
|
||||
if ( isset($item['description']) )
|
||||
$content = $item['description'];
|
||||
elseif ( isset($item['summary']) )
|
||||
@ -343,7 +343,7 @@ function wp_dashboard_incoming_links_output() {
|
||||
$text = _c( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"|feed_display' );
|
||||
else
|
||||
$text = _c( '%1$s linked here saying, "%3$s"|feed_display' );
|
||||
|
||||
|
||||
if ( $show_date ) {
|
||||
if ( $show_author || $show_summary )
|
||||
$text .= _c( ' on %4$s|feed_display' );
|
||||
@ -351,7 +351,7 @@ function wp_dashboard_incoming_links_output() {
|
||||
$date = strtotime( $date );
|
||||
$date = gmdate( get_option( 'date_format' ), $date );
|
||||
}
|
||||
|
||||
|
||||
echo "\t<li>" . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "</li>\n";
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ function download_url( $url ) {
|
||||
require_once( ABSPATH . 'wp-includes/class-snoopy.php' );
|
||||
$snoopy = new Snoopy();
|
||||
$snoopy->fetch($url);
|
||||
|
||||
|
||||
fwrite($handle, $snoopy->results);
|
||||
fclose($handle);
|
||||
|
||||
@ -219,7 +219,7 @@ function unzip_file($file, $to) {
|
||||
|
||||
if ( ! $wp_filesystem || !is_object($wp_filesystem) )
|
||||
return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
|
||||
|
||||
|
||||
$fs =& $wp_filesystem;
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
|
||||
|
@ -126,7 +126,7 @@ function wp_iframe($content_func /* ... */) {
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — WordPress</title>
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css();
|
||||
?>
|
||||
@ -386,7 +386,7 @@ function media_upload_file() {
|
||||
function media_upload_gallery() {
|
||||
if ( !empty($_POST) ) {
|
||||
$return = media_upload_form_handler();
|
||||
|
||||
|
||||
if ( is_string($return) )
|
||||
return $return;
|
||||
if ( is_array($return) )
|
||||
@ -399,7 +399,7 @@ function media_upload_gallery() {
|
||||
function media_upload_library() {
|
||||
if ( !empty($_POST) ) {
|
||||
$return = media_upload_form_handler();
|
||||
|
||||
|
||||
if ( is_string($return) )
|
||||
return $return;
|
||||
if ( is_array($return) )
|
||||
|
@ -644,7 +644,7 @@ function wp_set_post_lock( $post_id ) {
|
||||
return false;
|
||||
if ( !$current_user || !$current_user->ID )
|
||||
return false;
|
||||
|
||||
|
||||
$now = time();
|
||||
|
||||
if ( !add_post_meta( $post->ID, '_edit_lock', $now, true ) )
|
||||
|
@ -347,8 +347,8 @@ function display_page_row( $page, &$children_pages, $level = 0 ) {
|
||||
$posts_columns = wp_manage_pages_columns();
|
||||
?>
|
||||
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($posts_columns as $column_name=>$column_display_name) {
|
||||
@ -451,7 +451,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@ -570,7 +570,7 @@ function _wp_get_comment_list( $status = '', $s = false, $start, $num ) {
|
||||
$approved = "comment_approved = 'spam'";
|
||||
else
|
||||
$approved = "comment_approved != 'spam'";
|
||||
|
||||
|
||||
if ( $s ) {
|
||||
$s = $wpdb->escape($s);
|
||||
$comments = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE
|
||||
@ -615,7 +615,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
||||
$delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
|
||||
$approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );
|
||||
$spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
|
||||
|
||||
|
||||
?>
|
||||
<tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'>
|
||||
<?php if ( $checkbox ) : ?>
|
||||
|
@ -137,7 +137,7 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||
if ( ! is_object($wp_filesystem) )
|
||||
return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
|
||||
|
||||
if ( $wp_filesystem->errors->get_error_code() )
|
||||
if ( $wp_filesystem->errors->get_error_code() )
|
||||
return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors);
|
||||
|
||||
// Get the URL to the zip file
|
||||
@ -172,7 +172,7 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||
|
||||
// Once installed, delete the package
|
||||
unlink($file);
|
||||
|
||||
|
||||
// Remove the existing plugin.
|
||||
apply_filters('update_feedback', __("Removing the old version of the plugin"));
|
||||
$plugin_dir = dirname(ABSPATH . PLUGINDIR . "/$plugin");
|
||||
|
@ -327,7 +327,7 @@ class WP_User_Search {
|
||||
$search_sql .= implode(' OR ', $searches);
|
||||
$search_sql .= ')';
|
||||
}
|
||||
|
||||
|
||||
$this->query_from_where = "FROM $wpdb->users";
|
||||
if ( $this->role )
|
||||
$this->query_from_where .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id WHERE $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE '%$this->role%'";
|
||||
|
@ -1,6 +1,6 @@
|
||||
addLoadEvent( function() {
|
||||
// pulse
|
||||
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
||||
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
||||
|
||||
// Reveal
|
||||
jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
|
||||
|
@ -5,17 +5,17 @@ wpEditorInit = function() {
|
||||
tinyMCE.execCommand("mceAddControl", true, "content");
|
||||
} else {
|
||||
var H;
|
||||
if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
|
||||
if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
|
||||
document.getElementById('content').style.height = H.ch - 30 + 'px';
|
||||
}
|
||||
};
|
||||
|
||||
switchEditors = {
|
||||
|
||||
|
||||
saveCallback : function(el, content, body) {
|
||||
|
||||
|
||||
document.getElementById(el).style.color = '#fff';
|
||||
if ( tinyMCE.activeEditor.isHidden() )
|
||||
if ( tinyMCE.activeEditor.isHidden() )
|
||||
content = document.getElementById(el).value;
|
||||
else
|
||||
content = this.pre_wpautop(content);
|
||||
@ -44,12 +44,12 @@ switchEditors = {
|
||||
content = content.replace(new RegExp('\\s*<(('+blocklist+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
|
||||
content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');
|
||||
content = content.replace(new RegExp('<li>', 'g'), '\t<li>');
|
||||
|
||||
|
||||
if ( content.indexOf('<object') != -1 ) {
|
||||
content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'g'), "<param$1>"); // no pee inside object/embed
|
||||
content = content.replace(new RegExp('\\s*</embed>\\s*', 'g'), '</embed>');
|
||||
}
|
||||
|
||||
|
||||
// Unmark special paragraph closing tags
|
||||
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
|
||||
content = content.replace(new RegExp('\\s*(<p[^>]+>.*</p>)', 'mg'), '\n$1');
|
||||
@ -71,7 +71,7 @@ switchEditors = {
|
||||
|
||||
if ( ! ed || ed.isHidden() ) {
|
||||
ta.style.color = '#fff';
|
||||
|
||||
|
||||
this.edToggle(P, H);
|
||||
edCloseAllTags(); // :-(
|
||||
|
||||
@ -83,7 +83,7 @@ switchEditors = {
|
||||
|
||||
if ( ed ) ed.show();
|
||||
else tinyMCE.execCommand("mceAddControl", false, id);
|
||||
|
||||
|
||||
this.wpSetDefaultEditor( 'tinymce' );
|
||||
} else {
|
||||
this.edToggle(H, P);
|
||||
@ -93,7 +93,7 @@ switchEditors = {
|
||||
ed.hide();
|
||||
ta.value = this.pre_wpautop(ta.value);
|
||||
qt.style.display = 'block';
|
||||
|
||||
|
||||
if ( tinymce.isIE6 ) {
|
||||
ta.style.width = '98%';
|
||||
ec.style.padding = '0px';
|
||||
@ -102,7 +102,7 @@ switchEditors = {
|
||||
ta.style.width = '100%';
|
||||
ec.style.padding = '6px';
|
||||
}
|
||||
|
||||
|
||||
ta.style.color = '';
|
||||
|
||||
this.wpSetDefaultEditor( 'html' );
|
||||
@ -132,10 +132,10 @@ switchEditors = {
|
||||
|
||||
wpautop : function(pee) {
|
||||
var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]';
|
||||
|
||||
|
||||
pee = pee + "\n\n";
|
||||
pee = pee.replace(new RegExp('<br />\\s*<br />', 'gi'), "\n\n");
|
||||
pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
|
||||
pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
|
||||
pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n");
|
||||
pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n");
|
||||
pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n");
|
||||
@ -146,7 +146,7 @@ switchEditors = {
|
||||
pee = pee.replace(new RegExp('<p><blockquote([^>]*)>', 'gi'), "<blockquote$1><p>");
|
||||
pee = pee.replace(new RegExp('</blockquote></p>', 'gi'), '</p></blockquote>');
|
||||
pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)', 'gi'), "$1");
|
||||
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
|
||||
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
|
||||
pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n");
|
||||
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
|
||||
pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1');
|
||||
|
@ -13,8 +13,8 @@ function getNumChecked(form) {
|
||||
var num = 0;
|
||||
for (i = 0, n = form.elements.length; i < n; i++) {
|
||||
if (form.elements[i].type == "checkbox") {
|
||||
if (form.elements[i].checked == true)
|
||||
num++;
|
||||
if (form.elements[i].checked == true)
|
||||
num++;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
@ -22,8 +22,8 @@ function getNumChecked(form) {
|
||||
|
||||
function checkAllUsers(role) {
|
||||
var checkboxs = document.getElementsByTagName('input');
|
||||
for(var i = 0, inp; inp = checkboxs[i]; i++)
|
||||
if(inp.type.toLowerCase() == 'checkbox' && inp.className == role)
|
||||
for(var i = 0, inp; inp = checkboxs[i]; i++)
|
||||
if(inp.type.toLowerCase() == 'checkbox' && inp.className == role)
|
||||
if(inp.checked == false)
|
||||
inp.checked = true;
|
||||
else
|
||||
|
@ -9,4 +9,4 @@ function send_to_editor(h) {
|
||||
tinyMCE.execCommand('mceInsertContent', false, h);
|
||||
} else
|
||||
win.edInsertContent(win.edCanvas, h);
|
||||
}
|
||||
}
|
@ -12,14 +12,14 @@ var strongPass = 'Strong'
|
||||
|
||||
function passwordStrength(password,username)
|
||||
{
|
||||
score = 0
|
||||
|
||||
score = 0
|
||||
|
||||
//password < 4
|
||||
if (password.length < 4 ) { return shortPass }
|
||||
|
||||
|
||||
//password == username
|
||||
if (password.toLowerCase()==username.toLowerCase()) return badPass
|
||||
|
||||
|
||||
//password length
|
||||
score += password.length * 4
|
||||
score += ( checkRepetition(1,password).length - password.length ) * 1
|
||||
@ -28,31 +28,31 @@ function passwordStrength(password,username)
|
||||
score += ( checkRepetition(4,password).length - password.length ) * 1
|
||||
|
||||
//password has 3 numbers
|
||||
if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5
|
||||
|
||||
if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5
|
||||
|
||||
//password has 2 sybols
|
||||
if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
|
||||
|
||||
if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
|
||||
|
||||
//password has Upper and Lower chars
|
||||
if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10
|
||||
|
||||
if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10
|
||||
|
||||
//password has number and chars
|
||||
if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15
|
||||
if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15
|
||||
//
|
||||
//password has number and symbol
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15
|
||||
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15
|
||||
|
||||
//password has char and symbol
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15
|
||||
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15
|
||||
|
||||
//password is just a nubers or chars
|
||||
if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10
|
||||
|
||||
if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10
|
||||
|
||||
//verifing 0 < score < 100
|
||||
if ( score < 0 ) score = 0
|
||||
if ( score > 100 ) score = 100
|
||||
|
||||
if (score < 34 ) return badPass
|
||||
if ( score < 0 ) score = 0
|
||||
if ( score > 100 ) score = 100
|
||||
|
||||
if (score < 34 ) return badPass
|
||||
if (score < 68 ) return goodPass
|
||||
return strongPass
|
||||
}
|
||||
@ -93,14 +93,14 @@ var strongPass = 'Strong'
|
||||
|
||||
function passwordStrength(password,username)
|
||||
{
|
||||
score = 0
|
||||
|
||||
score = 0
|
||||
|
||||
//password < 4
|
||||
if (password.length < 4 ) { return shortPass }
|
||||
|
||||
|
||||
//password == username
|
||||
if (password.toLowerCase()==username.toLowerCase()) return badPass
|
||||
|
||||
|
||||
//password length
|
||||
score += password.length * 4
|
||||
score += ( checkRepetition(1,password).length - password.length ) * 1
|
||||
@ -109,31 +109,31 @@ function passwordStrength(password,username)
|
||||
score += ( checkRepetition(4,password).length - password.length ) * 1
|
||||
|
||||
//password has 3 numbers
|
||||
if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5
|
||||
|
||||
if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5
|
||||
|
||||
//password has 2 sybols
|
||||
if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
|
||||
|
||||
if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
|
||||
|
||||
//password has Upper and Lower chars
|
||||
if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10
|
||||
|
||||
if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10
|
||||
|
||||
//password has number and chars
|
||||
if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15
|
||||
if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15
|
||||
//
|
||||
//password has number and symbol
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15
|
||||
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15
|
||||
|
||||
//password has char and symbol
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15
|
||||
|
||||
if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15
|
||||
|
||||
//password is just a nubers or chars
|
||||
if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10
|
||||
|
||||
if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10
|
||||
|
||||
//verifing 0 < score < 100
|
||||
if ( score < 0 ) score = 0
|
||||
if ( score > 100 ) score = 100
|
||||
|
||||
if (score < 34 ) return badPass
|
||||
if ( score < 0 ) score = 0
|
||||
if ( score > 100 ) score = 100
|
||||
|
||||
if (score < 34 ) return badPass
|
||||
if (score < 68 ) return goodPass
|
||||
return strongPass
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ function tag_update_quickclicks() {
|
||||
// jQuery.merge( current_tags, current_tags ); // this doesn't work anymore, need something to array_unique
|
||||
jQuery.each( current_tags, function( key, val ) {
|
||||
val = val.replace( /^\s+/, '' ).replace( /\s+$/, '' ); // trim
|
||||
if ( !val.match(/^\s+$/) && '' != val ) {
|
||||
if ( !val.match(/^\s+$/) && '' != val ) {
|
||||
txt = '<span><a id="tag-check-' + key + '" class="ntdelbutton">X</a> ' + val + '</span> ';
|
||||
jQuery( '#tagchecklist' ).append( txt );
|
||||
jQuery( '#tag-check-' + key ).click( new_tag_remove_tag );
|
||||
@ -63,12 +63,12 @@ addLoadEvent( function() {
|
||||
|
||||
// If no tags on the page, skip the tag and category stuff.
|
||||
if ( !jQuery('#tags-input').size() ) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
// Editable slugs
|
||||
make_slugedit_clickable();
|
||||
|
||||
|
||||
// hide advanced slug field
|
||||
jQuery('#slugdiv').hide();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
function edit_permalink(post_id) {
|
||||
var i, c = 0;
|
||||
var e = jQuery('#editable-post-name');
|
||||
var revert_e = e.html();
|
||||
var revert_e = e.html();
|
||||
var real_slug = jQuery('#post_name');
|
||||
var revert_slug = real_slug.html();
|
||||
var b = jQuery('#edit-slug-buttons');
|
||||
@ -18,7 +18,7 @@ function edit_permalink(post_id) {
|
||||
samplepermalinknonce: jQuery('#samplepermalinknonce').val()}, function(data) {
|
||||
jQuery('#edit-slug-box').html(data);
|
||||
b.html(revert_b);
|
||||
real_slug.attr('value', new_slug);
|
||||
real_slug.attr('value', new_slug);
|
||||
make_slugedit_clickable();
|
||||
});
|
||||
return false;
|
||||
|
@ -5,7 +5,7 @@ addLoadEvent( function() {
|
||||
tab: '',
|
||||
postID: 0,
|
||||
|
||||
// cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html
|
||||
// cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html
|
||||
createCookie: function(name,value,days) {
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
@ -28,8 +28,8 @@ addLoadEvent( function() {
|
||||
},
|
||||
|
||||
assignCookieOnChange: function() {
|
||||
jQuery(this).bind("change", function(){
|
||||
theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365);
|
||||
jQuery(this).bind("change", function(){
|
||||
theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365);
|
||||
});
|
||||
},
|
||||
|
||||
@ -323,7 +323,7 @@ addLoadEvent( function() {
|
||||
|
||||
};
|
||||
|
||||
for ( var property in uploadL10n )
|
||||
for ( var property in uploadL10n )
|
||||
theFileList[property] = uploadL10n[property];
|
||||
theFileList.initializeVars();
|
||||
theFileList.initializeLinks();
|
||||
|
@ -87,7 +87,7 @@ jQuery(function($) {
|
||||
var addWidgetControls = function( context ) {
|
||||
if ( !context )
|
||||
context = document;
|
||||
|
||||
|
||||
$('a.widget-control-edit', context).click( editClick );
|
||||
|
||||
// onclick for save links
|
||||
|
@ -21,7 +21,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['linkcheck']) ) {
|
||||
exit;
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_enqueue_script('admin-forms');
|
||||
@ -170,7 +170,7 @@ if ( $links ) {
|
||||
foreach($link_columns as $column_name=>$column_display_name) {
|
||||
switch($column_name) {
|
||||
case 'name':
|
||||
|
||||
|
||||
echo "<td><strong><a class='row-title' href='link.php?link_id=$link->link_id&action=edit' class='edit'>$link->link_name</a></strong><br />";
|
||||
echo $link->link_description . "</td>";
|
||||
break;
|
||||
|
@ -57,7 +57,7 @@ include('./admin-header.php');
|
||||
<th scope="row"><?php _e('Timezone') ?> </th>
|
||||
<td>
|
||||
<select name="gmt_offset">
|
||||
<?php
|
||||
<?php
|
||||
$current_offset = get_option('gmt_offset');
|
||||
$offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
|
||||
0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12);
|
||||
|
@ -13,7 +13,7 @@ if ('b' == $_GET['a']) {
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
|
||||
<title>WordPress › Posted</title>
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css();
|
||||
?>
|
||||
@ -31,7 +31,7 @@ wp_admin_css();
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
|
||||
<title>WordPress › Sidebar</title>
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'css/global' );
|
||||
wp_admin_css();
|
||||
?>
|
||||
|
@ -83,7 +83,7 @@ default:
|
||||
?>
|
||||
<?php if (isset($_GET['a'])) : ?>
|
||||
<div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
|
||||
$description = get_file_description($file);
|
||||
$desc_header = ( $description != $file_show ) ? "$description</strong> (%s)" : "%s";
|
||||
@ -134,7 +134,7 @@ if ($allowed_files) :
|
||||
</ul>
|
||||
<h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4>
|
||||
<ul>
|
||||
<?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) :
|
||||
<?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) :
|
||||
$description = get_file_description($style_file);
|
||||
$style_show = basename($style_file);
|
||||
$filedesc = ( $description != $style_file ) ? "$description <span class='nonessential'>($style_show)</span>" : "$description";
|
||||
@ -155,7 +155,7 @@ if ($allowed_files) :
|
||||
<input type="hidden" name="file" value="<?php echo $file ?>" />
|
||||
<input type="hidden" name="theme" value="<?php echo $theme ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<?php if ( is_writeable($real_file) ) : ?>
|
||||
<p class="submit">
|
||||
|
@ -110,7 +110,7 @@ if ( isset($_GET['action']) ) {
|
||||
require_once('admin-header.php');
|
||||
do_plugin_upgrade($plugin);
|
||||
include('admin-footer.php');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if (!current_user_can('upload_files'))
|
||||
wp_die(__('You do not have permission to upload files.'));
|
||||
if (!current_user_can('upload_files'))
|
||||
wp_die(__('You do not have permission to upload files.'));
|
||||
|
||||
// Handle bulk deletes
|
||||
if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||
@ -26,7 +26,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
$title = __('Media Library');
|
||||
@ -154,12 +154,12 @@ foreach ($arc_result as $arc_row) {
|
||||
if ( $arc_row->yyear == 0 )
|
||||
continue;
|
||||
$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
|
||||
|
||||
|
||||
if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
|
||||
$default = ' selected="selected"';
|
||||
else
|
||||
$default = '';
|
||||
|
||||
|
||||
echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
|
||||
echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
|
||||
echo "</option>\n";
|
||||
|
@ -184,7 +184,7 @@ default:
|
||||
|
||||
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_enqueue_script('admin-users');
|
||||
|
@ -170,7 +170,7 @@ form#upload #post_content {
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
color: #246;
|
||||
@ -234,8 +234,8 @@ select {
|
||||
}
|
||||
|
||||
.error {
|
||||
background: #f00;
|
||||
border: 1px solid #800;
|
||||
background: #f00;
|
||||
border: 1px solid #800;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -368,7 +368,7 @@ input.disabled, textarea.disabled {
|
||||
#searchform fieldset legend {
|
||||
padding: 0 0 .2em 1px;
|
||||
}
|
||||
|
||||
|
||||
#searchform #s {
|
||||
padding: 4px 3px;
|
||||
}
|
||||
@ -569,7 +569,7 @@ p.pagenav {
|
||||
font-size: 12px;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
#update-nag a, .plugin-update a {
|
||||
font-size: 1.1em;
|
||||
@ -578,30 +578,30 @@ p.pagenav {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
#pass-strength-result {
|
||||
#pass-strength-result {
|
||||
padding: 3px 5px 3px 5px;
|
||||
margin-top: 3px;
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
background-color: #e3e3e3;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
|
||||
#pass-strength-result.short {
|
||||
#pass-strength-result.short {
|
||||
background-color: #e3e3e3;
|
||||
border: 1px solid #000000;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
|
||||
#pass-strength-result.bad {
|
||||
#pass-strength-result.bad {
|
||||
background-color: #ffeff7;
|
||||
border: 1px solid #cc6699;
|
||||
border: 1px solid #cc6699;
|
||||
}
|
||||
|
||||
#pass-strength-result.good {
|
||||
#pass-strength-result.good {
|
||||
background-color: #effff4;
|
||||
border: 1px solid #66cc87;
|
||||
border: 1px solid #66cc87;
|
||||
}
|
||||
|
||||
#pass-strength-result.strong {
|
||||
#pass-strength-result.strong {
|
||||
background-color: #59ef86;
|
||||
border: 1px solid #319f52;
|
||||
}
|
||||
@ -694,7 +694,7 @@ a.view-comment-post-link {
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
@ -891,8 +891,8 @@ strong .post-com-count span {
|
||||
html, body {
|
||||
height:100%;
|
||||
}
|
||||
#wpwrap {
|
||||
position: relative;
|
||||
#wpwrap {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
#wpcontent{
|
||||
@ -905,8 +905,8 @@ html, body {
|
||||
margin: 0;
|
||||
background: #464646 url('images/logo-ghost.png') no-repeat 20px 10px;
|
||||
color: #999;
|
||||
position: relative;
|
||||
margin-top: -75px;
|
||||
position: relative;
|
||||
margin-top: -75px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
@ -1064,7 +1064,7 @@ html, body {
|
||||
#link_name, #link_url, #link_description {
|
||||
font-size: 1.7em;
|
||||
padding: 4px 3px;
|
||||
width: 98%;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
#edit-slug-box {
|
||||
|
@ -1,68 +1,68 @@
|
||||
/* Based on Arabic (RTL) version of Kubrick theme, converted by Serdal (Serdal.com) */
|
||||
|
||||
|
||||
.narrowcolumn, .alignleft, .widecolumn .smallattachment { float: right; }
|
||||
.alignright, #commentform #submit { float: left; }
|
||||
|
||||
|
||||
#page, .post, #wp-calendar #prev a { text-align: right; }
|
||||
|
||||
|
||||
body, #commentform p { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; }
|
||||
|
||||
|
||||
small { font-family: 'Geeza Pro', Tahoma, Arial, Helvetica, Sans-Serif; }
|
||||
|
||||
|
||||
h1, h2, h3 { font-family: 'Al Bayan', 'Traditional Arabic', 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; }
|
||||
|
||||
|
||||
#sidebar h2 { font-family: 'Al Bayan', 'Traditional Arabic', 'Lucida Grande', Verdana, Sans-Serif; }
|
||||
|
||||
|
||||
.commentlist li, #commentform input, #commentform textarea { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; }
|
||||
|
||||
|
||||
#sidebar { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; }
|
||||
|
||||
|
||||
#wp-calendar caption { font-family: 'Geeza Pro', Tahoma, 'Lucida Grande', Verdana, Arial, Sans-Serif; }
|
||||
|
||||
|
||||
acronym, abbr, span.caps { letter-spacing: normal; }
|
||||
|
||||
|
||||
#header { margin: 0 1px 0 0; }
|
||||
|
||||
|
||||
.narrowcolumn { padding: 0 45px 20px 0; }
|
||||
|
||||
|
||||
.widecolumn { margin: 5px 150px 0 0; }
|
||||
|
||||
|
||||
.widecolumn .smallattachment { margin: 5px 0px 5px 5px; }
|
||||
|
||||
|
||||
.postmetadata { clear: right; }
|
||||
|
||||
|
||||
img.alignright { margin: 0 7px 2px 0; }
|
||||
|
||||
|
||||
img.alignleft { margin: 0 0 2px 7px; }
|
||||
|
||||
|
||||
.entry ol { padding: 0 35px 0 0; }
|
||||
|
||||
|
||||
#sidebar ul ul, #sidebar ul ol { margin: 5px 10px 0 0; }
|
||||
|
||||
|
||||
#sidebar ul ul ul, #sidebar ul ol { margin: 0 10px 0 0; }
|
||||
|
||||
|
||||
#commentform input { margin: 5px 0 1px 5px; }
|
||||
|
||||
|
||||
.commentlist p { margin: 10px 0 10px 5px; }
|
||||
|
||||
|
||||
html>body .entry li { margin: 7px 10px 8px 0; }
|
||||
|
||||
|
||||
html>body .entry ul {
|
||||
margin-left: auto;
|
||||
margin-right: 0px;
|
||||
padding: 0 30px 0 0;
|
||||
}
|
||||
|
||||
|
||||
#sidebar {
|
||||
margin-left: auto;
|
||||
margin-right: 545px;
|
||||
}
|
||||
|
||||
|
||||
#wp-calendar #prev a, html>body .entry ul {
|
||||
padding-left: 0;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
blockquote {
|
||||
border-left: 0;
|
||||
border-right: 5px solid #ddd;
|
||||
@ -70,7 +70,7 @@ blockquote {
|
||||
padding-right: 20px;
|
||||
margin: 15px 10px 0 30px;
|
||||
}
|
||||
|
||||
|
||||
#wp-calendar #next a {
|
||||
padding-right: 0;
|
||||
padding-left: 10px;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Theme Name: WordPress Default
|
||||
Theme URI: http://wordpress.org/
|
||||
Description: The default WordPress theme based on the famous <a href="http://binarybonsai.com/kubrick/">Kubrick</a>.
|
||||
@ -39,11 +39,11 @@ body {
|
||||
background: #73a0c5 url('images/kubrickheader.jpg') no-repeat bottom center;
|
||||
}
|
||||
|
||||
#headerimg {
|
||||
margin: 7px 9px 0;
|
||||
height: 192px;
|
||||
width: 740px;
|
||||
}
|
||||
#headerimg {
|
||||
margin: 7px 9px 0;
|
||||
height: 192px;
|
||||
width: 740px;
|
||||
}
|
||||
|
||||
#content {
|
||||
font-size: 1.2em
|
||||
@ -72,7 +72,7 @@ body {
|
||||
}
|
||||
|
||||
#footer {
|
||||
background: #eee url('images/kubrickfooter.jpg') no-repeat top;
|
||||
background: #eee url('images/kubrickfooter.jpg') no-repeat top;
|
||||
border: none;
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ a:hover {
|
||||
/* Begin Structure */
|
||||
body {
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#page {
|
||||
@ -224,9 +224,9 @@ body {
|
||||
|
||||
#header {
|
||||
background-color: #73a0c5;
|
||||
margin: 0 0 0 1px;
|
||||
padding: 0;
|
||||
height: 200px;
|
||||
margin: 0 0 0 1px;
|
||||
padding: 0;
|
||||
height: 200px;
|
||||
width: 758px;
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ html>body .entry ul {
|
||||
list-style: none;
|
||||
padding-left: 10px;
|
||||
text-indent: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
html>body .entry li {
|
||||
margin: 7px 0 8px 10px;
|
||||
@ -450,7 +450,7 @@ ol li, #sidebar ul ol li {
|
||||
/* Begin Form Elements */
|
||||
#searchform {
|
||||
margin: 10px auto;
|
||||
padding: 5px 3px;
|
||||
padding: 5px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
@ -167,25 +167,25 @@ function get_the_category_list($separator = '', $parents='', $post_id = false) {
|
||||
return apply_filters('the_category', $thelist, $separator, $parents);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* in_category() - Checks whether the current post is within a particular category
|
||||
*
|
||||
*
|
||||
* This function checks to see if the post is within the supplied category. The categoy
|
||||
* can be specified by number or name and will be checked as a name first to allow for categories with numeric names.
|
||||
* Note: Prior to v2.5 of WordPress category names where not supported.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param int|string $category
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
* @param int|string $category
|
||||
* @return bool true if the post is in the supplied category
|
||||
*/
|
||||
*/
|
||||
function in_category( $category ) { // Check if the current post is in the given category
|
||||
global $post;
|
||||
|
||||
$cat_ID = get_cat_ID($category);
|
||||
if (0 != $cat_ID)
|
||||
$category = $cat_ID;
|
||||
|
||||
|
||||
$categories = get_object_term_cache($post->ID, 'category');
|
||||
if ( false === $categories )
|
||||
$categories = wp_get_object_terms($post->ID, 'category');
|
||||
|
@ -416,34 +416,34 @@ class Walker {
|
||||
$cb_args = array_merge( array($output, $element, $depth), $args);
|
||||
$output = call_user_func_array(array(&$this, 'start_el'), $cb_args);
|
||||
|
||||
if ( $max_depth == 0 ||
|
||||
if ( $max_depth == 0 ||
|
||||
($max_depth != 0 && $max_depth > $depth+1 )) { //whether to descend
|
||||
|
||||
|
||||
for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) {
|
||||
|
||||
|
||||
$child = $children_elements[$i];
|
||||
if ( $child->$parent_field == $element->$id_field ) {
|
||||
|
||||
if ( !isset($newlevel) ) {
|
||||
$newlevel = true;
|
||||
$newlevel = true;
|
||||
//start the child delimiter
|
||||
$cb_args = array_merge( array($output, $depth), $args);
|
||||
$output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args);
|
||||
}
|
||||
|
||||
|
||||
array_splice( $children_elements, $i, 1 );
|
||||
$output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
|
||||
$i = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( isset($newlevel) && $newlevel ){
|
||||
//end the child delimiter
|
||||
$cb_args = array_merge( array($output, $depth), $args);
|
||||
$output = call_user_func_array(array(&$this, 'end_lvl'), $cb_args);
|
||||
}
|
||||
|
||||
|
||||
//end this element
|
||||
$cb_args = array_merge( array($output, $element, $depth), $args);
|
||||
$output = call_user_func_array(array(&$this, 'end_el'), $cb_args);
|
||||
|
@ -1276,7 +1276,7 @@ function documentation_link( $deprecated = '' ) {
|
||||
|
||||
/**
|
||||
* gzip_compression() - Unused function
|
||||
*
|
||||
*
|
||||
* @deprecated 2.5
|
||||
*/
|
||||
|
||||
|
@ -5,14 +5,14 @@ function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) {
|
||||
$m = $mysqlstring;
|
||||
if ( empty( $m ) )
|
||||
return false;
|
||||
|
||||
|
||||
if( 'G' == $dateformatstring ) {
|
||||
return gmmktime(
|
||||
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
|
||||
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$i = mktime(
|
||||
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
|
||||
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )
|
||||
@ -906,7 +906,7 @@ function do_feed() {
|
||||
wp_die($message);
|
||||
}
|
||||
|
||||
do_action( $hook, $wp_query->is_comment_feed );
|
||||
do_action( $hook, $wp_query->is_comment_feed );
|
||||
}
|
||||
|
||||
|
||||
@ -1043,7 +1043,7 @@ function path_is_absolute( $path ) {
|
||||
|
||||
if ( strlen($path) == 0 || $path{0} == '.' )
|
||||
return false;
|
||||
|
||||
|
||||
// windows allows absolute paths like this
|
||||
if ( preg_match('#^[a-zA-Z]:\\\\#', $path) )
|
||||
return true;
|
||||
@ -1056,7 +1056,7 @@ function path_is_absolute( $path ) {
|
||||
function path_join( $base, $path ) {
|
||||
if ( path_is_absolute($path) )
|
||||
return $path;
|
||||
|
||||
|
||||
return rtrim($base, '/') . '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
@ -1064,7 +1064,7 @@ function path_join( $base, $path ) {
|
||||
function wp_upload_dir( $time = NULL ) {
|
||||
$siteurl = get_option( 'siteurl' );
|
||||
$upload_path = $dir = get_option( 'upload_path' );
|
||||
|
||||
|
||||
// $dir is absolute, $path is (maybe) relative to ABSPATH
|
||||
$dir = path_join( ABSPATH, $upload_path );
|
||||
$path = str_replace( ABSPATH, '', trim( $upload_path ) );
|
||||
@ -1089,7 +1089,7 @@ function wp_upload_dir( $time = NULL ) {
|
||||
$m = substr( $time, 5, 2 );
|
||||
$subdir = "/$y/$m";
|
||||
}
|
||||
|
||||
|
||||
$dir .= $subdir;
|
||||
$url .= $subdir;
|
||||
|
||||
@ -1184,7 +1184,7 @@ function wp_ext2type( $ext ) {
|
||||
'interactive' => array('ppt','key','odp','swf'),
|
||||
'text' => array('txt'),
|
||||
'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'),
|
||||
'code' => array('css','html','php','js'),
|
||||
'code' => array('css','html','php','js'),
|
||||
));
|
||||
foreach ( $ext2type as $type => $exts )
|
||||
if ( in_array($ext, $exts) )
|
||||
|
@ -937,8 +937,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
|
||||
<a id="edButtonHTML" class="active"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a>
|
||||
<?php }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( $media_buttons ) { ?>
|
||||
<div id="media-buttons">
|
||||
<?php do_action( 'media_buttons' ); ?>
|
||||
|
@ -132,7 +132,7 @@ var autosave = function() {
|
||||
|
||||
/* Gotta do this up here so we can check the length when tinyMCE is in use */
|
||||
if ( rich ) { tinyMCE.triggerSave(); }
|
||||
|
||||
|
||||
post_data["content"] = jQuery("#content").val();
|
||||
if ( jQuery('#post_name').val() )
|
||||
post_data["post_name"] = jQuery('#post_name').val();
|
||||
|
@ -25,15 +25,15 @@ function zeroise(number, threshold) {
|
||||
}
|
||||
|
||||
var now = new Date();
|
||||
var datetime = now.getUTCFullYear() + '-' +
|
||||
var datetime = now.getUTCFullYear() + '-' +
|
||||
zeroise(now.getUTCMonth() + 1, 2) + '-' +
|
||||
zeroise(now.getUTCDate(), 2) + 'T' +
|
||||
zeroise(now.getUTCHours(), 2) + ':' +
|
||||
zeroise(now.getUTCMinutes(), 2) + ':' +
|
||||
zeroise(now.getUTCDate(), 2) + 'T' +
|
||||
zeroise(now.getUTCHours(), 2) + ':' +
|
||||
zeroise(now.getUTCMinutes(), 2) + ':' +
|
||||
zeroise(now.getUTCSeconds() ,2) +
|
||||
'+00:00';
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_strong'
|
||||
,'b'
|
||||
,'<strong>'
|
||||
@ -41,7 +41,7 @@ new edButton('ed_strong'
|
||||
,'b'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_em'
|
||||
,'i'
|
||||
,'<em>'
|
||||
@ -49,7 +49,7 @@ new edButton('ed_em'
|
||||
,'i'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_link'
|
||||
,'link'
|
||||
,''
|
||||
@ -57,7 +57,7 @@ new edButton('ed_link'
|
||||
,'a'
|
||||
); // special case
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_block'
|
||||
,'b-quote'
|
||||
,'\n\n<blockquote>'
|
||||
@ -66,7 +66,7 @@ new edButton('ed_block'
|
||||
);
|
||||
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_del'
|
||||
,'del'
|
||||
,'<del datetime="' + datetime + '">'
|
||||
@ -74,7 +74,7 @@ new edButton('ed_del'
|
||||
,'d'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_ins'
|
||||
,'ins'
|
||||
,'<ins datetime="' + datetime + '">'
|
||||
@ -82,7 +82,7 @@ new edButton('ed_ins'
|
||||
,'s'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_img'
|
||||
,'img'
|
||||
,''
|
||||
@ -91,7 +91,7 @@ new edButton('ed_img'
|
||||
,-1
|
||||
); // special case
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_ul'
|
||||
,'ul'
|
||||
,'<ul>\n'
|
||||
@ -99,7 +99,7 @@ new edButton('ed_ul'
|
||||
,'u'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_ol'
|
||||
,'ol'
|
||||
,'<ol>\n'
|
||||
@ -107,7 +107,7 @@ new edButton('ed_ol'
|
||||
,'o'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_li'
|
||||
,'li'
|
||||
,'\t<li>'
|
||||
@ -115,7 +115,7 @@ new edButton('ed_li'
|
||||
,'l'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_code'
|
||||
,'code'
|
||||
,'<code>'
|
||||
@ -123,7 +123,7 @@ new edButton('ed_code'
|
||||
,'c'
|
||||
);
|
||||
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_more'
|
||||
,'more'
|
||||
,'<!--more-->'
|
||||
@ -132,7 +132,7 @@ new edButton('ed_more'
|
||||
,-1
|
||||
);
|
||||
/*
|
||||
edButtons[edButtons.length] =
|
||||
edButtons[edButtons.length] =
|
||||
new edButton('ed_next'
|
||||
,'page'
|
||||
,'<!--nextpage-->'
|
||||
@ -220,7 +220,7 @@ function edQuickLink(i, thisSelect) {
|
||||
if (edLinks[i].newWin == 1) {
|
||||
newWin = ' target="_blank"';
|
||||
}
|
||||
var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>'
|
||||
var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>'
|
||||
+ edLinks[i].display
|
||||
+ '</a>';
|
||||
thisSelect.selectedIndex = 0;
|
||||
@ -298,21 +298,21 @@ function edInsertTag(myField, i) {
|
||||
if (startPos != endPos) {
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ edButtons[i].tagStart
|
||||
+ myField.value.substring(startPos, endPos)
|
||||
+ myField.value.substring(startPos, endPos)
|
||||
+ edButtons[i].tagEnd
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
cursorPos += edButtons[i].tagStart.length + edButtons[i].tagEnd.length;
|
||||
}
|
||||
else {
|
||||
if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ edButtons[i].tagStart
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
edAddTag(i);
|
||||
cursorPos = startPos + edButtons[i].tagStart.length;
|
||||
}
|
||||
else {
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ edButtons[i].tagEnd
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
edRemoveTag(i);
|
||||
@ -350,7 +350,7 @@ function edInsertContent(myField, myValue) {
|
||||
var startPos = myField.selectionStart;
|
||||
var endPos = myField.selectionEnd;
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ myValue
|
||||
+ myValue
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
myField.focus();
|
||||
myField.selectionStart = startPos + myValue.length;
|
||||
@ -380,9 +380,9 @@ function edInsertLink(myField, i, defaultValue) {
|
||||
function edInsertImage(myField) {
|
||||
var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
|
||||
if (myValue) {
|
||||
myValue = '<img src="'
|
||||
+ myValue
|
||||
+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
|
||||
myValue = '<img src="'
|
||||
+ myValue
|
||||
+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
|
||||
+ '" />';
|
||||
edInsertContent(myField, myValue);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ var wpList = {
|
||||
s.element = cls[2] || e.attr( 'id' ) || s.element || null;
|
||||
if ( cls[3] ) { s.addColor = '#' + cls[3]; }
|
||||
else { s.addColor = s.addColor || '#FFFF33'; }
|
||||
|
||||
|
||||
if ( !s ) { return false; }
|
||||
|
||||
if ( !e.is("[class^=add:" + list.id + ":]") ) { return !wpList.add.call( list, e, s ); }
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// scale down the default size of an image so it's a better fit for the editor and theme
|
||||
function image_constrain_size_for_editor($width, $height, $size = 'medium') {
|
||||
|
||||
|
||||
if ( $size == 'thumb' ) {
|
||||
$max_width = intval(get_option('thumbnail_size_w'));
|
||||
$max_height = intval(get_option('thumbnail_size_h'));
|
||||
@ -33,7 +33,7 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') {
|
||||
}
|
||||
|
||||
list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size );
|
||||
|
||||
|
||||
return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
|
||||
}
|
||||
|
||||
@ -51,15 +51,15 @@ function image_hwstring($width, $height) {
|
||||
// The URL might be the original image, or it might be a resized version.
|
||||
// returns an array($url, $width, $height)
|
||||
function image_downsize($id, $size = 'medium') {
|
||||
|
||||
|
||||
$img_url = wp_get_attachment_url($id);
|
||||
$meta = wp_get_attachment_metadata($id);
|
||||
$width = $height = 0;
|
||||
|
||||
|
||||
// plugins can use this to provide resize services
|
||||
if ( $out = apply_filters('image_downsize', false, $id, $size) )
|
||||
return $out;
|
||||
|
||||
|
||||
if ( $size == 'thumb' ) {
|
||||
// thumbnail: use the thumb as the displayed image, and constrain based on its dimensions
|
||||
$thumb_path = wp_get_attachment_thumb_file($id);
|
||||
@ -74,9 +74,9 @@ function image_downsize($id, $size = 'medium') {
|
||||
// any other type: use the real image and constrain it
|
||||
list( $width, $height ) = image_constrain_size_for_editor( $meta['width'], $meta['height'], $size );
|
||||
}
|
||||
|
||||
|
||||
return array( $img_url, $width, $height );
|
||||
|
||||
|
||||
}
|
||||
|
||||
// return an <img src /> tag for the given image attachment, scaling it down if requested
|
||||
@ -97,31 +97,31 @@ function get_image_tag($id, $alt, $title, $align, $rel = false, $size='medium')
|
||||
function wp_constrain_dimensions( $current_width, $current_height, $max_width=0, $max_height=0 ) {
|
||||
if ( !$max_width and !$max_height )
|
||||
return array( $current_width, $current_height );
|
||||
|
||||
|
||||
$width_ratio = $height_ratio = 1.0;
|
||||
|
||||
|
||||
if ( $max_width > 0 && $current_width > $max_width )
|
||||
$width_ratio = $max_width / $current_width;
|
||||
|
||||
|
||||
if ( $max_height > 0 && $current_height > $max_height )
|
||||
$height_ratio = $max_height / $current_height;
|
||||
|
||||
|
||||
// the smaller ratio is the one we need to fit it to the constraining box
|
||||
$ratio = min( $width_ratio, $height_ratio );
|
||||
|
||||
|
||||
return array( intval($current_width * $ratio), intval($current_height * $ratio) );
|
||||
}
|
||||
|
||||
// calculate dimensions and coordinates for a resized image that fits within a specified width and height
|
||||
// if $crop is true, the largest matching central portion of the image will be cropped out and resized to the required size
|
||||
function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false) {
|
||||
|
||||
|
||||
if ($orig_w <= 0 || $orig_h <= 0)
|
||||
return false;
|
||||
// at least one of dest_w or dest_h must be specific
|
||||
if ($dest_w <= 0 && $dest_h <= 0)
|
||||
return false;
|
||||
|
||||
|
||||
if ( $crop ) {
|
||||
// crop the largest possible portion of the original image that we can size to $dest_w x $dest_h
|
||||
$aspect_ratio = $orig_w / $orig_h;
|
||||
@ -135,7 +135,7 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false
|
||||
}
|
||||
|
||||
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
|
||||
|
||||
|
||||
$crop_w = ceil($new_w / $size_ratio);
|
||||
$crop_h = ceil($new_h / $size_ratio);
|
||||
|
||||
@ -146,13 +146,13 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false
|
||||
// don't crop, just resize using $dest_w x $dest_h as a maximum bounding box
|
||||
$crop_w = $orig_w;
|
||||
$crop_h = $orig_h;
|
||||
|
||||
|
||||
$s_x = 0;
|
||||
$s_y = 0;
|
||||
|
||||
|
||||
list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h );
|
||||
}
|
||||
|
||||
|
||||
// if the resulting image would be the same size or larger we don't want to resize it
|
||||
if ($new_w >= $orig_w && $new_h >= $orig_h)
|
||||
return false;
|
||||
@ -175,7 +175,7 @@ function image_resize( $file, $max_w, $max_h, $crop=false, $suffix=null, $dest_p
|
||||
if (!$dims)
|
||||
return $dims;
|
||||
list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims;
|
||||
|
||||
|
||||
$newimage = imagecreatetruecolor( $dst_w, $dst_h);
|
||||
|
||||
// preserve PNG transparency
|
||||
|
@ -650,7 +650,7 @@ function check_ajax_referer( $action = -1, $query_arg = false ) {
|
||||
else
|
||||
$nonce = $_REQUEST['_ajax_nonce'] ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, $action ) )
|
||||
if ( !wp_verify_nonce( $nonce, $action ) )
|
||||
die('-1');
|
||||
|
||||
do_action('check_ajax_referer');
|
||||
@ -856,7 +856,7 @@ function wp_notify_moderator($comment_id) {
|
||||
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
|
||||
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
|
||||
|
||||
switch ($comment->comment_type)
|
||||
switch ($comment->comment_type)
|
||||
{
|
||||
case 'trackback':
|
||||
$notify_message = sprintf( __('A new trackback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
|
||||
@ -882,11 +882,11 @@ function wp_notify_moderator($comment_id) {
|
||||
$notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id" ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id" ) . "\r\n";
|
||||
$notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n";
|
||||
|
||||
|
||||
$strCommentsPending = sprintf( __ngettext('%s comment', '%s comments', $comments_waiting), $comments_waiting );
|
||||
$notify_message .= sprintf( __('Currently %s are waiting for approval. Please visit the moderation panel:'), $strCommentsPending ) . "\r\n";
|
||||
$notify_message .= get_option('siteurl') . "/wp-admin/moderation.php\r\n";
|
||||
|
@ -1428,8 +1428,8 @@ function wp_publish_post($post_id) {
|
||||
/**
|
||||
* check_and_publish_future_post() - check to make sure post has correct status before
|
||||
* passing it on to be published. Invoked by cron 'publish_future_post' event
|
||||
* This safeguard prevents cron from publishing drafts, etc.
|
||||
*
|
||||
* This safeguard prevents cron from publishing drafts, etc.
|
||||
*
|
||||
* {@internal Missing Long Description}}
|
||||
*
|
||||
* @package WordPress
|
||||
@ -1441,7 +1441,7 @@ function wp_publish_post($post_id) {
|
||||
* @return int|null {@internal Missing Description}}
|
||||
*/
|
||||
function check_and_publish_future_post($post_id) {
|
||||
|
||||
|
||||
$post = get_post($post_id);
|
||||
|
||||
if ( empty($post) )
|
||||
@ -1450,7 +1450,7 @@ function check_and_publish_future_post($post_id) {
|
||||
if ( 'future' != $post->post_status )
|
||||
return;
|
||||
|
||||
return wp_publish_post($post_id);
|
||||
return wp_publish_post($post_id);
|
||||
}
|
||||
|
||||
function wp_add_post_tags($post_id = 0, $tags = '') {
|
||||
@ -2931,7 +2931,7 @@ function _get_post_ancestors(&$_post) {
|
||||
|
||||
if ( !empty($_post->ancestors) )
|
||||
return;
|
||||
|
||||
|
||||
$_post->ancestors = array();
|
||||
|
||||
if ( empty($_post->post_parent) || $_post->ID == $_post->post_parent )
|
||||
|
@ -32,13 +32,13 @@ class WP_Scripts {
|
||||
// Let a plugin replace the visual editor
|
||||
$visual_editor = apply_filters('visual_editor', array('tiny_mce'));
|
||||
$this->add( 'editor', false, $visual_editor, '20080218' );
|
||||
|
||||
|
||||
$this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' );
|
||||
|
||||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080226');
|
||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
|
||||
|
||||
|
||||
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
|
||||
|
||||
$this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080229' . mt_rand() );
|
||||
@ -479,12 +479,12 @@ function wp_prototype_before_jquery( $js_array ) {
|
||||
return $js_array;
|
||||
}
|
||||
|
||||
// These localizations require information that may not be loaded even by init
|
||||
function wp_just_in_time_script_localization() {
|
||||
wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
|
||||
// These localizations require information that may not be loaded even by init
|
||||
function wp_just_in_time_script_localization() {
|
||||
wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
|
||||
}
|
||||
|
||||
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
|
||||
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
|
||||
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
|
||||
|
||||
?>
|
||||
|
@ -262,7 +262,7 @@ function is_active_widget($callback, $widget_id = false) {
|
||||
if ( isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback )
|
||||
if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
|
||||
return $sidebar;
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user