Compare commits

..

1 Commits
2.6.5 ... 2.0

Author SHA1 Message Date
ryan
8f98a559c1 WordPress 2.0
git-svn-id: http://svn.automattic.com/wordpress/tags/2.0@3363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-12-26 21:35:22 +00:00
653 changed files with 36290 additions and 110540 deletions

View File

@@ -1,18 +1,5 @@
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>

View File

@@ -1,280 +1,280 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@@ -1,83 +1,112 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WordPress &rsaquo; ReadMe</title>
<link rel="stylesheet" href="wp-admin/css/install.css" type="text/css" />
<title>WordPress &rsaquo; ReadMe</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
<!--
html {
background: #eee;
}
body {
background: #fff;
color: #000;
font-family: Georgia, "Times New Roman", Times, serif;
margin-left: 25%;
margin-right: 25%;
padding: .2em 2em;
}
h1 {
color: #006;
font-size: 18px;
font-weight: lighter;
}
h2 {
font-size: 16px;
}
p, li, dt {
line-height: 140%;
padding-bottom: 2px;
}
ul, ol {
padding: 5px 5px 5px 20px;
}
-->
</style>
</head>
<body>
<h1 id="logo" style="text-align: center">
<img alt="WordPress" src="wp-admin/images/wordpress-logo.png" />
<br /> Version 2.6.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
<h1 style="text-align: center"><img alt="WordPress" src="http://wordpress.org/images/wordpress.gif" /> <br />
Version 2.0</h1>
<p style="text-align: center"> Semantic Personal Publishing Platform </p>
<h1>First Things First</h1>
<p>Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.</p>
<p style="text-align: right;">&#8212; Matt Mullenweg</p>
<p style="text-align: right;">&#8212; Matt Mullenweg </p>
<h1>Installation: Famous 5-minute install</h1>
<h1 id="installation">Installation: Famous 5-minute install</h1>
<ol>
<li>Unzip the package in an empty directory.</li>
<li>Open up <code>wp-config-sample.php</code> with a text editor like WordPad or similar and fill in your database connection details.</li>
<li>Save the file as <code>wp-config.php</code></li>
<li>Unzip the package in an empty directory</li>
<li>Open up <code>wp-config-sample.php</code> with a text editor like WordPad or similar and fill in your database connection details</li>
<li>Save the file as <code>wp-config.php</code> </li>
<li>Upload everything.</li>
<li>Open <span class="file"><a href="wp-admin/install.php">/wp-admin/install.php</a></span> in your browser. This should setup the tables needed for your blog. If there is an error, double check your <span class="file">wp-config.php</span> file, and try again. If it fails again, please go to the <a href="http://wordpress.org/support/">support forums</a> with as much data as you can gather.</li>
<li>Open <span class="file"><a href="wp-admin/install.php">/wp-admin/install.php</a></span> in your browser. This should setup the tables needed for your blog. If there is an error, double check your <span class="file">wp-config.php</span> file, and try again. If it fails again, please go to the <a href="http://wordpress.org/support/">support forums</a> with as much data as you can gather. </li>
<li><strong>Note the password given to you.</strong></li>
<li> The install script should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username <code>admin</code> and the password generated during the installation. You can then click on 'Profile' to change the password.</li>
</ol>
<h1>Upgrading</h1>
<p>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</p>
<h2>Upgrading from any previous WordPress to 2.6.1:</h2>
<h2>Upgrading from any previous WordPress to 2.0:</h2>
<ol>
<li>Delete your old WP files, saving ones you've modified.</li>
<li>Upload the new files.</li>
<li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a>.</span></li>
<li>Delete your old WP files, saving ones you've modified </li>
<li>Upload the new files</li>
<li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a></span></li>
<li>You wanted more, perhaps? That's it!</li>
</ol>
<h2>Template Changes</h2>
<p>If you have customized your templates you will probably have to make some changes to them. If you're converting your 1.2 or earlier templates, <a href="http://codex.wordpress.org/Upgrade_1.2_to_1.5">we've created a special guide for you</a>. </p>
<h1>Online Resources</h1>
<p>If you have any questions that aren't addressed in this document, please take advantage of WordPress' numerous online resources:</p>
<dl>
<dt><a href="http://codex.wordpress.org/">The WordPress Codex </a></dt>
<dd>The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.</dd>
<dd>The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available. </dd>
<dt><a href="http://wordpress.org/development/">The Development Blog</a></dt>
<dd>This is where you'll find the latest updates and news related to WordPress. Bookmark and check often.</dd>
<dd>This is where you'll find the latest updates and news related to WordPress. Bookmark and check often. </dd>
<dt><a href="http://planet.wordpress.org/">WordPress Planet </a></dt>
<dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.</dd>
<dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web. </dd>
<dt><a href="http://wordpress.org/support/">WordPress Support Forums</a></dt>
<dd>If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.</dd>
<dd>If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible. </dd>
<dt><a href="http://codex.wordpress.org/IRC">WordPress IRC Channel</a></dt>
<dd>Finally, there is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a>)</dd>
<dd>Finally, there is an online chat channel that is used for discussion amoung people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpresss) </dd>
</dl>
<h1>System Recommendations</h1>
<h1 id="requirements">System Recommendations</h1>
<ul>
<li>PHP version <strong>4.3</strong> or higher.</li>
<li>MySQL version <strong>4.0</strong> or higher.</li>
<li>PHP version <strong>4.1</strong> or higher</li>
<li>MySQL version <strong>3.23.23</strong> or higher</li>
<li>... and a link to <a href="http://wordpress.org/">http://wordpress.org</a> on your site.</li>
</ul>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&eacute;log</a>, which came from Michel V. The work has been continued by the <a href="http://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="http://wordpress.org/donate/">donating</a>.</p>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&eacute;log</a>, which came from Michel V. The work has been continued by the <a href="http://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="http://wordpress.org/donate/">donating</a>. </p>
<h1>Upgrading from another system</h1>
<p>WordPress can <a href="http://codex.wordpress.org/Importing_Content">import from a number of systems</a>. First you need to get WordPress installed and working as described above.</p>
<p>WordPress can <a href="http://codex.wordpress.org/Importing_from_other_blogging_software">import from a number of systems</a>. First you need to get WordPress installed and working as described above.</p>
<h1>XML-RPC and Atom Interface</h1>
<p>You can now post to your WordPress blog with tools like <a href="http://windowslivewriter.spaces.live.com/">Windows Live Writer</a>, <a href="http://ecto.kung-foo.tv/">Ecto</a>, <a href="http://bloggar.com/">Bloggar</a>, <a href="http://radio.userland.com">Radio Userland</a> (which means you can use Radio's email-to-blog feature), <a href="http://www.newzcrawler.com/">NewzCrawler</a>, and other tools that support the Blogging APIs! :) You can read more about <a href="http://codex.wordpress.org/XML-RPC_Support">XML-RPC support on the Codex</a>.</p>
<h1 id="templates">XML-RPC Interface</h1>
<p>You can now post to your WordPress blog with tools like <a href="http://ecto.kung-foo.tv/">Ecto</a>, <a href="http://blogbuddy.sourceforge.net">BlogBuddy</a>, <a href="http://bloggar.com/">Bloggar</a>, <a href="http://www.ubique.ch/wapblogger/">WapBlogger</a> (post from your Wap cellphone!), <a href="http://radio.userland.com">Radio Userland</a> (which means you can use Radio's email-to-blog feature), <a href="http://www.zempt.com/">Zempt</a>, <a href="http://www.newzcrawler.com/">NewzCrawler</a>, and other tools that support the Blogging APIs! :) You can read more about <a href="http://codex.wordpress.org/XML-RPC_Support">XML-RPC support on the Codex</a>.</p>
<h1>Post via Email</h1>
<p>You can post from an email client! To set this up go to your &quot;Writing&quot; options screen and fill in the connection details for your secret POP3 account. Then you need to set up <code>wp-mail.php</code> to execute periodically to check the mailbox for new posts. You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your <code>wp-mail.php</code> URL.</p>
<p>Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will <em>delete</em> emails that are successfully posted.</p>
<p>You can post from an email client! To set this up go to your &quot;Writing&quot; options screen and fill in the connection details for your secret POP3 account. Then you need to set up <code>wp-mail.php</code> to execute periodically to check the mailbox for new posts. You can do it with Cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your <code>wp-mail.php</code> URL. </p>
<p> Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address dicrete. The script will <i>delete</i> emails that are successfully posted. </p>
<h1 id="roles">User Roles </h1>
<h1>User Roles</h1>
<p>We've eliminated user levels in order to make way for the much more flexible roles system introduced in 2.0. You can <a href="http://codex.wordpress.org/Roles_and_Capabilities">read more about Roles and Capabilities on the Codex</a>.</p>
<h1> Final notes</h1>
<ul>
<li>If you have any suggestions, ideas, comments, or if you (gasp!) found a bug, join us in the <a href="http://wordpress.org/support/">Support Forums</a>.</li>
<li>If you have any suggestions, ideas, comments, or if you (gasp!) found a bug, join us in the <a href="http://wordpress.org/support/">Support Forums</a></li>
<li>WordPress now has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this see the <a href="http://codex.wordpress.org/Plugin_API">plugin documentation in the Codex</a>. In most all cases you shouldn't modify any of the core code.</li>
</ul>
@@ -88,4 +117,4 @@
<p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr> (see <a href="license.txt">license.txt</a>).</p>
</body>
</html>
</html>

View File

@@ -1,644 +0,0 @@
<?php
define('DOING_AJAX', true);
require_once('../wp-load.php');
require_once('includes/admin.php');
if ( !is_user_logged_in() )
die('-1');
if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) {
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$s = $_GET['q']; // is this slashed already?
if ( strstr( $s, ',' ) ) {
$s = explode( ',', $s );
$s = $s[count( $s ) - 1];
}
$s = trim( $s );
if ( strlen( $s ) < 2 )
die; // require 2 chars for matching
$results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" );
echo join( $results, "\n" );
die;
}
$id = isset($_POST['id'])? (int) $_POST['id'] : 0;
switch ( $action = $_POST['action'] ) :
case 'delete-comment' :
check_ajax_referer( "delete-comment_$id" );
if ( !$comment = get_comment( $id ) )
die('1');
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
die('-1');
if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) {
if ( 'spam' == wp_get_comment_status( $comment->comment_ID ) )
die('1');
$r = wp_set_comment_status( $comment->comment_ID, 'spam' );
} else {
$r = wp_delete_comment( $comment->comment_ID );
}
die( $r ? '1' : '0' );
break;
case 'delete-cat' :
check_ajax_referer( "delete-category_$id" );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$cat = get_category( $id );
if ( !$cat || is_wp_error( $cat ) )
die('1');
if ( wp_delete_category( $id ) )
die('1');
else
die('0');
break;
case 'delete-tag' :
check_ajax_referer( "delete-tag_$id" );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$tag = get_term( $id, 'post_tag' );
if ( !$tag || is_wp_error( $tag ) )
die('1');
if ( wp_delete_term($id, 'post_tag'))
die('1');
else
die('0');
break;
case 'delete-link-cat' :
check_ajax_referer( "delete-link-category_$id" );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$cat = get_term( $id, 'link_category' );
if ( !$cat || is_wp_error( $cat ) )
die('1');
$cat_name = get_term_field('name', $id, 'link_category');
// Don't delete the default cats.
if ( $id == get_option('default_link_category') ) {
$x = new WP_AJAX_Response( array(
'what' => 'link-cat',
'id' => $id,
'data' => new WP_Error( 'default-link-cat', sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name) )
) );
$x->send();
}
$r = wp_delete_term($id, 'link_category');
if ( !$r )
die('0');
if ( is_wp_error($r) ) {
$x = new WP_AJAX_Response( array(
'what' => 'link-cat',
'id' => $id,
'data' => $r
) );
$x->send();
}
die('1');
break;
case 'delete-link' :
check_ajax_referer( "delete-bookmark_$id" );
if ( !current_user_can( 'manage_links' ) )
die('-1');
$link = get_bookmark( $id );
if ( !$link || is_wp_error( $link ) )
die('1');
if ( wp_delete_link( $id ) )
die('1');
else
die('0');
break;
case 'delete-meta' :
check_ajax_referer( "delete-meta_$id" );
if ( !$meta = get_post_meta_by_id( $id ) )
die('1');
if ( !current_user_can( 'edit_post', $meta->post_id ) )
die('-1');
if ( delete_meta( $meta->meta_id ) )
die('1');
die('0');
break;
case 'delete-post' :
check_ajax_referer( "{$action}_$id" );
if ( !current_user_can( 'delete_post', $id ) )
die('-1');
if ( !get_post( $id ) )
die('1');
if ( wp_delete_post( $id ) )
die('1');
else
die('0');
break;
case 'delete-page' :
check_ajax_referer( "{$action}_$id" );
if ( !current_user_can( 'delete_page', $id ) )
die('-1');
if ( !get_page( $id ) )
die('1');
if ( wp_delete_post( $id ) )
die('1');
else
die('0');
break;
case 'dim-comment' :
if ( !$comment = get_comment( $id ) )
die('0');
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
die('-1');
if ( !current_user_can( 'moderate_comments' ) )
die('-1');
$current = wp_get_comment_status( $comment->comment_ID );
if ( $_POST['new'] == $current )
die('1');
if ( 'unapproved' == $current ) {
check_ajax_referer( "approve-comment_$id" );
if ( wp_set_comment_status( $comment->comment_ID, 'approve' ) )
die('1');
} else {
check_ajax_referer( "unapprove-comment_$id" );
if ( wp_set_comment_status( $comment->comment_ID, 'hold' ) )
die('1');
}
die('0');
break;
case 'add-category' : // On the Fly
check_ajax_referer( $action );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$names = explode(',', $_POST['newcat']);
if ( 0 > $parent = (int) $_POST['newcat_parent'] )
$parent = 0;
$post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array();
$checked_categories = array_map( 'absint', (array) $post_category );
$popular_ids = isset( $_POST['popular_ids'] ) ?
array_map( 'absint', explode( ',', $_POST['popular_ids'] ) ) :
false;
$x = new WP_Ajax_Response();
foreach ( $names as $cat_name ) {
$cat_name = trim($cat_name);
$category_nicename = sanitize_title($cat_name);
if ( '' === $category_nicename )
continue;
$cat_id = wp_create_category( $cat_name, $parent );
$checked_categories[] = $cat_id;
if ( $parent ) // Do these all at once in a second
continue;
$category = get_category( $cat_id );
ob_start();
wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids );
$data = ob_get_contents();
ob_end_clean();
$x->add( array(
'what' => 'category',
'id' => $cat_id,
'data' => $data,
'position' => -1
) );
}
if ( $parent ) { // Foncy - replace the parent and all its children
$parent = get_category( $parent );
ob_start();
dropdown_categories( 0, $parent );
$data = ob_get_contents();
ob_end_clean();
$x->add( array(
'what' => 'category',
'id' => $parent->term_id,
'old_id' => $parent->term_id,
'data' => $data,
'position' => -1
) );
}
$x->send();
break;
case 'add-link-category' : // On the Fly
check_ajax_referer( $action );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
$names = explode(',', $_POST['newcat']);
$x = new WP_Ajax_Response();
foreach ( $names as $cat_name ) {
$cat_name = trim($cat_name);
$slug = sanitize_title($cat_name);
if ( '' === $slug )
continue;
if ( !$cat_id = is_term( $cat_name, 'link_category' ) ) {
$cat_id = wp_insert_term( $cat_name, 'link_category' );
}
$cat_id = $cat_id['term_id'];
$cat_name = wp_specialchars(stripslashes($cat_name));
$x->add( array(
'what' => 'link-category',
'id' => $cat_id,
'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='$cat_id' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
'position' => -1
) );
}
$x->send();
break;
case 'add-cat' : // From Manage->Categories
check_ajax_referer( 'add-category' );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
if ( '' === trim($_POST['cat_name']) ) {
$x = new WP_Ajax_Response( array(
'what' => 'cat',
'id' => new WP_Error( 'cat_name', __('You did not enter a category name.') )
) );
$x->send();
}
if ( category_exists( trim( $_POST['cat_name'] ) ) ) {
$x = new WP_Ajax_Response( array(
'what' => 'cat',
'id' => new WP_Error( 'cat_exists', __('The category you are trying to create already exists.'), array( 'form-field' => 'cat_name' ) ),
) );
$x->send();
}
$cat = wp_insert_category( $_POST, true );
if ( is_wp_error($cat) ) {
$x = new WP_Ajax_Response( array(
'what' => 'cat',
'id' => $cat
) );
$x->send();
}
if ( !$cat || (!$cat = get_category( $cat )) )
die('0');
$level = 0;
$cat_full_name = $cat->name;
$_cat = $cat;
while ( $_cat->parent ) {
$_cat = get_category( $_cat->parent );
$cat_full_name = $_cat->name . ' &#8212; ' . $cat_full_name;
$level++;
}
$cat_full_name = attribute_escape($cat_full_name);
$x = new WP_Ajax_Response( array(
'what' => 'cat',
'id' => $cat->term_id,
'data' => _cat_row( $cat, $level, $cat_full_name ),
'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category <a href="#%s">%s</a> added' ), "cat-$cat->term_id", $cat_full_name))
) );
$x->send();
break;
case 'add-link-cat' : // From Blogroll -> Categories
check_ajax_referer( 'add-link-category' );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
if ( '' === trim($_POST['name']) ) {
$x = new WP_Ajax_Response( array(
'what' => 'link-cat',
'id' => new WP_Error( 'name', __('You did not enter a category name.') )
) );
$x->send();
}
$r = wp_insert_term($_POST['name'], 'link_category', $_POST );
if ( is_wp_error( $r ) ) {
$x = new WP_AJAX_Response( array(
'what' => 'link-cat',
'id' => $r
) );
$x->send();
}
extract($r, EXTR_SKIP);
if ( !$link_cat = link_cat_row( $term_id ) )
die('0');
$x = new WP_Ajax_Response( array(
'what' => 'link-cat',
'id' => $term_id,
'data' => $link_cat
) );
$x->send();
break;
case 'add-tag' : // From Manage->Tags
check_ajax_referer( 'add-tag' );
if ( !current_user_can( 'manage_categories' ) )
die('-1');
if ( '' === trim($_POST['name']) ) {
$x = new WP_Ajax_Response( array(
'what' => 'tag',
'id' => new WP_Error( 'name', __('You did not enter a tag name.') )
) );
$x->send();
}
$tag = wp_insert_term($_POST['name'], 'post_tag', $_POST );
if ( is_wp_error($tag) ) {
$x = new WP_Ajax_Response( array(
'what' => 'tag',
'id' => $tag
) );
$x->send();
}
if ( !$tag || (!$tag = get_term( $tag['term_id'], 'post_tag' )) )
die('0');
$tag_full_name = $tag->name;
$tag_full_name = attribute_escape($tag_full_name);
$x = new WP_Ajax_Response( array(
'what' => 'tag',
'id' => $tag->term_id,
'data' => _tag_row( $tag ),
'supplemental' => array('name' => $tag_full_name, 'show-link' => sprintf(__( 'Tag <a href="#%s">%s</a> added' ), "tag-$tag->term_id", $tag_full_name))
) );
$x->send();
break;
case 'add-comment' :
check_ajax_referer( $action );
if ( !current_user_can( 'edit_post', $id ) )
die('-1');
$search = isset($_POST['s']) ? $_POST['s'] : false;
$start = isset($_POST['page']) ? intval($_POST['page']) * 25 - 1: 24;
$status = isset($_POST['comment_status']) ? $_POST['comment_status'] : false;
$mode = isset($_POST['mode']) ? $_POST['mode'] : 'detail';
list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1 );
if ( get_option('show_avatars') )
add_filter( 'comment_author', 'floated_admin_avatar' );
if ( !$comments )
die('1');
$x = new WP_Ajax_Response();
foreach ( (array) $comments as $comment ) {
get_comment( $comment );
ob_start();
_wp_comment_row( $comment->comment_ID, $mode, $status );
$comment_list_item = ob_get_contents();
ob_end_clean();
$x->add( array(
'what' => 'comment',
'id' => $comment->comment_ID,
'data' => $comment_list_item
) );
}
$x->send();
break;
case 'add-meta' :
check_ajax_referer( 'add-meta' );
$c = 0;
$pid = (int) $_POST['post_id'];
if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) {
if ( !current_user_can( 'edit_post', $pid ) )
die('-1');
if ( '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) )
die('1');
if ( $pid < 0 ) {
$now = current_time('timestamp', 1);
if ( $pid = wp_insert_post( array(
'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
) ) ) {
if ( is_wp_error( $pid ) ) {
$x = new WP_Ajax_Response( array(
'what' => 'meta',
'data' => $pid
) );
$x->send();
}
$mid = add_meta( $pid );
} else {
die('0');
}
} else if ( !$mid = add_meta( $pid ) ) {
die('0');
}
$meta = get_post_meta_by_id( $mid );
$pid = (int) $meta->post_id;
$meta = get_object_vars( $meta );
$x = new WP_Ajax_Response( array(
'what' => 'meta',
'id' => $mid,
'data' => _list_meta_row( $meta, $c ),
'position' => 1,
'supplemental' => array('postid' => $pid)
) );
} else {
$mid = (int) array_pop(array_keys($_POST['meta']));
$key = $_POST['meta'][$mid]['key'];
$value = $_POST['meta'][$mid]['value'];
if ( !$meta = get_post_meta_by_id( $mid ) )
die('0'); // if meta doesn't exist
if ( !current_user_can( 'edit_post', $meta->post_id ) )
die('-1');
if ( !$u = update_meta( $mid, $key, $value ) )
die('1'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
$key = stripslashes($key);
$value = stripslashes($value);
$x = new WP_Ajax_Response( array(
'what' => 'meta',
'id' => $mid, 'old_id' => $mid,
'data' => _list_meta_row( array(
'meta_key' => $key,
'meta_value' => $value,
'meta_id' => $mid
), $c ),
'position' => 0,
'supplemental' => array('postid' => $meta->post_id)
) );
}
$x->send();
break;
case 'add-user' :
check_ajax_referer( $action );
if ( !current_user_can('create_users') )
die('-1');
require_once(ABSPATH . WPINC . '/registration.php');
if ( !$user_id = add_user() )
die('0');
elseif ( is_wp_error( $user_id ) ) {
$x = new WP_Ajax_Response( array(
'what' => 'user',
'id' => $user_id
) );
$x->send();
}
$user_object = new WP_User( $user_id );
$x = new WP_Ajax_Response( array(
'what' => 'user',
'id' => $user_id,
'data' => user_row( $user_object, '', $user_object->roles[0] ),
'supplemental' => array(
'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
'role' => $user_object->roles[0]
)
) );
$x->send();
break;
case 'autosave' : // The name of this action is hardcoded in edit_post()
define( 'DOING_AUTOSAVE', true );
$nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' );
global $current_user;
$_POST['post_category'] = explode(",", $_POST['catslist']);
$_POST['tags_input'] = explode(",", $_POST['tags_input']);
if($_POST['post_type'] == 'page' || empty($_POST['post_category']))
unset($_POST['post_category']);
$do_autosave = (bool) $_POST['autosave'];
$do_lock = true;
$data = '';
$message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) );
$supplemental = array();
$id = $revision_id = 0;
if($_POST['post_ID'] < 0) {
$_POST['post_status'] = 'draft';
$_POST['temp_ID'] = $_POST['post_ID'];
if ( $do_autosave ) {
$id = wp_write_post();
$data = $message;
}
} else {
$post_ID = (int) $_POST['post_ID'];
$_POST['ID'] = $post_ID;
$post = get_post($post_ID);
if ( $last = wp_check_post_lock( $post->ID ) ) {
$do_autosave = $do_lock = false;
$last_user = get_userdata( $last );
$last_user_name = $last_user ? $last_user->display_name : __( 'Someone' );
$data = new WP_Error( 'locked', sprintf(
$_POST['post_type'] == 'page' ? __( 'Autosave disabled: %s is currently editing this page.' ) : __( 'Autosave disabled: %s is currently editing this post.' ),
wp_specialchars( $last_user_name )
) );
$supplemental['disable_autosave'] = 'disable';
}
if ( 'page' == $post->post_type ) {
if ( !current_user_can('edit_page', $post_ID) )
die(__('You are not allowed to edit this page.'));
} else {
if ( !current_user_can('edit_post', $post_ID) )
die(__('You are not allowed to edit this post.'));
}
if ( $do_autosave ) {
// Drafts are just overwritten by autosave
if ( 'draft' == $post->post_status ) {
$id = edit_post();
} else { // Non drafts are not overwritten. The autosave is stored in a special post revision.
$revision_id = wp_create_post_autosave( $post->ID );
if ( is_wp_error($revision_id) )
$id = $revision_id;
else
$id = $post->ID;
}
$data = $message;
} else {
$id = $post->ID;
}
}
if ( $do_lock && $id && is_numeric($id) )
wp_set_post_lock( $id );
if ( $nonce_age == 2 ) {
$supplemental['replace-autosavenonce'] = wp_create_nonce('autosave');
$supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink');
$supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink');
$supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes');
if ( $id ) {
if ( $_POST['post_type'] == 'post' )
$supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id);
elseif ( $_POST['post_type'] == 'page' )
$supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id);
}
}
$x = new WP_Ajax_Response( array(
'what' => 'autosave',
'id' => $id,
'data' => $id ? $data : '',
'supplemental' => $supplemental
) );
$x->send();
break;
case 'autosave-generate-nonces' :
check_ajax_referer( 'autosave', 'autosavenonce' );
$ID = (int) $_POST['post_ID'];
if($_POST['post_type'] == 'post') {
if(current_user_can('edit_post', $ID))
die(wp_create_nonce('update-post_' . $ID));
}
if($_POST['post_type'] == 'page') {
if(current_user_can('edit_page', $ID)) {
die(wp_create_nonce('update-page_' . $ID));
}
}
die('0');
break;
case 'closed-postboxes' :
check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' );
$closed = isset( $_POST['closed'] )? $_POST['closed'] : '';
$closed = explode( ',', $_POST['closed'] );
$page = isset( $_POST['page'] )? $_POST['page'] : '';
if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
die(-1);
}
if (!is_array($closed)) break;
$current_user = wp_get_current_user();
update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed);
break;
case 'get-permalink':
check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
die(add_query_arg(array('preview' => 'true'), get_permalink($post_id)));
break;
case 'sample-permalink':
check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
$title = isset($_POST['new_title'])? $_POST['new_title'] : '';
$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : '';
die(get_sample_permalink_html($post_id, $title, $slug));
break;
default :
do_action( 'wp_ajax_' . $_POST['action'] );
die('0');
break;
endswitch;
?>

349
wp-admin/admin-db.php Normal file
View File

@@ -0,0 +1,349 @@
<?php
function get_users_drafts( $user_id ) {
global $wpdb;
$user_id = (int) $user_id;
$query = "SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_id ORDER BY ID DESC";
$query = apply_filters('get_users_drafts', $query);
return $wpdb->get_results( $query );
}
function get_others_drafts( $user_id ) {
global $wpdb;
$user = get_userdata( $user_id );
$level_key = $wpdb->prefix . 'user_level';
$editable = get_editable_user_ids( $user_id );
if( !$editable ) {
$other_drafts = '';
} else {
$editable = join(',', $editable);
$other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) AND post_author != '$user_id' ");
}
return apply_filters('get_others_drafts', $other_drafts);
}
function get_editable_authors( $user_id ) {
global $wpdb;
$editable = get_editable_user_ids( $user_id );
if( !$editable ) {
return false;
} else {
$editable = join(',', $editable);
$authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable)" );
}
return apply_filters('get_editable_authors', $authors);
}
function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
global $wpdb;
$user = new WP_User( $user_id );
if ( ! $user->has_cap('edit_others_posts') ) {
if ( $user->has_cap('edit_posts') || $exclude_zeros == false )
return array($user->id);
else
return false;
}
$level_key = $wpdb->prefix . 'user_level';
$query = "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '$level_key'";
if ( $exclude_zeros )
$query .= " AND meta_value != '0'";
return $wpdb->get_col( $query );
}
function get_author_user_ids() {
global $wpdb;
$level_key = $wpdb->prefix . 'user_level';
$query = "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '$level_key' AND meta_value != '0'";
return $wpdb->get_col( $query );
}
function get_nonauthor_user_ids() {
global $wpdb;
$level_key = $wpdb->prefix . 'user_level';
$query = "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '$level_key' AND meta_value = '0'";
return $wpdb->get_col( $query );
}
function wp_insert_category($catarr) {
global $wpdb;
extract($catarr);
$cat_ID = (int) $cat_ID;
// Are we updating or creating?
if (!empty ($cat_ID))
$update = true;
else
$update = false;
$cat_name = wp_specialchars($cat_name);
if (empty ($category_nicename))
$category_nicename = sanitize_title($cat_name);
else
$category_nicename = sanitize_title($category_nicename);
if (empty ($category_description))
$category_description = '';
if (empty ($category_parent))
$category_parent = 0;
if (!$update) {
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$category_parent')");
$cat_ID = $wpdb->insert_id;
} else {
$wpdb->query ("UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'");
}
if ( $category_nicename == '' ) {
$category_nicename = sanitize_title($cat_name, $cat_ID );
$wpdb->query( "UPDATE $wpdb->categories SET category_nicename = '$category_nicename' WHERE cat_ID = '$cat_ID'" );
}
wp_cache_delete($cat_ID, 'category');
if ($update) {
do_action('edit_category', $cat_ID);
} else {
wp_cache_delete('all_category_ids', 'category');
do_action('create_category', $cat_ID);
do_action('add_category', $cat_ID);
}
return $cat_ID;
}
function wp_update_category($catarr) {
global $wpdb;
$cat_ID = (int) $catarr['cat_ID'];
// First, get all of the original fields
$category = get_category($cat_ID, ARRAY_A);
// Escape data pulled from DB.
$category = add_magic_quotes($category);
// Merge old and new fields with new fields overwriting old ones.
$catarr = array_merge($category, $catarr);
return wp_insert_category($catarr);
}
function wp_delete_category($cat_ID) {
global $wpdb;
$cat_ID = (int) $cat_ID;
// Don't delete the default cat.
if (1 == $cat_ID)
return 0;
$category = get_category($cat_ID);
$parent = $category->category_parent;
// Delete the category.
$wpdb->query("DELETE FROM $wpdb->categories WHERE cat_ID = '$cat_ID'");
// Update children to point to new parent.
$wpdb->query("UPDATE $wpdb->categories SET category_parent = '$parent' WHERE category_parent = '$cat_ID'");
// TODO: Only set categories to general if they're not in another category already
$wpdb->query("UPDATE $wpdb->post2cat SET category_id='1' WHERE category_id='$cat_ID'");
wp_cache_delete($cat_ID, 'category');
wp_cache_delete('all_category_ids', 'category');
do_action('delete_category', $cat_ID);
return 1;
}
function wp_create_category($cat_name) {
$cat_array = compact('cat_name');
return wp_insert_category($cat_array);
}
function wp_create_categories($categories, $post_id = '') {
$cat_ids = array ();
foreach ($categories as $category) {
if ($id = category_exists($category))
$cat_ids[] = $id;
else
if ($id = wp_create_category($category))
$cat_ids[] = $id;
}
if ($post_id)
wp_set_post_cats('', $post_id, $cat_ids);
return $cat_ids;
}
function category_exists($cat_name) {
global $wpdb;
if (!$category_nicename = sanitize_title($cat_name))
return 0;
return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");
}
function wp_delete_user($id, $reassign = 'novalue') {
global $wpdb;
$id = (int) $id;
$user = get_userdata($id);
if ($reassign == 'novalue') {
$post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_author = $id");
if ($post_ids) {
foreach ($post_ids as $post_id)
wp_delete_post($post_id);
}
// Clean links
$wpdb->query("DELETE FROM $wpdb->links WHERE link_owner = $id");
} else {
$reassign = (int) $reassign;
$wpdb->query("UPDATE $wpdb->posts SET post_author = {$reassign} WHERE post_author = {$id}");
$wpdb->query("UPDATE $wpdb->links SET link_owner = {$reassign} WHERE link_owner = {$id}");
}
// FINALLY, delete user
$wpdb->query("DELETE FROM $wpdb->users WHERE ID = $id");
$wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$id'");
wp_cache_delete($id, 'users');
wp_cache_delete($user->user_login, 'userlogins');
do_action('delete_user', $id);
return true;
}
function get_link($link_id, $output = OBJECT) {
global $wpdb;
$link = $wpdb->get_row("SELECT * FROM $wpdb->links WHERE link_id = '$link_id'");
if ( $output == OBJECT ) {
return $link;
} elseif ( $output == ARRAY_A ) {
return get_object_vars($link);
} elseif ( $output == ARRAY_N ) {
return array_values(get_object_vars($link));
} else {
return $link;
}
}
function wp_insert_link($linkdata) {
global $wpdb, $current_user;
extract($linkdata);
$update = false;
if ( !empty($link_id) )
$update = true;
if ( empty($link_rating) )
$link_rating = 0;
if ( empty($link_target) )
$link_target = '';
if ( empty($link_visible) )
$link_visible = 'Y';
if ( empty($link_owner) )
$link_owner = $current_user->id;
if ( empty($link_notes) )
$link_notes = '';
if ( $update ) {
$wpdb->query("UPDATE $wpdb->links SET link_url='$link_url',
link_name='$link_name', link_image='$link_image',
link_target='$link_target', link_category='$link_category',
link_visible='$link_visible', link_description='$link_description',
link_rating='$link_rating', link_rel='$link_rel',
link_notes='$link_notes', link_rss = '$link_rss'
WHERE link_id='$link_id'");
} else {
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_category, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES('$link_url','$link_name', '$link_image', '$link_target', '$link_category', '$link_description', '$link_visible', '$link_owner', '$link_rating', '$link_rel', '$link_notes', '$link_rss')");
$link_id = $wpdb->insert_id;
}
if ( $update )
do_action('edit_link', $link_id);
else
do_action('add_link', $link_id);
return $link_id;
}
function wp_update_link($linkdata) {
global $wpdb;
$link_id = (int) $linkdata['link_id'];
$link = get_link($link_id, ARRAY_A);
// Escape data pulled from DB.
$link = add_magic_quotes($link);
// Merge old and new fields with new fields overwriting old ones.
$linkdata = array_merge($link, $linkdata);
return wp_insert_link($linkdata);
}
function wp_delete_link($link_id) {
global $wpdb;
do_action('delete_link', $link_id);
return $wpdb->query("DELETE FROM $wpdb->links WHERE link_id = '$link_id'");
}
function post_exists($title, $content = '', $post_date = '') {
global $wpdb;
if (!empty ($post_date))
$post_date = "AND post_date = '$post_date'";
if (!empty ($title))
return $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_title = '$title' $post_date");
else
if (!empty ($content))
return $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_content = '$content' $post_date");
return 0;
}
function comment_exists($comment_author, $comment_date) {
global $wpdb;
return $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments
WHERE comment_author = '$comment_author' AND comment_date = '$comment_date'");
}
?>

View File

@@ -1,14 +1,12 @@
</div><!-- wpbody -->
</div><!-- wpcontent -->
</div><!-- wpwrap -->
<div id="footer">
<p><?php
do_action('in_admin_footer', '');
$upgrade = apply_filters( 'update_footer', '' );
echo __('Thank you for creating with <a href="http://wordpress.org/">WordPress</a>').' | '.__('<a href="http://codex.wordpress.org/">Documentation</a>').' | '.__('<a href="http://wordpress.org/support/forum/4">Feedback</a>').' '.$upgrade;
?></p>
<div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p>
<p>
<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> &#8212; <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br />
<?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
</p>
</div>
<?php do_action('admin_footer', ''); ?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,132 +1,329 @@
<?php
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
if (!isset($_GET["page"])) require_once('admin.php');
if ( $editing ) {
if ( user_can_richedit() )
wp_enqueue_script( 'wp_tiny_mce' );
}
wp_enqueue_script( 'wp-gears' );
$min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'widgets.php', 'comment.php', 'link.php' );
$the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
$ie6_no_scrollbar = true;
function add_minwidth($c) {
return $c . 'minwidth ';
}
if ( in_array( $the_current_page, $min_width_pages ) ) {
$ie6_no_scrollbar = false;
add_filter( 'admin_body_class', 'add_minwidth' );
}
get_admin_page_title();
?>
<?php
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
if (!isset($_GET["page"])) require_once('admin.php'); ?>
<?php get_admin_page_title(); ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars( strip_tags( $title ) ); ?> &#8212; WordPress</title>
<?php
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
wp_admin_css( 'css/global' );
wp_admin_css();
wp_admin_css( 'css/colors' );
wp_admin_css( 'css/ie' );
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
function addLoadEvent(func) {
if ( typeof wpOnload != 'function' ) {
wpOnload = func;
} else {
var oldonload = wpOnload;
wpOnload = function() {
oldonload();
func();
}
}
}
<?php if ( isset($xfn) ) : ?>
function GetElementsWithClassName(elementName, className) {
var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array();
for (i = 0; i < allElements.length; i++) {
if (allElements[i].className == className) {
elemColl[elemColl.length] = allElements[i];
}
}
return elemColl;
}
function meChecked() {
var undefined;
var eMe = document.getElementById('me');
if (eMe == undefined) return false;
else return eMe.checked;
}
function upit() {
var isMe = meChecked(); //document.getElementById('me').checked;
var inputColl = GetElementsWithClassName('input', 'valinp');
var results = document.getElementById('link_rel');
var linkText, linkUrl, inputs = '';
for (i = 0; i < inputColl.length; i++) {
inputColl[i].disabled = isMe;
inputColl[i].parentNode.className = isMe ? 'disabled' : '';
if (!isMe && inputColl[i].checked && inputColl[i].value != '') {
inputs += inputColl[i].value + ' ';
}
}
inputs = inputs.substr(0,inputs.length - 1);
if (isMe) inputs='me';
results.value = inputs;
}
function blurry() {
if (!document.getElementById) return;
var aInputs = document.getElementsByTagName('input');
for (var i = 0; i < aInputs.length; i++) {
aInputs[i].onclick = aInputs[i].onkeyup = upit;
}
}
addLoadEvent(blurry);
<?php endif; ?>
//]]>
</script>
<?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') && $ie6_no_scrollbar ) : ?>
<script type="text/javascript" src="../wp-includes/js/fat.js"></script>
<script type="text/javascript" src="../wp-includes/js/tw-sack.js"></script>
<script type="text/javascript" src="list-manipulation.js"></script>
<?php if ( isset( $editing ) ) : ?>
<?php if ( $editing && user_can_richedit() ) : ?>
<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script>
<?php endif; ?>
<script type="text/javascript" src="../wp-includes/js/dbx.js"></script>
<script type="text/javascript">
//<![CDATA[
addLoadEvent( function() {
<?php switch ( $pagenow ) : case 'post.php' : ?>
var manager = new dbxManager('postmeta'); //session ID [/-_a-zA-Z0-9/]
<?php break; case 'page-new.php' : ?>
var manager = new dbxManager('pagemeta'); //session ID [/-_a-zA-Z0-9/]
<?php break; endswitch; ?>
});
//]]>
</script>
<script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script>
<?php if ( current_user_can('manage_categories') ) : ?>
<style type="text/css">
#newcat { width: 120px; margin-right: 5px; }
input#catadd { background: #a4a4a4;
border-bottom: 1px solid #898989;
border-left: 1px solid #bcbcbc;
border-right: 1px solid #898989;
border-top: 1px solid #bcbcbc;
color: #fff;
font-size: 10px;
padding: 0;
margin: 0;
font-weight: bold;
height: 20px;
margin-bottom: 2px;
text-align: center;
width: 37px; }
#howto {
font-size: 11px;
margin: 0 5px;
display: block;
}
#jaxcat {
margin: 0;
padding: 0;
}
</style>
<script type="text/javascript">
//<![CDATA[
var ajaxCat = new sack();
var newcat;
function newCatAddIn() {
if ( !document.getElementById('jaxcat') ) return false;
var ajaxcat = document.createElement('p');
ajaxcat.id = 'ajaxcat';
newcat = document.createElement('input');
newcat.type = 'text';
newcat.name = 'newcat';
newcat.id = 'newcat';
newcat.size = '16';
newcat.setAttribute('autocomplete', 'off');
newcat.onkeypress = ajaxNewCatKeyPress;
var newcatSub = document.createElement('input');
newcatSub.type = 'button';
newcatSub.name = 'Button';
newcatSub.id = 'catadd';
newcatSub.value = '<?php echo addslashes(__('Add')); ?>';
newcatSub.onclick = ajaxNewCat;
ajaxcat.appendChild(newcat);
ajaxcat.appendChild(newcatSub);
document.getElementById('jaxcat').appendChild(ajaxcat);
howto = document.createElement('span');
howto.innerHTML = '<?php echo addslashes(__('Separate multiple categories with commas.')); ?>';
howto.id = 'howto';
ajaxcat.appendChild(howto);
}
addLoadEvent(newCatAddIn);
function getResponseElement() {
var p = document.getElementById('ajaxcatresponse');
if (!p) {
p = document.createElement('span');
document.getElementById('jaxcat').appendChild(p);
p.id = 'ajaxcatresponse';
}
return p;
}
function newCatLoading() {
var p = getResponseElement();
p.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>';
}
function newCatLoaded() {
var p = getResponseElement();
p.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>';
}
function newCatInteractive() {
var p = getResponseElement();
p.innerHTML = '<?php echo addslashes(__('Processing Request...')); ?>';
}
function newCatCompletion() {
var p = getResponseElement();
var id = 0;
var ids = new Array();
var names = new Array();
ids = myPload( ajaxCat.response );
names = myPload( newcat.value );
for ( i = 0; i < ids.length; i++ ) {
id = ids[i].replace(/[\n\r\l]+/g, "");
if ( id == '-1' ) {
p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
return;
}
if ( id == '0' ) {
p.innerHTML = "<?php echo addslashes(__('That category name is invalid. Try something else.')); ?>";
return;
}
var exists = document.getElementById('category-' + id);
if (exists) {
var moveIt = exists.parentNode;
var container = moveIt.parentNode;
container.removeChild(moveIt);
container.insertBefore(moveIt, container.firstChild);
moveIt.id = 'new-category-' + id;
exists.checked = 'checked';
var nowClass = moveIt.className;
moveIt.className = nowClass + ' fade';
Fat.fade_all();
moveIt.className = nowClass;
} else {
var catDiv = document.getElementById('categorychecklist');
var newLabel = document.createElement('label');
newLabel.setAttribute('for', 'category-' + id);
newLabel.id = 'new-category-' + id;
newLabel.className = 'selectit fade';
var newCheck = document.createElement('input');
newCheck.type = 'checkbox';
newCheck.value = id;
newCheck.name = 'post_category[]';
newCheck.id = 'category-' + id;
newLabel.appendChild(newCheck);
var newLabelText = document.createTextNode(' ' + names[i]);
newLabel.appendChild(newLabelText);
catDiv.insertBefore(newLabel, catDiv.firstChild);
newCheck.checked = 'checked';
Fat.fade_all();
newLabel.className = 'selectit';
}
newcat.value = '';
}
p.parentNode.removeChild(p);
// var id = parseInt(ajaxCat.response, 10);
}
function ajaxNewCatKeyPress(e) {
if (!e) {
if (window.event) {
e = window.event;
} else {
return;
}
}
if (e.keyCode == 13) {
ajaxNewCat();
e.returnValue = false;
e.cancelBubble = true;
return false;
}
}
function ajaxNewCat() {
var newcat = document.getElementById('newcat');
var split_cats = new Array(1);
var catString = '';
catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value);
ajaxCat.requestFile = 'edit-form-ajax-cat.php';
ajaxCat.method = 'GET';
ajaxCat.onLoading = newCatLoading;
ajaxCat.onLoaded = newCatLoaded;
ajaxCat.onInteractive = newCatInteractive;
ajaxCat.onCompletion = newCatCompletion;
ajaxCat.runAJAX(catString);
}
function myPload( str ) {
var fixedExplode = new Array();
var comma = new String(',');
var count = 0;
var currentElement = '';
for( x=0; x < str.length; x++) {
andy = str.charAt(x);
if ( comma.indexOf(andy) != -1 ) {
currentElement = currentElement.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // trim
fixedExplode[count] = currentElement;
currentElement = "";
count++;
} else {
currentElement += andy;
}
}
if ( currentElement != "" )
fixedExplode[count] = currentElement;
return fixedExplode;
}
//]]>
</script>
<?php endif; ?>
<?php endif; ?>
<?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') ) : ?>
<style type="text/css">* html { overflow-x: hidden; }</style>
<?php endif;
<?php endif; ?>
$hook_suffixes = array();
if ( isset($page_hook) )
$hook_suffixes[] = "-$page_hook";
else if ( isset($plugin_page) )
$hook_suffixes[] = "-$plugin_page";
else if ( isset($pagenow) )
$hook_suffixes[] = "-$pagenow";
$hook_suffixes[] = '';
foreach ( $hook_suffixes as $hook_suffix )
do_action("admin_print_styles$hook_suffix"); // do_action( 'admin_print_styles-XXX' ); do_action( 'admin_print_styles' );
foreach ( $hook_suffixes as $hook_suffix )
do_action("admin_print_scripts$hook_suffix"); // do_action( 'admin_print_scripts-XXX' ); do_action( 'admin_print_scripts' );
foreach ( $hook_suffixes as $hook_suffix )
do_action("admin_head$hook_suffix"); // do_action( 'admin_head-XXX' ); do_action( 'admin_head' );
unset($hook_suffixes, $hook_suffix);
?>
<?php do_action('admin_head'); ?>
</head>
<body class="wp-admin <?php echo apply_filters( 'admin_body_class', '' ); ?>">
<div id="wpwrap">
<div id="wpcontent">
<body>
<div id="wphead">
<h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?><span id="viewsite"><a href="<?php echo trailingslashit( get_option('home') ); ?>"><?php _e('Visit Site') ?></a></span></h1>
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site') ?> &raquo;</a>)</span></h1>
</div>
<?php
if ( ! $is_opera ) {
?>
<div id="gears-info-box" class="info-box" style="display:none;">
<img src="images/gear.png" title="Gear" alt="" class="gears-img" />
<div id="gears-msg1">
<h3 class="info-box-title"><?php _e('Speed up WordPress'); ?></h3>
<p><?php _e('WordPress now has support for Gears, which adds new features to your web browser.'); ?><br />
<a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p>
<p><?php _e('After you install and enable Gears most of WordPress&#8217; images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p>
<p><strong><?php _e('Don&#8217;t install on a public or shared computer.'); ?></strong></p> <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&amp;return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button>
<button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div>
</div>
<div id="gears-msg2" style="display:none;">
<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
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.');
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.');
?></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>
<button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div>
</div>
<div id="gears-msg3" style="display:none;">
<h3 class="info-box-title"><?php _e('Gears Status'); ?></h3>
<p><?php
if ( $is_safari )
_e('Gears is installed and enabled on this computer. You can disable it from the Safari menu.');
else
_e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.');
?></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>
<div class="submit"><button class="button" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Close'); ?></button></div>
</div>
</div>
<?php } ?>
<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> | <?php _e('<a href="http://codex.wordpress.org/">Help</a>') ?> | <?php _e('<a href="http://wordpress.org/support/">Forums</a>'); if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div>
<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl')
?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Account'); ?></a>] </p></div>
<?php
require(ABSPATH . 'wp-admin/menu-header.php');
require(ABSPATH . '/wp-admin/menu-header.php');
if ( $parent_file == 'options-general.php' ) {
require(ABSPATH . 'wp-admin/options-head.php');
require(ABSPATH . '/wp-admin/options-head.php');
}
?>
<div id="wpbody">

View File

@@ -1,24 +0,0 @@
<?php
define('WP_ADMIN', TRUE);
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
else
require_once('../wp-load.php');
require_once(ABSPATH . 'wp-admin/includes/admin.php');
if ( !wp_validate_auth_cookie() )
wp_die(__('Cheatin&#8217; uh?'));
nocache_headers();
do_action('admin_init');
$action = 'admin_post';
if ( !empty($_REQUEST['action']) )
$action .= '_' . $_REQUEST['action'];
do_action($action);
?>

View File

@@ -1,17 +1,15 @@
<?php
define('WP_ADMIN', TRUE);
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
require_once( ABSPATH . 'wp-config.php');
else
require_once('../wp-load.php');
require_once('../wp-config.php');
if ( get_option('db_version') != $wp_db_version ) {
wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
exit;
}
require_once(ABSPATH . 'wp-admin/includes/admin.php');
if ( get_option('db_version') != $wp_db_version )
die (sprintf(__("Your database is out-of-date. Please <a href='%s'>upgrade</a>."), get_option('siteurl') . '/wp-admin/upgrade.php'));
require_once(ABSPATH . 'wp-admin/admin-functions.php');
require_once(ABSPATH . 'wp-admin/admin-db.php');
require_once(ABSPATH . WPINC . '/registration-functions.php');
auth_redirect();
@@ -19,101 +17,88 @@ nocache_headers();
update_category_cache();
$posts_per_page = get_option('posts_per_page');
$what_to_show = get_option('what_to_show');
$date_format = get_option('date_format');
$time_format = get_option('time_format');
get_currentuserinfo();
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));
$posts_per_page = get_settings('posts_per_page');
$what_to_show = get_settings('what_to_show');
$date_format = get_settings('date_format');
$time_format = get_settings('time_format');
wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), array('#07273E', '#14568A', '#D54E21', '#2683AE'));
wp_admin_css_color('fresh', __('Fresh'), admin_url("css/colors-fresh.css"), array('#464646', '#CEE1EF', '#D54E21', '#2683AE'));
$wpvarstoreset = array('profile','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
$$wpvar = $_GET["$wpvar"];
}
} else {
$$wpvar = $_POST["$wpvar"];
}
}
}
wp_enqueue_script( 'common' );
wp_enqueue_script( 'jquery-color' );
$editing = false;
require(ABSPATH . '/wp-admin/menu.php');
// Handle plugin admin pages.
if (isset($_GET['page'])) {
$plugin_page = stripslashes($_GET['page']);
$plugin_page = plugin_basename($plugin_page);
}
require(ABSPATH . 'wp-admin/menu.php');
do_action('admin_init');
// Handle plugin admin pages.
if (isset($plugin_page)) {
$page_hook = get_plugin_page_hook($plugin_page, $pagenow);
if ( $page_hook ) {
do_action('load-' . $page_hook);
if (! isset($_GET['noheader']))
require_once(ABSPATH . 'wp-admin/admin-header.php');
require_once(ABSPATH . '/wp-admin/admin-header.php');
do_action($page_hook);
} else {
if ( validate_file($plugin_page) ) {
wp_die(__('Invalid plugin page'));
die(__('Invalid plugin page'));
}
if (! ( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) )
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
do_action('load-' . $plugin_page);
if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page"))
die(sprintf(__('Cannot load %s.'), $plugin_page));
if (! isset($_GET['noheader']))
require_once(ABSPATH . 'wp-admin/admin-header.php');
include(WP_PLUGIN_DIR . "/$plugin_page");
require_once(ABSPATH . '/wp-admin/admin-header.php');
include(ABSPATH . "wp-content/plugins/$plugin_page");
}
include(ABSPATH . 'wp-admin/admin-footer.php');
exit();
} else if (isset($_GET['import'])) {
$importer = $_GET['import'];
if ( ! current_user_can('import') )
wp_die(__('You are not allowed to import.'));
if ( validate_file($importer) ) {
wp_die(__('Invalid importer.'));
die(__('Invalid importer.'));
}
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
die(__('Cannot load importer.'));
include(ABSPATH . "wp-admin/import/$importer.php");
// Allow plugins to define importers as well
if (! is_callable($wp_importers[$importer][2]))
{
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
{
wp_die(__('Cannot load importer.'));
}
include(ABSPATH . "wp-admin/import/$importer.php");
}
$parent_file = 'edit.php';
$submenu_file = 'import.php';
$parent_file = 'import.php';
$title = __('Import');
if (! isset($_GET['noheader']))
require_once(ABSPATH . 'wp-admin/admin-header.php');
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
define('WP_IMPORTING', true);
kses_init_filters(); // Always filter imported data with kses.
call_user_func($wp_importers[$importer][2]);
include(ABSPATH . 'wp-admin/admin-footer.php');
exit();
} else {
do_action("load-$pagenow");
}
if ( !empty($_REQUEST['action']) )
do_action('admin_action_' . $_REQUEST['action']);
?>

View File

@@ -1,49 +0,0 @@
<?php
/* This accepts file uploads from swfupload or other asynchronous upload methods.
*/
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
else
require_once('../wp-load.php');
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
unset($current_user);
require_once('admin.php');
header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
if ( !current_user_can('upload_files') )
wp_die(__('You do not have permission to upload files.'));
// just fetch the detail form for that attachment
if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
echo get_media_item($id);
exit;
}
check_admin_referer('media-form');
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
if (is_wp_error($id)) {
echo '<div id="media-upload-error">'.wp_specialchars($id->get_error_message()).'</div>';
exit;
}
if ( $_REQUEST['short'] ) {
// short form response - attachment ID only
echo $id;
}
else {
// long form response - big chunk o html
$type = $_REQUEST['type'];
echo apply_filters("async_upload_{$type}", $id);
}
?>

104
wp-admin/bookmarklet.php Normal file
View File

@@ -0,0 +1,104 @@
<?php
$mode = 'bookmarklet';
require_once('admin.php');
if ( ! current_user_can('edit_posts') )
die ("Cheatin' uh?");
if ('b' == $a):
?><!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">
<head>
<script type="text/javascript">
<!--
window.close()
-->
</script>
</head>
<body></body>
</html>
<?php
exit;
endif;
$post = get_default_post_to_edit();
$popuptitle = wp_specialchars(stripslashes($popuptitle));
$text = wp_specialchars(stripslashes(urldecode($text)));
$popuptitle = funky_javascript_fix($popuptitle);
$text = funky_javascript_fix($text);
$post_title = wp_specialchars($_REQUEST['post_title']);
if (!empty($post_title))
$post->post_title = stripslashes($post_title);
else
$post->post_title = $popuptitle;
$content = wp_specialchars($_REQUEST['content']);
$popupurl = wp_specialchars($_REQUEST['popupurl']);
if ( !empty($content) ) {
$post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) );
} else {
$post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text";
}
/* /big funky fixes */
?><!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">
<head>
<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
<style type="text/css">
<!--
#wpbookmarklet textarea,input,select {
border-width: 1px;
border-color: #cccccc;
border-style: solid;
padding: 2px;
margin: 1px;
}
#wpbookmarklet .checkbox {
background-color: #ffffff;
border-width: 0px;
padding: 0px;
margin: 0px;
}
#wpbookmarklet textarea {
font-family: Verdana, Geneva, Arial, Helvetica;
font-size: 0.9em;
}
#wpbookmarklet .wrap {
border: 0px;
}
#wpbookmarklet #postdiv {
margin-bottom: 0.5em;
}
#wpbookmarklet #titlediv {
margin-bottom: 1em;
}
-->
</style>
</head>
<body id="wpbookmarklet">
<div id="wphead">
<h1><?php bloginfo('name') ?></h1>
</div>
<?php require('edit-form.php'); ?>
<?php do_action('admin_footer', ''); ?>
</body>
</html>

View File

@@ -4,202 +4,160 @@ require_once('admin.php');
$title = __('Categories');
$parent_file = 'edit.php';
wp_reset_vars(array('action', 'cat'));
if ( isset($_GET['deleteit']) && isset($_GET['delete']) )
$action = 'bulk-delete';
$wpvarstoreset = array('action','cat');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
$$wpvar = $_GET["$wpvar"];
}
} else {
$$wpvar = $_POST["$wpvar"];
}
}
}
switch($action) {
case 'addcat':
check_admin_referer('add-category');
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
die (__('Cheatin&#8217; uh?'));
wp_insert_category($_POST);
if( wp_insert_category($_POST ) ) {
wp_redirect('categories.php?message=1#addcat');
} else {
wp_redirect('categories.php?message=4#addcat');
}
exit;
header('Location: categories.php?message=1#addcat');
break;
case 'delete':
$cat_ID = (int) $_GET['cat_ID'];
check_admin_referer('delete-category_' . $cat_ID);
check_admin_referer();
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
die (__('Cheatin&#8217; uh?'));
$cat_ID = (int) $_GET['cat_ID'];
$cat_name = get_catname($cat_ID);
// Don't delete the default cats.
if ( $cat_ID == get_option('default_category') )
wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
if ( 1 == $cat_ID )
die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name));
wp_delete_category($cat_ID);
wp_redirect('categories.php?message=2');
exit;
header('Location: categories.php?message=2');
break;
case 'bulk-delete':
check_admin_referer('bulk-categories');
if ( !current_user_can('manage_categories') )
wp_die( __('You are not allowed to delete categories.') );
foreach ( (array) $_GET['delete'] as $cat_ID ) {
$cat_name = get_catname($cat_ID);
// Don't delete the default cats.
if ( $cat_ID == get_option('default_category') )
wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
wp_delete_category($cat_ID);
}
$sendback = wp_get_referer();
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
wp_redirect($sendback);
exit();
break;
case 'edit':
require_once ('admin-header.php');
$cat_ID = (int) $_GET['cat_ID'];
$category = get_category_to_edit($cat_ID);
include('edit-category-form.php');
require_once ('admin-header.php');
$cat_ID = (int) $_GET['cat_ID'];
$category = get_category_to_edit($cat_ID);
?>
<div class="wrap">
<h2><?php _e('Edit Category') ?></h2>
<form name="editcat" action="categories.php" method="post">
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('Category name:') ?></th>
<td width="67%"><input name="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /> <input type="hidden" name="action" value="editedcat" />
<input type="hidden" name="cat_ID" value="<?php echo $category->cat_ID ?>" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Category slug:') ?></th>
<td><input name="category_nicename" type="text" value="<?php echo wp_specialchars($category->category_nicename); ?>" size="40" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Category parent:') ?></th>
<td>
<select name='category_parent'>
<option value='0' <?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option>
<?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?>
</select></td>
</tr>
<tr>
<th scope="row"><?php _e('Description:') ?></th>
<td><textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description, 1); ?></textarea></td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" value="<?php _e('Edit category') ?> &raquo;" /></p>
</form>
<p><a href="categories.php"><?php _e('&laquo; Return to category list'); ?></a></p>
</div>
<?php
break;
case 'editedcat':
$cat_ID = (int) $_POST['cat_ID'];
check_admin_referer('update-category_' . $cat_ID);
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
die (__('Cheatin&#8217; uh?'));
wp_update_category($_POST);
if ( wp_update_category($_POST) )
wp_redirect('categories.php?message=3');
else
wp_redirect('categories.php?message=5');
exit;
header('Location: categories.php?message=3');
break;
default:
if ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
wp_enqueue_script( 'admin-categories' );
wp_enqueue_script('admin-forms');
require_once ('admin-header.php');
$messages[1] = __('Category added.');
$messages[2] = __('Category deleted.');
$messages[3] = __('Category updated.');
$messages[4] = __('Category not added.');
$messages[5] = __('Category not updated.');
?>
<?php if (isset($_GET['message'])) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<?php if ( current_user_can('manage_categories') ) : ?>
<h2><?php printf(__('Manage Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
<?php else : ?>
<h2><?php _e('Manage Categories') ?> </h2>
<?php endif; ?>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e('Search Categories'); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
<input type="submit" value="<?php _e( 'Search Categories' ); ?>" class="button" />
</p>
<br class="clear" />
<div class="tablenav">
<?php
$pagenum = absint( $_GET['pagenum'] );
if ( empty($pagenum) )
$pagenum = 1;
if( !$catsperpage || $catsperpage < 0 )
$catsperpage = 20;
$page_links = paginate_links( array(
'base' => add_query_arg( 'pagenum', '%#%' ),
'format' => '',
'total' => ceil(wp_count_terms('category') / $catsperpage),
'current' => $pagenum
));
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-categories'); ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<table class="widefat">
<thead>
<div class="wrap">
<?php if ( current_user_can('manage_categories') ) : ?>
<h2><?php printf(__('Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
<?php else : ?>
<h2><?php _e('Categories') ?> </h2>
<?php endif; ?>
<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
<tr>
<th scope="col" class="check-column"><input type="checkbox" /></th>
<th scope="col"><?php _e('ID') ?></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col"><?php _e('Description') ?></th>
<th scope="col" class="num"><?php _e('Posts') ?></th>
<th scope="col"><?php _e('# Posts') ?></th>
<th colspan="2"><?php _e('Action') ?></th>
</tr>
</thead>
<tbody id="the-list" class="list:cat">
<?php
cat_rows(0, 0, 0, $pagenum, $catsperpage);
cat_rows();
?>
</tbody>
</table>
</form>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
</div>
<br class="clear" />
<div id="ajax-response"></div>
</div>
<?php if ( current_user_can('manage_categories') ) : ?>
<div class="wrap">
<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p>
<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'admin.php?import=wp-cat2tag') ?></p>
<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete posts from that category, it will just set them back to the default category <strong>%s</strong>.'), get_catname(get_option('default_category'))) ?></p>
</div>
<?php include('edit-category-form.php'); ?>
<div class="wrap">
<h2><?php _e('Add New Category') ?></h2>
<form name="addcat" id="addcat" action="categories.php" method="post">
<p><?php _e('Name:') ?><br />
<input type="text" name="cat_name" value="" /></p>
<p><?php _e('Category parent:') ?><br />
<select name='category_parent' class='postform'>
<option value='0'><?php _e('None') ?></option>
<?php wp_dropdown_cats(0); ?>
</select></p>
<p><?php _e('Description: (optional)') ?> <br />
<textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
<p class="submit"><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add Category &raquo;') ?>" /></p>
</form>
</div>
<?php endif; ?>
<?php
@@ -207,5 +165,4 @@ break;
}
include('admin-footer.php');
?>

View File

@@ -1,228 +0,0 @@
<?php
require_once('admin.php');
$parent_file = 'edit-comments.php';
$submenu_file = 'edit-comments.php';
wp_reset_vars( array('action') );
if ( isset( $_POST['deletecomment'] ) )
$action = 'deletecomment';
function comment_footer_die( $msg ) { // $msg is assumed to contain HTML and be sanitized
echo "<div class='wrap'><p>$msg</p></div>";
include('admin-footer.php');
die;
}
switch( $action ) {
case 'editcomment' :
$title = __('Edit Comment');
wp_enqueue_script('comment');
require_once('admin-header.php');
$comment_id = absint( $_GET['c'] );
if ( !$comment = get_comment( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'javascript:history.go(-1)') );
if ( !current_user_can('edit_post', $comment->comment_post_ID) )
comment_footer_die( __('You are not allowed to edit comments on this post.') );
$comment = get_comment_to_edit( $comment_id );
include('edit-form-comment.php');
break;
case 'cdc' :
case 'mac' :
require_once('admin-header.php');
$comment_id = absint( $_GET['c'] );
$formaction = 'cdc' == $action ? 'deletecomment' : 'approvecomment';
$nonce_action = 'cdc' == $action ? 'delete-comment_' : 'approve-comment_';
$nonce_action .= $comment_id;
if ( !$comment = get_comment_to_edit( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php') );
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
comment_footer_die( 'cdc' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
?>
<div class='wrap'>
<div class="narrow">
<?php
if ( 'spam' == $_GET['dt'] ) {
$caution_msg = __('You are about to mark the following comment as spam:');
$button = __('Spam Comment');
} elseif ( 'cdc' == $action ) {
$caution_msg = __('You are about to delete the following comment:');
$button = __('Delete Comment');
} else {
$caution_msg = __('You are about to approve the following comment:');
$button = __('Approve Comment');
}
?>
<p><strong><?php _e('Caution:'); ?></strong> <?php echo $caution_msg; ?></p>
<p><?php _e('Are you sure you want to do that?'); ?></p>
<form action='comment.php' method='get'>
<table width="100%">
<tr>
<td><input type='button' class="button" value='<?php _e('No'); ?>' onclick="self.location='<?php echo admin_url('edit-comments.php'); ?>" /></td>
<td class="textright"><input type='submit' class="button" value='<?php echo $button; ?>' /></td>
</tr>
</table>
<?php wp_nonce_field( $nonce_action ); ?>
<input type='hidden' name='action' value='<?php echo $formaction; ?>' />
<?php if ( 'spam' == $_GET['dt'] ) { ?>
<input type='hidden' name='dt' value='spam' />
<?php } ?>
<input type='hidden' name='p' value='<?php echo $comment->comment_post_ID; ?>' />
<input type='hidden' name='c' value='<?php echo $comment->comment_ID; ?>' />
<input type='hidden' name='noredir' value='1' />
</form>
<table class="form-table" cellpadding="5">
<tr class="alt">
<th scope="row"><?php _e('Author'); ?></th>
<td><?php echo $comment->comment_author; ?></td>
</tr>
<?php if ( $comment->comment_author_email ) { ?>
<tr>
<th scope="row"><?php _e('E-mail'); ?></th>
<td><?php echo $comment->comment_author_email; ?></td>
</tr>
<?php } ?>
<?php if ( $comment->comment_author_url ) { ?>
<tr>
<th scope="row"><?php _e('URL'); ?></th>
<td><a href='<?php echo $comment->comment_author_url; ?>'><?php echo $comment->comment_author_url; ?></a></td>
</tr>
<?php } ?>
<tr>
<th scope="row" valign="top"><?php _e('Comment'); ?></th>
<td><?php echo $comment->comment_content; ?></td>
</tr>
</table>
</div>
</div>
<?php
break;
case 'deletecomment' :
$comment_id = absint( $_REQUEST['c'] );
check_admin_referer( 'delete-comment_' . $comment_id );
if ( isset( $_REQUEST['noredir'] ) )
$noredir = true;
else
$noredir = false;
if ( !$comment = get_comment( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') );
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
comment_footer_die( __('You are not allowed to edit comments on this post.') );
if ( 'spam' == $_REQUEST['dt'] )
wp_set_comment_status( $comment->comment_ID, 'spam' );
else
wp_delete_comment( $comment->comment_ID );
if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ) )
wp_redirect( wp_get_referer() );
else if ( '' != wp_get_original_referer() && false == $noredir )
wp_redirect( wp_get_original_referer() );
else
wp_redirect( admin_url('edit-comments.php') );
die;
break;
case 'unapprovecomment' :
$comment_id = absint( $_GET['c'] );
check_admin_referer( 'unapprove-comment_' . $comment_id );
if ( isset( $_GET['noredir'] ) )
$noredir = true;
else
$noredir = false;
if ( !$comment = get_comment( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php') );
if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') );
wp_set_comment_status( $comment->comment_ID, 'hold' );
if ( '' != wp_get_referer() && false == $noredir )
wp_redirect( wp_get_referer() );
else
wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') );
exit();
break;
case 'approvecomment' :
$comment_id = absint( $_GET['c'] );
check_admin_referer( 'approve-comment_' . $comment_id );
if ( isset( $_GET['noredir'] ) )
$noredir = true;
else
$noredir = false;
if ( !$comment = get_comment( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php') );
if ( !current_user_can('edit_post', $comment->comment_post_ID) )
comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') );
wp_set_comment_status( $comment->comment_ID, 'approve' );
if ( '' != wp_get_referer() && false == $noredir )
wp_redirect( wp_get_referer() );
else
wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') );
exit();
break;
case 'editedcomment' :
$comment_id = absint( $_POST['comment_ID'] );
$comment_post_id = absint( $_POST['comment_post_id'] );
check_admin_referer( 'update-comment_' . $comment_id );
edit_comment();
$location = ( empty( $_POST['referredby'] ) ? "edit.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );
wp_redirect( $location );
exit();
break;
default:
wp_die( __('Unknown action.') );
break;
} // end switch
include('admin-footer.php');
?>

View File

@@ -1,24 +0,0 @@
.post-com-count {
}
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
background-image: url(../images/comment-stalk-rtl.gif);
background-position:right bottom;
}
#footer {
background-position:99% 10px;
}
#poststuff .closed .togbox, #poststuff .togbox {
background-image: url(../images/toggle-arrow-rtl.gif) !important;
}
.bar {
border-right-color: transparent;
border-left-color: #99d;
}
.plugins .togl {
border-right-color: transparent;
border-left-color: #ccc;
}
#upload-menu li.current {
border-right-color: transparent;
border-left-color: #448abd;
}

View File

@@ -1,730 +0,0 @@
a.page-numbers:hover {
border-color: #999;
}
body, .form-table .pre {
background-color: #fff;
color: #333;
}
body > #upload-menu {
border-bottom-color: #fff;
}
div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat {
border-color: #ccc;
}
div.dashboard-widget-error {
background-color: #c43;
}
div.dashboard-widget-notice {
background-color: #F0F6FB;
}
div.dashboard-widget-submit, ul.widget-control-list div.widget-control-actions {
border-top-color: #ccc;
}
input.disabled, textarea.disabled {
background-color: #ccc;
}
#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:visited, .login #backtoblog a:hover {
color: #fff;
}
ul#category-tabs li.ui-tabs-selected, li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
background-color: #cfebf7;
}
div.ui-tabs-panel {
border-color: #cfebf7;
}
select {
background-color: #fff;
border-color: #ddd;
}
strong .post-com-count span {
background-color: #2583ad;
}
.button-secondary, #login form .submit input {
background-color: #8ebddc !important;
}
ul#widget-list li.widget-list-item h4.widget-title {
background-color: #f0f0f0;
color: #000;
}
.sorthelper {
background-color: #ccf3fa;
}
.ac_match, .subsubsub a.current, h2 {
color: #000;
}
.ac_over {
background-color: #f0f0b8;
}
.ac_results {
background-color: #fff;
border-color: #808080;
}
.ac_results li {
color: #101010;
}
.alternate {
background-color: #f9f9f9;
}
.available-theme a.screenshot {
background-color: #f1f1f1;
border-color: #ccc;
}
.bar {
background-color: #e8e8e8;
border-right-color: #99d;
}
.describe {
border-top-color: #d0d0d0;
}
.error, #login #login_error {
background-color: #ffebe8;
border-color: #c00;
}
.error a {
color: #c00;
}
.form-invalid {
background-color: #ffebe8 !important;
}
.form-invalid input {
border-color: #c00 !important;
}
.form-table input, .form-table textarea {
border-color: #c6d9e9;
}
.form-table td, .form-table th {
border-bottom-color: #fff;
}
.highlight {
background-color: #cfebf7;
color: #d54e21;
}
.howto, .nonessential, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
color: #999;
}
#dashmenu a, #user_info a {
color: #88b4d7;
}
.media-item {
border-bottom-color: #d0d0d0;
}
.media-upload-form label.form-help, td.help {
color: #9a9a9a;
}
.page-numbers {
background-color: #fff;
border-color: #fff;
}
.page-numbers.current {
background-color: #328ab2;
border-color: #328ab2;
color: #fff;
}
.post-com-count {
background-image: url(../images/bubble_bg.gif);
color: #fff;
}
.post-com-count span {
background-color: #bbb;
color: #fff;
}
.post-com-count:hover span {
background-color: #d54e21;
}
.quicktags, .search {
background-color: #ccc;
color: #000;
}
.side-info h5, .bordertitle {
border-bottom-color: #dadada;
}
.side-info ul, .widget-description {
color: #666;
}
.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save {
background-color: #e5e5e5;
color: #07273e;
border-color: #a3a3a3;
}
.button[disabled], .button:disabled {
background-color: #999;
}
.tablenav .button-secondary {
border-color: #5396c5;
}
.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover {
border-color: #535353;
}
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.del-link:hover {
color: #d54e21;
}
#adminmenu a:hover, #sidemenu a:hover, .ui-tabs-nav a:hover {
color: #97c4d8;
}
.button-secondary:hover, #login form .submit input:hover {
border-color: #328ab2;
background-color: #a6d2e5 !important;
}
.submitbox #autosave .error, ul.view-switch li.current a {
color: #333;
}
.submitbox #previewview {
background-color: #5488af;
}
.submitbox #previewview a, #rightnow .rbutton {
background-color: #ebebeb;
color: #264761;
}
.submitbox .submit {
background-color: #464646;
color: #ccc;
}
.submitbox .submitdelete {
border-bottom-color: #999;
}
.submitbox .submitdelete:hover,
#media-upload a.delete:hover {
color: #fff;
background-color: #f00;
border-bottom-color: #f00;
}
.tablenav .dots {
background-color: #cfebf7;
border-color: #cfebf7;
}
.tablenav .next, .tablenav .prev{
background-color: #cfebf7;
border-bottom-color: #cfebf7;
border-color: #cfebf7;
color: #2583ad;
}
.tablenav .next:hover, .tablenav .prev:hover {
border-bottom-color: #d54e21;
border-color: #cfebf7;
color: #d54e21;
}
.updated, .login #login_error, .login .message {
background-color: #ffffe0;
border-color: #e6db55;
}
.updated a {
border-bottom-color: #2583ad;
}
.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li {
border-bottom-color: #ccc;
}
.widefat thead, .thead {
background-color: #464646;
color: #d7d7d7;
}
.widget-control-save, .widget-control-remove {
background-color: #83b4d5;
color: #246;
}
.wrap h2 {
border-bottom-color: #dadada;
color: #5a5a5a;
}
#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, a {
color: #2e7ca0;
}
#adminmenu a, .ui-tabs-nav a {
color: #cfebf6;
}
#submenu a {
color: #2782af
}
/* Because we don't want visited on these links */
#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
background-color: #fff;
border-color: #07273e;
border-bottom-color: #fff;
color: #d54e21;
font-weight: bold;
}
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
background-image: url(../images/comment-stalk-classic.gif);
}
#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span {
background-color: #d54e21;
color: #fff;
}
#rightnow .reallynow {
background-color: #114973;
color: #fff;
}
#adminmenu li a:hover #awaiting-mod span, #sidemenu li a:hover #update-plugins span {
background-color: #07273E;
}
#adminmenu, div#media-upload-header {
background-color: #14568a;
border-bottom-color: #07273e;
}
#currenttheme img {
border-color: #666;
}
#current-widgets .drop-widget-here {
background-color: #ffc;
}
#dashboard_secondary div.dashboard-widget-content ul li a {
background-color: #f9f9f9;
}
input.readonly {
background-color: #ddd;
}
#dashmenu a.current {
background-color: #14568a;
color: #cfebf6;
}
#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
background-color: #2683ae;
color: #fff;
}
#ed_toolbar input {
background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px;
}
#editable-post-name {
background-color: #fffbcc;
}
#edit-slug-box strong, .login #nav a {
color: #777;
}
#edit-slug-buttons a.save {
background-color: #ebebeb;
}
#footer {
background: url(../images/logo-ghost.png) #464646 no-repeat 20px 10px;
color: #999;
}
#media-items {
border-color: #c0c0c0;
}
#pass-strength-result {
background-color: #e3e3e3;
border-color: #000;
}
#pass-strength-result.bad {
background-color: #ffeff7;
border-color: #c69;
}
#pass-strength-result.good {
background-color: #effff4;
border-color: #66cc87;
}
#pass-strength-result.short {
background-color: #e3e3e3;
}
#pass-strength-result.strong {
background-color: #59ef86;
border-color: #319f52;
}
.checkbox, .side-info, #your-profile #rich_editing {
background-color: #fff;
}
.plugins .active {
background-color: #BBEEBB;
}
.plugins .togl {
border-right-color: #ccc;
}
#the-comment-list .unapproved {
background-color: #ffffe0;
}
.plugins tr {
background-color: #fff;
}
#poststuff #editor-toolbar .active {
background-color: #83b4d5;
color: #333;
}
#poststuff .closed .togbox {
background-color: #2583ad;
background-image: url(../images/toggle-arrow.gif);
}
#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
border-color: #ebebeb;
border-right-color: #ccc;
border-bottom-color: #ccc;
}
#poststuff .togbox {
background-color: #b2b2b2;
background-image: url(../images/toggle-arrow.gif);
}
#quicktags #ed_link {
color: #00f;
}
#rightnow .youhave {
background-color: #f0f6fb;
}
#rightnow a {
color: #448abd;
}
#sidemenu a {
background-color: #14568a;
border-bottom-color: #07273e;
border-top-color: #14568a;
color: #cfebf6;
}
#tagchecklist span a {
background: url(../images/xit.gif) no-repeat;
}
#tagchecklist span a:hover {
background: url(../images/xit.gif) no-repeat -10px 0;
}
#the-comment-list .comment a {
border-bottom-color: #ababab;
color: #666;
}
#update-nag, .plugin-update {
background-color: #fffeeb;
border-bottom-color: #ccc;
border-top-color: #ccc;
color: #555;
}
#upload-files a.file-link {
background-color: #d1e2ef;
}
#upload-file-view a img {
border-bottom-color: #69c;
}
#upload-menu li #current-tab-nav, #upload-file {
background-color: #f9fcfe;
}
#upload-menu li span a.page-numbers {
color: #00019b;
}
#upload-menu li.current {
border-right-color: #448abd;
color: #000;
}
#upload-menu li.current a.upload-tab-link, #upload-menu li a:hover {
background-color: #f9fcfe;
color: #000;
}
#upload-menu, #upload-menu li {
border-top-color: #247fab;
}
#user_info, .login #backtoblog a {
color: #ccc;
}
#wphead {
background-color: #14568a;
}
#wphead, body.login {
border-top-color: #07273e;
}
#wphead #viewsite a {
background-color: #5488af;
color: #cfebf7;
border-color: #0b3d64;
}
#wphead #viewsite a:hover {
color: #07273e;
}
#wphead h1, #dashmenu a.current:hover {
color: #cfebf6;
}
div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
color: #f00;
}
/* TinyMCE */
.wp_themeSkin *,
.wp_themeSkin a:hover,
.wp_themeSkin a:link,
.wp_themeSkin a:visited,
.wp_themeSkin a:active {
color: #000;
}
/* Containers */
.wp_themeSkin table, #wp_editbtns {
background: #83B4D5;
}
.wp_themeSkin iframe {
background: #fff;
}
/* Layout */
.wp_themeSkin .mceStatusbar {
color:#000;
background-color: #eaf3fa;
}
/* Button */
.wp_themeSkin .mceButton {
background-color: #e9e8e8;
border-color: #83B4D5;
}
.wp_themeSkin a.mceButtonEnabled:hover,
.wp_themeSkin a.mceButtonActive,
.wp_themeSkin a.mceButtonSelected {
background-color: #d6d8da;
border-color: #7789ba !important;
}
.wp_themeSkin .mceButtonDisabled {
border-color: #83B4D5 !important;
}
/* ListBox */
.wp_themeSkin .mceListBox .mceText,
.wp_themeSkin .mceListBox .mceOpen {
border-color: #83B4D5;
background-color: #e9e8e8;
}
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
.wp_themeSkin .mceListBoxHover .mceOpen,
.wp_themeSkin .mceListBoxSelected .mceOpen,
.wp_themeSkin .mceListBoxSelected .mceText {
border-color: #7789ba !important;
background-color: #d6d8da;
}
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
.wp_themeSkin .mceListBoxHover .mceText {
border-color: #7789ba !important;
}
.wp_themeSkin select.mceListBox {
border-color: #b3c7e1;
background-color: #fff;
}
/* SplitButton */
.wp_themeSkin .mceSplitButton a.mceAction,
.wp_themeSkin .mceSplitButton a.mceOpen {
background-color: #e9e8e8;
border-color: #83B4D5;
}
.wp_themeSkin .mceSplitButton a.mceOpen:hover,
.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,
.wp_themeSkin .mceSplitButton a.mceAction:hover {
background-color: #d6d8da;
border-color: #7789ba !important;
}
.wp_themeSkin .mceSplitButtonActive {
background-color: #d6d8da;
}
/* ColorSplitButton */
.wp_themeSkin div.mceColorSplitMenu table {
background-color: #ebeaeb;
border-color: #808080;
}
.wp_themeSkin .mceColorSplitMenu a {
border-color: #808080;
}
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
border-color: #fff;
}
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {
border-color: #0A246A;
background-color: #B6BDD2;
}
.wp_themeSkin a.mceMoreColors:hover {
border-color: #0A246A;
}
/* Menu */
.wp_themeSkin .mceMenu {
border-color: #ddd;
}
.wp_themeSkin .mceMenu table {
background-color: #ebeaeb;
}
.wp_themeSkin .mceMenu .mceText {
color: #000;
}
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
.wp_themeSkin .mceMenu .mceMenuItemActive, #quicktags {
background-color: #83B4D5;
}
.wp_themeSkin td.mceMenuItemSeparator {
background-color: #aaa;
}
.wp_themeSkin .mceMenuItemTitle a {
background-color: #ccc;
border-bottom-color: #aaa;
}
.wp_themeSkin .mceMenuItemTitle span.mceText {
color: #000;
}
.wp_themeSkin .mceMenuItemDisabled .mceText {
color: #888;
}
/* pop-up */
.clearlooks2 .mceTop .mceLeft, .clearlooks2 .mceTop .mceRight {
background-color: #cee1ef;
border-color: #c6d9e9;
}
.clearlooks2 .mceFocus .mceTop .mceLeft, .clearlooks2 .mceFocus .mceTop .mceRight {
background-color: #5488AF;
border-color: #464646;
}
#editorcontainer {
border-color: #ccc;
}
#poststuff #titlewrap {
border-color: #ccc;
}
#tTips p#tTips_inside {
background-color: #ddd;
color: #333;
}
/* Diff */
table.diff .diff-deletedline {
background-color: #ffdddd;
}
table.diff .diff-deletedline del {
background-color: #ff9999;
}
table.diff .diff-addedline {
background-color: #ddffdd;
}
table.diff .diff-addedline ins {
background-color: #99ff99;
}

View File

@@ -1,24 +0,0 @@
.bar {
border-right-color: transparent;
border-left-color: #99d;
}
.post-com-count {
}
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
background-image: url(../images/comment-stalk-rtl.gif);
background-position:right bottom;
}
#footer {
background-position:99% 10px;
}
.plugins .togl {
border-right-color: transparent;
border-left-color: #ccc;
}
#poststuff .closed .togbox, #poststuff .togbox {
background-image: url(../images/toggle-arrow-rtl.gif);
}
#upload-menu li.current {
border-right-color:transparent;
border-left-color: #448abd;
}

View File

@@ -1,706 +0,0 @@
a.page-numbers:hover {
border-color: #999;
}
body, .form-table .pre {
background-color: #fff;
color: #333;
}
body > #upload-menu {
border-bottom-color: #fff;
}
div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat {
border-color: #ccc;
}
div.dashboard-widget-error {
background-color: #c43;
}
div.dashboard-widget-notice {
background-color: #cfe1ef;
}
div.dashboard-widget-submit, ul.widget-control-list div.widget-control-actions {
border-top-color: #ccc;
}
div.ui-tabs-panel {
border-color: #cee1ef;
}
input.disabled, textarea.disabled {
background-color: #ccc;
}
#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:visited, .login #backtoblog a:hover {
color: #fff;
}
li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
background-color: #eaf3fa;
}
select {
background-color: #fff;
border-color: #ddd;
}
strong .post-com-count span {
background-color: #2583ad;
}
ul#category-tabs li.ui-tabs-selected, .button-secondary, #quicktags, #login form .submit input {
background-color: #cee1ef !important;
}
ul#widget-list li.widget-list-item h4.widget-title {
background-color: #f0f0f0;
color: #000;
}
.sorthelper {
background-color: #ccf3fa;
}
.ac_match, .subsubsub a.current, h2 {
color: #000;
}
.ac_over {
background-color: #f0f0b8;
}
.ac_results {
background-color: #fff;
border-color: #808080;
}
.ac_results li {
color: #101010;
}
.alternate {
background-color: #f9f9f9;
}
.available-theme a.screenshot {
background-color: #f1f1f1;
border-color: #ccc;
}
.bar {
background-color: #e8e8e8;
border-right-color: #99d;
}
.describe {
border-top-color: #d0d0d0;
}
.error, #login #login_error {
background-color: #ffebe8;
border-color: #c00;
}
.error a {
color: #c00;
}
.form-invalid {
background-color: #ffebe8 !important;
}
.form-invalid input {
border-color: #c00 !important;
}
.form-table input, .form-table textarea {
border-color: #c6d9e9;
}
.form-table td, .form-table th {
border-bottom-color: #fff;
}
.highlight {
background-color: #e4f2fd;
color: #d54e21;
}
#user_info, .howto, .nonessential, #dashmenu a, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
color: #999;
}
.media-item {
border-bottom-color: #d0d0d0;
}
.media-upload-form label.form-help, td.help {
color: #9a9a9a;
}
.page-numbers {
background-color: #fff;
border-color: #fff;
}
.page-numbers.current {
background-color: #328ab2;
border-color: #328ab2;
color: #fff;
}
.post-com-count {
background-image: url(../images/bubble_bg.gif);
color: #fff;
}
.post-com-count span {
background-color: #bbb;
color: #fff;
}
.post-com-count:hover span {
background-color: #d54e21;
}
.quicktags, .search {
background-color: #ccc;
color: #000;
}
.side-info h5, .bordertitle {
border-bottom-color: #dadada;
}
.side-info ul, .widget-description {
color: #666;
}
.submit input, .button, .button-secondary, #login form .submit input, div.dashboard-widget-submit input, #edit-slug-buttons a.save {
background-color: #e5e5e5;
color: #246;
border-color: #80b5d0;
}
.button[disabled], .button:disabled {
background-color: #999;
}
.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover {
border-color: #535353;
}
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #adminmenu a:hover, #sidemenu a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.delete:hover, #media-upload a.del-link:hover, .ui-tabs-nav a:hover {
color: #d54e21;
}
.button-secondary:hover, #login form .submit input:hover {
border-color: #328ab2;
}
.submitbox #autosave .error, ul.view-switch li.current a {
color: #333;
}
.submitbox #previewview {
background-color: #2683ae;
}
.submitbox #previewview a, #rightnow .rbutton {
background-color: #ebebeb;
color: #264761;
}
.submitbox .submit {
background-color: #464646;
color: #ccc;
}
.submitbox .submitdelete {
border-bottom-color: #999;
}
.submitbox .submitdelete:hover,
#media-upload a.delete:hover {
color: #fff;
background-color: #f00;
border-bottom-color: #f00;
}
.tablenav .dots {
background-color: #e4f2fd;
border-color: #e4f2fd;
}
.tablenav .next, .tablenav .prev{
background-color: #e4f2fd;
border-bottom-color: #2583ad;
border-color: #e4f2fd;
color: #2583ad;
}
.tablenav .next:hover, .tablenav .prev:hover {
border-bottom-color: #d54e21;
border-color: #e4f2fd;
color: #d54e21;
}
.updated, .login #login_error, .login .message {
background-color: #ffffe0;
border-color: #e6db55;
}
.updated a {
border-bottom-color: #2583ad;
}
.widefat td, .widefat th, div#available-widgets-filter, ul#widget-list li.widget-list-item, .commentlist li {
border-bottom-color: #ccc;
}
.widefat thead, .thead {
background-color: #464646;
color: #d7d7d7;
}
.widget-control-save, .widget-control-remove {
background-color: #cee1ef;
color: #246;
}
.wrap h2 {
border-bottom-color: #dadada;
color: #666;
}
#adminmenu a, #submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a {
color: #2583ad;
}
/* Because we don't want visited on these links */
#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
background-color: #fff;
border-color: #c6d9e9;
border-bottom-color: #fff;
color: #d54e21;
}
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
background-image: url(../images/comment-stalk-fresh.gif);
}
#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span, #rightnow .reallynow {
background-color: #d54e21;
color: #fff;
}
#adminmenu li a:hover #awaiting-mod span, #sidemenu li a:hover #update-plugins span {
background-color: #264761;
}
#adminmenu, div#media-upload-header {
background-color: #e4f2fd;
border-bottom-color: #c6d9e9;
}
#currenttheme img {
border-color: #666;
}
#current-widgets .drop-widget-here {
background-color: #ffc;
}
#dashboard_secondary div.dashboard-widget-content ul li a {
background-color: #f9f9f9;
}
input.readonly {
background-color: #ddd;
}
#dashmenu a.current {
background-color: #e4f2fd;
color: #555;
}
#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
background-color: #2683ae;
color: #fff;
}
#ed_toolbar input {
background: url( ../images/fade-butt.png ) #fff repeat-x 0 -2px;
}
#editable-post-name {
background-color: #fffbcc;
}
#edit-slug-box strong, .login #nav a {
color: #777;
}
#footer {
background: url(../images/logo-ghost.png) #464646 no-repeat 20px 10px;
color: #999;
}
#media-items {
border-color: #c0c0c0;
}
#pass-strength-result {
background-color: #e3e3e3;
border-color: #000;
}
#pass-strength-result.bad {
background-color: #ffeff7;
border-color: #c69;
}
#pass-strength-result.good {
background-color: #effff4;
border-color: #66cc87;
}
#pass-strength-result.short {
background-color: #e3e3e3;
}
#pass-strength-result.strong {
background-color: #59ef86;
border-color: #319f52;
}
.checkbox, .side-info, #your-profile #rich_editing {
background-color: #fff;
}
.plugins .active {
background-color: #e7f7d3;
}
.plugins .togl {
border-right-color: #ccc;
}
#the-comment-list .unapproved {
background-color: #ffffe0;
}
.plugins tr {
background-color: #fff;
}
#poststuff #editor-toolbar .active {
background-color: #cee1ef;
color: #333;
}
#poststuff .closed .togbox {
background-color: #2583ad;
background-image: url(../images/toggle-arrow.gif);
}
#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
border-color: #ebebeb;
border-right-color: #ccc;
border-bottom-color: #ccc;
}
#poststuff .togbox {
background-color: #b2b2b2;
background-image: url(../images/toggle-arrow.gif);
}
#quicktags #ed_link {
color: #00f;
}
#rightnow .youhave {
background-color: #f0f6fb;
}
#rightnow a {
color: #448abd;
}
#sidemenu a {
background-color: #e4f2fd;
border-bottom-color: #c6d9e9;
border-top-color: #e4f2fd;
}
#tagchecklist span a {
background: url(../images/xit.gif) no-repeat;
}
#tagchecklist span a:hover {
background: url(../images/xit.gif) no-repeat -10px 0;
}
#the-comment-list .comment a {
border-bottom-color: #ababab;
color: #666;
}
#update-nag, .plugin-update {
background-color: #fffeeb;
border-bottom-color: #ccc;
border-top-color: #ccc;
color: #555;
}
#upload-files a.file-link {
background-color: #d1e2ef;
}
#upload-file-view a img {
border-bottom-color: #69c;
}
#upload-menu li #current-tab-nav, #upload-file {
background-color: #f9fcfe;
}
#upload-menu li span a.page-numbers {
color: #00019b;
}
#upload-menu li.current {
border-right-color: #448abd;
color: #000;
}
#upload-menu li.current a.upload-tab-link, #upload-menu li a:hover {
background-color: #f9fcfe;
color: #000;
}
#upload-menu, #upload-menu li {
border-top-color: #247fab;
}
.login #backtoblog a, .curtime, #user_info a {
color: #ccc;
}
#wphead {
background-color: #e4f2fd;
}
#wphead, body.login {
border-top-color: #464646;
}
#wphead #viewsite a {
background-color: #c6d9e9;
color: #246;
border-color: #80b5d0;
}
#wphead #viewsite a:hover {
border-color: #328ab2;
}
#wphead h1, #dashmenu a.current:hover, #login form input {
color: #555;
}
div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
color: #f00;
}
#media-upload a.delete {
color: #888;
}
/* TinyMCE */
.wp_themeSkin *,
.wp_themeSkin a:hover,
.wp_themeSkin a:link,
.wp_themeSkin a:visited,
.wp_themeSkin a:active {
color: #000;
}
/* Containers */
.wp_themeSkin table, #wp_editbtns {
background: #cee1ef;
}
.wp_themeSkin iframe {
background: #fff;
}
/* Layout */
.wp_themeSkin .mceStatusbar {
color:#000;
background-color: #eaf3fa;
}
/* Button */
.wp_themeSkin .mceButton {
background-color: #e9e8e8;
border-color: #abc0fb;
}
.wp_themeSkin a.mceButtonEnabled:hover,
.wp_themeSkin a.mceButtonActive,
.wp_themeSkin a.mceButtonSelected {
background-color: #d6d8da;
border-color: #7789ba !important;
}
.wp_themeSkin .mceButtonDisabled {
border-color: #bdd !important;
}
/* ListBox */
.wp_themeSkin .mceListBox .mceText,
.wp_themeSkin .mceListBox .mceOpen {
border-color: #abc0fb;
background-color: #e9e8e8;
}
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
.wp_themeSkin .mceListBoxHover .mceOpen,
.wp_themeSkin .mceListBoxSelected .mceOpen,
.wp_themeSkin .mceListBoxSelected .mceText {
border-color: #7789ba !important;
background-color: #d6d8da;
}
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
.wp_themeSkin .mceListBoxHover .mceText {
border-color: #7789ba !important;
}
.wp_themeSkin select.mceListBox {
border-color: #b3c7e1;
background-color: #fff;
}
/* SplitButton */
.wp_themeSkin .mceSplitButton a.mceAction,
.wp_themeSkin .mceSplitButton a.mceOpen {
background-color: #e9e8e8;
border-color: #abc0fb;
}
.wp_themeSkin .mceSplitButton a.mceOpen:hover,
.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,
.wp_themeSkin .mceSplitButton a.mceAction:hover {
background-color: #d6d8da;
border-color: #7789ba !important;
}
.wp_themeSkin .mceSplitButtonActive {
background-color: #d6d8da;
}
/* ColorSplitButton */
.wp_themeSkin div.mceColorSplitMenu table {
background-color: #ebeaeb;
border-color: #808080;
}
.wp_themeSkin .mceColorSplitMenu a {
border-color: #808080;
}
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
border-color: #fff;
}
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {
border-color: #0A246A;
background-color: #B6BDD2;
}
.wp_themeSkin a.mceMoreColors:hover {
border-color: #0A246A;
}
/* Menu */
.wp_themeSkin .mceMenu {
border-color: #ddd;
}
.wp_themeSkin .mceMenu table {
background-color: #ebeaeb;
}
.wp_themeSkin .mceMenu .mceText {
color: #000;
}
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
.wp_themeSkin .mceMenu .mceMenuItemActive {
background-color: #CEE1EF;
}
.wp_themeSkin td.mceMenuItemSeparator {
background-color: #aaa;
}
.wp_themeSkin .mceMenuItemTitle a {
background-color: #ccc;
border-bottom-color: #aaa;
}
.wp_themeSkin .mceMenuItemTitle span.mceText {
color: #000;
}
.wp_themeSkin .mceMenuItemDisabled .mceText {
color: #888;
}
/* pop-up */
.clearlooks2 .mceTop .mceLeft, .clearlooks2 .mceTop .mceRight {
background-color: #cee1ef;
border-color: #c6d9e9;
}
.clearlooks2 .mceFocus .mceTop .mceLeft, .clearlooks2 .mceFocus .mceTop .mceRight {
background-color: #2683ae;
border-color: #464646;
}
#editorcontainer {
border-color: #ccc;
}
#poststuff #titlewrap {
border-color: #ccc;
}
.curtime {
color: #666;
}
#tTips p#tTips_inside {
background-color: #ddd;
color: #333;
}
/* Diff */
table.diff .diff-deletedline {
background-color: #ffdddd;
}
table.diff .diff-deletedline del {
background-color: #ff9999;
}
table.diff .diff-addedline {
background-color: #ddffdd;
}
table.diff .diff-addedline ins {
background-color: #99ff99;
}

View File

@@ -1,62 +0,0 @@
/* Right Now */
#rightnow {
margin-right:0;
margin-left: 7px;
}
#rightnow .reallynow span {
text-align: right;
float: right;
}
#rightnow .reallynow a {
text-align: left;
float: left;
margin: 1px 0 0 6px;
}
/* Widgets */
div#dashboard-widgets-wrap {
margin-right:0;
margin-left:-13px;
}
div.dashboard-widget-holder {
float:right;
}
div.dashboard-widget {
margin-right:0;
margin-left: 20px;
}
h3.dashboard-widget-title span {
text-align: right;
float: right;
}
h3.dashboard-widget-title small {
text-align: left;
float:left;
}
div.dashboard-widget-submit input {
font-family: Tahoma;
}
div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl {
padding-left:0;
padding-right:15px;
}
#dashboard_secondary div.dashboard-widget-content ul li {
float:right;
}
#dashboard_secondary div.dashboard-widget-content ul li .post {
font-family:arial;
}
#dashboard_secondary div.dashboard-widget-content ul li a {
border-right:0 none;
border-left: 1px solid #dadada;
height:110px;
}
#dashboard_secondary div.dashboard-widget-content ul li a cite {
font-family: Tahoma;
}
#dashboard-widgets .widget_rss ul li span.rss-date {
float:right;
}
#dashboard-widgets .widget_rss ul li a {
float: right;
margin: 0 0 .2em .5em;
}

View File

@@ -1,282 +0,0 @@
/* Right Now */
#rightnow {
border-width: 1px;
border-style: solid;
padding: 2px;
margin-top: 10px;
margin-right: 7px;
}
#rightnow .reallynow {
padding: 6px;
font-size: 15px;
line-height: 2;
margin: 0;
}
#rightnow .rbutton {
font-weight: normal;
padding: 6px;
border-bottom: none;
-moz-border-radius: 2px;
-khtml-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
text-decoration: none;
}
#rightnow .reallynow span {
display: block;
text-align: left;
float: left;
padding: 0 6px;
}
#rightnow .reallynow a {
display: block;
text-align: right;
float: right;
padding: 0 6px;
font-size: 14px;
margin: 1px 6px 0 0;
}
#rightnow .youhave {
font-size: 14px;
padding: 10px;
}
#rightnow h3, #rightnow p {
padding: 0 10px;
}
#rightnow a {
font-weight: bold;
}
/* Widgets */
div#dashboard-widgets-wrap {
margin-top: -20px;
margin-right: -13px; /* 20 (div.dashboard-widget margin-right) - 7 (#rightnow margin-right) */
}
div#dashboard-widgets {
width: 100%;
}
div.dashboard-widget-holder {
margin-top: 20px;
width: 50%;
float: left;
}
div.dashboard-widget-holder.third {
width: 33.3%;
}
div.dashboard-widget-holder.fourth {
width: 25%;
}
div.dashboard-widget-holder.full {
width: 100%;
}
div.dashboard-widget-holder.double div.dashboard-widget {
height: 54em;
padding-bottom: 28px /* lame */
}
div.dashboard-widget {
position: relative;
margin-right: 20px;
border-width: 1px;
border-style: solid;
padding: 2px;
height: 27em;
overflow: auto;
font-size: 11px;
}
h3.dashboard-widget-title {
margin: 0;
padding: 0 7px;
font-size: 14px;
line-height: 2;
}
h3.dashboard-widget-title span {
display: block;
text-align: left;
float: left;
}
h3.dashboard-widget-title small {
display: block;
text-align: right;
float: right;
font-size: 75%;
line-height: 2.67; /* math: it works, bitches */
}
h3.dashboard-widget-title img.rss-icon {
vertical-align: middle;
margin: .5em 0;
}
div.dashboard-widget-notice {
padding: 0 14px;
font-size: 1.2em;
line-height: 2;
}
div.dashboard-widget-error {
padding: 0 20px;
font-size: 1.2em;
line-height: 2;
}
div.dashboard-widget-content {
padding: 10px 15px;
}
div.dashboard-widget-submit {
border-top: 1px solid #ccc;
padding: 1em 0 0 0;
margin: 10px 0 0 0;
}
div.dashboard-widget-submit input {
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
padding: 4px 6px;
border: none;
font-size: 13px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
text-decoration: none;
}
div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl {
margin: 0;
text-indent: 0;
padding-left: 15px;
}
div.dashboard-widget-content li {
margin: .5em 0 1em;
}
div.dashboard-widget-content blockquote {
margin: -1em 0;
}
div#dashboard_recent_comments p {
font-size: 14px;
}
div.dashboard-widget-content p.comment-meta {
font-size: 11px !important;
}
#dashboard_secondary div.dashboard-widget {
height: auto;
}
#dashboard_secondary div.dashboard-widget-content ul {
list-style: none;
padding: 0;
}
#dashboard_secondary div.dashboard-widget-content ul li {
display: block;
width: 19.95%;
padding-bottom: 10px;
margin: 0;
float: left;
font-size: 95%;
}
#dashboard_secondary div.dashboard-widget-content {
margin: 10px 5px;
padding: 0;
}
#dashboard_secondary div.dashboard-widget-content ul li .post {
display:block;
font-family:Georgia,"Times New Roman",Times,serif;
font-size:18px;
line-height: 1.2em;
height:90px;
overflow:hidden;
}
#dashboard_secondary div.dashboard-widget-content ul li a {
display: block;
height:100%;
overflow:hidden;
margin: 5px 10px;
text-decoration: none;
padding: .5em;
border-right: 1px solid #dadada;
border-bottom: 1px solid #dadada;
}
#dashboard_secondary div.dashboard-widget-content ul li a cite {
display: block;
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
}
#dashboard-widgets .widget_rss ul {
list-style: none;
padding: 0;
}
#dashboard-widgets .widget_rss ul li {
clear: both;
}
#dashboard-widgets .widget_rss ul li span.rss-date {
float: left;
margin: 0;
}
#dashboard-widgets .widget_rss ul li a {
float: left;
margin: 0 .5em .2em 0;
font-weight: bold;
}
#dashboard-widgets .widget_rss ul li div {
clear: both;
line-height: 1.5em;
}
#dashboard_primary a.rsswidget, #dashboard_plugins h5 {
font-size: 14px;
}
#dashboard_primary span.rss-date {
font-size: 14px;
}
#dashboard_plugins h4 {
font-size: 1em;
margin: 0 0 .1em;
}
#dashboard_plugins h5 {
margin: 0;
display: inline;
line-height: 1.4em;
}
#dashboard_plugins p {
margin: 0 0 1em;
line-height: 1.5em;
}
.widget-loading {
}

View File

@@ -1,31 +0,0 @@
body, td {
font-family: Tahoma;
}
textarea, input, select {
font-family: Tahoma;
}
h1, h2, h3 {
font-family:arial;
}
.widefat td {
padding: 7px 10px 9px 15px;
}
.widefat th {
padding: 9px 10px 6px 15px;
text-align: right;
}
.widefat th input {
margin: 0 8px 0 0;
}
.widefat .check-column {
text-align: left;
}
.wrap h2 {
font-family:arial;
margin: 5px -4px 0 0;
padding-right:0;
padding-left: 280px;
}
.wrap h2.long-header {
padding-left: 0;
}

View File

@@ -1,200 +0,0 @@
/* styles for use by people extending the WordPress interface */
body {
margin: 0;
padding: 0;
}
body, td {
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
}
form, label input { margin: 0; padding: 0; }
img { border: 0; }
label { cursor: pointer; }
li, dd { margin-bottom: 6px; }
p, li, dl, dd, dt { line-height: 140%; }
textarea, input, select {
font: 13px Verdana, Arial, Helvetica, sans-serif;
margin: 1px;
padding: 3px;
}
.alignleft { float: left; }
.alignright { float: right; }
.textleft { text-align: left; }
.textright { text-align: right; }
.clear { clear: both; height: 2px; }
.hidden { display: none; }
h1 {
display: block;
font-size: 2em;
font-weight: bold;
margin: .67em 0;
}
h2 {
display: block;
font-size: 1.5em;
font-weight: bold;
margin: .83em 0;
}
h3 {
display: block;
font-size: 1.17em;
font-weight: bold;
margin: 1em 0;
}
h4 {
display: block;
font-weight: bold;
margin: 1.33em 0;
}
h5 {
display: block;
font-size: 0.83em;
font-weight: bold;
margin: 1.67em 0;
}
h6 {
display: block;
font-size: 0.67em;
font-weight: bold;
margin: 2.33em 0;
}
.subsubsub {
list-style: none;
margin: 14px 0 8px 0;
padding: 0;
white-space: nowrap;
font-size: 12px;
}
.subsubsub a { line-height: 200%; padding: 3px; text-decoration: none; }
.subsubsub a.current { font-weight: bold; background: none; border: none;}
.subsubsub li { display: inline; margin: 0; padding: 0; }
.widefat {
border-width: 1px;
border-style: solid;
border-collapse: collapse;
width: 100%;
clear: both;
margin: 0;
}
.widefat a {
text-decoration: none;
}
.widefat abbr {
white-space: nowrap;
}
.widefat td, .widefat th {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #ccc;
font-size: 11px;
vertical-align: text-top;
}
.widefat td {
padding: 7px 15px 9px 10px;
vertical-align: top;
}
.widefat th {
padding: 9px 15px 6px 10px;
text-align: left;
line-height: 1.3em;
}
.widefat th input {
margin: 0 0 0 8px;
padding: 0;
}
.widefat .check-column {
text-align: right;
width: 1.5em;
padding: 0;
}
.widefat tbody th.check-column {
padding: 8px 0 22px;
}
/*
th.check-column + th, th.check-column + td {
padding-left: 5px;
}
*/
.widefat .num {
text-align: center;
}
.wrap, .updated, .error {
margin: 0;
margin-left: 15px;
margin-right: 15px;
padding: 0;
max-width: 980px;
}
.updated, .error {
border-width: 1px;
border-style: solid;
padding: 0 0.6em;
max-width: 950px;
margin-bottom: 1em;
}
.updated p, .error p {
margin: 0.6em 0;
}
.wrap .updated, .wrap .error {
margin: auto 0 0;
}
.updated a, .error a {
text-decoration: underline;
}
.updated a {
text-decoration: none;
padding-bottom: 2px;
}
.wrap h2 {
border-bottom-width: 1px;
border-bottom-style: solid;
clear: both;
font: 24px Georgia, "Times New Roman", Times, serif;
margin: 5px 0 0 -4px;
padding: 0;
padding-bottom: 7px;
padding-right: 280px;
}
.wrap h2.long-header {
padding-right: 0;
}

View File

@@ -1,73 +0,0 @@
#poststuff .postbox h3 {
padding-left:0;
padding-right: 23px;
}
* html #poststuff .postarea, * html #poststuff #titlediv {
margin-left:0;
margin-right: 3%;
}
* html #poststuff h2 {
margin-right: 0;
}
#bh {
padding-right:0;
padding-left: 15px;
}
div#dashboard-widgets {
padding-right:0;
padding-left: 1px;
}
#tagchecklist span a {
margin: 4px -9px 0 0;
}
#poststuff .togbox {
margin-left:0;
margin-right: -19px;
}
.widefat th input {
margin: 0 5px 0 0;
}
/* ---------- add by navid */
#dashmenu { /* fix top right bottom in admin */
direction:ltr;
}
#sidemenu a { /* fix left admin buttom ex. plugins, options */
float:left;
}
.wrap h2 {
margin:5px 4px 0 0;
}
#editor-toolbar {/* fix hover in media uploader icon */
direction:ltr;
}
#TB_window { /* fix theme preview */
left:2%;
}
/* fix widget page */
form#widgets-filter {
position:static;
}
#widget-search {
display:none;
}
/* fix manage comment page */
ul.view-switch li {
float:left;
}
form#posts-filter {
position:static;
}
#post-search {
display:none;
}
#submenu {
margin-right: 20px;
}
/* Fixes for media-upload window */
/* Center media-upload panel on screen */
#TB_window {
width: 670px;
position: absolute;
top: 50%;
left: 50%;
margin-right: 335px !important; }

View File

@@ -1,144 +0,0 @@
/* Fixes for IE bugs */
#poststuff .postbox h3 {
padding-left: 23px;
}
#submenu li a.current {
background:none;
border:none;
}
* html body.minwidth {
_width: expression(document.documentElement.clientWidth < 810 ? "808px" : "99.9%");
}
* html #wpbody {
_width: expression(document.documentElement.clientWidth > 982 ? "980px" : "99.9%");
}
* html #poststuff .postarea, * html #poststuff #titlediv {
width: 95%;
margin-left: 3%;
}
.submitbox {
margin-top: 10px;
}
* html div.widget-liquid-left-holder, * html div.widget-liquid-right {
display: block;
position: relative;
}
#wpwrap, #wpcontent, #post, #wrap, #postdivrich, #postdiv, #poststuff, #titlediv, #post-body, #editorcontainer, .tablenav, .widget-control-list, li.widget-list-control-item, #dragHelper, li.widget-list-control-item h4, .widget-sortable, .widget-control-actions {
display: block;
zoom: 100%;
}
* html #editorcontainer {
padding: 0;
}
* html #editorcontainer #content {
position: relative;
overflow: auto;
padding: 6px;
margin: auto;
width: 98%;
}
form#template div {
width: 100%;
}
#ed_toolbar input {
overflow: visible;
padding: 0 4px;
}
#poststuff h2 {
font-size: 1.6em;
}
* html #poststuff h2 {
margin-left: 0;
}
#bh {
padding-right: 15px;
}
/* without this dashboard widgets appear in one column for some screen widths */
div#dashboard-widgets {
padding-right: 1px;
}
#tagchecklist {
display: block;
zoom: 100%;
}
#tagchecklist span, #tagchecklist span a {
display: inline-block;
display: block;
}
#tagchecklist span a {
margin: 4px 0 0 -9px;
}
#poststuff .togbox {
margin-left: -19px;
}
.tablenav .button-secondary, .nav .button-secondary {
padding: 0 1px;
vertical-align: middle;
}
.tablenav select {
font-size: 13px;
display: inline-block;
vertical-align: top;
margin-top: 2px;
}
.tablenav-pages .page-numbers {
display: inline-block;
}
.tablenav-pages {
display: block;
margin-top: -3px;
}
table.ie-fixed {
table-layout: fixed;
}
#post-search .button, #widget-search .button {
padding: 1px;
}
.widefat tr, .widefat th {
margin-bottom: 0;
border-spacing: 0;
}
.widefat th input {
margin: 0 0 0 5px;
}
.widefat .check-column {
padding: 6px 0 2px;
}
.widefat tbody th.check-column {
padding: 4px 0 22px;
}
.tablenav a.button-secondary {
display: inline-block;
padding: 2px 5px;
}

View File

@@ -1,27 +0,0 @@
body {
font-family: Tahoma;
}
/* Half the page disapears on IE6 */
* html body {
width: 700px;
position: absolute;
left: 50%;
margin-right: 350px;
}
ul, ol {
padding: 5px 22px 5px 5px;
}
.step, th {
text-align:right;
}
.submit input, .button, .button-secondary {
font-family: Tahoma;
margin-right:0;
}
.form-table th {
text-align:right;
}
h1 {
font-family:arial;
margin: 5px -4px 0 0;
}

View File

@@ -1,142 +0,0 @@
html { background: #f1f1f1; }
body {
background: #fff;
color: #333;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
margin: 2em auto 0 auto;
width: 700px;
padding: 1em 2em;
-moz-border-radius: 12px;
-khtml-border-radius: 12px;
-webkit-border-radius: 12px;
border-radius: 12px;
}
a { color: #2583ad; text-decoration: none; }
a:hover { color: #d54e21; }
h1 {
font-size: 18px;
margin-bottom: 0;
}
h2 { font-size: 16px; }
p, li {
padding-bottom: 2px;
font-size: 13px;
line-height: 18px;
}
code {
font-size: 13px;
}
ul, ol { padding: 5px 5px 5px 22px; }
#logo { margin: 6px 0 14px 0px; border-bottom: none;}
.step {
margin: 20px 0 15px;
}
.step input {
font-size: 18px;
}
a.button {
font-size: 18px;
}
.step, th { text-align: left; padding: 0; }
.submit input, .button, .button-secondary {
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
padding: 5px 7px 7px;
border: 1px solid #a3a3a3;
margin-left: 0;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #246;
background: #e5e5e5;
}
.button-secondary {
background: #cee1ef;
}
.submit input:hover, .button:hover, .button-secondary:hover {
color: #d54e21;
border-color: #535353;
}
.form-table {
border-collapse: collapse;
margin-top: 1em;
width: 100%;
}
.form-table td {
margin-bottom: 9px;
padding: 10px;
border-bottom: 8px solid #fff;
font-size: 12px;
}
.form-table th {
font-size: 13px;
text-align: left;
padding: 16px 10px 10px 10px;
border-bottom: 8px solid #fff;
width: 110px;
vertical-align: top;
}
.form-table tr {
background: #eaf3fa;
}
.form-table code {
line-height: 18px;
font-size: 18px;
}
.form-table p {
margin: 4px 0 0 0;
font-size: 11px;
}
.form-table input {
line-height: 20px;
font-size: 15px;
padding: 2px;
}
h1 {
border-bottom: 1px solid #dadada;
clear: both;
color: #666666;
font: 24px Georgia, "Times New Roman", Times, serif;
margin: 5px 0 0 -4px;
padding: 0;
padding-bottom: 7px;
}
#error-page {
margin-top: 50px;
}
#error-page p {
font-size: 14px;
line-height: 16px;
margin: 25px 0 20px;
}
#error-page code {
font-size: 15px;
}

View File

@@ -1,37 +0,0 @@
body {
font-family: Tahoma;
}
form {
margin-left:0;
margin-right: 8px;
}
form .forgetmenot {
float:right;
}
#login form .submit input {
font-family: Tahoma;
}
form .submit {
float:left;
}
#backtoblog a {
left:auto;
right:15px;
}
#login_error, .message {
margin: 0 8px 16px 0;
}
#nav {
margin:0 8px 0 0;
}
#user_pass, #user_login, #user_email {
margin-right:0;
margin-left: 6px;
}
h1 a {
text-decoration:none;
}
/* ltr input */
#user_login, #user_pass {
direction:ltr;
}

View File

@@ -1,74 +0,0 @@
* { margin: 0; padding: 0; }
body {
border-top-width: 30px;
border-top-style: solid;
font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
}
form {
margin-left: 8px;
padding: 16px 16px 40px 16px;
font-weight: bold;
-moz-border-radius: 5px;
-khtml-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0;}
#login form .submit input {
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
padding: 3px 5px;
border: none;
font-size: 13px;
border-width: 1px;
border-style: solid;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: default;
text-decoration: none;
margin-top: -6px;
}
form .submit { float: right; }
form p { margin-bottom: 24px; }
h1 a {
background: url(../images/logo-login.gif) no-repeat;
width: 292px;
height: 66px;
text-indent: -9999px;
overflow: hidden;
padding-bottom: 15px;
display: block;
}
#backtoblog a {
position: absolute;
top: 7px;
left: 15px;
text-decoration: none;
}
#login { width: 292px; margin: 7em auto; }
#login_error, .message {
margin: 0 0 16px 8px;
border-width: 1px;
border-style: solid;
padding: 12px;
}
#nav { margin: 0 0 0 8px; padding: 16px; }
#user_pass, #user_login, #user_email {
font-size: 20px;
width: 97%;
padding: 3px;
margin-right: 6px;
}

View File

@@ -1,66 +0,0 @@
body#media-upload ul#sidemenu {
left:auto;
right:0;
width: 620px;
}
#search-filter {
text-align:left;
}
.align .field label {
padding: 0 28px 0 0;
margin: 0 0 0 1em;
}
.image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label {
background-position:center right;
}
tr.image-size label {
margin: 0 0 0 1em;
}
.filename.original {
float: right;
}
.crunching {
text-align: left;
margin-right:0;
margin-left: 5px;
}
button.dismiss {
right:auto;
left:5px;
}
.file-error {
margin: 0 50px 5px 0;
}
.progress {
left:auto;
right:0;
}
.bar {
border-right-width:0;
border-left-width: 3px;
border-left-style: solid;
}
.media-item .pinkynail {
float:right;
}
.describe-toggle-on, .describe-toggle-off {
float: left;
margin-right:0;
margin-left: 20px;
}
/* Specific to Uploader */
#media-upload .media-upload-form p {
margin: 0 0 1em 1em;
}
.filename {
float: right;
margin-left:0;
margin-right: 10px;
}
#media-upload .describe th.label {
text-align:right;
}
.menu_order {
float:left;
}

View File

@@ -1,315 +0,0 @@
div#media-upload-header {
margin: 0;
padding: 0 5px;
font-weight: bold;
position: relative;
border-bottom-width: 1px;
border-bottom-style: solid;
height: 2.5em;
}
body#media-upload ul#sidemenu {
font-weight: normal;
margin: 0 5px;
position: absolute;
left: 0px;
bottom: -1px;
}
div#media-upload-error {
margin: 1em;
font-weight: bold;
}
form {
margin: 1em;
}
#search-filter {
text-align: right;
}
.media-upload-form label, .media-upload-form legend {
display:block;
font-weight: bold;
font-size: 13px;
margin-bottom: 0.5em;
margin: 0 0 0.5em 0;
}
th { position: relative; }
.media-upload-form label.form-help, td.help {
font-style: italic;
font-weight: normal;
}
.media-upload-form p.help {
margin: 0;
padding: 0;
}
.media-upload-form fieldset {
width: 100%;
border: none;
text-align: justify;
margin: 0 0 1em 0;
padding: 0;
}
/* specific to the image upload form */
.align .field label {
display: inline;
padding: 0 0 0 28px;
margin: 0 1em 0 0;
}
.image-align-none-label {
background: url(../images/align-none.png) no-repeat center left;
}
.image-align-left-label {
background: url(../images/align-left.png) no-repeat center left;
}
.image-align-center-label {
background: url(../images/align-center.png) no-repeat center left;
}
.image-align-right-label {
background: url(../images/align-right.png) no-repeat center left;
}
#flash-upload-ui, .insert-gallery {
display: none;
}
tr.image-size label {
display: inline;
margin: 0 1em 0 0;
}
.pinkynail {
max-width: 40px;
max-height: 40px;
}
.filename.original {
float: left;
}
.crunching {
display: block;
line-height: 32px;
text-align: right;
margin-right: 5px;
}
button.dismiss {
position: absolute;
top: 5px;
right: 5px;
z-index: 4;
}
.file-error {
margin: 0 0 5px 50px;
font-weight: bold;
}
.progress {
position: absolute;
top: 0px;
left: 0px;
width: 623px;
height: 36px;
}
.bar {
width: 0px;
height: 100%;
border-right-width: 3px;
border-right-style: solid;
}
#library-form .progress, #gallery-form .progress {
display: none;
}
.media-item .thumbnail {
max-width: 128px;
max-height: 128px;
}
.media-item .pinkynail {
float: left;
margin: 2px;
height: 32px;
max-width: 40px;
}
thead.media-item-info tr {
background-color: transparent;
}
thead.media-item-info th, thead.media-item-info td {
border: none;
margin: 0;
}
.form-table thead.media-item-info {
border: 8px solid #fff;
}
.describe.startopen, .describe.startclosed {
display: none;
}
abbr.required {
text-decoration: none;
border: none;
}
.describe label {
display: inline;
}
.describe td {
vertical-align: middle;
}
.describe td.A1 {
width: 132px;
}
.describe input[type="text"], .describe textarea {
width: 460px;
}
.describe-toggle-on, .describe-toggle-off {
display: block;
line-height: 36px;
float: right;
margin-right: 20px;
}
.describe-toggle-off {
display: none;
}
.clickmask {
}
.hidden {
height: 0px;
width: 0px;
overflow: hidden;
border: none;
}
/* Specific to Uploader */
#media-upload .media-upload-form p {
margin: 0 1em 1em 0;
}
#media-upload .media-upload-form p.ml-submit {
padding: 1em 0;
}
#media-upload p.help {
font-style: italic;
font-weight: normal;
}
#media-upload tr.image-size td.field {
text-align: center;
}
#media-upload #media-items {
border-width: 1px;
border-style: solid;
border-bottom: none;
width: 623px;
}
#media-upload .media-item {
position: relative;
border-bottom-width: 1px;
border-bottom-style: solid;
min-height: 36px;
width: 100%;
}
#media-upload .ui-sortable .media-item {
cursor: move;
}
.filename {
float: left;
line-height: 36px;
margin-left: 10px;
overflow: hidden;
max-width: 430px;
}
#media-upload .describe {
border-top-width: 1px;
border-top-style: solid;
padding: 5px;
width: 100%;
clear: both;
cursor: default;
}
#media-upload .describe th.label {
padding-top: .5em;
text-align: left;
}
#media-upload tr.align td.field {
text-align: center;
}
#media-upload tr.image-size {
margin-bottom: 1em;
height: 3em;
}
#media-upload #filter {
width: 623px;
}
#media-upload #filter .subsubsub {
margin: 8px 0;
}
#filter .tablenav select {
border-style:solid;
border-width:1px;
padding:2px;
vertical-align:top;
}
#media-upload a.delete,
#media-upload a.del-link {
padding: 0 3px 1px;
}
#media-upload .del-attachment {
display: none;
margin: 5px 0;
}
.menu_order {
float: right;
font-size: 11px;
margin: 10px 10px 0;
}
.menu_order_input {
border: 1px solid #DDDDDD;
font-size: 10px;
padding: 1px;
width: 23px;
}
.ui-sortable-helper {
background-color: #fff;
border: 1px solid #aaa;
opacity: 0.6;
filter: alpha(opacity=60);
}
#media-upload th.order-head {
width: 25%;
text-align: center;
}
#media-upload .widefat {
width: 626px;
border-style: solid solid none;
}
.sorthelper {
z-index: -1;
}

View File

@@ -1,3 +0,0 @@
.ui-tabs-nav {
margin-right: 0;
}

View File

@@ -1,7 +0,0 @@
#posting {
position: static !important;
}
.ui-tabs-nav {
margin-left: 0;
border: 0 !important;
}

View File

@@ -1,98 +0,0 @@
body {
font-family: Tahoma;
}
.ui-tabs-nav {
padding-left:0;
padding-right:8px;
}
.ui-tabs-nav li {
float: right;
}
.button {
font-family: Tahoma;
margin-left:0;
margin-right: 5px;
}
#wphead #viewsite {
margin-left:0;
margin-right: 10px;
}
#viewsite {
right:auto;
left: 8px;
}
#wphead #viewsite a {
font-family: Tahoma;
}
h1 {
right:auto;
left:0;
}
div#posting {
padding-left:0;
padding-right: 16px;
}
#photo_directions span {
right:auto;
left:3px;
}
#img_container a {
float:right;
}
#img_container a, #img_container a:link, #img_container a:visited {
margin:0 0 4px 4px;
}
div#categories {
right:auto;
left:16px;
}
div#categories h2 {
margin: .5em 1em .5em 0;
}
#tagsdiv #newtag {
margin-right:0;
margin-left: 5px;
}
#jaxtag {
padding-left:0;
padding-right: 1em;
}
#tagchecklist {
padding-left:0;
padding-right: 1em;
}
#tagchecklist span {
margin-right: 10px;
margin-left: .5em;
float: right;
}
#tagchecklist span a {
margin: 6px -9px 0pt 0;
float: right;
}
.submitbox {
float: left;
}
.submitbox .submit input {
text-align:right;
}
.video_split #extra_fields {
float:right;
}
.video_split .editor_area {
float: left;
}
.ac_results li {
text-align:right;
}
#TB_ajaxContent #options {
right:auto;
left:25px;
}
#post_status {
margin-left:0;
margin-right: 10px;
}
#footer {
padding: 10px 60px 0 0;
}

View File

@@ -1,521 +0,0 @@
body {
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
color: #333;
margin: 0px;
padding: 0px;
}
img { border: 0; }
/* Tabs */
@media projection , screen {
.ui-tabs-hide {
display: none;
}
}
@media print {
.ui-tabs-nav {
display: none;
}
}
.ui-tabs-nav {
list-style: none;
border-bottom: 1px solid #C6D9E9;
padding-left: 8px;
margin-bottom: .5em;
margin-top: -2em;
}
/* Additional IE specific bug fixes... */
* html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */
display: inline-block;
}
* :first-child+html .ui-tabs-nav {
/* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
display: inline-block;
}
.ui-tabs-nav:after {
/* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
}
.ui-tabs-nav li {
float: left;
margin: 0;
height: 2em;
line-height: 2em;
}
.ui-tabs-nav a,.ui-tabs-nav a span {
display: block;
}
.ui-tabs-nav a {
margin: 1px 0 0;
/* position: relative makes opacity fail for disabled tab in IE */
padding-left: 0;
color: #27537a;
font-weight: bold;
line-height: 2em;
text-align: center;
text-decoration: none;
white-space: nowrap; /* required in IE 6 */
outline: 0; /* prevent dotted border in Firefox */
padding: 0 1em;
}
.ui-tabs-nav .ui-tabs-selected a {
position: relative;
top: 1px;
z-index: 2;
margin-top: 0;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-style: solid;
border-width: 1px;
background: white;
border-bottom-width: 2px;
margin-top: -2px;
}
.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 {
cursor: pointer;
}
/* Header */
#wphead {
border-top: none;
height: 2em;
padding-top: 8px;
}
.button {
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
padding: 3px 5px;
font-size: 12px;
line-height: 1.5em;
border-width: 1px;
border-style: solid;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
margin-left: 5px;
text-decoration: none;
}
.howto {
font-size: 11px;
font-style: italic;
display: block;
}
#wphead #viewsite {
position: absolute;
margin-top: 12px;
margin-left: 10px;
}
#viewsite {
position: relative;
right: 8px;
top: 6px;
margin: 0 !important;
}
#wphead #viewsite a {
font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
padding: 3px 4px;
display: block;
letter-spacing: normal;
border-width: 1px;
border-style: solid;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
text-decoration: none;
}
#previewview {
padding-top: 8px !important;
padding-bottom: 8px !important;
}
h1 {
font-size: .75em;
line-height: 2.666em;
top: .5em;
right: 0;
margin: 0 !important;
padding: 0 !important;
width: 236px;
background: none;
}
input.text {
border: 0pt none;
outline-color: -moz-use-text-color;
outline-style: none;
outline-width: medium;
padding: 0pt;
width: 100%;
border-style: solid;
color: #333333;
}
/* Editor/Main Column */
div#container {
margin: 0;
min-width: 500px;
}
div#container form {
margin: 0px;
padding: 0px;
}
div#posting {
padding-left: 16px;
position: absolute;
z-index: 1;
width: 66%;
}
#post_title {
width: 99%;
}
.titlewrap {
border-style: solid;
border-width: 1px;
padding: 2px 3px;
border-color: #CCCCCC;
}
div#posting h2 {
margin: .5em 0 .25em 0;
font-size: 12px;
padding: 3px;
background: ;
}
.editor-container {
border-width: 1px;
border-color: #ccc;
border-style: solid;
margin-bottom: 1em;
}
/* Photo Styles */
#photo_directions {
margin-top: .25em;
display: block;
position: relative;
}
#photo_directions span {
display: block;
position: absolute;
top: 0;
right: 3px;
}
#photo_saving {
margin: 0 8px 8px;
vertical-align: middle;
}
#img_container {
background-color: #fff;
overflow: auto;
height: 100px;
}
#img_container a {
display: block;
width: 79px;
height: 79px;
float: left;
}
#img_container img {
width: 75px;
height: 75px;
border: 0px;
padding: 2px;
background-color: #f4f4f4;
cursor: pointer;
}
#img_container a, #img_container a:link, #img_container a:visited {
border: 2px solid #ccc;
margin: 0 4px 4px 0;
}
#img_container a:hover, #img_container a:active {
border: 2px solid #000;
}
/* Submit Column */
div#categories {
font-size: 85%;
position: absolute;
top: 50px;
right: 16px;
width: 27%;
z-index: 2;
}
div#categories h2 {
color: #333;
font-size: 12px;
margin: .5em 0 .5em 1em;
padding: 0;
}
#categories-all {
overflow: auto;
padding: 0 1em 1em 1em;
height: 15em;
}
#categories ul {
list-style: none;
padding: 0;
margin: 0;
}
#tagsdiv #newtag {
padding: 3px;
margin-right: 5px;
width: 16em;
}
#jaxtag {
clear: both;
padding-left: 1em;
margin: 0;
}
#tagchecklist {
padding-left: 1em;
margin-bottom: 1em;
font-size: 12px;
overflow: auto;
}
#tagchecklist strong {
position: absolute;
font-size: .75em;
}
#tagchecklist span {
margin-right: .5em;
margin-left: 10px;
display: block;
float: left;
font-size: 11px;
line-height: 1.8em;
white-space: nowrap;
cursor: default;
}
#tagchecklist span a {
margin: 6px 0pt 0pt -9px;
cursor: pointer;
width: 10px;
height: 10px;
display: block;
float: left;
text-indent: -9999px;
overflow: hidden;
position: absolute;
}
.submit {
-moz-border-radius-bottomleft: 3px;
-khtml-border-bottom-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
-moz-border-radius-bottomright: 3px;
-khtml-border-bottom-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
margin: 0;
padding: 10px;
}
.submitbox {
width: 100%;
float: right;
}
.submitbox .submit a:hover {
border-bottom-width: 1px;
border-bottom-style: solid;
}
.submitbox .submit input {
border: none;
text-align: left;
padding: 6px 4px;
font-size: 12px;
margin: 2px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
}
.submitbox #previewview {
padding: 15px 10px;
-moz-border-radius-topleft: 3px;
-khtml-border-top-left-radius: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
-moz-border-radius-topright: 3px;
-khtml-border-top-right-radius: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
/* Video Styles */
.video_split #extra_fields {
width: 27%;
height: 300px;
float: left;
}
#embed_code {
border: 0;
width: 99%;
height: 200px;
}
.video_split .editor_area {
width: 70%;
float: right;
}
.ac_results {
padding: 0;
margin: 0;
list-style: none;
position: absolute;
z-index: 10000;
display: none;
border-width: 1px;
border-style: solid;
}
.ac_results li {
padding: 2px 5px;
white-space: nowrap;
text-align: left;
}
.ac_over {
cursor: pointer;
}
.ac_match {
text-decoration: underline;
}
.photolist {
display: none;
}
#extra_fields small {
display: block;
margin-top: .5em;
padding-bottom: .25em;
}
#TB_ajaxContent #options {
position: absolute;
top: 20px;
right: 25px;
padding: 5px;
}
#TB_ajaxContent h3 {
margin-bottom: .25em;
}
.updated {
margin: 0;
margin-left: 15px;
margin-right: 15px;
padding: 0;
max-width: 980px;
border-width: 1px;
border-style: solid;
padding: 0 0.6em;
max-width: 950px;
margin-top: 1em;
margin-bottom: 1em;
}
.updated p, .error p {
margin: 0.6em 0;
}
.updated a, .error a {
text-decoration: underline;
}
.updated a {
text-decoration: none;
padding-bottom: 2px;
}
#post_status {
margin-left: 10px;
margin-bottom: 1em;
display: block;
}
/* Footer */
#footer {
height: 65px;
display: block;
width: 640px;
padding: 10px 0 0 60px;
margin: 0;
position: absolute;
bottom: 0;
font-size: 12px;
}
#footer p {
margin: 0;
padding: 7px 0;
}
#footer p a {
text-decoration: none;
}
#footer p a:hover {
text-decoration: underline;
}
/* Utility Classes */
.centered {
text-align: center;
}
.hidden {
display: none;
}

View File

@@ -1,15 +0,0 @@
#template textarea {
font-family:monospace;
}
#templateside {
float:left;
}
#themeselector {
padding-right:0;
padding-left: 5px;
float: left;
}
div.tablenav {
margin-right:0;
margin-left: 210px;
}

View File

@@ -1,66 +0,0 @@
#template textarea {
font-family: 'Courier New', Courier, monospace;
font-size: 12px;
width: 97%;
}
#template p {
width: 97%;
}
#templateside {
float: right;
width: 190px;
margin-top:-3.4em;
}
#templateside h3, #postcustomstuff p.submit {
margin: 0;
}
h3#bordertitle {
margin-bottom: 10px;
}
#templateside h4 {
margin-bottom: 0px;
}
#templateside ol, #templateside ul {
list-style: none;
margin: .5em;
padding: 0;
}
#templateside ol li, #templateside ul li {
margin: 1px 0px;
}
#themeselector {
padding-right: 5px;
float: right;
position: relative;
bottom: 25px;
}
#themeselector select {
margin: 0;
padding: 0;
}
.nonessential {
font-size: small;
}
.highlight {
padding: 1px;
}
div.bordertitle h2 {
border: none;
padding-bottom: 0px;
}
div.tablenav {
margin-right: 210px;
}

View File

@@ -1,12 +0,0 @@
html {
direction: ltr;
}
#uploadoptions, table {
direction: rtl;
}
td {
padding: 1px 6px 0;
}
.submit {
text-align: left;
}

View File

@@ -1,45 +0,0 @@
/* 2 column liquid layout */
div.widget-liquid-left-holder {
float: right;
clear: right;
margin-right:0;
margin-left: -310px;
}
div.widget-liquid-left {
margin-right:0;
margin-left: 320px;
}
div.widget-liquid-right {
float: left;
clear: left;
}
p#widget-search {
right:auto;
left:0;
}
h4.widget-title span {
float: right;
}
h4.widget-title a {
float: left;
margin-left:0;
margin-right: 1em;
}
ul#widget-list li.widget-list-item h4.widget-title {
float:right;
}
ul#widget-list li.widget-list-item div.widget-description {
margin: 0 200px 0 0;
padding: 0 4em 0 0;
}
.widget-control-save, .widget-control-remove {
margin-right:0;
margin-left: 8px;
float: right;
}
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 {
right:auto;
left: 1em;
}

View File

@@ -1,188 +0,0 @@
/* 2 column liquid layout */
div.widget-liquid-left-holder {
float: left;
clear: left;
width: 100%;
margin-right: -310px;
}
div.widget-liquid-left {
margin-right: 320px;
}
div.widget-liquid-right {
float: right;
clear: right;
width: 300px;
position: relative;
}
/* pasitioning etc. */
form#widgets-filter {
position: relative;
}
div#available-widgets-filter {
border-bottom-width: 1px;
border-bottom-style: solid;
}
p#widget-search {
position: absolute;
right: 0;
top: 0;
margin: 0;
}
ul#widget-list {
list-style: none;
margin: 0;
padding: 0;
}
ul#widget-list li.widget-list-item {
padding: .7em 0.9em;
margin: 0;
border-bottom-width: 1px;
border-bottom-style: solid;
line-height: 1;
}
h4.widget-title span {
float: left;
}
h4.widget-title a {
float: right;
text-decoration: underline;
border-bottom: none;
margin-left: 1em;
}
ul#widget-list li.widget-list-item h4.widget-title {
position: relative;
margin: 0;
padding: .5em 1em;
width: 200px;
float: left;
font-size: 13px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#dragHelper h4.widget-title {
padding: .5em 1em;
margin: 0;
}
ul#widget-list li.widget-list-item div.widget-description {
display: block;
margin: 0 0 0 200px;
padding: 0 0 0 4em;
font-size: 11px;
}
ul#widget-list li.widget-list-item ul.widget-control-info {
display: none;
}
div#sidebar-info {
padding: 0 1em;
margin-bottom: 1em;
font-size: 11px;
}
ul.widget-control-list {
list-style: none;
margin: 0;
padding: 0 1em;
}
div#current-widgets p.submit {
padding: 1em;
}
li.widget-list-control-item {
margin: 1em 0;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
li.widget-list-control-item h4,
#dragHelper li.widget-list-control-item h4,
li.widget-sortable h4 {
margin: 0;
cursor: move;
font-size: 13px;
padding: 0.4em 0.8em;
position: relative;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.widget-control-save, .widget-control-remove {
padding: 3px 5px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
margin-right: 8px;
float: left;
text-decoration: none;
}
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 {
right: 1em;
}
li.widget-list-control-item h4.widget-title a:hover {
text-decoration: none;
border-bottom: none;
}
li.widget-list-control-item div.widget-control {
display: none;
padding: 15px;
font-size: 11px;
position: relative;
}
li.widget-list-control-item div.widget-control p {
margin: 0 0 1em;
padding: 0;
}
ul.widget-control-list div.widget-control-actions {
border-top-width: 1px;
border-top-style: solid;
padding: 0.5em 0 0;
}
.widget-control-edit {
font-size: 10px;
font-weight: normal;
}
div#current-widgets {
padding-top: 1em;
border-width: 1px;
border-style: solid none none;
}
#widget-controls .widefat {
width: 92%;
padding: 3px;
}
#widget-controls select.widefat {
width: auto;
display: block;
}

View File

@@ -1,364 +0,0 @@
<?php
class Custom_Image_Header {
var $admin_header_callback;
function Custom_Image_Header($admin_header_callback) {
$this->admin_header_callback = $admin_header_callback;
}
function init() {
$page = add_theme_page(__('Custom Image Header'), __('Custom Image Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page'));
add_action("admin_print_scripts-$page", array(&$this, 'js_includes'));
add_action("admin_head-$page", array(&$this, 'take_action'), 50);
add_action("admin_head-$page", array(&$this, 'js'), 50);
add_action("admin_head-$page", $this->admin_header_callback, 51);
}
function step() {
$step = (int) @$_GET['step'];
if ( $step < 1 || 3 < $step )
$step = 1;
return $step;
}
function js_includes() {
$step = $this->step();
if ( 1 == $step )
wp_enqueue_script('colorpicker');
elseif ( 2 == $step )
wp_enqueue_script('cropper');
}
function take_action() {
if ( isset( $_POST['textcolor'] ) ) {
check_admin_referer('custom-header');
if ( 'blank' == $_POST['textcolor'] ) {
set_theme_mod('header_textcolor', 'blank');
} else {
$color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['textcolor']);
if ( strlen($color) == 6 || strlen($color) == 3 )
set_theme_mod('header_textcolor', $color);
}
}
if ( isset($_POST['resetheader']) ) {
check_admin_referer('custom-header');
remove_theme_mods();
}
}
function js() {
$step = $this->step();
if ( 1 == $step )
$this->js_1();
elseif ( 2 == $step )
$this->js_2();
}
function js_1() { ?>
<script type="text/javascript">
var cp = new ColorPicker();
function pickColor(color) {
$('name').style.color = color;
$('desc').style.color = color;
$('textcolor').value = color;
}
function PopupWindow_hidePopup(magicword) {
if ( magicword != 'prettyplease' )
return false;
if (this.divName != null) {
if (this.use_gebi) {
document.getElementById(this.divName).style.visibility = "hidden";
}
else if (this.use_css) {
document.all[this.divName].style.visibility = "hidden";
}
else if (this.use_layers) {
document.layers[this.divName].visibility = "hidden";
}
}
else {
if (this.popupWindow && !this.popupWindow.closed) {
this.popupWindow.close();
this.popupWindow = null;
}
}
return false;
}
function colorSelect(t,p) {
if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" ) {
cp.hidePopup('prettyplease');
} else {
cp.p = p;
cp.select(t,p);
}
}
function colorDefault() {
pickColor('#<?php echo HEADER_TEXTCOLOR; ?>');
}
function hide_text() {
$('name').style.display = 'none';
$('desc').style.display = 'none';
$('pickcolor').style.display = 'none';
$('defaultcolor').style.display = 'none';
$('textcolor').value = 'blank';
$('hidetext').value = '<?php _e('Show Text'); ?>';
// $('hidetext').onclick = 'show_text()';
Event.observe( $('hidetext'), 'click', show_text );
}
function show_text() {
$('name').style.display = 'block';
$('desc').style.display = 'block';
$('pickcolor').style.display = 'inline';
$('defaultcolor').style.display = 'inline';
$('textcolor').value = '<?php echo HEADER_TEXTCOLOR; ?>';
$('hidetext').value = '<?php _e('Hide Text'); ?>';
Event.stopObserving( $('hidetext'), 'click', show_text );
Event.observe( $('hidetext'), 'click', hide_text );
}
<?php if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?>
Event.observe( window, 'load', hide_text );
<?php } ?>
</script>
<?php
}
function js_2() { ?>
<script type="text/javascript">
function onEndCrop( coords, dimensions ) {
$( 'x1' ).value = coords.x1;
$( 'y1' ).value = coords.y1;
$( 'x2' ).value = coords.x2;
$( 'y2' ).value = coords.y2;
$( 'width' ).value = dimensions.width;
$( 'height' ).value = dimensions.height;
}
// with a supplied ratio
Event.observe(
window,
'load',
function() {
var xinit = <?php echo HEADER_IMAGE_WIDTH; ?>;
var yinit = <?php echo HEADER_IMAGE_HEIGHT; ?>;
var ratio = xinit / yinit;
var ximg = $('upload').width;
var yimg = $('upload').height;
if ( yimg < yinit || ximg < xinit ) {
if ( ximg / yimg > ratio ) {
yinit = yimg;
xinit = yinit * ratio;
} else {
xinit = ximg;
yinit = xinit / ratio;
}
}
new Cropper.Img(
'upload',
{
ratioDim: { x: xinit, y: yinit },
displayOnInit: true,
onEndCrop: onEndCrop
}
)
}
);
</script>
<?php
}
function step_1() {
if ( $_GET['updated'] ) { ?>
<div id="message" class="updated fade">
<p><?php _e('Header updated.') ?></p>
</div>
<?php } ?>
<div class="wrap">
<h2><?php _e('Your Header Image'); ?></h2>
<p><?php _e('This is your header image. You can change the text color or upload and crop a new image.'); ?></p>
<div id="headimg" style="background-image: url(<?php clean_url(header_image()) ?>);">
<h1><a onclick="return false;" href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>" id="name"><?php bloginfo('name'); ?></a></h1>
<div id="desc"><?php bloginfo('description');?></div>
</div>
<?php if ( !defined( 'NO_HEADER_TEXT' ) ) { ?>
<form method="post" action="<?php echo admin_url('themes.php?page=custom-header&amp;updated=true') ?>">
<input type="button" value="<?php _e('Hide Text'); ?>" onclick="hide_text()" id="hidetext" />
<input type="button" value="<?php _e('Select a Text Color'); ?>" onclick="colorSelect($('textcolor'), 'pickcolor')" id="pickcolor" /><input type="button" value="<?php _e('Use Original Color'); ?>" onclick="colorDefault()" id="defaultcolor" />
<?php wp_nonce_field('custom-header') ?>
<input type="hidden" name="textcolor" id="textcolor" value="#<?php attribute_escape(header_textcolor()) ?>" /><input name="submit" type="submit" value="<?php _e('Save Changes'); ?>" /></form>
<?php } ?>
<div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
</div>
<div class="wrap">
<h2><?php _e('Upload New Header Image'); ?></h2><p><?php _e('Here you can upload a custom header image to be shown at the top of your blog instead of the default one. On the next screen you will be able to crop the image.'); ?></p>
<p><?php printf(__('Images of exactly <strong>%1$d x %2$d pixels</strong> will be used as-is.'), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT); ?></p>
<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo attribute_escape(add_query_arg('step', 2)) ?>" style="margin: auto; width: 50%;">
<label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field('custom-header') ?>
<p class="submit">
<input type="submit" value="<?php _e('Upload'); ?>" />
</p>
</form>
</div>
<?php if ( get_theme_mod('header_image') || get_theme_mod('header_textcolor') ) : ?>
<div class="wrap">
<h2><?php _e('Reset Header Image and Color'); ?></h2>
<p><?php _e('This will restore the original header image and color. You will not be able to retrieve any customizations.') ?></p>
<form method="post" action="<?php echo attribute_escape(add_query_arg('step', 1)) ?>">
<?php wp_nonce_field('custom-header'); ?>
<input type="submit" name="resetheader" value="<?php _e('Restore Original Header'); ?>" />
</form>
</div>
<?php endif;
}
function step_2() {
check_admin_referer('custom-header');
$overrides = array('test_form' => false);
$file = wp_handle_upload($_FILES['import'], $overrides);
if ( isset($file['error']) )
die( $file['error'] );
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$filename = basename($file);
// Construct the object array
$object = array(
'post_title' => $filename,
'post_content' => $url,
'post_mime_type' => $type,
'guid' => $url);
// Save the data
$id = wp_insert_attachment($object, $file);
list($width, $height, $type, $attr) = getimagesize( $file );
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
// Add the meta-data
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
set_theme_mod('header_image', clean_url($url));
do_action('wp_create_file_in_uploads', $file, $id); // For replication
return $this->finished();
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
$oitar = $width / HEADER_IMAGE_WIDTH;
$image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
$image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication
$url = str_replace(basename($url), basename($image), $url);
$width = $width / $oitar;
$height = $height / $oitar;
} else {
$oitar = 1;
}
?>
<div class="wrap">
<form method="POST" action="<?php echo attribute_escape(add_query_arg('step', 3)) ?>">
<p><?php _e('Choose the part of the image you want to use as your header.'); ?></p>
<div id="testWrap" style="position: relative">
<img src="<?php echo $url; ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
</div>
<p class="submit">
<input type="hidden" name="x1" id="x1" />
<input type="hidden" name="y1" id="y1" />
<input type="hidden" name="x2" id="x2" />
<input type="hidden" name="y2" id="y2" />
<input type="hidden" name="width" id="width" />
<input type="hidden" name="height" id="height" />
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo $id; ?>" />
<input type="hidden" name="oitar" id="oitar" value="<?php echo $oitar; ?>" />
<?php wp_nonce_field('custom-header') ?>
<input type="submit" value="<?php _e('Crop Header'); ?>" />
</p>
</form>
</div>
<?php
}
function step_3() {
check_admin_referer('custom-header');
if ( $_POST['oitar'] > 1 ) {
$_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
$_POST['y1'] = $_POST['y1'] * $_POST['oitar'];
$_POST['width'] = $_POST['width'] * $_POST['oitar'];
$_POST['height'] = $_POST['height'] * $_POST['oitar'];
}
$original = get_attached_file( $_POST['attachment_id'] );
$cropped = wp_crop_image($_POST['attachment_id'], $_POST['x1'], $_POST['y1'], $_POST['width'], $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT);
$cropped = apply_filters('wp_create_file_in_uploads', $cropped, $_POST['attachment_id']); // For replication
$parent = get_post($_POST['attachment_id']);
$parent_url = $parent->guid;
$url = str_replace(basename($parent_url), basename($cropped), $parent_url);
// Construct the object array
$object = array(
'ID' => $_POST['attachment_id'],
'post_title' => basename($cropped),
'post_content' => $url,
'post_mime_type' => 'image/jpeg',
'guid' => $url
);
// Update the attachment
wp_insert_attachment($object, $cropped);
wp_update_attachment_metadata( $_POST['attachment_id'], wp_generate_attachment_metadata( $_POST['attachment_id'], $cropped ) );
set_theme_mod('header_image', $url);
// cleanup
$medium = str_replace(basename($original), 'midsize-'.basename($original), $original);
@unlink( apply_filters( 'wp_delete_file', $medium ) );
@unlink( apply_filters( 'wp_delete_file', $original ) );
return $this->finished();
}
function finished() {
?>
<div class="wrap">
<h2><?php _e('Header complete!'); ?></h2>
<p><?php _e('Visit your site and you should see the new header now.'); ?></p>
</div>
<?php
}
function admin_page() {
$step = $this->step();
if ( 1 == $step )
$this->step_1();
elseif ( 2 == $step )
$this->step_2();
elseif ( 3 == $step )
$this->step_3();
}
}
?>

View File

@@ -1,152 +0,0 @@
<?php if ( ! defined('ABSPATH') ) die(); ?>
<table class="widefat">
<thead>
<tr>
<?php $posts_columns = wp_manage_media_columns(); ?>
<?php foreach($posts_columns as $post_column_key => $column_display_name) {
if ( 'cb' === $post_column_key )
$class = ' class="check-column"';
elseif ( 'comments' === $post_column_key )
$class = ' class="num"';
else
$class = '';
?>
<th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
<?php } ?>
</tr>
</thead>
<tbody id="the-list" class="list:post">
<?php
if ( have_posts() ) {
$bgcolor = '';
add_filter('the_title','wp_specialchars');
while (have_posts()) : the_post();
$class = 'alternate' == $class ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
$att_title = get_the_title();
if ( empty($att_title) )
$att_title = __('(no title)');
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
<?php
foreach($posts_columns as $column_name=>$column_display_name) {
switch($column_name) {
case 'cb':
?>
<th scope="row" class="check-column"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
<?php
break;
case 'icon':
?>
<td class="media-icon"><?php echo wp_get_attachment_link($post->ID, array(80, 60), false, true); ?></td>
<?php
// TODO
break;
case 'media':
?>
<td><strong><a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />
<?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
<?php do_action('manage_media_media_column', $post->ID); ?>
</td>
<?php
break;
case 'desc':
?>
<td><?php echo has_excerpt() ? $post->post_excerpt : ''; ?></td>
<?php
break;
case 'date':
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
$t_time = $h_time = __('Unpublished');
} else {
$t_time = get_the_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_date;
$time = get_post_time( 'G', true );
if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
if ( $t_diff < 0 )
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
else
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
} else {
$h_time = mysql2date(__('Y/m/d'), $m_time);
}
}
?>
<td><?php echo $h_time ?></td>
<?php
break;
case 'parent':
$title = __('(no title)'); // override below
if ( $post->post_parent > 0 ) {
if ( get_post($post->post_parent) ) {
$parent_title = get_the_title($post->post_parent);
if ( !empty($parent_title) )
$title = $parent_title;
}
?>
<td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
<?php
} else {
?>
<td>&nbsp;</td>
<?php
}
break;
case 'comments':
?>
<td class="num"><div class="post-com-count-wrapper">
<?php
$left = get_pending_comments_num( $post->ID );
$pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
if ( $left )
echo '<strong>';
comments_number("<a href='upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='upload.php?attachment_id=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
if ( $left )
echo '</strong>';
?>
</div></td>
<?php
break;
case 'location':
?>
<td><a href="<?php the_permalink(); ?>"><?php _e('Permalink'); ?></a></td>
<?php
break;
default:
?>
<td><?php do_action('manage_media_custom_column', $column_name, $id); ?></td>
<?php
break;
}
}
?>
</tr>
<?php
endwhile;
} else {
?>
<tr style='background-color: <?php echo $bgcolor; ?>'>
<td colspan="8"><?php _e('No posts found.') ?></td>
</tr>
<?php
} // end if ( have_posts() )
?>
</tbody>
</table>

View File

@@ -1,53 +0,0 @@
<?php
if ( ! empty($cat_ID) ) {
$heading = __('Edit Category');
$submit_text = __('Edit Category');
$form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">';
$action = 'editedcat';
$nonce_action = 'update-category_' . $cat_ID;
do_action('edit_category_form_pre', $category);
} else {
$heading = __('Add Category');
$submit_text = __('Add Category');
$form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list: validate">';
$action = 'addcat';
$nonce_action = 'add-category';
do_action('add_category_form_pre', $category);
}
?>
<div class="wrap">
<h2><?php echo $heading ?></h2>
<div id="ajax-response"></div>
<?php echo $form ?>
<input type="hidden" name="action" value="<?php echo $action ?>" />
<input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" />
<?php wp_nonce_field($nonce_action); ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
<td><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->name); ?>" size="40" aria-required="true" /><br />
<?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
<td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br />
<?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
<td>
<?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br />
<?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?>
</td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_description"><?php _e('Description') ?></label></th>
<td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->description); ?></textarea><br />
<?php _e('The description is not prominent by default, however some themes may show it.'); ?></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
<?php do_action('edit_category_form', $category); ?>
</form>
</div>

View File

@@ -2,250 +2,169 @@
require_once('admin.php');
$title = __('Edit Comments');
$parent_file = 'edit-comments.php';
wp_enqueue_script( 'admin-comments' );
wp_enqueue_script('admin-forms');
if ( !empty( $_REQUEST['delete_comments'] ) ) {
check_admin_referer('bulk-comments');
$comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each
$comment = (int) $comment;
$post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) );
if ( !current_user_can('edit_post', $post_id) )
continue;
if ( !empty( $_REQUEST['spamit'] ) ) {
wp_set_comment_status($comment, 'spam');
$comments_spammed++;
} elseif ( !empty( $_REQUEST['deleteit'] ) ) {
wp_set_comment_status($comment, 'delete');
$comments_deleted++;
} elseif ( !empty( $_REQUEST['approveit'] ) ) {
wp_set_comment_status($comment, 'approve');
$comments_approved++;
} elseif ( !empty( $_REQUEST['unapproveit'] ) ) {
wp_set_comment_status($comment, 'hold');
$comments_unapproved++;
}
endforeach;
$redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved;
if ( isset($_REQUEST['apage']) )
$redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to );
if ( !empty($_REQUEST['mode']) )
$redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to);
if ( !empty($_REQUEST['comment_status']) )
$redirect_to = add_query_arg('comment_status', $_REQUEST['comment_status'], $redirect_to);
if ( !empty($_REQUEST['s']) )
$redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to);
wp_redirect( $redirect_to );
} elseif ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
$parent_file = 'edit.php';
require_once('admin-header.php');
if ( empty($_GET['mode']) )
$mode = 'detail';
else
$mode = attribute_escape($_GET['mode']);
if ( isset($_GET['comment_status']) )
$comment_status = attribute_escape($_GET['comment_status']);
else
$comment_status = '';
if ( isset($_GET['s']) )
$search_dirty = $_GET['s'];
else
$search_dirty = '';
$search = attribute_escape( $search_dirty );
if (empty($_GET['mode'])) $mode = 'view';
else $mode = wp_specialchars($_GET['mode'], 1);
?>
<?php
if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) {
$approved = isset( $_GET['approved'] ) ? (int) $_GET['approved'] : 0;
$deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0;
$spam = isset( $_GET['spam'] ) ? (int) $_GET['spam'] : 0;
if ( $approved > 0 || $deleted > 0 || $spam > 0 ) {
echo '<div id="moderated" class="updated fade"><p>';
if ( $approved > 0 ) {
printf( __ngettext( '%s comment approved', '%s comments approved', $approved ), $approved );
echo '<br />';
<script type="text/javascript">
<!--
function checkAll(form)
{
for (i = 0, n = form.elements.length; i < n; i++) {
if(form.elements[i].type == "checkbox") {
if(form.elements[i].checked == true)
form.elements[i].checked = false;
else
form.elements[i].checked = true;
}
if ( $deleted > 0 ) {
printf( __ngettext( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );
echo '<br />';
}
if ( $spam > 0 ) {
printf( __ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );
echo '<br />';
}
echo '</p></div>';
}
}
?>
//-->
</script>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<h2><?php _e('Manage Comments'); ?></h2>
<ul class="subsubsub">
<h2><?php _e('Comments'); ?></h2>
<form name="searchform" action="" method="get">
<fieldset>
<legend><?php _e('Show Comments That Contain...') ?></legend>
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
<?php _e('(Searches within comment text, e-mail, URI, and IP address.)') ?>
</fieldset>
</form>
<p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p>
<?php
$status_links = array();
$num_comments = wp_count_comments();
$stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 'approved' => _c('Approved|plural'));
$class = ( '' === $comment_status ) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
foreach ( $stati as $status => $label ) {
$class = '';
if ( !empty( $_POST['delete_comments'] ) ) :
$i = 0;
foreach ($_POST['delete_comments'] as $comment) : // Check the permissions on each
$comment = (int) $comment;
$post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment");
$authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") );
if ( current_user_can('edit_post', $post_id) ) :
$wpdb->query("DELETE FROM $wpdb->comments WHERE comment_ID = $comment");
++$i;
endif;
endforeach;
echo "<div class='wrap'><p>" . sprintf(__('%s comments deleted.'), $i) . "</p></div>";
endif;
if ( $status == $comment_status )
$class = ' class="current"';
if (isset($_GET['s'])) {
$s = $wpdb->escape($_GET['s']);
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE
(comment_author LIKE '%$s%' OR
comment_author_email LIKE '%$s%' OR
comment_author_url LIKE ('%$s%') OR
comment_author_IP LIKE ('%$s%') OR
comment_content LIKE ('%$s%') ) AND
comment_approved != 'spam'
ORDER BY comment_date DESC");
} else {
if ( isset($_GET['offset']) )
$offset = (int) $_GET['offset'] * 20;
else
$offset = 0;
$status_links[] = "<li><a href=\"edit-comments.php?comment_status=$status\"$class>" . $label . '</a>';
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $offset,20");
}
if ('view' == $mode) {
if ($comments) {
if ($offset)
$start = " start='$offset'";
else
$start = '';
$status_links = apply_filters( 'comment_status_links', $status_links );
echo "<ol id='the-list' class='commentlist' $start>";
$i = 0;
foreach ($comments as $comment) {
++$i; $class = '';
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
$comment_status = wp_get_comment_status($comment->comment_ID);
if ('unapproved' == $comment_status)
$class .= ' unapproved';
if ($i % 2)
$class .= ' alternate';
echo "<li id='comment-$comment->comment_ID' class='$class'>";
?>
<p><strong><?php _e('Name:') ?></strong> <?php comment_author() ?> <?php if ($comment->comment_author_email) { ?>| <strong><?php _e('E-mail:') ?></strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url ) { ?> | <strong><?php _e('URI:') ?></strong> <?php comment_author_url_link() ?> <?php } ?>| <strong><?php _e('IP:') ?></strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p>
<?php comment_text() ?>
echo implode(' | </li>', $status_links) . '</li>';
unset($status_links);
?>
</ul>
<p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A');
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " | <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
echo " | <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> &#8212; ";
} // end if any comments to show
// Get post title
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
$post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID");
$post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
?> <a href="post.php?action=edit&amp;post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post &#8220;%s&#8221;'), stripslashes($post_title)); ?></a>
<?php } ?>
| <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p>
</li>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e( 'Search Comments' ); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php echo $search; ?>" />
<input type="submit" value="<?php _e( 'Search Comments' ); ?>" class="button" />
</p>
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
</form>
<ul class="view-switch">
<li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li>
<li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li>
</ul>
<?php
$comments_per_page = apply_filters('comments_per_page', 20, $comment_status);
if ( isset( $_GET['apage'] ) )
$page = abs( (int) $_GET['apage'] );
else
$page = 1;
$start = $offset = ( $page - 1 ) * $comments_per_page;
list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra
$comments = array_slice($_comments, 0, $comments_per_page);
$extra_comments = array_slice($_comments, $comments_per_page);
$page_links = paginate_links( array(
'base' => add_query_arg( 'apage', '%#%' ),
'format' => '',
'total' => ceil($total / $comments_per_page),
'current' => $page
));
?>
<form id="comments-form" action="" method="post">
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<?php if ( 'approved' != $comment_status ): ?>
<input type="submit" value="<?php _e('Approve'); ?>" name="approveit" class="button-secondary" />
<?php endif; ?>
<input type="submit" value="<?php _e('Mark as Spam'); ?>" name="spamit" class="button-secondary" />
<?php if ( 'moderated' != $comment_status ): ?>
<input type="submit" value="<?php _e('Unapprove'); ?>" name="unapproveit" class="button-secondary" />
<?php endif; ?>
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php do_action('manage_comments_nav', $comment_status); ?>
<?php wp_nonce_field('bulk-comments'); ?>
<?php if ( isset($_GET['apage']) ) { ?>
<input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" />
<?php } ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<?php
if ($comments) {
?>
<table class="widefat">
<thead>
<tr>
<th scope="col" class="check-column"><input type="checkbox" /></th>
<th scope="col"><?php _e('Comment') ?></th>
<th scope="col"><?php _e('Date') ?></th>
<th scope="col" class="action-links"><?php _e('Actions') ?></th>
</tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment)
_wp_comment_row( $comment->comment_ID, $mode, $comment_status );
?>
</tbody>
<tbody id="the-extra-comment-list" class="list:comment" style="display: none;">
<?php
foreach ($extra_comments as $comment)
_wp_comment_row( $comment->comment_ID, $mode, $comment_status );
?>
</tbody>
</table>
</form>
<form id="get-extra-comments" method="post" action="" class="add:the-extra-comment-list:" style="display: none;">
<input type="hidden" name="s" value="<?php echo $search; ?>" />
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
<input type="hidden" name="page" value="<?php echo isset($_REQUEST['page']) ? absint( $_REQUEST['page'] ) : 1; ?>" />
<?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
</form>
<?php } // end foreach ?>
</ol>
<div id="ajax-response"></div>
<?php
} elseif ( 'moderated' == $_GET['comment_status'] ) {
} else {
?>
<p>
<strong><?php _e('No comments found.') ?></strong></p>
<?php
} // end if ($comments)
} elseif ('edit' == $mode) {
if ($comments) {
echo '<form name="deletecomments" id="deletecomments" action="" method="post">
<table width="100%" cellpadding="3" cellspacing="3">
<tr>
<th scope="col">*</th>
<th scope="col">' . __('Name') . '</th>
<th scope="col">' . __('E-mail') . '</th>
<th scope="col">' . __('IP') . '</th>
<th scope="col">' . __('Comment Excerpt') . '</th>
<th scope="col" colspan="3">' . __('Actions') . '</th>
</tr>';
foreach ($comments as $comment) {
$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
$class = ('alternate' == $class) ? '' : 'alternate';
?>
<tr class='<?php echo $class; ?>'>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
<td><?php comment_author_link() ?></td>
<td><?php comment_author_email_link() ?></td>
<td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td>
<td><?php comment_excerpt(); ?></td>
<td><a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo "<a href='post.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo "<a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . "</a>"; } ?></td>
</tr>
<?php
} // end foreach
?></table>
<p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p>
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Delete Checked Comments') ?> &raquo;" onclick="return confirm('<?php _e("You are about to delete these comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /> </p>
</form>
<?php
} else {
?>
<p>
<?php _e('No comments awaiting moderation&hellip; yet.') ?>
</p>
<?php
} else {
?>
<p>
<?php _e('No results found.') ?>
<strong><?php _e('No results found.') ?></strong>
</p>
<?php
} // end if ($comments)
}
?>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
</div>
?>
</div>

View File

@@ -1,389 +1,269 @@
<?php
$action = isset($action) ? $action : '';
if ( isset($_GET['message']) )
$_GET['message'] = absint( $_GET['message'] );
$messages[1] = sprintf( __( 'Post updated. Continue editing below or <a href="%s">go back</a>.' ), attribute_escape( stripslashes( $_GET['_wp_original_http_referer'] ) ) );
$messages[2] = __('Custom field updated.');
$messages[1] = __('Post updated');
$messages[2] = __('Custom field updated');
$messages[3] = __('Custom field deleted.');
$messages[4] = __('Post updated.');
if ( isset($_GET['revision']) )
$messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
$notice = false;
$notices[1] = __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>.' );
if ( !isset($post_ID) || 0 == $post_ID ) {
$form_action = 'post';
$temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post()
$form_extra = "<input type='hidden' id='post_ID' name='temp_ID' value='$temp_ID' />";
$autosave = false;
} else {
$post_ID = (int) $post_ID;
$form_action = 'editpost';
$form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />";
$autosave = wp_get_post_autosave( $post_id );
// Detect if there exists an autosave newer than the post and if that autosave is different than the post
if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) {
foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) {
if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) {
$notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) );
break;
}
}
unset($autosave_field, $_autosave_field);
}
}
?>
<?php if ( $notice ) : ?>
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
<?php endif; ?>
<?php if (isset($_GET['message'])) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
<?php endif; ?>
<form name="post" action="post.php" method="post" id="post">
<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
<?php if ( (isset($mode) && 'bookmarklet' == $mode) ||
isset($_GET['popupurl']) ): ?>
<input type="hidden" name="mode" value="bookmarklet" />
<?php endif; ?>
<div class="wrap">
<h2><?php _e('Write Post') ?></h2>
<h2 id="write-post"><?php _e('Write Post'); ?><?php if ( 0 != $post_ID ) : ?>
<small class="quickjump"><a href="#preview-post"><?php _e('preview &darr;'); ?></a></small><?php endif; ?></h2>
<?php
if ( !isset($post_ID) || 0 == $post_ID)
wp_nonce_field('add-post');
else
wp_nonce_field('update-post_' . $post_ID);
if (0 == $post_ID) {
$form_action = 'post';
$temp_ID = -1 * time();
$form_extra = "<input type='hidden' name='temp_ID' value='$temp_ID' />";
} else {
$form_action = 'editpost';
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
}
$form_pingback = '<input type="hidden" name="post_pingback" value="' . (int) get_option('default_pingback_flag') . '" id="post_pingback" />';
$form_pingback = '<input type="hidden" name="post_pingback" value="' . get_option('default_pingback_flag') . '" id="post_pingback" />';
$form_prevstatus = '<input type="hidden" name="prev_status" value="' . attribute_escape( $post->post_status ) . '" />';
$form_prevstatus = '<input type="hidden" name="prev_status" value="' . $post->post_status . '" />';
$saveasdraft = '<input name="save" type="submit" id="save" class="button" tabindex="3" value="' . attribute_escape( __('Save and Continue Editing') ) . '" />';
$form_trackback = '<input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $post->to_ping) .'" />';
if ('' != $post->pinged) {
$pings = '<p>'. __('Already pinged:') . '</p><ul>';
$already_pinged = explode("\n", trim($post->pinged));
foreach ($already_pinged as $pinged_url) {
$pings .= "\n\t<li>$pinged_url</li>";
}
$pings .= '</ul>';
}
$saveasdraft = '<input name="save" type="submit" id="save" tabindex="3" value="' . __('Save and Continue Editing') . '" />';
if (empty($post->post_status)) $post->post_status = 'draft';
?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value="<?php echo $form_action ?>" />
<input type="hidden" name="post_author" value="<?php echo $post->post_author ?>" />
<?php echo $form_extra ?>
<?php if (isset($_GET['message']) && 2 > $_GET['message']) : ?>
<script type="text/javascript">
function focusit() {
// focus on first input field
document.post.title.focus();
}
addLoadEvent(focusit);
</script>
<?php endif; ?>
<div id="poststuff">
<div class="submitbox" id="submitpost">
<div id="moremeta">
<div id="grabit" class="dbx-group">
<div id="previewview">
<?php if ( 'publish' == $post->post_status ) { ?>
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
<?php } elseif ( 'edit' == $action ) { ?>
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Post'); ?></a>
<?php } ?>
<fieldset id="commentstatusdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Discussion') ?></h3>
<div class="dbx-content">
<input name="advanced_view" type="hidden" value="1" />
<label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
<?php _e('Allow Comments') ?></label>
<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>
</div>
</fieldset>
<div class="inside">
<fieldset id="passworddiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
</fieldset>
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
<p>
<select name='post_status' id='post_status' tabindex='4'>
<fieldset id="slugdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post slug') ?></h3>
<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post->post_name ?>" /></div>
</fieldset>
<fieldset id="categorydiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
<div class="dbx-content">
<p id="jaxcat"></p>
<div id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></div></div>
</fieldset>
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
<label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
<label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
</fieldset>
<?php if ( current_user_can('edit_posts') ) : ?>
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Timestamp'); ?>:</h3>
<div class="dbx-content"><?php touch_time(($action == 'edit')); ?></div>
</fieldset>
<?php endif; ?>
<?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?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)
if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) :
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
else $selected = '';
echo "<option value='$o->ID' $selected>$o->display_name</option>";
endforeach;
?>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
<?php if ( 'future' == $post->post_status ) : ?>
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
<?php endif; ?>
<?php endif; ?>
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
</select>
</p>
<?php if ( current_user_can( 'publish_posts' ) ) : ?>
<p id="private-checkbox"><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 post private') ?></label></p>
</div>
</fieldset>
<?php endif; ?>
</div>
</div>
<fieldset id="titlediv">
<legend><?php _e('Title') ?></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
</fieldset>
<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>">
<legend><?php _e('Post') ?></legend>
<?php
if ($post_ID) {
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
$stamp = __('Scheduled for:<br />%1$s at %2$s');
} else if ( 'publish' == $post->post_status ) { // already published
$stamp = __('Published on:<br />%1$s at %2$s');
} else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified
$stamp = __('Publish immediately');
} else { // draft, 1 or more saves, date specified
$stamp = __('Publish on:<br />%1$s at %2$s');
}
$date = mysql2date(get_option('date_format'), $post->post_date);
$time = mysql2date(get_option('time_format'), $post->post_date);
} else { // draft (no saves, and thus no date specified)
$stamp = __('Publish immediately');
$date = mysql2date(get_option('date_format'), current_time('mysql'));
$time = mysql2date(get_option('time_format'), current_time('mysql'));
}
$rows = get_settings('default_post_edit_rows');
if (($rows < 3) || ($rows > 100)) {
$rows = 12;
}
?>
<?php if ( current_user_can( 'publish_posts' ) ) : // Contributors don't get to choose the date of publish ?>
<p class="curtime"><?php printf($stamp, $date, $time); ?>
&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p>
<?php the_quicktags(); ?>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div>
<div><textarea <?php if ( user_can_richedit() ) echo 'title="true" '; ?>rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div>
</fieldset>
<script type="text/javascript">
<!--
edCanvas = document.getElementById('content');
<?php if ( user_can_richedit() ) : ?>
// This code is meant to allow tabbing from Title to Post (TinyMCE).
if ( tinyMCE.isMSIE )
document.getElementById('title').onkeydown = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
else
document.getElementById('title').onkeypress = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
<?php endif; ?>
</div>
<p class="submit">
<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
<?php
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
?>
<?php if ( current_user_can('publish_posts') ) : ?>
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
<?php else : ?>
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
<?php endif; ?>
<?php
}
if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
?>
<br class="clear" />
<?php if ($post_ID): ?>
<?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
$last_user = get_userdata($last_id);
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
} else {
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
}
?>
<br class="clear" />
<?php endif; ?>
<span id="autosave"></span>
<span id="wp-word-count"></span>
</p>
<div class="side-info">
<h5><?php _e('Related') ?></h5>
<ul>
<?php if ($post_ID): ?>
<li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
<?php endif; ?>
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
<li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
<li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
<li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
<li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
<?php do_action('post_relatedlinks_list'); ?>
</ul>
<h5><?php _e('Shortcuts') ?></h5>
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?> <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
</div>
<?php do_action('submitpost_box'); ?>
</div>
<div id="post-body">
<div id="titlediv">
<h3><label for="title"><?php _e('Title') ?></label></h3>
<div id="titlewrap">
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
</div>
<div class="inside">
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
<div id="edit-slug-box">
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
echo $sample_permalink_html;
endif; ?>
</div>
</div>
</div>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
<h3><label for="content"><?php _e('Post') ?></label></h3>
<?php the_editor($post->post_content); ?>
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
</div>
//-->
</script>
<?php echo $form_pingback ?>
<?php echo $form_prevstatus ?>
<?php
function post_tags_meta_box($post) {
<p class="submit"><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" />
<?php
if ('publish' != $post->post_status || 0 == $post_ID) {
?>
<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>
<?php if ( current_user_can('publish_posts') ) : ?>
<input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
<?php endif; ?>
<?php
}
add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'normal', 'core');
function post_categories_meta_box($post) {
?>
<div id="category-adder" class="wp-hidden-children">
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
<p id="category-add" class="wp-hidden-child">
<label class="hidden" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
<label class="hidden" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
<input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
<?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
<span id="category-ajax-response"></span>
</p>
</div>
<ul id="category-tabs">
<li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li>
<li class="wp-no-js-hidden"><a href="#categories-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
</ul>
<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
<ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >
<?php $popular_ids = wp_popular_terms_checklist('category'); ?>
</ul>
</div>
<div id="categories-all" class="ui-tabs-panel">
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
<?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
</ul>
</div>
<?php
}
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'normal', 'core');
?>
<?php do_meta_boxes('post', 'normal', $post); ?>
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( !empty($_REQUEST['popupurl']) )
echo wp_specialchars($_REQUEST['popupurl']);
else if ( url_to_postid($_SERVER['HTTP_REFERER']) == $post_ID )
echo 'redo';
else
echo wp_specialchars($_SERVER['HTTP_REFERER']);
?>" /></p>
<?php do_action('edit_form_advanced'); ?>
<h2><?php _e('Advanced Options'); ?></h2>
<?php
function post_excerpt_meta_box($post) {
$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
$uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
$uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
if ( false != $uploading_iframe_src )
echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
?>
<label class="hidden" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea>
<p><?php _e('Excerpts are optional hand-crafted summaries of your content. You can <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" target="_blank">use them in your template</a>'); ?></p>
<?php
}
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'advanced', 'core');
function post_trackback_meta_box($post) {
$form_trackback = '<input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. attribute_escape( str_replace("\n", ' ', $post->to_ping) ) .'" />';
if ('' != $post->pinged) {
$pings = '<p>'. __('Already pinged:') . '</p><ul>';
$already_pinged = explode("\n", trim($post->pinged));
foreach ($already_pinged as $pinged_url) {
$pings .= "\n\t<li>" . wp_specialchars($pinged_url) . "</li>";
}
$pings .= '</ul>';
}
<div id="advancedstuff" class="dbx-group" >
?>
<p><label for="trackback"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>
<p><?php _e('Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. If you link other WordPress blogs they&#8217;ll be notified automatically using <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">pingbacks</a>, no other action necessary.'); ?></p>
<?php
<fieldset id="postexcerpt" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Optional Excerpt') ?></h3>
<div class="dbx-content"><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea></div>
</fieldset>
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3>
<div class="dbx-content"><?php _e('Send trackbacks to'); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>)
<?php
if ( ! empty($pings) )
echo $pings;
?>
</div>
</fieldset>
<fieldset id="postcustom" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3>
<div id="postcustomstuff" class="dbx-content">
<?php
if($metadata = has_meta($post_ID)) {
?>
<?php
list_meta($metadata);
?>
<?php
}
add_meta_box('trackbacksdiv', __('Trackbacks'), 'post_trackback_meta_box', 'post', 'advanced', 'core');
function post_custom_meta_box($post) {
?>
<div id="postcustomstuff">
<table cellpadding="3">
<?php
$metadata = has_meta($post->ID);
list_meta($metadata);
?>
</table>
<?php
meta_form();
?>
<div id="ajax-response"></div>
</div>
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
<?php
}
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'advanced', 'core');
</fieldset>
do_action('dbx_post_advanced');
function post_comment_status_meta_box($post) {
?>
<input name="advanced_view" type="hidden" value="1" />
<p><label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
<?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><?php _e('These settings apply to this post only. &#8220;Pings&#8221; are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
<?php
}
add_meta_box('commentstatusdiv', __('Comments &amp; Pings'), 'post_comment_status_meta_box', 'post', 'advanced', 'core');
function post_password_meta_box($post) {
?>
<p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p>
<?php
}
add_meta_box('passworddiv', __('Password Protect This Post'), 'post_password_meta_box', 'post', 'advanced', 'core');
function post_slug_meta_box($post) {
?>
<label class="hidden" for="post_name"><?php _e('Post Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
<?php
}
add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'advanced', 'core');
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
$authors[] = $post->post_author;
if ( $authors && count( $authors ) > 1 ) :
function post_author_meta_box($post) {
global $current_user, $user_ID;
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
$authors[] = $post->post_author;
?>
<label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
<?php
}
add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'advanced', 'core');
endif;
if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
function post_revisions_meta_box($post) {
wp_list_post_revisions();
}
add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'advanced', 'core');
endif;
do_meta_boxes('post', 'advanced', $post);
do_action('dbx_post_sidebar');
?>
</div>
<?php if ('edit' == $action) : ?>
<input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), addslashes($post->post_title) ) . "')\""; ?> />
<?php endif; ?>
</div>
</div>
</form>
<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
<script type="text/javascript">
try{document.post.title.focus();}catch(e){}
</script>
<?php endif; ?>

View File

@@ -0,0 +1,37 @@
<?php
require_once('../wp-config.php');
require_once('admin-functions.php');
require_once('admin-db.php');
get_currentuserinfo();
if ( !current_user_can('manage_categories') )
die('-1');
function get_out_now() { exit; }
add_action('shutdown', 'get_out_now', -1);
$names = explode(',', rawurldecode($_GET['ajaxnewcat']) );
$ids = array();
foreach ($names as $cat_name) {
$cat_name = trim( $cat_name );
if ( !$category_nicename = sanitize_title($cat_name) )
continue;
if ( $already = category_exists($cat_name) ) {
$ids[] = (string) $already;
continue;
}
$new_cat_id = wp_create_category($cat_name);
$ids[] = (string) $new_cat_id;
}
$return = join(',', $ids);
die( (string) $return );
?>

View File

@@ -1,108 +1,122 @@
<?php
$submitbutton_text = __('Edit Comment');
$submitbutton_text = __('Edit Comment &raquo;');
$toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID);
$form_action = 'editedcomment';
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment->comment_ID . "' />\n<input type='hidden' name='comment_post_ID' value='" . $comment->comment_post_ID;
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment->comment_ID . "' />\n<input type='hidden' name='comment_post_ID' value='".$comment->comment_post_ID;
?>
<form name="post" action="comment.php" method="post" id="post">
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
<form name="post" action="post.php" method="post" id="post">
<div class="wrap">
<h2><?php echo $toprow_title; ?></h2>
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
<div id="poststuff">
<script type="text/javascript">
function focusit() { // focus on first input field
document.post.name.focus();
}
addLoadEvent(focusit);
</script>
<fieldset id="namediv">
<legend><?php _e('Name:') ?></legend>
<div>
<input type="text" name="newcomment_author" size="22" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" />
</div>
</fieldset>
<fieldset id="emaildiv">
<legend><?php _e('E-mail:') ?></legend>
<div>
<input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" />
</div>
</fieldset>
<fieldset id="uridiv">
<legend><?php _e('URI:') ?></legend>
<div>
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" />
</div>
</fieldset>
<div class="submitbox" id="submitcomment">
<div id="previewview">
<a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
</div>
<div class="inside">
<p><strong><label for='comment_status'><?php _e('Approval Status') ?></label></strong></p>
<p>
<select name='comment_status' id='comment_status'>
<option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
<option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option>
<option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
</select>
</p>
<fieldset style="clear: both;">
<legend><?php _e('Comment') ?></legend>
<?php the_quicktags(); ?>
<?php
$stamp = __('%1$s at %2$s');
$date = mysql2date(get_option('date_format'), $comment->comment_date);
$time = mysql2date(get_option('time_format'), $comment->comment_date);
$rows = get_settings('default_post_edit_rows');
if (($rows < 3) || ($rows > 100)) {
$rows = 10;
}
?>
<p class="curtime"><?php printf($stamp, $date, $time); ?>
&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p>
<div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo user_can_richedit() ? wp_richedit_pre($comment->comment_content) : $comment->comment_content; ?></textarea></div>
</fieldset>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
<script type="text/javascript">
<!--
edCanvas = document.getElementById('content');
<?php if ( user_can_richedit() ) : ?>
// This code is meant to allow tabbing from Author URL to Post (TinyMCE).
if ( tinyMCE.isMSIE )
document.getElementById('newcomment_author_url').onkeydown = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
else
document.getElementById('newcomment_author_url').onkeypress = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
<?php endif; ?>
//-->
</script>
</div>
<p class="submit">
<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
<?php
echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
?>
<p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
</p>
<div class="side-info">
<h5><?php _e('Related') ?></h5>
<ul>
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
<li><a href="edit-comments.php?comment_status=moderated"><?php _e('Moderate Comments') ?></a></li>
<?php do_action('comment_relatedlinks_list'); ?>
</ul>
</div>
<?php do_action('submitcomment_box'); ?>
</div>
<div id="post-body">
<div id="namediv" class="stuffbox">
<h3><label for="name"><?php _e('Name') ?></label></h3>
<div class="inside">
<input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
</div>
</div>
<div class="wrap">
<h2><?php _e('Advanced'); ?></h2>
<div id="emaildiv" class="stuffbox">
<h3><label for="email"><?php _e('E-mail') ?></label></h3>
<div class="inside">
<input type="text" name="newcomment_author_email" size="30" value="<?php echo attribute_escape( $comment->comment_author_email ); ?>" tabindex="2" id="email" />
</div>
</div>
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
<tr>
<th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
<td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label><br />
<label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br />
<label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
</tr>
<div id="uridiv" class="stuffbox">
<h3><label for="newcomment_author_url"><?php _e('URL') ?></label></h3>
<div class="inside">
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo attribute_escape( $comment->comment_author_url ); ?>" tabindex="3" />
</div>
</div>
<?php if ( current_user_can('edit_posts') ) : ?>
<tr>
<th scope="row"><?php _e('Edit time'); ?>:</th>
<td><?php touch_time(('editcomment' == $action), 0); ?></td>
</tr>
<?php endif; ?>
<div id="postdiv" class="postarea">
<h3><label for="content"><?php _e('Comment') ?></label></h3>
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
</div>
<tr>
<th scope="row"><?php _e('Delete'); ?>:</th>
<td><p><a class="delete" href="post.php?action=confirmdeletecomment&amp;noredir=true&amp;comment=<?php echo $comment->comment_ID; ?>&amp;p=<?php echo $comment->comment_post_ID; ?>"><?php _e('Delete comment') ?></a></p></td>
</tr>
</table>
<?php do_meta_boxes('comment', 'normal', $comment); ?>
<input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
<input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
<?php wp_original_referer_field(true, 'previous'); ?>
<input type="hidden" name="noredir" value="1" />
</div>
</div>
</div>
</form>
<script type="text/javascript">
try{document.post.name.focus();}catch(e){}
</script>

View File

@@ -6,31 +6,40 @@
<?php if (isset($mode) && 'bookmarklet' == $mode) : ?>
<input type="hidden" name="mode" value="bookmarklet" />
<?php endif; ?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='post' />
<script type="text/javascript">
<!--
function focusit() { // focus on first input field
document.getElementById('title').focus();
}
addLoadEvent(focusit);
//-->
</script>
<div id="poststuff">
<fieldset id="titlediv">
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /></div>
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
</fieldset>
<fieldset id="categorydiv">
<legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
<legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
<div><?php dropdown_categories($post->post_category); ?></div>
</fieldset>
<br />
<fieldset id="postdiv">
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
<?php the_quicktags(); ?>
<?php
$rows = get_option('default_post_edit_rows');
$rows = get_settings('default_post_edit_rows');
if (($rows < 3) || ($rows > 100)) {
$rows = 10;
}
?>
<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo $post->post_content ?></textarea></div>
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
</fieldset>
@@ -40,22 +49,22 @@ edCanvas = document.getElementById('content');
//-->
</script>
<input type="hidden" name="post_pingback" value="<?php echo (int) get_option('default_pingback_flag') ?>" id="post_pingback" />
<input type="hidden" name="post_pingback" value="<?php echo get_option('default_pingback_flag') ?>" id="post_pingback" />
<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '<br />'; ?>
<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') ?>
<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
<input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
<input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
<?php if ( current_user_can('edit_posts') ) : ?>
<input name="publish" type="submit" id="publish" tabindex="6" value="<?php _e('Publish') ?>" class="button button-highlighted" />
<input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />
<?php endif; ?>
<?php if ('bookmarklet' != $mode) {
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing') . '" />';
} ?>
<input name="referredby" type="hidden" id="referredby" value="<?php if ( $refby = wp_get_referer() ) echo urlencode($refby); ?>" />
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing &raquo;') . '" />';
} ?>
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php do_action('simple_edit_form', ''); ?>
@@ -63,7 +72,4 @@ edCanvas = document.getElementById('content');
</div>
</form>
<script type="text/javascript">
try{document.getElementById('title').focus();}catch(e){}
</script>
</div>

View File

@@ -1,157 +0,0 @@
<?php
require_once('admin.php');
// Handle bulk deletes
if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
check_admin_referer('bulk-link-categories');
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
foreach( (array) $_GET['delete'] as $cat_ID ) {
$cat_name = get_term_field('name', $cat_ID, 'link_category');
$default_cat_id = get_option('default_link_category');
// Don't delete the default cats.
if ( $cat_ID == $default_cat_id )
wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));
}
$location = 'edit-link-categories.php';
if ( $referer = wp_get_referer() ) {
if ( false !== strpos($referer, 'edit-link-categories.php') )
$location = $referer;
}
$location = add_query_arg('message', 6, $location);
wp_redirect($location);
exit();
} elseif ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
$title = __('Link Categories');
$parent_file = 'edit.php';
wp_enqueue_script( 'admin-categories' );
wp_enqueue_script('admin-forms');
require_once ('admin-header.php');
$messages[1] = __('Category added.');
$messages[2] = __('Category deleted.');
$messages[3] = __('Category updated.');
$messages[4] = __('Category not added.');
$messages[5] = __('Category not updated.');
$messages[6] = __('Categories deleted.');
if (isset($_GET['message'])) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<?php if ( current_user_can('manage_categories') ) : ?>
<h2><?php printf(__('Manage Link Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
<?php else : ?>
<h2><?php _e('Manage Link Categories') ?> </h2>
<?php endif; ?>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e( 'Search Categories' ); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
<input type="submit" value="<?php _e( 'Search Categories' ); ?>" class="button" />
</p>
<br class="clear" />
<div class="tablenav">
<?php
$pagenum = absint( $_GET['pagenum'] );
if ( empty($pagenum) )
$pagenum = 1;
if( !$catsperpage || $catsperpage < 0 )
$catsperpage = 20;
$page_links = paginate_links( array(
'base' => add_query_arg( 'pagenum', '%#%' ),
'format' => '',
'total' => ceil(wp_count_terms('link_category') / $catsperpage),
'current' => $pagenum
));
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-link-categories'); ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<table class="widefat">
<thead>
<tr>
<th scope="col" class="check-column"><input type="checkbox" /></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col"><?php _e('Description') ?></th>
<th scope="col" class="num" style="width: 90px;"><?php _e('Links') ?></th>
</tr>
</thead>
<tbody id="the-list" class="list:link-cat">
<?php
$start = ($pagenum - 1) * $catsperpage;
$args = array('offset' => $start, 'number' => $catsperpage, 'hide_empty' => 0);
if ( !empty( $_GET['s'] ) )
$args['search'] = $_GET['s'];
$categories = get_terms( 'link_category', $args );
if ( $categories ) {
$output = '';
foreach ( $categories as $category ) {
$category = sanitize_term($category, 'link_category', 'display');
$output .= link_cat_row($category);
}
$output = apply_filters('cat_rows', $output);
echo $output;
unset($category);
}
?>
</tbody>
</table>
</form>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
</div>
<br class="clear" />
</div>
<?php if ( current_user_can('manage_categories') ) : ?>
<div class="wrap">
<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the links in that category. Instead, links that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), get_term_field('name', get_option('default_link_category'), 'link_category')) ?></p>
</div>
<?php include('edit-link-category-form.php'); ?>
<?php endif; ?>
<?php include('admin-footer.php'); ?>

View File

@@ -1,44 +0,0 @@
<?php
if ( ! empty($cat_ID) ) {
$heading = __('Edit Category');
$submit_text = __('Edit Category');
$form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">';
$action = 'editedcat';
$nonce_action = 'update-link-category_' . $cat_ID;
do_action('edit_link_category_form_pre', $category);
} else {
$heading = __('Add Category');
$submit_text = __('Add Category');
$form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">';
$action = 'addcat';
$nonce_action = 'add-link-category';
do_action('add_link_category_form_pre', $category);
}
?>
<div class="wrap">
<h2><?php echo $heading ?></h2>
<div id="ajax-response"></div>
<?php echo $form ?>
<input type="hidden" name="action" value="<?php echo $action ?>" />
<input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" />
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="name"><?php _e('Category name') ?></label></th>
<td><input name="name" id="name" type="text" value="<?php echo $category->name; ?>" size="40" aria-required="true" /></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="slug"><?php _e('Category slug') ?></label></th>
<td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" />
<?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th>
<td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $category->description; ?></textarea></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
<?php do_action('edit_link_category_form', $category); ?>
</form>
</div>

View File

@@ -1,17 +1,17 @@
<?php
if ( ! empty($link_id) ) {
$heading = __('Edit Link');
$submit_text = __('Save Changes');
$form = '<form name="editlink" id="editlink" method="post" action="link.php">';
$nonce_action = 'update-bookmark_' . $link_id;
$editing = true;
$heading = __('Edit a link:');
$submit_text = __('Save Changes &raquo;');
$form = '<form action="" method="post" name="editlink" id="editlink">';
} else {
$heading = __('Add Link');
$submit_text = __('Add Link');
$form = '<form name="addlink" id="addlink" method="post" action="link.php">';
$nonce_action = 'add-bookmark';
$editing = false;
$heading = __('<strong>Add</strong> a link:');
$submit_text = __('Add Link &raquo;');
$form = '<form name="addlink" method="post" action="link-manager.php">';
}
function xfn_check($class, $value = '', $deprecated = '') {
function xfn_check($class, $value = '', $type = 'check') {
global $link;
$link_rel = $link->link_rel;
@@ -22,295 +22,215 @@ function xfn_check($class, $value = '', $deprecated = '') {
}
if ('' == $value) {
if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"';
if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"';
if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"';
if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"';
if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"';
if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"';
if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
}
}
?>
<?php echo $form ?>
<?php wp_nonce_field($nonce_action); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
<div class="wrap">
<h2><?php echo $heading; ?></h2>
<div id="poststuff">
<div class="submitbox" id="submitlink">
<div id="previewview">
<?php if ( !empty($link_id) ) { ?>
<a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
<?php } ?>
</div>
<div class="inside">
<p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p>
</div>
<p class="submit">
<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
<?php
if ( ( 'edit' == $action) && current_user_can('manage_links') )
echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>";
?>
</p>
<div class="side-info">
<h5><?php _e('Related') ?></h5>
<ul>
<li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li>
<li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li>
<li><a href="link-import.php"><?php _e('Import Links') ?></a></li>
<?php do_action('link_relatedlinks_list'); ?>
</ul>
</div>
<?php do_action('submitlink_box'); ?>
</div>
<div id="post-body">
<div id="namediv" class="stuffbox">
<h3><label for="link_name"><?php _e('Name') ?></label></h3>
<div class="inside">
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
<?php _e('Example: Nifty blogging software'); ?>
</div>
</div>
<div id="addressdiv" class="stuffbox">
<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
<div class="inside">
<input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
<?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?>
</div>
</div>
<div id="descriptiondiv" class="stuffbox">
<h3><label for="link_description"><?php _e('Description') ?></label></h3>
<div class="inside">
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />
<?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
</div>
</div>
<?php function link_categories_meta_box($link) { ?>
<div id="category-adder" class="wp-hidden-children">
<h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4>
<p id="link-category-add" class="wp-hidden-child">
<label class="hidden" for="newcat"><?php _e( '+ Add New Category' ); ?></label>
<input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" aria-required="true" />
<input type="button" id="category-add-sumbit" class="add:categorychecklist:linkcategorydiv button" value="<?php _e( 'Add' ); ?>" />
<?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?>
<span id="category-ajax-response"></span>
</p>
</div>
<ul id="category-tabs">
<li class="ui-tabs-selected"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li>
<li class="wp-no-js-hidden"><a href="#categories-pop"><?php _e( 'Most Used' ); ?></a></li>
</ul>
<div id="categories-all" class="ui-tabs-panel">
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
<?php wp_link_category_checklist($link->link_id); ?>
</ul>
</div>
<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
<?php wp_popular_terms_checklist('link_category'); ?>
</ul>
</div>
<?php
}
add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
?>
<?php do_meta_boxes('link', 'normal', $link); ?>
<h2><?php _e('Advanced Options'); ?></h2>
<?php function link_target_meta_box($link) { ?>
<fieldset><legend class="hidden"><?php _e('Target') ?></legend>
<label for="link_target_blank" class="selectit">
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
<code>_blank</code></label><br />
<label for="link_target_top" class="selectit">
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo(($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />
<code>_top</code></label><br />
<label for="link_target_none" class="selectit">
<input id="link_target_none" type="radio" name="link_target" value="" <?php echo(($link->link_target == '') ? 'checked="checked"' : ''); ?> />
<?php _e('none') ?></label>
<div class="wrap">
<?php echo $form ?>
<h2><?php echo $heading ?></h2>
<fieldset class="options">
<legend><?php _e('Basics') ?></legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('URI:') ?></th>
<td width="67%"><input type="text" name="link_url" value="<?php echo $link->link_url; ?>" style="width: 95%;" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Link Name:') ?></th>
<td><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Short description:') ?></th>
<td><input type="text" name="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Category:') ?></th>
<td><?php link_category_dropdown('link_category', $link->link_category); ?></td>
</tr>
</table>
</fieldset>
<p><?php _e('Choose the frame your link targets. Essentially this means if you choose <code>_blank</code> your link will open in a new window.'); ?></p>
<?php
}
add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'advanced', 'core');
function link_xfn_meta_box($link) {
?>
<table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">
<tr>
<th style="width: 20%;" scope="row"><label for="link_rel"><?php _e('rel:') ?></label></th>
<td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td>
</tr>
<tr>
<td colspan="2">
<table cellpadding="3" cellspacing="5" class="form-table">
<tr>
<th scope="row"> <?php _e('identity') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('identity') ?> </legend>
<label for="me">
<input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
<?php _e('another web address of mine') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('friendship') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('friendship') ?> </legend>
<label for="contact">
<input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>
<label for="acquaintance">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>
<label for="friend">
<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
<label for="friendship">
<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('physical') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('physical') ?> </legend>
<label for="met">
<input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />
<?php _e('met') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('professional') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('professional') ?> </legend>
<label for="co-worker">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />
<?php _e('co-worker') ?></label>
<label for="colleague">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />
<?php _e('colleague') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('geographical') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('geographical') ?> </legend>
<label for="co-resident">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
<?php _e('co-resident') ?></label>
<label for="neighbor">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
<?php _e('neighbor') ?></label>
<label for="geographical">
<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> />
<?php _e('none') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('family') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('family') ?> </legend>
<label for="child">
<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> />
<?php _e('child') ?></label>
<label for="kin">
<input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> />
<?php _e('kin') ?></label>
<label for="parent">
<input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> />
<?php _e('parent') ?></label>
<label for="sibling">
<input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> />
<?php _e('sibling') ?></label>
<label for="spouse">
<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> />
<?php _e('spouse') ?></label>
<label for="family">
<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> />
<?php _e('none') ?></label>
</fieldset></td>
</tr>
<tr>
<th scope="row"> <?php _e('romantic') ?> </th>
<td><fieldset><legend class="hidden"> <?php _e('romantic') ?> </legend>
<label for="muse">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />
<?php _e('muse') ?></label>
<label for="crush">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />
<?php _e('crush') ?></label>
<label for="date">
<input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />
<?php _e('date') ?></label>
<label for="romantic">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />
<?php _e('sweetheart') ?></label>
</fieldset></td>
</tr>
</table>
</td>
</tr>
<p class="submit">
<input type="submit" name="submit" value="<?php echo $submit_text ?>" />
</p>
<fieldset class="options">
<legend><?php _e('Link Relationship (XFN)') ?></legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('rel:') ?></th>
<td width="67%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td>
</tr>
<tr>
<th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th>
<td>
<table cellpadding="3" cellspacing="5">
<tr>
<th scope="row"> <?php _e('identity') ?> </th>
<td>
<label for="me">
<input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
<?php _e('another web address of mine') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('friendship') ?> </th>
<td>
<label for="contact">
<input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>
<label for="acquaintance">
<input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>
<label id="friend">
<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
<label for="friendship">
<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('physical') ?> </th>
<td>
<label for="met">
<input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />
<?php _e('met') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('professional') ?> </th>
<td>
<label for="co-worker">
<input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />
<?php _e('co-worker') ?></label>
<label for="colleague">
<input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />
<?php _e('colleague') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('geographical') ?> </th>
<td>
<label for="co-resident">
<input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
<?php _e('co-resident') ?></label>
<label for="neighbor">
<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
<?php _e('neighbor') ?></label>
<label for="geographical">
<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('family') ?> </th>
<td>
<label for="child">
<input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> />
<?php _e('child') ?></label>
<label for="kin">
<input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> />
<?php _e('kin') ?></label>
<label for="parent">
<input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> />
<?php _e('parent') ?></label>
<label for="sibling">
<input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> />
<?php _e('sibling') ?></label>
<label for="spouse">
<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> />
<?php _e('spouse') ?></label>
<label for="family">
<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> />
<?php _e('none') ?></label>
</td>
</tr>
<tr>
<th scope="row"> <?php _e('romantic') ?> </th>
<td>
<label for="muse">
<input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />
<?php _e('muse') ?></label>
<label for="crush">
<input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />
<?php _e('crush') ?></label>
<label for="date">
<input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />
<?php _e('date') ?></label>
<label for="romantic">
<input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />
<?php _e('sweetheart') ?></label>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>
</fieldset>
<p class="submit">
<input type="submit" name="submit" value="<?php echo $submit_text ?>" />
</p>
<fieldset class="options">
<legend><?php _e('Advanced') ?></legend>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('Image URI:') ?></th>
<td width="67%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('RSS URI:') ?> </th>
<td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Notes:') ?></th>
<td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>
</tr>
<tr>
<th scope="row"><?php _e('Rating:') ?></th>
<td><select name="link_rating" size="1">
<?php
}
add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'advanced', 'core');
function link_advanced_meta_box($link) {
for ($r = 0; $r < 10; $r++) {
echo(' <option value="'.$r.'" ');
if ($link->link_rating == $r)
echo 'selected="selected"';
echo('>'.$r.'</option>');
}
?>
<table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5">
<tr class="form-field">
<th valign="top" scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
<td><input type="text" name="link_image" id="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
</tr>
<tr class="form-field">
<th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
<td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
</tr>
<tr class="form-field">
<th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
<td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>
</tr>
<tr class="form-field">
<th valign="top" scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
<td><select name="link_rating" id="link_rating" size="1">
<?php
for ($r = 0; $r < 10; $r++) {
echo(' <option value="'.$r.'" ');
if ($link->link_rating == $r)
echo 'selected="selected"';
echo('>'.$r.'</option>');
}
?></select>&nbsp;<?php _e('(Leave at 0 for no rating.)') ?>
</td>
</tr>
</select>
&nbsp;<?php _e('(Leave at 0 for no rating.)') ?> </td>
</tr>
<tr>
<th scope="row"><?php _e('Target') ?></th>
<td><label>
<input type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
<code>_blank</code></label><br />
<label>
<input type="radio" name="link_target" value="_top" <?php echo(($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />
<code>_top</code></label><br />
<label>
<input type="radio" name="link_target" value="" <?php echo(($link->link_target == '') ? 'checked="checked"' : ''); ?> />
<?php _e('none') ?></label><br />
<?php _e('(Note that the <code>target</code> attribute is illegal in XHTML 1.1 and 1.0 Strict.)') ?></td>
</tr>
<tr>
<th scope="row"><?php _e('Visible:') ?></th>
<td><label>
<input type="radio" name="link_visible" <?php if ($link->link_visible == 'Y') echo "checked='checked'"; ?> value="Y" />
<?php _e('Yes') ?></label><br /><label>
<input type="radio" name="link_visible" <?php if ($link->link_visible == 'N') echo "checked='checked'"; ?> value="N" />
<?php _e('No') ?></label></td>
</tr>
</table>
<?php
}
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'advanced', 'core');
do_meta_boxes('link', 'advanced', $link);
if ( $link_id ) : ?>
<input type="hidden" name="action" value="save" />
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
<input type="hidden" name="order_by" value="<?php echo attribute_escape($order_by); ?>" />
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
</fieldset>
<p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p>
<?php if ( $editing ) : ?>
<input type="hidden" name="action" value="editlink" />
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
<?php else: ?>
<input type="hidden" name="action" value="add" />
<input type="hidden" name="action" value="Add" />
<?php endif; ?>
</div>
</div>
</div>
</form>
</form>
</div>

View File

@@ -1,317 +1,219 @@
<?php
if ( isset($_GET['message']) )
$_GET['message'] = absint( $_GET['message'] );
$messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s">go back</a>.' ), attribute_escape( stripslashes( $_GET['_wp_original_http_referer'] ) ) );
$messages[2] = __('Custom field updated.');
$messages[3] = __('Custom field deleted.');
$messages[4] = __('Page updated.');
if ( isset($_GET['revision']) )
$messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
$notice = false;
$notices[1] = __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' );
if (!isset($post_ID) || 0 == $post_ID) {
$form_action = 'post';
$nonce_action = 'add-page';
$temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post()
$form_extra = "<input type='hidden' id='post_ID' name='temp_ID' value='$temp_ID' />";
} else {
$post_ID = (int) $post_ID;
$form_action = 'editpost';
$nonce_action = 'update-page_' . $post_ID;
$form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />";
$autosave = wp_get_post_autosave( $post_id );
if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) )
$notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) );
}
$temp_ID = (int) $temp_ID;
$user_ID = (int) $user_ID;
?>
<?php if ( $notice ) : ?>
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
<?php endif; ?>
<?php if (isset($_GET['message'])) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
<?php endif; ?>
<form name="post" action="page.php" method="post" id="post">
<div class="wrap">
<h2><?php _e('Write Page') ?></h2>
<h2 id="write-post"><?php _e('Write Page'); ?><?php if ( 0 != $post_ID ) : ?>
<small class="quickjump"><a href="#preview-post"><?php _e('preview &darr;'); ?></a></small><?php endif; ?></h2>
<?php
wp_nonce_field($nonce_action);
if (isset($mode) && 'bookmarklet' == $mode)
echo '<input type="hidden" name="mode" value="bookmarklet" />';
?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' />
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
<?php echo $form_extra ?>
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
<div id="poststuff">
<div class="submitbox" id="submitpage">
<div id="previewview">
<?php if ( 'publish' == $post->post_status ) { ?>
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>
<?php } elseif ( 'edit' == $action ) { ?>
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a>
<?php } ?>
</div>
<div class="inside">
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
<p>
<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')
// '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) ) ) :
?>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
<?php endif; ?>
<?php if ( 'future' == $post->post_status ) : ?>
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
<?php endif; ?>
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
</select>
</p>
<?php if ( current_user_can( 'publish_posts' ) ) : ?>
<p id="private-checkbox"><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
if ($post_ID) {
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
$stamp = __('Scheduled for:<br />%1$s at %2$s');
} else if ( 'publish' == $post->post_status ) { // already published
$stamp = __('Published on:<br />%1$s at %2$s');
} else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified
$stamp = __('Publish immediately');
} else { // draft, 1 or more saves, date specified
$stamp = __('Publish on:<br />%1$s at %2$s');
}
$date = mysql2date(get_option('date_format'), $post->post_date);
$time = mysql2date(get_option('time_format'), $post->post_date);
} else { // draft (no saves, and thus no date specified)
$stamp = __('Publish immediately');
$date = mysql2date(get_option('date_format'), current_time('mysql'));
$time = mysql2date(get_option('time_format'), current_time('mysql'));
}
?>
<p class="curtime"><?php printf($stamp, $date, $time); ?>
&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div>
</div>
<p class="submit">
<input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" />
<?php
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
?>
<?php if ( current_user_can('publish_pages') ) : ?>
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
<?php else : ?>
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
<?php endif; ?>
<?php
}
if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$post_ID", 'delete-page_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;page') . "</a>";
?>
<br class="clear" />
<?php if ($post_ID): ?>
<?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
$last_user = get_userdata($last_id);
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
if (0 == $post_ID) {
$form_action = 'post';
$temp_ID = -1 * time();
$form_extra = "<input type='hidden' name='temp_ID' value='$temp_ID' />";
} else {
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
$form_action = 'editpost';
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
}
$sendto = $_SERVER['HTTP_REFERER'];
if ( 0 != $post_ID && $sendto == get_permalink($post_ID) )
$sendto = 'redo';
$sendto = wp_specialchars( $sendto );
?>
<br class="clear" />
<?php endif; ?>
<span id="autosave"></span>
<span id="wp-word-count"></span>
</p>
<div class="side-info">
<h5><?php _e('Related') ?></h5>
<form name="post" action="post.php" method="post" id="post">
<ul>
<?php if ($post_ID): ?>
<li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li>
<?php endif; ?>
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
<li><a href="edit-pages.php"><?php _e('Manage All Pages') ?></a></li>
<?php do_action('page_relatedlinks_list'); ?>
</ul>
</div>
<?php do_action('submitpage_box'); ?>
</div>
<div id="post-body">
<div id="titlediv">
<h3><label for="title"><?php _e('Title') ?></label></h3>
<div id="titlewrap">
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" />
</div>
<div class="inside">
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
<div id="edit-slug-box">
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
echo $sample_permalink_html;
endif; ?>
</div>
</div>
</div>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
<h3><label for="content"><?php _e('Page') ?></label></h3>
<?php the_editor($post->post_content); ?>
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
</div>
<?php do_meta_boxes('page', 'normal', $post); ?>
<?php do_action('edit_page_form'); ?>
<h2><?php _e('Advanced Options'); ?></h2>
<?php
function page_custom_meta_box($post){
?>
<div id="postcustomstuff">
<table cellpadding="3">
<?php
$metadata = has_meta($post->ID);
list_meta($metadata);
?>
</table>
<?php
meta_form();
?>
<div id="ajax-response"></div>
</div>
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
<?php
if (isset($mode) && 'bookmarklet' == $mode) {
echo '<input type="hidden" name="mode" value="bookmarklet" />';
}
add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'advanced', 'core');
function page_comments_status_meta_box($post){
?>
<input name="advanced_view" type="hidden" value="1" />
<p><label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
<?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><?php _e('These settings apply to this page only. &#8220;Pings&#8221; are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
<?php
}
add_meta_box('pagecommentstatusdiv', __('Comments &amp; Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
function page_password_meta_box($post){
?>
<p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
<?php
}
add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'advanced', 'core');
function page_slug_meta_box($post){
?>
<label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
<?php
}
add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'advanced', 'core');
function page_parent_meta_box($post){
?>
<label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
<select name="parent_id" id="parent_id">
<option value='0'><?php _e('Main Page (no parent)'); ?></option>
<?php parent_dropdown($post->post_parent); ?>
</select>
<p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
<?php
}
add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'advanced', 'core');
if ( 0 != count( get_page_templates() ) ) {
function page_template_meta_box($post){
?>
<label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
<option value='default'><?php _e('Default Template'); ?></option>
<?php page_template_dropdown($post->page_template); ?>
</select>
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them above.'); ?></p>
<?php
}
add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'advanced', 'core');
}
function page_order_meta_box($post){
?>
<p><label class="hidden" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p>
<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)'); ?></p>
<?php
}
add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'advanced', 'core');
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
$authors[] = $post->post_author;
if ( $authors && count( $authors ) > 1 ) {
function page_author_meta_box($post){
global $current_user, $user_ID;
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
$authors[] = $post->post_author;
?>
<label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
<?php
}
add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'advanced', 'core');
}
if ( isset($post_ID) && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
function page_revisions_meta_box($post) {
wp_list_post_revisions();
}
add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core');
endif;
do_meta_boxes('page', 'advanced', $post);
?>
</div>
</div>
</div>
</form>
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action ?>' />
<?php echo $form_extra ?>
<input type="hidden" name="post_status" value="static" />
<script type="text/javascript">
try{document.post.title.focus();}catch(e){}
<!--
function focusit() { // focus on first input field
document.post.title.focus();
}
addLoadEvent(focusit);
//-->
</script>
<div id="poststuff">
<div id="moremeta">
<div id="grabit" class="dbx-group">
<fieldset id="commentstatusdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Discussion') ?></h3>
<div class="dbx-content">
<input name="advanced_view" type="hidden" value="1" />
<label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
<?php _e('Allow Comments') ?></label>
<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>
</div>
</fieldset>
<fieldset id="passworddiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
</fieldset>
<fieldset id="pageparent" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Parent') ?></h3>
<div class="dbx-content"><p><select name="parent_id">
<option value='0'><?php _e('Main Page (no parent)'); ?></option>
<?php parent_dropdown($post->post_parent); ?>
</select></p>
</div>
</fieldset>
<?php if ( 0 != count( get_page_templates() ) ) { ?>
<fieldset id="pageparent" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Template:') ?></h3>
<div class="dbx-content"><p><select name="page_template">
<option value='default'><?php _e('Default Template'); ?></option>
<?php page_template_dropdown($post->page_template); ?>
</select></p>
</div>
</fieldset>
<?php } ?>
<fieldset id="slugdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post slug') ?></h3>
<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post->post_name ?>" /></div>
</fieldset>
<?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?php
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
else $selected = '';
echo "<option value='$o->ID' $selected>$o->display_name</option>";
endforeach;
?>
</select>
</div>
</fieldset>
<?php endif; ?>
<fieldset id="pageorder" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Order') ?></h3>
<div class="dbx-content"><p><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p></div>
</fieldset>
</div>
</div>
<fieldset id="titlediv">
<legend><?php _e('Page Title') ?></legend>
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div>
</fieldset>
<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>">
<legend><?php _e('Page Content') ?></legend>
<?php
$rows = get_settings('default_post_edit_rows');
if (($rows < 3) || ($rows > 100)) {
$rows = 10;
}
?>
<?php the_quicktags(); ?>
<div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div>
</fieldset>
<script type="text/javascript">
<!--
edCanvas = document.getElementById('content');
<?php if ( user_can_richedit() ) : ?>
// This code is meant to allow tabbing from Title to Post (TinyMCE).
if ( tinyMCE.isMSIE )
document.getElementById('title').onkeydown = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
else
document.getElementById('title').onkeypress = function (e)
{
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.selectedInstance;
if(typeof i == 'undefined')
return true;
tinyMCE.execCommand("mceStartTyping");
this.blur();
i.contentWindow.focus();
e.returnValue = false;
return false;
}
}
<?php endif; ?>
//-->
</script>
<p class="submit">
<?php if ( $post_ID ) : ?>
<input name="save" type="submit" id="save" tabindex="5" value=" <?php _e('Save and Continue Editing'); ?> "/>
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Save') : _e('Create New Page') ?> &raquo;" />
<?php else : ?>
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php _e('Create New Page') ?> &raquo;" />
<?php endif; ?>
<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
</p>
<?php
$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
$uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
$uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
if ( false != $uploading_iframe_src )
echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
?>
<div id="advancedstuff" class="dbx-group">
<fieldset id="postcustom" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3>
<div id="postcustomstuff" class="dbx-content">
<?php
if($metadata = has_meta($post_ID)) {
?>
<?php
list_meta($metadata);
?>
<?php
}
meta_form();
?>
</div>
</fieldset>
</div>
<?php if ('edit' == $action) : ?>
<input name="deletepost" class="delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $wpdb->escape($post->post_title) ) . "')\""; ?> />
<?php endif; ?>
<?php do_action('edit_page_form', ''); ?>
</form>
</div>
</div>

View File

@@ -1,237 +1,78 @@
<?php
require_once('admin.php');
// Handle bulk deletes
if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
check_admin_referer('bulk-pages');
foreach( (array) $_GET['delete'] as $post_id_del ) {
$post_del = & get_post($post_id_del);
if ( !current_user_can('delete_page', $post_id_del) )
wp_die( __('You are not allowed to delete this page.') );
if ( $post_del->post_type == 'attachment' ) {
if ( ! wp_delete_attachment($post_id_del) )
wp_die( __('Error in deleting...') );
} else {
if ( !wp_delete_post($post_id_del) )
wp_die( __('Error in deleting...') );
}
}
$sendback = wp_get_referer();
if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php');
elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
wp_redirect($sendback);
exit();
} elseif ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
$title = __('Pages');
$parent_file = 'edit.php';
wp_enqueue_script('admin-forms');
$post_stati = array( // array( adj, noun )
'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published (%s)', 'Published (%s)')),
'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')),
'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')),
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')),
'private' => array(__('Private'), __('Private pages'), __ngettext_noop('Private (%s)', 'Private (%s)'))
);
$post_status_label = __('Manage Pages');
$post_status_q = '';
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
$post_status_label = $post_stati[$_GET['post_status']][1];
$post_status_q = '&post_status=' . $_GET['post_status'];
$post_status_q .= '&perm=readable';
}
$query_str = "post_type=page&orderby=menu_order title&what_to_show=posts$post_status_q&posts_per_page=-1&posts_per_archive_page=-1&order=asc";
$query_str = apply_filters('manage_pages_query', $query_str);
wp($query_str);
if ( is_singular() )
wp_enqueue_script( 'admin-comments' );
require_once('admin-header.php');
?>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<h2><?php
// Use $_GET instead of is_ since they can override each other
$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : '';
$h2_author = '';
if ( isset($_GET['author']) && $_GET['author'] ) {
$author_user = get_userdata( (int) $_GET['author'] );
$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
}
printf( _c( '%1$s%2$s%3$s|You can reorder these: 1: Pages, 2: by {s}, 3: matching {s}' ), $post_status_label, $h2_author, $h2_search );
?></h2>
<h2><?php _e('Page Management'); ?></h2>
<p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page'); ?> &raquo;</a></p>
<ul class="subsubsub">
<?php
$avail_post_stati = get_available_post_statuses('page');
$status_links = array();
$num_posts = wp_count_posts('page', 'readable');
$class = empty($_GET['post_status']) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit-pages.php\"$class>".__('All Pages')."</a>";
foreach ( $post_stati as $status => $label ) {
$class = '';
if ( !in_array($status, $avail_post_stati) )
continue;
if ( $status == $_GET['post_status'] )
$class = ' class="current"';
$status_links[] = "<li><a href=\"edit-pages.php?post_status=$status\"$class>" .
sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->$status), number_format_i18n( $num_posts->$status ) ) . '</a>';
}
echo implode(' |</li>', $status_links) . '</li>';
unset($status_links);
?>
</ul>
<?php if ( isset($_GET['post_status'] ) ) : ?>
<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" />
<?php
endif;
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
<div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="page.php?action=edit&amp;post=<?php echo $_GET['posted']; ?>"><?php _e('Edit page'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
endif;
?>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e( 'Search Pages' ); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
<input type="submit" value="<?php _e( 'Search Pages' ); ?>" class="button" />
</p>
<div class="tablenav">
<?php
$pagenum = absint( $_GET['pagenum'] );
if ( empty($pagenum) )
$pagenum = 1;
if( !$per_page || $per_page < 0 )
$per_page = 20;
$num_pages = ceil(count($posts) / $per_page);
$page_links = paginate_links( array(
'base' => add_query_arg( 'pagenum', '%#%' ),
'format' => '',
'total' => $num_pages,
'current' => $pagenum
));
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-pages'); ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<form name="searchform" action="" method="get">
<fieldset>
<legend><?php _e('Search Pages&hellip;') ?></legend>
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
</fieldset>
</form>
<?php
$all = !( $h2_search || $post_status_q );
$show_post_type = 'page';
if ( isset($_GET['s']) )
wp();
else
$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static'");
if ($posts) {
?>
<table class="widefat">
<thead>
<tr>
<?php $posts_columns = wp_manage_pages_columns(); ?>
<?php foreach($posts_columns as $post_column_key => $column_display_name) {
if ( 'cb' === $post_column_key )
$class = ' class="check-column"';
elseif ( 'comments' === $post_column_key )
$class = ' class="num"';
else
$class = '';
?>
<th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
<?php } ?>
<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
<tr>
<th scope="col"><?php _e('ID') ?></th>
<th scope="col"><?php _e('Title') ?></th>
<th scope="col"><?php _e('Owner') ?></th>
<th scope="col"><?php _e('Updated') ?></th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
<?php
if ( isset($_GET['s']) ) {
foreach ( $posts as $post ) :
$class = ('alternate' != $class) ? 'alternate' : ''; ?>
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<th scope="row"><?php echo $post->ID; ?></th>
<td>
<?php echo $pad; ?><?php the_title() ?>
</td>
<td><?php the_author() ?></td>
<td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
<td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
</tr>
</thead>
<tbody>
<?php page_rows($posts, $pagenum, $per_page); ?>
</tbody>
</table>
</form>
<?php
endforeach;
} else {
page_rows();
}
?>
</table>
<div id="ajax-response"></div>
<?php
} else {
?>
</form>
<p><?php _e('No pages found.') ?></p>
<p><?php _e('No pages yet.') ?></p>
<?php
} // end if ($posts)
?>
?>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
</div>
<?php
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) );
if ( $comments ) :
// Make sure comments, post, and post_author are cached
update_comment_cache($comments);
$post = get_post($id);
$authordata = get_userdata($post->post_author);
?>
<br class="clear" />
<table class="widefat" style="margin-top: .5em">
<thead>
<tr>
<th scope="col"><?php _e('Comment') ?></th>
<th scope="col"><?php _e('Date') ?></th>
<th scope="col"><?php _e('Actions') ?></th>
</tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment)
_wp_comment_row( $comment->comment_ID, 'detail', false, false );
?>
</tbody>
</table>
<?php
endif; // comments
endif; // posts;
?>
<h3><a href="page-new.php"><?php _e('Create New Page'); ?> &raquo;</a></h3>
</div>
<?php include('admin-footer.php'); ?>
<?php include('admin-footer.php'); ?>

View File

@@ -1,206 +0,0 @@
<?php if ( ! defined('ABSPATH') ) die(); ?>
<table class="widefat">
<thead>
<tr>
<?php $posts_columns = wp_manage_posts_columns(); ?>
<?php foreach($posts_columns as $post_column_key => $column_display_name) {
if ( 'cb' === $post_column_key )
$class = ' class="check-column"';
elseif ( 'comments' === $post_column_key )
$class = ' class="num"';
else
$class = '';
?>
<th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
if ( have_posts() ) {
$bgcolor = '';
add_filter('the_title','wp_specialchars');
// Create array of post IDs.
$post_ids = array();
foreach ( $wp_query->posts as $a_post )
$post_ids[] = $a_post->ID;
$comment_pending_count = get_pending_comments_num($post_ids);
while (have_posts()) : the_post();
$class = 'alternate' == $class ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
$title = get_the_title();
if ( empty($title) )
$title = __('(no title)');
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
<?php
foreach($posts_columns as $column_name=>$column_display_name) {
switch($column_name) {
case 'cb':
?>
<th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /><?php } ?></th>
<?php
break;
case 'modified':
case 'date':
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
$t_time = $h_time = __('Unpublished');
} else {
if ( 'modified' == $column_name ) {
$t_time = get_the_modified_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_modified;
$time = get_post_modified_time('G', true);
} else {
$t_time = get_the_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_date;
$time = get_post_time('G', true);
}
if ( ( abs(time() - $time) ) < 86400 ) {
if ( ( 'future' == $post->post_status) )
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
else
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
} else {
$h_time = mysql2date(__('Y/m/d'), $m_time);
}
}
?>
<td><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name) ?></abbr></td>
<?php
break;
case 'title':
?>
<td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="post.php?action=edit&amp;post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
<?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td>
<?php
break;
case 'categories':
?>
<td><?php
$categories = get_the_category();
if ( !empty( $categories ) ) {
$out = array();
foreach ( $categories as $c )
$out[] = "<a href='edit.php?category_name=$c->slug'> " . wp_specialchars(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
echo join( ', ', $out );
} else {
_e('Uncategorized');
}
?></td>
<?php
break;
case 'tags':
?>
<td><?php
$tags = get_the_tags();
if ( !empty( $tags ) ) {
$out = array();
foreach ( $tags as $c )
$out[] = "<a href='edit.php?tag=$c->slug'> " . wp_specialchars(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
echo join( ', ', $out );
} else {
_e('No Tags');
}
?></td>
<?php
break;
case 'comments':
?>
<td class="num"><div class="post-com-count-wrapper">
<?php
$left = isset($comment_pending_count) ? $comment_pending_count[$post->ID] : 0;
$pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
if ( $left )
echo '<strong>';
comments_number("<a href='edit.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
if ( $left )
echo '</strong>';
?>
</div></td>
<?php
break;
case 'author':
?>
<td><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>
<?php
break;
case 'status':
?>
<td>
<a href="<?php the_permalink(); ?>" title="<?php echo attribute_escape(sprintf(__('View "%s"'), $title)); ?>" rel="permalink">
<?php
switch ( $post->post_status ) {
case 'publish' :
case 'private' :
_e('Published');
break;
case 'future' :
_e('Scheduled');
break;
case 'pending' :
_e('Pending Review');
break;
case 'draft' :
_e('Unpublished');
break;
}
?>
</a>
</td>
<?php
break;
case 'control_view':
?>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e('View'); ?></a></td>
<?php
break;
case 'control_edit':
?>
<td><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<?php
break;
case 'control_delete':
?>
<td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></td>
<?php
break;
default:
?>
<td><?php do_action('manage_posts_custom_column', $column_name, $id); ?></td>
<?php
break;
}
}
?>
</tr>
<?php
endwhile;
} else {
?>
<tr style='background-color: <?php echo $bgcolor; ?>'>
<td colspan="8"><?php _e('No posts found.') ?></td>
</tr>
<?php
} // end if ( have_posts() )
?>
</tbody>
</table>

View File

@@ -1,41 +0,0 @@
<?php
if ( ! empty($tag_ID) ) {
$heading = __('Edit Tag');
$submit_text = __('Edit Tag');
$form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
$action = 'editedtag';
$nonce_action = 'update-tag_' . $tag_ID;
do_action('edit_tag_form_pre', $tag);
} else {
$heading = __('Add Tag');
$submit_text = __('Add Tag');
$form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">';
$action = 'addtag';
$nonce_action = 'add-tag';
do_action('add_tag_form_pre', $tag);
}
?>
<div class="wrap">
<h2><?php echo $heading ?></h2>
<div id="ajax-response"></div>
<?php echo $form ?>
<input type="hidden" name="action" value="<?php echo $action ?>" />
<input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="name"><?php _e('Tag name') ?></label></th>
<td><input name="name" id="name" type="text" value="<?php echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />
<p><?php _e('The name is how the tag appears on your site.'); ?></p></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th>
<td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
<?php do_action('edit_tag_form', $tag); ?>
</form>
</div>

View File

@@ -1,217 +0,0 @@
<?php
require_once('admin.php');
$title = __('Tags');
$parent_file = 'edit.php';
wp_reset_vars(array('action', 'tag'));
if ( isset($_GET['deleteit']) && isset($_GET['delete_tags']) )
$action = 'bulk-delete';
switch($action) {
case 'addtag':
check_admin_referer('add-tag');
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
$ret = wp_insert_term($_POST['name'], 'post_tag', $_POST);
if ( $ret && !is_wp_error( $ret ) ) {
wp_redirect('edit-tags.php?message=1#addtag');
} else {
wp_redirect('edit-tags.php?message=4#addtag');
}
exit;
break;
case 'delete':
$tag_ID = (int) $_GET['tag_ID'];
check_admin_referer('delete-tag_' . $tag_ID);
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
wp_delete_term( $tag_ID, 'post_tag');
wp_redirect('edit-tags.php?message=2');
exit;
break;
case 'bulk-delete':
check_admin_referer('bulk-tags');
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
$tags = $_GET['delete_tags'];
foreach( (array) $tags as $tag_ID ) {
wp_delete_term( $tag_ID, 'post_tag');
}
$location = 'edit-tags.php';
if ( $referer = wp_get_referer() ) {
if ( false !== strpos($referer, 'edit-tags.php') )
$location = $referer;
}
$location = add_query_arg('message', 6, $location);
wp_redirect($location);
exit;
break;
case 'edit':
require_once ('admin-header.php');
$tag_ID = (int) $_GET['tag_ID'];
$tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit');
include('edit-tag-form.php');
break;
case 'editedtag':
$tag_ID = (int) $_POST['tag_ID'];
check_admin_referer('update-tag_' . $tag_ID);
if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin&#8217; uh?'));
$ret = wp_update_term($tag_ID, 'post_tag', $_POST);
$location = 'edit-tags.php';
if ( $referer = wp_get_original_referer() ) {
if ( false !== strpos($referer, 'edit-tags.php') )
$location = $referer;
}
if ( $ret && !is_wp_error( $ret ) )
$location = add_query_arg('message', 3, $location);
else
$location = add_query_arg('message', 5, $location);
wp_redirect($location);
exit;
break;
default:
if ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
wp_enqueue_script( 'admin-tags' );
wp_enqueue_script('admin-forms');
require_once ('admin-header.php');
$messages[1] = __('Tag added.');
$messages[2] = __('Tag deleted.');
$messages[3] = __('Tag updated.');
$messages[4] = __('Tag not added.');
$messages[5] = __('Tag not updated.');
$messages[6] = __('Tags deleted.');
?>
<?php if (isset($_GET['message'])) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<?php if ( current_user_can('manage_categories') ) : ?>
<h2><?php printf(__('Manage Tags (<a href="%s">add new</a>)'), '#addtag') ?> </h2>
<?php else : ?>
<h2><?php _e('Manage Tags') ?> </h2>
<?php endif; ?>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e( 'Search Tags' ); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php echo attribute_escape(stripslashes($_GET['s'])); ?>" />
<input type="submit" value="<?php _e( 'Search Tags' ); ?>" class="button" />
</p>
<br class="clear" />
<div class="tablenav">
<?php
$pagenum = absint( $_GET['pagenum'] );
if ( empty($pagenum) )
$pagenum = 1;
if( !$tagsperpage || $tagsperpage < 0 )
$tagsperpage = 20;
$page_links = paginate_links( array(
'base' => add_query_arg( 'pagenum', '%#%' ),
'format' => '',
'total' => ceil(wp_count_terms('post_tag') / $tagsperpage),
'current' => $pagenum
));
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-tags'); ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<table class="widefat">
<thead>
<tr>
<th scope="col" class="check-column"><input type="checkbox" /></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col" class="num" style="width: 90px"><?php _e('Posts') ?></th>
</tr>
</thead>
<tbody id="the-list" class="list:tag">
<?php
$searchterms = trim( $_GET['s'] );
$count = tag_rows( $pagenum, $tagsperpage, $searchterms );
?>
</tbody>
</table>
</form>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
</div>
<br class="clear" />
</div>
<?php if ( current_user_can('manage_categories') ) : ?>
<br />
<?php include('edit-tag-form.php'); ?>
<?php endif; ?>
<?php
break;
}
include('admin-footer.php');
?>

View File

@@ -1,244 +1,298 @@
<?php
require_once('admin.php');
// Handle bulk deletes
if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
check_admin_referer('bulk-posts');
foreach( (array) $_GET['delete'] as $post_id_del ) {
$post_del = & get_post($post_id_del);
if ( !current_user_can('delete_post', $post_id_del) )
wp_die( __('You are not allowed to delete this post.') );
if ( $post_del->post_type == 'attachment' ) {
if ( ! wp_delete_attachment($post_id_del) )
wp_die( __('Error in deleting...') );
} else {
if ( !wp_delete_post($post_id_del) )
wp_die( __('Error in deleting...') );
}
}
$sendback = wp_get_referer();
if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php');
elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
wp_redirect($sendback);
exit();
} elseif ( !empty($_GET['_wp_http_referer']) ) {
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
exit;
}
$title = __('Posts');
$parent_file = 'edit.php';
wp_enqueue_script('admin-forms');
list($post_stati, $avail_post_stati) = wp_edit_posts_query();
if ( 1 == count($posts) && is_singular() )
wp_enqueue_script( 'admin-comments' );
require_once('admin-header.php');
if ( !isset( $_GET['paged'] ) )
$_GET['paged'] = 1;
$_GET['m'] = (int) $_GET['m'];
?>
$drafts = get_users_drafts( $user_ID );
$other_drafts = get_others_drafts( $user_ID);
if ($drafts || $other_drafts) {
?>
<div class="wrap">
<?php if ($drafts) { ?>
<p><strong><?php _e('Your Drafts:') ?></strong>
<?php
$i = 0;
foreach ($drafts as $draft) {
if (0 != $i)
echo ', ';
$draft->post_title = stripslashes($draft->post_title);
if ($draft->post_title == '')
$draft->post_title = sprintf(__('Post #%s'), $draft->ID);
echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
++$i;
}
?>
.</p>
<?php } ?>
<?php if ($other_drafts) { ?>
<p><strong><?php _e('Other&#8217;s Drafts:') ?></strong>
<?php
$i = 0;
foreach ($other_drafts as $draft) {
if (0 != $i)
echo ', ';
$draft->post_title = stripslashes($draft->post_title);
if ($draft->post_title == '')
$draft->post_title = sprintf(__('Post #%s'), $draft->ID);
echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
++$i;
}
?>
.</p>
<?php } ?>
</div>
<?php } ?>
<div class="wrap">
<h2>
<?php
$what_to_show = 'posts';
$posts_per_page = 15;
$posts_per_archive_page = -1;
<form id="posts-filter" action="" method="get">
<h2><?php
if ( is_single() ) {
printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title));
wp();
if ( is_month() ) {
single_month_title(' ');
} elseif ( is_search() ) {
printf(__('Search for &#8220;%s&#8221;'), wp_specialchars($_GET['s']) );
} else {
$post_status_label = _c('Manage Posts|manage posts header');
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
$post_status_label = $post_stati[$_GET['post_status']][1];
if ( $post_listing_pageable && !is_archive() && !is_search() )
$h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
if ( is_single() )
printf(__('Comments on %s'), $post->post_title);
elseif ( ! is_paged() || get_query_var('paged') == 1 )
_e('Last 15 Posts');
else
$h2_noun = $post_status_label;
// Use $_GET instead of is_ since they can override each other
$h2_author = '';
$_GET['author'] = (int) $_GET['author'];
if ( $_GET['author'] != 0 ) {
if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion
$h2_author = ' ' . __('by other authors');
} else {
$author_user = get_userdata( get_query_var( 'author' ) );
$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
}
}
$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching &#8220;%s&#8221;'), wp_specialchars( get_search_query() ) ) : '';
$h2_cat = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in &#8220;%s&#8221;'), single_cat_title('', false) ) : '';
$h2_tag = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : '';
$h2_month = isset($_GET['m']) && $_GET['m'] ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : '';
printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month );
}
?></h2>
<ul class="subsubsub">
<?php
$status_links = array();
$num_posts = wp_count_posts( 'post', 'readable' );
$class = empty( $_GET['post_status'] ) ? ' class="current"' : '';
$status_links[] = "<li><a href='edit.php' $class>" . __('All Posts') . '</a>';
foreach ( $post_stati as $status => $label ) {
$class = '';
if ( !in_array( $status, $avail_post_stati ) )
continue;
if ( empty( $num_posts->$status ) )
continue;
if ( $status == $_GET['post_status'] )
$class = ' class="current"';
$status_links[] = "<li><a href='edit.php?post_status=$status' $class>" .
sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
}
echo implode( ' |</li>', $status_links ) . '</li>';
unset( $status_links );
?>
</ul>
<?php if ( isset($_GET['post_status'] ) ) : ?>
<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" />
<?php
endif;
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&amp;post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
endif;
?>
<p id="post-search">
<label class="hidden" for="post-search-input"><?php _e( 'Search Posts' ); ?>:</label>
<input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
<input type="submit" value="<?php _e( 'Search Posts' ); ?>" class="button" />
</p>
<div class="tablenav">
<?php
$page_links = paginate_links( array(
'base' => add_query_arg( 'paged', '%#%' ),
'format' => '',
'total' => $wp_query->max_num_pages,
'current' => $_GET['paged']
));
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<div class="alignleft">
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
<?php wp_nonce_field('bulk-posts'); ?>
<?php
if ( !is_singular() ) {
$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC";
$arc_result = $wpdb->get_results( $arc_query );
$month_count = count($arc_result);
if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
<select name='m'>
<option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
<?php
foreach ($arc_result as $arc_row) {
if ( $arc_row->yyear == 0 )
continue;
$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
$default = ' selected="selected"';
else
$default = '';
echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
echo "</option>\n";
_e('Previous Posts');
}
?>
</select>
<?php } ?>
<?php
$dropdown_options = array('show_option_all' => __('View all categories'), 'hide_empty' => 0, 'hierarchical' => 1,
'show_count' => 0, 'orderby' => 'name', 'selected' => $cat);
wp_dropdown_categories($dropdown_options);
do_action('restrict_manage_posts');
?>
<input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" />
<?php } ?>
</div>
<br class="clear" />
</div>
<br class="clear" />
<?php include( 'edit-post-rows.php' ); ?>
</h2>
<form name="searchform" action="" method="get" style="float: left; width: 16em; margin-right: 3em;">
<fieldset>
<legend><?php _e('Search Posts&hellip;') ?></legend>
<input type="text" name="s" value="<?php if (isset($s)) echo wp_specialchars($s, 1); ?>" size="17" />
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
</fieldset>
</form>
<?php $arc_result = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_date != '0000-00-00 00:00:00' ORDER BY post_date DESC");
if ( count($arc_result) ) { ?>
<form name="viewarc" action="" method="get" style="float: left; width: 20em; margin-bottom: 1em;">
<fieldset>
<legend><?php _e('Browse Month&hellip;') ?></legend>
<select name='m'>
<?php
foreach ($arc_result as $arc_row) {
$arc_year = $arc_row->yyear;
$arc_month = $arc_row->mmonth;
if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == (int) $_GET['m'] )
$default = 'selected="selected"';
else
$default = null;
echo "<option $default value=\"" . $arc_year.zeroise($arc_month, 2) . '">';
echo $month[zeroise($arc_month, 2)] . " $arc_year";
echo "</option>\n";
}
?>
</select>
<input type="submit" name="submit" value="<?php _e('Show Month') ?>" />
</fieldset>
</form>
<?php } ?>
<br style="clear:both;" />
<?php
// define the columns to display, the syntax is 'internal name' => 'display name'
$posts_columns = array(
'id' => __('ID'),
'date' => __('When'),
'title' => __('Title'),
'categories' => __('Categories'),
'comments' => __('Comments'),
'author' => __('Author')
);
$posts_columns = apply_filters('manage_posts_columns', $posts_columns);
// you can not edit these at the moment
$posts_columns['control_view'] = '';
$posts_columns['control_edit'] = '';
$posts_columns['control_delete'] = '';
?>
<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
<tr>
<?php foreach($posts_columns as $column_display_name) { ?>
<th scope="col"><?php echo $column_display_name; ?></th>
<?php } ?>
</tr>
<?php
if ($posts) {
$bgcolor = '';
foreach ($posts as $post) { start_wp();
$class = ('alternate' == $class) ? '' : 'alternate';
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<?php
foreach($posts_columns as $column_name=>$column_display_name) {
switch($column_name) {
case 'id':
?>
<th scope="row"><?php echo $id ?></th>
<?php
break;
case 'date':
?>
<td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
<?php
break;
case 'title':
?>
<td><?php the_title() ?>
<?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
<?php
break;
case 'categories':
?>
<td><?php the_category(','); ?></td>
<?php
break;
case 'comments':
?>
<td><a href="edit.php?p=<?php echo $id ?>&amp;c=1">
<?php comments_number(__('0'), __('1'), __('%')) ?>
</a></td>
<?php
break;
case 'author':
?>
<td><?php the_author() ?></td>
<?php
break;
case 'control_view':
?>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
<?php
break;
case 'control_edit':
?>
<td><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
<?php
break;
case 'control_delete':
?>
<td><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post &quot;%s&quot;.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('', ''), 1) ) . "' );\">" . __('Delete') . "</a>"; } ?></td>
<?php
break;
default:
?>
<td><?php do_action('manage_posts_custom_column', $column_name, $id); ?></td>
<?php
break;
}
}
?>
</tr>
<?php
}
} else {
?>
<tr style='background-color: <?php echo $bgcolor; ?>'>
<td colspan="8"><?php _e('No posts found.') ?></td>
</tr>
<?php
} // end if ($posts)
?>
</table>
<div id="ajax-response"></div>
<div class="tablenav">
<?php
if ( $page_links )
echo "<div class='tablenav-pages'>$page_links</div>";
?>
<br class="clear" />
<div class="navigation">
<div class="alignleft"><?php next_posts_link(__('&laquo; Previous Entries')) ?></div>
<div class="alignright"><?php previous_posts_link(__('Next Entries &raquo;')) ?></div>
</div>
<br class="clear" />
<?php
if ( 1 == count($posts) ) {
if ( 1 == count($posts) && is_singular() ) :
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
if ($comments) {
?>
<h3><?php _e('Comments') ?></h3>
<ol id="comments">
<?php
foreach ($comments as $comment) {
$comment_status = wp_get_comment_status($comment->comment_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 ) :
// Make sure comments, post, and post_author are cached
update_comment_cache($comments);
$post = get_post($id);
$authordata = get_userdata($post->post_author);
<li <?php if ("unapproved" == $comment_status) echo "class='unapproved'"; ?> >
<?php comment_date('Y-n-j') ?>
@
<?php comment_time('g:m:s a') ?>
<?php
if ( current_user_can('edit_post', $post->ID) ) {
echo "[ <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" . __('Edit') . "</a>";
echo " - <a href=\"post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> ";
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
if ('approved' == wp_get_comment_status($comment->comment_ID)) {
echo " - <a href=\"post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> ";
} else {
echo " - <a href=\"post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">" . __('Approve') . "</a> ";
}
}
echo "]";
} // end if any comments to show
?>
<br />
<strong>
<?php comment_author() ?>
(
<?php comment_author_email_link() ?>
/
<?php comment_author_url_link() ?>
)</strong> (IP:
<?php comment_author_IP() ?>
)
<?php comment_text() ?>
</li>
<!-- /comment -->
<?php //end of the loop, don't delete
} // end foreach
echo '</ol>';
}//end if comments
?>
<br class="clear" />
<table class="widefat" style="margin-top: .5em">
<thead>
<tr>
<th scope="col"><?php _e('Comment') ?></th>
<th scope="col"><?php _e('Date') ?></th>
<th scope="col"><?php _e('Actions') ?></th>
</tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
foreach ($comments as $comment)
_wp_comment_row( $comment->comment_ID, 'detail', false, false );
?>
</tbody>
</table>
<?php
endif; // comments
endif; // posts;
?>
</div>
<?php include('admin-footer.php'); ?>
<?php } ?>
</div>
<?php
include('admin-footer.php');
?>

View File

@@ -0,0 +1,30 @@
<?php
require_once('../wp-config.php');
register_shutdown_function('execute_all_pings');
//execute_all_pings();
function execute_all_pings() {
global $wpdb;
// Do pingbacks
while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';");
pingback($ping->post_content, $ping->ID);
echo "Pingback: $ping->post_title : $ping->ID<br/>";
}
// Do Enclosures
while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';");
do_enclose($enclosure->post_content, $enclosure->ID);
echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>";
}
// Do Trackbacks
while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
echo "Trackback : $trackback->ID<br/>";
do_trackbacks($trackback->ID);
}
}
_e('Done.');
?>

View File

@@ -1,50 +0,0 @@
<?php
require_once ('admin.php');
require_once('includes/export.php');
$title = __('Export');
$parent_file = 'edit.php';
if ( isset( $_GET['download'] ) ) {
export_wp( $_GET['author'] );
die();
}
require_once ('admin-header.php');
?>
<div class="wrap">
<h2><?php _e('Export'); ?></h2>
<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>
<form action="" method="get">
<h3><?php _e('Options'); ?></h3>
<table class="form-table">
<tr>
<th><label for="author"><?php _e('Restrict Author'); ?></label></th>
<td>
<select name="author" id="author">
<option value="all" selected="selected"><?php _e('All Authors'); ?></option>
<?php
$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
foreach ( $authors as $id ) {
$o = get_userdata( $id );
echo "<option value='$o->ID'>$o->display_name</option>";
}
?>
</select>
</td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" value="<?php _e('Download Export File'); ?>" />
<input type="hidden" name="download" value="true" />
</p>
</form>
</div>
<?php
include ('admin-footer.php');
?>

View File

@@ -1,209 +0,0 @@
<?php
define( 'ABSPATH', dirname(dirname(__FILE__)) );
define( 'WPINC', '/wp-includes' );
function __() {}
function add_filter() {}
function attribute_escape() {}
function apply_filters() {}
function get_option() {}
function is_lighttpd_before_150() {}
function add_action() {}
function do_action_ref_array() {}
function get_bloginfo() {}
function is_admin() {return true;}
function site_url() {}
function admin_url() {}
function wp_guess_url() {}
require(ABSPATH . '/wp-includes/script-loader.php');
require(ABSPATH . '/wp-includes/version.php');
$wp_scripts = new WP_Scripts();
wp_default_scripts($wp_scripts);
$wp_styles = new WP_Styles();
wp_default_styles($wp_styles);
$defaults = $man_version = '';
foreach ( $wp_scripts->registered as $script ) {
if ( empty($script->src) || strpos($script->src, 'tiny_mce_config.php') ) continue;
$ver = empty($script->ver) ? $wp_version : $script->ver;
$src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $script->src );
$defaults .= '{ "url" : "' . $src . '?ver=' . $ver . '" },' . "\n";
$man_version .= $ver;
}
foreach ( $wp_styles->registered as $style ) {
if ( empty($style->src) ) continue;
$ver = empty($style->ver) ? $wp_version : $style->ver;
$src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->src );
if ( 'colors' == $style->handle ) $src = 'css/colors-classic.css';
$defaults .= '{ "url" : "' . $src . '?ver=' . $ver . '" },' . "\n";
if ( isset($style->extra['rtl']) && $style->extra['rtl'] ) {
if ( is_bool( $style->extra['rtl'] ) )
$rtl_href = str_replace( '.css', '-rtl.css', $src );
else
$rtl_href = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->extra['rtl'] );
$defaults .= '{ "url" : "' . $rtl_href . '?ver=' . $ver . '" },' . "\n";
}
$man_version .= $ver;
}
$man_version = md5($man_version);
header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
header( 'Pragma: no-cache' );
header( 'Content-Type: application/x-javascript; charset=UTF-8' );
?>
{
"betaManifestVersion" : 1,
"version" : "<?php echo $man_version; ?>_20080810",
"entries" : [
<?php echo $defaults; ?>
{ "url" : "images/align-center.png" },
{ "url" : "images/align-left.png" },
{ "url" : "images/align-none.png" },
{ "url" : "images/align-right.png" },
{ "url" : "images/browse-happy.gif" },
{ "url" : "images/bubble_bg.gif" },
{ "url" : "images/comment-grey-bubble.png" },
{ "url" : "images/comment-pill.gif" },
{ "url" : "images/comment-stalk-classic.gif" },
{ "url" : "images/comment-stalk-fresh.gif" },
{ "url" : "images/comment-stalk-rtl.gif" },
{ "url" : "images/date-button.gif" },
{ "url" : "images/fade-butt.png" },
{ "url" : "images/gear.png" },
{ "url" : "images/logo-ghost.png" },
{ "url" : "images/logo-login.gif" },
{ "url" : "images/logo.gif" },
{ "url" : "images/media-button-gallery.gif" },
{ "url" : "images/media-button-image.gif" },
{ "url" : "images/media-button-music.gif" },
{ "url" : "images/media-button-other.gif" },
{ "url" : "images/media-button-video.gif" },
{ "url" : "images/media-buttons.gif" },
{ "url" : "images/tab.png" },
{ "url" : "images/tail.gif" },
{ "url" : "images/toggle-arrow-rtl.gif" },
{ "url" : "images/toggle-arrow.gif" },
{ "url" : "images/wordpress-logo.png" },
{ "url" : "images/xit.gif" },
{ "url" : "images/loading-publish.gif" },
{ "url" : "images/loading.gif" },
{ "url" : "images/required.gif" },
{ "url" : "images/no.png" },
{ "url" : "images/yes.png" },
<?php if ( is_file(ABSPATH.'/wp-includes/js/tinymce/tiny_mce.js') ) { ?>
{ "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311g" },
{ "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311g" },
{ "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311g" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/fm.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/img/sflogo.png" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif" },
{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/flash.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/flv_player.swf" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/quicktime.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/realmedia.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/shockwave.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/media/img/trans.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/more.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/page.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/image.png" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/help.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/image.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/media.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/video.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" },
<?php } ?>
{ "url" : "../wp-includes/images/crystal/archive.png" },
{ "url" : "../wp-includes/images/crystal/audio.png" },
{ "url" : "../wp-includes/images/crystal/code.png" },
{ "url" : "../wp-includes/images/crystal/default.png" },
{ "url" : "../wp-includes/images/crystal/document.png" },
{ "url" : "../wp-includes/images/crystal/interactive.png" },
{ "url" : "../wp-includes/images/crystal/text.png" },
{ "url" : "../wp-includes/images/crystal/video.png" },
{ "url" : "../wp-includes/images/crystal/spreadsheet.png" },
{ "url" : "../wp-includes/images/rss.png" },
{ "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" },
{ "url" : "../wp-includes/js/thickbox/tb-close.png" },
{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }
]}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

BIN
wp-admin/images/box-bg.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

BIN
wp-admin/images/notice.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 B

BIN
wp-admin/images/toggle.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

View File

@@ -1,30 +1,28 @@
<?php
require_once ('admin.php');
$title = __('Import');
$parent_file = 'edit.php';
$parent_file = 'import.php';
require_once ('admin-header.php');
?>
<div class="wrap">
<h2><?php _e('Import'); ?></h2>
<p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p>
<p><?php _e('If you have posts or comments in another system WordPress can import them into your current blog. To get started, choose a system to import from below:'); ?></p>
<?php
// Load all importers so that they can register.
$import_loc = 'wp-admin/import';
$import_root = ABSPATH.$import_loc;
$imports_dir = @ opendir($import_root);
$imports_dir = @ dir($import_root);
if ($imports_dir) {
while (($file = readdir($imports_dir)) !== false) {
if ($file{0} == '.') {
while (($file = $imports_dir->read()) !== false) {
if (preg_match('|^\.+$|', $file))
continue;
} elseif (substr($file, -4) == '.php') {
require_once($import_root . '/' . $file);
}
if (preg_match('|\.php$|', $file))
require_once("$import_root/$file");
}
}
@closedir($imports_dir);
$importers = get_importers();
@@ -32,20 +30,20 @@ if (empty ($importers)) {
echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful
} else {
?>
<table class="widefat">
<table width="100%" cellpadding="3" cellspacing="3">
<?php
$style = '';
foreach ($importers as $id => $data) {
$style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate';
$action = "<a href='admin.php?import=$id' title='".wptexturize(strip_tags($data[1]))."'>{$data[0]}</a>";
$action = "<a href='admin.php?import=$id' title='{$data[1]}'>{$data[0]}</a>";
if ($style != '')
$style = 'class="'.$style.'"';
echo "
<tr $style>
<td class='import-system row-title'>$action</td>
<td class='desc'>{$data[1]}</td>
<td class=\"togl\">$action</td>
<td class=\"desc\">{$data[1]}</td>
</tr>";
}
?>

0
wp-admin/import/b2.php Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,201 +0,0 @@
<?php
/* By Shayne Sweeney - http://www.theshayne.com/ */
class BW_Import {
var $file;
function header() {
echo '<div class="wrap">';
echo '<h2>'.__('Import Blogware').'</h2>';
}
function footer() {
echo '</div>';
}
function unhtmlentities($string) { // From php.net for < 4.3 compat
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}
function greet() {
echo '<div class="narrow">';
echo '<p>'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'</p>';
wp_import_upload_form("admin.php?import=blogware&amp;step=1");
echo '</div>';
}
function import_posts() {
global $wpdb, $current_user;
set_magic_quotes_runtime(0);
$importdata = file($this->file); // Read the file into an array
$importdata = implode('', $importdata); // squish it
$importdata = str_replace(array ("\r\n", "\r"), "\n", $importdata);
preg_match_all('|(<item[^>]+>(.*?)</item>)|is', $importdata, $posts);
$posts = $posts[1];
unset($importdata);
echo '<ol>';
foreach ($posts as $post) {
flush();
preg_match('|<item type=\"(.*?)\">|is', $post, $post_type);
$post_type = $post_type[1];
if($post_type == "photo") {
preg_match('|<photoFilename>(.*?)</photoFilename>|is', $post, $post_title);
} else {
preg_match('|<title>(.*?)</title>|is', $post, $post_title);
}
$post_title = $wpdb->escape(trim($post_title[1]));
preg_match('|<pubDate>(.*?)</pubDate>|is', $post, $post_date);
$post_date = strtotime($post_date[1]);
$post_date = gmdate('Y-m-d H:i:s', $post_date);
preg_match_all('|<category>(.*?)</category>|is', $post, $categories);
$categories = $categories[1];
$cat_index = 0;
foreach ($categories as $category) {
$categories[$cat_index] = $wpdb->escape($this->unhtmlentities($category));
$cat_index++;
}
if(strcasecmp($post_type, "photo") === 0) {
preg_match('|<sizedPhotoUrl>(.*?)</sizedPhotoUrl>|is', $post, $post_content);
$post_content = '<img src="'.trim($post_content[1]).'" />';
$post_content = $this->unhtmlentities($post_content);
} else {
preg_match('|<body>(.*?)</body>|is', $post, $post_content);
$post_content = str_replace(array ('<![CDATA[', ']]>'), '', trim($post_content[1]));
$post_content = $this->unhtmlentities($post_content);
}
// Clean up content
$post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('<br>', '<br />', $post_content);
$post_content = str_replace('<hr>', '<hr />', $post_content);
$post_content = $wpdb->escape($post_content);
$post_author = $current_user->ID;
preg_match('|<postStatus>(.*?)</postStatus>|is', $post, $post_status);
$post_status = trim($post_status[1]);
echo '<li>';
if ($post_id = post_exists($post_title, $post_content, $post_date)) {
printf(__('Post <em>%s</em> already exists.'), stripslashes($post_title));
} else {
printf(__('Importing post <em>%s</em>...'), stripslashes($post_title));
$postdata = compact('post_author', 'post_date', 'post_content', 'post_title', 'post_status');
$post_id = wp_insert_post($postdata);
if ( is_wp_error( $post_id ) ) {
return $post_id;
}
if (!$post_id) {
_e("Couldn't get post ID");
echo '</li>';
break;
}
if(0 != count($categories))
wp_create_categories($categories, $post_id);
}
preg_match_all('|<comment>(.*?)</comment>|is', $post, $comments);
$comments = $comments[1];
if ( $comments ) {
$comment_post_ID = (int) $post_id;
$num_comments = 0;
foreach ($comments as $comment) {
preg_match('|<body>(.*?)</body>|is', $comment, $comment_content);
$comment_content = str_replace(array ('<![CDATA[', ']]>'), '', trim($comment_content[1]));
$comment_content = $this->unhtmlentities($comment_content);
// Clean up content
$comment_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);
$comment_content = str_replace('<br>', '<br />', $comment_content);
$comment_content = str_replace('<hr>', '<hr />', $comment_content);
$comment_content = $wpdb->escape($comment_content);
preg_match('|<pubDate>(.*?)</pubDate>|is', $comment, $comment_date);
$comment_date = trim($comment_date[1]);
$comment_date = date('Y-m-d H:i:s', strtotime($comment_date));
preg_match('|<author>(.*?)</author>|is', $comment, $comment_author);
$comment_author = $wpdb->escape(trim($comment_author[1]));
$comment_author_email = NULL;
$comment_approved = 1;
// Check if it's already there
if (!comment_exists($comment_author, $comment_date)) {
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_date', 'comment_content', 'comment_approved');
$commentdata = wp_filter_comment($commentdata);
wp_insert_comment($commentdata);
$num_comments++;
}
}
}
if ( $num_comments ) {
echo ' ';
printf( __ngettext('%s comment', '%s comments', $num_comments), $num_comments );
}
echo '</li>';
flush();
ob_flush();
}
echo '</ol>';
}
function import() {
$file = wp_import_handle_upload();
if ( isset($file['error']) ) {
echo $file['error'];
return;
}
$this->file = $file['file'];
$result = $this->import_posts();
if ( is_wp_error( $result ) )
return $result;
wp_import_cleanup($file['id']);
do_action('import_done', 'blogware');
echo '<h3>';
printf(__('All done. <a href="%s">Have fun!</a>'), get_option('home'));
echo '</h3>';
}
function dispatch() {
if (empty ($_GET['step']))
$step = 0;
else
$step = (int) $_GET['step'];
$this->header();
switch ($step) {
case 0 :
$this->greet();
break;
case 1 :
$result = $this->import();
if ( is_wp_error( $result ) )
$result->get_error_message();
break;
}
$this->footer();
}
function BW_Import() {
// Nothing.
}
}
$blogware_import = new BW_Import();
register_importer('blogware', __('Blogware'), __('Import posts from Blogware.'), array ($blogware_import, 'dispatch'));
?>

Some files were not shown because too many files have changed in this diff Show More