Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@8600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3a131a7e02
commit
35b18e5034
|
@ -13,9 +13,9 @@ if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) {
|
||||||
|
|
||||||
$s = $_GET['q']; // is this slashed already?
|
$s = $_GET['q']; // is this slashed already?
|
||||||
|
|
||||||
if ( strstr( $s, ',' ) ) {
|
if ( strstr( $s, ',' ) ) {
|
||||||
$s = explode( ',', $s );
|
$s = explode( ',', $s );
|
||||||
$s = $s[count( $s ) - 1];
|
$s = $s[count( $s ) - 1];
|
||||||
}
|
}
|
||||||
$s = trim( $s );
|
$s = trim( $s );
|
||||||
if ( strlen( $s ) < 2 )
|
if ( strlen( $s ) < 2 )
|
||||||
|
@ -278,7 +278,7 @@ case 'add-cat' : // From Manage->Categories
|
||||||
) );
|
) );
|
||||||
$x->send();
|
$x->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
$cat = wp_insert_category( $_POST, true );
|
$cat = wp_insert_category( $_POST, true );
|
||||||
|
|
||||||
if ( is_wp_error($cat) ) {
|
if ( is_wp_error($cat) ) {
|
||||||
|
|
|
@ -74,7 +74,7 @@ unset($hook_suffixes, $hook_suffix);
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! $is_opera ) {
|
if ( ! $is_opera ) {
|
||||||
?>
|
?>
|
||||||
<div id="gears-info-box" class="info-box" style="display:none;">
|
<div id="gears-info-box" class="info-box" style="display:none;">
|
||||||
<img src="images/gear.png" title="Gear" alt="" class="gears-img" />
|
<img src="images/gear.png" title="Gear" alt="" class="gears-img" />
|
||||||
|
@ -89,14 +89,14 @@ if ( ! $is_opera ) {
|
||||||
|
|
||||||
<div id="gears-msg2" style="display:none;">
|
<div id="gears-msg2" style="display:none;">
|
||||||
<h3 class="info-box-title"><?php _e('Gears Status'); ?></h3>
|
<h3 class="info-box-title"><?php _e('Gears Status'); ?></h3>
|
||||||
<p><?php _e('Gears is installed on this computer but is not enabled for use with WordPress.'); ?></p>
|
<p><?php _e('Gears is installed on this computer but is not enabled for use with WordPress.'); ?></p>
|
||||||
<p><?php
|
<p><?php
|
||||||
|
|
||||||
if ( $is_safari )
|
if ( $is_safari )
|
||||||
_e('To enable it, make sure this web site is not on the denied list in Gears Settings under the Safari menu, then click the button below.');
|
_e('To enable it, make sure this web site is not on the denied list in Gears Settings under the Safari menu, then click the button below.');
|
||||||
else
|
else
|
||||||
_e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser Tools menu, then click the button below.');
|
_e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser Tools menu, then click the button below.');
|
||||||
|
|
||||||
?></p>
|
?></p>
|
||||||
<p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p>
|
<p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p>
|
||||||
<div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button>
|
<div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button>
|
||||||
|
@ -106,12 +106,12 @@ if ( ! $is_opera ) {
|
||||||
<div id="gears-msg3" style="display:none;">
|
<div id="gears-msg3" style="display:none;">
|
||||||
<h3 class="info-box-title"><?php _e('Gears Status'); ?></h3>
|
<h3 class="info-box-title"><?php _e('Gears Status'); ?></h3>
|
||||||
<p><?php
|
<p><?php
|
||||||
|
|
||||||
if ( $is_safari )
|
if ( $is_safari )
|
||||||
_e('Gears is installed and enabled on this computer. You can disable it from the Safari menu.');
|
_e('Gears is installed and enabled on this computer. You can disable it from the Safari menu.');
|
||||||
else
|
else
|
||||||
_e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.');
|
_e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.');
|
||||||
|
|
||||||
?></p>
|
?></p>
|
||||||
<p><?php _e('If there are any errors, try disabling Gears, then reload the page and enable it again.'); ?></p>
|
<p><?php _e('If there are any errors, try disabling Gears, then reload the page and enable it again.'); ?></p>
|
||||||
<p><?php _e('Local storage status:'); ?> <span id="gears-wait"><span style="color:#f00;"><?php _e('Please wait! Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p>
|
<p><?php _e('Local storage status:'); ?> <span id="gears-wait"><span style="color:#f00;"><?php _e('Please wait! Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p>
|
||||||
|
|
|
@ -22,7 +22,7 @@ header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
|
||||||
if ( !current_user_can('upload_files') )
|
if ( !current_user_can('upload_files') )
|
||||||
wp_die(__('You do not have permission to upload files.'));
|
wp_die(__('You do not have permission to upload files.'));
|
||||||
|
|
||||||
// just fetch the detail form for that attachment
|
// just fetch the detail form for that attachment
|
||||||
if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
|
if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
|
||||||
echo get_media_item($id);
|
echo get_media_item($id);
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -554,9 +554,9 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
|
|
||||||
/* TinyMCE */
|
/* TinyMCE */
|
||||||
.wp_themeSkin *,
|
.wp_themeSkin *,
|
||||||
.wp_themeSkin a:hover,
|
.wp_themeSkin a:hover,
|
||||||
.wp_themeSkin a:link,
|
.wp_themeSkin a:link,
|
||||||
.wp_themeSkin a:visited,
|
.wp_themeSkin a:visited,
|
||||||
.wp_themeSkin a:active {
|
.wp_themeSkin a:active {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
@ -577,13 +577,13 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
.wp_themeSkin .mceButton {
|
.wp_themeSkin .mceButton {
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
border-color: #83B4D5;
|
border-color: #83B4D5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin a.mceButtonEnabled:hover,
|
.wp_themeSkin a.mceButtonEnabled:hover,
|
||||||
.wp_themeSkin a.mceButtonActive,
|
.wp_themeSkin a.mceButtonActive,
|
||||||
.wp_themeSkin a.mceButtonSelected {
|
.wp_themeSkin a.mceButtonSelected {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
|
@ -600,7 +600,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxSelected .mceText {
|
.wp_themeSkin .mceListBoxSelected .mceText {
|
||||||
|
@ -608,18 +608,18 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||||
.wp_themeSkin .mceListBoxHover .mceText {
|
.wp_themeSkin .mceListBoxHover .mceText {
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin select.mceListBox {
|
.wp_themeSkin select.mceListBox {
|
||||||
border-color: #b3c7e1;
|
border-color: #b3c7e1;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SplitButton */
|
/* SplitButton */
|
||||||
.wp_themeSkin .mceSplitButton a.mceAction,
|
.wp_themeSkin .mceSplitButton a.mceAction,
|
||||||
.wp_themeSkin .mceSplitButton a.mceOpen {
|
.wp_themeSkin .mceSplitButton a.mceOpen {
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
border-color: #83B4D5;
|
border-color: #83B4D5;
|
||||||
|
@ -631,7 +631,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceSplitButtonActive {
|
.wp_themeSkin .mceSplitButtonActive {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
|
@ -670,7 +670,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceMenu .mceText {
|
.wp_themeSkin .mceMenu .mceText {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
||||||
|
@ -681,7 +681,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #aaa;
|
background-color: #aaa;
|
||||||
}
|
}
|
||||||
.wp_themeSkin .mceMenuItemTitle a {
|
.wp_themeSkin .mceMenuItemTitle a {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
border-bottom-color: #aaa;
|
border-bottom-color: #aaa;
|
||||||
}
|
}
|
||||||
.wp_themeSkin .mceMenuItemTitle span.mceText {
|
.wp_themeSkin .mceMenuItemTitle span.mceText {
|
||||||
|
|
|
@ -37,7 +37,7 @@ input.disabled, textarea.disabled {
|
||||||
|
|
||||||
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a,
|
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a,
|
||||||
#dragHelper li.widget-list-control-item h4.widget-title a,
|
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||||
#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover,
|
#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover,
|
||||||
#plugin-information .action-button a, #plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
#plugin-information .action-button a, #plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
@ -526,9 +526,9 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
|
|
||||||
/* TinyMCE */
|
/* TinyMCE */
|
||||||
.wp_themeSkin *,
|
.wp_themeSkin *,
|
||||||
.wp_themeSkin a:hover,
|
.wp_themeSkin a:hover,
|
||||||
.wp_themeSkin a:link,
|
.wp_themeSkin a:link,
|
||||||
.wp_themeSkin a:visited,
|
.wp_themeSkin a:visited,
|
||||||
.wp_themeSkin a:active {
|
.wp_themeSkin a:active {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
@ -549,13 +549,13 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
.wp_themeSkin .mceButton {
|
.wp_themeSkin .mceButton {
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
border-color: #abc0fb;
|
border-color: #abc0fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin a.mceButtonEnabled:hover,
|
.wp_themeSkin a.mceButtonEnabled:hover,
|
||||||
.wp_themeSkin a.mceButtonActive,
|
.wp_themeSkin a.mceButtonActive,
|
||||||
.wp_themeSkin a.mceButtonSelected {
|
.wp_themeSkin a.mceButtonSelected {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
|
@ -572,7 +572,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
||||||
.wp_themeSkin .mceListBoxSelected .mceText {
|
.wp_themeSkin .mceListBoxSelected .mceText {
|
||||||
|
@ -580,18 +580,18 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||||
.wp_themeSkin .mceListBoxHover .mceText {
|
.wp_themeSkin .mceListBoxHover .mceText {
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin select.mceListBox {
|
.wp_themeSkin select.mceListBox {
|
||||||
border-color: #b3c7e1;
|
border-color: #b3c7e1;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SplitButton */
|
/* SplitButton */
|
||||||
.wp_themeSkin .mceSplitButton a.mceAction,
|
.wp_themeSkin .mceSplitButton a.mceAction,
|
||||||
.wp_themeSkin .mceSplitButton a.mceOpen {
|
.wp_themeSkin .mceSplitButton a.mceOpen {
|
||||||
background-color: #e9e8e8;
|
background-color: #e9e8e8;
|
||||||
border-color: #abc0fb;
|
border-color: #abc0fb;
|
||||||
|
@ -603,7 +603,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
border-color: #7789ba !important;
|
border-color: #7789ba !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceSplitButtonActive {
|
.wp_themeSkin .mceSplitButtonActive {
|
||||||
background-color: #d6d8da;
|
background-color: #d6d8da;
|
||||||
|
@ -642,7 +642,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceMenu .mceText {
|
.wp_themeSkin .mceMenu .mceText {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
||||||
|
@ -653,7 +653,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
||||||
background-color: #aaa;
|
background-color: #aaa;
|
||||||
}
|
}
|
||||||
.wp_themeSkin .mceMenuItemTitle a {
|
.wp_themeSkin .mceMenuItemTitle a {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
border-bottom-color: #aaa;
|
border-bottom-color: #aaa;
|
||||||
}
|
}
|
||||||
.wp_themeSkin .mceMenuItemTitle span.mceText {
|
.wp_themeSkin .mceMenuItemTitle span.mceText {
|
||||||
|
|
|
@ -25,7 +25,7 @@ h3.dashboard-widget-title span {
|
||||||
div.dashboard-widget-submit input {
|
div.dashboard-widget-submit input {
|
||||||
font-family: sans-serif !important;
|
font-family: sans-serif !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard-widgets .widget_rss ul li a {
|
#dashboard-widgets .widget_rss ul li a {
|
||||||
float:right;
|
float:right;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
|
|
|
@ -66,7 +66,7 @@ div#dashboard-widgets {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dashboard-widget-holder {
|
div.dashboard-widget-holder {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -157,7 +157,7 @@ div.dashboard-widget-submit input {
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl {
|
div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl {
|
||||||
|
|
|
@ -8,7 +8,7 @@ textarea, input, select { font-family: sans-serif; }
|
||||||
|
|
||||||
.textleft { text-align: right; }
|
.textleft { text-align: right; }
|
||||||
.textright { text-align: left; }
|
.textright { text-align: left; }
|
||||||
|
|
||||||
.wrap h2 { font-family: sans-serif; }
|
.wrap h2 { font-family: sans-serif; }
|
||||||
|
|
||||||
.widefat td {
|
.widefat td {
|
||||||
|
|
|
@ -3,8 +3,8 @@ body, td {
|
||||||
font-family: Tahoma,Verdana,sans-serif;
|
font-family: Tahoma,Verdana,sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpcontent #sidemenu li a {
|
#wpcontent #sidemenu li a {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
|
@ -59,7 +59,7 @@ p#widget-search, p#post-search {
|
||||||
/* IE6 */
|
/* IE6 */
|
||||||
|
|
||||||
/* Search box gets stuck to the right, hidden outside view */
|
/* Search box gets stuck to the right, hidden outside view */
|
||||||
* html #post-search, * html #widget-search {
|
* html #post-search, * html #widget-search {
|
||||||
height: 1% !important;
|
height: 1% !important;
|
||||||
right: 600px !important;
|
right: 600px !important;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ p#widget-search, p#post-search {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bad floating in the sub-sub-sub menu makes links un-clickable */
|
/* Bad floating in the sub-sub-sub menu makes links un-clickable */
|
||||||
* html .subsubsub li {
|
* html .subsubsub li {
|
||||||
display: block; float: right; margin: 0 2px;
|
display: block; float: right; margin: 0 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,15 +85,15 @@ p#widget-search, p#post-search {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Theme selector on theme edit page gets stuck to the left, hidden outside view */
|
/* Theme selector on theme edit page gets stuck to the left, hidden outside view */
|
||||||
* html #themeselector {
|
* html #themeselector {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Template edit area floats beneath template list, gets RTLed */
|
/* Template edit area floats beneath template list, gets RTLed */
|
||||||
* html #template {
|
* html #template {
|
||||||
float: right;
|
float: right;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 755px !important;
|
width: 755px !important;
|
||||||
}
|
}
|
||||||
* html #template #newcontent {
|
* html #template #newcontent {
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
|
|
|
@ -30,7 +30,7 @@ form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0;}
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-top: -6px;
|
margin-top: -6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ ul#sidemenu {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
padding: 0 25px 0 0;
|
padding: 0 25px 0 0;
|
||||||
margin: 5px 3px 5px 5px;
|
margin: 5px 3px 5px 5px;
|
||||||
}
|
}
|
||||||
.align .field input {
|
.align .field input {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
#posting {
|
#posting {
|
||||||
position: static !important;
|
position: static !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,44 +2,44 @@ body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#viewsite {
|
#viewsite {
|
||||||
right:auto; left: 8px;
|
right:auto; left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#menu {
|
ul#menu {
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-tabs-nav li {
|
.ui-tabs-nav li {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#posting {
|
div#posting {
|
||||||
padding-right:16px; padding-left: 0;
|
padding-right:16px; padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#categories {
|
div#categories {
|
||||||
right: auto; left: 16px;
|
right: auto; left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#categories h2 {
|
div#categories h2 {
|
||||||
margin:0.5em 1em 0.5em 0;
|
margin:0.5em 1em 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jaxtag {
|
#jaxtag {
|
||||||
padding-right :1em; padding-left: 0;
|
padding-right :1em; padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input#newtag {
|
input#newtag {
|
||||||
margin-left: 4px; width: 100px;
|
margin-left: 4px; width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo_directions span {
|
#photo_directions span {
|
||||||
right: auto; left: 3px
|
right: auto; left: 3px
|
||||||
}
|
}
|
||||||
|
|
||||||
#TB_ajaxContent #options {
|
#TB_ajaxContent #options {
|
||||||
right: auto; left: 25px;
|
right: auto; left: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#TB_ajaxContent {
|
#TB_ajaxContent {
|
||||||
|
@ -50,10 +50,10 @@ input#newtag {
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video_split #extra_fields {
|
.video_split #extra_fields {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video_split .editor_area {
|
.video_split .editor_area {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
|
@ -86,7 +86,7 @@ img { border: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-tabs-nav a:hover,.ui-tabs-nav a:focus,.ui-tabs-nav a:active,
|
.ui-tabs-nav a:hover,.ui-tabs-nav a:focus,.ui-tabs-nav a:active,
|
||||||
.ui-tabs-nav .ui-tabs-selected a:link,.ui-tabs-nav .ui-tabs-selected a:visited {
|
.ui-tabs-nav .ui-tabs-selected a:link,.ui-tabs-nav .ui-tabs-selected a:visited {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ div#posting h2 {
|
||||||
#img_container a, #img_container a:link, #img_container a:visited {
|
#img_container a, #img_container a:link, #img_container a:visited {
|
||||||
border: 2px solid #ccc;
|
border: 2px solid #ccc;
|
||||||
margin: 0 4px 4px 0;
|
margin: 0 4px 4px 0;
|
||||||
}
|
}
|
||||||
#img_container a:hover, #img_container a:active {
|
#img_container a:hover, #img_container a:active {
|
||||||
border: 2px solid #000;
|
border: 2px solid #000;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ div#categories h2 {
|
||||||
#tagsdiv #newtag {
|
#tagsdiv #newtag {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
width: 16em;
|
width: 16em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jaxtag {
|
#jaxtag {
|
||||||
|
|
|
@ -112,8 +112,8 @@ li.widget-list-control-item {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.widget-list-control-item h4,
|
li.widget-list-control-item h4,
|
||||||
#dragHelper li.widget-list-control-item h4,
|
#dragHelper li.widget-list-control-item h4,
|
||||||
li.widget-sortable h4 {
|
li.widget-sortable h4 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Custom_Image_Header {
|
||||||
$step = $this->step();
|
$step = $this->step();
|
||||||
if ( 1 == $step )
|
if ( 1 == $step )
|
||||||
wp_enqueue_script('colorpicker');
|
wp_enqueue_script('colorpicker');
|
||||||
elseif ( 2 == $step )
|
elseif ( 2 == $step )
|
||||||
wp_enqueue_script('cropper');
|
wp_enqueue_script('cropper');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,8 +105,8 @@ else
|
||||||
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
||||||
<p>
|
<p>
|
||||||
<select name='post_status' id='post_status' tabindex='4'>
|
<select name='post_status' id='post_status' tabindex='4'>
|
||||||
<?php
|
<?php
|
||||||
// only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability)
|
// only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability)
|
||||||
if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) :
|
if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) :
|
||||||
?>
|
?>
|
||||||
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
||||||
|
|
|
@ -11,7 +11,7 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||||
foreach( (array) $_GET['delete'] as $cat_ID ) {
|
foreach( (array) $_GET['delete'] as $cat_ID ) {
|
||||||
$cat_name = get_term_field('name', $cat_ID, 'link_category');
|
$cat_name = get_term_field('name', $cat_ID, 'link_category');
|
||||||
$default_cat_id = get_option('default_link_category');
|
$default_cat_id = get_option('default_link_category');
|
||||||
|
|
||||||
// Don't delete the default cats.
|
// Don't delete the default cats.
|
||||||
if ( $cat_ID == $default_cat_id )
|
if ( $cat_ID == $default_cat_id )
|
||||||
wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
|
wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
|
||||||
|
|
|
@ -116,7 +116,7 @@ if ( ( 'edit' == $action) && current_user_can('manage_links') )
|
||||||
|
|
||||||
<div id="categories-all" class="ui-tabs-panel">
|
<div id="categories-all" class="ui-tabs-panel">
|
||||||
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
||||||
<?php
|
<?php
|
||||||
if ( isset($link->link_id) )
|
if ( isset($link->link_id) )
|
||||||
wp_link_category_checklist($link->link_id);
|
wp_link_category_checklist($link->link_id);
|
||||||
else
|
else
|
||||||
|
|
|
@ -90,7 +90,7 @@ else
|
||||||
<select name='post_status' tabindex='4' id='post_status'>
|
<select name='post_status' tabindex='4' id='post_status'>
|
||||||
<?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
|
<?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
|
||||||
// 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)
|
// 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)
|
||||||
if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) :
|
if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) :
|
||||||
?>
|
?>
|
||||||
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -101,7 +101,7 @@ if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND
|
||||||
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
|
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<?php if ( current_user_can( 'publish_posts' ) ) : ?>
|
<?php if ( current_user_can( 'publish_posts' ) ) : ?>
|
||||||
<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
|
<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ endif; ?>
|
||||||
<h2><?php _e('Advanced Options'); ?></h2>
|
<h2><?php _e('Advanced Options'); ?></h2>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
function page_custom_meta_box($post){
|
function page_custom_meta_box($post){
|
||||||
?>
|
?>
|
||||||
<div id="postcustomstuff">
|
<div id="postcustomstuff">
|
||||||
|
@ -238,7 +238,7 @@ function page_comments_status_meta_box($post){
|
||||||
<?php _e('Allow Comments') ?></label></p>
|
<?php _e('Allow Comments') ?></label></p>
|
||||||
<p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
|
<p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
|
||||||
<p><?php _e('These settings apply to this page only. “Pings” are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
|
<p><?php _e('These settings apply to this page only. “Pings” are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
add_meta_box('pagecommentstatusdiv', __('Comments & Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
|
add_meta_box('pagecommentstatusdiv', __('Comments & Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ foreach ( $wp_styles->registered as $style ) {
|
||||||
if ( isset($style->extra['rtl']) && $style->extra['rtl'] ) {
|
if ( isset($style->extra['rtl']) && $style->extra['rtl'] ) {
|
||||||
if ( is_bool( $style->extra['rtl'] ) )
|
if ( is_bool( $style->extra['rtl'] ) )
|
||||||
$rtl_href = str_replace( '.css', '-rtl.css', $src );
|
$rtl_href = str_replace( '.css', '-rtl.css', $src );
|
||||||
else
|
else
|
||||||
$rtl_href = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->extra['rtl'] );
|
$rtl_href = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->extra['rtl'] );
|
||||||
|
|
||||||
$defaults .= '{ "url" : "' . $rtl_href . '?ver=' . $ver . '" },' . "\n";
|
$defaults .= '{ "url" : "' . $rtl_href . '?ver=' . $ver . '" },' . "\n";
|
||||||
|
|
|
@ -224,10 +224,10 @@ class MT_Import {
|
||||||
if ( 0 != count($post->categories) ) {
|
if ( 0 != count($post->categories) ) {
|
||||||
wp_create_categories($post->categories, $post_id);
|
wp_create_categories($post->categories, $post_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add tags or keywords
|
// Add tags or keywords
|
||||||
if ( 1 < strlen($post->post_keywords) ) {
|
if ( 1 < strlen($post->post_keywords) ) {
|
||||||
// Keywords exist.
|
// Keywords exist.
|
||||||
printf(__('<br />Adding tags <i>%s</i>...'), stripslashes($post->post_keywords));
|
printf(__('<br />Adding tags <i>%s</i>...'), stripslashes($post->post_keywords));
|
||||||
wp_add_post_tags($post_id, $post->post_keywords);
|
wp_add_post_tags($post_id, $post->post_keywords);
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ class WP_Import {
|
||||||
$post_ID = (int) $this->get_tag( $post, 'wp:post_id' );
|
$post_ID = (int) $this->get_tag( $post, 'wp:post_id' );
|
||||||
if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already
|
if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
set_time_limit( 60 );
|
set_time_limit( 60 );
|
||||||
|
|
||||||
// There are only ever one of these
|
// There are only ever one of these
|
||||||
|
|
|
@ -103,7 +103,7 @@ function check_all_rows() {
|
||||||
|
|
||||||
if ( in_array( intval($category->term_id), $this->hybrids_ids ) )
|
if ( in_array( intval($category->term_id), $this->hybrids_ids ) )
|
||||||
echo ' <a href="#note"> * </a>';
|
echo ' <a href="#note"> * </a>';
|
||||||
|
|
||||||
if ( isset($hier[$category->term_id]) )
|
if ( isset($hier[$category->term_id]) )
|
||||||
$this->_category_children($category, $hier); ?></li>
|
$this->_category_children($category, $hier); ?></li>
|
||||||
<?php }
|
<?php }
|
||||||
|
@ -243,7 +243,7 @@ function check_all_tagrows() {
|
||||||
|
|
||||||
if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) )
|
if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) )
|
||||||
$id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug));
|
$id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug));
|
||||||
|
|
||||||
$id = $id['term_taxonomy_id'];
|
$id = $id['term_taxonomy_id'];
|
||||||
$posts = get_objects_in_term($category->term_id, 'category');
|
$posts = get_objects_in_term($category->term_id, 'category');
|
||||||
$term_order = 0;
|
$term_order = 0;
|
||||||
|
@ -252,7 +252,7 @@ function check_all_tagrows() {
|
||||||
$values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order);
|
$values[] = $wpdb->prepare( "(%d, %d, %d)", $post, $id, $term_order);
|
||||||
clean_post_cache($post);
|
clean_post_cache($post);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $values ) {
|
if ( $values ) {
|
||||||
$wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)");
|
$wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)");
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ function check_all_tagrows() {
|
||||||
echo __('Converted successfully.') . "</li>\n";
|
echo __('Converted successfully.') . "</li>\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if tag already exists, add it to all posts in the category
|
// if tag already exists, add it to all posts in the category
|
||||||
if ( $tag_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $category->term_id) ) ) {
|
if ( $tag_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $category->term_id) ) ) {
|
||||||
$objects_ids = get_objects_in_term($category->term_id, 'category');
|
$objects_ids = get_objects_in_term($category->term_id, 'category');
|
||||||
|
|
|
@ -120,12 +120,12 @@ function wp_insert_link($linkdata) {
|
||||||
|
|
||||||
if ( $update ) {
|
if ( $update ) {
|
||||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_url = %s,
|
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_url = %s,
|
||||||
link_name = %s, link_image = %s, link_target = %s,
|
link_name = %s, link_image = %s, link_target = %s,
|
||||||
link_visible = %s, link_description = %s, link_rating = %s,
|
link_visible = %s, link_description = %s, link_rating = %s,
|
||||||
link_rel = %s, link_notes = %s, link_rss = %s
|
link_rel = %s, link_notes = %s, link_rss = %s
|
||||||
WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id) );
|
WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id) );
|
||||||
} else {
|
} else {
|
||||||
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
|
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
|
||||||
$link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss) );
|
$link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss) );
|
||||||
$link_id = (int) $wpdb->insert_id;
|
$link_id = (int) $wpdb->insert_id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
class WP_Filesystem_Base{
|
class WP_Filesystem_Base{
|
||||||
var $verbose = false;
|
var $verbose = false;
|
||||||
var $cache = array();
|
var $cache = array();
|
||||||
|
|
||||||
var $method = '';
|
var $method = '';
|
||||||
|
|
||||||
function abspath() {
|
function abspath() {
|
||||||
if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false )
|
if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false )
|
||||||
return FTP_BASE;
|
return FTP_BASE;
|
||||||
return $this->find_folder(ABSPATH);
|
return $this->find_folder(ABSPATH);
|
||||||
}
|
}
|
||||||
function wp_content_dir() {
|
function wp_content_dir() {
|
||||||
if ( defined('FTP_CONTENT_DIR') && strpos($this->method, 'ftp') !== false )
|
if ( defined('FTP_CONTENT_DIR') && strpos($this->method, 'ftp') !== false )
|
||||||
return FTP_CONTENT_DIR;
|
return FTP_CONTENT_DIR;
|
||||||
return $this->find_folder(WP_CONTENT_DIR);
|
return $this->find_folder(WP_CONTENT_DIR);
|
||||||
}
|
}
|
||||||
function wp_plugins_dir() {
|
function wp_plugins_dir() {
|
||||||
if ( defined('FTP_PLUGIN_DIR') && strpos($this->method, 'ftp') !== false )
|
if ( defined('FTP_PLUGIN_DIR') && strpos($this->method, 'ftp') !== false )
|
||||||
return FTP_PLUGIN_DIR;
|
return FTP_PLUGIN_DIR;
|
||||||
return $this->find_folder(WP_PLUGIN_DIR);
|
return $this->find_folder(WP_PLUGIN_DIR);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class WP_Filesystem_Base{
|
||||||
$this->verbose = $echo;
|
$this->verbose = $echo;
|
||||||
return $this->abspath();
|
return $this->abspath();
|
||||||
}
|
}
|
||||||
|
|
||||||
function find_folder($folder) {
|
function find_folder($folder) {
|
||||||
$folder = str_replace('\\', '/', $folder); //Windows Sanitiation
|
$folder = str_replace('\\', '/', $folder); //Windows Sanitiation
|
||||||
if ( isset($this->cache[ $folder ] ) )
|
if ( isset($this->cache[ $folder ] ) )
|
||||||
|
@ -47,26 +47,26 @@ class WP_Filesystem_Base{
|
||||||
$this->cache[ $folder ] = $return;
|
$this->cache[ $folder ] = $return;
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assumes $folder is windows sanitized;
|
// Assumes $folder is windows sanitized;
|
||||||
// Assumes that the drive letter is safe to be stripped off, Should not be a problem for windows servers.
|
// Assumes that the drive letter is safe to be stripped off, Should not be a problem for windows servers.
|
||||||
function search_for_folder($folder, $base = '.', $loop = false ) {
|
function search_for_folder($folder, $base = '.', $loop = false ) {
|
||||||
if ( empty( $base ) || '.' == $base )
|
if ( empty( $base ) || '.' == $base )
|
||||||
$base = trailingslashit($this->cwd());
|
$base = trailingslashit($this->cwd());
|
||||||
|
|
||||||
$folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there.
|
$folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there.
|
||||||
|
|
||||||
$folder_parts = explode('/', $folder);
|
$folder_parts = explode('/', $folder);
|
||||||
$last_path = $folder_parts[ count($folder_parts) - 1 ];
|
$last_path = $folder_parts[ count($folder_parts) - 1 ];
|
||||||
|
|
||||||
$files = $this->dirlist( $base );
|
$files = $this->dirlist( $base );
|
||||||
|
|
||||||
foreach ( $folder_parts as $key ) {
|
foreach ( $folder_parts as $key ) {
|
||||||
if ( $key == $last_path )
|
if ( $key == $last_path )
|
||||||
continue; //We want this to be caught by the next code block.
|
continue; //We want this to be caught by the next code block.
|
||||||
|
|
||||||
//Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder,
|
//Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder,
|
||||||
// If its found, change into it and follow through looking for it.
|
// If its found, change into it and follow through looking for it.
|
||||||
// If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on.
|
// If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on.
|
||||||
// If it reaches the end, and still cant find it, it'll return false for the entire function.
|
// If it reaches the end, and still cant find it, it'll return false for the entire function.
|
||||||
if( isset($files[ $key ]) ){
|
if( isset($files[ $key ]) ){
|
||||||
|
@ -78,7 +78,7 @@ class WP_Filesystem_Base{
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Only check this as a last resort, to prevent locating the incorrect install. All above proceeedures will fail quickly if this is the right branch to take.
|
//Only check this as a last resort, to prevent locating the incorrect install. All above proceeedures will fail quickly if this is the right branch to take.
|
||||||
if(isset( $files[ $last_path ] ) ) {
|
if(isset( $files[ $last_path ] ) ) {
|
||||||
if( $this->verbose )
|
if( $this->verbose )
|
||||||
|
@ -88,10 +88,10 @@ class WP_Filesystem_Base{
|
||||||
if( $loop )
|
if( $loop )
|
||||||
return false;//Prevent tihs function looping again.
|
return false;//Prevent tihs function looping again.
|
||||||
//As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups.
|
//As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups.
|
||||||
return $this->search_for_folder($folder, '/', true);
|
return $this->search_for_folder($folder, '/', true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Common Helper functions.
|
//Common Helper functions.
|
||||||
function gethchmod($file){
|
function gethchmod($file){
|
||||||
//From the PHP.net page for ...?
|
//From the PHP.net page for ...?
|
||||||
|
@ -143,11 +143,11 @@ class WP_Filesystem_Base{
|
||||||
for($i=0; $i < count($attarray); $i++)
|
for($i=0; $i < count($attarray); $i++)
|
||||||
if($key = array_search($attarray[$i], $legal))
|
if($key = array_search($attarray[$i], $legal))
|
||||||
$realmode .= $legal[$key];
|
$realmode .= $legal[$key];
|
||||||
|
|
||||||
$mode = str_pad($realmode, 9, '-');
|
$mode = str_pad($realmode, 9, '-');
|
||||||
$trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1');
|
$trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1');
|
||||||
$mode = strtr($mode,$trans);
|
$mode = strtr($mode,$trans);
|
||||||
|
|
||||||
$newmode = '';
|
$newmode = '';
|
||||||
$newmode .= $mode[0] + $mode[1] + $mode[2];
|
$newmode .= $mode[0] + $mode[1] + $mode[2];
|
||||||
$newmode .= $mode[3] + $mode[4] + $mode[5];
|
$newmode .= $mode[3] + $mode[4] + $mode[5];
|
||||||
|
|
|
@ -82,7 +82,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base{
|
||||||
function setDefaultPermissions($perm) {
|
function setDefaultPermissions($perm) {
|
||||||
$this->permission = $perm;
|
$this->permission = $perm;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_contents($file, $type = '', $resumepos = 0 ){
|
function get_contents($file, $type = '', $resumepos = 0 ){
|
||||||
if( empty($type) ){
|
if( empty($type) ){
|
||||||
$extension = substr(strrchr($file, "."), 1);
|
$extension = substr(strrchr($file, "."), 1);
|
||||||
|
|
|
@ -125,7 +125,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||||
|
|
||||||
$temp = wp_tempnam( $file );
|
$temp = wp_tempnam( $file );
|
||||||
if ( ! $temphandle = fopen($temp, 'w+') ){
|
if ( ! $temphandle = fopen($temp, 'w+') ){
|
||||||
unlink($temp);
|
unlink($temp);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
fwrite($temphandle, $contents);
|
fwrite($temphandle, $contents);
|
||||||
|
@ -146,7 +146,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||||
function chdir($file) {
|
function chdir($file) {
|
||||||
return $this->ftp->chdir($file);
|
return $this->ftp->chdir($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
function chgrp($file, $group, $recursive = false ) {
|
function chgrp($file, $group, $recursive = false ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,7 +435,7 @@ function wp_dashboard_plugins_output() {
|
||||||
$link = clean_url($link);
|
$link = clean_url($link);
|
||||||
if( preg_match('|/([^/]+?)/?$|', $link, $matches) )
|
if( preg_match('|/([^/]+?)/?$|', $link, $matches) )
|
||||||
$slug = $matches[1];
|
$slug = $matches[1];
|
||||||
else
|
else
|
||||||
$slug = '';
|
$slug = '';
|
||||||
|
|
||||||
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) .
|
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) .
|
||||||
|
|
|
@ -285,11 +285,11 @@ function wp_handle_sideload( &$file, $overrides = false ) {
|
||||||
return $upload_error_handler( $file, $uploads['error'] );
|
return $upload_error_handler( $file, $uploads['error'] );
|
||||||
|
|
||||||
$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
|
$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
|
||||||
|
|
||||||
// Strip the query strings.
|
// Strip the query strings.
|
||||||
$filename = str_replace('?','-', $filename);
|
$filename = str_replace('?','-', $filename);
|
||||||
$filename = str_replace('&','-', $filename);
|
$filename = str_replace('&','-', $filename);
|
||||||
|
|
||||||
// Move the file to the uploads dir
|
// Move the file to the uploads dir
|
||||||
$new_file = $uploads['path'] . "/$filename";
|
$new_file = $uploads['path'] . "/$filename";
|
||||||
if ( false === @ rename( $file['tmp_name'], $new_file ) ) {
|
if ( false === @ rename( $file['tmp_name'], $new_file ) ) {
|
||||||
|
@ -471,7 +471,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = false)
|
||||||
|
|
||||||
if ( 'direct' == $type )
|
if ( 'direct' == $type )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if( ! $credentials = get_option('ftp_credentials') )
|
if( ! $credentials = get_option('ftp_credentials') )
|
||||||
$credentials = array();
|
$credentials = array();
|
||||||
// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
|
// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.
|
* If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.
|
||||||
*/
|
*/
|
||||||
function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
|
function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
|
||||||
|
|
||||||
$thumbpath = image_resize( $file, $max_side, $max_side );
|
$thumbpath = image_resize( $file, $max_side, $max_side );
|
||||||
return apply_filters( 'wp_create_thumbnail', $thumbpath );
|
return apply_filters( 'wp_create_thumbnail', $thumbpath );
|
||||||
}
|
}
|
||||||
|
@ -98,13 +98,13 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||||
// make thumbnails and other intermediate sizes
|
// make thumbnails and other intermediate sizes
|
||||||
$sizes = array('thumbnail', 'medium');
|
$sizes = array('thumbnail', 'medium');
|
||||||
$sizes = apply_filters('intermediate_image_sizes', $sizes);
|
$sizes = apply_filters('intermediate_image_sizes', $sizes);
|
||||||
|
|
||||||
foreach ($sizes as $size) {
|
foreach ($sizes as $size) {
|
||||||
$resized = image_make_intermediate_size( $file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );
|
$resized = image_make_intermediate_size( $file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );
|
||||||
if ( $resized )
|
if ( $resized )
|
||||||
$metadata['sizes'][$size] = $resized;
|
$metadata['sizes'][$size] = $resized;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch additional metadata from exif/iptc
|
// fetch additional metadata from exif/iptc
|
||||||
$image_meta = wp_read_image_metadata( $file );
|
$image_meta = wp_read_image_metadata( $file );
|
||||||
if ($image_meta)
|
if ($image_meta)
|
||||||
|
@ -275,7 +275,7 @@ function file_is_displayable_image($path) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$result = true;
|
$result = true;
|
||||||
|
|
||||||
return apply_filters('file_is_displayable_image', $result, $path);
|
return apply_filters('file_is_displayable_image', $result, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1288,7 +1288,7 @@ function type_form_image() {
|
||||||
$alt = __('Image Caption');
|
$alt = __('Image Caption');
|
||||||
$alt_help = __('Also used as alternate text for the image');
|
$alt_help = __('Also used as alternate text for the image');
|
||||||
}
|
}
|
||||||
|
|
||||||
return '
|
return '
|
||||||
<table class="describe"><tbody>
|
<table class="describe"><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -164,7 +164,7 @@ function show_message($message) {
|
||||||
if( is_wp_error($message) ){
|
if( is_wp_error($message) ){
|
||||||
if( $message->get_error_data() )
|
if( $message->get_error_data() )
|
||||||
$message = $message->get_error_message() . ': ' . $message->get_error_data();
|
$message = $message->get_error_message() . ': ' . $message->get_error_data();
|
||||||
else
|
else
|
||||||
$message = $message->get_error_message();
|
$message = $message->get_error_message();
|
||||||
}
|
}
|
||||||
echo "<p>$message</p>\n";
|
echo "<p>$message</p>\n";
|
||||||
|
|
|
@ -8,7 +8,7 @@ function plugins_api($action, $args = NULL) {
|
||||||
|
|
||||||
$args = apply_filters('plugins_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter.
|
$args = apply_filters('plugins_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter.
|
||||||
$res = apply_filters('plugins_api', false, $action, $args); //NOTE: Allows a plugin to completely override the builtin WordPress.org API.
|
$res = apply_filters('plugins_api', false, $action, $args); //NOTE: Allows a plugin to completely override the builtin WordPress.org API.
|
||||||
|
|
||||||
if ( ! $res ) {
|
if ( ! $res ) {
|
||||||
$request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array(), array(), array('action' => $action, 'request' => serialize($args)) );
|
$request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array(), array(), array('action' => $action, 'request' => serialize($args)) );
|
||||||
$res = unserialize($request['body']);
|
$res = unserialize($request['body']);
|
||||||
|
@ -67,16 +67,16 @@ function install_search($page) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p><?php _e('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> via this page.') ?></p>
|
<p><?php _e('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> via this page.') ?></p>
|
||||||
|
|
||||||
<h4><?php _e('Search') ?></h4>
|
<h4><?php _e('Search') ?></h4>
|
||||||
<?php install_search_form() ?>
|
<?php install_search_form() ?>
|
||||||
<p> <?php _e('You may search based on 3 criteria:') ?><br />
|
<p> <?php _e('You may search based on 3 criteria:') ?><br />
|
||||||
<?php _e('<strong>Term:</strong> Searches plugins names and descriptions for the specified term') ?><br />
|
<?php _e('<strong>Term:</strong> Searches plugins names and descriptions for the specified term') ?><br />
|
||||||
<?php _e('<strong>Tag:</strong> Searches for plugins tagged as such') ?><br />
|
<?php _e('<strong>Tag:</strong> Searches for plugins tagged as such') ?><br />
|
||||||
<?php _e('<strong>Author:</strong> Searches for plugins created by the Author, or which the Author contributed to.') ?></p>
|
<?php _e('<strong>Author:</strong> Searches for plugins created by the Author, or which the Author contributed to.') ?></p>
|
||||||
|
|
||||||
<h4><?php _e('Popular tags') ?></h4>
|
<h4><?php _e('Popular tags') ?></h4>
|
||||||
<p><?php _e('You may also search based on these popular tags, These are tags which are most popular on WordPress.org') ?></p>
|
<p><?php _e('You may also search based on these popular tags, These are tags which are most popular on WordPress.org') ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
@ -142,7 +142,7 @@ function install_upload_custom($page){
|
||||||
|
|
||||||
function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
||||||
global $tab;
|
global $tab;
|
||||||
|
|
||||||
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
|
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
|
||||||
$term = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
|
$term = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
|
||||||
|
|
||||||
|
@ -166,9 +166,9 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
||||||
'total' => $totalpages,
|
'total' => $totalpages,
|
||||||
'current' => $page
|
'current' => $page
|
||||||
));
|
));
|
||||||
|
|
||||||
if ( $page_links )
|
if ( $page_links )
|
||||||
echo "\t\t<div class='tablenav-pages'>$page_links</div>";
|
echo "\t\t<div class='tablenav-pages'>$page_links</div>";
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
@ -186,7 +186,7 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
||||||
<?php
|
<?php
|
||||||
if( empty($plugins) )
|
if( empty($plugins) )
|
||||||
echo '<tr><td colspan="5">', __('No plugins match your request.'), '</td></tr>';
|
echo '<tr><td colspan="5">', __('No plugins match your request.'), '</td></tr>';
|
||||||
|
|
||||||
foreach( (array) $plugins as $plugin ){
|
foreach( (array) $plugins as $plugin ){
|
||||||
if ( is_object($plugin) )
|
if ( is_object($plugin) )
|
||||||
$plugin = (array) $plugin;
|
$plugin = (array) $plugin;
|
||||||
|
@ -194,23 +194,23 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
||||||
$title = wp_kses($plugin['name'], $plugins_allowedtags);
|
$title = wp_kses($plugin['name'], $plugins_allowedtags);
|
||||||
$description = wp_kses($plugin['description'], $plugins_allowedtags);
|
$description = wp_kses($plugin['description'], $plugins_allowedtags);
|
||||||
$version = wp_kses($plugin['version'], $plugins_allowedtags);
|
$version = wp_kses($plugin['version'], $plugins_allowedtags);
|
||||||
|
|
||||||
$name = strip_tags($title . ' ' . $version);
|
$name = strip_tags($title . ' ' . $version);
|
||||||
|
|
||||||
$author = $plugin['author'];
|
$author = $plugin['author'];
|
||||||
if( ! empty($plugin['author']) )
|
if( ! empty($plugin['author']) )
|
||||||
$author = ' <cite>' . sprintf( __('By %s'), $author ) . '.</cite>';
|
$author = ' <cite>' . sprintf( __('By %s'), $author ) . '.</cite>';
|
||||||
|
|
||||||
$author = wp_kses($author, $plugins_allowedtags);
|
$author = wp_kses($author, $plugins_allowedtags);
|
||||||
|
|
||||||
if( isset($plugin['homepage']) )
|
if( isset($plugin['homepage']) )
|
||||||
$title = '<a target="_blank" href="' . $plugin['homepage'] . '">' . $title . '</a>';
|
$title = '<a target="_blank" href="' . $plugin['homepage'] . '">' . $title . '</a>';
|
||||||
|
|
||||||
$action_links = array();
|
$action_links = array();
|
||||||
$action_links[] = '<a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .
|
$action_links[] = '<a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .
|
||||||
'&TB_iframe=true&width=600&height=800') . '" class="thickbox onclick" title="' .
|
'&TB_iframe=true&width=600&height=800') . '" class="thickbox onclick" title="' .
|
||||||
attribute_escape($name) . '">' . __('Install') . '</a>';
|
attribute_escape($name) . '">' . __('Install') . '</a>';
|
||||||
|
|
||||||
$action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
|
$action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -278,18 +278,18 @@ echo '
|
||||||
add_action('install_plugins_pre_plugin-information', 'install_plugin_information');
|
add_action('install_plugins_pre_plugin-information', 'install_plugin_information');
|
||||||
function install_plugin_information() {
|
function install_plugin_information() {
|
||||||
global $tab;
|
global $tab;
|
||||||
|
|
||||||
$api = plugins_api('plugin_information', array('slug' => $_REQUEST['plugin']));
|
$api = plugins_api('plugin_information', array('slug' => $_REQUEST['plugin']));
|
||||||
|
|
||||||
$section = isset($_REQUEST['section']) ? $_REQUEST['section'] : 'description'; //Default to the Description tab, Do not translate, API returns English.
|
$section = isset($_REQUEST['section']) ? $_REQUEST['section'] : 'description'; //Default to the Description tab, Do not translate, API returns English.
|
||||||
if( empty($section) || ! isset($api->sections[ $section ]) )
|
if( empty($section) || ! isset($api->sections[ $section ]) )
|
||||||
$section = array_shift( $section_titles = array_keys((array)$api->sections) );
|
$section = array_shift( $section_titles = array_keys((array)$api->sections) );
|
||||||
|
|
||||||
install_iframe_header();
|
install_iframe_header();
|
||||||
echo "<div id='$tab-header'>\n";
|
echo "<div id='$tab-header'>\n";
|
||||||
echo "<ul id='sidemenu'>\n";
|
echo "<ul id='sidemenu'>\n";
|
||||||
foreach ( (array)$api->sections as $section_name => $content ) {
|
foreach ( (array)$api->sections as $section_name => $content ) {
|
||||||
|
|
||||||
$title = $section_name;
|
$title = $section_name;
|
||||||
$title[0] = strtoupper($title[0]); //Capitalize first character.
|
$title[0] = strtoupper($title[0]); //Capitalize first character.
|
||||||
$title = str_replace('_', ' ', $title);
|
$title = str_replace('_', ' ', $title);
|
||||||
|
@ -302,7 +302,7 @@ function install_plugin_information() {
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="alignright fyi">
|
<div class="alignright fyi">
|
||||||
<?php if ( ! empty($api->download_link) ) : ?>
|
<?php if ( ! empty($api->download_link) ) : ?>
|
||||||
|
@ -349,7 +349,7 @@ function install_plugin_information() {
|
||||||
<?php endif; if ( ! empty($api->author) ) : ?>
|
<?php endif; if ( ! empty($api->author) ) : ?>
|
||||||
<li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li>
|
<li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li>
|
||||||
<?php endif; if ( ! empty($api->last_updated) ) : ?>
|
<?php endif; if ( ! empty($api->last_updated) ) : ?>
|
||||||
<li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php
|
<li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php
|
||||||
printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li>
|
printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li>
|
||||||
<?php endif; if ( ! empty($api->requires) ) : ?>
|
<?php endif; if ( ! empty($api->requires) ) : ?>
|
||||||
<li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li>
|
<li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li>
|
||||||
|
@ -380,14 +380,14 @@ function install_plugin_information() {
|
||||||
$title = $section_name;
|
$title = $section_name;
|
||||||
$title[0] = strtoupper($title[0]);
|
$title[0] = strtoupper($title[0]);
|
||||||
$title = str_replace('_', ' ', $title);
|
$title = str_replace('_', ' ', $title);
|
||||||
|
|
||||||
$content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/');
|
$content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/');
|
||||||
$content = links_add_target($content, '_blank');
|
$content = links_add_target($content, '_blank');
|
||||||
|
|
||||||
$san_title = attribute_escape(sanitize_title_with_dashes($title));
|
$san_title = attribute_escape(sanitize_title_with_dashes($title));
|
||||||
|
|
||||||
$display = ( $section_name == $section ) ? 'block' : 'none';
|
$display = ( $section_name == $section ) ? 'block' : 'none';
|
||||||
|
|
||||||
echo "\t<div id='section-{$san_title}' style='display: {$display};'>\n";
|
echo "\t<div id='section-{$san_title}' style='display: {$display};'>\n";
|
||||||
echo "\t\t<h2 class='long-header'>$title</h2>";
|
echo "\t\t<h2 class='long-header'>$title</h2>";
|
||||||
echo $content;
|
echo $content;
|
||||||
|
@ -406,9 +406,9 @@ function install_plugin() {
|
||||||
check_admin_referer('install-plugin_' . $plugin);
|
check_admin_referer('install-plugin_' . $plugin);
|
||||||
|
|
||||||
install_iframe_header();
|
install_iframe_header();
|
||||||
|
|
||||||
$api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
|
$api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
|
||||||
|
|
||||||
echo '<div class="wrap">';
|
echo '<div class="wrap">';
|
||||||
echo '<h2>', sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ), '</h2>';
|
echo '<h2>', sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ), '</h2>';
|
||||||
|
|
||||||
|
@ -419,14 +419,14 @@ function install_plugin() {
|
||||||
}
|
}
|
||||||
function do_plugin_install($download_url = '', $plugin_information = NULL) {
|
function do_plugin_install($download_url = '', $plugin_information = NULL) {
|
||||||
global $wp_filesystem;
|
global $wp_filesystem;
|
||||||
|
|
||||||
if ( empty($download_url) ) {
|
if ( empty($download_url) ) {
|
||||||
show_message( __('No plugin Specified') );
|
show_message( __('No plugin Specified') );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||||
|
|
||||||
$url = 'plugin-install.php?tab=install';
|
$url = 'plugin-install.php?tab=install';
|
||||||
$url = add_query_arg(array('plugin' => $plugin, 'plugin_name' => $_REQUEST['plugin_name'], 'download_url' => $_REQUEST['download_url']), $url);
|
$url = add_query_arg(array('plugin' => $plugin, 'plugin_name' => $_REQUEST['plugin_name'], 'download_url' => $_REQUEST['download_url']), $url);
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ function do_plugin_install($download_url = '', $plugin_information = NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = wp_install_plugin( $download_url, 'show_message' );
|
$result = wp_install_plugin( $download_url, 'show_message' );
|
||||||
|
|
||||||
if ( is_wp_error($result) ) {
|
if ( is_wp_error($result) ) {
|
||||||
show_message($result);
|
show_message($result);
|
||||||
show_message( __('Installation Failed') );
|
show_message( __('Installation Failed') );
|
||||||
|
@ -489,7 +489,7 @@ function wp_install_plugin($package, $feedback = '') {
|
||||||
$content_dir = $wp_filesystem->wp_content_dir();
|
$content_dir = $wp_filesystem->wp_content_dir();
|
||||||
if( empty($content_dir) )
|
if( empty($content_dir) )
|
||||||
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
||||||
|
|
||||||
$plugins_dir = trailingslashit( $plugins_dir );
|
$plugins_dir = trailingslashit( $plugins_dir );
|
||||||
$content_dir = trailingslashit( $content_dir );
|
$content_dir = trailingslashit( $content_dir );
|
||||||
|
|
||||||
|
@ -512,23 +512,23 @@ function wp_install_plugin($package, $feedback = '') {
|
||||||
apply_filters('install_feedback', __('Unpacking the plugin package'));
|
apply_filters('install_feedback', __('Unpacking the plugin package'));
|
||||||
// Unzip package to working directory
|
// Unzip package to working directory
|
||||||
$result = unzip_file($download_file, $working_dir);
|
$result = unzip_file($download_file, $working_dir);
|
||||||
|
|
||||||
// Once extracted, delete the package
|
// Once extracted, delete the package
|
||||||
unlink($download_file);
|
unlink($download_file);
|
||||||
|
|
||||||
if ( is_wp_error($result) ) {
|
if ( is_wp_error($result) ) {
|
||||||
$wp_filesystem->delete($working_dir, true);
|
$wp_filesystem->delete($working_dir, true);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get a list of the directories in the working directory before we delete it, We need to know the new folder for the plugin
|
//Get a list of the directories in the working directory before we delete it, We need to know the new folder for the plugin
|
||||||
$filelist = array_keys( $wp_filesystem->dirlist($working_dir) );
|
$filelist = array_keys( $wp_filesystem->dirlist($working_dir) );
|
||||||
|
|
||||||
if( $wp_filesystem->exists( $plugins_dir . $filelist[0] ) ) {
|
if( $wp_filesystem->exists( $plugins_dir . $filelist[0] ) ) {
|
||||||
$wp_filesystem->delete($working_dir, true);
|
$wp_filesystem->delete($working_dir, true);
|
||||||
return new WP_Error('install_folder_exists', __('Folder allready exists.'), $filelist[0] );
|
return new WP_Error('install_folder_exists', __('Folder allready exists.'), $filelist[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_filters('install_feedback', __('Installing the plugin'));
|
apply_filters('install_feedback', __('Installing the plugin'));
|
||||||
// Copy new version of plugin into place.
|
// Copy new version of plugin into place.
|
||||||
$result = copy_dir($working_dir, $plugins_dir);
|
$result = copy_dir($working_dir, $plugins_dir);
|
||||||
|
@ -542,10 +542,10 @@ function wp_install_plugin($package, $feedback = '') {
|
||||||
|
|
||||||
// Remove working directory
|
// Remove working directory
|
||||||
$wp_filesystem->delete($working_dir, true);
|
$wp_filesystem->delete($working_dir, true);
|
||||||
|
|
||||||
if( empty($filelist) )
|
if( empty($filelist) )
|
||||||
return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup.
|
return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup.
|
||||||
|
|
||||||
$folder = $filelist[0];
|
$folder = $filelist[0];
|
||||||
$plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash
|
$plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash
|
||||||
$pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
|
$pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
|
||||||
|
|
|
@ -90,20 +90,20 @@ function get_plugin_data( $plugin_file ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'Name' => $name, 'PluginURI' => $uri, 'Description' => $description,
|
'Name' => $name, 'PluginURI' => $uri, 'Description' => $description,
|
||||||
'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version,
|
'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version,
|
||||||
'TextDomain' => $text_domain, 'DomainPath' => $domain_path
|
'TextDomain' => $text_domain, 'DomainPath' => $domain_path
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_plugins($plugin_folder = '') {
|
function get_plugins($plugin_folder = '') {
|
||||||
|
|
||||||
if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') )
|
if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') )
|
||||||
$cache_plugins = array();
|
$cache_plugins = array();
|
||||||
|
|
||||||
if ( isset($cache_plugins[ $plugin_folder ]) )
|
if ( isset($cache_plugins[ $plugin_folder ]) )
|
||||||
return $cache_plugins[ $plugin_folder ];
|
return $cache_plugins[ $plugin_folder ];
|
||||||
|
|
||||||
$wp_plugins = array ();
|
$wp_plugins = array ();
|
||||||
$plugin_root = WP_PLUGIN_DIR;
|
$plugin_root = WP_PLUGIN_DIR;
|
||||||
if( !empty($plugin_folder) )
|
if( !empty($plugin_folder) )
|
||||||
|
@ -151,8 +151,8 @@ function get_plugins($plugin_folder = '') {
|
||||||
|
|
||||||
uasort( $wp_plugins, create_function( '$a, $b', 'return strnatcasecmp( $a["Name"], $b["Name"] );' ));
|
uasort( $wp_plugins, create_function( '$a, $b', 'return strnatcasecmp( $a["Name"], $b["Name"] );' ));
|
||||||
|
|
||||||
$cache_plugins[ $plugin_folder ] = $wp_plugins;
|
$cache_plugins[ $plugin_folder ] = $wp_plugins;
|
||||||
wp_cache_set('plugins', $cache_plugins, 'plugins');
|
wp_cache_set('plugins', $cache_plugins, 'plugins');
|
||||||
|
|
||||||
return $wp_plugins;
|
return $wp_plugins;
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ function delete_plugins($plugins, $redirect = '' ) {
|
||||||
$plugins_dir = $wp_filesystem->wp_plugins_dir();
|
$plugins_dir = $wp_filesystem->wp_plugins_dir();
|
||||||
if ( empty($plugins_dir) )
|
if ( empty($plugins_dir) )
|
||||||
return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.'));
|
return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.'));
|
||||||
|
|
||||||
$plugins_dir = trailingslashit( $plugins_dir );
|
$plugins_dir = trailingslashit( $plugins_dir );
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
@ -295,14 +295,14 @@ function delete_plugins($plugins, $redirect = '' ) {
|
||||||
$deleted = $wp_filesystem->delete($this_plugin_dir, true);
|
$deleted = $wp_filesystem->delete($this_plugin_dir, true);
|
||||||
else
|
else
|
||||||
$deleted = $wp_filesystem->delete($plugins_dir . $plugin_file);
|
$deleted = $wp_filesystem->delete($plugins_dir . $plugin_file);
|
||||||
|
|
||||||
if ( ! $deleted )
|
if ( ! $deleted )
|
||||||
$errors[] = $plugin_file;
|
$errors[] = $plugin_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! empty($errors) )
|
if( ! empty($errors) )
|
||||||
return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) );
|
return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ function validate_active_plugins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Invalid is any plugin that is deactivated due to error.
|
//Invalid is any plugin that is deactivated due to error.
|
||||||
$invalid = array();
|
$invalid = array();
|
||||||
|
|
||||||
// If a plugin file does not exist, remove it from the list of active
|
// If a plugin file does not exist, remove it from the list of active
|
||||||
// plugins.
|
// plugins.
|
||||||
|
|
|
@ -59,7 +59,7 @@ function _wp_translate_postdata( $update = false ) {
|
||||||
|
|
||||||
$previous_status = get_post_field('post_status', $_POST['ID']);
|
$previous_status = get_post_field('post_status', $_POST['ID']);
|
||||||
|
|
||||||
// Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
|
// Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
|
||||||
// Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts.
|
// Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts.
|
||||||
if ( 'page' == $_POST['post_type'] ) {
|
if ( 'page' == $_POST['post_type'] ) {
|
||||||
if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ) )
|
if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ) )
|
||||||
|
@ -356,7 +356,7 @@ function add_meta( $post_ID ) {
|
||||||
|
|
||||||
wp_cache_delete($post_ID, 'post_meta');
|
wp_cache_delete($post_ID, 'post_meta');
|
||||||
|
|
||||||
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta
|
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta
|
||||||
(post_id,meta_key,meta_value ) VALUES (%s, %s, %s)",
|
(post_id,meta_key,meta_value ) VALUES (%s, %s, %s)",
|
||||||
$post_ID, $metakey, $metavalue) );
|
$post_ID, $metakey, $metavalue) );
|
||||||
return $wpdb->insert_id;
|
return $wpdb->insert_id;
|
||||||
|
@ -420,7 +420,7 @@ function update_meta( $meta_id, $meta_key, $meta_value ) {
|
||||||
|
|
||||||
$meta_value = maybe_serialize( stripslashes( $meta_value ));
|
$meta_value = maybe_serialize( stripslashes( $meta_value ));
|
||||||
$meta_id = (int) $meta_id;
|
$meta_id = (int) $meta_id;
|
||||||
|
|
||||||
$data = compact( 'meta_key', 'meta_value' );
|
$data = compact( 'meta_key', 'meta_value' );
|
||||||
$where = compact( 'meta_id' );
|
$where = compact( 'meta_id' );
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ function get_sample_permalink($id, $title=null, $name = null) {
|
||||||
if (in_array($post->post_status, array('draft', 'pending'))) {
|
if (in_array($post->post_status, array('draft', 'pending'))) {
|
||||||
$post->post_status = 'publish';
|
$post->post_status = 'publish';
|
||||||
$post->post_date = date('Y-m-d H:i:s');
|
$post->post_date = date('Y-m-d H:i:s');
|
||||||
$post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID);
|
$post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the user wants to set a new name -- override the current one
|
// If the user wants to set a new name -- override the current one
|
||||||
|
|
|
@ -154,11 +154,11 @@ CREATE TABLE $wpdb->usermeta (
|
||||||
|
|
||||||
function populate_options() {
|
function populate_options() {
|
||||||
global $wpdb, $wp_db_version;
|
global $wpdb, $wp_db_version;
|
||||||
|
|
||||||
$guessurl = wp_guess_url();
|
$guessurl = wp_guess_url();
|
||||||
|
|
||||||
do_action('populate_options');
|
do_action('populate_options');
|
||||||
|
|
||||||
add_option('siteurl', $guessurl);
|
add_option('siteurl', $guessurl);
|
||||||
add_option('blogname', __('My Blog'));
|
add_option('blogname', __('My Blog'));
|
||||||
add_option('blogdescription', __('Just another WordPress weblog'));
|
add_option('blogdescription', __('Just another WordPress weblog'));
|
||||||
|
@ -257,7 +257,7 @@ function populate_options() {
|
||||||
add_option('avatar_default', 'mystery');
|
add_option('avatar_default', 'mystery');
|
||||||
add_option('enable_app', 0);
|
add_option('enable_app', 0);
|
||||||
add_option('enable_xmlrpc', 0);
|
add_option('enable_xmlrpc', 0);
|
||||||
|
|
||||||
// Delete unused options
|
// Delete unused options
|
||||||
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins');
|
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins');
|
||||||
foreach ($unusedoptions as $option) :
|
foreach ($unusedoptions as $option) :
|
||||||
|
|
|
@ -57,7 +57,7 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p
|
||||||
if ( $count >= $start )
|
if ( $count >= $start )
|
||||||
echo "\t" . _cat_row( $category, $level );
|
echo "\t" . _cat_row( $category, $level );
|
||||||
|
|
||||||
unset($categories[$i]); // Prune the working set
|
unset($categories[$i]); // Prune the working set
|
||||||
$count++;
|
$count++;
|
||||||
|
|
||||||
if ( isset($children[$category->term_id]) )
|
if ( isset($children[$category->term_id]) )
|
||||||
|
@ -191,7 +191,7 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select
|
||||||
$descendants_and_self = (int) $descendants_and_self;
|
$descendants_and_self = (int) $descendants_and_self;
|
||||||
|
|
||||||
$args = array();
|
$args = array();
|
||||||
|
|
||||||
if ( is_array( $selected_cats ) )
|
if ( is_array( $selected_cats ) )
|
||||||
$args['selected_cats'] = $selected_cats;
|
$args['selected_cats'] = $selected_cats;
|
||||||
elseif ( $post_id )
|
elseif ( $post_id )
|
||||||
|
@ -547,27 +547,27 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* arrange pages into two parts: top level pages and children_pages
|
* arrange pages into two parts: top level pages and children_pages
|
||||||
* children_pages is two dimensional array, eg.
|
* children_pages is two dimensional array, eg.
|
||||||
* children_pages[10][] contains all sub-pages whose parent is 10.
|
* children_pages[10][] contains all sub-pages whose parent is 10.
|
||||||
* It only takes O(N) to arrange this and it takes O(1) for subsequent lookup operations
|
* It only takes O(N) to arrange this and it takes O(1) for subsequent lookup operations
|
||||||
* If searching, ignore hierarchy and treat everything as top level
|
* If searching, ignore hierarchy and treat everything as top level
|
||||||
*/
|
*/
|
||||||
if ( empty($_GET['s']) ) {
|
if ( empty($_GET['s']) ) {
|
||||||
|
|
||||||
$top_level_pages = array();
|
$top_level_pages = array();
|
||||||
$children_pages = array();
|
$children_pages = array();
|
||||||
|
|
||||||
foreach ( $pages as $page ) {
|
foreach ( $pages as $page ) {
|
||||||
|
|
||||||
// catch and repair bad pages
|
// catch and repair bad pages
|
||||||
if ( $page->post_parent == $page->ID ) {
|
if ( $page->post_parent == $page->ID ) {
|
||||||
$page->post_parent = 0;
|
$page->post_parent = 0;
|
||||||
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) );
|
$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) );
|
||||||
clean_page_cache( $page->ID );
|
clean_page_cache( $page->ID );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 0 == $page->post_parent )
|
if ( 0 == $page->post_parent )
|
||||||
$top_level_pages[] = $page;
|
$top_level_pages[] = $page;
|
||||||
else
|
else
|
||||||
|
@ -580,7 +580,7 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$start = ($pagenum - 1) * $per_page;
|
$start = ($pagenum - 1) * $per_page;
|
||||||
$end = $start + $per_page;
|
$end = $start + $per_page;
|
||||||
|
|
||||||
foreach ( $pages as $page ) {
|
foreach ( $pages as $page ) {
|
||||||
if ( $count >= $end )
|
if ( $count >= $end )
|
||||||
break;
|
break;
|
||||||
|
@ -593,7 +593,7 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
|
||||||
if ( isset($children_pages) )
|
if ( isset($children_pages) )
|
||||||
_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
|
_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it is the last pagenum and there are orphaned pages, display them with paging as well
|
// if it is the last pagenum and there are orphaned pages, display them with paging as well
|
||||||
if ( isset($children_pages) && $count < $end ){
|
if ( isset($children_pages) && $count < $end ){
|
||||||
foreach( $children_pages as $orphans ){
|
foreach( $children_pages as $orphans ){
|
||||||
|
@ -613,18 +613,18 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
|
||||||
* together with paging support
|
* together with paging support
|
||||||
*/
|
*/
|
||||||
function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
|
function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
|
||||||
|
|
||||||
if ( ! isset( $children_pages[$parent] ) )
|
if ( ! isset( $children_pages[$parent] ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$start = ($pagenum - 1) * $per_page;
|
$start = ($pagenum - 1) * $per_page;
|
||||||
$end = $start + $per_page;
|
$end = $start + $per_page;
|
||||||
|
|
||||||
foreach ( $children_pages[$parent] as $page ) {
|
foreach ( $children_pages[$parent] as $page ) {
|
||||||
|
|
||||||
if ( $count >= $end )
|
if ( $count >= $end )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If the page starts in a subtree, print the parents.
|
// If the page starts in a subtree, print the parents.
|
||||||
if ( $count == $start && $page->post_parent > 0 ) {
|
if ( $count == $start && $page->post_parent > 0 ) {
|
||||||
$my_parents = array();
|
$my_parents = array();
|
||||||
|
@ -645,12 +645,12 @@ function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_
|
||||||
|
|
||||||
if ( $count >= $start )
|
if ( $count >= $start )
|
||||||
echo "\t" . display_page_row( $page, $level );
|
echo "\t" . display_page_row( $page, $level );
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
|
|
||||||
_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
|
_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page );
|
||||||
}
|
}
|
||||||
|
|
||||||
unset( $children_pages[$parent] ); //required in order to keep track of orphans
|
unset( $children_pages[$parent] ); //required in order to keep track of orphans
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ function user_row( $user_object, $style = '', $role = '' ) {
|
||||||
global $wp_roles;
|
global $wp_roles;
|
||||||
|
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
|
|
||||||
if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) )
|
if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) )
|
||||||
$user_object = new WP_User( (int) $user_object );
|
$user_object = new WP_User( (int) $user_object );
|
||||||
$email = $user_object->user_email;
|
$email = $user_object->user_email;
|
||||||
|
@ -747,14 +747,14 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
||||||
$post_link = "<a href='" . get_comment_link() . "'>";
|
$post_link = "<a href='" . get_comment_link() . "'>";
|
||||||
|
|
||||||
$post_link .= get_the_title($comment->comment_post_ID) . '</a>';
|
$post_link .= get_the_title($comment->comment_post_ID) . '</a>';
|
||||||
|
|
||||||
$edit_link_start = "<a class='row-title' href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>";
|
$edit_link_start = "<a class='row-title' href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>";
|
||||||
$edit_link_end = '</a>';
|
$edit_link_end = '</a>';
|
||||||
} else {
|
} else {
|
||||||
$post_link = get_the_title($comment->comment_post_ID);
|
$post_link = get_the_title($comment->comment_post_ID);
|
||||||
$edit_link_start = $edit_link_end ='';
|
$edit_link_start = $edit_link_end ='';
|
||||||
}
|
}
|
||||||
|
|
||||||
$author_url = get_comment_author_url();
|
$author_url = get_comment_author_url();
|
||||||
if ( 'http://' == $author_url )
|
if ( 'http://' == $author_url )
|
||||||
$author_url = '';
|
$author_url = '';
|
||||||
|
@ -788,7 +788,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
||||||
<?php comment_author_email_link() ?> |
|
<?php comment_author_email_link() ?> |
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a href="edit-comments.php?s=<?php comment_author_IP() ?>&mode=detail"><?php comment_author_IP() ?></a>
|
<a href="edit-comments.php?s=<?php comment_author_IP() ?>&mode=detail"><?php comment_author_IP() ?></a>
|
||||||
<?php endif; //current_user_can?>
|
<?php endif; //current_user_can?>
|
||||||
</p>
|
</p>
|
||||||
<?php if ( 'detail' == $mode ) comment_text(); ?>
|
<?php if ( 'detail' == $mode ) comment_text(); ?>
|
||||||
<p><?php printf(__('From %1$s, %2$s'), $post_link, $ptime) ?></p>
|
<p><?php printf(__('From %1$s, %2$s'), $post_link, $ptime) ?></p>
|
||||||
|
@ -1171,7 +1171,7 @@ function wp_remember_old_slug() {
|
||||||
function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') {
|
function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') {
|
||||||
global $wp_meta_boxes;
|
global $wp_meta_boxes;
|
||||||
|
|
||||||
|
|
||||||
if ( !isset($wp_meta_boxes) )
|
if ( !isset($wp_meta_boxes) )
|
||||||
$wp_meta_boxes = array();
|
$wp_meta_boxes = array();
|
||||||
if ( !isset($wp_meta_boxes[$page]) )
|
if ( !isset($wp_meta_boxes[$page]) )
|
||||||
|
|
|
@ -127,7 +127,7 @@ function update_core($from, $to) {
|
||||||
$wp_filesystem->delete($from, true);
|
$wp_filesystem->delete($from, true);
|
||||||
return new WP_Error('insane_distro', __('The update could not be unpacked') );
|
return new WP_Error('insane_distro', __('The update could not be unpacked') );
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_filters('update_feedback', __('Installing the latest version'));
|
apply_filters('update_feedback', __('Installing the latest version'));
|
||||||
|
|
||||||
// Create maintenance file to signal that we are upgrading
|
// Create maintenance file to signal that we are upgrading
|
||||||
|
|
|
@ -74,7 +74,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_data['Name'], $details_url, $r->new_version);
|
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_data['Name'], $details_url, $r->new_version);
|
||||||
else
|
else
|
||||||
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $details_url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) );
|
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $details_url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) );
|
||||||
|
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
}
|
}
|
||||||
add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
|
add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );
|
||||||
|
@ -109,7 +109,7 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||||
$content_dir = $wp_filesystem->wp_content_dir();
|
$content_dir = $wp_filesystem->wp_content_dir();
|
||||||
if( empty($content_dir) )
|
if( empty($content_dir) )
|
||||||
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
||||||
|
|
||||||
$plugins_dir = trailingslashit( $plugins_dir );
|
$plugins_dir = trailingslashit( $plugins_dir );
|
||||||
$content_dir = trailingslashit( $content_dir );
|
$content_dir = trailingslashit( $content_dir );
|
||||||
|
|
||||||
|
@ -136,10 +136,10 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||||
apply_filters('update_feedback', __('Unpacking the update'));
|
apply_filters('update_feedback', __('Unpacking the update'));
|
||||||
// Unzip package to working directory
|
// Unzip package to working directory
|
||||||
$result = unzip_file($download_file, $working_dir);
|
$result = unzip_file($download_file, $working_dir);
|
||||||
|
|
||||||
// Once extracted, delete the package
|
// Once extracted, delete the package
|
||||||
unlink($download_file);
|
unlink($download_file);
|
||||||
|
|
||||||
if ( is_wp_error($result) ) {
|
if ( is_wp_error($result) ) {
|
||||||
$wp_filesystem->delete($working_dir, true);
|
$wp_filesystem->delete($working_dir, true);
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -154,7 +154,7 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||||
// Remove the existing plugin.
|
// Remove the existing plugin.
|
||||||
apply_filters('update_feedback', __('Removing the old version of the plugin'));
|
apply_filters('update_feedback', __('Removing the old version of the plugin'));
|
||||||
$this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
|
$this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
|
||||||
|
|
||||||
// If plugin is in its own directory, recursively delete the directory.
|
// If plugin is in its own directory, recursively delete the directory.
|
||||||
if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder
|
if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder
|
||||||
$deleted = $wp_filesystem->delete($this_plugin_dir, true);
|
$deleted = $wp_filesystem->delete($this_plugin_dir, true);
|
||||||
|
@ -182,10 +182,10 @@ function wp_update_plugin($plugin, $feedback = '') {
|
||||||
|
|
||||||
// Force refresh of plugin update information
|
// Force refresh of plugin update information
|
||||||
delete_option('update_plugins');
|
delete_option('update_plugins');
|
||||||
|
|
||||||
if( empty($filelist) )
|
if( empty($filelist) )
|
||||||
return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup.
|
return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup.
|
||||||
|
|
||||||
$folder = $filelist[0];
|
$folder = $filelist[0];
|
||||||
$plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash
|
$plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash
|
||||||
$pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
|
$pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
|
||||||
|
@ -223,7 +223,7 @@ function wp_update_core($feedback = '') {
|
||||||
$content_dir = $wp_filesystem->wp_content_dir();
|
$content_dir = $wp_filesystem->wp_content_dir();
|
||||||
if( empty($content_dir) )
|
if( empty($content_dir) )
|
||||||
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).'));
|
||||||
|
|
||||||
$wp_dir = trailingslashit( $wp_dir );
|
$wp_dir = trailingslashit( $wp_dir );
|
||||||
$content_dir = trailingslashit( $content_dir );
|
$content_dir = trailingslashit( $content_dir );
|
||||||
|
|
||||||
|
|
|
@ -571,7 +571,7 @@ function upgrade_230() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES
|
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES
|
||||||
(%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) );
|
(%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) );
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
@ -732,7 +732,7 @@ function upgrade_250() {
|
||||||
if ( $wp_current_db_version < 6689 ) {
|
if ( $wp_current_db_version < 6689 ) {
|
||||||
populate_roles_250();
|
populate_roles_250();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgrade_251() {
|
function upgrade_251() {
|
||||||
|
|
|
@ -84,7 +84,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
|
||||||
'edit' => $widget['id'],
|
'edit' => $widget['id'],
|
||||||
'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ),
|
'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ),
|
||||||
) ) );
|
) ) );
|
||||||
|
|
||||||
$widget_control_template = '<textarea rows="1" cols="1">' . htmlspecialchars( $widget_control_template ) . '</textarea>';
|
$widget_control_template = '<textarea rows="1" cols="1">' . htmlspecialchars( $widget_control_template ) . '</textarea>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ jQuery(document).ready( function() {
|
||||||
|
|
||||||
this.each(function() {
|
this.each(function() {
|
||||||
var el = JQ(this), txt;
|
var el = JQ(this), txt;
|
||||||
|
|
||||||
if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
|
if ( txt = el.attr('title') ) el.attr('tip', txt).removeAttr('title');
|
||||||
else return;
|
else return;
|
||||||
el.find('img').removeAttr('alt');
|
el.find('img').removeAttr('alt');
|
||||||
|
|
|
@ -15,7 +15,7 @@ switchEditors = {
|
||||||
saveCallback : function(el, content, body) {
|
saveCallback : function(el, content, body) {
|
||||||
|
|
||||||
document.getElementById(el).style.color = '#fff';
|
document.getElementById(el).style.color = '#fff';
|
||||||
if ( tinyMCE.activeEditor.isHidden() )
|
if ( tinyMCE.activeEditor.isHidden() )
|
||||||
content = document.getElementById(el).value;
|
content = document.getElementById(el).value;
|
||||||
else
|
else
|
||||||
content = this.pre_wpautop(content);
|
content = this.pre_wpautop(content);
|
||||||
|
@ -169,7 +169,7 @@ switchEditors = {
|
||||||
pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]');
|
pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[caption$1[/caption]');
|
||||||
// pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 ');
|
// pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 ');
|
||||||
|
|
||||||
// Fix the pre|script tags
|
// Fix the pre|script tags
|
||||||
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
|
pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
|
||||||
a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
|
a = a.replace(/<br ?\/?>[\r\n]*/g, '\n');
|
||||||
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
|
return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '\n');
|
||||||
|
|
|
@ -7,7 +7,7 @@ function send_to_editor(h) {
|
||||||
|
|
||||||
if ( h.indexOf('[caption') != -1 )
|
if ( h.indexOf('[caption') != -1 )
|
||||||
h = ed.plugins.wpeditimage._do_shcode(h);
|
h = ed.plugins.wpeditimage._do_shcode(h);
|
||||||
|
|
||||||
ed.execCommand('mceInsertContent', false, h);
|
ed.execCommand('mceInsertContent', false, h);
|
||||||
} else
|
} else
|
||||||
edInsertContent(edCanvas, h);
|
edInsertContent(edCanvas, h);
|
||||||
|
@ -40,7 +40,7 @@ jQuery(function($) {
|
||||||
$(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
|
$(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery('a.thickbox').click(function(){
|
jQuery('a.thickbox').click(function(){
|
||||||
if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) {
|
if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) {
|
||||||
tinyMCE.get('content').focus();
|
tinyMCE.get('content').focus();
|
||||||
|
|
|
@ -8,7 +8,7 @@ function dvortr( $str ) {
|
||||||
'\',.pyfgcrl/=\\aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+|AOEUIDHTNS_:QJKXBMWVZ[]',
|
'\',.pyfgcrl/=\\aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+|AOEUIDHTNS_:QJKXBMWVZ[]',
|
||||||
'qwertyuiop[]\\asdfghjkl;\'zxcvbnm,./QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?-='
|
'qwertyuiop[]\\asdfghjkl;\'zxcvbnm,./QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?-='
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$j = clean_url( site_url( '/wp-includes/js/jquery/jquery.js' ) );
|
$j = clean_url( site_url( '/wp-includes/js/jquery/jquery.js' ) );
|
||||||
$n = wp_specialchars( $GLOBALS['current_user']->data->display_name );
|
$n = wp_specialchars( $GLOBALS['current_user']->data->display_name );
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
JQ('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '<span id="word-count">0</span>' ) );
|
JQ('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '<span id="word-count">0</span>' ) );
|
||||||
t.block = 0;
|
t.block = 0;
|
||||||
t.wc(co.val());
|
t.wc(co.val());
|
||||||
co.keyup( function(e) {
|
co.keyup( function(e) {
|
||||||
if ( e.keyCode == last ) return true;
|
if ( e.keyCode == last ) return true;
|
||||||
if ( 13 == e.keyCode || 8 == last || 46 == last ) t.wc(co.val());
|
if ( 13 == e.keyCode || 8 == last || 46 == last ) t.wc(co.val());
|
||||||
last = e.keyCode;
|
last = e.keyCode;
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
setTimeout( function() { t.block = 0; }, 2000 );
|
setTimeout( function() { t.block = 0; }, 2000 );
|
||||||
}, 1 );
|
}, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|
||||||
jQuery(document).ready( function(){ wpWordCount.init(); } );
|
jQuery(document).ready( function(){ wpWordCount.init(); } );
|
||||||
|
|
|
@ -4,7 +4,7 @@ wpGears = {
|
||||||
createStore : function() {
|
createStore : function() {
|
||||||
if ( 'undefined' == typeof google || ! google.gears ) return;
|
if ( 'undefined' == typeof google || ! google.gears ) return;
|
||||||
|
|
||||||
if ( 'undefined' == typeof localServer )
|
if ( 'undefined' == typeof localServer )
|
||||||
localServer = google.gears.factory.create("beta.localserver");
|
localServer = google.gears.factory.create("beta.localserver");
|
||||||
|
|
||||||
store = localServer.createManagedStore(this.storeName());
|
store = localServer.createManagedStore(this.storeName());
|
||||||
|
|
|
@ -74,21 +74,21 @@ if( !empty($action) ) {
|
||||||
case 'delete-selected':
|
case 'delete-selected':
|
||||||
if( ! current_user_can('delete_plugins') )
|
if( ! current_user_can('delete_plugins') )
|
||||||
wp_die(__('You do not have sufficient permissions to delete plugins for this blog.'));
|
wp_die(__('You do not have sufficient permissions to delete plugins for this blog.'));
|
||||||
|
|
||||||
check_admin_referer('bulk-manage-plugins');
|
check_admin_referer('bulk-manage-plugins');
|
||||||
|
|
||||||
$plugins = $_REQUEST['checked']; //$_POST = from the plugin form; $_GET = from the FTP details screen.
|
$plugins = $_REQUEST['checked']; //$_POST = from the plugin form; $_GET = from the FTP details screen.
|
||||||
include(ABSPATH . 'wp-admin/update.php');
|
include(ABSPATH . 'wp-admin/update.php');
|
||||||
|
|
||||||
$title = __('Delete Plugin');
|
$title = __('Delete Plugin');
|
||||||
$parent_file = 'plugins.php';
|
$parent_file = 'plugins.php';
|
||||||
|
|
||||||
if( ! isset($_REQUEST['verify-delete']) ) {
|
if( ! isset($_REQUEST['verify-delete']) ) {
|
||||||
wp_enqueue_script('jquery');
|
wp_enqueue_script('jquery');
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('Delete Plugin(s)'); ?></h2>
|
<h2><?php _e('Delete Plugin(s)'); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
$files_to_delete = $plugin_info = array();
|
$files_to_delete = $plugin_info = array();
|
||||||
foreach( (array) $plugins as $plugin ) {
|
foreach( (array) $plugins as $plugin ) {
|
||||||
|
@ -111,7 +111,7 @@ if( !empty($action) ) {
|
||||||
<p><?php _e('Deleting the selected plugins will remove the following plugin(s) and their files:'); ?></p>
|
<p><?php _e('Deleting the selected plugins will remove the following plugin(s) and their files:'); ?></p>
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
foreach( $plugin_info as $plugin )
|
foreach( $plugin_info as $plugin )
|
||||||
echo '<li>', sprintf(__('%s by %s'), $plugin['Name'], $plugin['Author']), '</li>';
|
echo '<li>', sprintf(__('%s by %s'), $plugin['Name'], $plugin['Author']), '</li>';
|
||||||
?>
|
?>
|
||||||
|
@ -140,7 +140,7 @@ if( !empty($action) ) {
|
||||||
echo '<li>' . str_replace(WP_PLUGIN_DIR, '', $file) . '</li>';
|
echo '<li>' . str_replace(WP_PLUGIN_DIR, '', $file) . '</li>';
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
require_once('admin-footer.php');
|
require_once('admin-footer.php');
|
||||||
|
@ -231,10 +231,10 @@ foreach( (array)$all_plugins as $plugin_file => $plugin_data) {
|
||||||
$plugin_data['Title'] = $plugin_data['Name'];
|
$plugin_data['Title'] = $plugin_data['Name'];
|
||||||
if ( !empty($plugin_data['PluginURI']) && !empty($plugin_data['Name']) )
|
if ( !empty($plugin_data['PluginURI']) && !empty($plugin_data['Name']) )
|
||||||
$plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '" title="'.__( 'Visit plugin homepage' ).'">' . $plugin_data['Name'] . '</a>';
|
$plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '" title="'.__( 'Visit plugin homepage' ).'">' . $plugin_data['Name'] . '</a>';
|
||||||
|
|
||||||
if ( ! empty($plugin_data['AuthorURI']) )
|
if ( ! empty($plugin_data['AuthorURI']) )
|
||||||
$plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '" title="'.__( 'Visit author homepage' ).'">' . $plugin_data['Author'] . '</a>';
|
$plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '" title="'.__( 'Visit author homepage' ).'">' . $plugin_data['Author'] . '</a>';
|
||||||
|
|
||||||
$plugin_data['Description'] = wptexturize( $plugin_data['Description'] );
|
$plugin_data['Description'] = wptexturize( $plugin_data['Description'] );
|
||||||
|
|
||||||
// Sanitize all displayed data
|
// Sanitize all displayed data
|
||||||
|
@ -298,17 +298,17 @@ function print_plugins_table($plugins, $context = '') {
|
||||||
<td class='name'>{$plugin_data['Title']}</td>
|
<td class='name'>{$plugin_data['Title']}</td>
|
||||||
<td class='vers'>{$plugin_data['Version']}</td>
|
<td class='vers'>{$plugin_data['Version']}</td>
|
||||||
<td class='desc'><p>{$plugin_data['Description']}</p></td>
|
<td class='desc'><p>{$plugin_data['Description']}</p></td>
|
||||||
<td class='togl action-links'>";
|
<td class='togl action-links'>";
|
||||||
if ( !empty($action_links) )
|
if ( !empty($action_links) )
|
||||||
echo implode(' | ', $action_links);
|
echo implode(' | ', $action_links);
|
||||||
echo '</td>
|
echo '</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
|
do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
} //End print_plugins_table()
|
} //End print_plugins_table()
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ function redirect_post($post_ID = '') {
|
||||||
if ( $_POST['referredby'] == 'redo' )
|
if ( $_POST['referredby'] == 'redo' )
|
||||||
$location = get_permalink( $post_ID );
|
$location = get_permalink( $post_ID );
|
||||||
elseif ( false !== strpos($location, 'edit.php') )
|
elseif ( false !== strpos($location, 'edit.php') )
|
||||||
$location = add_query_arg('posted', $post_ID, $location);
|
$location = add_query_arg('posted', $post_ID, $location);
|
||||||
elseif ( false !== strpos($location, 'wp-admin') )
|
elseif ( false !== strpos($location, 'wp-admin') )
|
||||||
$location = "post-new.php?posted=$post_ID";
|
$location = "post-new.php?posted=$post_ID";
|
||||||
} elseif ( isset($_POST['publish']) ) {
|
} elseif ( isset($_POST['publish']) ) {
|
||||||
|
|
|
@ -34,11 +34,11 @@ function press_it() {
|
||||||
$content = $_REQUEST['content'];
|
$content = $_REQUEST['content'];
|
||||||
|
|
||||||
foreach( (array) $_REQUEST['photo_src'] as $key => $image) {
|
foreach( (array) $_REQUEST['photo_src'] as $key => $image) {
|
||||||
|
|
||||||
// see if files exist in content - we don't want to upload non-used selected files.
|
// see if files exist in content - we don't want to upload non-used selected files.
|
||||||
if( strpos($_REQUEST['content'], $image) !== false ) {
|
if( strpos($_REQUEST['content'], $image) !== false ) {
|
||||||
$upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]);
|
$upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]);
|
||||||
|
|
||||||
// Replace the POSTED content <img> with correct uploaded ones.
|
// Replace the POSTED content <img> with correct uploaded ones.
|
||||||
// escape quote for matching
|
// escape quote for matching
|
||||||
$quoted = preg_quote2($image);
|
$quoted = preg_quote2($image);
|
||||||
|
@ -49,7 +49,7 @@ function press_it() {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "video":
|
case "video":
|
||||||
if($_REQUEST['embed_code'])
|
if($_REQUEST['embed_code'])
|
||||||
$content .= $_REQUEST['embed_code']."\n\n";
|
$content .= $_REQUEST['embed_code']."\n\n";
|
||||||
$content .= $_REQUEST['content'];
|
$content .= $_REQUEST['content'];
|
||||||
break;
|
break;
|
||||||
|
@ -73,7 +73,7 @@ function press_it() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// For submitted posts.
|
// For submitted posts.
|
||||||
if ( 'post' == $_REQUEST['action'] ) {
|
if ( 'post' == $_REQUEST['action'] ) {
|
||||||
check_admin_referer('press-this'); $post_ID = press_it(); ?>
|
check_admin_referer('press-this'); $post_ID = press_it(); ?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
|
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
|
||||||
|
@ -138,7 +138,7 @@ if($_REQUEST['ajax'] == 'thickbox') { ?>
|
||||||
<a href="#" class="select"><img src="<?php echo clean_url($image); ?>" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
|
<a href="#" class="select"><img src="<?php echo clean_url($image); ?>" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
|
||||||
|
|
||||||
<p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p>
|
<p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p>
|
||||||
<?php die;
|
<?php die;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_REQUEST['ajax'] == 'thickbox_url') { ?>
|
if($_REQUEST['ajax'] == 'thickbox_url') { ?>
|
||||||
|
@ -163,7 +163,7 @@ if($_REQUEST['ajax'] == 'thickbox_url') { ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
|
<p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
|
||||||
<?php die;
|
<?php die;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_REQUEST['ajax'] == 'video') { ?>
|
if($_REQUEST['ajax'] == 'video') { ?>
|
||||||
|
@ -176,7 +176,7 @@ if($_REQUEST['ajax'] == 'video') { ?>
|
||||||
|
|
||||||
if($_REQUEST['ajax'] == 'photo_images') {
|
if($_REQUEST['ajax'] == 'photo_images') {
|
||||||
function get_images_from_uri($uri) {
|
function get_images_from_uri($uri) {
|
||||||
if( preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com') )
|
if( preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com') )
|
||||||
return "'".$uri."'";
|
return "'".$uri."'";
|
||||||
|
|
||||||
$content = wp_remote_fopen($uri);
|
$content = wp_remote_fopen($uri);
|
||||||
|
@ -186,7 +186,7 @@ if($_REQUEST['ajax'] == 'photo_images') {
|
||||||
|
|
||||||
$pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is';
|
$pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is';
|
||||||
preg_match_all($pattern, $content, $matches);
|
preg_match_all($pattern, $content, $matches);
|
||||||
|
|
||||||
if ( empty($matches[1]) ) return '';
|
if ( empty($matches[1]) ) return '';
|
||||||
|
|
||||||
$sources = array();
|
$sources = array();
|
||||||
|
@ -198,15 +198,15 @@ if($_REQUEST['ajax'] == 'photo_images') {
|
||||||
$src = 'http://'.str_replace('//','/', $host['host'].'/'.$src);
|
$src = 'http://'.str_replace('//','/', $host['host'].'/'.$src);
|
||||||
else
|
else
|
||||||
$src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src);
|
$src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src);
|
||||||
|
|
||||||
$sources[] = clean_url($src);
|
$sources[] = clean_url($src);
|
||||||
}
|
}
|
||||||
return "'" . implode("','", $sources) . "'";
|
return "'" . implode("','", $sources) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = urldecode($url);
|
$url = urldecode($url);
|
||||||
$url = str_replace(' ', '%20', $url);
|
$url = str_replace(' ', '%20', $url);
|
||||||
echo 'new Array('.get_images_from_uri($url).')';
|
echo 'new Array('.get_images_from_uri($url).')';
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,12 +226,12 @@ if($_REQUEST['ajax'] == 'photo_js') { ?>
|
||||||
);
|
);
|
||||||
|
|
||||||
for (i = 0; i < my_src.length; i++) {
|
for (i = 0; i < my_src.length; i++) {
|
||||||
img = new Image();
|
img = new Image();
|
||||||
img.src = my_src[i];
|
img.src = my_src[i];
|
||||||
img_attr = 'id="img' + i + '"';
|
img_attr = 'id="img' + i + '"';
|
||||||
skip = false;
|
skip = false;
|
||||||
if (img.width && img.height) {
|
if (img.width && img.height) {
|
||||||
if (img.width * img.height < 2500)
|
if (img.width * img.height < 2500)
|
||||||
skip = true;
|
skip = true;
|
||||||
aspect = img.width / img.height;
|
aspect = img.width / img.height;
|
||||||
scale = (aspect > 1) ? (75 / img.width) : (75 / img.height);
|
scale = (aspect > 1) ? (75 / img.width) : (75 / img.height);
|
||||||
|
@ -303,7 +303,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
||||||
do_action('admin_head');
|
do_action('admin_head');
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php if ( user_can_richedit() ) {
|
<?php if ( user_can_richedit() ) {
|
||||||
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
||||||
// Add TinyMCE languages
|
// Add TinyMCE languages
|
||||||
@include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' );
|
@include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' );
|
||||||
|
@ -359,7 +359,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
||||||
jQuery(this).val( '' ).removeClass( 'form-input-tip' );
|
jQuery(this).val( '' ).removeClass( 'form-input-tip' );
|
||||||
});
|
});
|
||||||
jQuery('#newtag').blur(function() {
|
jQuery('#newtag').blur(function() {
|
||||||
if ( this.value == '' )
|
if ( this.value == '' )
|
||||||
jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' );
|
jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
||||||
jQuery('#extra_fields').show();
|
jQuery('#extra_fields').show();
|
||||||
jQuery('body').addClass('video_split');
|
jQuery('body').addClass('video_split');
|
||||||
jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() {
|
jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() {
|
||||||
<?php
|
<?php
|
||||||
$content = '';
|
$content = '';
|
||||||
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
|
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
|
||||||
list($domain, $video_id) = split("v=", $url);
|
list($domain, $video_id) = split("v=", $url);
|
||||||
|
@ -460,7 +460,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery('#menu li').click(function (){
|
jQuery('#menu li').click(function (){
|
||||||
tab_name = this.id.split('_');
|
tab_name = this.id.split('_');
|
||||||
tab_name = tab_name[0];
|
tab_name = tab_name[0];
|
||||||
show(tab_name);
|
show(tab_name);
|
||||||
|
@ -518,13 +518,13 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
||||||
<?php wp_category_checklist() ?>
|
<?php wp_category_checklist() ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><?php _e('Tags') ?></h2>
|
<h2><?php _e('Tags') ?></h2>
|
||||||
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
|
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
|
||||||
<div id="tagchecklist"></div>
|
<div id="tagchecklist"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<input type="submit" name="draft" value="<?php _e('Save') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
|
<input type="submit" name="draft" value="<?php _e('Save') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
|
||||||
<input type="submit" name="publish" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
|
<input type="submit" name="publish" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/>
|
||||||
<img src="images/loading-publish.gif" alt="" id="photo_saving" style="display:none;"/>
|
<img src="images/loading-publish.gif" alt="" id="photo_saving" style="display:none;"/>
|
||||||
|
|
|
@ -84,7 +84,7 @@ case 'diff' :
|
||||||
( !wp_get_post_revision( $left_revision->ID ) && !wp_get_post_revision( $right_revision->ID ) )
|
( !wp_get_post_revision( $left_revision->ID ) && !wp_get_post_revision( $right_revision->ID ) )
|
||||||
)
|
)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$post_title = '<a href="' . get_edit_post_link() . '">' . get_the_title() . '</a>';
|
$post_title = '<a href="' . get_edit_post_link() . '">' . get_the_title() . '</a>';
|
||||||
$h2 = sprintf( __( 'Compare Revisions of “%1$s”' ), $post_title );
|
$h2 = sprintf( __( 'Compare Revisions of “%1$s”' ), $post_title );
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ require_once( 'admin-header.php' );
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
|
|
||||||
// use get_post_to_edit filters?
|
// use get_post_to_edit filters?
|
||||||
$identical = true;
|
$identical = true;
|
||||||
foreach ( _wp_post_revision_fields() as $field => $field_title ) :
|
foreach ( _wp_post_revision_fields() as $field => $field_title ) :
|
||||||
if ( 'diff' == $action ) {
|
if ( 'diff' == $action ) {
|
||||||
|
|
|
@ -13,14 +13,14 @@ body, td, .submit input, .button, .button-secondary, .button-highlighted, #your-
|
||||||
}
|
}
|
||||||
|
|
||||||
#update-nag {
|
#update-nag {
|
||||||
clear: both;
|
clear: both;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clears update nag, so it doesn't hide the submenu */
|
/* Clears update nag, so it doesn't hide the submenu */
|
||||||
#update-nag {
|
#update-nag {
|
||||||
clear: both;
|
clear: both;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpwrap,#footer,#TB_title,.media-upload-form,#media-upload-header
|
#wpwrap,#footer,#TB_title,.media-upload-form,#media-upload-header
|
||||||
|
@ -130,7 +130,7 @@ p#post-search
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablenav .delete
|
.tablenav .delete
|
||||||
{
|
{
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
|
@ -337,26 +337,26 @@ div#message {
|
||||||
|
|
||||||
/* WPH - TinyMCE */
|
/* WPH - TinyMCE */
|
||||||
|
|
||||||
#media-items th.label {
|
#media-items th.label {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
#media-items th.label .alignleft {
|
#media-items th.label .alignleft {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-items th.label .alignright {
|
#media-items th.label .alignright {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LTRs some url- and code-only form fields */
|
/* LTRs some url- and code-only form fields */
|
||||||
input#href, input#src, input#class_name {
|
input#href, input#src, input#class_name {
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidemenu a {
|
#sidemenu a {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead.media-item-info {
|
thead.media-item-info {
|
||||||
|
@ -375,7 +375,7 @@ thead.media-item-info td.A1B1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#gallery-form table.widefat th {
|
#gallery-form table.widefat th {
|
||||||
float: left;
|
float: left;
|
||||||
width: 74%;
|
width: 74%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -398,8 +398,8 @@ tr.image-size label {
|
||||||
margin:0 0 0 1em !important;
|
margin:0 0 0 1em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library-form {
|
#library-form {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#filter .subsubsub {
|
#filter .subsubsub {
|
||||||
|
|
|
@ -35,7 +35,7 @@ function do_plugin_upgrade($plugin) {
|
||||||
show_message( __('Installation Failed') );
|
show_message( __('Installation Failed') );
|
||||||
} else {
|
} else {
|
||||||
//Result is the new plugin file relative to WP_PLUGIN_DIR
|
//Result is the new plugin file relative to WP_PLUGIN_DIR
|
||||||
show_message( __('Plugin upgraded successfully') );
|
show_message( __('Plugin upgraded successfully') );
|
||||||
if( $result && $was_activated ){
|
if( $result && $was_activated ){
|
||||||
show_message(__('Attempting reactivation of the plugin'));
|
show_message(__('Attempting reactivation of the plugin'));
|
||||||
echo '<iframe style="border:0" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&plugin=' . $result, 'activate-plugin_' . $result) .'"></iframe>';
|
echo '<iframe style="border:0" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&plugin=' . $result, 'activate-plugin_' . $result) .'"></iframe>';
|
||||||
|
@ -106,7 +106,7 @@ function do_core_upgrade() {
|
||||||
if ('up_to_date' != $result->get_error_code() )
|
if ('up_to_date' != $result->get_error_code() )
|
||||||
show_message( __('Installation Failed') );
|
show_message( __('Installation Failed') );
|
||||||
} else {
|
} else {
|
||||||
show_message( __('WordPress upgraded successfully') );
|
show_message( __('WordPress upgraded successfully') );
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
@ -124,9 +124,9 @@ if ( isset($_GET['action']) ) {
|
||||||
} elseif ('activate-plugin' == $_GET['action'] ) {
|
} elseif ('activate-plugin' == $_GET['action'] ) {
|
||||||
check_admin_referer('activate-plugin_' . $plugin);
|
check_admin_referer('activate-plugin_' . $plugin);
|
||||||
if( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
|
if( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
|
||||||
wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
|
wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
|
||||||
activate_plugin($plugin);
|
activate_plugin($plugin);
|
||||||
wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
|
wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -209,9 +209,9 @@ if ( $page_links )
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( 1 == count($posts) && is_singular() ) :
|
if ( 1 == count($posts) && is_singular() ) :
|
||||||
|
|
||||||
$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
|
$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
|
||||||
if ( $comments ) :
|
if ( $comments ) :
|
||||||
// Make sure comments, post, and post_author are cached
|
// Make sure comments, post, and post_author are cached
|
||||||
|
|
|
@ -41,24 +41,24 @@ function profile_js ( ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_nickname ( ) {
|
function update_nickname ( ) {
|
||||||
|
|
||||||
var nickname = jQuery('#nickname').val();
|
var nickname = jQuery('#nickname').val();
|
||||||
var display_nickname = jQuery('#display_nickname').val();
|
var display_nickname = jQuery('#display_nickname').val();
|
||||||
|
|
||||||
if ( nickname == '' ) {
|
if ( nickname == '' ) {
|
||||||
jQuery('#display_nickname').remove();
|
jQuery('#display_nickname').remove();
|
||||||
}
|
}
|
||||||
jQuery('#display_nickname').val(nickname).html(nickname);
|
jQuery('#display_nickname').val(nickname).html(nickname);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
$('#pass1').keyup( check_pass_strength )
|
$('#pass1').keyup( check_pass_strength )
|
||||||
$('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
|
$('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
|
||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery(document).ready( function() {
|
jQuery(document).ready( function() {
|
||||||
jQuery('#pass1,#pass2').attr('autocomplete','off');
|
jQuery('#pass1,#pass2').attr('autocomplete','off');
|
||||||
jQuery('#nickname').blur(update_nickname);
|
jQuery('#nickname').blur(update_nickname);
|
||||||
|
@ -190,7 +190,7 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
|
<label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -132,7 +132,7 @@ if ( isset($_GET['add']) && $_GET['add'] ) {
|
||||||
<h2><?php _e( 'Add Widget' ); ?></h2>
|
<h2><?php _e( 'Add Widget' ); ?></h2>
|
||||||
<br />
|
<br />
|
||||||
<form action="<?php echo clean_url( remove_query_arg( $query_args ) ); ?>" method="post">
|
<form action="<?php echo clean_url( remove_query_arg( $query_args ) ); ?>" method="post">
|
||||||
|
|
||||||
<ul class="widget-control-list">
|
<ul class="widget-control-list">
|
||||||
<li class="widget-list-control-item">
|
<li class="widget-list-control-item">
|
||||||
<div class="widget-top">
|
<div class="widget-top">
|
||||||
|
|
|
@ -225,7 +225,7 @@ table#availablethemes td.left {
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-highlighted {
|
.button-highlighted {
|
||||||
|
@ -912,7 +912,7 @@ html, body {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#profile-page .form-table input[type=text] {
|
#profile-page .form-table input[type=text] {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ td.action-links, th.action-links {
|
||||||
|
|
||||||
#poststuff h3, #poststuff .closed h3 {
|
#poststuff h3, #poststuff .closed h3 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide-if-no-js {
|
.hide-if-no-js {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -175,7 +175,7 @@ class AtomServer {
|
||||||
if( !empty( $_SERVER['ORIG_PATH_INFO'] ) )
|
if( !empty( $_SERVER['ORIG_PATH_INFO'] ) )
|
||||||
$path = $_SERVER['ORIG_PATH_INFO'];
|
$path = $_SERVER['ORIG_PATH_INFO'];
|
||||||
else
|
else
|
||||||
$path = $_SERVER['PATH_INFO'];
|
$path = $_SERVER['PATH_INFO'];
|
||||||
|
|
||||||
$method = $_SERVER['REQUEST_METHOD'];
|
$method = $_SERVER['REQUEST_METHOD'];
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ class WP_Object_Cache {
|
||||||
* to false, then nothing will happen. The $force parameter is set to false
|
* to false, then nothing will happen. The $force parameter is set to false
|
||||||
* by default.
|
* by default.
|
||||||
*
|
*
|
||||||
* On success the group and the id will be added to the
|
* On success the group and the id will be added to the
|
||||||
* $non_existant_objects property in the class.
|
* $non_existant_objects property in the class.
|
||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
|
|
|
@ -50,7 +50,7 @@ class PasswordHash {
|
||||||
$this->portable_hashes = $portable_hashes;
|
$this->portable_hashes = $portable_hashes;
|
||||||
|
|
||||||
$this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE);
|
$this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_random_bytes($count)
|
function get_random_bytes($count)
|
||||||
|
|
|
@ -79,7 +79,7 @@ class WP_Dependencies {
|
||||||
return false; // Abort this branch.
|
return false; // Abort this branch.
|
||||||
else
|
else
|
||||||
continue; // We're at the top level. Move on to the next one.
|
continue; // We're at the top level. Move on to the next one.
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->to_do[$handle] = true;
|
$this->to_do[$handle] = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -429,13 +429,13 @@ class Walker {
|
||||||
$cb_args = array_merge( array(&$output, $element, $depth), $args);
|
$cb_args = array_merge( array(&$output, $element, $depth), $args);
|
||||||
call_user_func_array(array(&$this, 'start_el'), $cb_args);
|
call_user_func_array(array(&$this, 'start_el'), $cb_args);
|
||||||
|
|
||||||
$id = $element->$id_field;
|
$id = $element->$id_field;
|
||||||
|
|
||||||
// descend only the depth is right and there are chilrens for this element
|
// descend only the depth is right and there are chilrens for this element
|
||||||
if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) {
|
if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) {
|
||||||
|
|
||||||
foreach( $children_elements[ $id ] as $child ){
|
foreach( $children_elements[ $id ] as $child ){
|
||||||
|
|
||||||
if ( !isset($newlevel) ) {
|
if ( !isset($newlevel) ) {
|
||||||
$newlevel = true;
|
$newlevel = true;
|
||||||
//start the child delimiter
|
//start the child delimiter
|
||||||
|
@ -444,7 +444,7 @@ class Walker {
|
||||||
}
|
}
|
||||||
$this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
|
$this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
|
||||||
}
|
}
|
||||||
unset( $children_elements[ $id ] );
|
unset( $children_elements[ $id ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset($newlevel) && $newlevel ){
|
if ( isset($newlevel) && $newlevel ){
|
||||||
|
@ -490,8 +490,8 @@ class Walker {
|
||||||
/*
|
/*
|
||||||
* need to display in hierarchical order
|
* need to display in hierarchical order
|
||||||
* seperate elements into two buckets: top level and children elements
|
* seperate elements into two buckets: top level and children elements
|
||||||
* children_elements is two dimensional array, eg.
|
* children_elements is two dimensional array, eg.
|
||||||
* children_elements[10][] contains all sub-elements whose parent is 10.
|
* children_elements[10][] contains all sub-elements whose parent is 10.
|
||||||
*/
|
*/
|
||||||
$top_level_elements = array();
|
$top_level_elements = array();
|
||||||
$children_elements = array();
|
$children_elements = array();
|
||||||
|
@ -509,7 +509,7 @@ class Walker {
|
||||||
if ( empty($top_level_elements) ) {
|
if ( empty($top_level_elements) ) {
|
||||||
|
|
||||||
$root = $elements[0];
|
$root = $elements[0];
|
||||||
|
|
||||||
$top_level_elements = array();
|
$top_level_elements = array();
|
||||||
$children_elements = array();
|
$children_elements = array();
|
||||||
foreach ( $elements as $e) {
|
foreach ( $elements as $e) {
|
||||||
|
@ -533,7 +533,7 @@ class Walker {
|
||||||
foreach( $orphans as $op )
|
foreach( $orphans as $op )
|
||||||
$this->display_element( $op, $empty_array, 1, 0, $args, $output );
|
$this->display_element( $op, $empty_array, 1, 0, $args, $output );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,7 +665,7 @@ function comments_template( $file = '/comments.php' ) {
|
||||||
update_comment_cache($comments);
|
update_comment_cache($comments);
|
||||||
|
|
||||||
define('COMMENTS_TEMPLATE', true);
|
define('COMMENTS_TEMPLATE', true);
|
||||||
|
|
||||||
$include = apply_filters('comments_template', STYLESHEETPATH . $file );
|
$include = apply_filters('comments_template', STYLESHEETPATH . $file );
|
||||||
if ( file_exists( $include ) )
|
if ( file_exists( $include ) )
|
||||||
require( $include );
|
require( $include );
|
||||||
|
|
|
@ -306,7 +306,7 @@ function comment_text_rss() {
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Feed
|
* @subpackage Feed
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @uses apply_filters()
|
* @uses apply_filters()
|
||||||
*
|
*
|
||||||
* @param string $type Optional, default is 'rss'. Either 'rss', 'atom', or 'rdf'.
|
* @param string $type Optional, default is 'rss'. Either 'rss', 'atom', or 'rdf'.
|
||||||
* @return string All of the post categories for displaying in the feed.
|
* @return string All of the post categories for displaying in the feed.
|
||||||
|
|
|
@ -844,9 +844,9 @@ function human_time_diff( $from, $to = '' ) {
|
||||||
function wp_trim_excerpt($text) { // Fakes an excerpt if needed
|
function wp_trim_excerpt($text) { // Fakes an excerpt if needed
|
||||||
if ( '' == $text ) {
|
if ( '' == $text ) {
|
||||||
$text = get_the_content('');
|
$text = get_the_content('');
|
||||||
|
|
||||||
$text = strip_shortcodes( $text );
|
$text = strip_shortcodes( $text );
|
||||||
|
|
||||||
$text = apply_filters('the_content', $text);
|
$text = apply_filters('the_content', $text);
|
||||||
$text = str_replace(']]>', ']]>', $text);
|
$text = str_replace(']]>', ']]>', $text);
|
||||||
$text = strip_tags($text);
|
$text = strip_tags($text);
|
||||||
|
@ -1436,7 +1436,7 @@ function wp_html_excerpt( $str, $count ) {
|
||||||
*/
|
*/
|
||||||
function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
|
function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
|
||||||
$attrs = implode('|', (array)$attrs);
|
$attrs = implode('|', (array)$attrs);
|
||||||
return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i",
|
return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i",
|
||||||
create_function('$m', 'return _links_add_base($m, "' . $base . '");'),
|
create_function('$m', 'return _links_add_base($m, "' . $base . '");'),
|
||||||
$content);
|
$content);
|
||||||
}
|
}
|
||||||
|
@ -1455,7 +1455,7 @@ function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
|
||||||
*/
|
*/
|
||||||
function _links_add_base($m, $base) {
|
function _links_add_base($m, $base) {
|
||||||
//1 = attribute name 2 = quotation mark 3 = URL
|
//1 = attribute name 2 = quotation mark 3 = URL
|
||||||
return $m[1] . '=' . $m[2] .
|
return $m[1] . '=' . $m[2] .
|
||||||
(strpos($m[3], 'http://') === false ?
|
(strpos($m[3], 'http://') === false ?
|
||||||
path_join($base, $m[3]) :
|
path_join($base, $m[3]) :
|
||||||
$m[3])
|
$m[3])
|
||||||
|
@ -1465,7 +1465,7 @@ function _links_add_base($m, $base) {
|
||||||
/**
|
/**
|
||||||
* Adds a Target attribute to all links in passed content.
|
* Adds a Target attribute to all links in passed content.
|
||||||
*
|
*
|
||||||
* This function by default only applies to <a> tags,
|
* This function by default only applies to <a> tags,
|
||||||
* however this can be modified by the 3rd param.
|
* however this can be modified by the 3rd param.
|
||||||
* NOTE: Any current target attributed will be striped and replaced.
|
* NOTE: Any current target attributed will be striped and replaced.
|
||||||
*
|
*
|
||||||
|
@ -1479,7 +1479,7 @@ function _links_add_base($m, $base) {
|
||||||
*/
|
*/
|
||||||
function links_add_target( $content, $target = '_blank', $tags = array('a') ) {
|
function links_add_target( $content, $target = '_blank', $tags = array('a') ) {
|
||||||
$tags = implode('|', (array)$tags);
|
$tags = implode('|', (array)$tags);
|
||||||
return preg_replace_callback("!<($tags)(.+?)>!i",
|
return preg_replace_callback("!<($tags)(.+?)>!i",
|
||||||
create_function('$m', 'return _links_add_target($m, "' . $target . '");'),
|
create_function('$m', 'return _links_add_target($m, "' . $target . '");'),
|
||||||
$content);
|
$content);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1474,10 +1474,10 @@ function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $ec
|
||||||
$nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />';
|
$nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />';
|
||||||
if ( $echo )
|
if ( $echo )
|
||||||
echo $nonce_field;
|
echo $nonce_field;
|
||||||
|
|
||||||
if ( $referer )
|
if ( $referer )
|
||||||
wp_referer_field( $echo, 'previous' );
|
wp_referer_field( $echo, 'previous' );
|
||||||
|
|
||||||
return $nonce_field;
|
return $nonce_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1599,12 +1599,12 @@ function wp_upload_dir( $time = null ) {
|
||||||
$upload_path = trim($upload_path);
|
$upload_path = trim($upload_path);
|
||||||
if ( empty($upload_path) )
|
if ( empty($upload_path) )
|
||||||
$dir = WP_CONTENT_DIR . '/uploads';
|
$dir = WP_CONTENT_DIR . '/uploads';
|
||||||
else
|
else
|
||||||
$dir = $upload_path;
|
$dir = $upload_path;
|
||||||
|
|
||||||
// $dir is absolute, $path is (maybe) relative to ABSPATH
|
// $dir is absolute, $path is (maybe) relative to ABSPATH
|
||||||
$dir = path_join( ABSPATH, $dir );
|
$dir = path_join( ABSPATH, $dir );
|
||||||
|
|
||||||
if ( !$url = get_option( 'upload_url_path' ) ) {
|
if ( !$url = get_option( 'upload_url_path' ) ) {
|
||||||
if ( empty($upload_path) or ( $upload_path == $dir ) )
|
if ( empty($upload_path) or ( $upload_path == $dir ) )
|
||||||
$url = WP_CONTENT_URL . '/uploads';
|
$url = WP_CONTENT_URL . '/uploads';
|
||||||
|
@ -1617,7 +1617,7 @@ function wp_upload_dir( $time = null ) {
|
||||||
$url = trailingslashit( $siteurl ) . UPLOADS;
|
$url = trailingslashit( $siteurl ) . UPLOADS;
|
||||||
}
|
}
|
||||||
|
|
||||||
$bdir = $dir;
|
$bdir = $dir;
|
||||||
$burl = $url;
|
$burl = $url;
|
||||||
|
|
||||||
$subdir = '';
|
$subdir = '';
|
||||||
|
@ -1638,7 +1638,7 @@ function wp_upload_dir( $time = null ) {
|
||||||
$message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $dir );
|
$message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $dir );
|
||||||
return array( 'error' => $message );
|
return array( 'error' => $message );
|
||||||
}
|
}
|
||||||
|
|
||||||
$uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false );
|
$uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false );
|
||||||
|
|
||||||
return apply_filters( 'upload_dir', $uploads );
|
return apply_filters( 'upload_dir', $uploads );
|
||||||
|
@ -1885,7 +1885,7 @@ function wp_explain_nonce( $action ) {
|
||||||
$trans['edit']['plugin'] = array( __( 'Your attempt to edit this plugin file: "%s" has failed.' ), 'use_id' );
|
$trans['edit']['plugin'] = array( __( 'Your attempt to edit this plugin file: "%s" has failed.' ), 'use_id' );
|
||||||
$trans['activate']['plugin'] = array( __( 'Your attempt to activate this plugin: "%s" has failed.' ), 'use_id' );
|
$trans['activate']['plugin'] = array( __( 'Your attempt to activate this plugin: "%s" has failed.' ), 'use_id' );
|
||||||
$trans['deactivate']['plugin'] = array( __( 'Your attempt to deactivate this plugin: "%s" has failed.' ), 'use_id' );
|
$trans['deactivate']['plugin'] = array( __( 'Your attempt to deactivate this plugin: "%s" has failed.' ), 'use_id' );
|
||||||
$trans['upgrade']['plugin'] = array( __( 'Your attempt to upgrade this plugin: "%s" has failed.' ), 'use_id' );
|
$trans['upgrade']['plugin'] = array( __( 'Your attempt to upgrade this plugin: "%s" has failed.' ), 'use_id' );
|
||||||
|
|
||||||
$trans['add']['post'] = array( __( 'Your attempt to add this post has failed.' ), false );
|
$trans['add']['post'] = array( __( 'Your attempt to add this post has failed.' ), false );
|
||||||
$trans['delete']['post'] = array( __( 'Your attempt to delete this post: "%s" has failed.' ), 'get_the_title' );
|
$trans['delete']['post'] = array( __( 'Your attempt to delete this post: "%s" has failed.' ), 'get_the_title' );
|
||||||
|
@ -2524,7 +2524,7 @@ function validate_file( $file, $allowed_files = '' ) {
|
||||||
* @return bool True if SSL, false if not used.
|
* @return bool True if SSL, false if not used.
|
||||||
*/
|
*/
|
||||||
function is_ssl() {
|
function is_ssl() {
|
||||||
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -373,7 +373,7 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
|
||||||
$link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
|
$link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
|
||||||
|
|
||||||
$link_html = apply_filters( "get_archives_link", $link_html );
|
$link_html = apply_filters( "get_archives_link", $link_html );
|
||||||
|
|
||||||
return $link_html;
|
return $link_html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1197,10 +1197,10 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enqueues the default ThickBox js and css.
|
* Enqueues the default ThickBox js and css.
|
||||||
* If any of the settings need to be changed, this can be done with another js file
|
* If any of the settings need to be changed, this can be done with another js file
|
||||||
* similar to media-upload.js and theme-preview.js. That file should require array('thickbox')
|
* similar to media-upload.js and theme-preview.js. That file should require array('thickbox')
|
||||||
* to ensure it is loaded after.
|
* to ensure it is loaded after.
|
||||||
*/
|
*/
|
||||||
function add_thickbox() {
|
function add_thickbox() {
|
||||||
wp_enqueue_script( 'thickbox' );
|
wp_enqueue_script( 'thickbox' );
|
||||||
|
|
|
@ -225,7 +225,7 @@ class WP_Http {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses the POST HTTP method.
|
* Uses the POST HTTP method.
|
||||||
*
|
*
|
||||||
* Used for sending data that is expected to be in the body.
|
* Used for sending data that is expected to be in the body.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
@ -244,7 +244,7 @@ class WP_Http {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses the GET HTTP method.
|
* Uses the GET HTTP method.
|
||||||
*
|
*
|
||||||
* Used for sending data that is expected to be in the body.
|
* Used for sending data that is expected to be in the body.
|
||||||
*
|
*
|
||||||
|
@ -264,7 +264,7 @@ class WP_Http {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses the HEAD HTTP method.
|
* Uses the HEAD HTTP method.
|
||||||
*
|
*
|
||||||
* Used for sending data that is expected to be in the body.
|
* Used for sending data that is expected to be in the body.
|
||||||
*
|
*
|
||||||
|
@ -344,7 +344,7 @@ class WP_Http {
|
||||||
* @since 2.7
|
* @since 2.7
|
||||||
*
|
*
|
||||||
* @param string|array $headers
|
* @param string|array $headers
|
||||||
* @return array Processed string headers
|
* @return array Processed string headers
|
||||||
*/
|
*/
|
||||||
function processHeaders($headers) {
|
function processHeaders($headers) {
|
||||||
if ( is_string($headers) )
|
if ( is_string($headers) )
|
||||||
|
@ -357,7 +357,7 @@ class WP_Http {
|
||||||
if ( empty($tempheader) )
|
if ( empty($tempheader) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
if ( false === strpos($tempheader, ':') ) {
|
if ( false === strpos($tempheader, ':') ) {
|
||||||
list( , $iResponseCode, $strResponseMsg) = explode(' ', $tempheader, 3);
|
list( , $iResponseCode, $strResponseMsg) = explode(' ', $tempheader, 3);
|
||||||
$response['code'] = $iResponseCode;
|
$response['code'] = $iResponseCode;
|
||||||
|
@ -660,7 +660,7 @@ class WP_Http_Streams {
|
||||||
if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] )
|
if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] )
|
||||||
$url = str_replace($arrURL['scheme'], 'http', $url);
|
$url = str_replace($arrURL['scheme'], 'http', $url);
|
||||||
|
|
||||||
$arrContext = array('http' =>
|
$arrContext = array('http' =>
|
||||||
array(
|
array(
|
||||||
'method' => strtoupper($r['method']),
|
'method' => strtoupper($r['method']),
|
||||||
'user-agent' => $r['user-agent'],
|
'user-agent' => $r['user-agent'],
|
||||||
|
@ -895,7 +895,7 @@ class WP_Http_Curl {
|
||||||
|
|
||||||
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
|
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
|
||||||
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
|
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
|
||||||
|
|
||||||
if( ! is_null($headers) )
|
if( ! is_null($headers) )
|
||||||
curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
|
curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ jQuery(function($) {
|
||||||
|
|
||||||
//Disable autosave after the form has been submitted
|
//Disable autosave after the form has been submitted
|
||||||
$("#post").submit(function() { $.cancel(autosavePeriodical); });
|
$("#post").submit(function() { $.cancel(autosavePeriodical); });
|
||||||
|
|
||||||
// Autosave when the preview button is clicked.
|
// Autosave when the preview button is clicked.
|
||||||
$('#previewview a').click(function(e) {
|
$('#previewview a').click(function(e) {
|
||||||
autosave();
|
autosave();
|
||||||
autosaveDelayURL = this.href;
|
autosaveDelayURL = this.href;
|
||||||
|
@ -109,7 +109,7 @@ function autosave_update_preview_link(post_id) {
|
||||||
}, function(permalink) {
|
}, function(permalink) {
|
||||||
jQuery('#previewview').html('<a target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>');
|
jQuery('#previewview').html('<a target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>');
|
||||||
|
|
||||||
// Autosave when the preview button is clicked.
|
// Autosave when the preview button is clicked.
|
||||||
jQuery('#previewview a').click(function(e) {
|
jQuery('#previewview a').click(function(e) {
|
||||||
autosave();
|
autosave();
|
||||||
autosaveDelayURL = this.href;
|
autosaveDelayURL = this.href;
|
||||||
|
@ -130,7 +130,7 @@ function autosave_update_slug(post_id) {
|
||||||
{
|
{
|
||||||
action: 'sample-permalink',
|
action: 'sample-permalink',
|
||||||
post_id: post_id,
|
post_id: post_id,
|
||||||
new_title: jQuery('#title').val(),
|
new_title: jQuery('#title').val(),
|
||||||
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
|
samplepermalinknonce: jQuery('#samplepermalinknonce').val()
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
|
@ -180,13 +180,13 @@ var autosave = function() {
|
||||||
doAutoSave = false;
|
doAutoSave = false;
|
||||||
|
|
||||||
/* Gotta do this up here so we can check the length when tinyMCE is in use */
|
/* Gotta do this up here so we can check the length when tinyMCE is in use */
|
||||||
if ( rich ) {
|
if ( rich ) {
|
||||||
var ed = tinyMCE.activeEditor;
|
var ed = tinyMCE.activeEditor;
|
||||||
if ( 'mce_fullscreen' == ed.id )
|
if ( 'mce_fullscreen' == ed.id )
|
||||||
tinyMCE.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});
|
tinyMCE.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});
|
||||||
tinyMCE.get('content').save();
|
tinyMCE.get('content').save();
|
||||||
}
|
}
|
||||||
|
|
||||||
post_data["content"] = jQuery("#content").val();
|
post_data["content"] = jQuery("#content").val();
|
||||||
if ( jQuery('#post_name').val() )
|
if ( jQuery('#post_name').val() )
|
||||||
post_data["post_name"] = jQuery('#post_name').val();
|
post_data["post_name"] = jQuery('#post_name').val();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
// some code below is from:
|
// some code below is from:
|
||||||
/**
|
/**
|
||||||
* $Id: tiny_mce_gzip.php 315 2007-10-25 14:03:43Z spocke $
|
* $Id: tiny_mce_gzip.php 315 2007-10-25 14:03:43Z spocke $
|
||||||
|
@ -68,10 +68,10 @@ $mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+Engl
|
||||||
|
|
||||||
$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage' );
|
$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage' );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
|
The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
|
||||||
It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
|
It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
|
||||||
The url should be absolute and should include the js file name to be loaded. Example:
|
The url should be absolute and should include the js file name to be loaded. Example:
|
||||||
array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
|
array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
|
||||||
If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
|
If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
|
||||||
*/
|
*/
|
||||||
|
@ -79,23 +79,23 @@ $mce_external_plugins = apply_filters('mce_external_plugins', array());
|
||||||
|
|
||||||
$ext_plugins = "\n";
|
$ext_plugins = "\n";
|
||||||
if ( ! empty($mce_external_plugins) ) {
|
if ( ! empty($mce_external_plugins) ) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following filter loads external language files for TinyMCE plugins.
|
The following filter loads external language files for TinyMCE plugins.
|
||||||
It takes an associative array 'plugin_name' => 'path', where path is the
|
It takes an associative array 'plugin_name' => 'path', where path is the
|
||||||
include path to the file. The language file should follow the same format as
|
include path to the file. The language file should follow the same format as
|
||||||
/tinymce/langs/wp-langs.php and should define a variable $strings that
|
/tinymce/langs/wp-langs.php and should define a variable $strings that
|
||||||
holds all translated strings. Example:
|
holds all translated strings. Example:
|
||||||
$strings = 'tinyMCE.addI18n("' . $mce_locale . '.mypluginname_dlg",{tab_general:"General", ... })';
|
$strings = 'tinyMCE.addI18n("' . $mce_locale . '.mypluginname_dlg",{tab_general:"General", ... })';
|
||||||
*/
|
*/
|
||||||
$mce_external_languages = apply_filters('mce_external_languages', array());
|
$mce_external_languages = apply_filters('mce_external_languages', array());
|
||||||
|
|
||||||
$loaded_langs = array();
|
$loaded_langs = array();
|
||||||
$strings = '';
|
$strings = '';
|
||||||
|
|
||||||
if ( ! empty($mce_external_languages) ) {
|
if ( ! empty($mce_external_languages) ) {
|
||||||
foreach ( $mce_external_languages as $name => $path ) {
|
foreach ( $mce_external_languages as $name => $path ) {
|
||||||
if ( is_file($path) && is_readable($path) ) {
|
if ( is_file($path) && is_readable($path) ) {
|
||||||
include_once($path);
|
include_once($path);
|
||||||
$ext_plugins .= $strings;
|
$ext_plugins .= $strings;
|
||||||
$loaded_langs[] = $name;
|
$loaded_langs[] = $name;
|
||||||
|
@ -104,9 +104,9 @@ if ( ! empty($mce_external_plugins) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $mce_external_plugins as $name => $url ) {
|
foreach ( $mce_external_plugins as $name => $url ) {
|
||||||
|
|
||||||
if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
|
if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
|
||||||
|
|
||||||
$plugins[] = '-' . $name;
|
$plugins[] = '-' . $name;
|
||||||
|
|
||||||
if ( in_array($name, $loaded_langs) ) {
|
if ( in_array($name, $loaded_langs) ) {
|
||||||
|
@ -126,7 +126,7 @@ $mce_buttons_2 = implode($mce_buttons_2, ',');
|
||||||
|
|
||||||
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
||||||
$mce_buttons_3 = implode($mce_buttons_3, ',');
|
$mce_buttons_3 = implode($mce_buttons_3, ',');
|
||||||
|
|
||||||
$mce_buttons_4 = apply_filters('mce_buttons_4', array());
|
$mce_buttons_4 = apply_filters('mce_buttons_4', array());
|
||||||
$mce_buttons_4 = implode($mce_buttons_4, ',');
|
$mce_buttons_4 = implode($mce_buttons_4, ',');
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ if ( $msie = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cache path, this is where the .gz files will be stored
|
// Cache path, this is where the .gz files will be stored
|
||||||
$cache_path = WP_CONTENT_DIR . '/uploads/js_cache';
|
$cache_path = WP_CONTENT_DIR . '/uploads/js_cache';
|
||||||
if ( $disk_cache && ! is_dir($cache_path) )
|
if ( $disk_cache && ! is_dir($cache_path) )
|
||||||
$disk_cache = wp_mkdir_p($cache_path);
|
$disk_cache = wp_mkdir_p($cache_path);
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ $cache_ext = '.js';
|
||||||
$plugins = explode( ',', $initArray['plugins'] );
|
$plugins = explode( ',', $initArray['plugins'] );
|
||||||
$theme = ( 'simple' == $initArray['theme'] ) ? 'simple' : 'advanced';
|
$theme = ( 'simple' == $initArray['theme'] ) ? 'simple' : 'advanced';
|
||||||
$language = ( isset($initArray['language']) && ! empty($initArray['language']) ) ? substr( $initArray['language'], 0, 2 ) : 'en';
|
$language = ( isset($initArray['language']) && ! empty($initArray['language']) ) ? substr( $initArray['language'], 0, 2 ) : 'en';
|
||||||
$cacheKey = $mce_options = '';
|
$cacheKey = $mce_options = '';
|
||||||
|
|
||||||
// Check if browser supports gzip
|
// Check if browser supports gzip
|
||||||
if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||||
|
@ -224,7 +224,7 @@ if ( $disk_cache ) {
|
||||||
foreach ( $mce_external_plugins as $n => $v )
|
foreach ( $mce_external_plugins as $n => $v )
|
||||||
$cacheKey .= $n;
|
$cacheKey .= $n;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cacheKey = md5( $cacheKey );
|
$cacheKey = md5( $cacheKey );
|
||||||
$cache_file = $cache_path . '/tinymce_' . $cacheKey . $cache_ext;
|
$cache_file = $cache_path . '/tinymce_' . $cacheKey . $cache_ext;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ header( 'Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . ' GM
|
||||||
if ( $disk_cache && is_file($cache_file) && is_readable($cache_file) ) {
|
if ( $disk_cache && is_file($cache_file) && is_readable($cache_file) ) {
|
||||||
|
|
||||||
$mtime = gmdate("D, d M Y H:i:s", filemtime($cache_file)) . " GMT";
|
$mtime = gmdate("D, d M Y H:i:s", filemtime($cache_file)) . " GMT";
|
||||||
|
|
||||||
if ( isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $mtime ) {
|
if ( isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $mtime ) {
|
||||||
header('HTTP/1.1 304 Not Modified');
|
header('HTTP/1.1 304 Not Modified');
|
||||||
exit;
|
exit;
|
||||||
|
@ -247,7 +247,7 @@ if ( $disk_cache && is_file($cache_file) && is_readable($cache_file) ) {
|
||||||
header("Cache-Control: must-revalidate", false);
|
header("Cache-Control: must-revalidate", false);
|
||||||
|
|
||||||
$content = getFileContents( $cache_file );
|
$content = getFileContents( $cache_file );
|
||||||
|
|
||||||
if ( '.gz' == $cache_ext )
|
if ( '.gz' == $cache_ext )
|
||||||
header( 'Content-Encoding: gzip' );
|
header( 'Content-Encoding: gzip' );
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ if ( $disk_cache && is_file($cache_file) && is_readable($cache_file) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $initArray as $k => $v )
|
foreach ( $initArray as $k => $v )
|
||||||
$mce_options .= $k . ':"' . $v . '",';
|
$mce_options .= $k . ':"' . $v . '",';
|
||||||
|
|
||||||
$mce_options = rtrim( trim($mce_options), '\n\r,' );
|
$mce_options = rtrim( trim($mce_options), '\n\r,' );
|
||||||
|
@ -277,10 +277,10 @@ $content .= $strings;
|
||||||
$content .= getFileContents( 'themes/' . $theme . '/editor_template.js' );
|
$content .= getFileContents( 'themes/' . $theme . '/editor_template.js' );
|
||||||
|
|
||||||
// Add plugins
|
// Add plugins
|
||||||
foreach ( $plugins as $plugin )
|
foreach ( $plugins as $plugin )
|
||||||
$content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin.js' );
|
$content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin.js' );
|
||||||
|
|
||||||
// Add external plugins
|
// Add external plugins
|
||||||
$content .= $ext_plugins;
|
$content .= $ext_plugins;
|
||||||
|
|
||||||
// Mark translations as done
|
// Mark translations as done
|
||||||
|
|
|
@ -7,7 +7,7 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<title><?php _e('Rich Editor Help') ?></title>
|
<title><?php _e('Rich Editor Help') ?></title>
|
||||||
<script type="text/javascript" src="tiny_mce_popup.js?ver=311b"></script>
|
<script type="text/javascript" src="tiny_mce_popup.js?ver=311b"></script>
|
||||||
<?php
|
<?php
|
||||||
wp_admin_css( 'global', true );
|
wp_admin_css( 'global', true );
|
||||||
wp_admin_css( 'wp-admin', true );
|
wp_admin_css( 'wp-admin', true );
|
||||||
?>
|
?>
|
||||||
|
@ -204,7 +204,7 @@ wp_admin_css( 'wp-admin', true );
|
||||||
"<tr><th>6</th><td><?php _e('Header 6') ?></td><th>9</th><td><?php _e('Address') ?></td></tr>")
|
"<tr><th>6</th><td><?php _e('Header 6') ?></td><th>9</th><td><?php _e('Address') ?></td></tr>")
|
||||||
</script>
|
</script>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p><?php _e('The following shortcuts use different access keys: Alt + Shift + letter.') ?></p>
|
<p><?php _e('The following shortcuts use different access keys: Alt + Shift + letter.') ?></p>
|
||||||
<table class="keys" width="100%" style="border: 0 none;">
|
<table class="keys" width="100%" style="border: 0 none;">
|
||||||
<tr class="top"><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th></tr>
|
<tr class="top"><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th><th class="key center"><?php _e('Letter') ?></th><th class="left"><?php _e('Action') ?></th></tr>
|
||||||
|
|
|
@ -291,7 +291,7 @@ function load_default_textdomain() {
|
||||||
*/
|
*/
|
||||||
function load_plugin_textdomain($domain, $abs_rel_path = false, $plugin_rel_path = false) {
|
function load_plugin_textdomain($domain, $abs_rel_path = false, $plugin_rel_path = false) {
|
||||||
$locale = get_locale();
|
$locale = get_locale();
|
||||||
|
|
||||||
if ( false !== $plugin_rel_path )
|
if ( false !== $plugin_rel_path )
|
||||||
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/');
|
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/');
|
||||||
else if ( false !== $abs_rel_path)
|
else if ( false !== $abs_rel_path)
|
||||||
|
|
|
@ -85,7 +85,7 @@ function get_permalink($id = 0, $leavename=false) {
|
||||||
// having to assign it explicitly
|
// having to assign it explicitly
|
||||||
if ( empty($category) ) {
|
if ( empty($category) ) {
|
||||||
$default_category = get_category( get_option( 'default_category' ) );
|
$default_category = get_category( get_option( 'default_category' ) );
|
||||||
$category = is_wp_error( $default_category ) ? '' : $default_category->slug;
|
$category = is_wp_error( $default_category ) ? '' : $default_category->slug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ function get_edit_post_link( $id = 0, $context = 'display' ) {
|
||||||
$var = 'post';
|
$var = 'post';
|
||||||
break;
|
break;
|
||||||
endswitch;
|
endswitch;
|
||||||
|
|
||||||
return apply_filters( 'get_edit_post_link', admin_url("$file.php?{$action}$var=$post->ID"), $post->ID, $context );
|
return apply_filters( 'get_edit_post_link', admin_url("$file.php?{$action}$var=$post->ID"), $post->ID, $context );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ function get_shortcut_link() {
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @since 2.6
|
* @since 2.6
|
||||||
*
|
*
|
||||||
* Returns the 'site_url' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise.
|
* Returns the 'site_url' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise.
|
||||||
* If $scheme is 'http' or 'https', is_ssl() is overridden.
|
* If $scheme is 'http' or 'https', is_ssl() is overridden.
|
||||||
*
|
*
|
||||||
* @param string $path Optional path relative to the site url
|
* @param string $path Optional path relative to the site url
|
||||||
|
|
|
@ -305,7 +305,7 @@ function image_get_intermediate_size($post_id, $size='thumbnail') {
|
||||||
|
|
||||||
if ( is_array($size) || empty($size) || empty($imagedata['sizes'][$size]) )
|
if ( is_array($size) || empty($size) || empty($imagedata['sizes'][$size]) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$data = $imagedata['sizes'][$size];
|
$data = $imagedata['sizes'][$size];
|
||||||
// include the full filesystem path of the intermediate file
|
// include the full filesystem path of the intermediate file
|
||||||
if ( empty($data['path']) && !empty($data['file']) ) {
|
if ( empty($data['path']) && !empty($data['file']) ) {
|
||||||
|
@ -319,7 +319,7 @@ function image_get_intermediate_size($post_id, $size='thumbnail') {
|
||||||
// get an image to represent an attachment - a mime icon for files, thumbnail or intermediate size for images
|
// get an image to represent an attachment - a mime icon for files, thumbnail or intermediate size for images
|
||||||
// returns an array (url, width, height), or false if no image is available
|
// returns an array (url, width, height), or false if no image is available
|
||||||
function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) {
|
function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) {
|
||||||
|
|
||||||
// get a thumbnail or intermediate image if there is one
|
// get a thumbnail or intermediate image if there is one
|
||||||
if ( $image = image_downsize($attachment_id, $size) )
|
if ( $image = image_downsize($attachment_id, $size) )
|
||||||
return $image;
|
return $image;
|
||||||
|
@ -346,7 +346,7 @@ function wp_get_attachment_image($attachment_id, $size='thumbnail', $icon = fals
|
||||||
$size = join('x', $size);
|
$size = join('x', $size);
|
||||||
$html = '<img src="'.attribute_escape($src).'" '.$hwstring.'class="attachment-'.attribute_escape($size).'" alt="" />';
|
$html = '<img src="'.attribute_escape($src).'" '.$hwstring.'class="attachment-'.attribute_escape($size).'" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,12 +366,12 @@ function img_caption_shortcode($attr, $content = null) {
|
||||||
'width' => '',
|
'width' => '',
|
||||||
'caption' => ''
|
'caption' => ''
|
||||||
), $attr));
|
), $attr));
|
||||||
|
|
||||||
if ( 1 > (int) $width || empty($caption) )
|
if ( 1 > (int) $width || empty($caption) )
|
||||||
return $content;
|
return $content;
|
||||||
|
|
||||||
if ( $id ) $id = 'id="' . $id . '" ';
|
if ( $id ) $id = 'id="' . $id . '" ';
|
||||||
|
|
||||||
return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
|
return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
|
||||||
. $content . '<p class="wp-caption-text">' . $caption . '</p></div>';
|
. $content . '<p class="wp-caption-text">' . $caption . '</p></div>';
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,7 @@ function gallery_shortcode($attr) {
|
||||||
$captiontag = tag_escape($captiontag);
|
$captiontag = tag_escape($captiontag);
|
||||||
$columns = intval($columns);
|
$columns = intval($columns);
|
||||||
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
|
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
|
||||||
|
|
||||||
$output = apply_filters('gallery_style', "
|
$output = apply_filters('gallery_style', "
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
.gallery {
|
.gallery {
|
||||||
|
|
|
@ -667,7 +667,7 @@ function auth_redirect() {
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ function wp_redirect($location, $status = 302) {
|
||||||
|
|
||||||
$location = apply_filters('wp_redirect', $location, $status);
|
$location = apply_filters('wp_redirect', $location, $status);
|
||||||
$status = apply_filters('wp_redirect_status', $status, $location);
|
$status = apply_filters('wp_redirect_status', $status, $location);
|
||||||
|
|
||||||
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
|
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -829,7 +829,7 @@ function wp_safe_redirect($location, $status = 302) {
|
||||||
|
|
||||||
// In php 5 parse_url may fail if the URL query part contains http://, bug #38143
|
// In php 5 parse_url may fail if the URL query part contains http://, bug #38143
|
||||||
$test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location;
|
$test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location;
|
||||||
|
|
||||||
$lp = parse_url($test);
|
$lp = parse_url($test);
|
||||||
$wpp = parse_url(get_option('home'));
|
$wpp = parse_url(get_option('home'));
|
||||||
|
|
||||||
|
@ -974,7 +974,7 @@ function wp_notify_moderator($comment_id) {
|
||||||
$notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n";
|
$notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n";
|
||||||
$notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n";
|
$notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n";
|
||||||
|
|
||||||
$notify_message .= sprintf( __ngettext('Currently %s comment is waiting for approval. Please visit the moderation panel:',
|
$notify_message .= sprintf( __ngettext('Currently %s comment is waiting for approval. Please visit the moderation panel:',
|
||||||
'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
|
'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
|
||||||
$notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
|
$notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
|
||||||
|
|
||||||
|
@ -1540,7 +1540,7 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
|
||||||
$right_string = str_replace("\r", "\n", $right_string);
|
$right_string = str_replace("\r", "\n", $right_string);
|
||||||
$left_string = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $left_string );
|
$left_string = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $left_string );
|
||||||
$right_string = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $right_string );
|
$right_string = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $right_string );
|
||||||
|
|
||||||
$left_lines = split("\n", $left_string);
|
$left_lines = split("\n", $left_string);
|
||||||
$right_lines = split("\n", $right_string);
|
$right_lines = split("\n", $right_string);
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ function get_the_content($more_link_text = NULL, $stripteaser = 0, $more_file =
|
||||||
global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
|
global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
|
||||||
|
|
||||||
if ( NULL == $more_link_text )
|
if ( NULL == $more_link_text )
|
||||||
$more_link_text = __( '(more...)' );
|
$more_link_text = __( '(more...)' );
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
|
||||||
$id = (int) $id;
|
$id = (int) $id;
|
||||||
if ( !$post = & get_post($id) )
|
if ( !$post = & get_post($id) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
|
if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -921,7 +921,7 @@ function unstick_post($post_id) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
array_splice($stickies, $offset, 1);
|
array_splice($stickies, $offset, 1);
|
||||||
|
|
||||||
update_option('sticky_posts', $stickies);
|
update_option('sticky_posts', $stickies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1445,7 +1445,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||||
if ( $wp_error )
|
if ( $wp_error )
|
||||||
return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);
|
return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$post_ID = (int) $wpdb->insert_id;
|
$post_ID = (int) $wpdb->insert_id;
|
||||||
|
|
||||||
|
@ -2148,8 +2148,8 @@ function &get_pages($args = '') {
|
||||||
$where = "$exclusions $inclusions ";
|
$where = "$exclusions $inclusions ";
|
||||||
if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {
|
if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {
|
||||||
$join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
|
$join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
|
||||||
|
|
||||||
// meta_key and met_value might be slashed
|
// meta_key and met_value might be slashed
|
||||||
$meta_key = stripslashes($meta_key);
|
$meta_key = stripslashes($meta_key);
|
||||||
$meta_value = stripslashes($meta_value);
|
$meta_value = stripslashes($meta_value);
|
||||||
if ( ! empty( $meta_key ) )
|
if ( ! empty( $meta_key ) )
|
||||||
|
@ -2342,7 +2342,7 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
|
||||||
|
|
||||||
if ( $file )
|
if ( $file )
|
||||||
update_attached_file( $post_ID, $file );
|
update_attached_file( $post_ID, $file );
|
||||||
|
|
||||||
clean_post_cache($post_ID);
|
clean_post_cache($post_ID);
|
||||||
|
|
||||||
if ( $update) {
|
if ( $update) {
|
||||||
|
@ -2534,7 +2534,7 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) {
|
||||||
return false;
|
return false;
|
||||||
if ( !$url = wp_get_attachment_url( $post->ID ) )
|
if ( !$url = wp_get_attachment_url( $post->ID ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$sized = image_downsize( $post_id, 'thumbnail' );
|
$sized = image_downsize( $post_id, 'thumbnail' );
|
||||||
if ( $sized )
|
if ( $sized )
|
||||||
return $sized[0];
|
return $sized[0];
|
||||||
|
|
|
@ -121,7 +121,7 @@ function is_tag( $slug = '' ) {
|
||||||
|
|
||||||
function is_tax( $slug = '' ) {
|
function is_tax( $slug = '' ) {
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
|
|
||||||
if ( !$wp_query->is_tax )
|
if ( !$wp_query->is_tax )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1358,7 +1358,7 @@ class WP_Query {
|
||||||
// postmeta queries
|
// postmeta queries
|
||||||
if ( ! empty($q['meta_key']) || ! empty($q['meta_value']) )
|
if ( ! empty($q['meta_key']) || ! empty($q['meta_value']) )
|
||||||
$join .= " LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) ";
|
$join .= " LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) ";
|
||||||
if ( ! empty($q['meta_key']) )
|
if ( ! empty($q['meta_key']) )
|
||||||
$where .= $wpdb->prepare("AND $wpdb->postmeta.meta_key = %s ", $q['meta_key']);
|
$where .= $wpdb->prepare("AND $wpdb->postmeta.meta_key = %s ", $q['meta_key']);
|
||||||
if ( ! empty($q['meta_value']) )
|
if ( ! empty($q['meta_value']) )
|
||||||
$where .= $wpdb->prepare("AND $wpdb->postmeta.meta_value = %s ", $q['meta_value']);
|
$where .= $wpdb->prepare("AND $wpdb->postmeta.meta_value = %s ", $q['meta_value']);
|
||||||
|
|
|
@ -64,7 +64,7 @@ function add_rewrite_endpoint($name, $places) {
|
||||||
* _wp_filter_taxonomy_base() - filter the URL base for taxonomies, to remove any manually prepended /index.php/
|
* _wp_filter_taxonomy_base() - filter the URL base for taxonomies, to remove any manually prepended /index.php/
|
||||||
* @param string $base the taxonomy base that we're going to filter
|
* @param string $base the taxonomy base that we're going to filter
|
||||||
* @return string
|
* @return string
|
||||||
* @author Mark Jaquith
|
* @author Mark Jaquith
|
||||||
*/
|
*/
|
||||||
function _wp_filter_taxonomy_base( $base ) {
|
function _wp_filter_taxonomy_base( $base ) {
|
||||||
if ( !empty( $base ) ) {
|
if ( !empty( $base ) ) {
|
||||||
|
|
|
@ -193,20 +193,20 @@ function wp_default_scripts( &$scripts ) {
|
||||||
$scripts->localize( 'word-count', 'wordCountL10n', array(
|
$scripts->localize( 'word-count', 'wordCountL10n', array(
|
||||||
'count' => __('Word count: %d')
|
'count' => __('Word count: %d')
|
||||||
));
|
));
|
||||||
|
|
||||||
$scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080721' );
|
$scripts->add( 'wp-gears', '/wp-admin/js/wp-gears.js', false, '20080721' );
|
||||||
$scripts->localize( 'wp-gears', 'wpGearsL10n', array(
|
$scripts->localize( 'wp-gears', 'wpGearsL10n', array(
|
||||||
'updateCompleted' => __('Update completed.'),
|
'updateCompleted' => __('Update completed.'),
|
||||||
'error' => __('Error:')
|
'error' => __('Error:')
|
||||||
));
|
));
|
||||||
|
|
||||||
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
|
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
|
||||||
|
|
||||||
$scripts->add( 'plugin-install', '/wp-admin/js/plugin-install.js', array( 'thickbox', 'jquery' ), '20080803' );
|
$scripts->add( 'plugin-install', '/wp-admin/js/plugin-install.js', array( 'thickbox', 'jquery' ), '20080803' );
|
||||||
$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
||||||
'plugin_information' => __('Plugin Information:')
|
'plugin_information' => __('Plugin Information:')
|
||||||
) );
|
) );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ $shortcode_tags = array();
|
||||||
* There can only be one hook for each shortcode. Which means that if another
|
* There can only be one hook for each shortcode. Which means that if another
|
||||||
* plugin has a similar shortcode, it will override yours or yours will override
|
* plugin has a similar shortcode, it will override yours or yours will override
|
||||||
* theirs depending on which order the plugins are included and/or ran.
|
* theirs depending on which order the plugins are included and/or ran.
|
||||||
*
|
*
|
||||||
* Simplest example of a shortcode tag using the API:
|
* Simplest example of a shortcode tag using the API:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
|
@ -204,7 +204,7 @@ function do_shortcode_tag($m) {
|
||||||
*
|
*
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return array List of attributes and their value.
|
* @return array List of attributes and their value.
|
||||||
*/
|
*/
|
||||||
function shortcode_parse_atts($text) {
|
function shortcode_parse_atts($text) {
|
||||||
|
@ -278,6 +278,6 @@ function strip_shortcodes( $content ) {
|
||||||
return preg_replace('/'.$pattern.'/s', '', $content);
|
return preg_replace('/'.$pattern.'/s', '', $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
|
add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -784,7 +784,7 @@ function is_term($term, $taxonomy = '') {
|
||||||
if ( !empty($taxonomy) ) {
|
if ( !empty($taxonomy) ) {
|
||||||
if ( $result = $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $slug, $taxonomy), ARRAY_A) )
|
if ( $result = $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $slug, $taxonomy), ARRAY_A) )
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $else_where AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
|
return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $else_where AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ function get_themes() {
|
||||||
|
|
||||||
$stylesheet_files = array();
|
$stylesheet_files = array();
|
||||||
$template_files = array();
|
$template_files = array();
|
||||||
|
|
||||||
$stylesheet_dir = @ dir("$theme_root/$stylesheet");
|
$stylesheet_dir = @ dir("$theme_root/$stylesheet");
|
||||||
if ( $stylesheet_dir ) {
|
if ( $stylesheet_dir ) {
|
||||||
while ( ($file = $stylesheet_dir->read()) !== false ) {
|
while ( ($file = $stylesheet_dir->read()) !== false ) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ function wp_signon( $credentials = '', $secure_cookie = '' ) {
|
||||||
|
|
||||||
if ( '' === $secure_cookie )
|
if ( '' === $secure_cookie )
|
||||||
$secure_cookie = is_ssl() ? true : false;
|
$secure_cookie = is_ssl() ? true : false;
|
||||||
|
|
||||||
// If no credential info provided, check cookie.
|
// If no credential info provided, check cookie.
|
||||||
if ( empty($credentials['user_login']) && empty($credentials['user_password']) ) {
|
if ( empty($credentials['user_login']) && empty($credentials['user_password']) ) {
|
||||||
$user = wp_validate_auth_cookie();
|
$user = wp_validate_auth_cookie();
|
||||||
|
@ -102,7 +102,7 @@ function get_user_option( $option, $user = 0 ) {
|
||||||
$result = $user->{$option};
|
$result = $user->{$option};
|
||||||
else // Blog global
|
else // Blog global
|
||||||
$result = get_option( $option );
|
$result = get_option( $option );
|
||||||
|
|
||||||
return apply_filters("get_user_option_{$option}", $result, $option, $user);
|
return apply_filters("get_user_option_{$option}", $result, $option, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ function register_widget_control($name, $control_callback, $width = '', $height
|
||||||
*/
|
*/
|
||||||
function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
|
function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
|
||||||
global $wp_registered_widget_controls;
|
global $wp_registered_widget_controls;
|
||||||
|
|
||||||
$id = strtolower($id);
|
$id = strtolower($id);
|
||||||
|
|
||||||
if ( empty($control_callback) ) {
|
if ( empty($control_callback) ) {
|
||||||
|
@ -462,9 +462,9 @@ function wp_widget_links($args) {
|
||||||
function wp_widget_search($args) {
|
function wp_widget_search($args) {
|
||||||
extract($args);
|
extract($args);
|
||||||
$searchform_template = get_template_directory() . '/searchform.php';
|
$searchform_template = get_template_directory() . '/searchform.php';
|
||||||
|
|
||||||
echo $before_widget;
|
echo $before_widget;
|
||||||
|
|
||||||
// Use current theme search form if it exists
|
// Use current theme search form if it exists
|
||||||
if ( file_exists($searchform_template) ) {
|
if ( file_exists($searchform_template) ) {
|
||||||
include_once($searchform_template);
|
include_once($searchform_template);
|
||||||
|
@ -475,7 +475,7 @@ function wp_widget_search($args) {
|
||||||
<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
|
<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
|
||||||
</div></form>
|
</div></form>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
echo $after_widget;
|
echo $after_widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,9 +743,9 @@ function wp_widget_categories($args, $widget_args = 1) {
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
$cat_args['title_li'] = '';
|
$cat_args['title_li'] = '';
|
||||||
wp_list_categories($cat_args);
|
wp_list_categories($cat_args);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -339,12 +339,12 @@ class wpdb {
|
||||||
if (!empty($this->collate) )
|
if (!empty($this->collate) )
|
||||||
$collation_query .= " COLLATE '{$this->collate}'";
|
$collation_query .= " COLLATE '{$this->collate}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty($collation_query) )
|
if ( !empty($collation_query) )
|
||||||
$this->query($collation_query);
|
$this->query($collation_query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->select($dbname);
|
$this->select($dbname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@ class wpdb {
|
||||||
$wheres[] = "$c = '" . $this->escape( $v ) . "'";
|
$wheres[] = "$c = '" . $this->escape( $v ) . "'";
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $this->query( "UPDATE $table SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres ) );
|
return $this->query( "UPDATE $table SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ if ( force_ssl_admin() && !is_ssl() ) {
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ function retrieve_password() {
|
||||||
return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));
|
return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));
|
||||||
else if ( is_wp_error($allow) )
|
else if ( is_wp_error($allow) )
|
||||||
return $allow;
|
return $allow;
|
||||||
|
|
||||||
$key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login));
|
$key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login));
|
||||||
if ( empty($key) ) {
|
if ( empty($key) ) {
|
||||||
// Generate something random for a key...
|
// Generate something random for a key...
|
||||||
|
|
|
@ -435,7 +435,7 @@ force_ssl_login(FORCE_SSL_LOGIN);
|
||||||
*/
|
*/
|
||||||
if ( !defined( 'AUTOSAVE_INTERVAL' ) )
|
if ( !defined( 'AUTOSAVE_INTERVAL' ) )
|
||||||
define( 'AUTOSAVE_INTERVAL', 60 );
|
define( 'AUTOSAVE_INTERVAL', 60 );
|
||||||
|
|
||||||
|
|
||||||
require (ABSPATH . WPINC . '/vars.php');
|
require (ABSPATH . WPINC . '/vars.php');
|
||||||
|
|
||||||
|
|
20
xmlrpc.php
20
xmlrpc.php
|
@ -1013,7 +1013,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
// We've got all the data -- post it:
|
// We've got all the data -- post it:
|
||||||
$comment = compact('comment_ID', 'comment_content', 'comment_approved', 'comment_date', 'comment_date_gmt', 'comment_author', 'comment_author_email', 'comment_author_url');
|
$comment = compact('comment_ID', 'comment_content', 'comment_approved', 'comment_date', 'comment_date_gmt', 'comment_author', 'comment_author_email', 'comment_author_url');
|
||||||
|
|
||||||
$result = wp_update_comment($comment);
|
$result = wp_update_comment($comment);
|
||||||
if ( is_wp_error( $result ) )
|
if ( is_wp_error( $result ) )
|
||||||
return new IXR_Error(500, $result->get_error_message());
|
return new IXR_Error(500, $result->get_error_message());
|
||||||
|
@ -1092,7 +1092,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$comment['comment_content'] = $content_struct['content'];
|
$comment['comment_content'] = $content_struct['content'];
|
||||||
|
|
||||||
do_action('xmlrpc_call', 'wp.newComment');
|
do_action('xmlrpc_call', 'wp.newComment');
|
||||||
|
|
||||||
return wp_new_comment($comment);
|
return wp_new_comment($comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1881,11 +1881,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle enclosures
|
// Handle enclosures
|
||||||
$enclosure = $content_struct['enclosure'];
|
$enclosure = $content_struct['enclosure'];
|
||||||
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
||||||
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->attach_uploads( $post_ID, $post_content );
|
$this->attach_uploads( $post_ID, $post_content );
|
||||||
|
|
||||||
|
@ -2149,11 +2149,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle enclosures
|
// Handle enclosures
|
||||||
$enclosure = $content_struct['enclosure'];
|
$enclosure = $content_struct['enclosure'];
|
||||||
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
||||||
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->attach_uploads( $ID, $post_content );
|
$this->attach_uploads( $ID, $post_content );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue