Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert 16805 that was so not what I meant to do

git-svn-id: https://core.svn.wordpress.org/tags/3.0.2@16806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 1bb22fdc94f24cc53af537f56487b2af4fc5d74f 1 parent 2b7e4e0
Peter Westwood westi authored

Showing 753 changed files with 0 additions and 35,368 deletions. Show diff stats Hide diff stats

  1. +0 18 3.0/index.php
  2. +0 281 3.0/license.txt
  3. +0 109 3.0/readme.html
  4. +0 104 3.0/wp-activate.php
  5. +0 1,535 3.0/wp-admin/admin-ajax.php
  6. +0 43 3.0/wp-admin/admin-footer.php
  7. +0 16 3.0/wp-admin/admin-functions.php
  8. +0 157 3.0/wp-admin/admin-header.php
  9. +0 33 3.0/wp-admin/admin-post.php
  10. +0 218 3.0/wp-admin/admin.php
  11. +0 63 3.0/wp-admin/async-upload.php
  12. +0 288 3.0/wp-admin/comment.php
  13. +0 1  3.0/wp-admin/css/colors-classic-rtl.css
  14. +0 79 3.0/wp-admin/css/colors-classic-rtl.dev.css
  15. +0 1  3.0/wp-admin/css/colors-classic.css
  16. +0 1,729 3.0/wp-admin/css/colors-classic.dev.css
  17. +0 1  3.0/wp-admin/css/colors-fresh-rtl.css
  18. +0 78 3.0/wp-admin/css/colors-fresh-rtl.dev.css
  19. +0 1  3.0/wp-admin/css/colors-fresh.css
  20. +0 1,696 3.0/wp-admin/css/colors-fresh.dev.css
  21. +0 1  3.0/wp-admin/css/dashboard-rtl.css
  22. +0 110 3.0/wp-admin/css/dashboard-rtl.dev.css
  23. +0 1  3.0/wp-admin/css/dashboard.css
  24. +0 405 3.0/wp-admin/css/dashboard.dev.css
  25. +0 7 3.0/wp-admin/css/farbtastic-rtl.css
  26. +0 32 3.0/wp-admin/css/farbtastic.css
  27. +0 1  3.0/wp-admin/css/global-rtl.css
  28. +0 83 3.0/wp-admin/css/global-rtl.dev.css
  29. +0 1  3.0/wp-admin/css/global.css
  30. +0 486 3.0/wp-admin/css/global.dev.css
  31. +0 1  3.0/wp-admin/css/ie-rtl.css
  32. +0 156 3.0/wp-admin/css/ie-rtl.dev.css
  33. +0 1  3.0/wp-admin/css/ie.css
  34. +0 464 3.0/wp-admin/css/ie.dev.css
  35. +0 1  3.0/wp-admin/css/install-rtl.css
  36. +0 23 3.0/wp-admin/css/install-rtl.dev.css
  37. +0 1  3.0/wp-admin/css/install.css
  38. +0 212 3.0/wp-admin/css/install.dev.css
  39. +0 1  3.0/wp-admin/css/login-rtl.css
  40. +0 29 3.0/wp-admin/css/login-rtl.dev.css
  41. +0 1  3.0/wp-admin/css/login.css
  42. +0 139 3.0/wp-admin/css/login.dev.css
  43. +0 1  3.0/wp-admin/css/media-rtl.css
  44. +0 85 3.0/wp-admin/css/media-rtl.dev.css
  45. +0 1  3.0/wp-admin/css/media.css
  46. +0 383 3.0/wp-admin/css/media.dev.css
  47. +0 1  3.0/wp-admin/css/ms.css
  48. +0 44 3.0/wp-admin/css/ms.dev.css
  49. +0 1  3.0/wp-admin/css/nav-menu-rtl.css
  50. +0 206 3.0/wp-admin/css/nav-menu-rtl.dev.css
  51. +0 1  3.0/wp-admin/css/nav-menu.css
  52. +0 570 3.0/wp-admin/css/nav-menu.dev.css
  53. +0 1  3.0/wp-admin/css/plugin-install-rtl.css
  54. +0 43 3.0/wp-admin/css/plugin-install-rtl.dev.css
  55. +0 1  3.0/wp-admin/css/plugin-install.css
  56. +0 157 3.0/wp-admin/css/plugin-install.dev.css
  57. +0 1  3.0/wp-admin/css/press-this-rtl.css
  58. +0 130 3.0/wp-admin/css/press-this-rtl.dev.css
  59. +0 1  3.0/wp-admin/css/press-this.css
  60. +0 618 3.0/wp-admin/css/press-this.dev.css
  61. +0 1  3.0/wp-admin/css/theme-editor-rtl.css
  62. +0 3  3.0/wp-admin/css/theme-editor-rtl.dev.css
  63. +0 1  3.0/wp-admin/css/theme-editor.css
  64. +0 72 3.0/wp-admin/css/theme-editor.dev.css
  65. +0 1  3.0/wp-admin/css/theme-install.css
  66. +0 145 3.0/wp-admin/css/theme-install.dev.css
  67. +0 1  3.0/wp-admin/css/widgets-rtl.css
  68. +0 10 3.0/wp-admin/css/widgets-rtl.dev.css
  69. +0 1  3.0/wp-admin/css/widgets.css
  70. +0 370 3.0/wp-admin/css/widgets.dev.css
  71. +0 1  3.0/wp-admin/css/wp-admin-rtl.css
  72. +0 672 3.0/wp-admin/css/wp-admin-rtl.dev.css
  73. +0 1  3.0/wp-admin/css/wp-admin.css
  74. +0 3,766 3.0/wp-admin/css/wp-admin.dev.css
  75. +0 359 3.0/wp-admin/custom-background.php
  76. +0 721 3.0/wp-admin/custom-header.php
  77. +0 239 3.0/wp-admin/edit-attachment-rows.php
  78. +0 490 3.0/wp-admin/edit-comments.php
  79. +0 317 3.0/wp-admin/edit-form-advanced.php
  80. +0 147 3.0/wp-admin/edit-form-comment.php
  81. +0 237 3.0/wp-admin/edit-link-categories.php
  82. +0 92 3.0/wp-admin/edit-link-category-form.php
  83. +0 127 3.0/wp-admin/edit-link-form.php
  84. +0 34 3.0/wp-admin/edit-post-rows.php
  85. +0 80 3.0/wp-admin/edit-tag-form.php
  86. +0 451 3.0/wp-admin/edit-tags.php
  87. +0 466 3.0/wp-admin/edit.php
  88. +0 149 3.0/wp-admin/export.php
  89. +0 51 3.0/wp-admin/gears-manifest.php
  90. BIN  3.0/wp-admin/images/align-center.png
  91. BIN  3.0/wp-admin/images/align-left.png
  92. BIN  3.0/wp-admin/images/align-none.png
  93. BIN  3.0/wp-admin/images/align-right.png
  94. BIN  3.0/wp-admin/images/archive-link.png
  95. BIN  3.0/wp-admin/images/blue-grad.png
  96. BIN  3.0/wp-admin/images/bubble_bg-rtl.gif
  97. BIN  3.0/wp-admin/images/bubble_bg.gif
  98. BIN  3.0/wp-admin/images/button-grad-active-vs.png
  99. BIN  3.0/wp-admin/images/button-grad-active.png
  100. BIN  3.0/wp-admin/images/button-grad-vs.png
  101. BIN  3.0/wp-admin/images/button-grad.png
  102. BIN  3.0/wp-admin/images/comment-grey-bubble.png
  103. BIN  3.0/wp-admin/images/date-button.gif
  104. BIN  3.0/wp-admin/images/ed-bg-vs.gif
  105. BIN  3.0/wp-admin/images/ed-bg.gif
  106. BIN  3.0/wp-admin/images/fade-butt.png
  107. BIN  3.0/wp-admin/images/fav-arrow-rtl.gif
  108. BIN  3.0/wp-admin/images/fav-arrow-vs-rtl.gif
  109. BIN  3.0/wp-admin/images/fav-arrow-vs.gif
  110. BIN  3.0/wp-admin/images/fav-arrow.gif
  111. BIN  3.0/wp-admin/images/fav-top-vs.gif
  112. BIN  3.0/wp-admin/images/fav-vs.png
  113. BIN  3.0/wp-admin/images/fav.png
  114. BIN  3.0/wp-admin/images/generic.png
  115. BIN  3.0/wp-admin/images/gray-grad.png
  116. BIN  3.0/wp-admin/images/icons32-vs.png
  117. BIN  3.0/wp-admin/images/icons32.png
  118. BIN  3.0/wp-admin/images/imgedit-icons.png
  119. BIN  3.0/wp-admin/images/list-vs.png
  120. BIN  3.0/wp-admin/images/list.png
  121. BIN  3.0/wp-admin/images/loading-publish.gif
  122. BIN  3.0/wp-admin/images/loading.gif
  123. BIN  3.0/wp-admin/images/logo-ghost.png
  124. BIN  3.0/wp-admin/images/logo-login.gif
  125. BIN  3.0/wp-admin/images/logo.gif
  126. BIN  3.0/wp-admin/images/marker.png
  127. BIN  3.0/wp-admin/images/mask.png
  128. BIN  3.0/wp-admin/images/media-button-image.gif
  129. BIN  3.0/wp-admin/images/media-button-music.gif
  130. BIN  3.0/wp-admin/images/media-button-other.gif
  131. BIN  3.0/wp-admin/images/media-button-video.gif
  132. BIN  3.0/wp-admin/images/menu-arrows.gif
  133. BIN  3.0/wp-admin/images/menu-bits-rtl-vs.gif
  134. BIN  3.0/wp-admin/images/menu-bits-rtl.gif
  135. BIN  3.0/wp-admin/images/menu-bits-vs.gif
  136. BIN  3.0/wp-admin/images/menu-bits.gif
  137. BIN  3.0/wp-admin/images/menu-dark-rtl.gif
  138. BIN  3.0/wp-admin/images/menu-dark.gif
  139. BIN  3.0/wp-admin/images/menu-vs.png
  140. BIN  3.0/wp-admin/images/menu.png
  141. BIN  3.0/wp-admin/images/no.png
  142. BIN  3.0/wp-admin/images/required.gif
  143. BIN  3.0/wp-admin/images/resize.gif
  144. BIN  3.0/wp-admin/images/screen-options-right-up.gif
  145. BIN  3.0/wp-admin/images/screen-options-right.gif
  146. BIN  3.0/wp-admin/images/se.png
  147. BIN  3.0/wp-admin/images/star.gif
  148. BIN  3.0/wp-admin/images/toggle-arrow-rtl.gif
  149. BIN  3.0/wp-admin/images/toggle-arrow.gif
  150. BIN  3.0/wp-admin/images/visit-site-button-grad-vs.gif
  151. BIN  3.0/wp-admin/images/visit-site-button-grad.gif
  152. BIN  3.0/wp-admin/images/wheel.png
  153. BIN  3.0/wp-admin/images/white-grad-active.png
  154. BIN  3.0/wp-admin/images/white-grad.png
  155. BIN  3.0/wp-admin/images/widgets-arrow.gif
  156. BIN  3.0/wp-admin/images/wordpress-logo.png
  157. BIN  3.0/wp-admin/images/wp-logo-vs.png
  158. BIN  3.0/wp-admin/images/wp-logo.png
  159. BIN  3.0/wp-admin/images/wpspin_dark.gif
  160. BIN  3.0/wp-admin/images/wpspin_light.gif
  161. BIN  3.0/wp-admin/images/xit.gif
  162. BIN  3.0/wp-admin/images/yes.png
  163. +0 141 3.0/wp-admin/import.php
  164. +0 63 3.0/wp-admin/includes/admin.php
  165. +0 268 3.0/wp-admin/includes/bookmark.php
  166. +0 190 3.0/wp-admin/includes/class-ftp-pure.php
  167. +0 250 3.0/wp-admin/includes/class-ftp-sockets.php
  168. +0 906 3.0/wp-admin/includes/class-ftp.php
  169. +0 5,687 3.0/wp-admin/includes/class-pclzip.php
  170. +0 321 3.0/wp-admin/includes/class-wp-filesystem-base.php
  171. +0 361 3.0/wp-admin/includes/class-wp-filesystem-direct.php
  172. +0 387 3.0/wp-admin/includes/class-wp-filesystem-ftpext.php
  173. +0 327 3.0/wp-admin/includes/class-wp-filesystem-ftpsockets.php
  174. +0 383 3.0/wp-admin/includes/class-wp-filesystem-ssh2.php
  175. +0 311 3.0/wp-admin/includes/class-wp-importer.php
  176. +0 1,455 3.0/wp-admin/includes/class-wp-upgrader.php
  177. +0 167 3.0/wp-admin/includes/comment.php
  178. +0 493 3.0/wp-admin/includes/continents-cities.php
  179. +0 1,042 3.0/wp-admin/includes/dashboard.php
  180. +0 200 3.0/wp-admin/includes/deprecated.php
  181. +0 409 3.0/wp-admin/includes/export.php
  182. +0 1,050 3.0/wp-admin/includes/file.php
  183. +0 667 3.0/wp-admin/includes/image-edit.php
  184. +0 341 3.0/wp-admin/includes/image.php
  185. +0 92 3.0/wp-admin/includes/import.php
Sorry, we could not display the entire diff because too many files (753) changed.
18 3.0/index.php
... ... @@ -1,18 +0,0 @@
1   -<?php
2   -/**
3   - * Front to the WordPress application. This file doesn't do anything, but loads
4   - * wp-blog-header.php which does and tells WordPress to load the theme.
5   - *
6   - * @package WordPress
7   - */
8   -
9   -/**
10   - * Tells WordPress to load the WordPress theme and output it.
11   - *
12   - * @var bool
13   - */
14   -define('WP_USE_THEMES', true);
15   -
16   -/** Loads the WordPress Environment and Template */
17   -require('./wp-blog-header.php');
18   -?>
281 3.0/license.txt
... ... @@ -1,281 +0,0 @@
1   - GNU GENERAL PUBLIC LICENSE
2   - Version 2, June 1991
3   -
4   - Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5   - 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
6   -
7   - Everyone is permitted to copy and distribute verbatim copies
8   - of this license document, but changing it is not allowed.
9   -
10   - Preamble
11   -
12   - The licenses for most software are designed to take away your
13   -freedom to share and change it. By contrast, the GNU General Public
14   -License is intended to guarantee your freedom to share and change free
15   -software--to make sure the software is free for all its users. This
16   -General Public License applies to most of the Free Software
17   -Foundation's software and to any other program whose authors commit to
18   -using it. (Some other Free Software Foundation software is covered by
19   -the GNU Library General Public License instead.) You can apply it to
20   -your programs, too.
21   -
22   - When we speak of free software, we are referring to freedom, not
23   -price. Our General Public Licenses are designed to make sure that you
24   -have the freedom to distribute copies of free software (and charge for
25   -this service if you wish), that you receive source code or can get it
26   -if you want it, that you can change the software or use pieces of it
27   -in new free programs; and that you know you can do these things.
28   -
29   - To protect your rights, we need to make restrictions that forbid
30   -anyone to deny you these rights or to ask you to surrender the rights.
31   -These restrictions translate to certain responsibilities for you if you
32   -distribute copies of the software, or if you modify it.
33   -
34   - For example, if you distribute copies of such a program, whether
35   -gratis or for a fee, you must give the recipients all the rights that
36   -you have. You must make sure that they, too, receive or can get the
37   -source code. And you must show them these terms so they know their
38   -rights.
39   -
40   - We protect your rights with two steps: (1) copyright the software, and
41   -(2) offer you this license which gives you legal permission to copy,
42   -distribute and/or modify the software.
43   -
44   - Also, for each author's protection and ours, we want to make certain
45   -that everyone understands that there is no warranty for this free
46   -software. If the software is modified by someone else and passed on, we
47   -want its recipients to know that what they have is not the original, so
48   -that any problems introduced by others will not reflect on the original
49   -authors' reputations.
50   -
51   - Finally, any free program is threatened constantly by software
52   -patents. We wish to avoid the danger that redistributors of a free
53   -program will individually obtain patent licenses, in effect making the
54   -program proprietary. To prevent this, we have made it clear that any
55   -patent must be licensed for everyone's free use or not licensed at all.
56   -
57   - The precise terms and conditions for copying, distribution and
58   -modification follow.
59   -
60   - GNU GENERAL PUBLIC LICENSE
61   - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62   -
63   - 0. This License applies to any program or other work which contains
64   -a notice placed by the copyright holder saying it may be distributed
65   -under the terms of this General Public License. The "Program", below,
66   -refers to any such program or work, and a "work based on the Program"
67   -means either the Program or any derivative work under copyright law:
68   -that is to say, a work containing the Program or a portion of it,
69   -either verbatim or with modifications and/or translated into another
70   -language. (Hereinafter, translation is included without limitation in
71   -the term "modification".) Each licensee is addressed as "you".
72   -
73   -Activities other than copying, distribution and modification are not
74   -covered by this License; they are outside its scope. The act of
75   -running the Program is not restricted, and the output from the Program
76   -is covered only if its contents constitute a work based on the
77   -Program (independent of having been made by running the Program).
78   -Whether that is true depends on what the Program does.
79   -
80   - 1. You may copy and distribute verbatim copies of the Program's
81   -source code as you receive it, in any medium, provided that you
82   -conspicuously and appropriately publish on each copy an appropriate
83   -copyright notice and disclaimer of warranty; keep intact all the
84   -notices that refer to this License and to the absence of any warranty;
85   -and give any other recipients of the Program a copy of this License
86   -along with the Program.
87   -
88   -You may charge a fee for the physical act of transferring a copy, and
89   -you may at your option offer warranty protection in exchange for a fee.
90   -
91   - 2. You may modify your copy or copies of the Program or any portion
92   -of it, thus forming a work based on the Program, and copy and
93   -distribute such modifications or work under the terms of Section 1
94   -above, provided that you also meet all of these conditions:
95   -
96   - a) You must cause the modified files to carry prominent notices
97   - stating that you changed the files and the date of any change.
98   -
99   - b) You must cause any work that you distribute or publish, that in
100   - whole or in part contains or is derived from the Program or any
101   - part thereof, to be licensed as a whole at no charge to all third
102   - parties under the terms of this License.
103   -
104   - c) If the modified program normally reads commands interactively
105   - when run, you must cause it, when started running for such
106   - interactive use in the most ordinary way, to print or display an
107   - announcement including an appropriate copyright notice and a
108   - notice that there is no warranty (or else, saying that you provide
109   - a warranty) and that users may redistribute the program under
110   - these conditions, and telling the user how to view a copy of this
111   - License. (Exception: if the Program itself is interactive but
112   - does not normally print such an announcement, your work based on
113   - the Program is not required to print an announcement.)
114   -
115   -These requirements apply to the modified work as a whole. If
116   -identifiable sections of that work are not derived from the Program,
117   -and can be reasonably considered independent and separate works in
118   -themselves, then this License, and its terms, do not apply to those
119   -sections when you distribute them as separate works. But when you
120   -distribute the same sections as part of a whole which is a work based
121   -on the Program, the distribution of the whole must be on the terms of
122   -this License, whose permissions for other licensees extend to the
123   -entire whole, and thus to each and every part regardless of who wrote it.
124   -Thus, it is not the intent of this section to claim rights or contest
125   -your rights to work written entirely by you; rather, the intent is to
126   -exercise the right to control the distribution of derivative or
127   -collective works based on the Program.
128   -
129   -In addition, mere aggregation of another work not based on the Program
130   -with the Program (or with a work based on the Program) on a volume of
131   -a storage or distribution medium does not bring the other work under
132   -the scope of this License.
133   -
134   - 3. You may copy and distribute the Program (or a work based on it,
135   -under Section 2) in object code or executable form under the terms of
136   -Sections 1 and 2 above provided that you also do one of the following:
137   -
138   - a) Accompany it with the complete corresponding machine-readable
139   - source code, which must be distributed under the terms of Sections
140   - 1 and 2 above on a medium customarily used for software interchange; or,
141   -
142   - b) Accompany it with a written offer, valid for at least three
143   - years, to give any third party, for a charge no more than your
144   - cost of physically performing source distribution, a complete
145   - machine-readable copy of the corresponding source code, to be
146   - distributed under the terms of Sections 1 and 2 above on a medium
147   - customarily used for software interchange; or,
148   -
149   - c) Accompany it with the information you received as to the offer
150   - to distribute corresponding source code. (This alternative is
151   - allowed only for noncommercial distribution and only if you
152   - received the program in object code or executable form with such
153   - an offer, in accord with Subsection b above.)
154   -
155   -The source code for a work means the preferred form of the work for
156   -making modifications to it. For an executable work, complete source
157   -code means all the source code for all modules it contains, plus any
158   -associated interface definition files, plus the scripts used to
159   -control compilation and installation of the executable. However, as a
160   -special exception, the source code distributed need not include
161   -anything that is normally distributed (in either source or binary
162   -form) with the major components (compiler, kernel, and so on) of the
163   -operating system on which the executable runs, unless that component
164   -itself accompanies the executable.
165   -
166   -If distribution of executable or object code is made by offering
167   -access to copy from a designated place, then offering equivalent
168   -access to copy the source code from the same place counts as
169   -distribution of the source code, even though third parties are not
170   -compelled to copy the source along with the object code.
171   -
172   - 4. You may not copy, modify, sublicense, or distribute the Program
173   -except as expressly provided under this License. Any attempt
174   -otherwise to copy, modify, sublicense or distribute the Program is
175   -void, and will automatically terminate your rights under this License.
176   -However, parties who have received copies, or rights, from you under
177   -this License will not have their licenses terminated so long as such
178   -parties remain in full compliance.
179   -
180   - 5. You are not required to accept this License, since you have not
181   -signed it. However, nothing else grants you permission to modify or
182   -distribute the Program or its derivative works. These actions are
183   -prohibited by law if you do not accept this License. Therefore, by
184   -modifying or distributing the Program (or any work based on the
185   -Program), you indicate your acceptance of this License to do so, and
186   -all its terms and conditions for copying, distributing or modifying
187   -the Program or works based on it.
188   -
189   - 6. Each time you redistribute the Program (or any work based on the
190   -Program), the recipient automatically receives a license from the
191   -original licensor to copy, distribute or modify the Program subject to
192   -these terms and conditions. You may not impose any further
193   -restrictions on the recipients' exercise of the rights granted herein.
194   -You are not responsible for enforcing compliance by third parties to
195   -this License.
196   -
197   - 7. If, as a consequence of a court judgment or allegation of patent
198   -infringement or for any other reason (not limited to patent issues),
199   -conditions are imposed on you (whether by court order, agreement or
200   -otherwise) that contradict the conditions of this License, they do not
201   -excuse you from the conditions of this License. If you cannot
202   -distribute so as to satisfy simultaneously your obligations under this
203   -License and any other pertinent obligations, then as a consequence you
204   -may not distribute the Program at all. For example, if a patent
205   -license would not permit royalty-free redistribution of the Program by
206   -all those who receive copies directly or indirectly through you, then
207   -the only way you could satisfy both it and this License would be to
208   -refrain entirely from distribution of the Program.
209   -
210   -If any portion of this section is held invalid or unenforceable under
211   -any particular circumstance, the balance of the section is intended to
212   -apply and the section as a whole is intended to apply in other
213   -circumstances.
214   -
215   -It is not the purpose of this section to induce you to infringe any
216   -patents or other property right claims or to contest validity of any
217   -such claims; this section has the sole purpose of protecting the
218   -integrity of the free software distribution system, which is
219   -implemented by public license practices. Many people have made
220   -generous contributions to the wide range of software distributed
221   -through that system in reliance on consistent application of that
222   -system; it is up to the author/donor to decide if he or she is willing
223   -to distribute software through any other system and a licensee cannot
224   -impose that choice.
225   -
226   -This section is intended to make thoroughly clear what is believed to
227   -be a consequence of the rest of this License.
228   -
229   - 8. If the distribution and/or use of the Program is restricted in
230   -certain countries either by patents or by copyrighted interfaces, the
231   -original copyright holder who places the Program under this License
232   -may add an explicit geographical distribution limitation excluding
233   -those countries, so that distribution is permitted only in or among
234   -countries not thus excluded. In such case, this License incorporates
235   -the limitation as if written in the body of this License.
236   -
237   - 9. The Free Software Foundation may publish revised and/or new versions
238   -of the General Public License from time to time. Such new versions will
239   -be similar in spirit to the present version, but may differ in detail to
240   -address new problems or concerns.
241   -
242   -Each version is given a distinguishing version number. If the Program
243   -specifies a version number of this License which applies to it and "any
244   -later version", you have the option of following the terms and conditions
245   -either of that version or of any later version published by the Free
246   -Software Foundation. If the Program does not specify a version number of
247   -this License, you may choose any version ever published by the Free Software
248   -Foundation.
249   -
250   - 10. If you wish to incorporate parts of the Program into other free
251   -programs whose distribution conditions are different, write to the author
252   -to ask for permission. For software which is copyrighted by the Free
253   -Software Foundation, write to the Free Software Foundation; we sometimes
254   -make exceptions for this. Our decision will be guided by the two goals
255   -of preserving the free status of all derivatives of our free software and
256   -of promoting the sharing and reuse of software generally.
257   -
258   - NO WARRANTY
259   -
260   - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261   -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262   -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263   -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264   -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265   -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266   -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267   -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268   -REPAIR OR CORRECTION.
269   -
270   - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271   -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272   -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273   -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274   -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275   -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276   -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277   -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278   -POSSIBILITY OF SUCH DAMAGES.
279   -
280   - END OF TERMS AND CONDITIONS
281   -
109 3.0/readme.html
... ... @@ -1,109 +0,0 @@
1   -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2   -<html xmlns="http://www.w3.org/1999/xhtml">
3   -<head>
4   - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   - <title>WordPress &#8250; ReadMe</title>
6   - <link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
7   -</head>
8   -<body>
9   -<h1 id="logo">
10   - <a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
11   - <br /> Version 3.0.3
12   -</h1>
13   -<p style="text-align: center">Semantic Personal Publishing Platform</p>
14   -
15   -<h1>First Things First</h1>
16   -<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>
17   -<p style="text-align: right">&#8212; Matt Mullenweg</p>
18   -
19   -<h1>Installation: Famous 5-minute install</h1>
20   -<ol>
21   - <li>Unzip the package in an empty directory and upload everything.</li>
22   - <li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser. It will take you through the process to set up a <code>wp-config.php</code> file with your database connection details.
23   - <ol>
24   - <li>If for some reason this doesn't work, don't worry. It doesn't work on all web hosts. Open up <code>wp-config-sample.php</code> with a text editor like WordPad or similar and fill in your database connection details.</li>
25   - <li>Save the file as <code>wp-config.php</code> and upload it.</li>
26   - <li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser.</li>
27   - </ol>
28   - </li>
29   - <li>Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="http://wordpress.org/support/" title="WordPress support">support forums</a> with as much data as you can gather.</li>
30   - <li><strong>If you did not enter a password, note the password given to you.</strong> If you did not provide a username, it will be <code>admin</code>.</li>
31   - <li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on 'Profile' to change the password.</li>
32   -</ol>
33   -
34   -<h1>Upgrading</h1>
35   -<h2>Using the Automatic Upgrader</h2>
36   -<p>If you are upgrading from version 2.7 or higher, you can use the automatic upgrader:</p>
37   -<ol>
38   - <li>Open the <span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span> in your browser and follow the instructions.</li>
39   - <li>You wanted more, perhaps? That's it!</li>
40   -</ol>
41   -
42   -<h2>Upgrading Manually</h2>
43   -<ol>
44   - <li>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</li>
45   - <li>Delete your old WordPress files, saving ones you've modified.</li>
46   - <li>Upload the new files.</li>
47   - <li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a>.</span></li>
48   -</ol>
49   -
50   -<h2>Theme Template Changes</h2>
51   -<p>If you have customized your theme templates, you may have to make some changes across major versions.</p>
52   -
53   -<h1>Migrating from other systems</h1>
54   -<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, before using <a href="wp-admin/import.php" title="Import to WordPress">our import tools</a>.</p>
55   -
56   -<h1>System Requirements</h1>
57   -<ul>
58   - <li><a href="http://php.net/">PHP</a> version <strong>4.3</strong> or higher.</li>
59   - <li><a href="http://www.mysql.com/">MySQL</a> version <strong>4.1.2</strong> or higher.</li>
60   -</ul>
61   -
62   -<h2>System Recommendations</h2>
63   -<ul>
64   - <li>The <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
65   - <li>A link to <a href="http://wordpress.org/">http://wordpress.org</a> on your site.</li>
66   -</ul>
67   -
68   -<h1>Online Resources</h1>
69   -<p>If you have any questions that aren't addressed in this document, please take advantage of WordPress' numerous online resources:</p>
70   -<dl>
71   - <dt><a href="http://codex.wordpress.org/">The WordPress Codex</a></dt>
72   - <dd>The Codex is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.</dd>
73   - <dt><a href="http://wordpress.org/news/">The WordPress Blog</a></dt>
74   - <dd>This is where you'll find the latest updates and news related to WordPress. Recent WordPress news appears in your administrative dashboard by default.</dd>
75   - <dt><a href="http://planet.wordpress.org/">WordPress Planet</a></dt>
76   - <dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.</dd>
77   - <dt><a href="http://wordpress.org/support/">WordPress Support Forums</a></dt>
78   - <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>
79   - <dt><a href="http://codex.wordpress.org/IRC">WordPress <abbr title="Internet Relay Chat">IRC</abbr> Channel</a></dt>
80   - <dd>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>
81   -</dl>
82   -
83   -<h1><abbr title="eXtensible Markup Language">XML</abbr>-<abbr title="Remote Procedure Call">RPC</abbr> and Atom Interface</h1>
84   -<p>You can post to your WordPress blog with tools like <a href="http://download.live.com/writer">Windows Live Writer</a>, <a href="http://illuminex.com/ecto/">Ecto</a>, <a href="http://bloggar.com/">w.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 <abbr title="application programming interface">API</abbr>s! :) You can read more about <a href="http://codex.wordpress.org/XML-RPC_Support"><abbr>XML</abbr>-<abbr>RPC</abbr> support on the Codex</a>.</p>
85   -
86   -<h1>Post via Email</h1>
87   -<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 <abbr title="Post Office Protocol version 3">POP3</abbr> 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 <a href="http://en.wikipedia.org/wiki/Cron">cron</a>-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> <abbr title="Uniform Resource Locator">URL</abbr>.</p>
88   -<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>
89   -
90   -<h1>User Roles</h1>
91   -<p>We introduced a very flexible roles system in version 2.0. You can <a href="http://codex.wordpress.org/Roles_and_Capabilities" title="WordPress roles and capabilities">read more about Roles and Capabilities on the Codex</a>.</p>
92   -
93   -<h1>Final Notes</h1>
94   -<ul>
95   - <li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="http://wordpress.org/support/">Support Forums</a>.</li>
96   - <li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> 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" title="WordPress plugin API">plugin documentation in the Codex</a>. You shouldn't modify any of the core code.</li>
97   -</ul>
98   -
99   -<h1>Share the Love</h1>
100   -<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better&#8212;you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.</p>
101   -
102   -<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;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/" title="Donate to WordPress">donating</a>.</p>
103   -
104   -<h1>Copyright</h1>
105   -<p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr> (see <a href="license.txt">license.txt</a>).</p>
106   -
107   -
108   -</body>
109   -</html>
104 3.0/wp-activate.php
... ... @@ -1,104 +0,0 @@
1   -<?php
2   -define( "WP_INSTALLING", true );
3   -
4   -/** Sets up the WordPress Environment. */
5   -require( dirname(__FILE__) . '/wp-load.php' );
6   -
7   -require( './wp-blog-header.php' );
8   -
9   -if ( !is_multisite() ) {
10   - wp_redirect( get_option( 'siteurl' ) . "/wp-login.php?action=register" );
11   - die();
12   -}
13   -
14   -require_once( ABSPATH . WPINC . '/registration.php');
15   -
16   -if ( is_object( $wp_object_cache ) )
17   - $wp_object_cache->cache_enabled = false;
18   -
19   -do_action("activate_header");
20   -
21   -function do_activate_header() {
22   - do_action("activate_wp_head");
23   -}
24   -add_action( 'wp_head', 'do_activate_header' );
25   -
26   -function wpmu_activate_stylesheet() {
27   - ?>
28   - <style type="text/css">
29   - form { margin-top: 2em; }
30   - #submit, #key { width: 90%; font-size: 24px; }
31   - #language { margin-top: .5em; }
32   - .error { background: #f66; }
33   - span.h3 { padding:0 8px; font-size:1.3em; font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,Sans-Serif; font-weight:700; color:#333333; }
34   - </style>
35   - <?php
36   -}
37   -add_action( 'wp_head', 'wpmu_activate_stylesheet' );
38   -
39   -get_header();
40   -?>
41   -
42   -<div id="content" class="widecolumn">
43   - <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
44   -
45   - <h2><?php _e('Activation Key Required') ?></h2>
46   - <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
47   - <p>
48   - <label for="key"><?php _e('Activation Key:') ?></label>
49   - <br /><input type="text" name="key" id="key" value="" size="50" />
50   - </p>
51   - <p class="submit">
52   - <input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
53   - </p>
54   - </form>
55   -
56   - <?php } else {
57   -
58   - $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
59   - $result = wpmu_activate_signup($key);
60   - if ( is_wp_error($result) ) {
61   - if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
62   - $signup = $result->get_error_data();
63   - ?>
64   - <h2><?php _e('Your account is now active!'); ?></h2>
65   - <?php
66   - echo '<p class="lead-in">';
67   - if ( $signup->domain . $signup->path == '' ) {
68   - printf( __('Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
69   - } else {
70   - printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword' ) );
71   - }
72   - echo '</p>';
73   - } else {
74   - ?>
75   - <h2><?php _e('An error occurred during the activation'); ?></h2>
76   - <?php
77   - echo '<p>'.$result->get_error_message().'</p>';
78   - }
79   - } else {
80   - extract($result);
81   - $url = get_blogaddress_by_id( (int) $blog_id);
82   - $user = new WP_User( (int) $user_id);
83   - ?>
84   - <h2><?php _e('Your account is now active!'); ?></h2>
85   -
86   - <div id="signup-welcome">
87   - <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
88   - <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
89   - </div>
90   -
91   - <?php if ( $url != network_home_url('', 'http') ) : ?>
92   - <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p>
93   - <?php else: ?>
94   - <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
95   - <?php endif;
96   - }
97   - }
98   - ?>
99   -</div>
100   -<script type="text/javascript">
101   - var key_input = document.getElementById('key');
102   - key_input && key_input.focus();
103   -</script>
104   -<?php get_footer(); ?>
1,535 3.0/wp-admin/admin-ajax.php
... ... @@ -1,1535 +0,0 @@
1   -<?php
2   -/**
3   - * WordPress AJAX Process Execution.
4   - *
5   - * @package WordPress
6   - * @subpackage Administration
7   - */
8   -
9   -/**
10   - * Executing AJAX process.
11   - *
12   - * @since unknown
13   - */
14   -define('DOING_AJAX', true);
15   -define('WP_ADMIN', true);
16   -
17   -require_once('../wp-load.php');
18   -
19   -if ( ! isset( $_REQUEST['action'] ) )
20   - die('-1');
21   -
22   -require_once('./includes/admin.php');
23   -@header('Content-Type: text/html; charset=' . get_option('blog_charset'));
24   -send_nosniff_header();
25   -
26   -do_action('admin_init');
27   -
28   -if ( ! is_user_logged_in() ) {
29   -
30   - if ( isset( $_POST['action'] ) && $_POST['action'] == 'autosave' ) {
31   - $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0;
32   -
33   - if ( ! $id )
34   - die('-1');
35   -
36   - $message = sprintf( __('<strong>ALERT: You are logged out!</strong> Could not save draft. <a href="%s" target="_blank">Please log in again.</a>'), wp_login_url() );
37   - $x = new WP_Ajax_Response( array(
38   - 'what' => 'autosave',
39   - 'id' => $id,
40   - 'data' => $message
41   - ) );
42   - $x->send();
43   - }
44   -
45   - if ( !empty( $_REQUEST['action'] ) )
46   - do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
47   -
48   - die('-1');
49   -}
50   -
51   -if ( isset( $_GET['action'] ) ) :
52   -switch ( $action = $_GET['action'] ) :
53   -case 'ajax-tag-search' :
54   - if ( !current_user_can( 'edit_posts' ) )
55   - die('-1');
56   -
57   - $s = $_GET['q']; // is this slashed already?
58   -
59   - if ( isset($_GET['tax']) )
60   - $taxonomy = sanitize_title($_GET['tax']);
61   - else
62   - die('0');
63   -
64   - if ( false !== strpos( $s, ',' ) ) {
65   - $s = explode( ',', $s );
66   - $s = $s[count( $s ) - 1];
67   - }
68   - $s = trim( $s );
69   - if ( strlen( $s ) < 2 )
70   - die; // require 2 chars for matching
71   -
72   - $results = $wpdb->get_col( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = '$taxonomy' AND t.name LIKE ('%" . $s . "%')" );
73   -
74   - echo join( $results, "\n" );
75   - die;
76   - break;
77   -case 'wp-compression-test' :
78   - if ( !current_user_can( 'manage_options' ) )
79   - die('-1');
80   -
81   - if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) {
82   - update_site_option('can_compress_scripts', 0);
83   - die('0');
84   - }
85   -
86   - if ( isset($_GET['test']) ) {
87   - header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
88   - header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
89   - header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
90   - header( 'Pragma: no-cache' );
91   - header('Content-Type: application/x-javascript; charset=UTF-8');
92   - $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
93   - $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
94   -
95   - if ( 1 == $_GET['test'] ) {
96   - echo $test_str;
97   - die;
98   - } elseif ( 2 == $_GET['test'] ) {
99   - if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
100   - die('-1');
101   - if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
102   - header('Content-Encoding: deflate');
103   - $out = gzdeflate( $test_str, 1 );
104   - } elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
105   - header('Content-Encoding: gzip');
106   - $out = gzencode( $test_str, 1 );
107   - } else {
108   - die('-1');
109   - }
110   - echo $out;
111   - die;
112   - } elseif ( 'no' == $_GET['test'] ) {
113   - update_site_option('can_compress_scripts', 0);
114   - } elseif ( 'yes' == $_GET['test'] ) {
115   - update_site_option('can_compress_scripts', 1);
116   - }
117   - }
118   -
119   - die('0');
120   - break;
121   -case 'imgedit-preview' :
122   - $post_id = intval($_GET['postid']);
123   - if ( empty($post_id) || !current_user_can('edit_post', $post_id) )
124   - die('-1');
125   -
126   - check_ajax_referer( "image_editor-$post_id" );
127   -
128   - include_once( ABSPATH . 'wp-admin/includes/image-edit.php' );
129   - if ( ! stream_preview_image($post_id) )
130   - die('-1');
131   -
132   - die();
133   - break;
134   -case 'menu-quick-search':
135   - if ( ! current_user_can( 'edit_theme_options' ) )
136   - die('-1');
137   -
138   - require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
139   -
140   - _wp_ajax_menu_quick_search( $_REQUEST );
141   -
142   - exit;
143   - break;
144   -case 'oembed-cache' :
145   - $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0';
146   - die( $return );
147   - break;
148   -default :
149   - do_action( 'wp_ajax_' . $_GET['action'] );
150   - die('0');
151   - break;
152   -endswitch;
153   -endif;
154   -
155   -/**
156   - * Sends back current comment total and new page links if they need to be updated.
157   - *
158   - * Contrary to normal success AJAX response ("1"), die with time() on success.
159   - *
160   - * @since 2.7
161   - *
162   - * @param int $comment_id
163   - * @return die
164   - */
165   -function _wp_ajax_delete_comment_response( $comment_id ) {
166   - $total = (int) @$_POST['_total'];
167   - $per_page = (int) @$_POST['_per_page'];
168   - $page = (int) @$_POST['_page'];
169   - $url = esc_url_raw( @$_POST['_url'] );
170   - // JS didn't send us everything we need to know. Just die with success message
171   - if ( !$total || !$per_page || !$page || !$url )
172   - die( (string) time() );
173   -
174   - if ( --$total < 0 ) // Take the total from POST and decrement it (since we just deleted one)
175   - $total = 0;
176   -
177   - if ( 0 != $total % $per_page && 1 != mt_rand( 1, $per_page ) ) // Only do the expensive stuff on a page-break, and about 1 other time per page
178   - die( (string) time() );
179   -
180   - $post_id = 0;
181   - $status = 'total_comments'; // What type of comment count are we looking for?
182   - $parsed = parse_url( $url );
183   - if ( isset( $parsed['query'] ) ) {
184   - parse_str( $parsed['query'], $query_vars );
185   - if ( !empty( $query_vars['comment_status'] ) )
186   - $status = $query_vars['comment_status'];
187   - if ( !empty( $query_vars['p'] ) )
188   - $post_id = (int) $query_vars['p'];
189   - }
190   -
191   - $comment_count = wp_count_comments($post_id);
192   - $time = time(); // The time since the last comment count
193   -
194   - if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count
195   - $total = $comment_count->$status;
196   - // else use the decremented value from above
197   -
198   - $page_links = paginate_links( array(
199   - 'base' => add_query_arg( 'apage', '%#%', $url ),
200   - 'format' => '',
201   - 'prev_text' => __('&laquo;'),
202   - 'next_text' => __('&raquo;'),
203   - 'total' => ceil($total / $per_page),
204   - 'current' => $page
205   - ) );
206   - $x = new WP_Ajax_Response( array(
207   - 'what' => 'comment',
208   - 'id' => $comment_id, // here for completeness - not used
209   - 'supplemental' => array(
210   - 'pageLinks' => $page_links,
211   - 'total' => $total,
212   - 'time' => $time
213   - )
214   - ) );
215   - $x->send();
216   -}
217   -
218   -function _wp_ajax_add_hierarchical_term() {
219   - $action = $_POST['action'];
220   - $taxonomy = get_taxonomy(substr($action, 4));
221   - check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
222   - if ( !current_user_can( $taxonomy->cap->edit_terms ) )
223   - die('-1');
224   - $names = explode(',', $_POST['new'.$taxonomy->name]);
225   - $parent = isset($_POST['new'.$taxonomy->name.'_parent']) ? (int) $_POST['new'.$taxonomy->name.'_parent'] : 0;
226   - if ( 0 > $parent )
227   - $parent = 0;
228   - if ( $taxonomy->name == 'category' )
229   - $post_category = isset($_POST['post_category']) ? (array) $_POST['post_category'] : array();
230   - else
231   - $post_category = ( isset($_POST['tax_input']) && isset($_POST['tax_input'][$taxonomy->name]) ) ? (array) $_POST['tax_input'][$taxonomy->name] : array();
232   - $checked_categories = array_map( 'absint', (array) $post_category );
233   - $popular_ids = wp_popular_terms_checklist($taxonomy->name, 0, 10, false);
234   -
235   - foreach ( $names as $cat_name ) {
236   - $cat_name = trim($cat_name);
237   - $category_nicename = sanitize_title($cat_name);
238   - if ( '' === $category_nicename )
239   - continue;
240   - if ( !($cat_id = term_exists($cat_name, $taxonomy->name, $parent)) ) {
241   - $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent));
242   - $cat_id = $new_term['term_id'];
243   - }
244   - $checked_categories[] = $cat_id;
245   - if ( $parent ) // Do these all at once in a second
246   - continue;
247   - $category = get_term( $cat_id, $taxonomy->name );
248   - ob_start();
249   - wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids ));
250   - $data = ob_get_contents();
251   - ob_end_clean();
252   - $add = array(
253   - 'what' => $taxonomy->name,
254   - 'id' => $cat_id,
255   - 'data' => str_replace( array("\n", "\t"), '', $data),
256   - 'position' => -1
257   - );
258   - }
259   -
260   - if ( $parent ) { // Foncy - replace the parent and all its children
261   - $parent = get_term( $parent, $taxonomy->name );
262   - $term_id = $parent->term_id;
263   -
264   - while ( $parent->parent ) { // get the top parent
265   - $parent = &get_term( $parent->parent, $taxonomy->name );
266   - if ( is_wp_error( $parent ) )
267   - break;
268   - $term_id = $parent->term_id;
269   - }
270   -
271   - ob_start();
272   - wp_terms_checklist( 0, array('taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids));
273   - $data = ob_get_contents();
274   - ob_end_clean();
275   - $add = array(
276   - 'what' => $taxonomy->name,
277   - 'id' => $term_id,
278   - 'data' => str_replace( array("\n", "\t"), '', $data),
279   - 'position' => -1
280   - );
281   - }
282   -
283   - ob_start();
284   - wp_dropdown_categories( array(
285   - 'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name',
286   - 'hierarchical' => 1, 'show_option_none' => '&mdash; '.$taxonomy->labels->parent_item.' &mdash;'
287   - ) );
288   - $sup = ob_get_contents();
289   - ob_end_clean();
290   - $add['supplemental'] = array( 'newcat_parent' => $sup );
291   -
292   - $x = new WP_Ajax_Response( $add );
293   - $x->send();
294   -}
295   -
296   -$id = isset($_POST['id'])? (int) $_POST['id'] : 0;
297   -switch ( $action = $_POST['action'] ) :
298   -case 'delete-comment' : // On success, die with time() instead of 1
299   - if ( !$comment = get_comment( $id ) )
300   - die( (string) time() );
301   - if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) )
302   - die('-1');
303   -
304   - check_ajax_referer( "delete-comment_$id" );
305   - $status = wp_get_comment_status( $comment->comment_ID );
306   -
307   - if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) {
308   - if ( 'trash' == $status )
309   - die( (string) time() );
310   - $r = wp_trash_comment( $comment->comment_ID );
311   - } elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) {
312   - if ( 'trash' != $status )
313   - die( (string) time() );
314   - $r = wp_untrash_comment( $comment->comment_ID );
315   - } elseif ( isset($_POST['spam']) && 1 == $_POST['spam'] ) {
316   - if ( 'spam' == $status )
317   - die( (string) time() );
318   - $r = wp_spam_comment( $comment->comment_ID );
319   - } elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) {
320   - if ( 'spam' != $status )
321   - die( (string) time() );
322   - $r = wp_unspam_comment( $comment->comment_ID );
323   - } elseif ( isset($_POST['delete']) && 1 == $_POST['delete'] ) {
324   - $r = wp_delete_comment( $comment->comment_ID );
325   - } else {
326   - die('-1');
327   - }
328   -
329   - if ( $r ) // Decide if we need to send back '1' or a more complicated response including page links and comment counts
330   - _wp_ajax_delete_comment_response( $comment->comment_ID );
331   - die( '0' );
332   - break;
333   -case 'delete-tag' :
334   - $tag_id = (int) $_POST['tag_ID'];
335   - check_ajax_referer( "delete-tag_$tag_id" );
336   -
337   - $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag';
338   - $tax = get_taxonomy($taxonomy);
339   -
340   - if ( !current_user_can( $tax->cap->delete_terms ) )
341   - die('-1');
342   -
343   - $tag = get_term( $tag_id, $taxonomy );
344   - if ( !$tag || is_wp_error( $tag ) )
345   - die('1');
346   -
347   - if ( wp_delete_term($tag_id, $taxonomy))
348   - die('1');
349   - else
350   - die('0');
351   - break;
352   -case 'delete-link-cat' :
353   - check_ajax_referer( "delete-link-category_$id" );
354   - if ( !current_user_can( 'manage_categories' ) )
355   - die('-1');
356   -
357   - $cat = get_term( $id, 'link_category' );
358   - if ( !$cat || is_wp_error( $cat ) )
359   - die('1');
360   -
361   - $cat_name = get_term_field('name', $id, 'link_category');
362   -
363   - $default = get_option('default_link_category');
364   -
365   - // Don't delete the default cats.
366   - if ( $id == $default ) {
367   - $x = new WP_AJAX_Response( array(
368   - 'what' => 'link-cat',
369   - 'id' => $id,
370   - 'data' => new WP_Error( 'default-link-cat', sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name) )
371   - ) );
372   - $x->send();
373   - }
374   -
375   - $r = wp_delete_term($id, 'link_category', array('default' => $default));
376   - if ( !$r )
377   - die('0');
378   - if ( is_wp_error($r) ) {
379   - $x = new WP_AJAX_Response( array(
380   - 'what' => 'link-cat',
381   - 'id' => $id,
382   - 'data' => $r
383   - ) );
384   - $x->send();
385   - }
386   - die('1');
387   - break;
388   -case 'delete-link' :
389   - check_ajax_referer( "delete-bookmark_$id" );
390   - if ( !current_user_can( 'manage_links' ) )
391   - die('-1');
392   -
393   - $link = get_bookmark( $id );
394   - if ( !$link || is_wp_error( $link ) )
395   - die('1');
396   -
397   - if ( wp_delete_link( $id ) )
398   - die('1');
399   - else
400   - die('0');
401   - break;
402   -case 'delete-meta' :
403   - check_ajax_referer( "delete-meta_$id" );
404   - if ( !$meta = get_post_meta_by_id( $id ) )
405   - die('1');
406   -
407   - if ( !current_user_can( 'edit_post', $meta->post_id ) )
408   - die('-1');
409   - if ( delete_meta( $meta->meta_id ) )
410   - die('1');
411   - die('0');
412   - break;
413   -case 'delete-post' :
414   - check_ajax_referer( "{$action}_$id" );
415   - if ( !current_user_can( 'delete_post', $id ) )
416   - die('-1');
417   -
418   - if ( !get_post( $id ) )
419   - die('1');
420   -
421   - if ( wp_delete_post( $id ) )
422   - die('1');
423   - else
424   - die('0');
425   - break;
426   -case 'trash-post' :
427   -case 'untrash-post' :
428   - check_ajax_referer( "{$action}_$id" );
429   - if ( !current_user_can( 'delete_post', $id ) )
430   - die('-1');
431   -
432   - if ( !get_post( $id ) )
433   - die('1');
434   -
435   - if ( 'trash-post' == $action )
436   - $done = wp_trash_post( $id );
437   - else
438   - $done = wp_untrash_post( $id );
439   -
440   - if ( $done )
441   - die('1');
442   -
443   - die('0');
444   - break;
445   -case 'delete-page' :
446   - check_ajax_referer( "{$action}_$id" );
447   - if ( !current_user_can( 'delete_page', $id ) )
448   - die('-1');
449   -
450   - if ( !get_page( $id ) )
451   - die('1');
452   -
453   - if ( wp_delete_post( $id ) )
454   - die('1');
455   - else
456   - die('0');
457   - break;
458   -case 'dim-comment' : // On success, die with time() instead of 1
459   -
460   - if ( !$comment = get_comment( $id ) ) {
461   - $x = new WP_Ajax_Response( array(
462   - 'what' => 'comment',
463   - 'id' => new WP_Error('invalid_comment', sprintf(__('Comment %d does not exist'), $id))
464   - ) );
465   - $x->send();
466   - }
467   -
468   - if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) )
469   - die('-1');
470   -
471   - $current = wp_get_comment_status( $comment->comment_ID );
472   - if ( $_POST['new'] == $current )
473   - die( (string) time() );
474   -
475   - check_ajax_referer( "approve-comment_$id" );
476   - if ( in_array( $current, array( 'unapproved', 'spam' ) ) )
477   - $result = wp_set_comment_status( $comment->comment_ID, 'approve', true );
478   - else
479   - $result = wp_set_comment_status( $comment->comment_ID, 'hold', true );
480   -
481   - if ( is_wp_error($result) ) {
482   - $x = new WP_Ajax_Response( array(
483   - 'what' => 'comment',
484   - 'id' => $result
485   - ) );
486   - $x->send();
487   - }
488   -
489   - // Decide if we need to send back '1' or a more complicated response including page links and comment counts
490   - _wp_ajax_delete_comment_response( $comment->comment_ID );
491   - die( '0' );
492   - break;
493   -case 'add-link-category' : // On the Fly
494   - check_ajax_referer( $action );
495   - if ( !current_user_can( 'manage_categories' ) )
496   - die('-1');
497   - $names = explode(',', $_POST['newcat']);
498   - $x = new WP_Ajax_Response();
499   - foreach ( $names as $cat_name ) {
500   - $cat_name = trim($cat_name);
501   - $slug = sanitize_title($cat_name);
502   - if ( '' === $slug )
503   - continue;
504   - if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) {
505   - $cat_id = wp_insert_term( $cat_name, 'link_category' );
506   - }
507   - $cat_id = $cat_id['term_id'];
508   - $cat_name = esc_html(stripslashes($cat_name));
509   - $x->add( array(
510   - 'what' => 'link-category',
511   - 'id' => $cat_id,
512   - 'data' => "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='" . esc_attr($cat_id) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$cat_id'/> $cat_name</label></li>",
513   - 'position' => -1
514   - ) );
515   - }
516   - $x->send();
517   - break;
518   -case 'add-link-cat' : // From Blogroll -> Categories
519   - check_ajax_referer( 'add-link-category' );
520   - if ( !current_user_can( 'manage_categories' ) )
521   - die('-1');
522   -
523   - if ( '' === trim($_POST['name']) ) {
524   - $x = new WP_Ajax_Response( array(
525   - 'what' => 'link-cat',
526   - 'id' => new WP_Error( 'name', __('You did not enter a category name.') )
527   - ) );
528   - $x->send();
529   - }
530   -
531   - $r = wp_insert_term($_POST['name'], 'link_category', $_POST );
532   - if ( is_wp_error( $r ) ) {
533   - $x = new WP_AJAX_Response( array(
534   - 'what' => 'link-cat',
535   - 'id' => $r
536   - ) );
537   - $x->send();
538   - }
539   -
540   - extract($r, EXTR_SKIP);
541   -
542   - if ( !$link_cat = link_cat_row( $term_id ) )
543   - die('0');
544   -
545   - $x = new WP_Ajax_Response( array(
546   - 'what' => 'link-cat',
547   - 'id' => $term_id,
548   - 'position' => -1,
549   - 'data' => $link_cat
550   - ) );
551   - $x->send();
552   - break;
553   -case 'add-tag' : // From Manage->Tags