diff --git a/wp-content/plugins/neuf-events/.gitignore b/wp-content/plugins/neuf-events/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/wp-content/plugins/neuf-events/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/wp-content/plugins/neuf-events/LICENSE b/wp-content/plugins/neuf-events/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/wp-content/plugins/neuf-events/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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 + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/wp-content/plugins/neuf-events/README b/wp-content/plugins/neuf-events/README new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/wp-content/plugins/neuf-events/README @@ -0,0 +1 @@ + diff --git a/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.mo b/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.mo new file mode 100644 index 0000000..d8b631f Binary files /dev/null and b/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.mo differ diff --git a/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.po b/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.po new file mode 100644 index 0000000..6c381e6 --- /dev/null +++ b/wp-content/plugins/neuf-events/languages/neuf_event-nb_NO.po @@ -0,0 +1,164 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: neuf-events\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-01-20 21:51+0100\n" +"PO-Revision-Date: 2012-01-20 21:58+0100\n" +"Last-Translator: Nikolai Kristiansen \n" +"Language-Team: Nikolai Kristiansen \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Norwegian Bokmal\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: /home/nikolark/dev/edb/neuf-web/wp-content/plugins/neuf-events/\n" +"X-Poedit-SearchPath-0: .\n" + +#: neuf-events-taxonomies.php:9 +#: neuf-events-taxonomies.php:10 +msgid "Event Type" +msgstr "Arrangementstype" + +#: neuf-events-taxonomies.php:11 +msgid "Search Event Types" +msgstr "Søk i arrangementstyper" + +#: neuf-events-taxonomies.php:12 +msgid "All Event Types" +msgstr "Alle arrangementstyper" + +#: neuf-events-taxonomies.php:13 +msgid "Subtype of" +msgstr "Undertype av" + +#: neuf-events-taxonomies.php:14 +msgid "Subtype of:" +msgstr "Undertype av:" + +#: neuf-events-taxonomies.php:15 +msgid "Edit Event Type" +msgstr "Endre arrangementstype" + +#: neuf-events-taxonomies.php:16 +msgid "Update Event Type" +msgstr "Oppdater arrangementstype" + +#: neuf-events-taxonomies.php:17 +msgid "Add New Event Type" +msgstr "Legg til ny arrangementstype" + +#: neuf-events-taxonomies.php:18 +msgid "Name" +msgstr "Navn" + +#: neuf-events-taxonomies.php:19 +msgid "Event Types" +msgstr "Arrangementstyper" + +#: neuf-events-admin.php:7 +msgid "Title" +msgstr "Tittel" + +#: neuf-events-admin.php:8 +msgid "Date & Time" +msgstr "Dato og klokkeslett" + +#: neuf-events-admin.php:9 +msgid "Ending Date & Time" +msgstr "Sluttdato og -klokkeslett" + +#: neuf-events-admin.php:10 +msgid "Venue" +msgstr "Sted" + +#: neuf-events-admin.php:11 +msgid "Type" +msgstr "Type" + +#: neuf-events-admin.php:12 +msgid "Date Published" +msgstr "Publiseringsdato" + +#: neuf-events-admin.php:13 +msgid "Author" +msgstr "Forfatter" + +#: neuf-events-admin.php:28 +msgid "None" +msgstr "Ikke satt" + +#: neuf-events-admin.php:80 +msgid "Event Details" +msgstr "Arrangementsdetaljer" + +#: neuf-events-admin.php:113 +msgid "Starts" +msgstr "Start" + +#: neuf-events-admin.php:114 +msgid "Ends" +msgstr "Slutt" + +#: neuf-events-admin.php:127 +msgid "Venue:" +msgstr "Sted:" + +#: neuf-events-admin.php:137 +msgid "" +msgstr "" + +#: neuf-events-admin.php:150 +msgid "Price" +msgstr "Pris:" + +#: neuf-events-admin.php:152 +msgid "Billettservice address" +msgstr "Billettservice adresse" + +#: neuf-events-admin.php:154 +msgid "Facebook address" +msgstr "Facebook adresse" + +#: neuf-events-post-types.php:11 +msgid "Events" +msgstr "Arrangementer" + +#: neuf-events-post-types.php:12 +msgid "Event" +msgstr "Arrangement" + +#: neuf-events-post-types.php:13 +#: neuf-events-post-types.php:14 +msgid "Add New" +msgstr "Legg til ny" + +#: neuf-events-post-types.php:15 +msgid "Edit Event" +msgstr "Rediger arrrangement" + +#: neuf-events-post-types.php:16 +msgid "Add New Event" +msgstr "Legg til nytt arrangement" + +#: neuf-events-post-types.php:17 +msgid "View Event" +msgstr "Vis arrangement" + +#: neuf-events-post-types.php:18 +msgid "Search Events" +msgstr "Søk i arrangementer" + +#: neuf-events-post-types.php:19 +msgid "No events found" +msgstr "Ingen arrangement funnet" + +#: neuf-events-post-types.php:20 +msgid "No events found in trash" +msgstr "Ingen arrangement funnet i søpla" + diff --git a/wp-content/plugins/neuf-events/languages/neuf_event.pot b/wp-content/plugins/neuf-events/languages/neuf_event.pot new file mode 100644 index 0000000..51e2cfd --- /dev/null +++ b/wp-content/plugins/neuf-events/languages/neuf_event.pot @@ -0,0 +1,158 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-01-20 21:46+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: neuf-events-admin.php:7 +msgid "Title" +msgstr "" + +#: neuf-events-admin.php:8 +msgid "Date & Time" +msgstr "" + +#: neuf-events-admin.php:9 +msgid "Ending Date & Time" +msgstr "" + +#: neuf-events-admin.php:10 +msgid "Venue" +msgstr "" + +#: neuf-events-admin.php:11 +msgid "Type" +msgstr "" + +#: neuf-events-admin.php:12 +msgid "Date Published" +msgstr "" + +#: neuf-events-admin.php:13 +msgid "Author" +msgstr "" + +#: neuf-events-admin.php:28 +msgid "Ikke satt" +msgstr "" + +#: neuf-events-admin.php:80 +msgid "Event Details" +msgstr "" + +#: neuf-events-admin.php:113 +msgid "Starts" +msgstr "" + +#: neuf-events-admin.php:114 +msgid "Ends" +msgstr "" + +#: neuf-events-admin.php:127 +msgid "Venue:" +msgstr "" + +#: neuf-events-admin.php:137 +msgid "" +msgstr "" + +#: neuf-events-admin.php:150 +msgid "Price" +msgstr "" + +#: neuf-events-admin.php:152 +msgid "Billettservice address" +msgstr "" + +#: neuf-events-admin.php:154 +msgid "Facebook address" +msgstr "" + +#: neuf-events-post-types.php:11 +msgid "Events" +msgstr "" + +#: neuf-events-post-types.php:12 +msgid "Event" +msgstr "" + +#: neuf-events-post-types.php:13 neuf-events-post-types.php:14 +msgid "Add New" +msgstr "" + +#: neuf-events-post-types.php:15 +msgid "Edit Event" +msgstr "" + +#: neuf-events-post-types.php:16 +msgid "Add New Event" +msgstr "" + +#: neuf-events-post-types.php:17 +msgid "View Event" +msgstr "" + +#: neuf-events-post-types.php:18 +msgid "Search Events" +msgstr "" + +#: neuf-events-post-types.php:19 +msgid "No events found" +msgstr "" + +#: neuf-events-post-types.php:20 +msgid "No events found in trash" +msgstr "" + +#: neuf-events-taxonomies.php:9 neuf-events-taxonomies.php:10 +msgid "Event Type" +msgstr "" + +#: neuf-events-taxonomies.php:11 +msgid "Search Event Types" +msgstr "" + +#: neuf-events-taxonomies.php:12 +msgid "All Event Types" +msgstr "" + +#: neuf-events-taxonomies.php:13 +msgid "Subtype of" +msgstr "" + +#: neuf-events-taxonomies.php:14 +msgid "Subtype of:" +msgstr "" + +#: neuf-events-taxonomies.php:15 +msgid "Edit Event Type" +msgstr "" + +#: neuf-events-taxonomies.php:16 +msgid "Update Event Type" +msgstr "" + +#: neuf-events-taxonomies.php:17 +msgid "Add New Event Type" +msgstr "" + +#: neuf-events-taxonomies.php:18 +msgid "Name" +msgstr "" + +#: neuf-events-taxonomies.php:19 +msgid "Event Types" +msgstr "" diff --git a/wp-content/plugins/neuf-events/neuf-events-admin.php b/wp-content/plugins/neuf-events/neuf-events-admin.php new file mode 100644 index 0000000..a182de8 --- /dev/null +++ b/wp-content/plugins/neuf-events/neuf-events-admin.php @@ -0,0 +1,202 @@ + '', + 'title' => __( 'Title', 'neuf_event' ), + 'starttime' => __( 'Date & Time', 'neuf_event' ), + 'endtime' => __( 'Ending Date & Time', 'neuf_event'), + 'venue' => __( 'Venue', 'neuf_event' ), + 'type' => __( 'Type', 'neuf_event' ), + 'promoperiod' => __( 'Promo Period', 'neuf_event' ), + 'date' => __( 'Date Published', 'neuf_event' ), + 'author' => __( 'Author', 'neuf_event' ), + ); + return $custom_cols; +} +add_filter( "manage_event_posts_columns", "change_columns" ); + +// Add values to the custom columns +function custom_columns( $column, $post_id ) { + switch ( $column ) { + case "starttime": + $starttime = intval(get_post_meta( $post_id, '_neuf_events_starttime', true)); + echo format_datetime($starttime); + break; + case "endtime": + $endtime = intval(get_post_meta( $post_id, '_neuf_events_endtime', true)); + echo $endtime ? format_datetime($endtime) : __("None", 'neuf_event'); + break; + case "type": + echo the_terms( $post_id , 'event_type', '', ', ', '' ); + break; + case "venue": + echo get_post_meta( $post_id , '_neuf_events_venue', true); + break; + case "promoperiod": + echo get_post_meta( $post_id, '_neuf_events_promo_period', true); + break; + } +} +add_action( "manage_posts_custom_column" , "custom_columns", 10, 2 ); + +// Make these columns sortable +function sortable_columns( $cols ) { + $custom_cols = array( + 'starttime' => 'starttime', + 'endtime' => 'endtime', + 'type' => 'type', + 'venue' => 'venue', + 'promoperiod' => 'promoperiod', + ); + return array_merge($cols, $custom_cols); +} +add_filter( "manage_edit-event_sortable_columns", "sortable_columns" ); + +function add_admin_script_and_styles() { + // Date-selection for events + wp_register_style('timecss', plugins_url("/neuf-events/style/jquery-ui-1.8.12.custom.css", dirname(__FILE__))); + + wp_register_script('timepicker', plugins_url("/neuf-events/script/jquery-ui-timepicker-addon.js", dirname(__FILE__))); + wp_register_script('timedefs', plugins_url("/neuf-events/script/timepickdef.js", dirname(__FILE__))); + // for upgrading jQuery ui, get core, widget, mouse, slider and datepicker + wp_register_script('custom-jqui', plugins_url("/neuf-events/script/jquery-ui-1.8.11.custom.min.js", dirname(__FILE__))); + + // form validation: http://docs.jquery.com/Plugins/Validation#API_Documentation + wp_register_script('formvalidation', plugins_url("/neuf-events/script/jquery.validate.min.js", dirname(__FILE__))); + wp_register_script('validation_rules', plugins_url("/neuf-events/script/validation_rules.js", dirname(__FILE__))); + + wp_enqueue_style('timecss'); + wp_enqueue_script('jquery'); + wp_enqueue_script('custom-jqui'); + wp_enqueue_script('timepicker'); + wp_enqueue_script('timedefs'); + wp_enqueue_script('formvalidation'); + wp_enqueue_script('validation_rules'); +} + +/* Add metaboxes (with styles) */ +function add_events_metaboxes() { + add_admin_script_and_styles(); + + add_meta_box( + 'neuf_events_details', + __('Event Details', 'neuf_event'), + 'neuf_event_details', + 'event', + 'side', + 'high' + ); +} + +function neuf_event_details() { +?> +
+ +
+
+ +
+
+ +
+
+ +
+ID, '_neuf_events_starttime', true); + $end = get_post_meta($post->ID, '_neuf_events_endtime', true); + + wp_nonce_field( 'neuf_events_nonce','neuf_events_nonce' ); +?> + " />
+ " />
+ID, '_neuf_events_venue', true); + _e('Venue:', 'neuf_event'); + echo '
'; +} +/* Promo period */ +function neuf_event_promoperiod(){ + global $post; + + $promoperiod = array( + __('Default', 'neuf_event'), __('Week', 'neuf_event'), __('Month', 'neuf_event'), __('Semester', 'neuf_event'), + ); + $neuf_event_promoperiod = get_post_meta($post->ID, '_neuf_events_promo_period', true); + _e('Promo Period', 'neuf_event'); + echo '
'; +} + +/* Price and additional info. */ +function neuf_event_div() { + global $post; + + $event_price_regular = get_post_meta($post->ID, '_neuf_events_price_regular') ? get_post_meta($post->ID, '_neuf_events_price_regular', true) : ""; + $event_price_member = get_post_meta($post->ID, '_neuf_events_price_member') ? get_post_meta($post->ID, '_neuf_events_price_member', true) : ""; + $event_bs = get_post_meta($post->ID, '_neuf_events_bs_url') ? get_post_meta($post->ID, '_neuf_events_bs_url', true) : ""; + $event_fb = get_post_meta($post->ID, '_neuf_events_fb_url', true); + + ?> + +
+ +
+ +
+ + + General. */ +if( !function_exists('format_datetime') ) { + function format_datetime($timestamp) { + return date_i18n(get_option('date_format')." ".get_option('time_format'), intval($timestamp)); + } +} + +?> diff --git a/wp-content/plugins/neuf-events/neuf-events-json-controller.php b/wp-content/plugins/neuf-events/neuf-events-json-controller.php new file mode 100644 index 0000000..48009d6 --- /dev/null +++ b/wp-content/plugins/neuf-events/neuf-events-json-controller.php @@ -0,0 +1,48 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' + ); + + $query = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 50, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' + ); + $custom_fields = array( + '_neuf_events_price_regular', + '_neuf_events_starttime', + '_neuf_events_endtime', + '_neuf_events_venue', + '_neuf_events_bs_url', + '_neuf_events_fb_url', + ); + $json_api->query->custom_fields = implode(',', $custom_fields); + $events = $json_api->introspector->get_posts($query); + return $this->events_result($events); + } + protected function events_result($events) { + global $wp_query; + return array( + 'count' => count($events), + 'count_total' => (int) $wp_query->found_posts, + 'pages' => $wp_query->max_num_pages, + 'events' => $events + ); + } +} +?> diff --git a/wp-content/plugins/neuf-events/neuf-events-post-types.php b/wp-content/plugins/neuf-events/neuf-events-post-types.php new file mode 100644 index 0000000..7ee02e9 --- /dev/null +++ b/wp-content/plugins/neuf-events/neuf-events-post-types.php @@ -0,0 +1,132 @@ + __( 'Events', 'neuf_event'), + 'singular_name' => __( 'Event', 'neuf_event'), + 'add_new' => __( 'Add New', 'neuf_event'), + 'add_new_item' => __( 'Add New', 'neuf_event'), + 'edit_item' => __( 'Edit Event', 'neuf_event'), + 'new_item' => __( 'Add New Event', 'neuf_event'), + 'view_item' => __( 'View Event', 'neuf_event'), + 'search_items' => __( 'Search Events', 'neuf_event'), + 'not_found' => __( 'No events found', 'neuf_event'), + 'not_found_in_trash' => __( 'No events found in trash', 'neuf_event') + ); + register_post_type( + 'event', + array( + 'labels' => $labels, + 'menu_position' => 5, + 'public' => true, + 'publicly_queryable' => true, + 'query_var' => 'event', + 'show_ui' => true, + 'capability_type' => 'post', + 'supports' => array( + 'title', + 'editor', + 'author', + 'thumbnail', + 'excerpt', + 'comments', + 'revisions', + 'administrator', + 'custom-fields' + ), + 'register_meta_box_cb' => 'add_events_metaboxes', + ) + ); +} + + +/* When the post is saved, save our custom data */ +function neuf_events_save_post( $post_id, $post ) { + // verify this came from the our screen and with proper authorization, + // because save_post can be triggered at other times + if ( !array_key_exists('neuf_events_nonce', $_POST) || !wp_verify_nonce( $_POST['neuf_events_nonce'], 'neuf_events_nonce' )) { + return $post_id; + } + + // If this is an auto save routine, our form has not been submitted, + // and we do nothing. + if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id; + + // Check permissions + if ( !current_user_can( 'edit_post', $post_id ) ) return $post_id; + + // Date strings are converted to unix time + $tosave['_neuf_events_starttime'] = strtotime( $_POST['_neuf_events_starttime'] ); + $tosave['_neuf_events_endtime'] = strtotime( $_POST['_neuf_events_endtime'] ); + $tosave['_neuf_events_price_regular'] = $_POST['_neuf_events_price_regular']; + $tosave['_neuf_events_price_member'] = $_POST['_neuf_events_price_member']; + $tosave['_neuf_events_bs_url'] = $_POST['_neuf_events_bs_url']; + $tosave['_neuf_events_fb_url'] = $_POST['_neuf_events_fb_url']; + $tosave['_neuf_events_venue'] = $_POST['_neuf_events_venue']; + $tosave['_neuf_events_promo_period'] = $_POST['_neuf_events_promo_period']; + + // Update or add post meta + foreach($tosave as $key=>$value) + if(!update_post_meta($post_id, $key, $value)) { + add_post_meta($post_id, $key, $value, true); + } + + return $post_id; +} + +/** Sample table view of events */ +function neuf_events_program() { + global $post, $wp_locale; + + $events = new WP_Query( array( + 'post_type' => 'event', + 'posts_per_page' => -1, + 'meta_key' => '_neuf_events_starttime', + 'orderby' => 'meta_value', + 'order' => 'ASC' + ) ); + + if ( $events->have_posts() ) : + $date = ""; + ob_start(); + + echo ''; + + while ( $events->have_posts() ) : $events->the_post(); + $venue = get_post_meta( $post->ID, '_neuf_events_venue', true); + $price_regular = get_post_meta( $post->ID, '_neuf_events_price_regular', true); + $price_member = get_post_meta( $post->ID, '_neuf_events_price_member', true); + $time = get_post_meta( $post->ID, '_neuf_events_starttime', true); + ?> + + + + + + + '; + endif; + + $html = ob_get_contents(); + ob_end_clean(); + return $html; +} + +?> diff --git a/wp-content/plugins/neuf-events/neuf-events-taxonomies.php b/wp-content/plugins/neuf-events/neuf-events-taxonomies.php new file mode 100644 index 0000000..271d349 --- /dev/null +++ b/wp-content/plugins/neuf-events/neuf-events-taxonomies.php @@ -0,0 +1,82 @@ + __('Event Type', 'neuf_event'), //Arrangementstype + 'singular_name' => __('Event Type', 'neuf_event'), + 'search_items' => __('Search Event Types', 'neuf_event'),//'Søk etter arrangementstype', + 'all_items' => __('All Event Types', 'neuf_event'), + 'parent_item' => __('Subtype of', 'neuf_event'),//'Undertype av', + 'parent_item_colon' => __('Subtype of:', 'neuf_event'),//'Undertype av:', + 'edit_item' => __('Edit Event Type', 'neuf_event'), + 'update_item' => __('Update Event Type', 'neuf_event'), + 'add_new_item' => __('Add New Event Type', 'neuf_event'), + 'new_item_name' => __('Name', 'neuf_event'),//'Navn på ny arrangementstype', + 'menu_name' => __('Event Types', 'neuf_event'), + ); + + register_taxonomy( 'event_type', array( + 'post', + 'event' + ), array( + 'hierarchical' => true, + 'labels' => $labels, + 'show_ui' => true, + 'query_var' => true, + 'rewrite' => array( + 'slug' => 'eventtypes', + 'hierarchical' => true + ) + ) ); +} + +/** + * Extend post_class() to include event type classes. + * + * post_class() is called to output semantic classes to post elements. In this function, we add a class for each event type associated with the post. + * + * In the neuf-old-style theme, consider using neuf_post_class() instead. (Defined in the theme's functions.php.) + * + * This function was originally written to be able to display different icons on different types of events. + */ +function neuf_post_class_event_type( $classes ) { + global $post; + + if ( is_object_in_taxonomy( $post->post_type, 'event_type' ) ) { + foreach ( (array) get_the_terms ( $post->ID , 'event_type' ) as $event_type ) { + if ( empty( $event_type->slug ) ) + continue; + $classes[] = 'event-type-' . sanitize_html_class( $event_type->slug, $event_type->term_id); + } + } + + return $classes; +} +add_filter( 'post_class', 'neuf_post_class_event_type' ); + +/* Default terms for custom taxonomies */ +function neuf_events_set_default_object_terms( $post_id, $post ) { + /* Make sure it's an event */ + if ( !isset($_POST['post_type']) || $_POST['post_type'] !== 'event' ) { + return; + } + /* Taxonomy => array of default terms */ + $defaults = array( + 'event_type' => array( 'annet' ), + ); + $taxonomies = get_object_taxonomies( $_POST['post_type'] ); + foreach ( (array) $taxonomies as $taxonomy ) { + $terms = wp_get_post_terms( $post_id, $taxonomy ); + /* No tax terms assoc with post? */ + if ( empty( $terms ) && array_key_exists( $taxonomy, $defaults ) ) { + /* ... then add defaults */ + wp_set_object_terms( $post_id, $defaults[$taxonomy], $taxonomy ); + } + } +} +add_action( 'save_post', 'neuf_events_set_default_object_terms', 100, 2 ); +?> diff --git a/wp-content/plugins/neuf-events/neuf-events.php b/wp-content/plugins/neuf-events/neuf-events.php new file mode 100644 index 0000000..f347651 --- /dev/null +++ b/wp-content/plugins/neuf-events/neuf-events.php @@ -0,0 +1,48 @@ + diff --git a/wp-content/plugins/neuf-events/script/jquery-1.5.1.min.js b/wp-content/plugins/neuf-events/script/jquery-1.5.1.min.js new file mode 100644 index 0000000..6437874 --- /dev/null +++ b/wp-content/plugins/neuf-events/script/jquery-1.5.1.min.js @@ -0,0 +1,16 @@ +/*! + * jQuery JavaScript Library v1.5.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Wed Feb 23 13:55:29 2011 -0500 + */ +(function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
+ + + kl + + + + +
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return k(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){$(a,e),f=_(a),g=_(e);for(h=0;f[h];++h)$(f[h],g[h])}if(b){Z(a,e);if(c){f=_(a),g=_(e);for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bb=/alpha\([^)]*\)/i,bc=/opacity=([^)]*)/,bd=/-([a-z])/ig,be=/([A-Z])/g,bf=/^-?\d+(?:px)?$/i,bg=/^-?\d/,bh={position:"absolute",visibility:"hidden",display:"block"},bi=["Left","Right"],bj=["Top","Bottom"],bk,bl,bm,bn=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bk(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bk)return bk(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bd,bn)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bo(a,b,e):d.swap(a,bh,function(){f=bo(a,b,e)});if(f<=0){f=bk(a,b,b),f==="0px"&&bm&&(f=bm(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bf.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bb.test(f)?f.replace(bb,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bl=function(a,c,e){var f,g,h;e=e.replace(be,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bm=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bf.test(d)&&bg.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bk=bl||bm,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bp=/%20/g,bq=/\[\]$/,br=/\r?\n/g,bs=/#.*$/,bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bu=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bv=/(?:^file|^widget|\-extension):$/,bw=/^(?:GET|HEAD)$/,bx=/^\/\//,by=/\?/,bz=/)<[^<]*)*<\/script>/gi,bA=/^(?:select|textarea)/i,bB=/\s+/,bC=/([?&])_=[^&]*/,bD=/(^|\-)([a-z])/g,bE=function(a,b,c){return b+c.toUpperCase()},bF=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,bG=d.fn.load,bH={},bI={},bJ,bK;try{bJ=c.location.href}catch(bL){bJ=c.createElement("a"),bJ.href="",bJ=bJ.href}bK=bF.exec(bJ.toLowerCase()),d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bG)return bG.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("
").append(c.replace(bz,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bA.test(this.nodeName)||bu.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(br,"\r\n")}}):{name:b.name,value:c.replace(br,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bJ,isLocal:bv.test(bK[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bM(bH),ajaxTransport:bM(bI),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bP(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bQ(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bD,bE)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bt.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bs,"").replace(bx,bK[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bB),e.crossDomain||(q=bF.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bK[1]||q[2]!=bK[2]||(q[3]||(q[1]==="http:"?80:443))!=(bK[3]||(bK[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bN(bH,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!bw.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(by.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bC,"$1_="+w);e.url=x+(x===e.url?(by.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bN(bI,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bO(g,a[g],c,f);return e.join("&").replace(bp,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bR=d.now(),bS=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bR++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bS.test(b.url)||f&&bS.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bS,l),b.url===j&&(f&&(k=k.replace(bS,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bT=d.now(),bU,bV;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bX()||bY()}:bX,bV=d.ajaxSettings.xhr(),d.support.ajax=!!bV,d.support.cors=bV&&"withCredentials"in bV,bV=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),(!a.crossDomain||a.hasContent)&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bU[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bU||(bU={},bW()),h=bT++,g.onreadystatechange=bU[h]=c):c()},abort:function(){c&&c(0,1)}}}});var bZ={},b$=/^(?:toggle|show|hide)$/,b_=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ca,cb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(cc("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:cc("show",1),slideUp:cc("hide",1),slideToggle:cc("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!ca&&(ca=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=cf.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!cf.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=cg(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=cg(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); \ No newline at end of file diff --git a/wp-content/plugins/neuf-events/script/jquery-ui-1.8.11.custom.min.js b/wp-content/plugins/neuf-events/script/jquery-ui-1.8.11.custom.min.js new file mode 100644 index 0000000..6fd841d --- /dev/null +++ b/wp-content/plugins/neuf-events/script/jquery-ui-1.8.11.custom.min.js @@ -0,0 +1,165 @@ +/*! + * jQuery UI 1.8.12 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.12",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, +NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, +"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); +if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, +"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, +d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); +c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate); +if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Slider 1.8.12 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled"); +this.range=d([]);if(a.range){if(a.range===true){this.range=d("
");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle"); +if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur(); +else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e= +false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h=== +b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); +this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b, +g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true}, +_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a; +if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value= +this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, +_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate); +if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, +1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.12"})})(jQuery); +;/* + * jQuery UI Datepicker 1.8.12 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker + * + * Depends: + * jquery.ui.core.js + */ +(function(d,A){function K(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass= +"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su", +"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10", +minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('
')}function F(a,b){d.extend(a,b);for(var c in b)if(b[c]== +null||b[c]==A)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.12"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){F(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(); +f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('
')}}, +_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&& +b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f== +""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a, +c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b), +true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}F(a.settings,e||{}); +b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); +this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", +this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs, +function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null: +f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target); +if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a); +d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");F(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-= +document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim"); +var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst= +b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover"); +this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+ +this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&& +a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth(): +0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a), +"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"? +"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a= +d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a= +d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c== +"M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth= +b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker(); +this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0); +a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c? +c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y", +RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay= +a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(), +b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n= +this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+r+"":f?"":''+r+"";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
'+(c?h:"")+(this._isInRange(a,r)?'":"")+(c?"":h)+"
":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z= +this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",D=0;D1)switch(E){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]- +1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='
'+(/all|left/.test(t)&&D==0?c?f:n:"")+(/all|right/.test(t)&&D==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,D>0||E>0,z,w)+'
';var B=j?'":"";for(t=0;t<7;t++){var q= +(t+h)%7;B+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+""}x+=B+"";B=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,B);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;B=l?6:Math.ceil((t+B)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O";var P=!j?"":'";for(t=0;t<7;t++){var G= +p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&qo;P+='";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+= +P+""}g++;if(g>11){g=0;m++}x+="
'+this._get(a,"weekHeader")+"
'+this._get(a,"calculateWeek")(q)+""+(C&&!v?" ":J?''+q.getDate()+"":''+q.getDate()+"")+"
"+(l?""+(i[0]>0&&E==i[1]-1?'
':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
', +o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& +l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
";return k},_adjustInstDate:function(a,b,c){var e= +a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, +"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); +c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= +function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, +[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.12";window["DP_jQuery_"+y]=d})(jQuery); +; diff --git a/wp-content/plugins/neuf-events/script/jquery-ui-timepicker-addon.js b/wp-content/plugins/neuf-events/script/jquery-ui-timepicker-addon.js new file mode 100644 index 0000000..85c795c --- /dev/null +++ b/wp-content/plugins/neuf-events/script/jquery-ui-timepicker-addon.js @@ -0,0 +1,911 @@ +/* +* jQuery timepicker addon +* By: Trent Richardson [http://trentrichardson.com] +* Version 0.9.3 +* Last Modified: 02/05/2011 +* +* Copyright 2010 Trent Richardson +* Dual licensed under the MIT and GPL licenses. +* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt +* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt +* +* HERES THE CSS: +* .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; } +* .ui-timepicker-div dl{ text-align: left; } +* .ui-timepicker-div dl dt{ height: 25px; } +* .ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; } +* .ui-timepicker-div td { font-size: 90%; } +*/ + +(function($) { + +$.extend($.ui, { timepicker: { version: "0.9.3" } }); + +/* Time picker manager. + Use the singleton instance of this class, $.timepicker, to interact with the time picker. + Settings for (groups of) time pickers are maintained in an instance object, + allowing multiple different settings on the same page. */ + +function Timepicker() { + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + currentText: 'Now', + closeText: 'Done', + ampm: false, + timeFormat: 'hh:mm tt', + timeOnlyTitle: 'Choose Time', + timeText: 'Time', + hourText: 'Hour', + minuteText: 'Minute', + secondText: 'Second' + }; + this._defaults = { // Global defaults for all the datetime picker instances + showButtonPanel: true, + timeOnly: false, + showHour: true, + showMinute: true, + showSecond: false, + showTime: true, + stepHour: 0.05, + stepMinute: 0.05, + stepSecond: 0.05, + hour: 0, + minute: 0, + second: 0, + hourMin: 0, + minuteMin: 0, + secondMin: 0, + hourMax: 23, + minuteMax: 59, + secondMax: 59, + minDateTime: null, + maxDateTime: null, + hourGrid: 0, + minuteGrid: 0, + secondGrid: 0, + alwaysSetTime: true, + separator: ' ', + altFieldTimeOnly: true, + showTimepicker: true + }; + $.extend(this._defaults, this.regional['']); +} + +$.extend(Timepicker.prototype, { + $input: null, + $altInput: null, + $timeObj: null, + inst: null, + hour_slider: null, + minute_slider: null, + second_slider: null, + hour: 0, + minute: 0, + second: 0, + hourMinOriginal: null, + minuteMinOriginal: null, + secondMinOriginal: null, + hourMaxOriginal: null, + minuteMaxOriginal: null, + secondMaxOriginal: null, + ampm: '', + formattedDate: '', + formattedTime: '', + formattedDateTime: '', + + /* Override the default settings for all instances of the time picker. + @param settings object - the new settings to use as defaults (anonymous object) + @return the manager object */ + setDefaults: function(settings) { + extendRemove(this._defaults, settings || {}); + return this; + }, + + //######################################################################## + // Create a new Timepicker instance + //######################################################################## + _newInst: function($input, o) { + var tp_inst = new Timepicker(), + inlineSettings = {}; + + tp_inst.hour = tp_inst._defaults.hour; + tp_inst.minute = tp_inst._defaults.minute; + tp_inst.second = tp_inst._defaults.second; + tp_inst.ampm = ''; + tp_inst.$input = $input; + + + for (var attrName in this._defaults) { + var attrValue = $input.attr('time:' + attrName); + if (attrValue) { + try { + inlineSettings[attrName] = eval(attrValue); + } catch (err) { + inlineSettings[attrName] = attrValue; + } + } + } + tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, { + beforeShow: function(input, dp_inst) { + if ($.isFunction(o.beforeShow)) + o.beforeShow(input, dp_inst, tp_inst); + }, + onChangeMonthYear: function(year, month, dp_inst) { + // Update the time as well : this prevents the time from disappearing from the $input field. + tp_inst._updateDateTime(dp_inst); + if ($.isFunction(o.onChangeMonthYear)) + o.onChangeMonthYear(year, month, dp_inst, tp_inst); + }, + onClose: function(dateText, dp_inst) { + if (tp_inst.timeDefined === true && $input.val() != '') + tp_inst._updateDateTime(dp_inst); + if ($.isFunction(o.onClose)) + o.onClose(dateText, dp_inst, tp_inst); + }, + timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); + }); + + if (o.altField) + tp_inst.$altInput = $(o.altField) + .css({ cursor: 'pointer' }) + .focus(function(){ $input.trigger("focus"); }); + + // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. + if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) + tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); + if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) + tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); + if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) + tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); + if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) + tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); + + return tp_inst; + }, + + //######################################################################## + // add our sliders to the calendar + //######################################################################## + _addTimePicker: function(dp_inst) { + var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? + this.$input.val() + ' ' + this.$altInput.val() : + this.$input.val(); + + this.timeDefined = this._parseTime(currDT); + this._limitMinMaxDateTime(dp_inst, false); + this._injectTimePicker(); + }, + + //######################################################################## + // parse the time string from input value or _setTime + //######################################################################## + _parseTime: function(timeString, withDate) { + var regstr = this._defaults.timeFormat.toString() + .replace(/h{1,2}/ig, '(\\d?\\d)') + .replace(/m{1,2}/ig, '(\\d?\\d)') + .replace(/s{1,2}/ig, '(\\d?\\d)') + .replace(/t{1,2}/ig, '(am|pm|a|p)?') + .replace(/\s/g, '\\s?') + '$', + order = this._getFormatPositions(), + treg; + + if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]); + + if (withDate || !this._defaults.timeOnly) { + // the time should come after x number of characters and a space. + // x = at least the length of text specified by the date format + var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); + regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator + regstr; + } + + treg = timeString.match(new RegExp(regstr, 'i')); + + if (treg) { + if (order.t !== -1) + this.ampm = ((treg[order.t] === undefined || treg[order.t].length === 0) ? + '' : + (treg[order.t].charAt(0).toUpperCase() == 'A') ? 'AM' : 'PM').toUpperCase(); + + if (order.h !== -1) { + if (this.ampm == 'AM' && treg[order.h] == '12') + this.hour = 0; // 12am = 0 hour + else if (this.ampm == 'PM' && treg[order.h] != '12') + this.hour = (parseFloat(treg[order.h]) + 12).toFixed(0); // 12pm = 12 hour, any other pm = hour + 12 + else this.hour = Number(treg[order.h]); + } + + if (order.m !== -1) this.minute = Number(treg[order.m]); + if (order.s !== -1) this.second = Number(treg[order.s]); + + return true; + + } + return false; + }, + + //######################################################################## + // figure out position of time elements.. cause js cant do named captures + //######################################################################## + _getFormatPositions: function() { + var finds = this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|t{1,2})/g), + orders = { h: -1, m: -1, s: -1, t: -1 }; + + if (finds) + for (var i = 0; i < finds.length; i++) + if (orders[finds[i].toString().charAt(0)] == -1) + orders[finds[i].toString().charAt(0)] = i + 1; + + return orders; + }, + + //######################################################################## + // generate and inject html for timepicker into ui datepicker + //######################################################################## + _injectTimePicker: function() { + var $dp = this.inst.dpDiv, + o = this._defaults, + tp_inst = this, + // Added by Peter Medeiros: + // - Figure out what the hour/minute/second max should be based on the step values. + // - Example: if stepMinute is 15, then minMax is 45. + hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0), + minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0), + secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0), + dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, ''); + + // Prevent displaying twice + //if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) { + if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0 && o.showTimepicker) { + var noDisplay = ' style="display:none;"', + html = '
' + + '
' + o.timeText + '
' + + '
' + + '
' + o.hourText + '
', + hourGridSize = 0, + minuteGridSize = 0, + secondGridSize = 0, + size; + + if (o.showHour && o.hourGrid > 0) { + html += '
' + + '
' + + '
'; + + for (var h = o.hourMin; h < hourMax; h += o.hourGrid) { + hourGridSize++; + var tmph = (o.ampm && h > 12) ? h-12 : h; + if (tmph < 10) tmph = '0' + tmph; + if (o.ampm) { + if (h == 0) tmph = 12 +'a'; + else if (h < 12) tmph += 'a'; + else tmph += 'p'; + } + html += ''; + } + + html += '
' + tmph + '
' + + '
'; + } else html += '
'; + + html += '
' + o.minuteText + '
'; + + if (o.showMinute && o.minuteGrid > 0) { + html += '
' + + '
' + + '
'; + + for (var m = o.minuteMin; m < minMax; m += o.minuteGrid) { + minuteGridSize++; + html += ''; + } + + html += '
' + ((m < 10) ? '0' : '') + m + '
' + + '
'; + } else html += '
'; + + html += '
' + o.secondText + '
'; + + if (o.showSecond && o.secondGrid > 0) { + html += '
' + + '
' + + '
'; + + for (var s = o.secondMin; s < secMax; s += o.secondGrid) { + secondGridSize++; + html += ''; + } + + html += '
' + ((s < 10) ? '0' : '') + s + '
' + + '
'; + } else html += '
'; + + html += '
'; + $tp = $(html); + + // if we only want time picker... + if (o.timeOnly === true) { + $tp.prepend( + '
' + + '
' + o.timeOnlyTitle + '
' + + '
'); + $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); + } + + this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({ + orientation: "horizontal", + value: this.hour, + min: o.hourMin, + max: hourMax, + step: o.stepHour, + slide: function(event, ui) { + tp_inst.hour_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + // Updated by Peter Medeiros: + // - Pass in Event and UI instance into slide function + this.minute_slider = $tp.find('#ui_tpicker_minute_'+ dp_id).slider({ + orientation: "horizontal", + value: this.minute, + min: o.minuteMin, + max: minMax, + step: o.stepMinute, + slide: function(event, ui) { + // update the global minute slider instance value with the current slider value + tp_inst.minute_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({ + orientation: "horizontal", + value: this.second, + min: o.secondMin, + max: secMax, + step: o.stepSecond, + slide: function(event, ui) { + tp_inst.second_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + // Add grid functionality + if (o.showHour && o.hourGrid > 0) { + size = 100 * hourGridSize * o.hourGrid / (hourMax - o.hourMin); + + $tp.find(".ui_tpicker_hour table").css({ + width: size + "%", + marginLeft: (size / (-2 * hourGridSize)) + "%", + borderCollapse: 'collapse' + }).find("td").each( function(index) { + $(this).click(function() { + var h = $(this).html(); + if(o.ampm) { + var ap = h.substring(2).toLowerCase(), + aph = parseInt(h.substring(0,2)); + if (ap == 'a') { + if (aph == 12) h = 0; + else h = aph; + } else if (aph == 12) h = 12; + else h = aph + 12; + } + tp_inst.hour_slider.slider("option", "value", h); + tp_inst._onTimeChange(); + }).css({ + cursor: 'pointer', + width: (100 / hourGridSize) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + }); + } + + if (o.showMinute && o.minuteGrid > 0) { + size = 100 * minuteGridSize * o.minuteGrid / (minMax - o.minuteMin); + $tp.find(".ui_tpicker_minute table").css({ + width: size + "%", + marginLeft: (size / (-2 * minuteGridSize)) + "%", + borderCollapse: 'collapse' + }).find("td").each(function(index) { + $(this).click(function() { + tp_inst.minute_slider.slider("option", "value", $(this).html()); + tp_inst._onTimeChange(); + }).css({ + cursor: 'pointer', + width: (100 / minuteGridSize) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + }); + } + + if (o.showSecond && o.secondGrid > 0) { + $tp.find(".ui_tpicker_second table").css({ + width: size + "%", + marginLeft: (size / (-2 * secondGridSize)) + "%", + borderCollapse: 'collapse' + }).find("td").each(function(index) { + $(this).click(function() { + tp_inst.second_slider.slider("option", "value", $(this).html()); + tp_inst._onTimeChange(); + }).css({ + cursor: 'pointer', + width: (100 / secondGridSize) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + }); + } + + var $buttonPanel = $dp.find('.ui-datepicker-buttonpane'); + if ($buttonPanel.length) $buttonPanel.before($tp); + else $dp.append($tp); + + this.$timeObj = $('#ui_tpicker_time_'+ dp_id); + + if (this.inst !== null) { + var timeDefined = this.timeDefined; + this._onTimeChange(); + this.timeDefined = timeDefined; + } + + //Emulate datepicker onSelect behavior. Call on slidestop. + var onSelect = tp_inst._defaults['onSelect']; + if (onSelect) { + var inputEl = tp_inst.$input ? tp_inst.$input[0] : null; + var onSelectHandler = function() { + onSelect.apply(inputEl, [tp_inst.formattedDateTime, tp_inst]); // trigger custom callback*/ + } + this.hour_slider.bind('slidestop',onSelectHandler); + this.minute_slider.bind('slidestop',onSelectHandler); + this.second_slider.bind('slidestop',onSelectHandler); + } + } + }, + + //######################################################################## + // This function tries to limit the ability to go outside the + // min/max date range + //######################################################################## + _limitMinMaxDateTime: function(dp_inst, adjustSliders){ + var o = this._defaults, + dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay), + tp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay, this.hour, this.minute, this.second, 0); + + if(this._defaults.minDateTime !== null && dp_date){ + var minDateTime = this._defaults.minDateTime, + minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0); + + if(this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null){ + this.hourMinOriginal = o.hourMin; + this.minuteMinOriginal = o.minuteMin; + this.secondMinOriginal = o.secondMin; + } + + if(minDateTimeDate.getTime() == dp_date.getTime()){ + this._defaults.hourMin = minDateTime.getHours(); + this._defaults.minuteMin = minDateTime.getMinutes(); + this._defaults.secondMin = minDateTime.getSeconds(); + + if(this.hour < this._defaults.hourMin) this.hour = this._defaults.hourMin; + if(this.minute < this._defaults.minuteMin) this.minute = this._defaults.minuteMin; + if(this.second < this._defaults.secondMin) this.second = this._defaults.secondMin; + }else{ + this._defaults.hourMin = this.hourMinOriginal; + this._defaults.minuteMin = this.minuteMinOriginal; + this._defaults.secondMin = this.secondMinOriginal; + } + } + + if(this._defaults.maxDateTime !== null && dp_date){ + var maxDateTime = this._defaults.maxDateTime, + maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0); + + if(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){ + this.hourMaxOriginal = o.hourMax; + this.minuteMaxOriginal = o.minuteMax; + this.secondMaxOriginal = o.secondMax; + } + + if(maxDateTimeDate.getTime() == dp_date.getTime()){ + this._defaults.hourMax = maxDateTime.getHours(); + this._defaults.minuteMax = maxDateTime.getMinutes(); + this._defaults.secondMax = maxDateTime.getSeconds(); + + if(this.hour > this._defaults.hourMax){ this.hour = this._defaults.hourMax; } + if(this.minute > this._defaults.minuteMax) this.minute = this._defaults.minuteMax; + if(this.second > this._defaults.secondMax) this.second = this._defaults.secondMax; + }else{ + this._defaults.hourMax = this.hourMaxOriginal; + this._defaults.minuteMax = this.minuteMaxOriginal; + this._defaults.secondMax = this.secondMaxOriginal; + } + } + + if(adjustSliders !== undefined && adjustSliders === true){ + this.hour_slider.slider("option", { min: this._defaults.hourMin, max: this._defaults.hourMax }).slider('value', this.hour); + this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: this._defaults.minuteMax }).slider('value', this.minute); + this.second_slider.slider("option", { min: this._defaults.secondMin, max: this._defaults.secondMax }).slider('value', this.second); + } + + }, + + //######################################################################## + // when a slider moves, set the internal time... + // on time change is also called when the time is updated in the text field + //######################################################################## + _onTimeChange: function() { + var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false, + minute = (this.minute_slider) ? this.minute_slider.slider('value') : false, + second = (this.second_slider) ? this.second_slider.slider('value') : false; + + if (hour !== false) hour = parseInt(hour,10); + if (minute !== false) minute = parseInt(minute,10); + if (second !== false) second = parseInt(second,10); + + var ampm = (hour < 12) ? 'AM' : 'PM'; + + // If the update was done in the input field, the input field should not be updated. + // If the update was done using the sliders, update the input field. + var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || (this.ampm.length > 0 && this.ampm != ampm)); + + if (hasChanged) { + + if (hour !== false)this.hour = hour; + if (minute !== false) this.minute = minute; + if (second !== false) this.second = second; + } + if (this._defaults.ampm) this.ampm = ampm; + + this._formatTime(); + if (this.$timeObj) this.$timeObj.text(this.formattedTime); + this.timeDefined = true; + if (hasChanged) this._updateDateTime(); + }, + + //######################################################################## + // format the time all pretty... + //######################################################################## + _formatTime: function(time, format, ampm) { + if (ampm == undefined) ampm = this._defaults.ampm; + time = time || { hour: this.hour, minute: this.minute, second: this.second, ampm: this.ampm }; + var tmptime = format || this._defaults.timeFormat.toString(); + + if (ampm) { + var hour12 = ((time.ampm == 'AM') ? (time.hour) : (time.hour % 12)); + hour12 = (Number(hour12) === 0) ? 12 : hour12; + tmptime = tmptime.toString() + .replace(/hh/g, ((hour12 < 10) ? '0' : '') + hour12) + .replace(/h/g, hour12) + .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute) + .replace(/m/g, time.minute) + .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second) + .replace(/s/g, time.second) + .replace(/TT/g, time.ampm.toUpperCase()) + .replace(/tt/g, time.ampm.toLowerCase()) + .replace(/T/g, time.ampm.charAt(0).toUpperCase()) + .replace(/t/g, time.ampm.charAt(0).toLowerCase()); + } else { + tmptime = tmptime.toString() + .replace(/hh/g, ((time.hour < 10) ? '0' : '') + time.hour) + .replace(/h/g, time.hour) + .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute) + .replace(/m/g, time.minute) + .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second) + .replace(/s/g, time.second); + tmptime = $.trim(tmptime.replace(/t/gi, '')); + } + + if (arguments.length) return tmptime; + else this.formattedTime = tmptime; + }, + + //######################################################################## + // update our input with the new date time.. + //######################################################################## + _updateDateTime: function(dp_inst) { + dp_inst = this.inst || dp_inst, + dt = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay), + dateFmt = $.datepicker._get(dp_inst, 'dateFormat'), + formatCfg = $.datepicker._getFormatConfig(dp_inst), + timeAvailable = dt !== null && this.timeDefined; + this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); + var formattedDateTime = this.formattedDate; + if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) + return; + + if (this._defaults.timeOnly === true) { + formattedDateTime = this.formattedTime; + } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { + formattedDateTime += this._defaults.separator + this.formattedTime; + } + + this.formattedDateTime = formattedDateTime; + + if(!this._defaults.showTimepicker) { + this.$input.val(this.formattedDate); + } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) { + this.$altInput.val(this.formattedTime); + this.$input.val(this.formattedDate); + } else if(this.$altInput) { + this.$altInput.val(formattedDateTime); + this.$input.val(formattedDateTime); + } else { + this.$input.val(formattedDateTime); + } + + this.$input.trigger("change"); + } + +}); + +$.fn.extend({ + //######################################################################## + // shorthand just to use timepicker.. + //######################################################################## + timepicker: function(o) { + o = o || {}; + var tmp_args = arguments; + + if (typeof o == 'object') tmp_args[0] = $.extend(o, { timeOnly: true }); + + return $(this).each(function() { + $.fn.datetimepicker.apply($(this), tmp_args); + }); + }, + + //######################################################################## + // extend timepicker to datepicker + //######################################################################## + datetimepicker: function(o) { + o = o || {}; + var $input = this, + tmp_args = arguments; + + if (typeof(o) == 'string'){ + if(o == 'getDate') + return $.fn.datepicker.apply($(this[0]), tmp_args); + else + return this.each(function() { + var $t = $(this); + $t.datepicker.apply($t, tmp_args); + }); + } + else + return this.each(function() { + var $t = $(this); + $t.datepicker($.timepicker._newInst($t, o)._defaults); + }); + } +}); + +//######################################################################## +// the bad hack :/ override datepicker so it doesnt close on select +// inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378 +//######################################################################## +$.datepicker._base_selectDate = $.datepicker._selectDate; +$.datepicker._selectDate = function (id, dateStr) { + var inst = this._getInst($(id)[0]), + tp_inst = this._get(inst, 'timepicker'); + + if (tp_inst) { + tp_inst._limitMinMaxDateTime(inst, true); + inst.inline = inst.stay_open = true; + //This way the onSelect handler called from calendarpicker get the full dateTime + this._base_selectDate(id, dateStr + tp_inst._defaults.separator + tp_inst.formattedTime); + inst.inline = inst.stay_open = false; + this._notifyChange(inst); + this._updateDatepicker(inst); + } + else this._base_selectDate(id, dateStr); +}; + +//############################################################################################# +// second bad hack :/ override datepicker so it triggers an event when changing the input field +// and does not redraw the datepicker on every selectDate event +//############################################################################################# +$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; +$.datepicker._updateDatepicker = function(inst) { + if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) { + + this._base_updateDatepicker(inst); + + // Reload the time control when changing something in the input text field. + var tp_inst = this._get(inst, 'timepicker'); + if(tp_inst) tp_inst._addTimePicker(inst); + } +}; + +//####################################################################################### +// third bad hack :/ override datepicker so it allows spaces and colan in the input field +//####################################################################################### +$.datepicker._base_doKeyPress = $.datepicker._doKeyPress; +$.datepicker._doKeyPress = function(event) { + var inst = $.datepicker._getInst(event.target), + tp_inst = $.datepicker._get(inst, 'timepicker'); + + if (tp_inst) { + if ($.datepicker._get(inst, 'constrainInput')) { + var ampm = tp_inst._defaults.ampm, + datetimeChars = tp_inst._defaults.timeFormat.toString() + .replace(/[hms]/g, '') + .replace(/TT/g, ampm ? 'APM' : '') + .replace(/T/g, ampm ? 'AP' : '') + .replace(/tt/g, ampm ? 'apm' : '') + .replace(/t/g, ampm ? 'ap' : '') + + " " + + tp_inst._defaults.separator + + $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')), + chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode); + return event.ctrlKey || (chr < ' ' || !datetimeChars || datetimeChars.indexOf(chr) > -1); + } + } + + return $.datepicker._base_doKeyPress(event); +}; + +//####################################################################################### +// Override key up event to sync manual input changes. +//####################################################################################### +$.datepicker._base_doKeyUp = $.datepicker._doKeyUp; +$.datepicker._doKeyUp = function (event) { + var inst = $.datepicker._getInst(event.target), + tp_inst = $.datepicker._get(inst, 'timepicker'); + + if (tp_inst) { + if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) { + try { + $.datepicker._updateDatepicker(inst); + } + catch (err) { + $.datepicker.log(err); + } + } + } + + return $.datepicker._base_doKeyUp(event); +}; + +//####################################################################################### +// override "Today" button to also grab the time. +//####################################################################################### +$.datepicker._base_gotoToday = $.datepicker._gotoToday; +$.datepicker._gotoToday = function(id) { + this._base_gotoToday(id); + this._setTime(this._getInst($(id)[0]), new Date()); +}; + +//####################################################################################### +// Disable & enable the Time in the datetimepicker +//####################################################################################### +$.datepicker._disableTimepickerDatepicker = function(target, date, withDate) { + var inst = this._getInst(target), + tp_inst = this._get(inst, 'timepicker'); + if (tp_inst) { + tp_inst._defaults.showTimepicker = false; + tp_inst._onTimeChange(); + tp_inst._updateDateTime(inst); + } +}; + +$.datepicker._enableTimepickerDatepicker = function(target, date, withDate) { + var inst = this._getInst(target), + tp_inst = this._get(inst, 'timepicker'); + if (tp_inst) { + tp_inst._defaults.showTimepicker = true; + tp_inst._onTimeChange(); + tp_inst._updateDateTime(inst); + } +}; + +//####################################################################################### +// Create our own set time function +//####################################################################################### +$.datepicker._setTime = function(inst, date) { + var tp_inst = this._get(inst, 'timepicker'); + if (tp_inst) { + var defaults = tp_inst._defaults, + // calling _setTime with no date sets time to defaults + hour = date ? date.getHours() : defaults.hour, + minute = date ? date.getMinutes() : defaults.minute, + second = date ? date.getSeconds() : defaults.second; + + //check if within min/max times.. + if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) { + hour = defaults.hourMin; + minute = defaults.minuteMin; + second = defaults.secondMin; + } + + if (tp_inst.hour_slider) tp_inst.hour_slider.slider('value', hour); + else tp_inst.hour = hour; + if (tp_inst.minute_slider) tp_inst.minute_slider.slider('value', minute); + else tp_inst.minute = minute; + if (tp_inst.second_slider) tp_inst.second_slider.slider('value', second); + else tp_inst.second = second; + + tp_inst._onTimeChange(); + tp_inst._updateDateTime(inst); + } +}; + +//####################################################################################### +// Create new public method to set only time, callable as $().datepicker('setTime', date) +//####################################################################################### +$.datepicker._setTimeDatepicker = function(target, date, withDate) { + var inst = this._getInst(target), + tp_inst = this._get(inst, 'timepicker'); + + if (tp_inst) { + this._setDateFromField(inst); + var tp_date; + if (date) { + if (typeof date == "string") { + tp_inst._parseTime(date, withDate); + tp_date = new Date(); + tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); + } + else tp_date = new Date(date.getTime()); + if (tp_date.toString() == 'Invalid Date') tp_date = undefined; + } + this._setTime(inst, tp_date); + } + +}; + +//####################################################################################### +// override setDate() to allow setting time too within Date object +//####################################################################################### +$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker; +$.datepicker._setDateDatepicker = function(target, date) { + var inst = this._getInst(target), + tp_date = (date instanceof Date) ? new Date(date.getTime()) : date; + + this._updateDatepicker(inst); + this._base_setDateDatepicker.apply(this, arguments); + this._setTimeDatepicker(target, tp_date, true); +}; + +//####################################################################################### +// override getDate() to allow getting time too within Date object +//####################################################################################### +$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker; +$.datepicker._getDateDatepicker = function(target, noDefault) { + var inst = this._getInst(target), + tp_inst = this._get(inst, 'timepicker'); + + if (tp_inst) { + this._setDateFromField(inst, noDefault); + var date = this._getDate(inst); + if (date && tp_inst._parseTime($(target).val(), true)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second); + return date; + } + return this._base_getDateDatepicker(target, noDefault); +}; + +//####################################################################################### +// jQuery extend now ignores nulls! +//####################################################################################### +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] === null || props[name] === undefined) + target[name] = props[name]; + return target; +} + +$.timepicker = new Timepicker(); // singleton instance +$.timepicker.version = "0.9.3"; + +})(jQuery); diff --git a/wp-content/plugins/neuf-events/script/jquery.validate.min.js b/wp-content/plugins/neuf-events/script/jquery.validate.min.js new file mode 100644 index 0000000..882c699 --- /dev/null +++ b/wp-content/plugins/neuf-events/script/jquery.validate.min.js @@ -0,0 +1,51 @@ +/** + * jQuery Validation Plugin 1.8.1 + * + * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ + * http://docs.jquery.com/Plugins/Validation + * + * Copyright (c) 2006 - 2011 Jörn Zaefferer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name", +b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form(); +else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name]; +return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a, +b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error", +validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)}, +onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults, +a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."), +minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/, +"");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules; +c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form", +[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap, +a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)}, +objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name== +a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass, +this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g= +c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d= +this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+ +a.name+"")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a]; +this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow); +this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b|| +"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})}, +idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length}, +depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest< +0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true}, +email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b= +{};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e=== +false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&& +a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))}, +methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote= +e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]= +e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)|| +a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)}, +url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}, +date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>= +0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery); +(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery); +(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a, +b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery); diff --git a/wp-content/plugins/neuf-events/script/timepickdef.js b/wp-content/plugins/neuf-events/script/timepickdef.js new file mode 100644 index 0000000..4676c1e --- /dev/null +++ b/wp-content/plugins/neuf-events/script/timepickdef.js @@ -0,0 +1,20 @@ +var $j = jQuery.noConflict(); + +$j(function(){ + // Datepicker + $j('.datepicker').datetimepicker({ + currentText: 'Nå', + closeText: 'Ok', + hourText: 'Time', + dateFormat: 'yy-mm-dd', + timeFormat: 'hh:mm', + minuteText: 'Minutt', + timeText: 'Tid', + firstDay: 1, + monthNames: ['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'], + dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'], + dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'], + dayNamesMin: ['sø','ma','ti','on','to','fr','lø'] + }); + +}); diff --git a/wp-content/plugins/neuf-events/script/validation_rules.js b/wp-content/plugins/neuf-events/script/validation_rules.js new file mode 100644 index 0000000..3aba063 --- /dev/null +++ b/wp-content/plugins/neuf-events/script/validation_rules.js @@ -0,0 +1,12 @@ +var $j = jQuery.noConflict(); + +$j(function(){ + $j("#post").validate({ + rules: { + neuf_events_start_time: "required" + }, + messages: { + neuf_events_start_time: "Velg startdato og klokkeslett" + } + }); +}); diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000..954e22d Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_20_666666_40x40.png b/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000..64ece57 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_flat_10_000000_40x100.png b/wp-content/plugins/neuf-events/style/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000..abdc010 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_f6f6f6_1x400.png b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000..9b383f4 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_fdf5ce_1x400.png b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000..a23baad Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_glass_65_ffffff_1x400.png b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/wp-content/plugins/neuf-events/style/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000..39d5824 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000..f127367 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000..359397a Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-icons_222222_256x240.png b/wp-content/plugins/neuf-events/style/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..b273ff1 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-icons_222222_256x240.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-icons_228ef1_256x240.png b/wp-content/plugins/neuf-events/style/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000..a641a37 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-icons_228ef1_256x240.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-icons_ef8c08_256x240.png b/wp-content/plugins/neuf-events/style/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000..85e63e9 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-icons_ef8c08_256x240.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-icons_ffd27a_256x240.png b/wp-content/plugins/neuf-events/style/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000..e117eff Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-icons_ffd27a_256x240.png differ diff --git a/wp-content/plugins/neuf-events/style/images/ui-icons_ffffff_256x240.png b/wp-content/plugins/neuf-events/style/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..42f8f99 Binary files /dev/null and b/wp-content/plugins/neuf-events/style/images/ui-icons_ffffff_256x240.png differ diff --git a/wp-content/plugins/neuf-events/style/jquery-ui-1.8.12.custom.css b/wp-content/plugins/neuf-events/style/jquery-ui-1.8.12.custom.css new file mode 100644 index 0000000..2c6c325 --- /dev/null +++ b/wp-content/plugins/neuf-events/style/jquery-ui-1.8.12.custom.css @@ -0,0 +1,581 @@ +/* + * jQuery UI CSS Framework 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/* + * jQuery UI Autocomplete 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.11 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.11 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } + +/* JQuery UI TimePicker added here */ + +.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } +.ui-timepicker-div dl { text-align: left; } +.ui-timepicker-div dl dt { height: 25px; } +.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; } +.ui-timepicker-div td { font-size: 90%; } diff --git a/wp-content/plugins/wp-json-api/controllers/core.php b/wp-content/plugins/wp-json-api/controllers/core.php new file mode 100644 index 0000000..a3dda64 --- /dev/null +++ b/wp-content/plugins/wp-json-api/controllers/core.php @@ -0,0 +1,334 @@ +query->controller)) { + return $json_api->controller_info($json_api->query->controller); + } else { + $dir = json_api_dir(); + if (file_exists("$dir/json-api.php")) { + $php = file_get_contents("$dir/json-api.php"); + } else { + // Check one directory up, in case json-api.php was moved + $dir = dirname($dir); + if (file_exists("$dir/json-api.php")) { + $php = file_get_contents("$dir/json-api.php"); + } + } + if (preg_match('/^\s*Version:\s*(.+)$/m', $php, $matches)) { + $version = $matches[1]; + } else { + $version = '(Unknown)'; + } + $active_controllers = explode(',', get_option('json_api_controllers', 'core')); + $controllers = array_intersect($json_api->get_controllers(), $active_controllers); + return array( + 'json_api_version' => $version, + 'controllers' => array_values($controllers) + ); + } + } + + public function get_recent_posts() { + global $json_api; + $posts = $json_api->introspector->get_posts(); + return $this->posts_result($posts); + } + + public function get_post() { + global $json_api, $post; + extract($json_api->query->get(array('id', 'slug', 'post_id', 'post_slug'))); + if ($id || $post_id) { + if (!$id) { + $id = $post_id; + } + $posts = $json_api->introspector->get_posts(array( + 'p' => $id + ), true); + } else if ($slug || $post_slug) { + if (!$slug) { + $slug = $post_slug; + } + $posts = $json_api->introspector->get_posts(array( + 'name' => $slug + ), true); + } else { + $json_api->error("Include 'id' or 'slug' var in your request."); + } + if (count($posts) == 1) { + $post = $posts[0]; + $previous = get_adjacent_post(false, '', true); + $next = get_adjacent_post(false, '', false); + $post = new JSON_API_Post($post); + $response = array( + 'post' => $post + ); + if ($previous) { + $response['previous_url'] = get_permalink($previous->ID); + } + if ($next) { + $response['next_url'] = get_permalink($next->ID); + } + return $response; + } else { + $json_api->error("Not found."); + } + } + + public function get_page() { + global $json_api; + extract($json_api->query->get(array('id', 'slug', 'page_id', 'page_slug', 'children'))); + if ($id || $page_id) { + if (!$id) { + $id = $page_id; + } + $posts = $json_api->introspector->get_posts(array( + 'page_id' => $id + )); + } else if ($slug || $page_slug) { + if (!$slug) { + $slug = $page_slug; + } + $posts = $json_api->introspector->get_posts(array( + 'pagename' => $slug + )); + } else { + $json_api->error("Include 'id' or 'slug' var in your request."); + } + + // Workaround for https://core.trac.wordpress.org/ticket/12647 + if (empty($posts)) { + $url = $_SERVER['REQUEST_URI']; + $parsed_url = parse_url($url); + $path = $parsed_url['path']; + if (preg_match('#^http://[^/]+(/.+)$#', get_bloginfo('url'), $matches)) { + $blog_root = $matches[1]; + $path = preg_replace("#^$blog_root#", '', $path); + } + if (substr($path, 0, 1) == '/') { + $path = substr($path, 1); + } + $posts = $json_api->introspector->get_posts(array('pagename' => $path)); + } + + if (count($posts) == 1) { + if (!empty($children)) { + $json_api->introspector->attach_child_posts($posts[0]); + } + return array( + 'page' => $posts[0] + ); + } else { + $json_api->error("Not found."); + } + } + + public function get_date_posts() { + global $json_api; + if ($json_api->query->date) { + $date = preg_replace('/\D/', '', $json_api->query->date); + if (!preg_match('/^\d{4}(\d{2})?(\d{2})?$/', $date)) { + $json_api->error("Specify a date var in one of 'YYYY' or 'YYYY-MM' or 'YYYY-MM-DD' formats."); + } + $request = array('year' => substr($date, 0, 4)); + if (strlen($date) > 4) { + $request['monthnum'] = (int) substr($date, 4, 2); + } + if (strlen($date) > 6) { + $request['day'] = (int) substr($date, 6, 2); + } + $posts = $json_api->introspector->get_posts($request); + } else { + $json_api->error("Include 'date' var in your request."); + } + return $this->posts_result($posts); + } + + public function get_category_posts() { + global $json_api; + $category = $json_api->introspector->get_current_category(); + if (!$category) { + $json_api->error("Not found."); + } + $posts = $json_api->introspector->get_posts(array( + 'cat' => $category->id + )); + return $this->posts_object_result($posts, $category); + } + + public function get_tag_posts() { + global $json_api; + $tag = $json_api->introspector->get_current_tag(); + if (!$tag) { + $json_api->error("Not found."); + } + $posts = $json_api->introspector->get_posts(array( + 'tag' => $tag->slug + )); + return $this->posts_object_result($posts, $tag); + } + + public function get_author_posts() { + global $json_api; + $author = $json_api->introspector->get_current_author(); + if (!$author) { + $json_api->error("Not found."); + } + $posts = $json_api->introspector->get_posts(array( + 'author' => $author->id + )); + return $this->posts_object_result($posts, $author); + } + + public function get_search_results() { + global $json_api; + if ($json_api->query->search) { + $posts = $json_api->introspector->get_posts(array( + 's' => $json_api->query->search + )); + } else { + $json_api->error("Include 'search' var in your request."); + } + return $this->posts_result($posts); + } + + public function get_date_index() { + global $json_api; + $permalinks = $json_api->introspector->get_date_archive_permalinks(); + $tree = $json_api->introspector->get_date_archive_tree($permalinks); + return array( + 'permalinks' => $permalinks, + 'tree' => $tree + ); + } + + public function get_category_index() { + global $json_api; + $categories = $json_api->introspector->get_categories(); + return array( + 'count' => count($categories), + 'categories' => $categories + ); + } + + public function get_tag_index() { + global $json_api; + $tags = $json_api->introspector->get_tags(); + return array( + 'count' => count($tags), + 'tags' => $tags + ); + } + + public function get_author_index() { + global $json_api; + $authors = $json_api->introspector->get_authors(); + return array( + 'count' => count($authors), + 'authors' => array_values($authors) + ); + } + + public function get_page_index() { + global $json_api; + $pages = array(); + // Thanks to blinder for the fix! + $numberposts = empty($json_api->query->count) ? -1 : $json_api->query->count; + $wp_posts = get_posts(array( + 'post_type' => 'page', + 'post_parent' => 0, + 'order' => 'ASC', + 'orderby' => 'menu_order', + 'numberposts' => $numberposts + )); + foreach ($wp_posts as $wp_post) { + $pages[] = new JSON_API_Post($wp_post); + } + foreach ($pages as $page) { + $json_api->introspector->attach_child_posts($page); + } + return array( + 'pages' => $pages + ); + } + + public function get_nonce() { + global $json_api; + extract($json_api->query->get(array('controller', 'method'))); + if ($controller && $method) { + $controller = strtolower($controller); + if (!in_array($controller, $json_api->get_controllers())) { + $json_api->error("Unknown controller '$controller'."); + } + require_once $json_api->controller_path($controller); + if (!method_exists($json_api->controller_class($controller), $method)) { + $json_api->error("Unknown method '$method'."); + } + $nonce_id = $json_api->get_nonce_id($controller, $method); + return array( + 'controller' => $controller, + 'method' => $method, + 'nonce' => wp_create_nonce($nonce_id) + ); + } else { + $json_api->error("Include 'controller' and 'method' vars in your request."); + } + } + + protected function get_object_posts($object, $id_var, $slug_var) { + global $json_api; + $object_id = "{$type}_id"; + $object_slug = "{$type}_slug"; + extract($json_api->query->get(array('id', 'slug', $object_id, $object_slug))); + if ($id || $$object_id) { + if (!$id) { + $id = $$object_id; + } + $posts = $json_api->introspector->get_posts(array( + $id_var => $id + )); + } else if ($slug || $$object_slug) { + if (!$slug) { + $slug = $$object_slug; + } + $posts = $json_api->introspector->get_posts(array( + $slug_var => $slug + )); + } else { + $json_api->error("No $type specified. Include 'id' or 'slug' var in your request."); + } + return $posts; + } + + protected function posts_result($posts) { + global $wp_query; + return array( + 'count' => count($posts), + 'count_total' => (int) $wp_query->found_posts, + 'pages' => $wp_query->max_num_pages, + 'posts' => $posts + ); + } + + protected function posts_object_result($posts, $object) { + global $wp_query; + // Convert something like "JSON_API_Category" into "category" + $object_key = strtolower(substr(get_class($object), 9)); + return array( + 'count' => count($posts), + 'pages' => (int) $wp_query->max_num_pages, + $object_key => $object, + 'posts' => $posts + ); + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/controllers/posts.php b/wp-content/plugins/wp-json-api/controllers/posts.php new file mode 100644 index 0000000..db8f0ad --- /dev/null +++ b/wp-content/plugins/wp-json-api/controllers/posts.php @@ -0,0 +1,34 @@ +error("You need to login with a user capable of creating posts."); + } + if (!$json_api->query->nonce) { + $json_api->error("You must include a 'nonce' value to create posts. Use the `get_nonce` Core API method."); + } + $nonce_id = $json_api->get_nonce_id('posts', 'create_post'); + if (!wp_verify_nonce($json_api->query->nonce, $nonce_id)) { + $json_api->error("Your 'nonce' value was incorrect. Use the 'get_nonce' API method."); + } + nocache_headers(); + $post = new JSON_API_Post(); + $id = $post->create($_REQUEST); + if (empty($id)) { + $json_api->error("Could not create post."); + } + return array( + 'post' => $post + ); + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/controllers/respond.php b/wp-content/plugins/wp-json-api/controllers/respond.php new file mode 100644 index 0000000..20ac91e --- /dev/null +++ b/wp-content/plugins/wp-json-api/controllers/respond.php @@ -0,0 +1,27 @@ +error("No post specified. Include 'post_id' var in your request."); + } else if (empty($_REQUEST['name']) || + empty($_REQUEST['email']) || + empty($_REQUEST['content'])) { + $json_api->error("Please include all required arguments (name, email, content)."); + } else if (!is_email($_REQUEST['email'])) { + $json_api->error("Please enter a valid email address."); + } + $pending = new JSON_API_Comment(); + return $pending->handle_submission(); + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/json-api.php b/wp-content/plugins/wp-json-api/json-api.php new file mode 100644 index 0000000..5249ad4 --- /dev/null +++ b/wp-content/plugins/wp-json-api/json-api.php @@ -0,0 +1,83 @@ +

Sorry, JSON API requires PHP version 5.0 or greater.

"; +} + +function json_api_class_warning() { + echo "

Oops, JSON_API class not found. If you've defined a JSON_API_DIR constant, double check that the path is correct.

"; +} + +function json_api_activation() { + // Add the rewrite rule on activation + global $wp_rewrite; + add_filter('rewrite_rules_array', 'json_api_rewrites'); + $wp_rewrite->flush_rules(); +} + +function json_api_deactivation() { + // Remove the rewrite rule on deactivation + global $wp_rewrite; + $wp_rewrite->flush_rules(); +} + +function json_api_rewrites($wp_rules) { + $base = get_option('json_api_base', 'api'); + if (empty($base)) { + return $wp_rules; + } + $json_api_rules = array( + "$base\$" => 'index.php?json=info', + "$base/(.+)\$" => 'index.php?json=$matches[1]' + ); + return array_merge($json_api_rules, $wp_rules); +} + +function json_api_dir() { + if (defined('JSON_API_DIR') && file_exists(JSON_API_DIR)) { + return JSON_API_DIR; + } else { + return dirname(__FILE__); + } +} + +// Add initialization and activation hooks +add_action('init', 'json_api_init'); +register_activation_hook("$dir/json-api.php", 'json_api_activation'); +register_deactivation_hook("$dir/json-api.php", 'json_api_deactivation'); + +?> diff --git a/wp-content/plugins/wp-json-api/library/JSON.php b/wp-content/plugins/wp-json-api/library/JSON.php new file mode 100644 index 0000000..ac3c835 --- /dev/null +++ b/wp-content/plugins/wp-json-api/library/JSON.php @@ -0,0 +1,861 @@ + + * @author Matt Knapp + * @author Brett Stimmerman + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php 288200 2009-09-09 15:41:29Z alan_k $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_SLICE', 1); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_STR', 2); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_ARR', 3); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_OBJ', 4); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_CMT', 5); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_LOOSE_TYPE', 16); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_SUPPRESS_ERRORS', 32); + +/** + * Converts to and from JSON format. + * + * Brief example of use: + * + * + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * + */ +class Services_JSON +{ + /** + * constructs a new JSON instance + * + * @param int $use object behavior flags; combine with boolean-OR + * + * possible values: + * - SERVICES_JSON_LOOSE_TYPE: loose typing. + * "{...}" syntax creates associative arrays + * instead of objects in decode(). + * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. + * Values which can't be encoded (e.g. resources) + * appear as NULL instead of throwing errors. + * By default, a deeply-nested resource will + * bubble up with an error, so all return values + * from encode() should be checked with isError() + */ + function Services_JSON($use = 0) + { + $this->use = $use; + } + + /** + * convert a string from one UTF-16 char to one UTF-8 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf16 UTF-16 character + * @return string UTF-8 character + * @access private + */ + function utf162utf8($utf16) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); + } + + $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + + switch(true) { + case ((0x7F & $bytes) == $bytes): + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x7F & $bytes); + + case (0x07FF & $bytes) == $bytes: + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xC0 | (($bytes >> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + function utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format (and sends JSON Header) + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encode($var) + { + header('Content-type: application/json'); + return $this->_encode($var); + } + /** + * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow CSS!!!!) + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encodeUnsafe($var) + { + return $this->_encode($var); + } + /** + * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function _encode($var) + { + + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + if ($c+1 >= $strlen_var) { + $c += 1; + $ascii .= '?'; + break; + } + + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + if ($c+2 >= $strlen_var) { + $c += 2; + $ascii .= '?'; + break; + } + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + @ord($var{$c + 1}), + @ord($var{$c + 2})); + $c += 2; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + if ($c+3 >= $strlen_var) { + $c += 3; + $ascii .= '?'; + break; + } + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + if ($c+4 >= $strlen_var) { + $c += 4; + $ascii .= '?'; + break; + } + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + if ($c+5 >= $strlen_var) { + $c += 5; + $ascii .= '?'; + break; + } + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array($this, 'name_value'), + array_keys($var), + array_values($var)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array($this, '_encode'), $var); + + foreach($elements as $element) { + if(Services_JSON::isError($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array($this, 'name_value'), + array_keys($vars), + array_values($vars)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS) + ? 'null' + : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string"); + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + function name_value($name, $value) + { + $encoded_value = $this->_encode($value); + + if(Services_JSON::isError($encoded_value)) { + return $encoded_value; + } + + return $this->_encode(strval($name)) . ':' . $encoded_value; + } + + /** + * reduce a string by removing leading and trailing comments and whitespace + * + * @param $str string string value to strip of comments and whitespace + * + * @return string string value stripped of comments and whitespace + * @access private + */ + function reduce_string($str) + { + $str = preg_replace(array( + + // eliminate single line comments in '// ...' form + '#^\s*//(.+)$#m', + + // eliminate multi-line comments in '/* ... */' form, at start of string + '#^\s*/\*(.+)\*/#Us', + + // eliminate multi-line comments in '/* ... */' form, at end of string + '#/\*(.+)\*/\s*$#Us' + + ), '', $str); + + // eliminate extraneous space + return trim($str); + } + + /** + * decodes a JSON string into appropriate variable + * + * @param string $str JSON-formatted string + * + * @return mixed number, boolean, string, array, or object + * corresponding to given JSON input string. + * See argument 1 to Services_JSON() above for object-output behavior. + * Note that decode() always returns strings + * in ASCII or UTF-8 format! + * @access public + */ + function decode($str) + { + $str = $this->reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + // Lookie-loo, it's a number + + // This would work on its own, but I'm trying to be + // good about returning integers where appropriate: + // return (float)$str; + + // Return float or int, as appropriate + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + // STRINGS RETURNED IN UTF-8 FORMAT + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + // single, escaped unicode character + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= $this->utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + // characters U-00000080 - U-000007FF, mask 110XXXXX + //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + // array, or object notation + + if ($str{0} == '[') { + $stk = array(SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = array(); + } else { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + } + + array_push($stk, array('what' => SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = $this->reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + //print("\nparsing {$chrs}\n"); + + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + // found a comma that is not inside a string, array, etc., + // OR we've reached the end of the character list + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + // we are in an array, so just push an element onto the stack + array_push($arr, $this->decode($slice)); + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + // we are in an object, so figure + // out the property name and set an + // element in an associative array, + // for now + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // "name":value pair + $key = $this->decode($parts[1]); + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // name:value pair, where name is unquoted + $key = $parts[1]; + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } + + } + + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + // found a quote, and we are not inside a string + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + //print("Found start of string at {$c}\n"); + + } elseif (($chrs{$c} == $top['delim']) && + ($top['what'] == SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far + array_pop($stk); + //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '[') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-bracket, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + //print("Found start of array at {$c}\n"); + + } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + // found a right-bracket, and we're in an array + array_pop($stk); + //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '{') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-brace, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + //print("Found start of object at {$c}\n"); + + } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + // found a right-brace, and we're in an object + array_pop($stk); + //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a comment start, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + //print("Found start of comment at {$c}\n"); + + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) { + // found a comment end, and we're in one now + array_pop($stk); + $c++; + + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + + //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } + + } + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * @todo Ultimately, this should just call PEAR::isError() + */ + function isError($data, $code = null) + { + if (class_exists('pear')) { + return PEAR::isError($data, $code); + } elseif (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } +} + +if (class_exists('PEAR_Error')) { + + class Services_JSON_Error extends PEAR_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + parent::PEAR_Error($message, $code, $mode, $options, $userinfo); + } + } + +} else { + + /** + * @todo Ultimately, this class shall be descended from PEAR_Error + */ + class Services_JSON_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + + } + } + +} + diff --git a/wp-content/plugins/wp-json-api/models/attachment.php b/wp-content/plugins/wp-json-api/models/attachment.php new file mode 100644 index 0000000..490e030 --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/attachment.php @@ -0,0 +1,56 @@ +import_wp_object($wp_attachment); + if ($this->is_image()) { + $this->query_images(); + } + } + } + + function import_wp_object($wp_attachment) { + $this->id = (int) $wp_attachment->ID; + $this->url = $wp_attachment->guid; + $this->slug = $wp_attachment->post_name; + $this->title = $wp_attachment->post_title; + $this->description = $wp_attachment->post_content; + $this->caption = $wp_attachment->post_excerpt; + $this->parent = (int) $wp_attachment->post_parent; + $this->mime_type = $wp_attachment->post_mime_type; + } + + function is_image() { + return (substr($this->mime_type, 0, 5) == 'image'); + } + + function query_images() { + $sizes = array('thumbnail', 'medium', 'large', 'full'); + if (function_exists('get_intermediate_image_sizes')) { + $sizes = array_merge(array('full'), get_intermediate_image_sizes()); + } + $this->images = array(); + foreach ($sizes as $size) { + list($url, $width, $height) = wp_get_attachment_image_src($this->id, $size); + $this->images[$size] = (object) array( + 'url' => $url, + 'width' => $width, + 'height' => $height + ); + } + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/models/author.php b/wp-content/plugins/wp-json-api/models/author.php new file mode 100644 index 0000000..ae399c1 --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/author.php @@ -0,0 +1,62 @@ +id = (int) $id; + } else { + $this->id = (int) get_the_author_meta('ID'); + } + $this->set_value('slug', 'user_nicename'); + $this->set_value('name', 'display_name'); + $this->set_value('first_name', 'first_name'); + $this->set_value('last_name', 'last_name'); + $this->set_value('nickname', 'nickname'); + $this->set_value('url', 'user_url'); + $this->set_value('description', 'description'); + $this->set_author_meta(); + //$this->raw = get_userdata($this->id); + } + + function set_value($key, $wp_key = false) { + if (!$wp_key) { + $wp_key = $key; + } + $this->$key = get_the_author_meta($wp_key, $this->id); + } + + function set_author_meta() { + global $json_api; + if (!$json_api->query->author_meta) { + return; + } + $protected_vars = array( + 'user_login', + 'user_pass', + 'user_email', + 'user_activation_key' + ); + $vars = explode(',', $json_api->query->author_meta); + $vars = array_diff($vars, $protected_vars); + foreach ($vars as $var) { + $this->set_value($var); + } + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/models/category.php b/wp-content/plugins/wp-json-api/models/category.php new file mode 100644 index 0000000..499373e --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/category.php @@ -0,0 +1,29 @@ +import_wp_object($wp_category); + } + } + + function import_wp_object($wp_category) { + $this->id = (int) $wp_category->term_id; + $this->slug = $wp_category->slug; + $this->title = $wp_category->name; + $this->description = $wp_category->description; + $this->parent = (int) $wp_category->parent; + $this->post_count = (int) $wp_category->count; + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/models/comment.php b/wp-content/plugins/wp-json-api/models/comment.php new file mode 100644 index 0000000..690dbba --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/comment.php @@ -0,0 +1,80 @@ +import_wp_object($wp_comment); + } + } + + function import_wp_object($wp_comment) { + global $json_api; + + $date_format = $json_api->query->date_format; + $content = apply_filters('comment_text', $wp_comment->comment_content); + + $this->id = (int) $wp_comment->comment_ID; + $this->name = $wp_comment->comment_author; + $this->url = $wp_comment->comment_author_url; + $this->date = date($date_format, strtotime($wp_comment->comment_date)); + $this->content = $content; + $this->parent = (int) $wp_comment->comment_parent; + //$this->raw = $wp_comment; + + if (!empty($wp_comment->user_id)) { + $this->author = new JSON_API_Author($wp_comment->user_id); + } else { + unset($this->author); + } + } + + function handle_submission() { + global $comment, $wpdb; + add_action('comment_id_not_found', array(&$this, 'comment_id_not_found')); + add_action('comment_closed', array(&$this, 'comment_closed')); + add_action('comment_on_draft', array(&$this, 'comment_on_draft')); + add_filter('comment_post_redirect', array(&$this, 'comment_post_redirect')); + $_SERVER['REQUEST_METHOD'] = 'POST'; + $_POST['comment_post_ID'] = $_REQUEST['post_id']; + $_POST['author'] = $_REQUEST['name']; + $_POST['email'] = $_REQUEST['email']; + $_POST['url'] = empty($_REQUEST['url']) ? '' : $_REQUEST['url']; + $_POST['comment'] = $_REQUEST['content']; + $_POST['parent'] = $_REQUEST['parent']; + include ABSPATH . 'wp-comments-post.php'; + } + + function comment_id_not_found() { + global $json_api; + $json_api->error("Post ID '{$_REQUEST['post_id']}' not found."); + } + + function comment_closed() { + global $json_api; + $json_api->error("Post is closed for comments."); + } + + function comment_on_draft() { + global $json_api; + $json_api->error("You cannot comment on unpublished posts."); + } + + function comment_post_redirect() { + global $comment, $json_api; + $status = ($comment->comment_approved) ? 'ok' : 'pending'; + $new_comment = new JSON_API_Comment($comment); + $json_api->response->respond($new_comment, $status); + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/models/post.php b/wp-content/plugins/wp-json-api/models/post.php new file mode 100644 index 0000000..59520a3 --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/post.php @@ -0,0 +1,300 @@ +import_wp_object($wp_post); + } + } + + function create($values = null) { + unset($values['id']); + if (empty($values) || empty($values['title'])) { + $values = array( + 'title' => 'Untitled', + 'content' => '' + ); + } + return $this->save($values); + } + + function update($values) { + $values['id'] = $this->id; + return $this->save($values); + } + + function save($values = null) { + global $json_api, $user_ID; + + $wp_values = array(); + + if (!empty($values['id'])) { + $wp_values['ID'] = $values['id']; + } + + if (!empty($values['type'])) { + $wp_values['post_type'] = $values['type']; + } + + if (!empty($values['status'])) { + $wp_values['post_status'] = $values['status']; + } + + if (!empty($values['title'])) { + $wp_values['post_title'] = $values['title']; + } + + if (!empty($values['content'])) { + $wp_values['post_content'] = $values['content']; + } + + if (!empty($values['author'])) { + $author = $json_api->introspector->get_author_by_login($values['author']); + $wp_values['post_author'] = $author->id; + } + + if (isset($values['categories'])) { + $categories = explode(',', $values['categories']); + foreach ($categories as $category_slug) { + $category_slug = trim($category_slug); + $category = $json_api->introspector->get_category_by_slug($category_slug); + if (empty($wp_values['post_category'])) { + $wp_values['post_category'] = array($category->id); + } else { + array_push($wp_values['post_category'], $category->id); + } + } + } + + if (isset($values['tags'])) { + $tags = explode(',', $values['tags']); + foreach ($tags as $tag_slug) { + $tag_slug = trim($tag_slug); + if (empty($wp_values['tags_input'])) { + $wp_values['tags_input'] = array($tag_slug); + } else { + array_push($wp_values['tags_input'], $tag_slug); + } + } + } + + if (isset($wp_values['ID'])) { + $this->id = wp_update_post($wp_values); + } else { + $this->id = wp_insert_post($wp_values); + } + + if (!empty($_FILES['attachment'])) { + include_once ABSPATH . '/wp-admin/includes/file.php'; + include_once ABSPATH . '/wp-admin/includes/media.php'; + include_once ABSPATH . '/wp-admin/includes/image.php'; + $attachment_id = media_handle_upload('attachment', $this->id); + $this->attachments[] = new JSON_API_Attachment($attachment_id); + unset($_FILES['attachment']); + } + + $wp_post = get_post($this->id); + $this->import_wp_object($wp_post); + + return $this->id; + } + + function import_wp_object($wp_post) { + global $json_api, $post; + $date_format = $json_api->query->date_format; + $this->id = (int) $wp_post->ID; + setup_postdata($wp_post); + $this->set_value('type', $wp_post->post_type); + $this->set_value('slug', $wp_post->post_name); + $this->set_value('url', get_permalink($this->id)); + $this->set_value('status', $wp_post->post_status); + $this->set_value('title', get_the_title($this->id)); + $this->set_value('title_plain', strip_tags(@$this->title)); + $this->set_content_value(); + $this->set_value('excerpt', get_the_excerpt()); + $this->set_value('date', get_the_time($date_format)); + $this->set_value('modified', date($date_format, strtotime($wp_post->post_modified))); + $this->set_categories_value(); + $this->set_tags_value(); + $this->set_author_value($wp_post->post_author); + $this->set_comments_value(); + $this->set_attachments_value(); + $this->set_value('comment_count', (int) $wp_post->comment_count); + $this->set_value('comment_status', $wp_post->comment_status); + $this->set_thumbnail_value(); + $this->set_custom_fields_value(); + $this->set_event_value(); + } + + function set_value($key, $value) { + global $json_api; + if ($json_api->include_value($key)) { + $this->$key = $value; + } else { + unset($this->$key); + } + } + + function set_event_value() { + global $post; + $event_array = get_the_terms( $post->ID , 'event_type'); + $event_types = array(); + foreach ( $event_array as $event_type ) { + while ( $event_type->parent !== "0" ) { + $id = (int)$event_type->parent; + $event_type = get_term( $id, 'event_type' ); + } + + $event_types[] = $event_type->name; + } + $this->set_value('event', $event_type->name); + + } + + function set_content_value() { + global $json_api; + if ($json_api->include_value('content')) { + $content = get_the_content($json_api->query->read_more); + $content = apply_filters('the_content', $content); + $content = str_replace(']]>', ']]>', $content); + $this->content = $content; + } else { + unset($this->content); + } + } + + function set_categories_value() { + global $json_api; + if ($json_api->include_value('categories')) { + $this->categories = array(); + if ($wp_categories = get_the_category($this->id)) { + foreach ($wp_categories as $wp_category) { + $category = new JSON_API_Category($wp_category); + if ($category->id == 1 && $category->slug == 'uncategorized') { + // Skip the 'uncategorized' category + continue; + } + $this->categories[] = $category; + } + } + } else { + unset($this->categories); + } + } + + function set_tags_value() { + global $json_api; + if ($json_api->include_value('tags')) { + $this->tags = array(); + if ($wp_tags = get_the_tags($this->id)) { + foreach ($wp_tags as $wp_tag) { + $this->tags[] = new JSON_API_Tag($wp_tag); + } + } + } else { + unset($this->tags); + } + } + + function set_author_value($author_id) { + global $json_api; + if ($json_api->include_value('author')) { + $this->author = new JSON_API_Author($author_id); + } else { + unset($this->author); + } + } + + function set_comments_value() { + global $json_api; + if ($json_api->include_value('comments')) { + $this->comments = $json_api->introspector->get_comments($this->id); + } else { + unset($this->comments); + } + } + + function set_attachments_value() { + global $json_api; + if ($json_api->include_value('attachments')) { + $this->attachments = $json_api->introspector->get_attachments($this->id); + } else { + unset($this->attachments); + } + } + + function set_thumbnail_value() { + global $json_api; + if (!$json_api->include_value('thumbnail') || + !function_exists('get_post_thumbnail_id')) { + unset($this->thumbnail); + return; + } + $attachment_id = get_post_thumbnail_id($this->id); + if (!$attachment_id) { + unset($this->thumbnail); + return; + } + $thumbnail_size = $this->get_thumbnail_size(); + list($thumbnail) = wp_get_attachment_image_src($attachment_id, $thumbnail_size); + $this->thumbnail = $thumbnail; + } + + function set_custom_fields_value() { + global $json_api; + if ($json_api->include_value('custom_fields') && + $json_api->query->custom_fields) { + $keys = explode(',', $json_api->query->custom_fields); + $wp_custom_fields = get_post_custom($this->id); + $this->custom_fields = new stdClass(); + foreach ($keys as $key) { + if (isset($wp_custom_fields[$key])) { + $this->custom_fields->$key = $wp_custom_fields[$key]; + } + } + } else { + unset($this->custom_fields); + } + } + + function get_thumbnail_size() { + global $json_api; + if ($json_api->query->thumbnail_size) { + return $json_api->query->thumbnail_size; + } else if (function_exists('get_intermediate_image_sizes')) { + $sizes = get_intermediate_image_sizes(); + if (in_array('post-thumbnail', $sizes)) { + return 'post-thumbnail'; + } + } + return 'thumbnail'; + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/models/tag.php b/wp-content/plugins/wp-json-api/models/tag.php new file mode 100644 index 0000000..48c3592 --- /dev/null +++ b/wp-content/plugins/wp-json-api/models/tag.php @@ -0,0 +1,26 @@ +import_wp_object($wp_tag); + } + } + + function import_wp_object($wp_tag) { + $this->id = (int) $wp_tag->term_id; + $this->slug = $wp_tag->slug; + $this->title = $wp_tag->name; + $this->description = $wp_tag->description; + $this->post_count = (int) $wp_tag->count; + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/readme.txt b/wp-content/plugins/wp-json-api/readme.txt new file mode 100644 index 0000000..4b1677f --- /dev/null +++ b/wp-content/plugins/wp-json-api/readme.txt @@ -0,0 +1,1117 @@ +=== JSON API === +Contributors: dphiffer +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DH4MEG99JR2WE +Tags: json, api, ajax, cms, admin, integration, moma +Requires at least: 2.8 +Tested up to: 3.1 +Stable tag: 1.0.7 + +A RESTful API for WordPress + +== Description == + +JSON API allows you to retrieve and manipulate WordPress content using HTTP requests. There are three main goals: + +1. Provide a simple, consistent external interface +2. Create a stable, understandable internal implementation +3. Enable new types of extensions for WordPress + +This plugin was created at [The Museum of Modern Art](http://moma.org/) for the weblog [Inside/Out](http://moma.org/explore/inside_out), which is served from Ruby on Rails. Instead of reimplementing the site templates as a WordPress theme, we opted for a Rails front-end that displays content served from a WordPress back-end. JSON API provides the necessary interface for retrieving content and accepting comment submissions. + +See the [Other Notes](http://wordpress.org/extend/plugins/json-api/other_notes/) section for the complete documentation. + +== Installation == + +1. Upload the `json-api` folder to the `/wp-content/plugins/` directory or install directly through the plugin installer. +2. Activate the plugin through the 'Plugins' menu in WordPress or by using the link provided by the plugin installer. + +== Screenshots == + +1. Our old friend, in JSON format + +== Documentation == + +1. General concepts + 1.1. Requests + 1.2. Controllers + 1.3. Responses +2. Request methods + 2.1. Core controller methods + 2.2. Posts controller methods + 2.3. Respond controller methods +3. Request arguments + 3.1. Output-modifying arguments + 3.2. Content-modifying arguments + 3.3. Using include/exclude and redirects +4. Response objects + 4.1. Post response object + 4.2. Category response object + 4.3. Tag response object + 4.4. Author response object + 4.4. Comment response object + 4.5. Attachment response object +5. Extending JSON API + 5.1. Plugin hooks + 5.2. Developing JSON API controllers + 5.3. Configuration options +6. Unit tests + 6.1. Preparing a WordPress test site + 6.2. Running the tests + +== 1. General Concepts == + +== 1.1. Requests == + +Requests use a simple REST-style HTTP GET or POST. To invoke the API, include a non-empty query value for `json` in the URL. + +JSON API operates in two modes: + +1. *Implicit mode* is triggered by setting the `json` query var to a non-empty value on any WordPress page. The content that would normally appear on that page is returned in JSON format. +2. *Explicit mode* is triggered by setting `json` to a known method string. See *Section 2: Request methods* for a complete method listing. + += Implicit mode examples: = + + * `http://www.example.org/?json=1` + * `http://www.example.org/?p=47&json=1` + * `http://www.example.org/tag/banana/?json=1` + += Explicit mode examples: = + +* `http://www.example.org/?json=get_recent_posts` +* `http://www.example.org/?json=get_post&post_id=47` +* `http://www.example.org/?json=get_tag_posts&tag_slug=banana` + += With user-friendly permalinks configured: = + +* `http://www.example.org/api/get_recent_posts/` +* `http://www.example.org/api/get_post/?post_id=47` +* `http://www.example.org/api/get_tag_posts/?tag_slug=banana` + +__Further reading__ +See *Section 3: Request arguments* for more information about request arguments to modify the response. + +== 1.2. Controllers == + +The 1.0 release of JSON API introduced a modular controller system. This allows developers to flexibly add features to the API and give users more control over which methods they have enabled. + += The Core controller = + +Most of the methods available prior to version 1.0 have been moved to the Core controller. The two exceptions are `submit_comment` and `create_post` which are now available from the Respond and Posts controllers, respectively. The Core controller is the only one enabled by default. All other functionality must be enabled from the JSON API Settings page (under Settings in the WordPress admin menu). + += Specifying a controller = + +There are a few ways of specifying a controller, depending on how you are calling the API: + +* `http://www.example.org/?json=get_recent_posts` (`core` controller is implied, method is `get_recent_posts`) +* `http://www.example.org/api/info/` (`core` controller is implied) +* `http://www.example.org/api/core/get_category_posts/` (`core` controller can also be explicitly specified) +* `http://www.example.org/?json=respond.submit_comment` (`respond` controller, `submit_comment` method) + +__Legacy compatibility__ +JSON API retains support for its pre-1.0 methods. For example, if you invoke the method `create_post` without a controller specified, the Posts controller is chosen instead of Core. + += Available controllers = + +The current release includes three controllers: Core, Posts, and Respond. Developers are encouraged to suggest or submit additional controllers. + +__Further reading__ +See *Section 2: Request methods* for a complete reference of available controllers and methods. For documentation on extending JSON API with new controllers see *Section 5.2: Developing JSON API controllers*. + +== 1.3. Responses == + +The standard response format for JSON API is (as you may have guessed) [JSON](http://json.org/). + +Here is an example response from `http://localhost/wordpress/?json=1` called on a default WordPress installation (formatted for readability): + + { + "status": "ok", + "count": 1, + "count_total": 1, + "pages": 1, + "posts": [ + { + "id": 1, + "type": "post", + "slug": "hello-world", + "url": "http:\/\/localhost\/wordpress\/?p=1", + "title": "Hello world!", + "title_plain": "Hello world!", + "content": "

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!<\/p>\n", + "excerpt": "Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!\n", + "date": "2009-11-11 12:50:19", + "modified": "2009-11-11 12:50:19", + "categories": [], + "tags": [], + "author": { + "id": 1, + "slug": "admin", + "name": "admin", + "first_name": "", + "last_name": "", + "nickname": "", + "url": "", + "description": "" + }, + "comments": [ + { + "id": 1, + "name": "Mr WordPress", + "url": "http:\/\/wordpress.org\/", + "date": "2009-11-11 12:50:19", + "content": "

Hi, this is a comment.
To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.<\/p>\n", + "parent": 0 + } + ], + "comment_count": 1, + "comment_status": "open" + } + ] + } + +== 2. Request methods == + +Request methods are available from the following controllers: + +* Core controller - basic introspection methods +* Posts controller - data manipulation methods for posts +* Respond controller - comment/trackback submission methods + +== 2.1. Core controller methods == + +The Core controller offers a mostly-complete set of introspection methods for retrieving content from WordPress. + + +== Method: info == + +Returns information about JSON API. + += Optional arguments = + +* `controller` - returns detailed information about a specific controller + += Response = + + { + "status": "ok", + "json_api_version": "1.0", + "controllers": [ + "core" + ] + } + + += Response = + + { + "status": "ok", + "name": "Core", + "description": "Basic introspection methods", + "methods": [ + ... + ] + } + + +== Method: get_recent_posts == + +Returns an array of recent posts. You can invoke this from the WordPress home page either by setting `json` to a non-empty value (i.e., `json=1`) or from any page by setting `json=get_recent_posts`. + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "posts": [ + { ... }, + { ... }, + ... + ] + } + + +== Method: get_post == + +Returns a single post object. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a post URL +* `id` or `post_id` - set to the post's ID +* `slug` or `post_slug` - set to the post's URL slug + += Optional arguments = + +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "post": { ... } + } + + +== Method: get_page == + +Returns a single page object. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a page URL +* `id` or `page_id` - set to the page's ID +* `slug` or `page_slug` - set to the page's URL slug + += Optional arguments = + +* `children` - set to a non-empty value to include a recursive hierarchy of child pages +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "page": { ... } + } + +== Method: get_date_posts == + +Returns an array of posts/pages in a specific date archive (by day, month, or year). + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a date archive page +* `date` - set to a date in the format `YYYY` or `YYYY-MM` or `YYYY-MM-DD` (non-numeric characters are stripped from the var, so `YYYYMMDD` or `YYYY/MM/DD` are also valid) + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "posts": [ + { ... }, + { ... }, + ... + ] + } + +== Method: get_category_posts == + +Returns an array of posts/pages in a specific category. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a category archive page +* `id` or `category_id` - set to the category's ID +* `slug` or `category_slug` - set to the category's URL slug + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "category": { ... } + "posts": [ + { ... }, + { ... }, + ... + ] + } + + +== Method: get_tag_posts == + +Returns an array of posts/pages with a specific tag. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a tag archive page +* `id` or `tag_id` - set to the tag's ID +* `slug` or `tag_slug` - set to the tag's URL slug + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "tag": { ... } + "posts": [ + { ... }, + { ... }, + ... + ] + } + + +== Method: get_author_posts == + +Returns an array of posts/pages written by a specific author. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on an author archive page +* `id` or `author_id` - set to the author's ID +* `slug` or `author_slug` - set to the author's URL slug + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "author": { ... } + "posts": [ + { ... }, + { ... }, + ... + ] + } + + +== Method: get_search_results == + +Returns an array of posts/pages in response to a search query. + += One of the following is required = + +* Invoking the JSON API implicitly (i.e., `?json=1`) on a search results page +* `search` - set to the desired search query + += Optional arguments = + +* `count` - determines how many posts per page are returned (default value is 10) +* `page` - return a specific page number from the results +* `post_type` - used to retrieve custom post types + += Response = + + { + "status": "ok", + "count": 10, + "count_total": 79, + "pages": 7, + "posts": [ + { ... }, + { ... }, + ... + ] + } + + +== Method: get_date_index == + +Returns both an array of date page permalinks and a tree structure representation of the archive. + += Response = + + { + "status": "ok", + "permalinks": [ + "...", + "...", + "..." + ], + "tree": { + "2009": { + "09": 17, + "10": 20, + "11": 7 + } + } + +Note: the tree is arranged by `response.tree.[year].[month].[number of posts]`. + + +== Method: get_category_index == + +Returns an array of active categories. + += Response = + + { + "status": "ok", + "count": 3, + "categories": [ + { ... }, + { ... }, + { ... } + ] + } + + +== Method: get_tag_index == + +Returns an array of active tags. + += Response = + + { + "status": "ok", + "count": 3 + "tags": [ + { ... }, + { ... }, + { ... } + ] + } + + +== Method: get_author_index == + +Returns an array of active blog authors. + += Response = + + { + "status": "ok", + "count": 3, + "authors": [ + { ... }, + { ... }, + { ... } + ] + } + + +== Method: get_page_index == + +Returns a hierarchical tree of `page` posts. + += Response = + + { + "status": "ok", + "pages": [ + { ... }, + { ... }, + { ... } + ] + } + +== Method: get_nonce == + +Returns a WordPress nonce value, required to call some data manipulation methods. + += Required arguments = + +* `controller` - the JSON API controller for the method you will use the nonce for +* `method` - the method you wish to call (currently `create_post` is the only method that requires a nonce) + += Response = + + { + "status": "ok", + "controller": "posts", + "method": "create_post", + "nonce": "cefe01efd4" + } + +__Further reading__ +To learn more about how nonces are used in WordPress, see [Mark Jaquith's article on the subject](http://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/). + +== 2.2. Pages controller methods == + +== Method: create_post == + +Creates a new post. + += Required argument = + +* `nonce` - available from the `get_nonce` method (call with vars `controller=posts` and `method=create_post`) + += Optional arguments = + +* `status` - sets the post status ("draft" or "publish"), default is "draft" +* `title` - the post title +* `content` - the post content +* `author` - the post's author (login name), default is the current logged in user +* `categories` - a comma-separated list of categories (URL slugs) +* `tags` - a comma-separated list of tags (URL slugs) + +Note: including a file upload field called `attachment` will cause an attachment to be stored with your new post. + + +== 2.3. Respond controller methods == + +== Method: submit_comment == + +Submits a comment to a WordPress post. + += Required arguments = + +* `post_id` - which post to comment on +* `name` - the commenter's name +* `email` - the commenter's email address +* `content` - the comment content + += Optional arguments = + +* `redirect` - redirect instead of returning a JSON object +* `redirect_ok` - redirect to a specific URL when the status value is `ok` +* `redirect_error` - redirect to a specific URL when the status value is `error` +* `redirect_pending` - redirect to a specific URL when the status value is `pending` + += Custom status values = + +* `pending` - assigned if the comment submission is pending moderation + + +== 3. Request arguments == + +API requests can be controlled by specifying one of the following arguments as URL query vars. + += Examples = + +* Debug the response: `http://www.example.org/api/get_page_index/?dev=1` +* Widget-style JSONP output: `http://www.example.org/api/get_recent_posts/?callback=show_posts_widget&read_more=More&count=3` +* Redirect on error: `http://www.example.org/api/posts/create_post/?callback_error=http%3A%2F%2Fwww.example.org%2Fhelp.html` + +== 3.1. Output-modifying arguments == + +The following arguments modify how you get results back from the API. The redirect response styles are intended for use with the data manipulation methods. + +* Setting `callback` to a JavaScript function name will trigger a JSONP-style callback. +* Setting `redirect` to a URL will cause the user's browser to redirect to the specified URL with a `status` value appended to the query vars (see the *Response objects* section below for an explanation of status values). +* Setting `redirect_[status]` allows you to control the resulting browser redirection depending on the `status` value. +* Setting `dev` to a non-empty value adds whitespace for readability and responds with `text/plain` +* Omitting all of the above arguments will result in a standard JSON response. + +== 3.2. Content-modifying arguments == + +These arguments are available to modify all introspection methods: + +* `date_format` - Changes the format of date values. Uses the same syntax as PHP's date() function. Default value is `Y-m-d H:i:s`. +* `read_more` - Changes the 'read more' link text in post content. +* `include` - Specifies which post data fields to include. Expects a comma-separated list of post fields. Leaving this empty includes *all* fields. +* `exclude` - Specifies which post data fields to exclude. Expects a comma-separated list of post fields. +* `custom_fields` - Includes values from posts' Custom Fields. Expects a comma-separated list of custom field keys. +* `author_meta` - Includes additional author metadata. Should be a comma-separated list of metadata fields. +* `count` - Controls the number of posts to include (defaults to the number specified by WordPress) +* `order` - Controls the order of post results ('DESC' or 'ASC'). Default value is 'DESC'. +* `order_by` - Controls which field to order results by. Expects one of the following values: + * `author` + * `date` (default value) + * `title` + * `modified` + * `menu_order` (only works with Pages) + * `parent` + * `ID` + * `rand` + * `meta_value` (`meta_key` must also be set) + * `none` + * `comment_count` +* `meta_key`, `meta_value`, `meta_compare` - Retrieve posts (or Pages) based on a custom field key or value. + +== 3.3. Using include/exclude and redirects == + +__About `include`/`exclude` arguments__ +By default you get all values included with each post object. Specify a list of `include` values will cause the post object to filter out the values absent from the list. Specifying `exclude` causes post objects to include all values except the fields you list. For example, the query `exclude=comments` includes everything *except* the comments. + +__About the `redirect` argument__ +The `redirect` response style is useful for when you need the user's browser to make a request directly rather than making proxy requests using a tool like cURL. Setting a `redirect` argument causes the user's browser to redirect back to the specified URL instead of returning a JSON object. The resulting `status` value is included as an extra query variable. + +For example calling an API method with `redirect` set to `http://www.example.com/foo` will result in a redirection to one of the following: + +* `http://www.example.com/foo?status=ok` +* `http://www.example.com/foo?status=error` + +You can also set separate URLs to handle status values differently. You could set `redirect_ok` to `http://www.example.com/handle_ok` and `redirect_error` to `http://www.example.com/handle_error` in order to have more fine-tuned control over the method result. + + +== 4. Response objects == + +This section describes data objects you can retrieve from WordPress and the optional URL redirects. + +__Status values__ +All JSON API requests result in a status value. The two basic status values are `ok` and `error`. Additional status values are available for certain methods (such as `pending` in the case of the `submit_comment` method). API methods that result in custom status values include a *custom status values* section in their documentation. + +__Naming compatibility__ +Developers familiar with WordPress may notice that many names for properties and arguments have been changed. This was a stylistic choice that intends to provide more clarity and consistency in the interface. + +== 4.1. Post response object == + +* `id` - Integer +* `type` - String (e.g., `post` or `page`) +* `slug` - String +* `url` - String +* `title` - String +* `title_plain` - String +* `content` - String (modified by the `read_more` argument) +* `excerpt` - String +* `date` - String (modified by the `date_format` argument) +* `modified` - String (modified by the `date_format` argument) +* `categories` - Array of category objects +* `tags` - Array of tag objects +* `author` Author object +* `comments` - Array of comment objects +* `attachments` - Array of attachment objects +* `comment_count` - Integer +* `comment_status` - String (`"open"` or `"closed"`) +* `thumbnail` - String (only included if a post thumbnail has been specified) +* `custom_fields` - Object (included by setting the `custom_fields` argument to a comma-separated list of custom field names) + +__Note__ +The `thumbnail` attribute returns a URL to the image size specified by the optional `thumbnail_size` request argument. By default this will use the `thumbnail` or `post-thumbnail` sizes, depending on your version of WordPress. See [Mark Jaquith's post on the topic](http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/) for more information. + +== 4.2. Category response object == + +* `id` - Integer +* `slug` - String +* `title` - String +* `description` - String +* `parent` - Integer +* `post_count` - Integer + +== 4.3. Tag response object == + +* `id` - Integer +* `slug` - String +* `title` - String +* `description` - String +* `post_count` - Integer + +== 4.4. Author response object == + +* `id` - Integer +* `slug` - String +* `name` - String +* `first_name` - String +* `last_name` - String +* `nickname` - String +* `url` - String +* `description` - String + +Note: You can include additional values by setting the `author_meta` argument to a comma-separated list of metadata fields. + +== 4.5. Comment response object == + +* `id` - Integer +* `name` - String +* `url` - String +* `date` - String +* `content` - String +* `parent` - Integer +* `author` - Object (only set if the comment author was registered & logged in) + +== 4.6. Attachment response object == + +* `id` - Integer +* `url` - String +* `slug` - String +* `title` - String +* `description` - String +* `caption` - String +* `parent` - Integer +* `mime_type` - String +* `images` - Object with values including `thumbnail`, `medium`, `large`, `full`, each of which are objects with values `url`, `width` and `height` (only set if the attachment is an image) + + +== 5. Extending JSON API == + +JSON API exposes several WordPress action and filter hooks as well as a modular controller system for adding new API methods. + +== 5.1. Plugin hooks == + +JSON API exposes several [action and filter hooks](http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters) to augment its behavior. + +== Filter: json_api_controllers == + +This filter controls the array of controllers available to JSON API. The callback function is passed a single argument, an array of strings. + += Example = + + // Add a custom controller + add_filter('json_api_controllers', 'add_my_controller'); + + function add_my_controller($controllers) { + // Corresponds to the class JSON_API_MyController_Controller + $controllers[] = 'MyController'; + return $controllers; + } + + +== Filter: json_api_[controller]_controller_path == + +Specifies the PHP source file for a given controller, overriding the default location `wp-content/plugins/json_api/controllers`. + +__Note__ +If you your controller file in the `json-api/controllers` folder JSON API will find it automatically. + += Example = + + // Register the source file for JSON_API_Widgets_Controller + add_filter('json_api_widgets_controller_path', 'widgets_controller_path'); + + function widgets_controller_path($default_path) { + return '/path/to/widgets.php'; + } + +__Capitalization__ +Your filter hook must be all-lowercase to work correctly. The above example would fail with the filter `json_api_Widgets_Controller_path`, even if that's how the class is capitalized in the PHP source. + +== Filter: json_api_encode == + +This is called just before the output is encoded into JSON format. The value passed will always be an associative array, according to the format described in each method's documentation. Those items described in the *Response objects* section are passed as PHP objects, not associative arrays. + += Example = + + add_filter('json_api_encode', 'my_encode_kittens'); + + function my_encode_kittens($response) { + if (isset($response['posts'])) { + foreach ($response['posts'] as $post) { + my_add_kittens($post); // Add kittens to each post + } + } else if (isset($response['post'])) { + my_add_kittens($response['post']); // Add a kittens property + } + return $response; + } + + function my_add_kittens(&$post) { + $post->kittens = 'Kittens!'; + } + +== Action: json_api-[controller]-[method] == + +Each JSON API method invokes an action when called. + += Example = + + // Disable get_author_index method (e.g., for security reasons) + add_action('json_api-core-get_author_index', 'my_disable_author_index'); + + function my_disable_author_index() { + // Stop execution + exit; + } + +== 5.2. Developing JSON API controllers == + += Creating a controller = + +To start a new JSON API controller, create a file called `hello.php` inside `wp-content/plugins/json-api/controllers`. Add the following class definition: + + "Hello, world" + ); + } + + } + + ?> + +Your controller is now available as `hello`, and exposes one `hello_world` method. + +Next, activate your controller from the WordPress admin interface, available from the menu under Settings > JSON API. You can either click on the link to your `hello_world` method from the admin interface or enter it manually. It should have the form: `http://www.example.org/api/hello/hello_world/?dev=1` or `http://www.example.org/?json=hello.hello_world&dev=1` (note the use of the `dev` argument to enable human-readable output). You should get the following output: + + { + "status": "ok", + "message": "Hello, world" + } + += Using query vars = + +To customize the behavior of your controller, you will want to make use of the global `$json_api->query` object. Add the following method to your controller: + + public function hello_person() { + global $json_api; + $name = $json_api->query->name; + return array( + "message" => "Hello, $name." + ); + } + +Now append the `name` query var to the method call: `http://www.example.org/api/hello/hello_world/?dev=1&name=Alice` or `http://www.example.org/?json=hello.hello_world&dev=1&name=Alice`. + + { + "status": "ok", + "message": "Hello, Alice" + } + += Introspector and data models = + +Your controller can use any of the [existing WordPress functions](http://codex.wordpress.org/Function_Reference) to collect data, but JSON API also includes an introspector that wraps data in objects defined in the `json-api/models` directory. These are the same data models described in *Section 4: Response objects*. + +Here is an example of how you might use the introspector: + + // Retrieve posts based on custom field key/value pair + public function get_custom_posts() { + global $json_api; + + // Make sure we have key/value query vars + if (!$json_api->query->key || !$json_api->query->value) { + $json_api->error("Include a 'key' and 'value' query var."); + } + + // See also: http://codex.wordpress.org/Template_Tags/query_posts + $posts = $json_api->introspector->get_posts(array( + 'meta_key' => $json_api->query->key, + 'meta_value' => $json_api->query->value + )); + + return array( + 'key' => $key, + 'value' => $value, + 'posts' => $posts + ); + } + += External controllers = + +It is recommended that custom controllers are kept outside of `json-api/controllers` in order to avoid accidental deletion during upgrades or site migrations. To make your controller visible from an external plugin or theme directory you will need to use two filters: `json_api_controllers` and `json_api_[controller]_controller_path`. Move the `hello.php` file from the steps above into your theme's directory. Then add the following to your theme's `functions.php` file (if your theme doesn't have a file called `functions.php` you can create one). + + function add_hello_controller($controllers) { + $controllers[] = 'hello'; + return $controllers; + } + add_filter('json_api_controllers', 'add_hello_controller'); + + function set_hello_controller_path() { + return "/path/to/theme/hello.php"; + } + add_filter('json_api_hello_controller_path', 'set_hello_controller_path'); + +== 5.3. Configuration options == + +The following are constants you can define in your `wp-config.php` folder: + +* `JSON_API_DIR` - set to the directory where JSON API plugin lives (in some cases this can be useful for `mu-plugins` with WordPress MU) +* `JSON_API_CONTROLLERS` - a comma-separated list of default controllers to enable (this is overridden by the JSON API settings page) + +== 6. Unit tests == + +JSON API comes with a set of tests that should make it easier to maintain and reveal incompatibilities when they might occur. This is an ongoing process, I hope to improve the test coverage going forward. + +== 6.1. Preparing a WordPress test site == + +There are a few necessary steps that need to be carried out before the test suite will run properly. + +1. WordPress should generate a new set of tables before you start, so if you're testing with a `wp_` table prefix make sure the database has no existing tables of this kind +2. Configure and install a new copy of WordPress +3. Delete the Hello World post and Sample Page (titled "About" in some versions of WordPress) +4. Enable user-friendly URLs from Settings > Permalinks, use the "Day and name" format +5. Install the JSON API plugin and enable all bundled controllers from Settings > JSON API +6. Import the [Theme Unit Test](http://codex.wordpress.org/Theme_Unit_Test) test data XML file from Settings > Import > WordPress (you will need to install the WordPress Importer plugin) + +== 6.2. Running the tests == + +From the command line, make sure you have the HTTP_Client PEAR package installed: + +`pear install HTTP_Client` + +Change directory to `tests` and run the following: + +`pear run-tests` + +You should see the test results print out culminating in a summary: + + TOTAL TIME: 00:04 + 23 PASSED TESTS + 0 SKIPPED TESTS + +== Changelog == + += 1.0.7 (2011-01-27): = +* Created some basic unit tests +* Fixed a bug where `get_author_posts` was unable to find users by `slug` +* Added missing `post_type` argument to documentation for `get_post` and `get_page` (props Koshirosan) +* Added `previous_url` and `next_url` properties to the `get_post` response object (props mlcy44) + += 1.0.6 (2011-01-13): = +* Fixed a bug in `exclude` query parameter (big props to ikesyo and archon810) +* Fix for `get_page_index` that where it only returned 5 pages -- it now responds to `count` query param (props to npavkovic and blinder) +* Removed `Content-Disposition` header from response (props mimecine, kjwierenga) +* Fixed an incompatibility issue with Disqus plugin (props joshcanhelp) +* Fixed a bug where `submit_comment` was resulting in a HTTP 404 status (props @tdweston) +* Fixed an error in the documentation, external controller example (props jli) + += 1.0.5 (2010-07-08): = +* Added an check so that `json-api.php` can be moved one level above the `json-api` directory +* Added more documentation about using nonces + += 1.0.4 (2010-07-07): = +* Fixed a bug where the order of attachments didn't match the gallery +* Added a section to the developer documentation for externalizing custom controllers +* Moved JSON_API class to its own file: `singletons/api.php` +* Created a new top-level function: `json_api_dir()` +* Improvements for WordPress MU: `JSON_API_DIR` and `JSON_API_CONTROLLERS` constants (props Jim McQuillan) + += 1.0.3 (2010-07-07): = +* Added request argument `thumbnail_size` to support different sizes of featured images (see also: `add_image_size` WordPress function) +* Added request argument `post_type` to support custom post types (props Mark Harris) + += 1.0.2 (2010-07-02): = +* Removed an inaccurate section from readme.txt about supporting `query_posts` arguments +* Changed controller info block format to use "Controller name" and "Controller description" +* Made admin page more robust about handling errors loading controllers +* Changed `JSON_API::get_controllers` method to lowercase all entries +* Added introspector section to developer documentation +* Fixed incorrect example for `json_api_[controller]_controller_path` +* Thanks to Tim Nash for early feedback on writing external controllers + += 1.0.1 (2010-07-01): = +* Fixed some typos in readme.txt +* Switched `get_tag_posts` to query on tag instead of tag_id (maybe a WordPress issue?) + += 1.0 (2010-06-29): = +* JSON API officially drops support for PHP 4 (it was already broken) +* Added JSON API Settings page to WP admin +* Broke apart `JSON_API_Controller` into a modular controller system +* Refactored `JSON_API_Query` to depend less on WordPress's `get_query_var` mechanism +* Developer mode now shows response in JSON format +* The `create_post` method now requires a nonce +* Improved support for complex post queries (props zibitt) +* Fixed a bug with `get_author_by_login` (props Krzysztof Sobolewski) +* Made image attachments more robust with `get_intermediate_image_sizes` (props mimecine) +* Improved post thumbnail support (props nyamsprod) + += 0.9.6 (2010-05-27): = +* Fixed a bug introduced in 0.9.5 + += 0.9.5 (2010-05-27): = +* Added a `thumbnail` property to Post response objects + += 0.9.4 (2010-04-28): = +* Fixed a bug where any non-authenticated user could create a draft blog post through `create_post`. Thanks to user futtta for posting about this. + += 0.9.3 (2010-03-19): = +* Fixed a bug where child pages were being ignored by the API. See also: https://core.trac.wordpress.org/ticket/12647 + += 0.9.2 (2010-03-18): = +* Fixed a bug where the /api/ rewrite rules would be lost + += 0.9 (2010-02-04): = +* Added a `create_post` method + += 0.8.3 (2010-01-27): = +* Fixed the stable tag version + += 0.8.2 (2010-01-27): = +* Fixed a typo in the changelog + += 0.8.1 (2010-01-27): = +* Fixed a bug that was making JSONP support non-functional + += 0.8 (2010-01-18): = +* Added an attachment model and instance variable for post objects + += 0.7.3 (2010-01-15): = +* Added a `count` request parameter to control the number of posts returned + += 0.7.2 (2010-01-14): = +* Removed the version number from the description text + += 0.7.1 (2010-01-14): = +* Fixed another subtle bug with `get_author_index` + += 0.7 (2010-01-08): = +* Added a `post_count` response to tag objects +* Fixed a bug with `get_author_index` + += 0.6 (2009-11-30): = +* Added `count_total` response +* Added `json_api_encode` filter +* Fixed bugs in the introspector's `get_current_category` and `get_current_tag` + += 0.5 (2009-11-17): = +* Initial Public Release + +== Upgrade Notice == + += 1.0.7 = +Minor bugfix/improvement release + += 1.0.6 = +Minor bugfix/improvement release + += 1.0.5 = +Minor improvement release + += 1.0.4 = +Minor bugfix/refactor release + += 1.0.3 = +Two new request arguments added: `thumbnail_size` and `post_type` + += 1.0.2 = +Minor bugfix release + += 1.0.1 = +Bugfix release, possibly stemming from a bug in WordPress 3.0 + += 1.0 = +Major release, see changelog for details. + += 0.9.6 = +Bugfix release for something added in 0.9.5. + += 0.9.5 = +Feature addition: post thumbnails now included in response objects. + += 0.9.4 = +Security fix: all users are strongly encouraged to upgrade. (See Changelog.) + += 0.9.3 = +Fixed a bug where child pages could not be introspected by the API. + += 0.9.2 = +Fixed a bug where the /api/ path would stop working upon publishing new pages. + += 0.9 = +Added a new data manipulation method: `create_post`. + += 0.8.3 = +Oh dear, I didn't tag 0.8.2 in the stable tags thing. + += 0.8.2 = +Just fixing a mislabeled 0.8.1 release in the changelog. + += 0.8.1 = +This is a bug fix release for JSONP support. Thanks to Ben Wilson for reporting it! + += 0.8 = +Added what may be the last introspection feature: post attachments. You can now see images and other media that have been added to posts. diff --git a/wp-content/plugins/wp-json-api/screenshot-1.png b/wp-content/plugins/wp-json-api/screenshot-1.png new file mode 100644 index 0000000..b5bba9d Binary files /dev/null and b/wp-content/plugins/wp-json-api/screenshot-1.png differ diff --git a/wp-content/plugins/wp-json-api/singletons/api.php b/wp-content/plugins/wp-json-api/singletons/api.php new file mode 100644 index 0000000..baeb506 --- /dev/null +++ b/wp-content/plugins/wp-json-api/singletons/api.php @@ -0,0 +1,371 @@ +query = new JSON_API_Query(); + $this->introspector = new JSON_API_Introspector(); + $this->response = new JSON_API_Response(); + add_action('template_redirect', array(&$this, 'template_redirect')); + add_action('admin_menu', array(&$this, 'admin_menu')); + add_action('update_option_json_api_base', array(&$this, 'flush_rewrite_rules')); + add_action('pre_update_option_json_api_controllers', array(&$this, 'update_controllers')); + } + + function template_redirect() { + // Check to see if there's an appropriate API controller + method + $controller = strtolower($this->query->get_controller()); + $available_controllers = $this->get_controllers(); + $enabled_controllers = explode(',', get_option('json_api_controllers', 'core')); + $active_controllers = array_intersect($available_controllers, $enabled_controllers); + + if ($controller) { + + if (!in_array($controller, $active_controllers)) { + $this->error("Unknown controller '$controller'."); + } + + $controller_path = $this->controller_path($controller); + if (file_exists($controller_path)) { + require_once $controller_path; + } + $controller_class = $this->controller_class($controller); + + if (!class_exists($controller_class)) { + $this->error("Unknown controller '$controller_class'."); + } + + $this->controller = new $controller_class(); + $method = $this->query->get_method($controller); + + if ($method) { + + $this->response->setup(); + + // Run action hooks for method + do_action("json_api-{$controller}-$method"); + + // Error out if nothing is found + if ($method == '404') { + $this->error('Not found'); + } + + // Run the method + $result = $this->controller->$method(); + + // Handle the result + $this->response->respond($result); + + // Done! + exit; + } + } + } + + function admin_menu() { + add_options_page('JSON API Settings', 'JSON API', 'manage_options', 'json-api', array(&$this, 'admin_options')); + } + + function admin_options() { + if (!current_user_can('manage_options')) { + wp_die( __('You do not have sufficient permissions to access this page.') ); + } + + $available_controllers = $this->get_controllers(); + $active_controllers = explode(',', get_option('json_api_controllers', 'core')); + + if (count($active_controllers) == 1 && empty($active_controllers[0])) { + $active_controllers = array(); + } + + if (!empty($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'], "update-options")) { + if ((!empty($_REQUEST['action']) || !empty($_REQUEST['action2'])) && + (!empty($_REQUEST['controller']) || !empty($_REQUEST['controllers']))) { + if (!empty($_REQUEST['action'])) { + $action = $_REQUEST['action']; + } else { + $action = $_REQUEST['action2']; + } + + if (!empty($_REQUEST['controllers'])) { + $controllers = $_REQUEST['controllers']; + } else { + $controllers = array($_REQUEST['controller']); + } + + foreach ($controllers as $controller) { + if (in_array($controller, $available_controllers)) { + if ($action == 'activate' && !in_array($controller, $active_controllers)) { + $active_controllers[] = $controller; + } else if ($action == 'deactivate') { + $index = array_search($controller, $active_controllers); + if ($index !== false) { + unset($active_controllers[$index]); + } + } + } + } + $this->save_option('json_api_controllers', implode(',', $active_controllers)); + } + if (isset($_REQUEST['json_api_base'])) { + $this->save_option('json_api_base', $_REQUEST['json_api_base']); + } + } + + ?> +

+

+

JSON API Settings

+
+ +

Controllers

+ print_controller_actions(); ?> + + + + + + + + + + + + + + + + + controller_info($controller); + + if (is_string($info)) { + $active = false; + $error = true; + $info = array( + 'name' => $controller, + 'description' => "

Error: $info

", + 'methods' => array(), + 'url' => null + ); + } + + ?> + + + + + + + +
ControllerDescription
ControllerDescription
+ + + +
+ ' . __('Deactivate') . ''; + } else if (!$error) { + echo '' . __('Activate') . ''; + } + + if ($info['url']) { + echo ' | '; + echo 'Docs
'; + } + + ?> +
+

+

+ get_method_url($controller, $method, array('dev' => 1)); + if ($active) { + echo "$method "; + } else { + echo "$method "; + } + } + + ?> +

+
+ print_controller_actions('action2'); ?> +

Address

+

Specify a base URL for JSON API. For example, using api as your API base URL would enable the following /api/get_recent_posts/. If you assign a blank value the API will only be available by setting a json query variable.

+ + + + + +
API base/
+ +
+

Note: User-friendly permalinks are not currently enabled. Change Permalinks + +

+ +

+
+
+ +
+
+ + +
+
+
+
+ $value) { + $args[] = urlencode($key) . '=' . urlencode($value); + } + $args = implode('&', $args); + } else { + $args = $options; + } + if ($controller != 'core') { + $method = "$controller/$method"; + } + if (!empty($base) && !empty($permalink_structure)) { + if (!empty($args)) { + $args = "?$args"; + } + return "$url/$base/$method/$args"; + } else { + return "$url?json=$method&$args"; + } + } + + function save_option($id, $value) { + $option_exists = (get_option($id, null) !== null); + if ($option_exists) { + update_option($id, $value); + } else { + add_option($id, $value); + } + } + + function get_controllers() { + $controllers = array(); + $dir = json_api_dir(); + $dh = opendir("$dir/controllers"); + while ($file = readdir($dh)) { + if (preg_match('/(.+)\.php$/', $file, $matches)) { + $controllers[] = $matches[1]; + } + } + $controllers = apply_filters('json_api_controllers', $controllers); + return array_map('strtolower', $controllers); + } + + function controller_is_active($controller) { + if (defined('JSON_API_CONTROLLERS')) { + $default = JSON_API_CONTROLLERS; + } else { + $default = 'core'; + } + $active_controllers = explode(',', get_option('json_api_controllers', $default)); + return (in_array($controller, $active_controllers)); + } + + function update_controllers($controllers) { + if (is_array($controllers)) { + return implode(',', $controllers); + } else { + return $controllers; + } + } + + function controller_info($controller) { + $path = $this->controller_path($controller); + $class = $this->controller_class($controller); + $response = array( + 'name' => $controller, + 'description' => '(No description available)', + 'methods' => array() + ); + if (file_exists($path)) { + $source = file_get_contents($path); + if (preg_match('/^\s*Controller name:(.+)$/im', $source, $matches)) { + $response['name'] = trim($matches[1]); + } + if (preg_match('/^\s*Controller description:(.+)$/im', $source, $matches)) { + $response['description'] = trim($matches[1]); + } + if (preg_match('/^\s*Controller URI:(.+)$/im', $source, $matches)) { + $response['docs'] = trim($matches[1]); + } + if (!class_exists($class)) { + require_once($path); + } + $response['methods'] = get_class_methods($class); + return $response; + } else if (is_admin()) { + return "Cannot find controller class '$class' (filtered path: $path)."; + } else { + $this->error("Unknown controller '$controller'."); + } + return $response; + } + + function controller_class($controller) { + return "json_api_{$controller}_controller"; + } + + function controller_path($controller) { + $dir = json_api_dir(); + $controller_class = $this->controller_class($controller); + return apply_filters("{$controller_class}_path", "$dir/controllers/$controller.php"); + } + + function get_nonce_id($controller, $method) { + $controller = strtolower($controller); + $method = strtolower($method); + return "json_api-$controller-$method"; + } + + function flush_rewrite_rules() { + global $wp_rewrite; + $wp_rewrite->flush_rules(); + } + + function error($message = 'Unknown error', $status = 'error') { + $this->response->respond(array( + 'error' => $message + ), $status); + } + + function include_value($key) { + return $this->response->is_value_included($key); + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/singletons/introspector.php b/wp-content/plugins/wp-json-api/singletons/introspector.php new file mode 100644 index 0000000..35fc63a --- /dev/null +++ b/wp-content/plugins/wp-json-api/singletons/introspector.php @@ -0,0 +1,299 @@ +set_posts_query($query); + $output = array(); + while (have_posts()) { + the_post(); + if ($wp_posts) { + $output[] = $post; + } else { + $output[] = new JSON_API_Post($post); + } + } + return $output; + } + + public function get_date_archive_permalinks() { + $archives = wp_get_archives('echo=0'); + preg_match_all("/href='([^']+)'/", $archives, $matches); + return $matches[1]; + } + + public function get_date_archive_tree($permalinks) { + $tree = array(); + foreach ($permalinks as $url) { + if (preg_match('#(\d{4})/(\d{2})#', $url, $date)) { + $year = $date[1]; + $month = $date[2]; + } else if (preg_match('/(\d{4})(\d{2})/', $url, $date)) { + $year = $date[1]; + $month = $date[2]; + } else { + continue; + } + $count = $this->get_date_archive_count($year, $month); + if (empty($tree[$year])) { + $tree[$year] = array( + $month => $count + ); + } else { + $tree[$year][$month] = $count; + } + } + return $tree; + } + + public function get_date_archive_count($year, $month) { + if (!isset($this->month_archives)) { + global $wpdb; + $post_counts = $wpdb->get_results(" + SELECT DATE_FORMAT(post_date, '%Y%m') AS month, + COUNT(ID) AS post_count + FROM $wpdb->posts + WHERE post_status = 'publish' + AND post_type = 'post' + GROUP BY month + "); + $this->month_archives = array(); + foreach ($post_counts as $post_count) { + $this->month_archives[$post_count->month] = $post_count->post_count; + } + } + return $this->month_archives["$year$month"]; + } + + public function get_categories() { + $wp_categories = get_categories(); + $categories = array(); + foreach ($wp_categories as $wp_category) { + if ($wp_category->term_id == 1 && $wp_category->slug == 'uncategorized') { + continue; + } + $categories[] = $this->get_category_object($wp_category); + } + return $categories; + } + + public function get_current_category() { + global $json_api; + extract($json_api->query->get(array('id', 'slug', 'category_id', 'category_slug'))); + if ($id || $category_id) { + if (!$id) { + $id = $category_id; + } + return $this->get_category_by_id($id); + } else if ($slug || $category_slug) { + if (!$slug) { + $slug = $category_slug; + } + return $this->get_category_by_slug($slug); + } else { + $json_api->error("Include 'id' or 'slug' var in your request."); + } + return null; + } + + public function get_category_by_id($category_id) { + $wp_category = get_term_by('id', $category_id, 'category'); + return $this->get_category_object($wp_category); + } + + public function get_category_by_slug($category_slug) { + $wp_category = get_term_by('slug', $category_slug, 'category'); + return $this->get_category_object($wp_category); + } + + public function get_tags() { + $wp_tags = get_tags(); + return array_map(array(&$this, 'get_tag_object'), $wp_tags); + } + + public function get_current_tag() { + global $json_api; + extract($json_api->query->get(array('id', 'slug', 'tag_id', 'tag_slug'))); + if ($id || $tag_id) { + if (!$id) { + $id = $tag_id; + } + return $this->get_tag_by_id($id); + } else if ($slug || $tag_slug) { + if (!$slug) { + $slug = $tag_slug; + } + return $this->get_tag_by_slug($slug); + } else { + $json_api->error("Include 'id' or 'slug' var in your request."); + } + return null; + } + + public function get_tag_by_id($tag_id) { + $wp_tag = get_term_by('id', $tag_id, 'post_tag'); + return $this->get_tag_object($wp_tag); + } + + public function get_tag_by_slug($tag_slug) { + $wp_tag = get_term_by('slug', $tag_slug, 'post_tag'); + return $this->get_tag_object($wp_tag); + } + + public function get_authors() { + global $wpdb; + $author_ids = $wpdb->get_col($wpdb->prepare(" + SELECT u.ID, m.meta_value AS last_name + FROM $wpdb->users AS u, + $wpdb->usermeta AS m + WHERE m.user_id = u.ID + AND m.meta_key = 'last_name' + ORDER BY last_name + ")); + $all_authors = array_map(array(&$this, 'get_author_by_id'), $author_ids); + $active_authors = array_filter($all_authors, array(&$this, 'is_active_author')); + return $active_authors; + } + + public function get_current_author() { + global $json_api; + extract($json_api->query->get(array('id', 'slug', 'author_id', 'author_slug'))); + if ($id || $author_id) { + if (!$id) { + $id = $author_id; + } + return $this->get_author_by_id($id); + } else if ($slug || $author_slug) { + if (!$slug) { + $slug = $author_slug; + } + return $this->get_author_by_login($slug); + } else { + $json_api->error("Include 'id' or 'slug' var in your request."); + } + return null; + } + + public function get_author_by_id($id) { + $id = get_the_author_meta('ID', $id); + if (!$id) { + return null; + } + return new JSON_API_Author($id); + } + + public function get_author_by_login($login) { + global $wpdb; + $id = $wpdb->get_var($wpdb->prepare(" + SELECT ID + FROM $wpdb->users + WHERE user_nicename = %s + ", $login)); + return $this->get_author_by_id($id); + } + + public function get_comments($post_id) { + global $wpdb; + $wp_comments = $wpdb->get_results($wpdb->prepare(" + SELECT * + FROM $wpdb->comments + WHERE comment_post_ID = %d + AND comment_approved = 1 + AND comment_type = '' + ORDER BY comment_date + ", $post_id)); + $comments = array(); + foreach ($wp_comments as $wp_comment) { + $comments[] = new JSON_API_Comment($wp_comment); + } + return $comments; + } + + public function get_attachments($post_id) { + $wp_attachments = get_children(array( + 'post_type' => 'attachment', + 'post_parent' => $post_id, + 'orderby' => 'menu_order', + 'order' => 'ASC' + )); + $attachments = array(); + if (!empty($wp_attachments)) { + foreach ($wp_attachments as $wp_attachment) { + $attachments[] = new JSON_API_Attachment($wp_attachment); + } + } + return $attachments; + } + + public function attach_child_posts(&$post) { + $post->children = array(); + $wp_children = get_posts(array( + 'post_type' => $post->type, + 'post_parent' => $post->id, + 'order' => 'ASC', + 'orderby' => 'menu_order' + )); + foreach ($wp_children as $wp_post) { + $post->children[] = new JSON_API_Post($wp_post); + } + foreach ($post->children as $child) { + $this->attach_child_posts($child); + } + } + + protected function get_category_object($wp_category) { + if (!$wp_category) { + return null; + } + return new JSON_API_Category($wp_category); + } + + protected function get_tag_object($wp_tag) { + if (!$wp_tag) { + return null; + } + return new JSON_API_Tag($wp_tag); + } + + protected function is_active_author($author) { + if (!isset($this->active_authors)) { + $this->active_authors = explode(',', wp_list_authors(array( + 'html' => false, + 'echo' => false, + 'exclude_admin' => false + ))); + $this->active_authors = array_map('trim', $this->active_authors); + } + return in_array($author->name, $this->active_authors); + } + + protected function set_posts_query($query = false) { + global $json_api, $wp_query; + + if (!$query) { + $query = array(); + } + + $query = array_merge($query, $wp_query->query); + + if ($json_api->query->page) { + $query['paged'] = $json_api->query->page; + } + + if ($json_api->query->count) { + $query['posts_per_page'] = $json_api->query->count; + } + + if ($json_api->query->post_type) { + $query['post_type'] = $json_api->query->post_type; + } + + if (!empty($query)) { + query_posts($query); + } + } + +} + +?> diff --git a/wp-content/plugins/wp-json-api/singletons/query.php b/wp-content/plugins/wp-json-api/singletons/query.php new file mode 100644 index 0000000..f01e906 --- /dev/null +++ b/wp-content/plugins/wp-json-api/singletons/query.php @@ -0,0 +1,194 @@ + 'Y-m-d H:i:s', + 'read_more' => 'Read more' + ); + + function __construct() { + // Register JSON API query vars + add_filter('query_vars', array(&$this, 'query_vars')); + } + + function get($key) { + if (is_array($key)) { + $result = array(); + foreach ($key as $k) { + $result[$k] = $this->get($k); + } + return $result; + } + $query_var = (isset($_REQUEST[$key])) ? $_REQUEST[$key] : null; + $wp_query_var = $this->wp_query_var($key); + if ($wp_query_var) { + return $wp_query_var; + } else if ($query_var) { + return $this->strip_magic_quotes($query_var); + } else if (isset($this->defaults[$key])) { + return $this->defaults[$key]; + } else { + return null; + } + } + + function __get($key) { + return $this->get($key); + } + + function __isset($key) { + return ($this->get($key) !== null); + } + + function wp_query_var($key) { + $wp_translation = array( + 'json' => 'json', + 'post_id' => 'p', + 'post_slug' => 'name', + 'page_id' => 'page_id', + 'page_slug' => 'name', + 'category_id' => 'cat', + 'category_slug' => 'category_name', + 'tag_id' => 'tag_id', + 'tag_slug' => 'tag', + 'author_id' => 'author', + 'author_slug' => 'author_name', + 'search' => 's', + 'order' => 'order', + 'order_by' => 'orderby' + ); + if ($key == 'date') { + $date = null; + if (get_query_var('year')) { + $date = get_query_var('year'); + } + if (get_query_var('monthnum')) { + $month = get_query_var('monthnum'); + if ($month < 10) { + $month = "0$month"; + } + $date .= $month; + } + if (get_query_var('day')) { + $day = get_query_var('day'); + if ($day < 10) { + $day = "0$day"; + } + $date .= $day; + } + return $date; + } else if (isset($wp_translation[$key])) { + return get_query_var($wp_translation[$key]); + } else { + return null; + } + } + + function strip_magic_quotes($value) { + if (get_magic_quotes_gpc()) { + return stripslashes($value); + } else { + return $value; + } + } + + function query_vars($wp_vars) { + $wp_vars[] = 'json'; + return $wp_vars; + } + + function get_controller() { + $json = $this->get('json'); + if (empty($json)) { + return false; + } + if (preg_match('/^[a-zA-Z_]+$/', $json)) { + return $this->get_legacy_controller($json); + } else if (preg_match('/^([a-zA-Z_]+)(\/|\.)[a-zA-Z_]+$/', $json, $matches)) { + return $matches[1]; + } else { + return 'core'; + } + } + + function get_legacy_controller($json) { + global $json_api; + if ($json == 'submit_comment') { + if ($json_api->controller_is_active('respond')) { + return 'respond'; + } else { + $json_api->error("The 'submit_comment' method has been removed from the Core controller. To use this method you must enable the Respond controller from WP Admin > Settings > JSON API."); + } + } else if ($json == 'create_post') { + if ($json_api->controller_is_active('posts')) { + return 'posts'; + } else { + $json_api->error("The 'create_post' method has been removed from the Core controller. To use this method you must enable the Posts controller from WP Admin > Settings > JSON API."); + } + } else { + return 'core'; + } + } + + function get_method($controller) { + + global $json_api; + + // Returns an appropriate API method name or false. Four possible outcomes: + // 1. API isn't being invoked at all (return false) + // 2. A specific API method was requested (return method name) + // 3. A method is chosen implicitly on a given WordPress page + // 4. API invoked incorrectly (return "error" method) + // + // Note: + // The implicit outcome (3) is invoked by setting the json query var to a + // non-empty value on any WordPress page: + // * http://example.org/2009/11/10/hello-world/?json=1 (get_post) + // * http://example.org/2009/11/?json=1 (get_date_posts) + // * http://example.org/category/foo?json=1 (get_category_posts) + + $method = $this->get('json'); + if (strpos($method, '/') !== false) { + $method = substr($method, strpos($method, '/') + 1); + } else if (strpos($method, '.') !== false) { + $method = substr($method, strpos($method, '.') + 1); + } + + if (empty($method)) { + // Case 1: we're not being invoked (done!) + return false; + } else if (method_exists("JSON_API_{$controller}_Controller", $method)) { + // Case 2: an explicit method was specified + return $method; + } else if ($controller == 'core') { + // Case 3: choose the method implicitly based on which page we're on... + if (is_search()) { + return 'get_search_results'; + } else if (is_home()) { + if (empty($_GET['json'])) { + $json_api->error("Uknown method '$method'."); + } + return 'get_recent_posts'; + } else if (is_page()) { + return 'get_page'; + } else if (is_single()) { + return 'get_post'; + } else if (is_category()) { + return 'get_category_posts'; + } else if (is_tag()) { + return 'get_tag_posts'; + } else if (is_author()) { + return 'get_author_posts'; + } else if (is_date()) { + return 'get_date_posts'; + } else if (is_404()) { + return '404'; + } + } + // Case 4: either the method doesn't exist or we don't support the page implicitly + return 'error'; + } + +} diff --git a/wp-content/plugins/wp-json-api/singletons/response.php b/wp-content/plugins/wp-json-api/singletons/response.php new file mode 100644 index 0000000..2479709 --- /dev/null +++ b/wp-content/plugins/wp-json-api/singletons/response.php @@ -0,0 +1,184 @@ +include_values = array(); + $this->exclude_values = array(); + if ($json_api->query->include) { + $this->include_values = explode(',', $json_api->query->include); + } + // Props to ikesyo for submitting a fix! + if ($json_api->query->exclude) { + $this->exclude_values = explode(',', $json_api->query->exclude); + $this->include_values = array_diff($this->include_values, $this->exclude_values); + } + + // Compatibility with Disqus plugin + remove_action('loop_end', 'dsq_loop_end'); + } + + function get_json($data, $status = 'ok') { + // Include a status value with the response + if (is_array($data)) { + $data = array_merge(array('status' => $status), $data); + } else if (is_object($data)) { + $data = get_object_vars($data); + $data = array_merge(array('status' => $status), $data); + } + + $data = apply_filters('json_api_encode', $data); + + if (function_exists('json_encode')) { + // Use the built-in json_encode function if it's available + return json_encode($data); + } else { + // Use PEAR's Services_JSON encoder otherwise + if (!class_exists('Services_JSON')) { + $dir = json_api_dir(); + require_once "$dir/library/JSON.php"; + } + $json = new Services_JSON(); + return $json->encode($data); + } + } + + function is_value_included($key) { + // Props to ikesyo for submitting a fix! + if (empty($this->include_values) && empty($this->exclude_values)) { + return true; + } else { + if (empty($this->exclude_values)) { + return in_array($key, $this->include_values); + } else { + return !in_array($key, $this->exclude_values); + } + } + } + + function respond($result, $status = 'ok') { + global $json_api; + $json = $this->get_json($result, $status); + $status_redirect = "redirect_$status"; + if ($json_api->query->dev || !empty($_REQUEST['dev'])) { + // Output the result in a human-redable format + if (!headers_sent()) { + header('HTTP/1.1 200 OK'); + header('Content-Type: text/plain; charset: UTF-8', true); + } else { + echo '
';
+      }
+      echo $this->prettify($json);
+    } else if (!empty($_REQUEST[$status_redirect])) {
+      wp_redirect($_REQUEST[$status_redirect]);
+    } else if ($json_api->query->redirect) {
+      $url = $this->add_status_query_var($json_api->query->redirect, $status);
+      wp_redirect($url);
+    } else if ($json_api->query->callback) {
+      // Run a JSONP-style callback with the result
+      $this->callback($json_api->query->callback, $json);
+    } else {
+      // Output the result
+      $this->output($json);
+    }
+    exit;
+  }
+  
+  function output($result) {
+    $charset = get_option('blog_charset');
+    if (!headers_sent()) {
+      header('HTTP/1.1 200 OK', true);
+      header("Content-Type: application/json; charset=$charset", true);
+    }
+    echo $result;
+  }
+  
+  function callback($callback, $result) {
+    $charset = get_option('blog_charset');
+    if (!headers_sent()) {
+      header('HTTP/1.1 200 OK', true);
+      header("Content-Type: application/javascript; charset=$charset", true);
+    }
+    echo "$callback($result)";
+  }
+  
+  function add_status_query_var($url, $status) {
+    if (strpos($url, '#')) {
+      // Remove the anchor hash for now
+      $pos = strpos($url, '#');
+      $anchor = substr($url, $pos);
+      $url = substr($url, 0, $pos);
+    }
+    if (strpos($url, '?')) {
+      $url .= "&status=$status";
+    } else {
+      $url .= "?status=$status";
+    }
+    if (!empty($anchor)) {
+      // Add the anchor hash back in
+      $url .= $anchor;
+    }
+    return $url;
+  }
+  
+  function prettify($ugly) {
+    $pretty = "";
+    $indent = "";
+    $last = '';
+    $pos = 0;
+    $level = 0;
+    $string = false;
+    while ($pos < strlen($ugly)) {
+      $char = substr($ugly, $pos++, 1);
+      if (!$string) {
+        if ($char == '{' || $char == '[') {
+          if ($char == '[' && substr($ugly, $pos, 1) == ']') {
+            $pretty .= "[]";
+            $pos++;
+          } else if ($char == '{' && substr($ugly, $pos, 1) == '}') {
+            $pretty .= "{}";
+            $pos++;
+          } else {
+            $pretty .= "$char\n";
+            $indent = str_repeat('  ', ++$level);
+            $pretty .= "$indent";
+          }
+        } else if ($char == '}' || $char == ']') {
+          $indent = str_repeat('  ', --$level);
+          if ($last != '}' && $last != ']') {
+            $pretty .= "\n$indent";
+          } else if (substr($pretty, -2, 2) == '  ') {
+            $pretty = substr($pretty, 0, -2);
+          }
+          $pretty .= $char;
+          if (substr($ugly, $pos, 1) == ',') {
+            $pretty .= ",";
+            $last = ',';
+            $pos++;
+          }
+          $pretty .= "\n$indent";
+        } else if ($char == ':') {
+          $pretty .= ": ";
+        } else if ($char == ',') {
+          $pretty .= ",\n$indent";
+        } else if ($char == '"') {
+          $pretty .= '"';
+          $string = true;
+        } else {
+          $pretty .= $char;
+        }
+      } else {
+        if ($last != '\\' && $char == '"') {
+          $string = false;
+        }
+        $pretty .= $char;
+      }
+      $last = $char;
+    }
+    return $pretty;
+  }
+  
+}
+
+?>
diff --git a/wp-content/plugins/wp-json-api/tests/core.get_author_index-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_author_index-01.phpt
new file mode 100644
index 0000000..5db2dfd
--- /dev/null
+++ b/wp-content/plugins/wp-json-api/tests/core.get_author_index-01.phpt
@@ -0,0 +1,14 @@
+--TEST--
+core.get_author_index
+--FILE--
+get('http://wordpress.test/?json=core.get_author_index');
+$response = $http->currentResponse();
+echo $response['body'];
+
+?>
+--EXPECT--
+{"status":"ok","count":2,"authors":[{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""}]}
diff --git a/wp-content/plugins/wp-json-api/tests/core.get_author_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-01.phpt
new file mode 100644
index 0000000..cfed798
--- /dev/null
+++ b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-01.phpt
@@ -0,0 +1,14 @@
+--TEST--
+core.get_author_posts by slug
+--FILE--
+get('http://wordpress.test/?json=core.get_author_posts&slug=chip-bennett');
+$response = $http->currentResponse();
+echo $response['body'];
+
+?>
+--EXPECT--
+{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

\n\t\t\t
\n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

John: foo
\nMary: bar
\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

\"boat\"<\/a>

A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

\"chunk<\/a>

Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

Only one thing is impossible for God: To find any sense in any copyright law on the planet.
\n
Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_author_posts-02.phpt b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-02.phpt new file mode 100644 index 0000000..91fb0fa --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-02.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_author_posts by author_slug +--FILE-- +get('http://wordpress.test/?json=core.get_author_posts&author_slug=chip-bennett'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

\n\t\t\t
\n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

John: foo
\nMary: bar
\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

\"boat\"<\/a>

A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

\"chunk<\/a>

Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

Only one thing is impossible for God: To find any sense in any copyright law on the planet.
\n
Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_author_posts-03.phpt b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-03.phpt new file mode 100644 index 0000000..204ca0c --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-03.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_author_posts by id +--FILE-- +get('http://wordpress.test/?json=core.get_author_posts&id=3'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

\n\t\t\t
\n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

John: foo
\nMary: bar
\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

\"boat\"<\/a>

A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

\"chunk<\/a>

Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

Only one thing is impossible for God: To find any sense in any copyright law on the planet.
\n
Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_author_posts-04.phpt b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-04.phpt new file mode 100644 index 0000000..8b00915 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_author_posts-04.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_author_posts by author_id +--FILE-- +get('http://wordpress.test/?json=core.get_author_posts&author_id=3'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

\n\t\t\t
\n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
\n\t\t\t
\n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

John: foo
\nMary: bar
\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

\"boat\"<\/a>

A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

\"chunk<\/a>

Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

Only one thing is impossible for God: To find any sense in any copyright law on the planet.
\n
Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_category_index-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_category_index-01.phpt new file mode 100644 index 0000000..f91d3b7 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_category_index-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_category_index +--FILE-- +get('http://wordpress.test/?json=core.get_category_index'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":44,"categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":4,"slug":"antiquarianism","title":"antiquarianism","description":"","parent":0,"post_count":1},{"id":5,"slug":"arrangement","title":"arrangement","description":"","parent":0,"post_count":1},{"id":6,"slug":"asmodeus","title":"asmodeus","description":"","parent":0,"post_count":1},{"id":7,"slug":"broder","title":"broder","description":"","parent":0,"post_count":1},{"id":8,"slug":"buying","title":"buying","description":"","parent":0,"post_count":1},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":12,"slug":"championship","title":"championship","description":"","parent":0,"post_count":1},{"id":13,"slug":"chastening","title":"chastening","description":"","parent":0,"post_count":1},{"id":14,"slug":"clerkship","title":"clerkship","description":"","parent":0,"post_count":1},{"id":15,"slug":"disinclination","title":"disinclination","description":"","parent":0,"post_count":1},{"id":16,"slug":"disinfection","title":"disinfection","description":"","parent":0,"post_count":1},{"id":17,"slug":"dispatch","title":"dispatch","description":"","parent":0,"post_count":1},{"id":18,"slug":"echappee","title":"echappee","description":"","parent":0,"post_count":1},{"id":19,"slug":"enphagy","title":"enphagy","description":"","parent":0,"post_count":1},{"id":20,"slug":"equipollent","title":"equipollent","description":"","parent":0,"post_count":1},{"id":21,"slug":"fatuity","title":"fatuity","description":"","parent":0,"post_count":1},{"id":24,"slug":"gaberlunzie","title":"gaberlunzie","description":"","parent":0,"post_count":1},{"id":25,"slug":"illtempered","title":"illtempered","description":"","parent":0,"post_count":1},{"id":26,"slug":"insubordination","title":"insubordination","description":"","parent":0,"post_count":1},{"id":27,"slug":"lender","title":"lender","description":"","parent":0,"post_count":1},{"id":28,"slug":"monosyllable","title":"monosyllable","description":"","parent":0,"post_count":1},{"id":29,"slug":"packthread","title":"packthread","description":"","parent":0,"post_count":1},{"id":30,"slug":"palter","title":"palter","description":"","parent":0,"post_count":1},{"id":31,"slug":"papilionaceous","title":"papilionaceous","description":"","parent":0,"post_count":1},{"id":33,"slug":"personable","title":"personable","description":"","parent":0,"post_count":1},{"id":34,"slug":"propylaeum","title":"propylaeum","description":"","parent":0,"post_count":1},{"id":35,"slug":"pustule","title":"pustule","description":"","parent":0,"post_count":1},{"id":36,"slug":"quartern","title":"quartern","description":"","parent":0,"post_count":1},{"id":37,"slug":"scholarship","title":"scholarship","description":"","parent":0,"post_count":1},{"id":38,"slug":"selfconvicted","title":"selfconvicted","description":"","parent":0,"post_count":1},{"id":39,"slug":"showshoe","title":"showshoe","description":"","parent":0,"post_count":1},{"id":40,"slug":"sloyd","title":"sloyd","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1},{"id":42,"slug":"sublunary","title":"sublunary","description":"","parent":0,"post_count":1},{"id":43,"slug":"tamtam","title":"tamtam","description":"","parent":0,"post_count":1},{"id":44,"slug":"weakhearted","title":"weakhearted","description":"","parent":0,"post_count":1},{"id":45,"slug":"ween","title":"ween","description":"","parent":0,"post_count":1},{"id":46,"slug":"wellhead","title":"wellhead","description":"","parent":0,"post_count":1},{"id":47,"slug":"wellintentioned","title":"wellintentioned","description":"","parent":0,"post_count":1},{"id":48,"slug":"whetstone","title":"whetstone","description":"","parent":0,"post_count":1},{"id":49,"slug":"years","title":"years","description":"","parent":0,"post_count":1}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_category_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_category_posts-01.phpt new file mode 100644 index 0000000..4116781 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_category_posts-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_category_posts default +--FILE-- +get('http://wordpress.test/?json=core.get_category_posts&slug=cat-a'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":2,"pages":1,"category":{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_date_index-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_date_index-01.phpt new file mode 100644 index 0000000..befdeba --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_date_index-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_search_posts default +--FILE-- +get('http://wordpress.test/?json=core.get_date_index'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","permalinks":["http:\/\/wordpress.test\/2008\/09\/","http:\/\/wordpress.test\/2008\/06\/","http:\/\/wordpress.test\/2008\/05\/","http:\/\/wordpress.test\/2008\/04\/","http:\/\/wordpress.test\/2008\/03\/"],"tree":{"2008":{"09":"3","06":"10","05":"5","04":"1","03":"3"}}} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_date_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-01.phpt new file mode 100644 index 0000000..35f4d06 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_date_posts by day +--FILE-- +get('http://wordpress.test/?json=core.get_date_posts&date=2008-09-05'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":1,"count_total":1,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_date_posts-02.phpt b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-02.phpt new file mode 100644 index 0000000..01f6cb4 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-02.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_date_posts by month +--FILE-- +get('http://wordpress.test/?json=core.get_date_posts&date=2008-09'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_date_posts-03.phpt b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-03.phpt new file mode 100644 index 0000000..23788dd --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_date_posts-03.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_date_posts by year +--FILE-- +get('http://wordpress.test/?json=core.get_date_posts&date=2008-09'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

This is a sticky post!!! Make sure it sticks!<\/p>\n

This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

Image Alignment Tests: Un-Captioned Images<\/h2>\n

Center-align, no caption<\/h3>\n

Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Left-align, no caption<\/h3>\n

Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

Right-align, no caption<\/h3>\n

Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

No alignment, no caption<\/h3>\n

None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_page-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_page-01.phpt new file mode 100644 index 0000000..6881ead --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_page-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_page default +--FILE-- +get('http://wordpress.test/?json=core.get_page&slug=about'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","page":{"id":686,"type":"page","slug":"about","url":"http:\/\/wordpress.test\/about\/","status":"publish","title":"About The Tests","title_plain":"About The Tests","content":"

This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and checklist together to test your theme.<\/p>\n

WordPress Theme Development Resources<\/h2>\n
    \n
  1. See Theme Development<\/a> for code standards<\/a>, examples of best practices, and resources for Theme development<\/a>.<\/li>\n
  2. See Theme Unit Test<\/a> for a robust test suite for your Theme and get the latest version of the test data you see here.<\/li>\n
  3. See Theme Review<\/a> for a guide to submitting your Theme to the Themes Directory<\/a>.<\/li>\n<\/ol>\n","excerpt":"This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and … Continue reading →<\/span><\/a>","date":"2010-07-25 19:40:01","modified":"2010-07-25 19:40:01","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_page-02.phpt b/wp-content/plugins/wp-json-api/tests/core.get_page-02.phpt new file mode 100644 index 0000000..818a399 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_page-02.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_page children argument +--FILE-- +get('http://wordpress.test/?json=core.get_page&slug=level-1&children=1'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","page":{"id":174,"type":"page","slug":"level-1","url":"http:\/\/wordpress.test\/level-1\/","status":"publish","title":"Level 1","title_plain":"Level 1","content":"

    Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.<\/p>\n","excerpt":"Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:25:40","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":173,"type":"page","slug":"level-2","url":"http:\/\/wordpress.test\/level-1\/level-2\/","status":"publish","title":"Level 2","title_plain":"Level 2","content":"

    Level 2 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 2 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:33","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":172,"type":"page","slug":"level-3","url":"http:\/\/wordpress.test\/level-1\/level-2\/level-3\/","status":"publish","title":"Level 3","title_plain":"Level 3","content":"

    Level 3 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 3 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:16","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[]}]}]}} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_post-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_post-01.phpt new file mode 100644 index 0000000..48f38a9 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_post-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_post default +--FILE-- +get('http://wordpress.test/?json=core.get_post&slug=readability-test'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","post":{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

    All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

    <\/span><\/p>\n

    Mrs. Darling first heard of Peter when she was tidying up her children’s minds. It is the nightly custom of every good mother after her children are asleep to rummage in their minds and put things straight for next morning, repacking into their proper places the many articles that have wandered during the day.<\/p>\n

    If you could keep awake (but of course you can’t) you would see your own mother doing this, and you would find it very interesting to watch her. It is quite like tidying up drawers. You would see her on her knees, I expect, lingering humorously over some of your contents, wondering where on earth you had picked this thing up, making discoveries sweet and not so sweet, pressing this to her cheek as if it were as nice as a kitten, and hurriedly stowing that out of sight. When you wake in the morning, the naughtiness and evil passions with which you went to bed have been folded up small and placed at the bottom of your mind and on the top, beautifully aired, are spread out your prettier thoughts, ready for you to put on.<\/p>\n

    I don’t know whether you have ever seen a map of a person’s mind. Doctors sometimes draw maps of other parts of you, and your own map can become intensely interesting, but catch them trying to draw a map of a child’s mind, which is not only confused, but keeps going round all the time. There are zigzag lines on it, just like your temperature on a card, and these are probably roads in the island, for the Neverland is always more or less an island, with astonishing splashes of colour here and there, and coral reefs and rakish-looking craft in the offing, and savages and lonely lairs, and gnomes who are mostly tailors, and caves through which a river runs, and princes with six elder brothers, and a hut fast going to decay, and one very small old lady with a hooked nose. It would be an easy map if that were all, but there is also first day at school, religion, fathers, the round pond, needle-work, murders, hangings, verbs that take the dative, chocolate pudding day, getting into braces, say ninety-nine, three-pence for pulling out your tooth yourself, and so on, and either these are part of the island or they are another map showing through, and it is all rather confusing, especially as nothing will stand still.<\/p>\n

    Of course the Neverlands vary a good deal. John’s, for instance, had a lagoon with flamingoes flying over it at which John was shooting, while Michael, who was very small, had a flamingo with lagoons flying over it. John lived in a boat turned upside down on the sands, Michael in a wigwam, Wendy in a house of leaves deftly sewn together. John had no friends, Michael had friends at night, Wendy had a pet wolf forsaken by its parents, but on the whole the Neverlands have a family resemblance, and if they stood still in a row you could say of them that they have each other’s nose, and so forth. On these magic shores children at play are for ever beaching their coracles [simple boat]. We too have been there; we can still hear the sound of the surf, though we shall land no more.<\/p>\n

    Of all delectable islands the Neverland is the snuggest and most compact, not large and sprawly, you know, with tedious distances between one adventure and another, but nicely crammed. When you play at it by day with the chairs and table-cloth, it is not in the least alarming, but in the two minutes before you go to sleep it becomes very real. That is why there are night-lights.<\/p>\n

    Occasionally in her travels through her children’s minds Mrs. Darling found things she could not understand, and of these quite the most perplexing was the word Peter. She knew of no Peter, and yet he was here and there in John and Michael’s minds, while Wendy’s began to be scrawled all over with him. The name stood out in bolder letters than any of the other words, and as Mrs. Darling gazed she felt that it had an oddly cocky appearance.<\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},"previous_url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/"} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-01.phpt new file mode 100644 index 0000000..fa6de40 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_recent_posts default +--FILE-- +get('http://wordpress.test/?json=core.get_recent_posts'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

    This is a sticky post!!! Make sure it sticks!<\/p>\n

    This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

    All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

    Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

    Image Alignment Tests: Un-Captioned Images<\/h2>\n

    Center-align, no caption<\/h3>\n

    Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    Left-align, no caption<\/h3>\n

    Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    Right-align, no caption<\/h3>\n

    Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    No alignment, no caption<\/h3>\n

    None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

    \n\t\t\t
    \n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
    \n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
    \n\t\t\t
    \n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
    \n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
    \n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

    \u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

    John: foo
    \nMary: bar
    \nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

    The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

    \"boat\"<\/a>

    A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

    \"chunk<\/a>

    Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

    Only one thing is impossible for God: To find any sense in any copyright law on the planet.
    \n
    Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-02.phpt b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-02.phpt new file mode 100644 index 0000000..58c980b --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-02.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_recent_posts count argument +--FILE-- +get('http://wordpress.test/?json=core.get_recent_posts&count=3'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":3,"count_total":22,"pages":8,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

    This is a sticky post!!! Make sure it sticks!<\/p>\n

    This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

    All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

    Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

    Image Alignment Tests: Un-Captioned Images<\/h2>\n

    Center-align, no caption<\/h3>\n

    Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    Left-align, no caption<\/h3>\n

    Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    Right-align, no caption<\/h3>\n

    Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

    No alignment, no caption<\/h3>\n

    None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-03.phpt b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-03.phpt new file mode 100644 index 0000000..09bf415 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_recent_posts-03.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_recent_posts page argument +--FILE-- +get('http://wordpress.test/?json=core.get_recent_posts&page=2'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":579,"type":"post","slug":"post-format-test-status","url":"http:\/\/wordpress.test\/2008\/06\/04\/post-format-test-status\/","status":"publish","title":"Post Format Test: Status","title_plain":"Post Format Test: Status","content":"

    WordPress, how do I love thee? Let me count the ways (in 140 characters or less).<\/p>\n","excerpt":"WordPress, how do I love thee? Let me count the ways (in 140 characters or less).","date":"2008-06-04 08:21:24","modified":"2008-06-04 08:21:24","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":582,"type":"post","slug":"post-format-test-video","url":"http:\/\/wordpress.test\/2008\/06\/03\/post-format-test-video\/","status":"publish","title":"Post Format Test: Video","title_plain":"Post Format Test: Video","content":"

    <\/embed><\/p>\n

    Posted as per the instructions in the Codex<\/a>.<\/p>\n","excerpt":"Posted as per the instructions in the Codex.","date":"2008-06-03 08:25:58","modified":"2008-06-03 08:25:58","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":587,"type":"post","slug":"post-format-test-audio","url":"http:\/\/wordpress.test\/2008\/06\/02\/post-format-test-audio\/","status":"publish","title":"Post Format Test: Audio","title_plain":"Post Format Test: Audio","content":"

    Hayseed Rag \u2013 The Dizzy Trio<\/a><\/p>\n","excerpt":"Hayseed Rag \u2013 The Dizzy Trio","date":"2008-06-02 08:36:44","modified":"2008-06-02 08:36:44","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":622,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3","slug":"hayseedrag-thedizzytrio_vbr-2","title":"Hayseed Rag \u2013 The Dizzy Trio","description":"Victor # 19421-B The dizzy trio -novelty fox trot \u2013 Harmonica specialty by Borrah Minevitch \u2013 Harmonica,guitar,banjo, with Jew\u2019s harp and piano \u2013 issue date: May 1924. (public domain<\/a>)","caption":"Hayseed Rag \u2013 The Dizzy Trio","parent":587,"mime_type":"audio\/mpeg"}],"comment_count":0,"comment_status":"closed"},{"id":494,"type":"post","slug":"if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious","url":"http:\/\/wordpress.test\/2008\/05\/06\/if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious\/","status":"publish","title":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","title_plain":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","content":"

    A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it’s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas. :) <\/p>\n","excerpt":"A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it’s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas.","date":"2008-05-06 12:23:00","modified":"2008-05-06 12:23:00","categories":[],"tags":[],"author":{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":134,"type":"post","slug":"this-post-has-no-body","url":"http:\/\/wordpress.test\/2008\/05\/05\/this-post-has-no-body\/","status":"publish","title":"This post has no body","title_plain":"This post has no body","content":"","excerpt":"","date":"2008-05-05 09:39:56","modified":"2008-05-05 09:39:56","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":133,"type":"post","slug":"14","url":"http:\/\/wordpress.test\/2008\/05\/04\/14\/","status":"publish","title":"","title_plain":"","content":"

    This Post has no Post Title, but must still display a link to the single-page Post view.<\/p>\n","excerpt":"This Post has no Post Title, but must still display a link to the single-page Post view.","date":"2008-05-04 09:39:23","modified":"2008-05-04 09:39:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":168,"type":"post","slug":"many-categories","url":"http:\/\/wordpress.test\/2008\/05\/03\/many-categories\/","status":"publish","title":"Many Categories","title_plain":"Many Categories","content":"

    This post has far too many categories.<\/p>\n","excerpt":"This post has far too many categories.","date":"2008-05-03 06:19:03","modified":"2008-05-03 06:19:03","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":4,"slug":"antiquarianism","title":"antiquarianism","description":"","parent":0,"post_count":1},{"id":5,"slug":"arrangement","title":"arrangement","description":"","parent":0,"post_count":1},{"id":6,"slug":"asmodeus","title":"asmodeus","description":"","parent":0,"post_count":1},{"id":7,"slug":"broder","title":"broder","description":"","parent":0,"post_count":1},{"id":8,"slug":"buying","title":"buying","description":"","parent":0,"post_count":1},{"id":12,"slug":"championship","title":"championship","description":"","parent":0,"post_count":1},{"id":13,"slug":"chastening","title":"chastening","description":"","parent":0,"post_count":1},{"id":14,"slug":"clerkship","title":"clerkship","description":"","parent":0,"post_count":1},{"id":15,"slug":"disinclination","title":"disinclination","description":"","parent":0,"post_count":1},{"id":16,"slug":"disinfection","title":"disinfection","description":"","parent":0,"post_count":1},{"id":17,"slug":"dispatch","title":"dispatch","description":"","parent":0,"post_count":1},{"id":18,"slug":"echappee","title":"echappee","description":"","parent":0,"post_count":1},{"id":19,"slug":"enphagy","title":"enphagy","description":"","parent":0,"post_count":1},{"id":20,"slug":"equipollent","title":"equipollent","description":"","parent":0,"post_count":1},{"id":21,"slug":"fatuity","title":"fatuity","description":"","parent":0,"post_count":1},{"id":24,"slug":"gaberlunzie","title":"gaberlunzie","description":"","parent":0,"post_count":1},{"id":25,"slug":"illtempered","title":"illtempered","description":"","parent":0,"post_count":1},{"id":26,"slug":"insubordination","title":"insubordination","description":"","parent":0,"post_count":1},{"id":27,"slug":"lender","title":"lender","description":"","parent":0,"post_count":1},{"id":28,"slug":"monosyllable","title":"monosyllable","description":"","parent":0,"post_count":1},{"id":29,"slug":"packthread","title":"packthread","description":"","parent":0,"post_count":1},{"id":30,"slug":"palter","title":"palter","description":"","parent":0,"post_count":1},{"id":31,"slug":"papilionaceous","title":"papilionaceous","description":"","parent":0,"post_count":1},{"id":33,"slug":"personable","title":"personable","description":"","parent":0,"post_count":1},{"id":34,"slug":"propylaeum","title":"propylaeum","description":"","parent":0,"post_count":1},{"id":35,"slug":"pustule","title":"pustule","description":"","parent":0,"post_count":1},{"id":36,"slug":"quartern","title":"quartern","description":"","parent":0,"post_count":1},{"id":37,"slug":"scholarship","title":"scholarship","description":"","parent":0,"post_count":1},{"id":38,"slug":"selfconvicted","title":"selfconvicted","description":"","parent":0,"post_count":1},{"id":39,"slug":"showshoe","title":"showshoe","description":"","parent":0,"post_count":1},{"id":40,"slug":"sloyd","title":"sloyd","description":"","parent":0,"post_count":1},{"id":42,"slug":"sublunary","title":"sublunary","description":"","parent":0,"post_count":1},{"id":43,"slug":"tamtam","title":"tamtam","description":"","parent":0,"post_count":1},{"id":44,"slug":"weakhearted","title":"weakhearted","description":"","parent":0,"post_count":1},{"id":45,"slug":"ween","title":"ween","description":"","parent":0,"post_count":1},{"id":46,"slug":"wellhead","title":"wellhead","description":"","parent":0,"post_count":1},{"id":47,"slug":"wellintentioned","title":"wellintentioned","description":"","parent":0,"post_count":1},{"id":48,"slug":"whetstone","title":"whetstone","description":"","parent":0,"post_count":1},{"id":49,"slug":"years","title":"years","description":"","parent":0,"post_count":1}],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":167,"type":"post","slug":"many-tags","url":"http:\/\/wordpress.test\/2008\/05\/02\/many-tags\/","status":"publish","title":"Many Tags","title_plain":"Many Tags","content":"

    This post has far too many tags.<\/p>\n","excerpt":"This post has far too many tags.","date":"2008-05-02 06:09:34","modified":"2008-05-02 06:09:34","categories":[],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":54,"slug":"cienaga","title":"cienaga","description":"","post_count":1},{"id":55,"slug":"claycold","title":"claycold","description":"","post_count":1},{"id":56,"slug":"crushing","title":"crushing","description":"","post_count":1},{"id":58,"slug":"dinarchy","title":"dinarchy","description":"","post_count":1},{"id":59,"slug":"doolie","title":"doolie","description":"","post_count":1},{"id":60,"slug":"energumen","title":"energumen","description":"","post_count":1},{"id":61,"slug":"ephialtes","title":"ephialtes","description":"","post_count":1},{"id":62,"slug":"eudiometer","title":"eudiometer","description":"","post_count":1},{"id":63,"slug":"figuriste","title":"figuriste","description":"","post_count":1},{"id":66,"slug":"habergeon","title":"habergeon","description":"","post_count":1},{"id":67,"slug":"hapless","title":"hapless","description":"","post_count":1},{"id":68,"slug":"hartshorn","title":"hartshorn","description":"","post_count":1},{"id":69,"slug":"hostility-impregnability","title":"hostility impregnability","description":"","post_count":1},{"id":70,"slug":"impropriation","title":"impropriation","description":"","post_count":1},{"id":72,"slug":"knave","title":"knave","description":"","post_count":1},{"id":73,"slug":"misinformed","title":"misinformed","description":"","post_count":1},{"id":74,"slug":"moil","title":"moil","description":"","post_count":1},{"id":75,"slug":"mornful","title":"mornful","description":"","post_count":1},{"id":76,"slug":"outlaw","title":"outlaw","description":"","post_count":1},{"id":77,"slug":"pamphjlet","title":"pamphjlet","description":"","post_count":1},{"id":78,"slug":"pneumatics","title":"pneumatics","description":"","post_count":1},{"id":79,"slug":"portly-portreeve","title":"portly portreeve","description":"","post_count":1},{"id":81,"slug":"precipitancy","title":"precipitancy","description":"","post_count":1},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2},{"id":83,"slug":"programme","title":"programme","description":"","post_count":1},{"id":84,"slug":"psychological","title":"psychological","description":"","post_count":1},{"id":85,"slug":"puncher","title":"puncher","description":"","post_count":1},{"id":86,"slug":"ramose","title":"ramose","description":"","post_count":1},{"id":87,"slug":"renegade","title":"renegade","description":"","post_count":1},{"id":88,"slug":"retrocede","title":"retrocede","description":"","post_count":1},{"id":89,"slug":"stagnation-unhorsed","title":"stagnation unhorsed","description":"","post_count":1},{"id":98,"slug":"thunderheaded","title":"thunderheaded","description":"","post_count":1},{"id":99,"slug":"unculpable","title":"unculpable","description":"","post_count":1},{"id":100,"slug":"withered-brandnew","title":"withered brandnew","description":"","post_count":1},{"id":101,"slug":"xanthopsia","title":"xanthopsia","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":131,"type":"post","slug":"test-with-secret-password","url":"http:\/\/wordpress.test\/2008\/04\/04\/test-with-secret-password\/","status":"publish","title":"Protected: Test with secret password","title_plain":"Protected: Test with secret password","content":"

    \n

    This post is password protected. To view it please enter your password below:<\/p>\n

    Here’s a post with some comments.<\/p>\n","excerpt":"Here’s a post with some comments.","date":"2008-03-03 10:11:37","modified":"2008-03-03 10:11:37","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[{"id":13,"name":"Test Author","url":"","date":"2007-09-03 10:18:04","content":"

    Author comment.<\/p>\n

    Header one<\/h1>\n

    Header two<\/h2>\n

    Header three<\/h3>\n

    Header four<\/h4>\n

    Header five<\/h5>\n
    Header six<\/h6>\n

    Blockquote Tests<\/h2>\n

    Blockquote:<\/p>\n

    Here’s a one line quote.<\/p><\/blockquote>\n

    This part isn’t quoted. Here’s a longer quote:<\/p>\n

    It\u2019s like a language. You learn the alphabet, which are the scales. You learn sentences, which are the chords. And then you talk extemporaneously with the horn. It\u2019s a wonderful thing to speak extemporaneously, which is something I\u2019ve never gotten the hang of. But musically I love to talk just off the top of my head. And that\u2019s what jazz music is all about.<\/p>\n

    Stan Getz<\/cite><\/p><\/blockquote>\n

    And some trailing text.<\/p>\n

    Table Layout Test<\/h2>\n\n\n\n\n\n\n\n",""],legend:[1,"
    ","
    "],thead:[1,"
    Title<\/th>\nViews<\/th>\n<\/th>\n<\/tr>\n
    About Test User<\/a><\/td>\n1<\/td>\nMore<\/td>\n<\/tr>\n
    260<\/a><\/td>\n1<\/td>\nMore<\/td>\n<\/tr>\n
    Archives<\/a><\/td>\n1<\/td>\nMore<\/td>\n<\/tr>\n
    235<\/a><\/td>\n1<\/td>\nMore<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

    List Type Tests<\/h2>\n

    Definition List<\/h3>\n
    \n
    Definition List Title<\/dt>\n
    This is a definition list division.<\/dd>\n
    Definition<\/dt>\n
    An exact statement or description of the nature, scope, or meaning of something: our definition of what constitutes poetry.<\/em><\/dd>\n
    Gallery<\/dt>\n
    A feature introduced with WordPress 2.5, that is specifically an exposition of images attached to a post. In that same vein, an upload is “attached to a post” when you upload it while editing a post.<\/dd>\n
    Gravatar<\/dt>\n
    A globally recognized avatar (a graphic image or picture that represents a user). A gravatar is associated with an email address, and is maintained by the Gravatar.com service. Using this service, a blog owner can configure their blog so that a user’s gravatar is displayed along with their comments.<\/dd>\n<\/dl>\n

    Unordered List (Nested)<\/h3>\n
      \n
    • List item one\n
        \n
      • List item one\n
          \n
        • List item one<\/li>\n
        • List item two<\/li>\n
        • List item three<\/li>\n
        • List item four<\/li>\n<\/ul>\n<\/li>\n
        • List item two<\/li>\n
        • List item three<\/li>\n
        • List item four<\/li>\n<\/ul>\n<\/li>\n
        • List item two<\/li>\n
        • List item three<\/li>\n
        • List item four<\/li>\n<\/ul>\n

          Ordered List<\/h3>\n
            \n
          1. List item one\n
              \n
            1. List item one\n
                \n
              1. List item one<\/li>\n
              2. List item two<\/li>\n
              3. List item three<\/li>\n
              4. List item four<\/li>\n<\/ol>\n<\/li>\n
              5. List item two<\/li>\n
              6. List item three<\/li>\n
              7. List item four<\/li>\n<\/ol>\n<\/li>\n
              8. List item two<\/li>\n
              9. List item three<\/li>\n
              10. List item four<\/li>\n<\/ol>\n

                HTML Element Tag Tests<\/h2>\n

                All other HTML tags listed in the FAQ<\/a>:<\/p>\n

                Here is the address for Automattic, using the <address><\/code> tag:<\/p>\n

                355 1st Street Suite 202
                \nSan Francisco, CA 94105
                \nUnited States<\/address>\n

                This is an example of an <anchor><\/code><\/a> (otherwise known as a link). This abbr.<\/abbr> is an example of an <abbr> tag in the middle of a sentence. Here is a TLA<\/acronym> showing off the <acronym><\/code> tag. What, you want to see some over-sized text<\/big> using the <big><\/code> tag? Can you cite a reference<\/cite> for that, using the <cite><\/code> tag? Have you noticed that all of the tag names are displayed in code-form<\/code>, using the <code><\/code> tag? Similarly, I could emulate keyboard text<\/kbd>, using the <kbd><\/code> text tag, or emulate teletype text<\/tt> using the <tt><\/code> tag.<\/p>\n

                Oh no! I wrote something incorrectly. I’d better delete it<\/del>, using the <del><\/code> tag. I could alternately strike something out<\/span> using the <strike><\/code> tag, or strike something out using the <s><\/code> tag. So many choices<\/em>, which I emphasize using the <em><\/code> tag. Just to clarify, this is some inserted text<\/ins>, that I’ll highlight using the <ins><\/code> tag.<\/p>\n

                Need to display completely unformatted text, such as a large block of code? Use the <pre><\/code> tag, which lets you display:<\/p>\n

                #container {\n\tfloat: left;\n\tmargin: 0 -240px 0 0;\n\twidth: 100%;\n}<\/pre>\n

                Want to quote the WordPress tagline Code is Poetry<\/q>? Use the <q><\/code> tag to add quotes around it. This is strong text<\/strong> (otherwise known as bold), using the <strong><\/code> tag.<\/p>\n

                Need to write H2<\/sub>O or E = MC2<\/sup>? You may find great use for subscripting<\/sub> text using the <sub><\/code> tag, or for superscripting<\/sup> text using the <sup><\/code> tag. Need to call out a variable<\/var>? Use the <var><\/code> tag.<\/p>\n

                Div and Span Tests<\/h2>\n
                \n

                Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<\/p>\n

                This is a div with “myclass” class, inside of another div, using the <div><\/code> tag.<\/strong><\/div>\n

                Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl.<\/p>\n<\/div>\n

                Lorem ipsum dolor sit amet, consectetuer adipiscing elit. This is a span inside of a paragraph, using the <span><\/code> tag.<\/strong><\/span> Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl.<\/p>\n","parent":0},{"id":10,"name":"Alex Shiels","url":"http:\/\/flightpath.wordpress.com\/","date":"2007-09-04 10:12:13","content":"

                Not an author comment.<\/p>\n","parent":0},{"id":11,"name":"Anon","url":"","date":"2007-09-04 10:14:19","content":"

                I’m not logged in.<\/p>\n

                \nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n

                \nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n

                \nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/blockquote>\n","parent":0},{"id":12,"name":"Matt","url":"http:\/\/photomatt.net\/","date":"2007-09-04 10:15:32","content":"

                Anonymous person pretending to be Matt.<\/p>\n","parent":0},{"id":14,"name":"Lloyd Budd","url":"http:\/\/foolswisdom.com","date":"2007-09-04 10:23:10","content":"

                Another test<\/p>\n","parent":0},{"id":15,"name":"tellyworthtest1","url":"","date":"2007-09-04 10:35:33","content":"

                I’m logged in but I don’t have a blog.<\/p>\n","parent":0},{"id":16,"name":"tellyworthtest2","url":"","date":"2007-09-04 10:45:21","content":"

                I’m a contributor to this blog.<\/p>\n","parent":0},{"id":18,"name":"Alex Shiels","url":"http:\/\/flightpath.wordpress.com\/","date":"2007-09-04 13:26:26","content":"

                Here’s a comment with a link<\/a>.<\/p>\n","parent":0},{"id":19,"name":"mdawaffe","url":"http:\/\/blogwaffe.com","date":"2007-09-04 16:51:33","content":"

                what am I testing<\/p>\n","parent":0},{"id":21,"name":"Joseph Scott","url":"http:\/\/joseph.randomnetworks.com\/","date":"2007-12-08 07:24:25","content":"

                Hi There!<\/p>\n","parent":0},{"id":22,"name":"tellyworthtest","url":"","date":"2010-07-01 17:24:23","content":"

                Test Threaded Comment – nested one deep.<\/p>\n","parent":10},{"id":23,"name":"tellyworthtest","url":"","date":"2010-07-01 17:26:11","content":"

                Test threaded comment – one level deep (take two).<\/p>\n","parent":11},{"id":24,"name":"tellyworthtest1","url":"","date":"2010-07-01 17:31:56","content":"

                Testing threaded comments – two levels deep.<\/p>\n","parent":23},{"id":25,"name":"Test Author","url":"","date":"2010-07-01 17:51:11","content":"

                Another author comment<\/p>\n","parent":0},{"id":26,"name":"Test Author","url":"","date":"2010-07-01 17:56:59","content":"

                Testing an author reply comment<\/p>\n","parent":11},{"id":27,"name":"tellyworthtest2","url":"","date":"2010-07-01 17:57:36","content":"

                Replying to an author reply comment.<\/p>\n","parent":26},{"id":28,"name":"Test Contributor","url":"","date":"2010-07-01 18:02:10","content":"

                Contributor comment<\/p>\n","parent":0},{"id":29,"name":"admin","url":"","date":"2010-07-01 18:05:32","content":"

                Administrator comment reply.<\/p>\n","parent":24}],"attachments":[],"comment_count":20,"comment_status":"open"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_search_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_search_posts-01.phpt new file mode 100644 index 0000000..f957c82 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_search_posts-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_search_posts default +--FILE-- +get('http://wordpress.test/?json=core.get_search_posts&search=wordpress'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"

                This is a sticky post!!! Make sure it sticks!<\/p>\n

                This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"

                All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n

                Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … Continue reading →<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"

                Image Alignment Tests: Un-Captioned Images<\/h2>\n

                Center-align, no caption<\/h3>\n

                Center-aligned image with no caption, and text before and after. \"\" ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

                Left-align, no caption<\/h3>\n

                Left-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

                Right-align, no caption<\/h3>\n

                Right-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n

                No alignment, no caption<\/h3>\n

                None-aligned image with no caption, and text before and after. \"\" Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae … Continue reading →<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

                \n\t\t\t
                \n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
                \n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
                \n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
                \n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

                \u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

                John: foo
                \nMary: bar
                \nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

                The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

                \"boat\"<\/a>

                A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

                \"chunk<\/a>

                Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

                Only one thing is impossible for God: To find any sense in any copyright law on the planet.
                \n
                Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_tag_index-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_tag_index-01.phpt new file mode 100644 index 0000000..d988766 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_tag_index-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_tag_index +--FILE-- +get('http://wordpress.test/?json=core.get_tag_index'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":40,"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":54,"slug":"cienaga","title":"cienaga","description":"","post_count":1},{"id":55,"slug":"claycold","title":"claycold","description":"","post_count":1},{"id":56,"slug":"crushing","title":"crushing","description":"","post_count":1},{"id":58,"slug":"dinarchy","title":"dinarchy","description":"","post_count":1},{"id":59,"slug":"doolie","title":"doolie","description":"","post_count":1},{"id":60,"slug":"energumen","title":"energumen","description":"","post_count":1},{"id":61,"slug":"ephialtes","title":"ephialtes","description":"","post_count":1},{"id":62,"slug":"eudiometer","title":"eudiometer","description":"","post_count":1},{"id":63,"slug":"figuriste","title":"figuriste","description":"","post_count":1},{"id":66,"slug":"habergeon","title":"habergeon","description":"","post_count":1},{"id":67,"slug":"hapless","title":"hapless","description":"","post_count":1},{"id":68,"slug":"hartshorn","title":"hartshorn","description":"","post_count":1},{"id":69,"slug":"hostility-impregnability","title":"hostility impregnability","description":"","post_count":1},{"id":70,"slug":"impropriation","title":"impropriation","description":"","post_count":1},{"id":72,"slug":"knave","title":"knave","description":"","post_count":1},{"id":73,"slug":"misinformed","title":"misinformed","description":"","post_count":1},{"id":74,"slug":"moil","title":"moil","description":"","post_count":1},{"id":75,"slug":"mornful","title":"mornful","description":"","post_count":1},{"id":76,"slug":"outlaw","title":"outlaw","description":"","post_count":1},{"id":77,"slug":"pamphjlet","title":"pamphjlet","description":"","post_count":1},{"id":78,"slug":"pneumatics","title":"pneumatics","description":"","post_count":1},{"id":79,"slug":"portly-portreeve","title":"portly portreeve","description":"","post_count":1},{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10},{"id":81,"slug":"precipitancy","title":"precipitancy","description":"","post_count":1},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2},{"id":83,"slug":"programme","title":"programme","description":"","post_count":1},{"id":84,"slug":"psychological","title":"psychological","description":"","post_count":1},{"id":85,"slug":"puncher","title":"puncher","description":"","post_count":1},{"id":86,"slug":"ramose","title":"ramose","description":"","post_count":1},{"id":87,"slug":"renegade","title":"renegade","description":"","post_count":1},{"id":88,"slug":"retrocede","title":"retrocede","description":"","post_count":1},{"id":89,"slug":"stagnation-unhorsed","title":"stagnation unhorsed","description":"","post_count":1},{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1},{"id":98,"slug":"thunderheaded","title":"thunderheaded","description":"","post_count":1},{"id":99,"slug":"unculpable","title":"unculpable","description":"","post_count":1},{"id":100,"slug":"withered-brandnew","title":"withered brandnew","description":"","post_count":1},{"id":101,"slug":"xanthopsia","title":"xanthopsia","description":"","post_count":1}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.get_tag_posts-01.phpt b/wp-content/plugins/wp-json-api/tests/core.get_tag_posts-01.phpt new file mode 100644 index 0000000..193c3d4 --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.get_tag_posts-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_tag_posts default +--FILE-- +get('http://wordpress.test/?json=core.get_tag_posts&slug=post-formats'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":10,"pages":1,"tag":{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10},"posts":[{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t

                \n\t\t\t
                \n\t\t\t\t\"canola\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"chunk<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
                \n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050315_145007_132\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050604_133440_3421\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050727_091048_222\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050813_115856_52\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"dsc20050831_165238_332\"<\/a>\n\t\t\t<\/dt><\/dl>
                \n\t\t\t
                \n\t\t\t\t\"Seed<\/a>\n\t\t\t<\/dt>\n\t\t\t\t
                \n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t
                \n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"

                \u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main … Continue reading →<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"

                John: foo
                \nMary: bar
                \nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"

                The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"

                \"boat\"<\/a>

                A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"

                \"chunk<\/a>

                Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"

                Only one thing is impossible for God: To find any sense in any copyright law on the planet.
                \n
                Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":579,"type":"post","slug":"post-format-test-status","url":"http:\/\/wordpress.test\/2008\/06\/04\/post-format-test-status\/","status":"publish","title":"Post Format Test: Status","title_plain":"Post Format Test: Status","content":"

                WordPress, how do I love thee? Let me count the ways (in 140 characters or less).<\/p>\n","excerpt":"WordPress, how do I love thee? Let me count the ways (in 140 characters or less).","date":"2008-06-04 08:21:24","modified":"2008-06-04 08:21:24","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":582,"type":"post","slug":"post-format-test-video","url":"http:\/\/wordpress.test\/2008\/06\/03\/post-format-test-video\/","status":"publish","title":"Post Format Test: Video","title_plain":"Post Format Test: Video","content":"

                <\/embed><\/p>\n

                Posted as per the instructions in the Codex<\/a>.<\/p>\n","excerpt":"Posted as per the instructions in the Codex.","date":"2008-06-03 08:25:58","modified":"2008-06-03 08:25:58","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":587,"type":"post","slug":"post-format-test-audio","url":"http:\/\/wordpress.test\/2008\/06\/02\/post-format-test-audio\/","status":"publish","title":"Post Format Test: Audio","title_plain":"Post Format Test: Audio","content":"

                Hayseed Rag \u2013 The Dizzy Trio<\/a><\/p>\n","excerpt":"Hayseed Rag \u2013 The Dizzy Trio","date":"2008-06-02 08:36:44","modified":"2008-06-02 08:36:44","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":622,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3","slug":"hayseedrag-thedizzytrio_vbr-2","title":"Hayseed Rag \u2013 The Dizzy Trio","description":"Victor # 19421-B The dizzy trio -novelty fox trot \u2013 Harmonica specialty by Borrah Minevitch \u2013 Harmonica,guitar,banjo, with Jew\u2019s harp and piano \u2013 issue date: May 1924. (public domain<\/a>)","caption":"Hayseed Rag \u2013 The Dizzy Trio","parent":587,"mime_type":"audio\/mpeg"}],"comment_count":0,"comment_status":"closed"}]} diff --git a/wp-content/plugins/wp-json-api/tests/core.info-01.phpt b/wp-content/plugins/wp-json-api/tests/core.info-01.phpt new file mode 100644 index 0000000..dbf37af --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.info-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.info default +--FILE-- +get('http://wordpress.test/?json=core.info'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","json_api_version":"1.0.7","controllers":["core","posts","respond"]} diff --git a/wp-content/plugins/wp-json-api/tests/core.info-02.phpt b/wp-content/plugins/wp-json-api/tests/core.info-02.phpt new file mode 100644 index 0000000..bffd6fb --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/core.info-02.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.info controller detail +--FILE-- +get('http://wordpress.test/?json=core.info&controller=core'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","name":"Core","description":"Basic introspection methods","methods":["info","get_recent_posts","get_post","get_page","get_date_posts","get_category_posts","get_tag_posts","get_author_posts","get_search_results","get_date_index","get_category_index","get_tag_index","get_author_index","get_page_index","get_nonce"]} diff --git a/wp-content/plugins/wp-json-api/tests/query-01.phpt b/wp-content/plugins/wp-json-api/tests/query-01.phpt new file mode 100644 index 0000000..077eb4e --- /dev/null +++ b/wp-content/plugins/wp-json-api/tests/query-01.phpt @@ -0,0 +1,14 @@ +--TEST-- +core.get_author_index with user-friendly URLs +--FILE-- +get('http://wordpress.test/api/core/get_author_index'); +$response = $http->currentResponse(); +echo $response['body']; + +?> +--EXPECT-- +{"status":"ok","count":2,"authors":[{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""}]} diff --git a/wp-content/themes/neuf-old-style/404.php b/wp-content/themes/neuf-old-style/404.php new file mode 100755 index 0000000..021bca0 --- /dev/null +++ b/wp-content/themes/neuf-old-style/404.php @@ -0,0 +1,35 @@ + + +

                + +
                > + +
                + +

                404: Denne siden er på grisefest

                + +
                +

                Lykke til videre.

                +
                + +
                + +
                + +
                +
                + +
                + +
                + +
                + +
                + + + +
                + + + diff --git a/wp-content/themes/neuf-old-style/config.rb b/wp-content/themes/neuf-old-style/config.rb new file mode 100644 index 0000000..1e74163 --- /dev/null +++ b/wp-content/themes/neuf-old-style/config.rb @@ -0,0 +1,25 @@ +# Require any additional compass plugins here. +require 'ninesixty' + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "stylesheets" +sass_dir = "sass" +images_dir = "images" +javascripts_dir = "javascripts" + +# You can select your preferred output style here (can be overridden via the command line): +# output_style = :expanded or :nested or :compact or :compressed + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +line_comments = false + + +# If you prefer the indented syntax, you might want to regenerate this +# project again passing --syntax sass, or you can uncomment this: +# preferred_syntax = :sass +# and then run: +# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass diff --git a/wp-content/themes/neuf-old-style/css/border-radius.htc b/wp-content/themes/neuf-old-style/css/border-radius.htc new file mode 100644 index 0000000..c3ae104 --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/border-radius.htc @@ -0,0 +1,143 @@ +--Do not remove this if you are using-- +Original Author: Remiz Rahnas +Original Author URL: http://www.htmlremix.com +Published date: 2008/09/24 + +Changes by Nick Fetchak: +- IE8 standards mode compatibility +- VML elements now positioned behind original box rather than inside of it - should be less prone to breakage +Published date : 2009/11/18 + + + + + diff --git a/wp-content/themes/neuf-old-style/css/grid.css b/wp-content/themes/neuf-old-style/css/grid.css new file mode 100755 index 0000000..85bed76 --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/grid.css @@ -0,0 +1,388 @@ +/* + Variable Grid System. + Learn more ~ http://www.spry-soft.com/grids/ + Based on 960 Grid System - http://960.gs/ + + Licensed under GPL and MIT. + + Looking for a preview of the grid? Check out http://grids.heroku.com/grid?column_width=70&column_amount=12&gutter_width=30 +*/ + +/* + Forces backgrounds to span full width, + even if there is horizontal scrolling. + Increase this if your layout is wider. + + Note: IE6 works fine without this fix. +*/ + +body { + min-width: 1200px; +} + +/* Containers +----------------------------------------------------------------------------------------------------*/ +.container_12 { + margin-left: auto; + margin-right: auto; + width: 1200px; +} + +/* Grid >> Global +----------------------------------------------------------------------------------------------------*/ + +.column, +.sidebar .event, +.grid_1, +.grid_2, +.grid_3, +.grid_4, +.grid_5, +.grid_6, +.grid_7, +.grid_8, +.grid_9, +.grid_10, +.grid_11, +.grid_12 { + display:inline; + float: left; + position: relative; + margin-left: 15px; + margin-right: 15px; +} + + + +.push_1, .pull_1, +.push_2, .pull_2, +.push_3, .pull_3, +.push_4, .pull_4, +.push_5, .pull_5, +.push_6, .pull_6, +.push_7, .pull_7, +.push_8, .pull_8, +.push_9, .pull_9, +.push_10, .pull_10, +.push_11, .pull_11, +.push_12, .pull_12 { + position:relative; +} + + +/* Grid >> Children (Alpha ~ First, Omega ~ Last) +----------------------------------------------------------------------------------------------------*/ + +.alpha { + margin-left: 0; +} + +.omega { + margin-right: 0; +} + +/* Grid >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .grid_1 { + width:70px; +} + +.container_12 .grid_2 { + width:170px; +} + +.sidebar .event, +.container_12 .grid_3 { + width:270px; +} + +.container_12 .grid_4 { + width:370px; +} + +.container_12 .grid_5 { + width:470px; +} + +.column, +.container_12 .grid_6 { + width:570px; +} + +.container_12 .grid_7 { + width:670px; +} + +.container_12 .grid_8 { + width:770px; +} + +.container_12 .grid_9 { + width:870px; +} + +.container_12 .grid_10 { + width:970px; +} + +.container_12 .grid_11 { + width:1070px; +} + +.container_12 .grid_12 { + width:1170px; +} + + + + +/* Prefix Extra Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .prefix_1 { + padding-left:100px; +} + +.container_12 .prefix_2 { + padding-left:200px; +} + +.container_12 .prefix_3 { + padding-left:300px; +} + +.container_12 .prefix_4 { + padding-left:400px; +} + +.container_12 .prefix_5 { + padding-left:500px; +} + +.container_12 .prefix_6 { + padding-left:600px; +} + +.container_12 .prefix_7 { + padding-left:700px; +} + +.container_12 .prefix_8 { + padding-left:800px; +} + +.container_12 .prefix_9 { + padding-left:900px; +} + +.container_12 .prefix_10 { + padding-left:1000px; +} + +.container_12 .prefix_11 { + padding-left:1100px; +} + + + +/* Suffix Extra Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .suffix_1 { + padding-right:100px; +} + +.container_12 .suffix_2 { + padding-right:200px; +} + +.container_12 .suffix_3 { + padding-right:300px; +} + +.container_12 .suffix_4 { + padding-right:400px; +} + +.container_12 .suffix_5 { + padding-right:500px; +} + +.container_12 .suffix_6 { + padding-right:600px; +} + +.container_12 .suffix_7 { + padding-right:700px; +} + +.container_12 .suffix_8 { + padding-right:800px; +} + +.container_12 .suffix_9 { + padding-right:900px; +} + +.container_12 .suffix_10 { + padding-right:1000px; +} + +.container_12 .suffix_11 { + padding-right:1100px; +} + + + +/* Push Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .push_1 { + left:100px; +} + +.container_12 .push_2 { + left:200px; +} + +.container_12 .push_3 { + left:300px; +} + +.container_12 .push_4 { + left:400px; +} + +.container_12 .push_5 { + left:500px; +} + +.container_12 .push_6 { + left:600px; +} + +.container_12 .push_7 { + left:700px; +} + +.container_12 .push_8 { + left:800px; +} + +.container_12 .push_9 { + left:900px; +} + +.container_12 .push_10 { + left:1000px; +} + +.container_12 .push_11 { + left:1100px; +} + + + +/* Pull Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .pull_1 { + left:-100px; +} + +.container_12 .pull_2 { + left:-200px; +} + +.container_12 .pull_3 { + left:-300px; +} + +.container_12 .pull_4 { + left:-400px; +} + +.container_12 .pull_5 { + left:-500px; +} + +.container_12 .pull_6 { + left:-600px; +} + +.container_12 .pull_7 { + left:-700px; +} + +.container_12 .pull_8 { + left:-800px; +} + +.container_12 .pull_9 { + left:-900px; +} + +.container_12 .pull_10 { + left:-1000px; +} + +.container_12 .pull_11 { + left:-1100px; +} + + + + +/* `Clear Floated Elements +----------------------------------------------------------------------------------------------------*/ + +/* http://sonspring.com/journal/clearing-floats */ + +.clear { + clear: both; + display: block; + overflow: hidden; + visibility: hidden; + width: 0; + height: 0; +} + +/* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */ + +.hentry:before, +.hentry:after, +#program-3days:before, +#program-3days:after, +#program-6days:before, +#program-6days:after, +.clearfix:before, +.clearfix:after { + content: '\0020'; + display: block; + overflow: hidden; + visibility: hidden; + width: 0; + height: 0; +} + +.hentry:after, +#program-3days:after, +#program-6days:after, +.clearfix:after { + clear: both; +} + +/* + The following zoom:1 rule is specifically for IE6 + IE7. + Move to separate stylesheet if invalid CSS is a problem. +*/ + +.clearfix { + zoom: 1; +} \ No newline at end of file diff --git a/wp-content/themes/neuf-old-style/css/ie.css b/wp-content/themes/neuf-old-style/css/ie.css new file mode 100644 index 0000000..152e0c8 --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/ie.css @@ -0,0 +1,13 @@ +/* Border radius hack: + TODO: does not work +*/ +.single-event .event-type:before, +#featured article .event-type:before, +#featured article.type-post h1:before, +#featured #slidernav a span.circle, +.home #digest_news .post a.permalink:before, +.big_bullet, +.btn { + behavior: url(css/border-radius.htc); +} + diff --git a/wp-content/themes/neuf-old-style/css/lightbox.css b/wp-content/themes/neuf-old-style/css/lightbox.css new file mode 100755 index 0000000..fb0f1f5 --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/lightbox.css @@ -0,0 +1,111 @@ +#lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;} +#lightbox img{ width: auto; height: auto;} +#lightbox a img{ border: none; } + +#outerImageContainer{ position: relative; background-color: #000; width: 250px; height: 250px; margin: 0 auto; } +#imageContainer{ padding: 10px; } + +#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; } +#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; } +#imageContainer>#hoverNav{ left: 0;} +#hoverNav a{ outline: none;} + +#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; } +#prevLink { left: 0; float: left;} +#nextLink { right: 0; float: right;} +#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; } +#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; } + +#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #000; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } + +#imageData{ padding:0 10px; color: #666; } +#imageData #imageDetails{ width: 70%; float: left; text-align: left; } +#imageData #caption{ font-weight: bold; } +#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } +#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} + +#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; } + +/* Dark Theme starts here */ +/* +#stimuli_lightbox { + position: absolute; + left: 0; + width: 100%; + z-index: 100; + text-align: center; + line-height: 0; +} + +#stimuli_lightbox a img { border: none; } + +#stimuli_outerImageContainer { + position: relative; + background-color: #000; + width: 250px; + height: 250px; + margin: 0 auto; +} + +#stimuli_imageContainer { + padding: 10px; +} + +#stimuli_loading { + position: absolute; + top: 40%; + left: 0%; + height: 25%; + width: 100%; + text-align: center; + line-height: 0; + background: transparent center url(img/loading.gif) no-repeat; +} +#stimuli_hoverNav { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 10; +} +#stimuli_imageContainer>#stimuli_hoverNav { left: 0;} +#stimuli_hoverNav a { outline: none;} + +#stimuli_prevLink, #stimuli_nextLink { + width: 49%; + height: 100%; + background: transparent url(img/blank.gif) no-repeat; /* Trick IE into showing hover * / + display: block; +} +#stimuli_prevLink { left: 0; float: left;} +#stimuli_nextLink { right: 0; float: right;} +#stimuli_prevLink:hover, #stimuli_prevLink:visited:hover { background: url(img/prev.gif) left 55% no-repeat; } +#stimuli_nextLink:hover, #stimuli_nextLink:visited:hover { background: url(img/next.gif) right 55% no-repeat; } + + +#stimuli_imageDataContainer { + font: 10px Verdana, Helvetica, sans-serif; + background-color: #000; + margin: 0 auto; + line-height: 1.4em; + overflow: auto; + width: 100% +} + +#stimuli_imageData { padding:0 10px; color: #666; } +#stimuli_imageData #stimuli_imageDetails { width: 70%; float: left; text-align: left; } +#stimuli_imageData #stimuli_caption { font-weight: bold;} +#stimuli_imageData #stimuli_numberDisplay { display: block; clear: left; padding-bottom: 1.0em;} +#stimuli_imageData #stimuli_bottomNavClose { width: 66px; float: right; padding-bottom: 0.7em; background: url(img/closelabel.gif) right 55% no-repeat; padding-top: 1.0em; margin-bottom: 1.0em;} + +#stimuli_overlay { + position: absolute; + top: 0; + left: 0; + z-index: 90; + width: 100%; + height: 500px; + background-color: #000; +} +*/ diff --git a/wp-content/themes/neuf-old-style/css/rebuild.css b/wp-content/themes/neuf-old-style/css/rebuild.css new file mode 100755 index 0000000..08a16fe --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/rebuild.css @@ -0,0 +1,137 @@ +/* -------------------------------------------------------------- + + Rebuild the default browser styles + + Based on work by Blueprint CSS + http://code.google.com/p/blueprintcss/ + +-------------------------------------------------------------- */ + + +body { + background: #fff; +} +body, input, textarea { + color: #111; + font: 12px Arial,sans-serif; + line-height: 1.5; +} + + +/* Headings +-------------------------------------------------------------- */ + +h1,h2,h3,h4,h5,h6 { + font-weight: normal; + clear: both; +} +hr { + background-color: #999; + border:0; + height: 1px; + margin-bottom: 1.5em; +} + + +/* Text elements +-------------------------------------------------------------- */ + +p { + margin-bottom: 1.5em; +} +ul { + margin: 0 0 1.5em 2.5em; +} +ol { + margin: 0 0 1.5em 2.5em; +} +ul { + list-style:disc; +} +ol { + list-style-type: decimal; +} +ol ol { + list-style:upper-alpha; +} +ol ol ol { + list-style:lower-roman; +} +ol ol ol ol { + list-style:lower-alpha; +} +ul ul, ol ol, ul ol, ol ul { + margin-bottom:0; +} +dl { + margin:0 1.5em; +} +dt { + font-weight: bold; +} +dd { + margin-bottom: 1.5em; +} +strong { + font-weight: bold; +} +cite, em, i { + font-style: italic; +} +blockquote { + margin: 0 3em; +} +blockquote em, blockquote i, blockquote cite { + font-style: normal; +} +pre { + font: 11px Monaco, monospace; + line-height: 1.5; + margin-bottom: 1.5em; +} +code { + font: 11px Monaco, monospace; +} +abbr, acronym { + border-bottom: 1px dotted #666; + cursor: help; +} +ins { + text-decoration: none; +} +sup, +sub { + height: 0; + line-height: 1; + vertical-align: baseline; + position: relative; + +} +sup { + bottom: 1ex; +} +sub { + top: .5ex; +} + + +/* + +Adapt the following for use in your Child Themes when using +different font-sizes and line-heights + +body, input, textarea { + font: --px Arial,sans-serif; + line-height:--; +} +p, ul, ol, dd, pre { + margin-bottom:--em; +} +pre, code { + font:--px Monaco, monospace; + line-height:--; +} + +All other styles can be overridden--or ignored!--in Child Theme stylesheets + +*/ \ No newline at end of file diff --git a/wp-content/themes/neuf-old-style/css/reset.css b/wp-content/themes/neuf-old-style/css/reset.css new file mode 100755 index 0000000..cbcd60f --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/reset.css @@ -0,0 +1,63 @@ +/* -------------------------------------------------------------- + + Reset default browser CSS. + + Based on work by Eric Meyer: + http://meyerweb.com/eric/tools/css/reset/index.html + +-------------------------------------------------------------- */ + +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} + +a img { border: none; } diff --git a/wp-content/themes/neuf-old-style/css/wp.css b/wp-content/themes/neuf-old-style/css/wp.css new file mode 100755 index 0000000..5593971 --- /dev/null +++ b/wp-content/themes/neuf-old-style/css/wp.css @@ -0,0 +1,74 @@ +/* -------------------------------------------------------------- + + Basic WordPress Blog Styles + +-------------------------------------------------------------- */ + + +/* Images +-------------------------------------------------------------- */ + +.entry-content img { + margin: 0 0 1.5em 0; +} +.alignleft, +img.alignleft { + display: inline; + float: left; + margin-right: 1.5em; +} +.alignright, +img.alignright { + display: inline; + float: right; + margin-left: 1.5em; +} +.aligncenter, +img.aligncenter { + clear: both; + display: block; + margin-left: auto !important; + margin-right: auto !important; +} +.wp-caption { + text-align: center; + margin-bottom: 1.5em; +} +.wp-caption img { + border: 0 none; + margin: 0; + padding: 0; +} +.wp-caption p.wp-caption-text { + margin: 0; +} +.wp-smiley { + max-height: 1em; + margin:0 !important; +} +.gallery dl { + margin: 0; +} +.gallery-caption { + margin:0; + font-size:0.8em; +} + + +/* Pullquotes +-------------------------------------------------------------- */ + +blockquote.left { + float: left; + margin-left: 0; + margin-right: 20px; + text-align: right; + width: 33%; +} +blockquote.right { + float: right; + margin-left: 20px; + margin-right: 0; + text-align: left; + width: 33%; +} diff --git a/wp-content/themes/neuf-old-style/digest.php b/wp-content/themes/neuf-old-style/digest.php new file mode 100755 index 0000000..1acb8f0 --- /dev/null +++ b/wp-content/themes/neuf-old-style/digest.php @@ -0,0 +1,62 @@ +
                + +

                Aktuelt

                + +
                + have_posts() ) : while ( $digest_news->have_posts() ) : $digest_news->the_post(); + ?> + +
                > + +
                +
                +
                + +
                +
                + + +
                + +
                + +
                +

                Program

                + + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' + ); + + $args = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 10, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' + ); + + $digest_events = new WP_Query( $args ); + if ( $digest_events->have_posts() ) : while ( $digest_events->have_posts() ) : $digest_events->the_post(); + ?> + + + + +
                > +
                +
                + diff --git a/wp-content/themes/neuf-old-style/eventmeta-single.php b/wp-content/themes/neuf-old-style/eventmeta-single.php new file mode 100755 index 0000000..8933cf2 --- /dev/null +++ b/wp-content/themes/neuf-old-style/eventmeta-single.php @@ -0,0 +1,28 @@ +
                +neuf_event_venue = get_post_meta(get_the_ID(), '_neuf_events_venue',true); +$ticket = get_post_meta(get_the_id(), '_neuf_events_bs_url',true); +if ( 'Annet' != $post->neuf_event_venue ) { +?> + +

                + +
                + +
                + +
                +
                + + + - + CC: + + Kjøp billett' : ""; ?> +
                +
                + neuf_event_venue; ?> +
                +
                +
                + diff --git a/wp-content/themes/neuf-old-style/eventmeta.php b/wp-content/themes/neuf-old-style/eventmeta.php new file mode 100755 index 0000000..2339676 --- /dev/null +++ b/wp-content/themes/neuf-old-style/eventmeta.php @@ -0,0 +1,20 @@ +
                +neuf_event_venue = get_post_meta(get_the_id(), '_neuf_events_venue',true); +$ticket = get_post_meta(get_the_id(), '_neuf_events_bs_url',true); +if ( 'Annet' != $post->neuf_event_venue ) { +?> + neuf_event_venue; ?> + + +
                + +
                + + - + CC: + Kjøp billett' : ""; ?> + +
                +
                + diff --git a/wp-content/themes/neuf-old-style/eventslider.php b/wp-content/themes/neuf-old-style/eventslider.php new file mode 100755 index 0000000..00d18ba --- /dev/null +++ b/wp-content/themes/neuf-old-style/eventslider.php @@ -0,0 +1,86 @@ + 'AND', + array( + 'key' => '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' + ), + array( + 'key' => '_neuf_events_promo_period', + 'value' => array( 'Month' , 'semester' ), + 'compare' => 'IN', + ) +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => $meta_query, + 'posts_per_page' => 4 +); + +$events = new WP_Query( $args ); + +$news = new WP_Query( 'type=post' ); +?> +have_posts()) : ?> +
                + Forrige + Neste +
                +
                + have_posts()) : $news->the_post(); ?> +
                > + +
                +

                + +
                +
                + +
                +
                +
                + + have_posts() ?> + + have_posts() && $counter < 4) : $events->the_post(); ?> +
                > + +
                + ID , 'event_type' ); + foreach ( $event_array as $event_type ) + $post->event_types[] = $event_type->name; + $html = '
                ' . implode( ', ' , $post->event_types ) . '
                '; + echo $html; + ?> +

                +
                +
                +
                + +
                +
                + +
                +
                +
                + + have_posts() + ?> + +
                +
                + +have_posts() diff --git a/wp-content/themes/neuf-old-style/flowplayer-3.2.6.min.js b/wp-content/themes/neuf-old-style/flowplayer-3.2.6.min.js new file mode 100644 index 0000000..500492e --- /dev/null +++ b/wp-content/themes/neuf-old-style/flowplayer-3.2.6.min.js @@ -0,0 +1,24 @@ +/* + * flowplayer.js 3.2.6. The Flowplayer API + * + * Copyright 2009-2011 Flowplayer Oy + * + * This file is part of Flowplayer. + * + * Flowplayer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Flowplayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Flowplayer. If not, see . + * + * Date: 2011-02-04 05:45:28 -0500 (Fri, 04 Feb 2011) + * Revision: 614 + */ +(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k'}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+=''}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+='"}n+="";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="

                Flash version "+q+" or greater is required

                "+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"

                "+(m.tagName=="A"?"

                Click here to download latest version

                ":"

                Download latest version from here

                ");if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})(); \ No newline at end of file diff --git a/wp-content/themes/neuf-old-style/flowplayer-3.2.7.swf b/wp-content/themes/neuf-old-style/flowplayer-3.2.7.swf new file mode 100644 index 0000000..20a4119 Binary files /dev/null and b/wp-content/themes/neuf-old-style/flowplayer-3.2.7.swf differ diff --git a/wp-content/themes/neuf-old-style/flowplayer.controls-3.2.5.swf b/wp-content/themes/neuf-old-style/flowplayer.controls-3.2.5.swf new file mode 100644 index 0000000..5507a53 Binary files /dev/null and b/wp-content/themes/neuf-old-style/flowplayer.controls-3.2.5.swf differ diff --git a/wp-content/themes/neuf-old-style/footer.php b/wp-content/themes/neuf-old-style/footer.php new file mode 100755 index 0000000..c0ef8e1 --- /dev/null +++ b/wp-content/themes/neuf-old-style/footer.php @@ -0,0 +1,70 @@ + +
                +
                +
                + +
                +

                Det Norske Studentersamfund

                +

                + Studentene i Oslo har sitt naturlige tilholdssted på Det Norske Studentersamfund, i hyggelige lokaler på Chateau Neuf øverst på Majorstuen. Her er det åpent alle dager unntatt søndag, og enten man ønsker en tur i baren, på kafé, på debatt, på konsert, teater eller kino, har man muligheten på Det Norske Studentersamfund. +

                + Kart | Kontakt + +
                + +
                +
                +
                +
                +

                Bilder fra flickr

                +
                +
                  +
                  +
                  +
                  + +
                  +
                  + +
                  + Universitetet i Oslo eier Chateau Neuf +
                  + +
                  + Norsk Rockforbund sponser Studentersamfundet +
                  + +
                  + Akademika sponser Studentersamfundet +
                  + +
                  +
                  + +
                  + + Det Norske Studentersamfund | Slemdalsveien 15, 0369 Oslo | Webdesign av EDB-gjengen og Designerne i KAK. + +
                  + + + + +
                  +
                  + + + + + diff --git a/wp-content/themes/neuf-old-style/front-page.php b/wp-content/themes/neuf-old-style/front-page.php new file mode 100755 index 0000000..4d045cc --- /dev/null +++ b/wp-content/themes/neuf-old-style/front-page.php @@ -0,0 +1,24 @@ + +
                  + +
                  + + + + + + + + + + + +
                  + +
                  + + diff --git a/wp-content/themes/neuf-old-style/functions.php b/wp-content/themes/neuf-old-style/functions.php new file mode 100644 index 0000000..fb37631 --- /dev/null +++ b/wp-content/themes/neuf-old-style/functions.php @@ -0,0 +1,449 @@ + __( 'Hovedmeny' ) ) + ); +} +add_action( 'init' , 'neuf_register_nav_menus' ); + +/** + * Enqueue various scripts we use. + */ +function neuf_enqueue_scripts() { + wp_deregister_script( 'jquery' ); + + // register your script location, dependencies and version + wp_register_script( 'jquery' , 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js' ); + wp_register_script( 'program' , get_template_directory_uri() . '/js/program.js', array( 'jquery' ) ); + wp_register_script( 'cycle' , get_template_directory_uri() . '/js/jquery.cycle.all.js', array( 'jquery' ), '0.9.8' ); + wp_register_script( 'front-page', get_template_directory_uri() . '/js/front-page.js', array('cycle','moment-lang') ); + wp_register_script( 'application', get_template_directory_uri() . '/js/application.js', array('jquery') ); + wp_register_script( 'underscore', get_template_directory_uri() . '/js/underscore.js'); + wp_register_script( 'knockout', get_template_directory_uri() . '/js/knockout-2.0.0.js'); + wp_register_script( 'util', get_template_directory_uri() . '/js/neuf/util/util.js' ); + wp_register_script( 'date.js', get_template_directory_uri() . '/js/neuf/util/date-nb-NO.js'); + wp_register_script( 'moment', get_template_directory_uri() . '/js/moment.min.js'); + wp_register_script( 'moment-lang', get_template_directory_uri() . '/js/lang/nb.js', array('moment')); + wp_register_script( 'eventProgram', get_template_directory_uri() . '/js/neuf/eventProgram.js', array('jquery', 'underscore', 'knockout', 'date.js', 'util') ); + wp_register_script( 'footer', get_template_directory_uri() . '/js/footer.js', array('jquery') ); + + // enqueue the scripts + wp_enqueue_script( 'jquery' ); + wp_enqueue_script( 'cycle' ); + wp_enqueue_script( 'application' ); + if ( is_front_page() ) + wp_enqueue_script( 'front-page' ); +} +add_action( 'wp_enqueue_scripts' , 'neuf_enqueue_scripts' ); + +/** + * Force large uploaded images. + * + * Denies uploads of images smaller (in pixels) than given width and height values. + */ +function neuf_handle_upload_prefilter( $file ) { + + $minimum = array( 'width' => 640, 'height' => 480); + + $img = getimagesize( $file['tmp_name'] ); + $width = $img[0]; + $height = $img[1]; + + if ( $width < $minimum['width'] ) + return array( "error" => "Image dimensions are too small. Minimum width is {$minimum['width']}px. Uploaded image width is $width px" ); + + elseif ($height < $minimum['height']) + return array( "error" => "Image dimensions are too small. Minimum height is {$minimum['height']}px. Uploaded image height is $height px" ); + else + return $file; +} +// Commenting out for testing purposes +add_filter( 'wp_handle_upload_prefilter' , 'neuf_handle_upload_prefilter' ); + +/** + * Adds more semantic classes to WP's post_class. + * + * Adds these classes: + * i) a class with a page-wide post count. The first post on this page is named .p1, the second p2 and so forth. + * ii) a class 'alt' to every other post. + */ +function neuf_post_class( $classes = '' ) { + global $neuf_pagewide_post_count; + + if ( $classes ) + $classes = array ( $classes ); + + $classes[] = 'p' . ++$neuf_pagewide_post_count; + + if ( 0 == $neuf_pagewide_post_count % 2 ) + $classes[] = 'alt'; + + $classes = join( ' ' , $classes ); + + post_class( $classes ); +} + +/* Gets nicely the regular and member price nicely formated */ +function neuf_get_price( $neuf_event ) { + $price_regular = get_post_meta( $neuf_event->ID , '_neuf_events_price_regular' , true ); + $price_member = get_post_meta( $neuf_event->ID , '_neuf_events_price_member' , true ); + if ( $price_regular ) { + if ( $price_member ) + $cc = "$price_regular/$price_member"; + else + $cc = $price_regular; + } else + $cc = ''; + + return $cc; +} + +/** + * Adds more semantic classes to WP's body_class. + * + * Adds these classes: + * i) For pages, adds 'page-slug' + */ +function neuf_body_class( $classes = '' ) { + global $post; + + if ( $classes ) + $classes .= ' '; + + if ( is_page() ) + $classes .= 'page-' . $post->post_name ; + + body_class( $classes ); +} + + +/** + * Determines what to display in our title element. + * + * Most of this borrowed from the Thematic theme framework. + */ +function neuf_doctitle() { + $site_name = get_bloginfo( 'name' ); + $separator = '|'; + + if ( is_single() ) { + $content = single_post_title( '' , false ); + + } elseif ( is_home() || is_front_page() ) { + $content = get_bloginfo( 'description' ); + + } elseif ( is_page() ) { + $content = single_post_title( '' , false ); + + } elseif ( is_search() ) { + $content = __( 'Søkeresultater for', 'neuf-web' ); + $content .= ' ' . esc_html(stripslashes(get_search_query())); + + } elseif ( is_category() ) { + $content = __( 'Arkiv for kategorien' , 'neuf-web' ); + $content .= ' ' . single_cat_title( "" , false );; + + } elseif ( is_tag() ) { + $content = __( 'Arkiv for stikkordet' , 'neuf-web' ); + $content .= ' ' . neuf-web_tag_query(); + + } elseif ( is_404() ) { + $content = __( 'Ikke funnet', 'neuf-web' ); + + } else { + $content = get_bloginfo( 'description' ); + } + + if ( get_query_var( 'paged' ) ) { + $content .= ' ' .$separator. ' '; + $content .= 'side'; + $content .= ' '; + $content .= get_query_var('paged'); + } + + if($content) { + if ( is_home() || is_front_page() ) { + $elements = array( + 'site_name' => $site_name, + 'separator' => $separator, + 'content' => $content + ); + } else { + $elements = array( + 'content' => $content, + 'separator' => $separator, + 'site_name' => $site_name + ); + } + } else { + $elements = array( + 'site_name' => $site_name + ); + } + + $doctitle = implode(' ', $elements); + + $doctitle = "\t" . "" . $doctitle . "" . "\n\n"; + + echo $doctitle; +} // end neuf_doctitle + +/** + * Should return true if the file displaying the current page is defined as part of the given section. + * + * @todo Do we need this in a WordPress theme? misund 2012-12-18 + */ +function is_in_section($section) { + switch ($section) { + case 'program': + if ( in_array(get_requested_file(),array('prog','konsepter','konsept','booking','vis')) ) + return true; + break; + case 'foreninger': + if ( in_array(get_requested_file(),array('foreninger')) ) + return true; + break; + case 'forum': + if ( substr($_SERVER['REQUEST_URI'],1,5) == 'forum' ) + return true; + break; + case 'inside': + if ( substr($_SERVER['REQUEST_URI'],1,6) == 'inside' || in_array(get_requested_file(),array('aktive')) ) + return true; + break; + case 'nyheter': + if ( in_array(get_requested_file(),array('nyheter','nyhet')) ) + return true; + break; + case 'forside': + if ( !( is_in_section('program') || is_in_section('foreninger') || is_in_section('medlem') || is_in_section('forum') || is_in_section('inside') || is_in_section('nyheter') ) ) + return true; + break; + default: + return false; + } +} + + +/** + * Display social sharing buttons + */ +function display_social_sharing_buttons() { ?> +
                  +
                  + Tweet + +
                  +
                  +
                  +
                  +
                  + $post->ID, + 'post_type' => 'any', + 'numberposts' => -1, + 'post_status' => 'any' + ) ); + + return count( $attachments ); +} + +/** + * Displays a gallery if suitable (Template Tag). + * + * If a post has more than two attachments, we should probably display them in + * single view. This particularly applies to events. Photos of concerts etc. + * can this way easily be added after the event, without much hassle. + * + * @author misund + */ +function neuf_maybe_display_gallery() { + if ( 2 < neuf_get_attachment_count() ) + echo do_shortcode( '[gallery link="file" size="four-column-promo"]' ); +} + +function neuf_event_format_date($timestamp) { + return date_i18n('d/n', intval($timestamp)); +} + +/** + * Takes 2 date strings in $format. + * + * Returns the difference in days * 2, for use in + * a grid based layout on the program page. + */ +function neuf_event_day_gap_size($current_day,$previous_day) { + $format = '%Y-%m-%d'; + $prev = new DateTime($previous_day); + $cur = new DateTime($current_day); + $diff = $prev->diff($cur)->d; + return ($diff - 1) * 2; +} + +/** + * Trims $text down to $length words. + * If $text is truncated, then "[..]" is appended. + */ +function trim_excerpt($text, $length) { + $org_length = strlen($text); + $text = explode(" ", $text); // word boundary + $text = array_slice($text, 0, $length); + $text = implode(" ", $text); + $shorter = $org_length != strlen($text) ? " [...]" : ""; + return $text . $shorter; +} + +/** + * Replaces the matching $pattern with $replacement in the string $subject. + */ +function linkify($subject, $pattern, $link) { + $replacement = '[...]'; + $output = preg_replace($pattern, $replacement, $subject); + return $output; +} + +/** + * Builds and displays suitable page titles. + * + * Original author: Ian Stewart (theme Thematic). + */ +function neuf_page_title() { + + global $post; + + $content = ''; + if (is_attachment()) { + $content .= '

                  Tilbake til '; + $content .= get_the_title($post->post_parent); + $content .= '

                  '; + } elseif (is_author()) { + $content .= '

                  '; + $author = get_the_author_meta( 'display_name' ); + $content .= __('Innhold skrevet av', 'neuf'); + $content .= ' '; + $content .= $author; + $content .= '

                  '; + } elseif (is_category()) { + $content .= '

                  '; + $content .= __('Innhold i kategorien', 'neuf'); + $content .= ' '; + $content .= single_cat_title('', FALSE); + $content .= '

                  ' . "\n"; + $content .= '
                  '; + if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif; + $content .= '
                  '; + } elseif (is_search()) { + $content .= '

                  '; + $content .= __('Søkeresultater for:', 'neuf'); + $content .= ' '; + $content .= esc_html(stripslashes($_GET['s'])); + $content .= '

                  '; + } elseif (is_tag()) { + $content .= '

                  '; + $content .= __('Innhold merket med', 'neuf'); + $content .= ' '; + $content .= __(neuf_tag_query()); + $content .= '

                  '; + } elseif (is_tax()) { + global $taxonomy; + $content .= '

                  '; + $tax = get_taxonomy($taxonomy); + $content .= $tax->labels->name . ' '; + $content .= __('Arkiv:', 'neuf'); + $content .= ' '; + $content .= neuf_get_term_name(); + $content .= '

                  '; + } elseif (is_day()) { + $content .= '

                  '; + $content .= sprintf(__('Innhold fra dagen %s', 'neuf'), get_the_time(get_option('date_format'))); + $content .= '

                  '; + } elseif (is_month()) { + $content .= '

                  '; + $content .= sprintf(__('Innhold fra måneden %s', 'neuf'), get_the_time('F Y')); + $content .= '

                  '; + } elseif (is_year()) { + $content .= '

                  '; + $content .= sprintf(__('Innhold fra året %s', 'neuf'), get_the_time('Y')); + $content .= '

                  '; + } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { + $content .= '

                  '; + $content .= __('Arkiv', 'neuf'); + $content .= '

                  '; + } + $content .= "\n"; + echo( $content ); +} + +/** + * Creates nice multi_tag_title. + * + * Original author: Martin Kopischke. + */ + +function neuf_tag_query() { + $nice_tag_query = get_query_var('tag'); // tags in current query + $nice_tag_query = str_replace(' ', '+', $nice_tag_query); // get_query_var returns ' ' for AND, replace by + + $tag_slugs = preg_split('%[,+]%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of tag slugs + $tag_ops = preg_split('%[^,+]*%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of operators + + $tag_ops_counter = 0; + $nice_tag_query = ''; + + foreach ($tag_slugs as $tag_slug) { + $tag = get_term_by('slug', $tag_slug ,'post_tag'); + // prettify tag operator, if any + if ($tag_ops[$tag_ops_counter] == ',') { + $tag_ops[$tag_ops_counter] = ', '; + } elseif ($tag_ops[$tag_ops_counter] == '+') { + $tag_ops[$tag_ops_counter] = ' + '; + } + // concatenate display name and prettified operators + $nice_tag_query = $nice_tag_query.$tag->name.$tag_ops[$tag_ops_counter]; + $tag_ops_counter += 1; + } + return $nice_tag_query; +} + +/** + * Gets the name of a term. + * + * Original author: Justin Tadlock (theme Hybrid). + */ +function neuf_get_term_name() { + $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); + return $term->name; +} + +?> diff --git a/wp-content/themes/neuf-old-style/header.php b/wp-content/themes/neuf-old-style/header.php new file mode 100755 index 0000000..048ba4d --- /dev/null +++ b/wp-content/themes/neuf-old-style/header.php @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + > +
                  + +
                  +
                  + +
                  Gå direkte til innholdet
                  + +
                  + +
                  + + + +
                  +
                  + diff --git a/wp-content/themes/neuf-old-style/img/ajax-loader.gif b/wp-content/themes/neuf-old-style/img/ajax-loader.gif new file mode 100644 index 0000000..585870a Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ajax-loader.gif differ diff --git a/wp-content/themes/neuf-old-style/img/arrow-down.png b/wp-content/themes/neuf-old-style/img/arrow-down.png new file mode 100755 index 0000000..1853aae Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/arrow-down.png differ diff --git a/wp-content/themes/neuf-old-style/img/bannerindex-400.png b/wp-content/themes/neuf-old-style/img/bannerindex-400.png new file mode 100755 index 0000000..11e70c9 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/bannerindex-400.png differ diff --git a/wp-content/themes/neuf-old-style/img/bannerindex-800.png b/wp-content/themes/neuf-old-style/img/bannerindex-800.png new file mode 100755 index 0000000..d7a40be Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/bannerindex-800.png differ diff --git a/wp-content/themes/neuf-old-style/img/bird_twitter.png b/wp-content/themes/neuf-old-style/img/bird_twitter.png new file mode 100644 index 0000000..fa238b4 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/bird_twitter.png differ diff --git a/wp-content/themes/neuf-old-style/img/blank.gif b/wp-content/themes/neuf-old-style/img/blank.gif new file mode 100755 index 0000000..1d11fa9 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/blank.gif differ diff --git a/wp-content/themes/neuf-old-style/img/bullet.gif b/wp-content/themes/neuf-old-style/img/bullet.gif new file mode 100755 index 0000000..bf8e3c6 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/bullet.gif differ diff --git a/wp-content/themes/neuf-old-style/img/close.gif b/wp-content/themes/neuf-old-style/img/close.gif new file mode 100755 index 0000000..ca517b6 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/close.gif differ diff --git a/wp-content/themes/neuf-old-style/img/closelabel.gif b/wp-content/themes/neuf-old-style/img/closelabel.gif new file mode 100755 index 0000000..b68148f Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/closelabel.gif differ diff --git a/wp-content/themes/neuf-old-style/img/donate-button.gif b/wp-content/themes/neuf-old-style/img/donate-button.gif new file mode 100755 index 0000000..78cfb77 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/donate-button.gif differ diff --git a/wp-content/themes/neuf-old-style/img/download-icon.gif b/wp-content/themes/neuf-old-style/img/download-icon.gif new file mode 100755 index 0000000..4987a2c Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/download-icon.gif differ diff --git a/wp-content/themes/neuf-old-style/img/gradient.png b/wp-content/themes/neuf-old-style/img/gradient.png new file mode 100644 index 0000000..8e9d931 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/gradient.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_debatt-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_debatt-50x50.png new file mode 100644 index 0000000..2f3be34 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_debatt-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_fest-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_fest-50x50.png new file mode 100755 index 0000000..9f1e201 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_fest-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_film-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_film-50x50.png new file mode 100644 index 0000000..611296f Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_film-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_foredrag-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_foredrag-50x50.png new file mode 100644 index 0000000..c229d2e Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_foredrag-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_konsert-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_konsert-50x50.png new file mode 100644 index 0000000..1eeeb6d Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_konsert-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_nyheter-35x35.png b/wp-content/themes/neuf-old-style/img/ikon_nyheter-35x35.png new file mode 100644 index 0000000..81cf78f Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_nyheter-35x35.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_nyheter-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_nyheter-50x50.png new file mode 100644 index 0000000..6485fd5 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_nyheter-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_quiz-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_quiz-50x50.png new file mode 100644 index 0000000..eaccd72 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_quiz-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_teater-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_teater-50x50.png new file mode 100644 index 0000000..33adf47 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_teater-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_tiles-35x35.png b/wp-content/themes/neuf-old-style/img/ikon_tiles-35x35.png new file mode 100644 index 0000000..bce6af5 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_tiles-35x35.png differ diff --git a/wp-content/themes/neuf-old-style/img/ikon_tiles-50x50.png b/wp-content/themes/neuf-old-style/img/ikon_tiles-50x50.png new file mode 100644 index 0000000..ecb237b Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/ikon_tiles-50x50.png differ diff --git a/wp-content/themes/neuf-old-style/img/intern1.jpeg b/wp-content/themes/neuf-old-style/img/intern1.jpeg new file mode 100755 index 0000000..d818d9d Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/intern1.jpeg differ diff --git a/wp-content/themes/neuf-old-style/img/listevisning.png b/wp-content/themes/neuf-old-style/img/listevisning.png new file mode 100755 index 0000000..4f7a620 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/listevisning.png differ diff --git a/wp-content/themes/neuf-old-style/img/loading.gif b/wp-content/themes/neuf-old-style/img/loading.gif new file mode 100755 index 0000000..047c886 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/loading.gif differ diff --git a/wp-content/themes/neuf-old-style/img/logo-rn-x86.png b/wp-content/themes/neuf-old-style/img/logo-rn-x86.png new file mode 100644 index 0000000..7cfcd05 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/logo-rn-x86.png differ diff --git a/wp-content/themes/neuf-old-style/img/logo-rn.png b/wp-content/themes/neuf-old-style/img/logo-rn.png new file mode 100755 index 0000000..c294b5c Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/logo-rn.png differ diff --git a/wp-content/themes/neuf-old-style/img/logo-svart-hvit.png b/wp-content/themes/neuf-old-style/img/logo-svart-hvit.png new file mode 100755 index 0000000..ecd6838 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/logo-svart-hvit.png differ diff --git a/wp-content/themes/neuf-old-style/img/logo-web.png b/wp-content/themes/neuf-old-style/img/logo-web.png new file mode 100755 index 0000000..021b569 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/logo-web.png differ diff --git a/wp-content/themes/neuf-old-style/img/logo-web.png.bak b/wp-content/themes/neuf-old-style/img/logo-web.png.bak new file mode 100755 index 0000000..0dce9e0 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/logo-web.png.bak differ diff --git a/wp-content/themes/neuf-old-style/img/next.gif b/wp-content/themes/neuf-old-style/img/next.gif new file mode 100755 index 0000000..7871ad4 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/next.gif differ diff --git a/wp-content/themes/neuf-old-style/img/nextlabel.gif b/wp-content/themes/neuf-old-style/img/nextlabel.gif new file mode 100755 index 0000000..6c40e51 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/nextlabel.gif differ diff --git a/wp-content/themes/neuf-old-style/img/oktoberfest-small.png b/wp-content/themes/neuf-old-style/img/oktoberfest-small.png new file mode 100755 index 0000000..ad4fe6a Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/oktoberfest-small.png differ diff --git a/wp-content/themes/neuf-old-style/img/orange-fade.png b/wp-content/themes/neuf-old-style/img/orange-fade.png new file mode 100755 index 0000000..65d16d9 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/orange-fade.png differ diff --git a/wp-content/themes/neuf-old-style/img/pig.png b/wp-content/themes/neuf-old-style/img/pig.png new file mode 100644 index 0000000..264e256 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/pig.png differ diff --git a/wp-content/themes/neuf-old-style/img/piggies.jpg b/wp-content/themes/neuf-old-style/img/piggies.jpg new file mode 100644 index 0000000..a4c433b Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/piggies.jpg differ diff --git a/wp-content/themes/neuf-old-style/img/prev.gif b/wp-content/themes/neuf-old-style/img/prev.gif new file mode 100755 index 0000000..3d31cc3 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/prev.gif differ diff --git a/wp-content/themes/neuf-old-style/img/prevlabel.gif b/wp-content/themes/neuf-old-style/img/prevlabel.gif new file mode 100755 index 0000000..51a31c2 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/prevlabel.gif differ diff --git a/wp-content/themes/neuf-old-style/img/sirkel.png b/wp-content/themes/neuf-old-style/img/sirkel.png new file mode 100755 index 0000000..3032dfc Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sirkel.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/akademika.png b/wp-content/themes/neuf-old-style/img/sponsors/akademika.png new file mode 100755 index 0000000..582b985 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/akademika.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/logo_black_akademika.png b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_akademika.png new file mode 100644 index 0000000..47881fe Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_akademika.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/logo_black_nrf.png b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_nrf.png new file mode 100644 index 0000000..21452a6 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_nrf.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/logo_black_uio.png b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_uio.png new file mode 100755 index 0000000..ed724ee Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/logo_black_uio.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/logo_sh86.png b/wp-content/themes/neuf-old-style/img/sponsors/logo_sh86.png new file mode 100755 index 0000000..bc28282 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/logo_sh86.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/logo_uio86.png b/wp-content/themes/neuf-old-style/img/sponsors/logo_uio86.png new file mode 100755 index 0000000..3d17b2c Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/logo_uio86.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/nrf-86x86.png b/wp-content/themes/neuf-old-style/img/sponsors/nrf-86x86.png new file mode 100755 index 0000000..1fa6d09 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/nrf-86x86.png differ diff --git a/wp-content/themes/neuf-old-style/img/sponsors/toro-59x86.png b/wp-content/themes/neuf-old-style/img/sponsors/toro-59x86.png new file mode 100755 index 0000000..f65c339 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/sponsors/toro-59x86.png differ diff --git a/wp-content/themes/neuf-old-style/img/svart-200x.gif b/wp-content/themes/neuf-old-style/img/svart-200x.gif new file mode 100755 index 0000000..685519a Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/svart-200x.gif differ diff --git a/wp-content/themes/neuf-old-style/img/teater_neuf.jpg b/wp-content/themes/neuf-old-style/img/teater_neuf.jpg new file mode 100644 index 0000000..d5ab150 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/teater_neuf.jpg differ diff --git a/wp-content/themes/neuf-old-style/img/testingtile.png b/wp-content/themes/neuf-old-style/img/testingtile.png new file mode 100755 index 0000000..645cb41 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/testingtile.png differ diff --git a/wp-content/themes/neuf-old-style/img/tilesvisning.png b/wp-content/themes/neuf-old-style/img/tilesvisning.png new file mode 100755 index 0000000..429fb48 Binary files /dev/null and b/wp-content/themes/neuf-old-style/img/tilesvisning.png differ diff --git a/wp-content/themes/neuf-old-style/index.php b/wp-content/themes/neuf-old-style/index.php new file mode 100755 index 0000000..3f8c87f --- /dev/null +++ b/wp-content/themes/neuf-old-style/index.php @@ -0,0 +1,34 @@ + + +
                  + +

                  + + + +
                  > + +
                  + +

                  + +
                  + +
                  + +
                  + + 'display:block;margin:auto;' ) ); ?> + +
                  + +
                  + + + + + + +
                  + + diff --git a/wp-content/themes/neuf-old-style/js/application.js b/wp-content/themes/neuf-old-style/js/application.js new file mode 100644 index 0000000..d8076a7 --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/application.js @@ -0,0 +1,42 @@ +$(document).ready( function() { + /* Urlize */ + jQuery.fn.urlize = function( base ) { + var x = this.html(); + list = x.match( /\b(http:\/\/|www\.|http:\/\/www\.)[^ ]{2,100}\b/g ); + if ( list ) { + for ( i = 0; i < list.length; i++ ) { + x = x.replace( list[i], ""+ list[i] + "" ); + } + this.html(x); + } + }; + + /* Flickr */ + var flickr_limit = 10; + /* + * Feed alternatives. + * $url = "http://api.flickr.com/services/feeds/photos_public.gne?format=json&tags=" . $tag; + * $url = "http://api.flickr.com/services/feeds/groups_pool.gne?format=json&id=" . $groupid; + * $url = "http://api.flickr.com/services/feeds/groups_pool.gne?id=1292860@N21&lang=en-us&format=json"; + */ + var flickr_feed_url = 'http://api.flickr.com/services/feeds/groups_pool.gne?format=json&id=1292860@N21&jsoncallback=?'; + $.getJSON(flickr_feed_url, function(result) { + var html = ""; + + $.each(result.items, function(i, item) { + var sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg"); + + html += '
                • '; + html += ''; html += item.title + ''; + html += '
                • '; + + if(parseInt(i) == flickr_limit - 1) { + return false; + } + return true; + }); + $("#flickr_feed").html(html); + }); + +}); diff --git a/wp-content/themes/neuf-old-style/js/front-page.js b/wp-content/themes/neuf-old-style/js/front-page.js new file mode 100755 index 0000000..fd98d63 --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/front-page.js @@ -0,0 +1,97 @@ +function addTwitter() { + /* Twitter feed in footer. */ + var feed = 'https://twitter.com/statuses/user_timeline/dns1813.json?count=10&include_rts=1&callback=?'; + var retweet_url = 'http://twitter.com/intent/retweet?tweet_id='; + var reply_url = 'http://twitter.com/intent/tweet?in_reply_to='; + var tweet_url = 'https://twitter.com/dns1813/status/'; + + var count = 2; // Done this way to ensure at least 2 tweets in allways. + $.getJSON(feed, function(results) { + jQuery.each(results, function(i) { + if (count-- > 0) { + var id = results[i].id_str; + var time = results[i].created_at.slice(4) /* without weekday */ + /* relative tweet time */ + moment.lang('en'); // parse english month name + var when = moment(time, "MMM DD HH:mm:ss Z YYYY"); + moment.lang('nb'); // format in norwegian locale + var rel_when = when.fromNow(); + /* Format tweet */ + jQuery('#twitter_feed').append('

                  ' + results[i].text + '
                  ' + rel_when +' • svar • retweet

                  '); + } + }); + + if( !results ) { + $('#twitter_feed').html("Ikke svar fra Twitter."); + } + /* Make links of tweet text */ + jQuery('.tweet_text').each(function(i) { + jQuery(this).urlize(); + }); + }); + +} +function addVimeo() { + var username = 'ostvn'; + var feed_url = "http://vimeo.com/api/v2/" + username + "/videos.json?callback=?"; + + $.getJSON(feed_url, function(videos) { + var latest = videos[0]; + var latest_video = ''; + var description = '

                  OSTV

                  \n

                  ' + latest['title'] + '

                  \n

                  ' + truncate(latest['description'], 40) + '

                  '; + + $("#ostv-latest-description").html(description); + $("#ostv-latest-video").html(latest_video); + }); +} + +/** + * Truncate text down to length words. + * If text is truncated, then "[..]" is appended. + */ +function truncate(text, length) { + org_length = text.length; + text = text.split(" "); // word boundary + text = text.slice(0, length); + text = text.join(" "); + if(org_length != text.length) { + return text + " [...]"; + } + return text; +} + +$(document).ready(function(){ + /* events */ + var events = $('#events'); + var articles = events.find('article').each(function(){ + $(this).hover(function(){ + $(this).find('header.info').children().slideDown('fast'); + }, + function(){ + $(this).find('header.info').find('.price').slideUp('fast'); + $(this).find('header.info').find('.venue').slideUp('fast'); + $(this).find('header.info').find('.type').slideUp('fast'); + }); + }); + + /* + * Eventslider in header. + * Doc: http://jquery.malsup.com/cycle/options.html + */ + $('#slider') + .cycle({ + fx: 'fade', + speed: 'fast', + timeout: 8000, + next: '#nextLink', + prev: '#prevLink', + pager: '#slidernav', + pauseOnPagerHover: 1, + pagerAnchorBuilder: function(index, DOMelement) { + return ''; + }, + }); + + addTwitter(); + addVimeo(); +}); diff --git a/wp-content/themes/neuf-old-style/js/html5shiv.js b/wp-content/themes/neuf-old-style/js/html5shiv.js new file mode 100644 index 0000000..8dab2e1 --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/html5shiv.js @@ -0,0 +1,220 @@ +/*! HTML5 Shiv vpre3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ +;(function(window, document) { + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i; + + /** Not all elements can be cloned in IE (this list can be shortend) **/ + var saveClones = /^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + var a = document.createElement('a'); + + a.innerHTML = ''; + + //if the hidden property is implemented we can assume, that the browser supports HTML5 Styles | this fails in Chrome 8 + supportsHtml5Styles = ('hidden' in a); + //if we are part of Modernizr, we do an additional test to solve the Chrome 8 fail + if(supportsHtml5Styles && typeof injectElementWithStyles == 'function'){ + injectElementWithStyles('#modernizr{}', function(node){ + node.hidden = true; + supportsHtml5Styles = (window.getComputedStyle ? + getComputedStyle(node, null) : + node.currentStyle).display == 'none'; + }); + } + + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + try { + (document.createElement)('a'); + } catch(e) { + return true; + } + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Shivs the `createElement` and `createDocumentFragment` methods of the document. + * @private + * @param {Document|DocumentFragment} ownerDocument The document. + */ + function shivMethods(ownerDocument) { + var cache = {}, + docCreateElement = ownerDocument.createElement, + docCreateFragment = ownerDocument.createDocumentFragment, + frag = docCreateFragment(); + + ownerDocument.createElement = function(nodeName) { + //abort shiv + if(!html5.shivMethods){ + return docCreateElement(nodeName); + } + + var node; + + if(cache[nodeName]){ + node = cache[nodeName].cloneNode(); + } else if(saveClones.test(nodeName)){ + node = (cache[nodeName] = docCreateElement(nodeName)).cloneNode(); + } else { + node = docCreateElement(nodeName); + } + + // Avoid adding some elements to fragments in IE < 9 because + // * Attributes like `name` or `type` cannot be set/changed once an element + // is inserted into a document/fragment + // * Link elements with `src` attributes that are inaccessible, as with + // a 403 response, will cause the tab/window to crash + // * Script elements appended to fragments will execute when their `src` + // or `text` property is set + return node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node; + }; + + ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + + 'var n=f.cloneNode(),c=n.createElement;' + + 'h.shivMethods&&(' + + // unroll the `createElement` calls + getElements().join().replace(/\w+/g, function(nodeName) { + docCreateElement(nodeName); + frag.createElement(nodeName); + return 'c("' + nodeName + '")'; + }) + + ');return n}' + )(html5, frag); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Shivs the given document. + * @memberOf html5 + * @param {Document} ownerDocument The document to shiv. + * @returns {Document} The shived document. + */ + function shivDocument(ownerDocument) { + var shived; + if (ownerDocument.documentShived) { + return ownerDocument; + } + if (html5.shivCSS && !supportsHtml5Styles) { + shived = !!addStyleSheet(ownerDocument, + // corrects block display not defined in IE6/7/8/9 + 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' + + // corrects audio display not defined in IE6/7/8/9 + 'audio{display:none}' + + // corrects canvas and video display not defined in IE6/7/8/9 + 'canvas,video{display:inline-block;*display:inline;*zoom:1}' + + // corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9 + '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' + + // adds styling not present in IE6/7/8/9 + 'mark{background:#FF0;color:#000}' + ); + } + if (!supportsUnknownElements) { + shived = !shivMethods(ownerDocument); + } + if (shived) { + ownerDocument.documentShived = shived; + } + return ownerDocument; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The `html5` object is exposed so that more elements can be shived and + * existing shiving can be detected on iframes. + * @type Object + * @example + * + * // options can be changed before the script is included + * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; + */ + var html5 = { + + /** + * An array or space separated string of node names of the elements to shiv. + * @memberOf html5 + * @type Array|String + */ + 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video', + + /** + * A flag to indicate that the HTML5 style sheet should be inserted. + * @memberOf html5 + * @type Boolean + */ + 'shivCSS': !(options.shivCSS === false), + + /** + * A flag to indicate that the document's `createElement` and `createDocumentFragment` + * methods should be overwritten. + * @memberOf html5 + * @type Boolean + */ + 'shivMethods': !(options.shivMethods === false), + + /** + * A string to describe the type of `html5` object ("default" or "default print"). + * @memberOf html5 + * @type String + */ + 'type': 'default', + + // shivs the document according to the specified `html5` object options + 'shivDocument': shivDocument + }; + + /*--------------------------------------------------------------------------*/ + + // expose html5 + window.html5 = html5; + + // shiv the document + shivDocument(document); + +}(this, document)); \ No newline at end of file diff --git a/wp-content/themes/neuf-old-style/js/jquery-1.7.1.min.js b/wp-content/themes/neuf-old-style/js/jquery-1.7.1.min.js new file mode 100644 index 0000000..198b3ff --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
                  a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
                  "+""+"
                  ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
                  t
                  ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
                  ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

                  ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
                  ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/

      ","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
      ","
      "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
      ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/wp-content/themes/neuf-old-style/js/jquery.cycle.all.js b/wp-content/themes/neuf-old-style/js/jquery.cycle.all.js new file mode 100755 index 0000000..d57fb72 --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/jquery.cycle.all.js @@ -0,0 +1,1529 @@ +/*! + * jQuery Cycle Plugin (with Transition Definitions) + * Examples and documentation at: http://jquery.malsup.com/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.9999 (13-NOV-2011) + * Dual licensed under the MIT and GPL licenses. + * http://jquery.malsup.com/license.html + * Requires: jQuery v1.3.2 or later + */ +;(function($, undefined) { + +var ver = '2.9999'; + +// if $.support is not defined (pre jQuery 1.3) add what I need +if ($.support == undefined) { + $.support = { + opacity: !($.browser.msie) + }; +} + +function debug(s) { + $.fn.cycle.debug && log(s); +} +function log() { + window.console && console.log && console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); +} +$.expr[':'].paused = function(el) { + return el.cyclePause; +} + + +// the options arg can be... +// a number - indicates an immediate transition should occur to the given slide index +// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) +// an object - properties to control the slideshow +// +// the arg2 arg can be... +// the name of an fx (only used in conjunction with a numeric value for 'options') +// the value true (only used in first arg == 'resume') and indicates +// that the resume should occur immediately (not wait for next timeout) + +$.fn.cycle = function(options, arg2) { + var o = { s: this.selector, c: this.context }; + + // in 1.3+ we can fix mistakes with the ready state + if (this.length === 0 && options != 'stop') { + if (!$.isReady && o.s) { + log('DOM not ready, queuing slideshow'); + $(function() { + $(o.s,o.c).cycle(options,arg2); + }); + return this; + } + // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() + log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); + return this; + } + + // iterate the matched nodeset + return this.each(function() { + var opts = handleArguments(this, options, arg2); + if (opts === false) + return; + + opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; + + // stop existing slideshow for this container (if there is one) + if (this.cycleTimeout) + clearTimeout(this.cycleTimeout); + this.cycleTimeout = this.cyclePause = 0; + + var $cont = $(this); + var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); + var els = $slides.get(); + + var opts2 = buildOptions($cont, $slides, els, opts, o); + if (opts2 === false) + return; + + if (els.length < 2) { + log('terminating; too few slides: ' + els.length); + return; + } + + var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards); + + // if it's an auto slideshow, kick it off + if (startTime) { + startTime += (opts2.delay || 0); + if (startTime < 10) + startTime = 10; + debug('first timeout: ' + startTime); + this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime); + } + }); +}; + +function triggerPause(cont, byHover, onPager) { + var opts = $(cont).data('cycle.opts'); + var paused = !!cont.cyclePause; + if (paused && opts.paused) + opts.paused(cont, opts, byHover, onPager); + else if (!paused && opts.resumed) + opts.resumed(cont, opts, byHover, onPager); +} + +// process the args that were passed to the plugin fn +function handleArguments(cont, options, arg2) { + if (cont.cycleStop == undefined) + cont.cycleStop = 0; + if (options === undefined || options === null) + options = {}; + if (options.constructor == String) { + switch(options) { + case 'destroy': + case 'stop': + var opts = $(cont).data('cycle.opts'); + if (!opts) + return false; + cont.cycleStop++; // callbacks look for change + if (cont.cycleTimeout) + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + opts.elements && $(opts.elements).stop(); + $(cont).removeData('cycle.opts'); + if (options == 'destroy') + destroy(opts); + return false; + case 'toggle': + cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; + checkInstantResume(cont.cyclePause, arg2, cont); + triggerPause(cont); + return false; + case 'pause': + cont.cyclePause = 1; + triggerPause(cont); + return false; + case 'resume': + cont.cyclePause = 0; + checkInstantResume(false, arg2, cont); + triggerPause(cont); + return false; + case 'prev': + case 'next': + var opts = $(cont).data('cycle.opts'); + if (!opts) { + log('options not found, "prev/next" ignored'); + return false; + } + $.fn.cycle[options](opts); + return false; + default: + options = { fx: options }; + }; + return options; + } + else if (options.constructor == Number) { + // go to the requested slide + var num = options; + options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not advance slide'); + return false; + } + if (num < 0 || num >= options.elements.length) { + log('invalid slide index: ' + num); + return false; + } + options.nextSlide = num; + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + if (typeof arg2 == 'string') + options.oneTimeFx = arg2; + go(options.elements, options, 1, num >= options.currSlide); + return false; + } + return options; + + function checkInstantResume(isPaused, arg2, cont) { + if (!isPaused && arg2 === true) { // resume now! + var options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not resume'); + return false; + } + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + go(options.elements, options, 1, !options.backwards); + } + } +}; + +function removeFilter(el, opts) { + if (!$.support.opacity && opts.cleartype && el.style.filter) { + try { el.style.removeAttribute('filter'); } + catch(smother) {} // handle old opera versions + } +}; + +// unbind event handlers +function destroy(opts) { + if (opts.next) + $(opts.next).unbind(opts.prevNextEvent); + if (opts.prev) + $(opts.prev).unbind(opts.prevNextEvent); + + if (opts.pager || opts.pagerAnchorBuilder) + $.each(opts.pagerAnchors || [], function() { + this.unbind().remove(); + }); + opts.pagerAnchors = null; + if (opts.destroy) // callback + opts.destroy(opts); +}; + +// one-time initialization +function buildOptions($cont, $slides, els, options, o) { + var startingSlideSpecified; + // support metadata plugin (v1.0 and v2.0) + var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); + var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null; + if (meta) + opts = $.extend(opts, meta); + if (opts.autostop) + opts.countdown = opts.autostopCount || els.length; + + var cont = $cont[0]; + $cont.data('cycle.opts', opts); + opts.$cont = $cont; + opts.stopCount = cont.cycleStop; + opts.elements = els; + opts.before = opts.before ? [opts.before] : []; + opts.after = opts.after ? [opts.after] : []; + + // push some after callbacks + if (!$.support.opacity && opts.cleartype) + opts.after.push(function() { removeFilter(this, opts); }); + if (opts.continuous) + opts.after.push(function() { go(els,opts,0,!opts.backwards); }); + + saveOriginalOpts(opts); + + // clearType corrections + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($slides); + + // container requires non-static position so that slides can be position within + if ($cont.css('position') == 'static') + $cont.css('position', 'relative'); + if (opts.width) + $cont.width(opts.width); + if (opts.height && opts.height != 'auto') + $cont.height(opts.height); + + if (opts.startingSlide != undefined) { + opts.startingSlide = parseInt(opts.startingSlide,10); + if (opts.startingSlide >= els.length || opts.startSlide < 0) + opts.startingSlide = 0; // catch bogus input + else + startingSlideSpecified = true; + } + else if (opts.backwards) + opts.startingSlide = els.length - 1; + else + opts.startingSlide = 0; + + // if random, mix up the slide array + if (opts.random) { + opts.randomMap = []; + for (var i = 0; i < els.length; i++) + opts.randomMap.push(i); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + if (startingSlideSpecified) { + // try to find the specified starting slide and if found set start slide index in the map accordingly + for ( var cnt = 0; cnt < els.length; cnt++ ) { + if ( opts.startingSlide == opts.randomMap[cnt] ) { + opts.randomIndex = cnt; + } + } + } + else { + opts.randomIndex = 1; + opts.startingSlide = opts.randomMap[1]; + } + } + else if (opts.startingSlide >= els.length) + opts.startingSlide = 0; // catch bogus input + opts.currSlide = opts.startingSlide || 0; + var first = opts.startingSlide; + + // set position and zIndex on all the slides + $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { + var z; + if (opts.backwards) + z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i; + else + z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i; + $(this).css('z-index', z) + }); + + // make sure first slide is visible + $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case + removeFilter(els[first], opts); + + // stretch slides + if (opts.fit) { + if (!opts.aspect) { + if (opts.width) + $slides.width(opts.width); + if (opts.height && opts.height != 'auto') + $slides.height(opts.height); + } else { + $slides.each(function(){ + var $slide = $(this); + var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect; + if( opts.width && $slide.width() != opts.width ) { + $slide.width( opts.width ); + $slide.height( opts.width / ratio ); + } + + if( opts.height && $slide.height() < opts.height ) { + $slide.height( opts.height ); + $slide.width( opts.height * ratio ); + } + }); + } + } + + if (opts.center && ((!opts.fit) || opts.aspect)) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? + ((opts.width - $slide.width()) / 2) + "px" : + 0, + "margin-top": opts.height ? + ((opts.height - $slide.height()) / 2) + "px" : + 0 + }); + }); + } + + if (opts.center && !opts.fit && !opts.slideResize) { + $slides.each(function(){ + var $slide = $(this); + $slide.css({ + "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, + "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 + }); + }); + } + + // stretch container + var reshape = opts.containerResize && !$cont.innerHeight(); + if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 + var maxw = 0, maxh = 0; + for(var j=0; j < els.length; j++) { + var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); + if (!w) w = e.offsetWidth || e.width || $e.attr('width'); + if (!h) h = e.offsetHeight || e.height || $e.attr('height'); + maxw = w > maxw ? w : maxw; + maxh = h > maxh ? h : maxh; + } + if (maxw > 0 && maxh > 0) + $cont.css({width:maxw+'px',height:maxh+'px'}); + } + + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pause) + $cont.hover( + function(){ + pauseFlag = true; + this.cyclePause++; + triggerPause(cont, true); + }, + function(){ + pauseFlag && this.cyclePause--; + triggerPause(cont, true); + } + ); + + if (supportMultiTransitions(opts) === false) + return false; + + // apparently a lot of people use image slideshows without height/width attributes on the images. + // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. + var requeue = false; + options.requeueAttempts = options.requeueAttempts || 0; + $slides.each(function() { + // try to get height/width of each slide + var $el = $(this); + this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0); + this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0); + + if ( $el.is('img') ) { + // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when + // an image is being downloaded and the markup did not include sizing info (height/width attributes); + // there seems to be some "default" sizes used in this situation + var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); + var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); + var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); + var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); + // don't requeue for images that are still loading but have a valid size + if (loadingIE || loadingFF || loadingOp || loadingOther) { + if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever + log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); + setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout); + requeue = true; + return false; // break each loop + } + else { + log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); + } + } + } + return true; + }); + + if (requeue) + return false; + + opts.cssBefore = opts.cssBefore || {}; + opts.cssAfter = opts.cssAfter || {}; + opts.cssFirst = opts.cssFirst || {}; + opts.animIn = opts.animIn || {}; + opts.animOut = opts.animOut || {}; + + $slides.not(':eq('+first+')').css(opts.cssBefore); + $($slides[first]).css(opts.cssFirst); + + if (opts.timeout) { + opts.timeout = parseInt(opts.timeout,10); + // ensure that timeout and speed settings are sane + if (opts.speed.constructor == String) + opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10); + if (!opts.sync) + opts.speed = opts.speed / 2; + + var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250; + while((opts.timeout - opts.speed) < buffer) // sanitize timeout + opts.timeout += opts.speed; + } + if (opts.easing) + opts.easeIn = opts.easeOut = opts.easing; + if (!opts.speedIn) + opts.speedIn = opts.speed; + if (!opts.speedOut) + opts.speedOut = opts.speed; + + opts.slideCount = els.length; + opts.currSlide = opts.lastSlide = first; + if (opts.random) { + if (++opts.randomIndex == els.length) + opts.randomIndex = 0; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.backwards) + opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1; + else + opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1; + + // run transition init fn + if (!opts.multiFx) { + var init = $.fn.cycle.transitions[opts.fx]; + if ($.isFunction(init)) + init($cont, $slides, opts); + else if (opts.fx != 'custom' && !opts.multiFx) { + log('unknown transition: ' + opts.fx,'; slideshow terminating'); + return false; + } + } + + // fire artificial events + var e0 = $slides[first]; + if (!opts.skipInitializationCallbacks) { + if (opts.before.length) + opts.before[0].apply(e0, [e0, e0, opts, true]); + if (opts.after.length) + opts.after[0].apply(e0, [e0, e0, opts, true]); + } + if (opts.next) + $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)}); + if (opts.prev) + $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)}); + if (opts.pager || opts.pagerAnchorBuilder) + buildPager(els,opts); + + exposeAddSlide(opts, els); + + return opts; +}; + +// save off original opts so we can restore after clearing state +function saveOriginalOpts(opts) { + opts.original = { before: [], after: [] }; + opts.original.cssBefore = $.extend({}, opts.cssBefore); + opts.original.cssAfter = $.extend({}, opts.cssAfter); + opts.original.animIn = $.extend({}, opts.animIn); + opts.original.animOut = $.extend({}, opts.animOut); + $.each(opts.before, function() { opts.original.before.push(this); }); + $.each(opts.after, function() { opts.original.after.push(this); }); +}; + +function supportMultiTransitions(opts) { + var i, tx, txs = $.fn.cycle.transitions; + // look for multiple effects + if (opts.fx.indexOf(',') > 0) { + opts.multiFx = true; + opts.fxs = opts.fx.replace(/\s*/g,'').split(','); + // discard any bogus effect names + for (i=0; i < opts.fxs.length; i++) { + var fx = opts.fxs[i]; + tx = txs[fx]; + if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { + log('discarding unknown transition: ',fx); + opts.fxs.splice(i,1); + i--; + } + } + // if we have an empty list then we threw everything away! + if (!opts.fxs.length) { + log('No valid transitions named; slideshow terminating.'); + return false; + } + } + else if (opts.fx == 'all') { // auto-gen the list of transitions + opts.multiFx = true; + opts.fxs = []; + for (p in txs) { + tx = txs[p]; + if (txs.hasOwnProperty(p) && $.isFunction(tx)) + opts.fxs.push(p); + } + } + if (opts.multiFx && opts.randomizeEffects) { + // munge the fxs array to make effect selection random + var r1 = Math.floor(Math.random() * 20) + 30; + for (i = 0; i < r1; i++) { + var r2 = Math.floor(Math.random() * opts.fxs.length); + opts.fxs.push(opts.fxs.splice(r2,1)[0]); + } + debug('randomized fx sequence: ',opts.fxs); + } + return true; +}; + +// provide a mechanism for adding slides after the slideshow has started +function exposeAddSlide(opts, els) { + opts.addSlide = function(newSlide, prepend) { + var $s = $(newSlide), s = $s[0]; + if (!opts.autostopCount) + opts.countdown++; + els[prepend?'unshift':'push'](s); + if (opts.els) + opts.els[prepend?'unshift':'push'](s); // shuffle needs this + opts.slideCount = els.length; + + // add the slide to the random map and resort + if (opts.random) { + opts.randomMap.push(opts.slideCount-1); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + + $s.css('position','absolute'); + $s[prepend?'prependTo':'appendTo'](opts.$cont); + + if (prepend) { + opts.currSlide++; + opts.nextSlide++; + } + + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($s); + + if (opts.fit && opts.width) + $s.width(opts.width); + if (opts.fit && opts.height && opts.height != 'auto') + $s.height(opts.height); + s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); + s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); + + $s.css(opts.cssBefore); + + if (opts.pager || opts.pagerAnchorBuilder) + $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); + + if ($.isFunction(opts.onAddSlide)) + opts.onAddSlide($s); + else + $s.hide(); // default behavior + }; +} + +// reset internal state; we do this on every pass in order to support multiple effects +$.fn.cycle.resetState = function(opts, fx) { + fx = fx || opts.fx; + opts.before = []; opts.after = []; + opts.cssBefore = $.extend({}, opts.original.cssBefore); + opts.cssAfter = $.extend({}, opts.original.cssAfter); + opts.animIn = $.extend({}, opts.original.animIn); + opts.animOut = $.extend({}, opts.original.animOut); + opts.fxFn = null; + $.each(opts.original.before, function() { opts.before.push(this); }); + $.each(opts.original.after, function() { opts.after.push(this); }); + + // re-init + var init = $.fn.cycle.transitions[fx]; + if ($.isFunction(init)) + init(opts.$cont, $(opts.elements), opts); +}; + +// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt +function go(els, opts, manual, fwd) { + // opts.busy is true if we're in the middle of an animation + if (manual && opts.busy && opts.manualTrump) { + // let manual transitions requests trump active ones + debug('manualTrump in go(), stopping active transition'); + $(els).stop(true,true); + opts.busy = 0; + } + // don't begin another timeout-based transition if there is one active + if (opts.busy) { + debug('transition active, ignoring new tx request'); + return; + } + + var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; + + // stop cycling if we have an outstanding stop request + if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) + return; + + // check to see if we should stop cycling based on autostop options + if (!manual && !p.cyclePause && !opts.bounce && + ((opts.autostop && (--opts.countdown <= 0)) || + (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { + if (opts.end) + opts.end(opts); + return; + } + + // if slideshow is paused, only transition on a manual trigger + var changed = false; + if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { + changed = true; + var fx = opts.fx; + // keep trying to get the slide size if we don't have it yet + curr.cycleH = curr.cycleH || $(curr).height(); + curr.cycleW = curr.cycleW || $(curr).width(); + next.cycleH = next.cycleH || $(next).height(); + next.cycleW = next.cycleW || $(next).width(); + + // support multiple transition types + if (opts.multiFx) { + if (fwd && (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length)) + opts.lastFx = 0; + else if (!fwd && (opts.lastFx == undefined || --opts.lastFx < 0)) + opts.lastFx = opts.fxs.length - 1; + fx = opts.fxs[opts.lastFx]; + } + + // one-time fx overrides apply to: $('div').cycle(3,'zoom'); + if (opts.oneTimeFx) { + fx = opts.oneTimeFx; + opts.oneTimeFx = null; + } + + $.fn.cycle.resetState(opts, fx); + + // run the before callbacks + if (opts.before.length) + $.each(opts.before, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + + // stage the after callacks + var after = function() { + opts.busy = 0; + $.each(opts.after, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + if (!p.cycleStop) { + // queue next transition + queueNext(); + } + }; + + debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); + + // get ready to perform the transition + opts.busy = 1; + if (opts.fxFn) // fx function provided? + opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ? + $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else + $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + } + else { + queueNext(); + } + + if (changed || opts.nextSlide == opts.currSlide) { + // calculate the next slide + opts.lastSlide = opts.currSlide; + if (opts.random) { + opts.currSlide = opts.nextSlide; + if (++opts.randomIndex == els.length) { + opts.randomIndex = 0; + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + } + opts.nextSlide = opts.randomMap[opts.randomIndex]; + if (opts.nextSlide == opts.currSlide) + opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; + } + else if (opts.backwards) { + var roll = (opts.nextSlide - 1) < 0; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = 1; + opts.currSlide = 0; + } + else { + opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1; + opts.currSlide = roll ? 0 : opts.nextSlide+1; + } + } + else { // sequence + var roll = (opts.nextSlide + 1) == els.length; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = els.length-2; + opts.currSlide = els.length-1; + } + else { + opts.nextSlide = roll ? 0 : opts.nextSlide+1; + opts.currSlide = roll ? els.length-1 : opts.nextSlide-1; + } + } + } + if (changed && opts.pager) + opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); + + function queueNext() { + // stage the next transition + var ms = 0, timeout = opts.timeout; + if (opts.timeout && !opts.continuous) { + ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); + if (opts.fx == 'shuffle') + ms -= opts.speedOut; + } + else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic + ms = 10; + if (ms > 0) + p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms); + } +}; + +// invoked after transition +$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { + $(pager).each(function() { + $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); + }); +}; + +// calculate timeout value for current transition +function getTimeout(curr, next, opts, fwd) { + if (opts.timeoutFn) { + // call user provided calc fn + var t = opts.timeoutFn.call(curr,curr,next,opts,fwd); + while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout + t += opts.speed; + debug('calculated timeout: ' + t + '; speed: ' + opts.speed); + if (t !== false) + return t; + } + return opts.timeout; +}; + +// expose next/prev function, caller must pass in state +$.fn.cycle.next = function(opts) { advance(opts,1); }; +$.fn.cycle.prev = function(opts) { advance(opts,0);}; + +// advance slide forward or back +function advance(opts, moveForward) { + var val = moveForward ? 1 : -1; + var els = opts.elements; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + if (opts.random && val < 0) { + // move back to the previously display slide + opts.randomIndex--; + if (--opts.randomIndex == -2) + opts.randomIndex = els.length-2; + else if (opts.randomIndex == -1) + opts.randomIndex = els.length-1; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.random) { + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else { + opts.nextSlide = opts.currSlide + val; + if (opts.nextSlide < 0) { + if (opts.nowrap) return false; + opts.nextSlide = els.length - 1; + } + else if (opts.nextSlide >= els.length) { + if (opts.nowrap) return false; + opts.nextSlide = 0; + } + } + + var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated + if ($.isFunction(cb)) + cb(val > 0, opts.nextSlide, els[opts.nextSlide]); + go(els, opts, 1, moveForward); + return false; +}; + +function buildPager(els, opts) { + var $p = $(opts.pager); + $.each(els, function(i,o) { + $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); + }); + opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); +}; + +$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) { + var a; + if ($.isFunction(opts.pagerAnchorBuilder)) { + a = opts.pagerAnchorBuilder(i,el); + debug('pagerAnchorBuilder('+i+', el) returned: ' + a); + } + else + a = ''+(i+1)+''; + + if (!a) + return; + var $a = $(a); + // don't reparent if anchor is in the dom + if ($a.parents('body').length === 0) { + var arr = []; + if ($p.length > 1) { + $p.each(function() { + var $clone = $a.clone(true); + $(this).append($clone); + arr.push($clone[0]); + }); + $a = $(arr); + } + else { + $a.appendTo($p); + } + } + + opts.pagerAnchors = opts.pagerAnchors || []; + opts.pagerAnchors.push($a); + + var pagerFn = function(e) { + e.preventDefault(); + opts.nextSlide = i; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated + if ($.isFunction(cb)) + cb(opts.nextSlide, els[opts.nextSlide]); + go(els,opts,1,opts.currSlide < i); // trigger the trans +// return false; // <== allow bubble + } + + if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) { + $a.hover(pagerFn, function(){/* no-op */} ); + } + else { + $a.bind(opts.pagerEvent, pagerFn); + } + + if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) + $a.bind('click.cycle', function(){return false;}); // suppress click + + var cont = opts.$cont[0]; + var pauseFlag = false; // https://github.com/malsup/cycle/issues/44 + if (opts.pauseOnPagerHover) { + $a.hover( + function() { + pauseFlag = true; + cont.cyclePause++; + triggerPause(cont,true,true); + }, function() { + pauseFlag && cont.cyclePause--; + triggerPause(cont,true,true); + } + ); + } +}; + +// helper fn to calculate the number of slides between the current and the next +$.fn.cycle.hopsFromLast = function(opts, fwd) { + var hops, l = opts.lastSlide, c = opts.currSlide; + if (fwd) + hops = c > l ? c - l : opts.slideCount - l; + else + hops = c < l ? l - c : l + opts.slideCount - c; + return hops; +}; + +// fix clearType problems in ie6 by setting an explicit bg color +// (otherwise text slides look horrible during a fade transition) +function clearTypeFix($slides) { + debug('applying clearType background-color hack'); + function hex(s) { + s = parseInt(s,10).toString(16); + return s.length < 2 ? '0'+s : s; + }; + function getBg(e) { + for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) { + var v = $.css(e,'background-color'); + if (v && v.indexOf('rgb') >= 0 ) { + var rgb = v.match(/\d+/g); + return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); + } + if (v && v != 'transparent') + return v; + } + return '#ffffff'; + }; + $slides.each(function() { $(this).css('background-color', getBg(this)); }); +}; + +// reset common props before the next transition +$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) { + $(opts.elements).not(curr).hide(); + if (typeof opts.cssBefore.opacity == 'undefined') + opts.cssBefore.opacity = 1; + opts.cssBefore.display = 'block'; + if (opts.slideResize && w !== false && next.cycleW > 0) + opts.cssBefore.width = next.cycleW; + if (opts.slideResize && h !== false && next.cycleH > 0) + opts.cssBefore.height = next.cycleH; + opts.cssAfter = opts.cssAfter || {}; + opts.cssAfter.display = 'none'; + $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1)); +}; + +// the actual fn for effecting a transition +$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) { + var $l = $(curr), $n = $(next); + var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; + $n.css(opts.cssBefore); + if (speedOverride) { + if (typeof speedOverride == 'number') + speedIn = speedOut = speedOverride; + else + speedIn = speedOut = 1; + easeIn = easeOut = null; + } + var fn = function() { + $n.animate(opts.animIn, speedIn, easeIn, function() { + cb(); + }); + }; + $l.animate(opts.animOut, speedOut, easeOut, function() { + $l.css(opts.cssAfter); + if (!opts.sync) + fn(); + }); + if (opts.sync) fn(); +}; + +// transition definitions - only fade is defined here, transition pack defines the rest +$.fn.cycle.transitions = { + fade: function($cont, $slides, opts) { + $slides.not(':eq('+opts.currSlide+')').css('opacity',0); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.opacity = 0; + }); + opts.animIn = { opacity: 1 }; + opts.animOut = { opacity: 0 }; + opts.cssBefore = { top: 0, left: 0 }; + } +}; + +$.fn.cycle.ver = function() { return ver; }; + +// override these globally if you like (they are all optional) +$.fn.cycle.defaults = { + activePagerClass: 'activeSlide', // class name used for the active pager link + after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling + animIn: null, // properties that define how the slide animates in + animOut: null, // properties that define how the slide animates out + aspect: false, // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option) + autostop: 0, // true to end slideshow after X transitions (where X == slide count) + autostopCount: 0, // number of transitions (optionally used with autostop to define X) + backwards: false, // true to start slideshow at last slide and move backwards through the stack + before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + center: null, // set to true to have cycle add top/left margin to each slide (use with width and height options) + cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE) + cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) + containerResize: 1, // resize container to fit largest slide + continuous: 0, // true to start next transition immediately after current one completes + cssAfter: null, // properties that defined the state of the slide after transitioning out + cssBefore: null, // properties that define the initial state of the slide before transitioning in + delay: 0, // additional delay (in ms) for first transition (hint: can be negative) + easeIn: null, // easing for "in" transition + easeOut: null, // easing for "out" transition + easing: null, // easing method for both in and out transitions + end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) + fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms + fit: 0, // force slides to fit container + fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle') + fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) + height: 'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well) + manualTrump: true, // causes manual transition to stop an active transition instead of being ignored + metaAttr: 'cycle',// data- attribute that holds the option data for the slideshow + next: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide + nowrap: 0, // true to prevent slideshow from wrapping + onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement) + onPrevNextEvent: null,// callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement) + pager: null, // element, jQuery object, or jQuery selector string for the element to use as pager container + pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement) + pagerEvent: 'click.cycle', // name of event which drives the pager navigation + pause: 0, // true to enable "pause on hover" + pauseOnPagerHover: 0, // true to pause when hovering over pager link + prev: null, // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide + prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide + random: 0, // true for random, false for sequence (not applicable to shuffle fx) + randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random + requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded + requeueTimeout: 250, // ms delay for requeue + rev: 0, // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle) + shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } + skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition + slideExpr: null, // expression for selecting slides (if something other than all children is required) + slideResize: 1, // force slide width/height to fixed size before every transition + speed: 1000, // speed of the transition (any valid fx speed value) + speedIn: null, // speed of the 'in' transition + speedOut: null, // speed of the 'out' transition + startingSlide: undefined, // zero-based index of the first slide to be displayed + sync: 1, // true if in/out transitions should occur simultaneously + timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) + timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag) + updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style) + width: null // container width (if the 'fit' option is true, the slides will be set to this width as well) +}; + +})(jQuery); + + +/*! + * jQuery Cycle Plugin Transition Definitions + * This script is a plugin for the jQuery Cycle Plugin + * Examples and documentation at: http://malsup.com/jquery/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.73 + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function($) { + +// +// These functions define slide initialization and properties for the named +// transitions. To save file size feel free to remove any of these that you +// don't need. +// +$.fn.cycle.transitions.none = function($cont, $slides, opts) { + opts.fxFn = function(curr,next,opts,after){ + $(next).show(); + $(curr).hide(); + after(); + }; +}; + +// not a cross-fade, fadeout only fades out the top slide +$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) { + $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 }); + opts.before.push(function(curr,next,opts,w,h,rev) { + $(curr).css('zIndex',opts.slideCount + (!rev === true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (!rev === true ? 0 : 1)); + }); + opts.animIn.opacity = 1; + opts.animOut.opacity = 0; + opts.cssBefore.opacity = 1; + opts.cssBefore.display = 'block'; + opts.cssAfter.zIndex = 0; +}; + +// scrollUp/Down/Left/Right +$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssBefore.top = h; + opts.cssBefore.left = 0; + opts.cssFirst.top = 0; + opts.animIn.top = 0; + opts.animOut.top = -h; +}; +$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssFirst.top = 0; + opts.cssBefore.top = -h; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.top = h; +}; +$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst.left = 0; + opts.cssBefore.left = w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = 0-w; +}; +$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst.left = 0; + opts.cssBefore.left = -w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = w; +}; +$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) { + $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts, fwd) { + if (opts.rev) + fwd = !fwd; + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW); + opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; + }); + opts.cssFirst.left = 0; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.top = 0; +}; +$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push(function(curr, next, opts, fwd) { + if (opts.rev) + fwd = !fwd; + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1); + opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.left = 0; +}; + +// slideX/slideY +$.fn.cycle.transitions.slideX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; + opts.animIn.width = 'show'; + opts.animOut.width = 0; +}; +$.fn.cycle.transitions.slideY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.height = 0; + opts.animIn.height = 'show'; + opts.animOut.height = 0; +}; + +// shuffle +$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { + var i, w = $cont.css('overflow', 'visible').width(); + $slides.css({left: 0, top: 0}); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + }); + // only adjust speed once! + if (!opts.speedAdjusted) { + opts.speed = opts.speed / 2; // shuffle has 2 transitions + opts.speedAdjusted = true; + } + opts.random = 0; + opts.shuffle = opts.shuffle || {left:-w, top:15}; + opts.els = []; + for (i=0; i < $slides.length; i++) + opts.els.push($slides[i]); + + for (i=0; i < opts.currSlide; i++) + opts.els.push(opts.els.shift()); + + // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!) + opts.fxFn = function(curr, next, opts, cb, fwd) { + if (opts.rev) + fwd = !fwd; + var $el = fwd ? $(curr) : $(next); + $(next).css(opts.cssBefore); + var count = opts.slideCount; + $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() { + var hops = $.fn.cycle.hopsFromLast(opts, fwd); + for (var k=0; k < hops; k++) + fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); + if (fwd) { + for (var i=0, len=opts.els.length; i < len; i++) + $(opts.els[i]).css('z-index', len-i+count); + } + else { + var z = $(curr).css('z-index'); + $el.css('z-index', parseInt(z,10)+1+count); + } + $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() { + $(fwd ? this : curr).hide(); + if (cb) cb(); + }); + }); + }; + $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); +}; + +// turnUp/Down/Left/Right +$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = next.cycleH; + opts.animIn.height = next.cycleH; + opts.animOut.width = next.cycleW; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.cssBefore.height = 0; + opts.animIn.top = 0; + opts.animOut.height = 0; +}; +$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssFirst.top = 0; + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.cssBefore.height = 0; + opts.animOut.height = 0; +}; +$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = next.cycleW; + opts.animIn.width = next.cycleW; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; + opts.animIn.left = 0; + opts.animOut.width = 0; +}; +$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); + opts.animIn.left = 0; + opts.animOut.width = 0; +}; + +// zoom +$.fn.cycle.transitions.zoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.cssBefore.left = next.cycleW/2; + $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); + $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }); + }); + opts.cssFirst.top = 0; + opts.cssFirst.left = 0; + opts.cssBefore.width = 0; + opts.cssBefore.height = 0; +}; + +// fadeZoom +$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false); + opts.cssBefore.left = next.cycleW/2; + opts.cssBefore.top = next.cycleH/2; + $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); + }); + opts.cssBefore.width = 0; + opts.cssBefore.height = 0; + opts.animOut.opacity = 0; +}; + +// blindX +$.fn.cycle.transitions.blindX = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + opts.cssBefore.left = w; + opts.cssBefore.top = 0; + opts.animIn.left = 0; + opts.animOut.left = w; +}; +// blindY +$.fn.cycle.transitions.blindY = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore.top = h; + opts.cssBefore.left = 0; + opts.animIn.top = 0; + opts.animOut.top = h; +}; +// blindZ +$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + var w = $cont.width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore.top = h; + opts.cssBefore.left = w; + opts.animIn.top = 0; + opts.animIn.left = 0; + opts.animOut.top = h; + opts.animOut.left = w; +}; + +// growX - grow horizontally from centered 0 width +$.fn.cycle.transitions.growX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = this.cycleW/2; + opts.animIn.left = 0; + opts.animIn.width = this.cycleW; + opts.animOut.left = 0; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; +}; +// growY - grow vertically from centered 0 height +$.fn.cycle.transitions.growY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = this.cycleH/2; + opts.animIn.top = 0; + opts.animIn.height = this.cycleH; + opts.animOut.top = 0; + }); + opts.cssBefore.height = 0; + opts.cssBefore.left = 0; +}; + +// curtainX - squeeze in both edges horizontally +$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true,true); + opts.cssBefore.left = next.cycleW/2; + opts.animIn.left = 0; + opts.animIn.width = this.cycleW; + opts.animOut.left = curr.cycleW/2; + opts.animOut.width = 0; + }); + opts.cssBefore.top = 0; + opts.cssBefore.width = 0; +}; +// curtainY - squeeze in both edges vertically +$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.animIn.top = 0; + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH/2; + opts.animOut.height = 0; + }); + opts.cssBefore.height = 0; + opts.cssBefore.left = 0; +}; + +// cover - curr slide covered by next slide +$.fn.cycle.transitions.cover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + if (d == 'right') + opts.cssBefore.left = -w; + else if (d == 'up') + opts.cssBefore.top = h; + else if (d == 'down') + opts.cssBefore.top = -h; + else + opts.cssBefore.left = w; + }); + opts.animIn.left = 0; + opts.animIn.top = 0; + opts.cssBefore.top = 0; + opts.cssBefore.left = 0; +}; + +// uncover - curr slide moves off next slide +$.fn.cycle.transitions.uncover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + if (d == 'right') + opts.animOut.left = w; + else if (d == 'up') + opts.animOut.top = -h; + else if (d == 'down') + opts.animOut.top = h; + else + opts.animOut.left = -w; + }); + opts.animIn.left = 0; + opts.animIn.top = 0; + opts.cssBefore.top = 0; + opts.cssBefore.left = 0; +}; + +// toss - move top slide and fade away +$.fn.cycle.transitions.toss = function($cont, $slides, opts) { + var w = $cont.css('overflow','visible').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + // provide default toss settings if animOut not provided + if (!opts.animOut.left && !opts.animOut.top) + $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 }); + else + opts.animOut.opacity = 0; + }); + opts.cssBefore.left = 0; + opts.cssBefore.top = 0; + opts.animIn.left = 0; +}; + +// wipe - clip animation +$.fn.cycle.transitions.wipe = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.cssBefore = opts.cssBefore || {}; + var clip; + if (opts.clip) { + if (/l2r/.test(opts.clip)) + clip = 'rect(0px 0px '+h+'px 0px)'; + else if (/r2l/.test(opts.clip)) + clip = 'rect(0px '+w+'px '+h+'px '+w+'px)'; + else if (/t2b/.test(opts.clip)) + clip = 'rect(0px '+w+'px 0px 0px)'; + else if (/b2t/.test(opts.clip)) + clip = 'rect('+h+'px '+w+'px '+h+'px 0px)'; + else if (/zoom/.test(opts.clip)) { + var top = parseInt(h/2,10); + var left = parseInt(w/2,10); + clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)'; + } + } + + opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)'; + + var d = opts.cssBefore.clip.match(/(\d+)/g); + var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10); + + opts.before.push(function(curr, next, opts) { + if (curr == next) return; + var $curr = $(curr), $next = $(next); + $.fn.cycle.commonReset(curr,next,opts,true,true,false); + opts.cssAfter.display = 'block'; + + var step = 1, count = parseInt((opts.speedIn / 13),10) - 1; + (function f() { + var tt = t ? t - parseInt(step * (t/count),10) : 0; + var ll = l ? l - parseInt(step * (l/count),10) : 0; + var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h; + var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w; + $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); + (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none'); + })(); + }); + $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); + opts.animIn = { left: 0 }; + opts.animOut = { left: 0 }; +}; + +})(jQuery); diff --git a/wp-content/themes/neuf-old-style/js/knockout-2.0.0.js b/wp-content/themes/neuf-old-style/js/knockout-2.0.0.js new file mode 100644 index 0000000..6302c9c --- /dev/null +++ b/wp-content/themes/neuf-old-style/js/knockout-2.0.0.js @@ -0,0 +1,97 @@ +// Knockout JavaScript library v2.0.0 +// (c) Steven Sanderson - http://knockoutjs.com/ +// License: MIT (http://www.opensource.org/licenses/mit-license.php) + +(function(window,undefined){ +function c(a){throw a;}var l=void 0,m=!0,o=null,p=!1,r=window.ko={};r.b=function(a,b){for(var d=a.split("."),e=window,f=0;f",b[0];);return 4r.a.k(e,a[b])&&e.push(a[b]);return e},ba:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;fa.length?p:a.substring(0,e.length)===e},hb:function(a){for(var e=Array.prototype.slice.call(arguments,1),b="return ("+a+")",f=0;f","
      "]||!d.indexOf("",""]||(!d.indexOf("",""]||[0,"",""];a="ignored
      "+ +d[1]+a+d[2]+"
      ";for("function"==typeof window.innerShiv?b.appendChild(window.innerShiv(a)):b.innerHTML=a;d[0]--;)b=b.lastChild;b=r.a.X(b.lastChild.childNodes)}return b};r.a.Z=function(a,b){r.a.U(a);if(b!==o&&b!==l)if("string"!=typeof b&&(b=b.toString()),"undefined"!=typeof jQuery)jQuery(a).html(b);else for(var d=r.a.ma(b),e=0;e"},Ra:function(a,b){var h=d[a];h===l&&c(Error("Couldn't find any memo with ID "+ +a+". Perhaps it's already been unmemoized."));try{return h.apply(o,b||[]),m}finally{delete d[a]}},Sa:function(a,f){var d=[];b(a,d);for(var g=0,i=d.length;gb;b++)a=a();return a})};r.toJSON=function(a){a=r.Pa(a);return r.a.qa(a)}})();r.b("ko.toJS",r.Pa);r.b("ko.toJSON",r.toJSON); +r.h={q:function(a){return"OPTION"==a.tagName?a.__ko__hasDomDataOptionValue__===m?r.a.e.get(a,r.c.options.la):a.getAttribute("value"):"SELECT"==a.tagName?0<=a.selectedIndex?r.h.q(a.options[a.selectedIndex]):l:a.value},S:function(a,b){if("OPTION"==a.tagName)switch(typeof b){case "string":r.a.e.set(a,r.c.options.la,l);"__ko__hasDomDataOptionValue__"in a&&delete a.__ko__hasDomDataOptionValue__;a.value=b;break;default:r.a.e.set(a,r.c.options.la,b),a.__ko__hasDomDataOptionValue__=m,a.value="number"===typeof b? +b:""}else if("SELECT"==a.tagName)for(var d=a.options.length-1;0<=d;d--){if(r.h.q(a.options[d])==b){a.selectedIndex=d;break}}else{if(b===o||b===l)b="";a.value=b}}};r.b("ko.selectExtensions",r.h);r.b("ko.selectExtensions.readValue",r.h.q);r.b("ko.selectExtensions.writeValue",r.h.S); +r.j=function(){function a(a,e){for(var d=o;a!=d;)d=a,a=a.replace(b,function(a,b){return e[b]});return a}var b=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,e=["true","false"];return{D:[],Y:function(b){var e=r.a.z(b);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-1));for(var b=[],d=o,i,j=0;j$/: +/^\s*ko\s+(.*\:.*)\s*$/,g=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,i={ul:m,ol:m};r.f={C:{},childNodes:function(b){return a(b)?d(b):b.childNodes},ha:function(b){if(a(b))for(var b=r.f.childNodes(b),e=0,d=b.length;e"),p)}};r.c.uniqueName.Za=0; +r.c.checked={init:function(a,b,d){r.a.s(a,"click",function(){var e;if("checkbox"==a.type)e=a.checked;else if("radio"==a.type&&a.checked)e=a.value;else return;var f=b();"checkbox"==a.type&&r.a.d(f)instanceof Array?(e=r.a.k(r.a.d(f),a.value),a.checked&&0>e?f.push(a.value):!a.checked&&0<=e&&f.splice(e,1)):r.P(f)?f()!==e&&f(e):(f=d(),f._ko_property_writers&&f._ko_property_writers.checked&&f._ko_property_writers.checked(e))});"radio"==a.type&&!a.name&&r.c.uniqueName.init(a,function(){return m})},update:function(a, +b){var d=r.a.d(b());if("checkbox"==a.type)a.checked=d instanceof Array?0<=r.a.k(d,a.value):d;else if("radio"==a.type)a.checked=a.value==d}};r.c.attr={update:function(a,b){var d=r.a.d(b())||{},e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);f===p||f===o||f===l?a.removeAttribute(e):a.setAttribute(e,f.toString())}}}; +r.c.hasfocus={init:function(a,b,d){function e(a){var e=b();a!=r.a.d(e)&&(r.P(e)?e(a):(e=d(),e._ko_property_writers&&e._ko_property_writers.hasfocus&&e._ko_property_writers.hasfocus(a)))}r.a.s(a,"focus",function(){e(m)});r.a.s(a,"focusin",function(){e(m)});r.a.s(a,"blur",function(){e(p)});r.a.s(a,"focusout",function(){e(p)})},update:function(a,b){var d=r.a.d(b());d?a.focus():a.blur();r.a.sa(a,d?"focusin":"focusout")}}; +r.c["with"]={o:function(a){return function(){var b=a();return{"if":b,data:b,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["with"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["with"].o(b),d,e,f)}};r.j.D["with"]=p;r.f.C["with"]=m;r.c["if"]={o:function(a){return function(){return{"if":a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["if"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["if"].o(b),d,e,f)}}; +r.j.D["if"]=p;r.f.C["if"]=m;r.c.ifnot={o:function(a){return function(){return{ifnot:a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.ifnot.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.ifnot.o(b),d,e,f)}};r.j.D.ifnot=p;r.f.C.ifnot=m; +r.c.foreach={o:function(a){return function(){var b=r.a.d(a());return!b||"number"==typeof b.length?{foreach:b,templateEngine:r.p.M}:{foreach:b.data,includeDestroyed:b.includeDestroyed,afterAdd:b.afterAdd,beforeRemove:b.beforeRemove,afterRender:b.afterRender,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.foreach.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.foreach.o(b),d,e,f)}};r.j.D.foreach=p;r.f.C.foreach=m;r.b("ko.allowedVirtualElementBindings",r.f.C); +r.t=function(){};r.t.prototype.renderTemplateSource=function(){c("Override renderTemplateSource")};r.t.prototype.createJavaScriptEvaluatorBlock=function(){c("Override createJavaScriptEvaluatorBlock")};r.t.prototype.makeTemplateSource=function(a){if("string"==typeof a){var b=document.getElementById(a);b||c(Error("Cannot find template with ID "+a));return new r.m.g(b)}if(1==a.nodeType||8==a.nodeType)return new r.m.I(a);c(Error("Unknown template type: "+a))}; +r.t.prototype.renderTemplate=function(a,b,d){return this.renderTemplateSource(this.makeTemplateSource(a),b,d)};r.t.prototype.isTemplateRewritten=function(a){return this.allowTemplateRewriting===p?m:this.W&&this.W[a]?m:this.makeTemplateSource(a).data("isRewritten")};r.t.prototype.rewriteTemplate=function(a,b){var d=this.makeTemplateSource(a),e=b(d.text());d.text(e);d.data("isRewritten",m);if("string"==typeof a)this.W=this.W||{},this.W[a]=m};r.b("ko.templateEngine",r.t); +r.$=function(){function a(a,b,d){for(var a=r.j.Y(a),g=r.j.D,i=0;i/g;return{gb:function(a,b){b.isTemplateRewritten(a)||b.rewriteTemplate(a,function(a){return r.$.ub(a,b)})},ub:function(e,f){return e.replace(b,function(b,e,d,j,k,n,t){return a(t,e,f)}).replace(d,function(b,e){return a(e,"<\!-- ko --\>",f)})},Ua:function(a){return r.r.ka(function(b,d){b.nextSibling&&r.xa(b.nextSibling,a,d)})}}}();r.b("ko.templateRewriting",r.$);r.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",r.$.Ua);r.m={};r.m.g=function(a){this.g=a}; +r.m.g.prototype.text=function(){if(0==arguments.length)return"script"==this.g.tagName.toLowerCase()?this.g.text:this.g.innerHTML;var a=arguments[0];"script"==this.g.tagName.toLowerCase()?this.g.text=a:r.a.Z(this.g,a)};r.m.g.prototype.data=function(a){if(1===arguments.length)return r.a.e.get(this.g,"templateSourceData_"+a);r.a.e.set(this.g,"templateSourceData_"+a,arguments[1])};r.m.I=function(a){this.g=a};r.m.I.prototype=new r.m.g; +r.m.I.prototype.text=function(){if(0==arguments.length)return r.a.e.get(this.g,"__ko_anon_template__");r.a.e.set(this.g,"__ko_anon_template__",arguments[0])};r.b("ko.templateSources",r.m);r.b("ko.templateSources.domElement",r.m.g);r.b("ko.templateSources.anonymousTemplate",r.m.I); +(function(){function a(a,b,d){for(var g=0;node=a[g];g++)node.parentNode===b&&(1===node.nodeType||8===node.nodeType)&&d(node)}function b(a,b,h,g,i){var i=i||{},j=i.templateEngine||d;r.$.gb(h,j);h=j.renderTemplate(h,g,i);("number"!=typeof h.length||0a&&c(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var h=d.data("precompiled");h||(h=d.text()||"",h=jQuery.template(o,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),d.data("precompiled",h)); +d=[e.$data];e=jQuery.extend({koBindingContext:e},f.templateOptions);e=jQuery.tmpl(h,d,e);e.appendTo(document.createElement("div"));jQuery.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){document.write(" + + + diff --git a/wp-content/themes/neuf-old-style/kampanje/studio_rocky.php b/wp-content/themes/neuf-old-style/kampanje/studio_rocky.php new file mode 100755 index 0000000..f58bf27 --- /dev/null +++ b/wp-content/themes/neuf-old-style/kampanje/studio_rocky.php @@ -0,0 +1,42 @@ + + +
      + +Rocky - The Big Payback - Teater på Betong 6. og 7. november! + Billettservice +
      + + +ID , 'event_type' ); + foreach ( $event_array as $event_type ) { + $post->event_types[] = $event_type->name; + $post->post_classes[] = 'event-type-' . $event_type->slug; + } +?> + +
      > + +
      + ' . implode( ', ' , $post->event_types ) . '
      '; + echo $html; + ?> + + + +
      + + + +

      + +
      + + 'display:block;margin:auto;' ) ); ?> + +
      + + + + + + diff --git a/wp-content/themes/neuf-old-style/loop-page-full-width.php b/wp-content/themes/neuf-old-style/loop-page-full-width.php new file mode 100644 index 0000000..dd5d861 --- /dev/null +++ b/wp-content/themes/neuf-old-style/loop-page-full-width.php @@ -0,0 +1,19 @@ + + +
      > + +
      + +

      + +
      + + + +
      + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/loop-page.php b/wp-content/themes/neuf-old-style/loop-page.php new file mode 100644 index 0000000..015bac5 --- /dev/null +++ b/wp-content/themes/neuf-old-style/loop-page.php @@ -0,0 +1,25 @@ + + +
      > + +
      + +

      + +
      + + + +
      + +
      + + 'display:block;margin:auto;' ) ); ?> + +
      + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/loop-single.php b/wp-content/themes/neuf-old-style/loop-single.php new file mode 100755 index 0000000..50fb500 --- /dev/null +++ b/wp-content/themes/neuf-old-style/loop-single.php @@ -0,0 +1,35 @@ + + +
      > + +
      + +

      + + Nettside: '.$homepage.'
      ' : ''; + ?> + +
      av , kl
      + +
      + + + +
      + +
      + + 'display:block;margin:auto;' ) ); ?> + +
      post_excerpt; ?> + + +
      + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/menu.php b/wp-content/themes/neuf-old-style/menu.php new file mode 100755 index 0000000..c4816de --- /dev/null +++ b/wp-content/themes/neuf-old-style/menu.php @@ -0,0 +1,29 @@ +
      +
        +
      • Åpningstider ▾ +
          +
        • + + + + + + + + + + + + + + + +
          Man - ons11.00 - 01.00
          Tors - fre11.00 - 03.00
          Lørdag16.00 - 03.00
          +
        • +
        +
      • +
      + + 'main-menu', 'container' => 'false' ) ); ?> + +
      diff --git a/wp-content/themes/neuf-old-style/news-feed.php b/wp-content/themes/neuf-old-style/news-feed.php new file mode 100755 index 0000000..cd723cd --- /dev/null +++ b/wp-content/themes/neuf-old-style/news-feed.php @@ -0,0 +1,65 @@ + 'post', + 'posts_per_page' => 25, + 'order' => 'DESC' +); + +$events = new WP_Query( $args ); + + +header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); +$more = 1; + +echo ''; ?> + + +> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + have_posts()) : $events->the_post(); ?> + + <?php the_title_rss() ?> + + + + + + + + + ]]> + + ]]> + post_content ) > 0 ) : ?> + ]]> + + ]]> + + + + + + + + diff --git a/wp-content/themes/neuf-old-style/newsletter.php b/wp-content/themes/neuf-old-style/newsletter.php new file mode 100644 index 0000000..a9286c5 --- /dev/null +++ b/wp-content/themes/neuf-old-style/newsletter.php @@ -0,0 +1,119 @@ + 'AND', + array( + 'key' => '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' + ), + array( + 'key' => '_neuf_events_promo_period', + 'value' => array( 'Month' , 'semester' ), + 'compare' => 'IN', + ) +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => $meta_query, + 'posts_per_page' => 4 +); + +$top_events = new WP_Query( $args ); + +$meta_query = array( + 'key' => '_neuf_events_starttime', + 'value' => array(date( 'U' , strtotime( '-8 hours' )), date( 'U' , strtotime( '+1 week' ))), + 'type' => 'numeric', + 'compare' => 'BETWEEN' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array($meta_query), + 'posts_per_page' => 150, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + +$news = new WP_Query( 'type=post' ); +?> + + + + Det Norske Studentersamfund - Nyhetsbrev + + + + + + + + +
      + + + + + + have_posts()) : $news->the_post(); ?> + + have_posts() ?> + +
      Det Norske Studentersamfund
      > + +
      + + + +
      +
      + + + have_posts()) : $top_events->the_post(); ?> + + have_posts() ?> + +
      > + +
      + +
      +
      + + + + + + mandag, tirsdag ?> + + + have_posts()) : $events->the_post(); ?> + > + + + + + + + + have_posts() ?> +

      Program denne uken

      mandag

      20.00 + + 60/60KonsertBetongKjøp billett
      + + + + +
      Akademika
      +
      + + diff --git a/wp-content/themes/neuf-old-style/page-foreningene.php b/wp-content/themes/neuf-old-style/page-foreningene.php new file mode 100755 index 0000000..e17a48d --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-foreningene.php @@ -0,0 +1,35 @@ + +
      + + + +

      +
      + + 'association', + 'posts_per_page' => 50, +); + +$associations = new WP_Query( $args ); + +if ( $associations->have_posts() ) : ?> +
      +
      + have_posts() ) : $associations->the_post(); + if ( $associations->current_post%4==0 && $associations->current_post != 0) + echo '
      '; ?> +
      + ID, 'association-thumb' ) : "

      ".$post->post_title."

      "; ?>
      +
      + +
      +
      + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/page-full-width.php b/wp-content/themes/neuf-old-style/page-full-width.php new file mode 100644 index 0000000..6685b70 --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-full-width.php @@ -0,0 +1,20 @@ + + + + +
      + + + + + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/page-live.php b/wp-content/themes/neuf-old-style/page-live.php new file mode 100644 index 0000000..207a3b4 --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-live.php @@ -0,0 +1,53 @@ + +
      + + + +

      + + +
      + + + + +
      +
      + + +
      +
      +
      + diff --git a/wp-content/themes/neuf-old-style/page-neste-arrangement.php b/wp-content/themes/neuf-old-style/page-neste-arrangement.php new file mode 100755 index 0000000..1a4e762 --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-neste-arrangement.php @@ -0,0 +1,174 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-30 minutes' ) ), + 'compare' => '>', + 'type' => 'numeric' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 1, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$args['offset'] = get_query_var( 'page' ) - 1 >= 0 ? get_query_var( 'page' ) - 1 : 0; + +$events = new WP_Query( $args ); + +if ($events->have_posts() ) : while ( $events->have_posts() ) : $events->the_post(); + +$bg = wp_get_attachment_image_src( get_post_thumbnail_id() , 'extra-large' ); +$bg = $bg[0]; + + +$event_array = get_the_terms( $post->ID , 'event_type' ); +foreach ( $event_array as $event_type ) { + $post->event_types[] = $event_type->name; + $post->post_classes[] = 'event-type-' . $event_type->slug; +} +$post->event_types_comma = implode( ', ' , $post->event_types ); + +?> + + + + Snart på Studentersamfundet + + + + + +
      +
      + event_types_comma ); ?> +

      +
      +
      +

      neuf_event_venue = get_post_meta(get_the_ID(), '_neuf_events_venue',true) ); ?>

      +

      neuf_event_venue = get_post_meta(get_the_ID(), '_neuf_events_starttime',true) ) ) ); ?>

      +
      +
      +

      +
      +
      + + + + + + + +Ingen flere arrangementer +

      Ingen flere arrangementer

      Bli aktiv i Studentersamfundet, og lag flere arrangementer.

      blimedlem@studentersamfundet.no

      + + + diff --git a/wp-content/themes/neuf-old-style/page-program.php b/wp-content/themes/neuf-old-style/page-program.php new file mode 100755 index 0000000..c8cbeec --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-program.php @@ -0,0 +1,334 @@ + + + + + +
      + +
      + +
      +
      +

      +
      + + You will hopefully not see this. +
      +
      + + Rutenett +
      +
      + + Liste +
      +
      + +
      + +
      + + +
      + + + + + + + + +
      +
      +

      +
      +
      + + + +
      +
      +
      +
      + +
      +
      +
      + '_neuf_events_starttime', +// 'value' => array( +// date( 'U' , strtotime( '-8 hours' )), // start +// date( 'U' , strtotime( '+1 month' ))), // end +// 'type' => 'numeric', +// 'compare' => 'between' +//); +/* From now and into the future */ +$meta_query = array( + 'key' => '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' )), // start + 'type' => 'numeric', + 'compare' => '>' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array($meta_query), + 'posts_per_page' => 50, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); +?> + +have_posts() ) : + $daycounter = 1; + $current_day = ""; + $current_week = ""; + $first_event = true; + $first_week = true; + $day_gap_size = 0; +?> + +
      + +
      + have_posts() ) : $events->the_post(); + /* set previous day */ + $previous_day = $current_day; + $previous_week = $current_week; + + $date = get_post_meta( $post->ID , '_neuf_events_starttime' , true ); + /* event type class */ + $event_array = get_the_terms( $post->ID , 'event_type' ); + $event_types = array(); + foreach ( $event_array as $event_type ) { + if ($event_type->parent === "0") { + $event_types[] = $event_type->name; + } else { + $id = (int)$event_type->parent; + $parent = get_term( $id, 'event_type' ); + $event_types[] = $parent->name; + } + } + $event_type_class = $event_types ? "class=\"".implode(" ", $event_types)."\"" : ""; + + /* set current day */ + $current_day = date_i18n( 'Y-m-d' , $date); + $newday = $previous_day != $current_day; + /* set current week */ + $current_week = date_i18n( 'W' , $date); + $newweek = $previous_week != $current_week; + + /* set weekday numbers */ + $weekday_number = date_i18n( 'w' , $date); + $is_monday = $weekday_number == 1; + $is_saturday = $weekday_number == 6; + + /* Last and first row needs an alpha or omega class respectively */ + if($is_monday) { + $alpha_or_omega = " alpha"; + } else if($is_saturday) { + $alpha_or_omega = " omega"; + } else { + $alpha_or_omega = ""; + } + /* Set grid gap if a week does not have an event each day */ + if($previous_day != "") { + $day_gap_size = neuf_event_day_gap_size($current_day, $previous_day); + } + if($newweek && !$is_monday) { + $day_gap_size = ($weekday_number - 1) * 2; + $day_gap = " prefix_$day_gap_size alpha"; + } else { + $day_gap = $day_gap_size != 0 && !$newweek ? " prefix_$day_gap_size" : ""; + } + + /* Only the first event */ + if( $first_event ) { ?> +
      +

      ID , '_neuf_events_starttime' , true ) ) ); ?>

      + +

      >ID , '_neuf_events_starttime' , true ) ); ?> >

      + +
      + +
      +
      + + + +
      +

      ID , '_neuf_events_starttime' , true ) ) ); ?>

      + + + +

      >ID , '_neuf_events_starttime' , true ) ); ?> >

      + + +
      +
      + +
      + '_neuf_events_starttime', + 'value' => array(date( 'U' , strtotime( '-8 hours' )), date( 'U' , strtotime( '+1 year' ))), + 'type' => 'numeric', + 'compare' => 'BETWEEN' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array($meta_query), + 'posts_per_page' => 150, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + +if ( $events->have_posts() ) : + $first = true; + $current_month = ""; + $current_day = ""; + $alt = ""; + /* All posts */ + +?> +
      +
      + +
      + + + have_posts() ) : $events->the_post(); + $date = get_post_meta( $post->ID , '_neuf_events_starttime' , true ); + + $previous_month = $current_month; + $current_month = date_i18n( 'F' , $date); + $newmonth = $previous_month != $current_month; + + $datel = date_i18n( 'l j/n' , $date); + ($price = neuf_get_price( $post )) ? : $price = '-'; + $venue = get_post_meta( $post->ID , '_neuf_events_venue' , true ); + $ticket = get_post_meta( $post->ID , '_neuf_events_bs_url' , true ); + $ticket = $ticket ? 'Kjøp billett' : ''; + /* event type class */ + $event_array = get_the_terms( $post->ID , 'event_type' ); + $event_types = array(); + $event_types_real = array(); + foreach ( $event_array as $event_type ) { + if ($event_type->parent === "0") { + $event_types[] = $event_type->name; + } else { + $id = (int)$event_type->parent; + $parent = get_term( $id, 'event_type' ); + $event_types[] = $parent->name; + } + $event_types_real[] = $event_type->name; + } + $event_type_real = $event_types_real ? "".implode(", ", $event_types_real) : ""; + $event_type_class = $event_types ? "class=\"".implode(" ", $event_types)."\"" : ""; + + /* set current day */ + $previous_day = $current_day; + $current_day = date_i18n( 'Y-m-d' , $date); + $newday = $previous_day != $current_day; + + /* everything is everything is not everything if everything is nothing */ + $alt = $alt == " alt" ? "" : " alt"; + + if($newmonth) { ?> + + + + + + + + + + + + + + + + + + + + + + +

      DatoArrangementCCTypeStedBillett
      >
      +
      + +
      + +
      + + + + diff --git a/wp-content/themes/neuf-old-style/page-syndikering-kommende-program.php b/wp-content/themes/neuf-old-style/page-syndikering-kommende-program.php new file mode 100644 index 0000000..d37970b --- /dev/null +++ b/wp-content/themes/neuf-old-style/page-syndikering-kommende-program.php @@ -0,0 +1,60 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' )), // start + 'type' => 'numeric', + 'compare' => '>' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array($meta_query), + 'posts_per_page' => 100, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + +if (0) + print(''); + +print(''); +?> + + + + + Program - Det Norske Studentersamfund + + http://studentersamfundet.no/program/ + + + have_posts() ) : while ( $events->have_posts() ) : $events->the_post(); + ?> + + <?php echo( htmlspecialchars( get_the_title() ) ); ?> + "); ?> + + + "); ?> + ID, '_neuf_events_starttime', true ) ) ); ?> + + + + + + + + diff --git a/wp-content/themes/neuf-old-style/page.php b/wp-content/themes/neuf-old-style/page.php new file mode 100644 index 0000000..953ec88 --- /dev/null +++ b/wp-content/themes/neuf-old-style/page.php @@ -0,0 +1,14 @@ + + +
      + + + + + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/program-3days.php b/wp-content/themes/neuf-old-style/program-3days.php new file mode 100755 index 0000000..65d7157 --- /dev/null +++ b/wp-content/themes/neuf-old-style/program-3days.php @@ -0,0 +1,80 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 25, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + +if ( $events->have_posts() ) : + $event_daycounter = 1; + $newday = true; +?> + +
      + +
      + + have_posts() ) : $events->the_post(); ?> + + ID , '_neuf_events_starttime' , true ) ); + + if ( isset( $event_previous_day ) && $event_previous_day != $event_current_day ) { + // New day + $newday = true; + + // We only want the first three days + if ( $event_daycounter >= 4 ) + break; +?> +
      + +
      "> + + + + + +

      ID , '_neuf_events_starttime' , true ) ) ); ?>

      + + + + + +

      ID , '_neuf_events_starttime' , true ) ); ?>

      + + + have_posts(); ?> + +
      + +
      + +have_posts() ?> diff --git a/wp-content/themes/neuf-old-style/program-6days.php b/wp-content/themes/neuf-old-style/program-6days.php new file mode 100755 index 0000000..1e70b4e --- /dev/null +++ b/wp-content/themes/neuf-old-style/program-6days.php @@ -0,0 +1,79 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 50, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + +if ( $events->have_posts() ) : + $event_daycounter = 1; + $newday = true; +?> + +
      + +
      + + have_posts() ) : $events->the_post(); ?> + + ID , '_neuf_events_starttime' , true ) ); + + if ( isset( $event_previous_day ) && $event_previous_day != $event_current_day ) { + // New day + $newday = true; + if ( $event_daycounter >= 7 ) + break; +?> +
      + +
      "> + + + + + +

      ID , '_neuf_events_starttime' , true ) ) ); ?>

      + + + + + +

      ID , '_neuf_events_starttime' , true ) ); ?>

      + + + have_posts(); ?> + +
      + +
      + +have_posts() ?> diff --git a/wp-content/themes/neuf-old-style/program-feed.php b/wp-content/themes/neuf-old-style/program-feed.php new file mode 100755 index 0000000..f607236 --- /dev/null +++ b/wp-content/themes/neuf-old-style/program-feed.php @@ -0,0 +1,75 @@ + '_neuf_events_starttime', + 'value' => date( 'U' , strtotime( '-8 hours' ) ), + 'compare' => '>', + 'type' => 'numeric' +); + +$args = array( + 'post_type' => 'event', + 'meta_query' => array( $meta_query ), + 'posts_per_page' => 25, + 'orderby' => 'meta_value_num', + 'meta_key' => '_neuf_events_starttime', + 'order' => 'ASC' +); + +$events = new WP_Query( $args ); + + +header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); +$more = 1; + +echo ''; ?> + + +> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + have_posts()) : $events->the_post(); ?> + + <?php the_title_rss() ?> + + + + + + + + + ]]> + + ]]> + post_content ) > 0 ) : ?> + ]]> + + ]]> + + + + + + + + diff --git a/wp-content/themes/neuf-old-style/sass/ie.scss b/wp-content/themes/neuf-old-style/sass/ie.scss new file mode 100644 index 0000000..5cd5b6c --- /dev/null +++ b/wp-content/themes/neuf-old-style/sass/ie.scss @@ -0,0 +1,5 @@ +/* Welcome to Compass. Use this file to write IE specific override styles. + * Import this file using the following HTML or equivalent: + * */ diff --git a/wp-content/themes/neuf-old-style/sass/print.scss b/wp-content/themes/neuf-old-style/sass/print.scss new file mode 100644 index 0000000..b0e9e45 --- /dev/null +++ b/wp-content/themes/neuf-old-style/sass/print.scss @@ -0,0 +1,3 @@ +/* Welcome to Compass. Use this file to define print styles. + * Import this file using the following HTML or equivalent: + * */ diff --git a/wp-content/themes/neuf-old-style/sass/screen.scss b/wp-content/themes/neuf-old-style/sass/screen.scss new file mode 100644 index 0000000..87eb360 --- /dev/null +++ b/wp-content/themes/neuf-old-style/sass/screen.scss @@ -0,0 +1,49 @@ +/* Welcome to Compass. + * In this file you should write your main styles. (or centralize your imports) + * Import this file using the following HTML or equivalent: + * */ + +@import "compass/reset"; +@import "compass/utilities/general/clearfix"; +@import "compass/typography/lists/inline-block-list"; +@import "960/grid"; + +$main-color: #7650b3; + +/*$ninesixty-columns (default: 12) controls the default number of grid columns +$ninesixty-grid-width (default: 960px) controls the default overall grid width +$ninesixty-gutter-width */ +$ninesixty-grid-width: 1200px; +body { + font-size: 16px; + + #container { + @include grid_container; + @include clearfix; + + #branding { + background: $main-color; + height: 200px; + /* TODO you are here... move menu right. */ + + nav#access { + a { + color: #ffffff; + } + ul { + @include inline-block-list; + + li { + margin: 4px; + } + } + } + } + + #content{ + @include grid(12); + @include clearfix; + + } + } +} diff --git a/wp-content/themes/neuf-old-style/search.php b/wp-content/themes/neuf-old-style/search.php new file mode 100755 index 0000000..6232f1c --- /dev/null +++ b/wp-content/themes/neuf-old-style/search.php @@ -0,0 +1,45 @@ + + +
      + + + +
      > +
      + +

      +
      Av | Publisert
      +
      + +
      + + 'attachment' , 'numberposts' => -1 , 'post_status' => null , 'post_parent' => $post->ID ) ); + if ( $attachments ) { + ?> +
      + +
      + ID ); ?> + +
      + +
      + + +
      + + +
      +
      + + + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/sidebar.php b/wp-content/themes/neuf-old-style/sidebar.php new file mode 100755 index 0000000..978f75d --- /dev/null +++ b/wp-content/themes/neuf-old-style/sidebar.php @@ -0,0 +1,120 @@ +
      + +
        + + + + + + +
      • +

        Info

        +
          + date) ) {?> +
        • ">
          Tid:
          date))) ?>
        • + + place) ) { ?> +
        • ">
          Sted:
          place); ?> (Kart)
        • + + regular_price) ) { ?> +
        • ">
          Pris:
          regular_price); ?>,-
        • + + member_price) ) { ?> +
        • ">
          Medlem:
          member_price); ?>,-
        • + + ticket_url) && strcmp($post->ticket_url,"") != 0 && strcmp($post->ticket_url,"http://") != 0 ) { ?> +
        • ">
          Billetter
        • + + + facebook_url) && strcmp($post->facebook_url,"") != 0 ) { ?> +
        • ">
          Facebook
        • + +
        • ">
          Kalender
          Importer til min kalender (vcal-fil)
        • + division) ) { ?> +
        • ">
          Arrangør:
          division); ?>
        • + +
        +
      • + +
      • +
          +
        • + Bli aktiv i
          division); ?>
          +
        • +
        +
      • + + + + + +*/ ?> + + +
      • +

        Arrangementer

        +
          + +
        • + + + + + + + +

          +
        • + +
        +
      • + + + + +

        Nyheter

        +
          + +
        • + + attachments && strcmp($post->attachments[0]['picture'],"") != 0 ) : ?> + + + + + +

          title) ?>

          +
        • + +
        + + */ ?> + + + + + + +
      + + +
      + diff --git a/wp-content/themes/neuf-old-style/single-event.php b/wp-content/themes/neuf-old-style/single-event.php new file mode 100755 index 0000000..5c3e5ac --- /dev/null +++ b/wp-content/themes/neuf-old-style/single-event.php @@ -0,0 +1,14 @@ + + +
      + + + + + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/single.php b/wp-content/themes/neuf-old-style/single.php new file mode 100755 index 0000000..23da695 --- /dev/null +++ b/wp-content/themes/neuf-old-style/single.php @@ -0,0 +1,14 @@ + + +
      + + + + + + + + +
      + + diff --git a/wp-content/themes/neuf-old-style/studentmedia.php b/wp-content/themes/neuf-old-style/studentmedia.php new file mode 100755 index 0000000..957a8c0 --- /dev/null +++ b/wp-content/themes/neuf-old-style/studentmedia.php @@ -0,0 +1,23 @@ +
      + +
      +
      +
      +
      + +
      +
      + +
      +

      Studentersamfundet

      +

      @DNS1813

      +
      +
      +
      +
      +

      Radio Nova

      + Lytt til Radio Nova (FM 99,3) +
      +
      + +
      diff --git a/wp-content/themes/neuf-old-style/style-old.css b/wp-content/themes/neuf-old-style/style-old.css new file mode 100755 index 0000000..aac9dac --- /dev/null +++ b/wp-content/themes/neuf-old-style/style-old.css @@ -0,0 +1,1031 @@ +/** + * Theme Name: Neuf Old Style + * Theme URI: http://studentersamfundet.no/ + * Description: Horisontal outline. + * Author: Just Thomas Misund,Robert Kolner,Nikolai Kristiansen + * Author URI: http://hemmeligadresse.com/ + * Version: 0.2 + */ + +@import 'css/reset.css'; +@import 'css/rebuild.css'; +@import 'css/grid.css'; +@import 'css/wp.css'; + +/** + * Structure + */ + +/* Layout */ +/* A lot of the layout CSS is placed in css/grid.css. Only stuff not concerning the grid should be in this section. If in doubt, don't put stuff here. */ +#access { + display:none; +} + +#content { + background: transparent; + padding:0; + clear:both; + overflow:auto; +} + +.hentry.forsidesak +{ + min-height:250px; +} + +.program #program { + background:#9ac9f7; +} + +.program #program li, +.program #sorting li { + display:block; + overflow:hidden; + padding:10px; +} + +.program #program span, +.program #sorting span { + display:block; + float:left; +} + +/* end layout */ + +/* Header */ +body.dns { + background:#efefef; +} +header#site-header, +footer#site-footer { + background-color:#E99835; + background-color:hsl(33,80%,56%); +} +header#site-header { + height:90px; + padding-top:25px; + padding-bottom:25px; + position:relative; + margin-bottom:50px; +} +header#site-header .site-title { + z-index:999; + width:570px; + height:67px; + margin-top:11px; +} +header#site-header .site-title a { + background: url('img/logo-web.png') no-repeat; + display:block; + width:100%; + height:100%; + margin-top:0px; + text-indent:-9999px; +} +#facebook-followers { + float:right; +} + +#menu { + height:25px; + margin-top:35px; +} +#menu a { + /* color:rgb(88,89,91); */ + color:white; +} + +#menu a.current, +#menu a:hover, +#menu li:hover a { + color:rgba(256,256,256,1); + background:rgb(88,89,91); +} + +#menu > ul { + display:inline-block; + float:right; +} + +#menu ul,#menu li { + list-style-type:none; +} +#menu li { + float:left; + border-right:1px solid rgb(255,255,225); + position:relative; +} +#menu .aapningstider li, +#menu .sub-menu li { + border-right:none; + position: relative; +} +#menu li a { + display:block; + height:22px; + padding:5px 4px 3px; + text-decoration:none; +} + +#menu ul ul { + position:absolute; + display:none; + margin:0; +} +#menu ul li:hover ul, +#menu ul li:focus ul +{ + display:block; + z-index:9; +} +#menu li ul { +} +#menu .aapningstider li ul { + border-right:none; + min-width: 100%; +} + +#menu .aapningstider li ul li { + padding:0 5%; +} + +#menu .aapningstider { + margin:0; +} + +#menu .aapningstider table { + text-align:left; + font-family:Arial,sans-serif; + font-size:12px; + font-weight:normal; + text-transform:none; + color:#fff; +} +#menu .aapningstider td.right { + padding-left: 10px; + text-align: right; +} + +/* +#menu .aapningstider > li { + background:transparent url('img/arrow-down.png') no-repeat center right; + padding-right:15px; +} +*/ + +#menu .aapningstider > li:hover, +#menu li:hover ul { + background:rgb(88,89,91); +} + +#menu .aapningstider > li:hover ul table { + border-top:1px solid white; +} +#menu .aapningstider #bokkafeen_tider a { + padding: 0px; +} + +/* Header slutt */ + +/* Hoveddel */ + +#content > .hentry .entry-content { + margin-top:15px; + margin-bottom:15px; +} + +.single #content > .hentry, +.page #content > .hentry { + margin-top:30px; + margin-bottom:30px; +} + +.single-event .entry-meta { + display:inline-block; + border-bottom:1px solid #ff9e29; + padding-bottom:15px; + width: 100%; +} + +#digest_news, +#digest_events, +#program-3days, +#program-6days, +.program-6days, +#student-media > * +{ + padding-top:15px; + border-top:1px solid #ff9e29; +} + +#digest_news, +#digest_events { + padding-bottom:15px; +} + +#student-media #nova-player { + padding-top: 15px; + height:110px; +} + +#student-media #nova-player h2 { + width:252px; + height:86px; + float:left; +} +#student-media #nova-player h2 a { + width:100%; + height:100%; + background:url('img/logo-rn-x86.png'); + display:block; + overflow:hidden; + text-indent:-99999px; +} +#student-media #nova-player #nova-player-link { + display:block; + float:left; + width:0px; + height:0px; + text-indent:-9999px; + position:relative; + background:#ed1c24; + width:45px; + height:45px; + border-radius:50%; + top:21px; + left:40px; +} +#student-media #nova-player #nova-player-link:before { + content:''; + display:block; + position:absolute; + top:9px; + left:13px; + border-top:13px solid transparent; + border-bottom:13px solid transparent; + border-left:26px solid #673337; +} + +#student-media #twitter_feed { + overflow:hidden; + border-bottom:1px solid #FF9E29; +} + +#student-media #twitter_feed_title img { + display:inline-block; + width:70px; +} + +#student-media #twitter_feed_title a { + display:inline-block; + vertical-align:top; +} + +#student-media #twitter_feed_title_name { + display:inline-block; +} +#student-media #twitter_feed_title_name h3 { + margin-bottom: 0px; +} + +#student-media #twitter_feed_title_name a { + display:block; +} + +/* Hoveddel slutt */ + +/* Footer */ + +#sponsors .sponsor { + text-align: center; + display: table-cell; + height: 120px; + width: 400px; + vertical-align: middle; +} +#sponsors .sponsor img { + max-width: 390px; + max-height: 90px; +} + +#kolofon { + padding-top: 25px; + padding-bottom: 10px; +} +#site-footer { + margin-top: 20px; + padding-top: 25px; + clear: both; + overflow: auto; + color: #000; +} +#site-footer a { + color:#ffffff; +} +#site-footer h2, +#site-footer h2 a, +#site-footer .links { + color:#ffffff; + font-family: Arvo,Georgia,serif; + font-weight: normal; + text-transform: uppercase; + font-style: normal; + font-size: 16px; +} + +#flickr-images > ul { + list-style-type:none; + margin:0; +} +#flickr-images > ul > li { + display:block; + float:left; + width:74px; +} +.fb-like-box { + overflow:hidden; + height:170px; +} + +/* Footer slutt */ + +/** + * Typography + */ +body, input, textarea, +#program-3days a, +#program-6days a, +#digest_events a +{ + color:#333333; +} +#digest_events h2 a { + color:#FF9E29; +} + +body, input, textarea { + font: 14px Arial,sans-serif; + line-height:1.5em; +} + +p, ul, ol, dd, pre { + margin-bottom:1.5em; +} +pre, code { + font:14px Monaco, monospace; + line-height:1.3; +} +a:hover, a:focus { + text-decoration:underline; +} +a:focus { outline:thin dotted; } +a:hover, a:active { outline: none; } + +a.blocklink, a.blocklink:visited, +a.blocklink:focus, a.blocklink:active, +a.blocklink:hover { + color:inherit; + text-decoration:none; +} + +abbr { + border-bottom: 1px dotted; +} + +h1 { + font-style:normal; +} + +h1,h2,h3,h4,h5,h6, +.single-event .entry-meta { + font-family: Arvo, Georgia, serif; + line-height:1.2; +} +h1,h2,h3,h4,h5,h6 { + margin-bottom:0.5em; +} + +a,a:visited, +h1,h2,h3,h4,h5,h6 +{ + color: #ff9e29; + text-decoration:none; +} +h1 { + font-size: 35px; + font-weight:bold; + font-style:normal; +} +h2, +#featured article h1, +.single-event h1, +.single-event .entry-meta +{ + font-size:20px; + letter-spacing:2px; + font-style:italic; + font-weight:normal; +} +h3 { + font-size:23px; +} +h4 { + font-size:16px; +} +h5 { + font-size:16px; +} +h6 { + font-size:16px; +} +/* Single posts */ +.single-post h1.entry-title { + margin-bottom:0; +} +.single-post .byline { + color: #aaaaaa; +} +.single-post .byline .author { + color: #333; + font-weight: bold; +} + +/* Menus */ +#menu { + font-family:Arvo,Georgia,serif; + font-weight:bold; + font-size:18px; + text-transform:uppercase; +} + +/* Lists */ +.entry-content ul, +.entry-content ol { + padding:0; +} +.entry-content ul ul, +.entry-content ol ol, +.entry-content ul ol, +.entry-content ol ul { + padding-left:20px; +} +.entry-content ul { + list-style: circle inside; +} +.entry-content ul ul { + list-style: disc inside; +} +.entry-content ul ul ul { + list-style: square inside; +} +.entry-content ul ul ul ul { + list-style: circle inside; +} +.entry-content ul ul ul ul ul { + list-style: disc inside; +} +.entry-content ul ul ul ul ul ul { + list-style: square inside; +} +.entry-content ol { + list-style: decimal inside; +} +.entry-content ol ol { + list-style: upper-roman inside; +} +.entry-content ol ol ol { + list-style: lower-roman inside; +} +.entry-content ol ol ol ol { + list-style: decimal inside; +} +.entry-content ol ol ol ol ol { + list-style: upper-roman inside; +} +.entry-content ol ol ol ol ol ol { + list-style: lower-roman inside; +} +.big_bullet { + display:inline-block; + width: 16px; + height: 16px; + background-color: #ff9e29; + border-radius:8px; + vertical-align:middle; +} + +/* Quotes */ +.entry-content blockquote { + font-style:italic; + background:#eeeeee; + margin:1em 2em; + padding:1.5em 1.5em 0; + overflow:hidden; +} +.entry-content blockquote blockquote { + border:1px solid #000000; +} +.entry-content cite { + font-style:italic; +} + +/* table */ +.table { + width:100%; + border-collapse:collapse; + border-spacing: 0; + margin-bottom: 20px; +} +.table th { + text-align: left; +} +.table tr:nth-child(even) td, +.table tr.alt td { + background-color: #F9F9F9; +} +.table tr.month td { + background-color: #FFF; +} +.table th, .table td { + padding-left:0px; + padding-right:0px; + padding-top: 8px; + padding-bottom: 8px; + line-height: 18px; + text-align: left; + border-top: 1px solid #DDD; +} + +/* Forms */ +label { + cursor:pointer; +} + +/* Images */ +img { + max-width:100%; + height:auto; +} +.entry-content img { + margin: 0 0 10px; +} +.entry-content img.alignright { + margin: 0 0 10px 10px; +} +.entry-content img.alignleft { + margin: 0 10px 10px 0; +} + +.single-event .entry-title { + margin-bottom:0; + font-size: 35px; + margin-bottom:45px; + font-weight: bold; + font-style: normal; +} + +/* Buttons */ +.btn { + font-family: Arial, sans-serif; + color: #666; + font-weight: bold; + font-size: 20px; + padding: 8px 15px; + border: none; + background: #e6e6e6 url('img/gradient.png') repeat-x bottom left; + margin: 30px 5px 20px 0; + text-shadow: 0 1px 0 rgba(255, 255, 255, 1); + border: 1px solid #bfbfbf; + display: inline-block; + text-decoration: none; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.5) inset; + text-align: center; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; +} + +a.btn :visited, +a.btn { + color: #666666; +} + +.btn:hover { + background-color: #FF9E29; +} + +.btn:hover { + color: #ffffff; + text-decoration: none; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); + border-color: #cc7f21; + border-bottom-color: #a6671b; +} + +/* Icons */ + +#digest_news_headline:before, +#digest_events_headline:before, +.single-event .entry-meta .entry-meta-info:before { + content:''; + background:#ff9e29; + border-radius:50%; + width:50px; + height:50px; + float: left; + position:relative; + top:10px; + margin-right:15px; +} + +#digest_news_headline:before, +#digest_events_headline:before { + width:35px; + height:35px; + top:-7px; + margin-right:10px; +} +#digest_news_headline, +#digest_events_headline { + margin:0.3em 0 0.6em; +} + +#digest_news_headline:before { + background:url('img/ikon_nyheter-35x35.png'); +} + +#digest_events #digest_events_headline:before { + background:url('img/ikon_tiles-35x35.png'); +} + +/*.single-event .entry-meta h1:before,*/ +#featured article.type-event h1:before, +#featured article.type-post h1:before { + content:''; + background:#ff9e29; + border-radius:50%; + width:50px; + height:50px; + display:inline-block; + position:relative; + top: 10px; + margin-right:15px; +} + +#content .event-type-quiz .entry-meta-info:before, +#content article.event-type-quiz h1:before { + background:url('img/ikon_quiz-50x50.png'); +} + +#content .event-type-debatt .entry-meta-info:before, +#content .event-type-onsdagsdebatten .entry-meta-info:before, +#content .event-type-mote .entry-meta-info:before, +#content article.event-type-mote h1:before, +#content article.event-type-debatt h1:before, +#content article.event-type-onsdagsdebatten h1:before { + background:url('img/ikon_debatt-50x50.png'); +} + +#content .event-type-foredrag .entry-meta-info:before, +#content .event-type-upop .entry-meta-info:before, +#content .event-type-akademisk-vorspiel .entry-meta-info:before, +#content article.event-type-foredrag h1:before, +#content article.event-type-upop h1:before, +#content article.event-type-akademisk-vorspiel h1:before { + background:url('img/ikon_foredrag-50x50.png'); +} + +#content .event-type-konsert .entry-meta-info:before, +#content .event-type-pungrock .entry-meta-info:before, +#content .event-type-south-of-heaven .entry-meta-info:before, +#content .event-type-smalt-som-faen .entry-meta-info:before, +#content .event-type-lillesalen-konsertserie .entry-meta-info:before, +#content article.event-type-konsert h1:before, +#content article.event-type-pungrock h1:before, +#content article.event-type-south-of-heaven h1:before, +#content article.event-type-smalt-som-faen h1:before, +#content article.event-type-lillesalen-konsertserie h1:before { + background:url('img/ikon_konsert-50x50.png'); +} + +#content .event-type-film .entry-meta-info:before, +#content .event-type-filmrulltorsdag .entry-meta-info:before, +#content .event-type-tidsbilde .entry-meta-info:before, +#content article.event-type-tidsbilde h1:before, +#content article.event-type-film h1:before, +#content article.event-type-filmrulltorsdag h1:before { + background:url('img/ikon_film-50x50.png'); +} + +#content .event-type-fest .entry-meta-info:before, +#content article.event-type-fest h1:before { + background:url('img/ikon_fest-50x50.png'); +} + +#content article.type-post h1:before { + background:url('img/ikon_nyheter-50x50.png'); +} + + + + +/* End icons */ + +/********** + * Social * + **********/ +#social-sharing .share-facebook, +#social-sharing .share-twitter +{ + display: inline-block; +} + +#social-sharing .share-facebook { + position: relative; + bottom: 3px; +} +#facebook-followers { + float:right; + +} +#facebook-followers iframe { + height:260px !important; +} + + +/*********************************** + * Styles for individual templates * + ***********************************/ +#featured { + position:relative; +} + +.single-event .event-type, +#featured article .event-type { + font-family:Arvo,Georgia,serif; + font-size: 20px; + font-style: italic; + font-weight: normal; + padding-left: 0px; + padding-bottom: 0px; +} + +.home #featured article.type-event .type { + font-family:Arvo,Georgia,serif; + font-size: 20px; + font-style: italic; + font-weight: normal; + padding-left: 67px; + margin-bottom: -20px; +} + +#featured article h1 { + font-family:Arvo,Georgia,serif; + font-size:35px; + letter-spacing:2px; + font-style:normal; + font-weight:normal; + margin-bottom:0; + padding-left:63px; + padding-bottom:35px; + text-indent:-63px; +} + +#featured article .datetime, +#featured article .price, +#featured article .venue { + position:absolute; + display:none; + bottom: 20px; + left: 0px; + right:0px; +} +#featured article .price { + text-align: left; +} +#featured article .datetime { + text-align: center; +} + +#featured article .venue { + text-align: right; +} + +#featured article:hover .datetime, +#featured article:hover .price, +#featured article:hover .venue { + display:block; +} +#featured #prevLink { + position:absolute; + top: 324px; + left: 500px; +} +#featured #nextLink { + position:absolute; + top: 324px; + left: 555px; +} +#featured:hover #prevLink, +#featured:hover #nextLink { + display:block; +} + +#featured article a.blocklink { + width:100%; + height:100%; + display:block; +} + +#featured article header { + height:322px; +} +#featured { + height:322px; + margin-top:30px; + margin-bottom:30px; +} + +/* Fixes weird js bug on 1024x screens. */ +#featured #slider, +#featured #slider article { + width:1200px !important; +} + +#featured #slidernav { + position:absolute; + top:322px; + left:15px; +} +#featured #slidernav a span.circle { + content:''; + background:#ff9e29; + border-radius:50%; + width:15px; + height:15px; + display:inline-block; + +} +#featured #slidernav a { + content:''; + width:15px; + height:15px; + display:inline-block; + padding:4px; + z-index:10; + +} +#featured #slidernav a.activeSlide span.circle { + background: #BCBEC0; +} +#featured #slidernav a:focus { + outline: none; +} + + +.home #digest_news article { + height: 130px; +} +.home #digest_news .post > a > img { + float:left; + margin:2px 10px 0 0; + width:93px; + height:auto; +} +.home #digest_news .post a.permalink:before { + content: ''; + background: #FF9E29; + border-radius: 50%; + width: 12px; + height: 12px; + display: inline-block; + margin-right:7px; +} +.home #digest_news .when { + font-size:0.9em; + color:#aaa; +} + +/* Search template */ + +.search #content > .hentry .entry-title { + font-size: 24px; + margin-bottom: 0px; +} + +.search #content > .hentry .entry-byline { + padding-left: 20px; + font-size: 12px; + font-style: italic; +} + +/* End search template */ + +/* Program template */ + +/* Icons */ +.page-program .view-mode:hover { + cursor:pointer; + opacity:0.8; + filter:alpha(opacity=80); /* For IE8 and earlier */ +} +.page-program .view-mode.marked { + opacity:1; + filter:alpha(opacity=100); /* For IE8 and earlier */ +} +.page-program .view-mode { + opacity:0.4; + filter:alpha(opacity=40); /* For IE8 and earlier */ +} +.page-program .view-mode.list { + margin-left: 5px; +} + +.page-program .category-chooser-item, .program-style-selector-item { + display:inline-block; + margin:10px; +} + +.page-program .category-chooser-item > label > span, +.page-program .program-style-selector-item > span { + display:block; + margin:auto; + text-align:center; + font-size: 12px; + color: #666; +} + +.page-program .category-chooser-item > label > img, +.page-program .program-style-selector-item > img { + display:block; + margin:auto; +} + +.page-program .category-chooser-item label > img { + opacity:0.4; + filter:alpha(opacity=40); /* For IE8 and earlier */ +} + +.page-program .category-chooser-item label > img:hover { + opacity:0.6; + filter:alpha(opacity=60); /* For IE8 and earlier */ +} + +.page-program .category-chooser-item label > img.checked { + opacity:1.0; + filter:alpha(opacity=100); /* For IE8 and earlier */ +} + +.page-program .category-chooser-item label > img.checked:hover { + opacity:0.8; + filter:alpha(opacity=80); /* For IE8 and earlier */ +} + +/* table */ +.page-program .table .date { + width:100px; +} +.page-program .table tr.month td { + background-color: #FFF; +} +.page-program .table tr.month, +.page-program .table tr.month td { + border: none; +} + +.page-program .table tr.month td { + padding-top:25px; +} + +/* End program template */ + +/* Archive templates */ + +.archive #content article { + padding-bottom:25px; + border-bottom:1px solid #E99835; + margin-bottom:25px; +} + +/* Foreningene/Associations */ + +.page-foreningene .association { + display: table-cell; + height: 200px; + width: 300px; /* grid_3 width + 15*2px margin */ + margin: 0 15px; + text-align: center; + vertical-align: middle; + +} +.page-foreningene .association-row { + display: table-row; + margin-bottom: 15px; +} + diff --git a/wp-content/themes/neuf-old-style/style.css b/wp-content/themes/neuf-old-style/style.css new file mode 100644 index 0000000..c2da447 --- /dev/null +++ b/wp-content/themes/neuf-old-style/style.css @@ -0,0 +1,13 @@ +/* +Theme Name: Teater Neuf 2012 +Theme URI: http://wordpress.org/extend/themes/twentyeleven +Author: Nikolai Kristiansen +Author URI: http://edb.neuf.no/ +Description: Teater Neuf 2012 +Version: 0.1 +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Text Domain: teaterneuf +*/ + +@import "stylesheets/screen.css"; diff --git a/wp-content/themes/neuf-old-style/stylesheets/ie.css b/wp-content/themes/neuf-old-style/stylesheets/ie.css new file mode 100644 index 0000000..5cd5b6c --- /dev/null +++ b/wp-content/themes/neuf-old-style/stylesheets/ie.css @@ -0,0 +1,5 @@ +/* Welcome to Compass. Use this file to write IE specific override styles. + * Import this file using the following HTML or equivalent: + * */ diff --git a/wp-content/themes/neuf-old-style/stylesheets/print.css b/wp-content/themes/neuf-old-style/stylesheets/print.css new file mode 100644 index 0000000..b0e9e45 --- /dev/null +++ b/wp-content/themes/neuf-old-style/stylesheets/print.css @@ -0,0 +1,3 @@ +/* Welcome to Compass. Use this file to define print styles. + * Import this file using the following HTML or equivalent: + * */ diff --git a/wp-content/themes/neuf-old-style/stylesheets/screen.css b/wp-content/themes/neuf-old-style/stylesheets/screen.css new file mode 100644 index 0000000..fac40b2 --- /dev/null +++ b/wp-content/themes/neuf-old-style/stylesheets/screen.css @@ -0,0 +1,114 @@ +/* Welcome to Compass. + * In this file you should write your main styles. (or centralize your imports) + * Import this file using the following HTML or equivalent: + * */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +body { + line-height: 1; +} + +ol, ul { + list-style: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +caption, th, td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} + +q, blockquote { + quotes: none; +} +q:before, q:after, blockquote:before, blockquote:after { + content: ""; + content: none; +} + +a img { + border: none; +} + +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { + display: block; +} + +/*$ninesixty-columns (default: 12) controls the default number of grid columns +$ninesixty-grid-width (default: 960px) controls the default overall grid width +$ninesixty-gutter-width */ +body { + font-size: 16px; +} +body #container { + margin-left: auto; + margin-right: auto; + width: 1200px; + overflow: hidden; + *zoom: 1; +} +body #container #branding { + background: #7650b3; + height: 200px; + /* TODO you are here... move menu right. */ +} +body #container #branding nav#access a { + color: #ffffff; +} +body #container #branding nav#access ul { + margin: 0; + padding: 0; + border: 0; + overflow: hidden; + *zoom: 1; +} +body #container #branding nav#access ul li { + list-style-image: none; + list-style-type: none; + margin-left: 0; + display: -moz-inline-box; + -moz-box-orient: vertical; + display: inline-block; + vertical-align: middle; + *vertical-align: auto; + white-space: nowrap; +} +body #container #branding nav#access ul li { + *display: inline; +} +body #container #branding nav#access ul li { + margin: 4px; +} +body #container #content { + display: inline; + float: left; + margin-left: 10px; + margin-right: 10px; + width: 1180px; + overflow: hidden; + *zoom: 1; +}