Compare commits

...

No commits in common. "developer" and "master" have entirely different histories.

105 changed files with 119 additions and 5405 deletions

790
LICENSE
View File

@ -1,674 +1,116 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
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.
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.
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
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.
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# leoncorre_wordpress_theme
Leon Corre Theme

View File

@ -1,69 +0,0 @@
=== Twenty Seventeen Child ===
Contributors: dandelionweb
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JEMTB4U8SYFL6
Requires at least: WordPress 4.7
Tested up to: WordPress 4.7.2
Version: 0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: child theme
== Description ==
A blank child theme for Twenty Seventeen.
For more information about Twenty Seventeen please go to https://codex.wordpress.org/Twenty_Seventeen.
== Installation ==
1. Download the zip file from https://github.com/ruthmaude/twentyseventeen-child.
2. In your admin panel, go to Appearance -> Themes -> Add New -> Upload Theme -> Choose File.
3. Browse your computer for the twentyseventeen-child.zip file downloaded in step 1 above.
4. click Open -> Install Now -> Activate.
5. Go to https://codex.wordpress.org/Twenty_Seventeen for a guide on how to customize this theme.
6. Navigate to Appearance > Customize in your admin panel and customize to taste.
== Copyright ==
Twenty Seventeen WordPress Theme, Copyright 2016 WordPress.org
Twenty Seventeen is distributed under the terms of the GNU GPL
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.
Twenty Seventeen bundles the following third-party resources:
HTML5 Shiv, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv
jQuery scrollTo, Copyright 2007-2015 Ariel Flesler
License: MIT
Source: https://github.com/flesler/jquery.scrollTo
normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal
License: MIT
Source: https://necolas.github.io/normalize.css/
Font Awesome icons, Copyright Dave Gandy
License: SIL Open Font License, version 1.1.
Source: http://fontawesome.io/
Bundled header image, Copyright Alvin Engler
License: CC0 1.0 Universal (CC0 1.0)
Source: https://unsplash.com/@englr?photo=bIhpiQA009k
== Changelog ==
= 1.0 =
* Released: February 11, 2017
Initial release

View File

@ -1,47 +0,0 @@
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/
?>
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="wrap" style="display:none;">
<?php
get_template_part( 'template-parts/footer/footer', 'widgets' );
if ( has_nav_menu( 'social' ) ) : ?>
<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'social',
'menu_class' => 'social-links-menu',
'depth' => 1,
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>' . twentyseventeen_get_svg( array( 'icon' => 'chain' ) ),
) );
?>
</nav><!-- .social-navigation -->
<?php endif;
get_template_part( 'template-parts/footer/site', 'info' );
?>
</div><!-- .wrap -->
</footer><!-- #colophon -->
</div><!-- .site-content-contain -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>

View File

@ -1,15 +0,0 @@
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
/*
* * A simple function to control the number of Twenty Seventeen Theme Front Page Sections
* * Source: wpcolt.com
* */
function wpc_custom_front_sections( $num_sections ) {
return 5; //Change this number to change the number of the sections.
}
add_filter( 'twentyseventeen_front_page_sections', 'wpc_custom_front_sections' );

View File

@ -1,60 +0,0 @@
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
<script src="https://use.fontawesome.com/3db894370e.js"></script>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<?php if ( has_nav_menu( 'top' ) ) : ?>
<div class="navigation-top">
<div class="wrap">
<?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
</div><!-- .wrap -->
</div><!-- .navigation-top -->
<?php endif; ?>
<?php get_template_part( 'template-parts/header/header', 'image' ); ?>
</header><!-- #masthead -->
<?php
/*
* If a regular post or page, and not the front page, show the featured image.
* Using get_queried_object_id() here since the $post global may not be set before a call to the_post().
*/
if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
echo '<div class="single-featured-image-header">';
echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );
echo '</div><!-- .single-featured-image-header -->';
endif;
?>
<span id="inicio"></span>
<div class="site-content-contain">
<div id="content" class="site-content">

View File

@ -1,160 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to BuddyPress - 2012-02-14 */
global $bp, $EM_Notices;
$url = $bp->events->link . 'my-events/'; //url to this page
$order = ( !empty($_REQUEST ['order']) ) ? $_REQUEST ['order']:'ASC';
$limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit
$page = ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:1;
$offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
$EM_Events = EM_Events::get( array('group'=>'this','scope'=>'future', 'limit' => 0, 'order' => $order) );
$events_count = count ( $EM_Events );
$future_count = EM_Events::count( array('status'=>1, 'owner' =>get_current_user_id(), 'scope' => 'future'));
$pending_count = EM_Events::count( array('status'=>0, 'owner' =>get_current_user_id(), 'scope' => 'all') );
$use_events_end = get_option('dbem_use_event_end');
echo $EM_Notices;
?>
<div class="tablenav">
<?php
if ( $events_count >= $limit ) {
$events_nav = em_admin_paginate( $events_count, $limit, $page);
echo $events_nav;
}
?>
<br class="clear" />
</div>
<?php
if (empty ( $EM_Events )) {
// TODO localize
echo "<p>". __( 'No Events','events-manager') ."</p>";
} else {
foreach( $EM_Events as $EM_Event ){ break; }
$can_edit_events = $EM_Event->can_manage('edit_events','edit_others_events');
?>
<table class="widefat events-table">
<thead>
<tr>
<?php /*
<th class='manage-column column-cb check-column' scope='col'>
<input class='select-all' type="checkbox" value='1' />
</th>
*/ ?>
<th><?php _e ( 'Name', 'events-manager'); ?></th>
<th><?php _e ( 'Location', 'events-manager'); ?></th>
<th><?php _e ( 'Date and time', 'events-manager'); ?></th>
</tr>
</thead>
<tbody>
<?php
$rowno = 0;
$event_count = 0;
foreach ( $EM_Events as $EM_Event ) {
/* @var $event EM_Event */
$can_edit_events = $EM_Event->can_manage('edit_events','edit_others_events');
if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) {
$rowno++;
$class = ($rowno % 2) ? 'alternate' : '';
// FIXME set to american
$localised_start_date = date_i18n(get_option('dbem_date_format'), $EM_Event->start);
$localised_end_date = date_i18n(get_option('dbem_date_format'), $EM_Event->end);
$style = "";
$today = date ( "Y-m-d" );
$location_summary = "<b>" . $EM_Event->get_location()->name . "</b><br/>" . $EM_Event->get_location()->address . " - " . $EM_Event->get_location()->town;
if ($EM_Event->start_date < $today && $EM_Event->end_date < $today){
$class .= " past";
}
//Check pending approval events
if ( !$EM_Event->status ){
$class .= " pending";
}
?>
<tr class="event <?php echo trim($class); ?>" <?php echo $style; ?> id="event_<?php echo $EM_Event->event_id ?>">
<?php /*
<td>
<input type='checkbox' class='row-selector' value='<?php echo $event->event_id; ?>' name='events[]' />
</td>
*/ ?>
<td>
<strong>
<?php
if( $can_edit_events ){
echo $EM_Event->output('<a href="#_EDITEVENTURL">#_NAME</a>');
}else{
echo $EM_Event->output('#_EVENTLINK');
}
?>
</strong>
<?php
if( $EM_Event->can_manage('manage_bookings','manage_others_bookings') && get_option('dbem_rsvp_enabled') == 1 && $EM_Event->rsvp == 1 ){
?>
<br/>
<a href="<?php echo $url ?>bookings/?event_id=<?php echo $EM_Event->event_id ?>"><?php echo __("Bookings",'events-manager'); ?></a> &ndash;
<?php _e("Booked",'events-manager'); ?>: <?php echo $EM_Event->get_bookings()->get_booked_spaces()."/".$EM_Event->get_spaces(); ?>
<?php if( get_option('dbem_bookings_approval') == 1 ): ?>
| <?php _e("Pending",'events-manager') ?>: <?php echo $EM_Event->get_bookings()->get_pending_spaces(); ?>
<?php endif;
}
?>
<div class="row-actions">
<?php if( $EM_Event->can_manage('delete_events', 'delete_others_events')) : $can_delete_events = true; ?>
<span class="trash"><a href="<?php echo $url ?>?action=event_delete&amp;event_id=<?php echo $EM_Event->event_id . '&amp;_wpnonce=' . wp_create_nonce('event_delete_'.$EM_Event->event_id); ?>" class="em-event-delete"><?php _e('Delete','events-manager'); ?></a></span>
<?php endif; ?>
<?php if( $can_edit_events ): ?>
<?php if( $can_delete_events ) echo " | "; ?>
<a href="<?php echo $url ?>edit/?action=event_duplicate&amp;event_id=<?php echo $EM_Event->event_id . '&amp;_wpnonce=' . wp_create_nonce('event_duplicate_'.$EM_Event->event_id); ?>" title="<?php echo esc_attr ( sprintf(__('Duplicate %s','events-manager'), __('Event','events-manager')) ); ?>">
<?php esc_html_e('Duplicate','events-manager'); ?>
</a>
<?php endif; ?>
</div>
</td>
<td>
<?php echo $location_summary; ?>
</td>
<td>
<?php echo $localised_start_date; ?>
<?php echo ($localised_end_date != $localised_start_date) ? " - $localised_end_date":'' ?>
<br />
<?php
//TODO Should 00:00 - 00:00 be treated as an all day event?
echo substr ( $EM_Event->start_time, 0, 5 ) . " - " . substr ( $EM_Event->end_time, 0, 5 );
?>
<br />
<?php
if ( $EM_Event->is_recurrence() && $EM_Event->can_manage('edit_events','edit_others_events') ) {
$recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager');
?>
<strong>
<?php echo $EM_Event->get_recurrence_description(); ?> <br />
<a href="<?php echo $url ?>edit/?event_id=<?php echo $EM_Event->recurrence_id ?>"><?php _e ( 'Edit Recurring Events', 'events-manager'); ?></a>
</strong>
<?php
}else{ echo "&nbsp;"; }
?>
</td>
</tr>
<?php
}
$event_count++;
}
?>
</tbody>
</table>
<?php
} // end of table
?>
<div class='tablenav'>
<div class="alignleft actions">
<br class='clear' />
</div>
<?php if ( $events_count >= $limit ) : ?>
<div class="tablenav-pages">
<?php
echo $events_nav;
?>
</div>
<?php endif; ?>
<br class='clear' />
</div>

View File

@ -1,4 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to BuddyPress - 2012-02-14 */
em_bookings_admin();
?>

View File

@ -1,2 +0,0 @@
<?php
em_events_admin();

View File

@ -1,162 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to BuddyPress - 2012-02-14 */
global $bp, $EM_Notices;
echo $EM_Notices;
$url = $bp->events->link . 'my-events/'; //url to this page
$order = ( !empty($_REQUEST ['order']) ) ? $_REQUEST ['order']:'ASC';
$limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit
$page = ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:1;
$offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
$EM_Events = EM_Events::get( array('group'=>'my','scope'=>'future', 'limit' => 0, 'order' => $order) );
$events_count = count ( $EM_Events );
$future_count = EM_Events::count( array('status'=>1, 'owner' =>get_current_user_id(), 'scope' => 'future'));
$pending_count = EM_Events::count( array('status'=>0, 'owner' =>get_current_user_id(), 'scope' => 'all') );
$use_events_end = get_option('dbem_use_event_end');
echo $EM_Notices;
?>
<div class="tablenav">
<?php
if ( $events_count >= $limit ) {
$events_nav = em_admin_paginate( $events_count, $limit, $page);
echo $events_nav;
}
?>
<br class="clear" />
</div>
<?php
if (empty ( $EM_Events )) {
// TODO localize
echo "<p>". __( 'No Events','events-manager') ."</p>";
} else {
?>
<table class="widefat events-table">
<thead>
<tr>
<?php /*
<th class='manage-column column-cb check-column' scope='col'>
<input class='select-all' type="checkbox" value='1' />
</th>
*/ ?>
<th><?php _e ( 'Name', 'events-manager'); ?></th>
<th>&nbsp;</th>
<th><?php _e ( 'Location', 'events-manager'); ?></th>
<th colspan="2"><?php _e ( 'Date and time', 'events-manager'); ?></th>
</tr>
</thead>
<tbody>
<?php
$rowno = 0;
$event_count = 0;
foreach ( $EM_Events as $event ) {
/* @var $event EM_Event */
if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) {
$rowno++;
$class = ($rowno % 2) ? 'alternate' : '';
// FIXME set to american
$localised_start_date = date_i18n(get_option('dbem_date_format'), $event->start);
$localised_end_date = date_i18n(get_option('dbem_date_format'), $event->end);
$style = "";
$today = current_time('timestamp');
$location_summary = "<b>" . $event->get_location()->name . "</b><br/>" . $event->get_location()->address . " - " . $event->get_location()->town;
if ($event->start < $today && $event->end < $today){
$class .= " past";
}
//Check pending approval events
if ( !$event->status ){
$class .= " pending";
}
?>
<tr class="event <?php echo trim($class); ?>" <?php echo $style; ?> id="event_<?php echo $event->event_id ?>">
<?php /*
<td>
<input type='checkbox' class='row-selector' value='<?php echo $event->event_id; ?>' name='events[]' />
</td>
*/ ?>
<td>
<strong>
<a class="row-title" href="<?php echo $event->get_edit_url(); ?>"><?php echo ($event->event_name); ?></a>
</strong>
<?php
if( $event->can_manage('manage_bookings','manage_others_bookings') && get_option('dbem_rsvp_enabled') == 1 && $event->event_rsvp == 1 ){
?>
<br/>
<a href="<?php echo esc_url($event->get_bookings_url()); ?>"><?php echo __("Bookings",'events-manager'); ?></a> &ndash;
<?php _e("Booked",'events-manager'); ?>: <?php echo $event->get_bookings()->get_booked_spaces()."/".$event->get_spaces(); ?>
<?php if( get_option('dbem_bookings_approval') == 1 ): ?>
| <?php _e("Pending",'events-manager') ?>: <?php echo $event->get_bookings()->get_pending_spaces(); ?>
<?php endif;
}
?>
<div class="row-actions">
<?php if( current_user_can('delete_events')) : ?>
<span class="trash"><a href="<?php echo $url ?>?action=event_delete&amp;event_id=<?php echo $event->event_id ?>" class="em-event-delete"><?php _e('Delete','events-manager'); ?></a></span>
<?php endif; ?>
</div>
</td>
<td>
<a href="<?php echo $url ?>edit/?action=event_duplicate&amp;event_id=<?php echo $event->event_id ?>" title="<?php _e ( 'Duplicate this event', 'events-manager'); ?>">
<strong>+</strong>
</a>
</td>
<td>
<?php echo $location_summary; ?>
<?php if( is_object($category) && !empty($category->name) ) : ?>
<br/><span class="category"><strong><?php _e( 'Category', 'events-manager'); ?>: </strong><?php echo $category->name ?></span>
<?php endif; ?>
</td>
<td>
<?php echo $localised_start_date; ?>
<?php echo ($localised_end_date != $localised_start_date) ? " - $localised_end_date":'' ?>
<br />
<?php
if(!$event->event_all_day){
echo date_i18n(get_option('time_format'), $event->start) . " - " . date_i18n(get_option('time_format'), $event->end);
}else{
echo get_option('dbem_event_all_day_message');
}
?>
</td>
<td>
<?php
if ( $event->is_recurrence() && $event->can_manage('edit_events','edit_others_events') ) {
$recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager');
?>
<strong>
<?php echo $event->get_recurrence_description(); ?> <br />
<a href="<?php echo $url ?>edit/?event_id=<?php echo $event->recurrence_id ?>"><?php _e ( 'Edit Recurring Events', 'events-manager'); ?></a>
<?php if( current_user_can('delete_events')) : ?>
<span class="trash"><a href="<?php echo $url ?>?action=event_delete&amp;event_id=<?php echo $event->event_id ?>" class="em-event-rec-delete" onclick ="if( !confirm('<?php echo $recurrence_delete_confirm; ?>') ){ return false; }"><?php _e('Delete','events-manager'); ?></a></span>
<?php endif; ?>
</strong>
<?php
}else{ echo "&nbsp;"; }
?>
</td>
</tr>
<?php
}
$event_count++;
}
?>
</tbody>
</table>
<?php
} // end of table
?>
<div class='tablenav'>
<div class="alignleft actions">
<br class='clear' />
</div>
<?php if ( $events_count >= $limit ) : ?>
<div class="tablenav-pages">
<?php
echo $events_nav;
?>
</div>
<?php endif; ?>
<br class='clear' />
</div>

View File

@ -1,2 +0,0 @@
<?php
em_locations_admin();

View File

@ -1,46 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to BuddyPress - 2012-02-14 */
global $bp, $EM_Notices;
echo $EM_Notices;
if( user_can($bp->displayed_user->id,'edit_events') ){
?>
<h4><?php _e('My Events', 'events-manager'); ?></h4>
<?php
$args = array(
'owner'=>$bp->displayed_user->id,
'format_header' => get_option('dbem_bp_events_list_format_header'),
'format' => get_option('dbem_bp_events_list_format'),
'format_footer' => get_option('dbem_bp_events_list_format_footer'),
'owner' => $bp->displayed_user->id,
'pagination'=>1
);
$args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
if( EM_Events::count($args) > 0 ){
echo EM_Events::output($args);
}else{
?>
<p><?php _e('No Events', 'events-manager'); ?>.
<?php if( get_current_user_id() == $bp->displayed_user->id ): ?>
<a href="<?php echo $bp->events->link . 'my-events/edit/'; ?>"><?php _e('Add Event','events-manager'); ?></a>
<?php endif; ?>
</p>
<?php
}
}
?>
<h4><?php _e("Events I'm Attending", 'events-manager'); ?></h4>
<?php
$EM_Person = new EM_Person( $bp->displayed_user->id );
$EM_Bookings = $EM_Person->get_bookings( false, apply_filters('em_bp_attending_status',1) );
if(count($EM_Bookings->bookings) > 0){
//Get events here in one query to speed things up
$event_ids = array();
foreach($EM_Bookings as $EM_Booking){
$event_ids[] = $EM_Booking->event_id;
}
echo EM_Events::output(array('event'=>$event_ids));
}else{
?>
<p><?php _e('Not attending any events yet.','events-manager'); ?></p>
<?php
}

View File

@ -1,10 +0,0 @@
This folder contains email templates or parts of email templates that would be used in emails.
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/buddypress/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,69 +0,0 @@
<?php
/*
* This displays the content of the #_BOOKINGSUMMARY placeholder
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manage/placeholders/ and modifying it however you need.
* For more information, see http://wp-events-plugin.com/documentation/using-template-files/
*/
/* @var $EM_Booking EM_Booking */ ?>
<?php foreach($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking): /* @var $EM_Ticket_Booking EM_Ticket_Booking */ ?>
<?php echo $EM_Ticket_Booking->get_ticket()->ticket_name; ?>
--------------------------------------
<?php _e('Quantity','events-manager'); ?>: <?php echo $EM_Ticket_Booking->get_spaces(); ?>
<?php _e('Price','events-manager'); ?>: <?php echo $EM_Ticket_Booking->get_price(true); ?>
<?php endforeach; ?>
=======================================
<?php
$price_summary = $EM_Booking->get_price_summary_array();
//we should now have an array of information including base price, taxes and post/pre tax discounts
?>
<?php _e('Sub Total','events-manager'); ?> : <?php echo $EM_Booking->get_price_base(true); ?>
<?php if( count($price_summary['discounts_pre_tax']) > 0 ): ?>
<?php _e('Discounts Before Taxes','events-manager'); ?>
<?php foreach( $price_summary['discounts_pre_tax'] as $discount_summary ): ?>
(<?php echo $discount_summary['name']; ?>) : -<?php echo $discount_summary['amount']; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if( count($price_summary['surcharges_pre_tax']) > 0 ): ?>
<?php _e('Surcharges Before Taxes','events-manager'); ?>
<?php foreach( $price_summary['surcharges_pre_tax'] as $surcharge_summary ): ?>
(<?php echo $surcharge_summary['name']; ?>) : <?php echo $surcharge_summary['amount']; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if( !empty($price_summary['taxes']['amount']) ): ?>
<?php _e('Taxes','events-manager'); ?> ( <?php echo $price_summary['taxes']['rate']; ?> ) : <?php echo $price_summary['taxes']['amount']; ?>
<?php endif; ?>
<?php if( count($price_summary['discounts_post_tax']) > 0 ): ?>
<?php _e('Discounts (After Taxes)','events-manager'); ?>
<?php foreach( $price_summary['discounts_post_tax'] as $discount_summary ): ?>
<?php echo $discount_summary['name']; ?> : -<?php echo $discount_summary['amount']; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if( count($price_summary['surcharges_post_tax']) > 0 ): ?>
<?php _e('Surcharges (After Taxes)','events-manager'); ?>
<?php foreach( $price_summary['surcharges_post_tax'] as $surcharge_summary ): ?>
<?php echo $surcharge_summary['name']; ?> : <?php echo $surcharge_summary['amount']; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php _e('Total Price','events-manager'); ?> : <?php echo $price_summary['total']; ?>

View File

@ -1,12 +0,0 @@
<?php foreach($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking): ?>
<?php
/* @var $EM_Ticket_Booking EM_Ticket_Booking */
echo $EM_Ticket_Booking->get_ticket()->name;
?>
<?php _e('Quantity','events-manager'); ?>: <?php echo $EM_Ticket_Booking->get_spaces(); ?>
<?php _e('Price','events-manager'); ?>: <?php echo em_get_currency_symbol(!get_option('dbem_smtp_html'))." ". number_format($EM_Ticket_Booking->get_price(),2); ?>
<?php endforeach; ?>

View File

@ -1,10 +0,0 @@
This folder contains email templates or parts of email templates that would be used in emails.
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/emails/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,21 +0,0 @@
Files in this folder or in wp-content/themes/yourthemedir/plugins/events-manager/formats/ would be used to replace formatting options in the settings page. This allows you a much greater degree of flexibility as you can use PHP go do all sorts of customizations to your events.
To overwrite a formatting option, you need to firstly create a file here with the same name as the setting name in the wp_options table without the dbem_ prefix. So, for example:
'dbem_event_list_item_format' - format for controlling a single event format in a list of events
becomes
event_list_item_format.php
Then, using the example above, to activate the overriding format, you need to add this to your theme's functions.php file.
<?php
function my_em_custom_formats( $array ){
$my_formats = array('dbem_event_list_item_format'); //the format you want to override, corresponding to file above.
return $array + $my_formats; //return the default array and your formats.
}
add_filter('em_formats_filter', 'my_em_custom_formats', 1, 1);
?>
If you want to add more than one format, add more option names to the $my_formats array and create the corresponding php file.

View File

@ -1,28 +0,0 @@
<?php
/*
* This file generates the default booking form fields. Events Manager Pro does not use this file.
*/
/* @var $EM_Event EM_Event */
//Here we have extra information required for the booking.
?>
<?php if( !is_user_logged_in() && apply_filters('em_booking_form_show_register_form',true) ): ?>
<?php //User can book an event without registering, a username will be created for them based on their email and a random password will be created. ?>
<input type="hidden" name="register_user" value="1" />
<p>
<label for='user_name'><?php _e('Name','events-manager') ?></label>
<input type="text" name="user_name" id="user_name" class="input" value="<?php if(!empty($_REQUEST['user_name'])) echo esc_attr($_REQUEST['user_name']); ?>" />
</p>
<p>
<label for='dbem_phone'><?php _e('Phone','events-manager') ?></label>
<input type="text" name="dbem_phone" id="dbem_phone" class="input" value="<?php if(!empty($_REQUEST['dbem_phone'])) echo esc_attr($_REQUEST['dbem_phone']); ?>" />
</p>
<p>
<label for='user_email'><?php _e('E-mail','events-manager') ?></label>
<input type="text" name="user_email" id="user_email" class="input" value="<?php if(!empty($_REQUEST['user_email'])) echo esc_attr($_REQUEST['user_email']); ?>" />
</p>
<?php do_action('em_register_form'); //careful if making an add-on, this will only be used if you're not using custom booking forms ?>
<?php endif; ?>
<p>
<label for='booking_comment'><?php _e('Comment', 'events-manager') ?></label>
<textarea name='booking_comment' rows="2" cols="20"><?php echo !empty($_REQUEST['booking_comment']) ? esc_attr($_REQUEST['booking_comment']):'' ?></textarea>
</p>

View File

@ -1,40 +0,0 @@
<?php
/*
* This file generates the default login form within the booking form (if enabled in options).
*/
?>
<div class="em-booking-login">
<form class="em-booking-login-form" action="<?php echo site_url('wp-login.php', 'login_post'); ?>" method="post">
<p><?php esc_html_e('Log in if you already have an account with us.','events-manager'); ?></p>
<p>
<label><?php esc_html_e( 'Username','events-manager') ?></label>
<input type="text" name="log" class="input" value="" />
</p>
<p>
<label><?php esc_html_e( 'Password','events-manager') ?></label>
<input type="password" name="pwd" class="input" value="" />
</p>
<?php do_action('login_form'); ?>
<input type="submit" name="wp-submit" id="em_wp-submit" value="<?php esc_html_e('Log In', 'events-manager'); ?>" tabindex="100" />
<input name="rememberme" type="checkbox" id="em_rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','events-manager') ?></label>
<input type="hidden" name="redirect_to" value="<?php echo esc_url( get_site_url(false, $_SERVER['REQUEST_URI']) ); ?>#em-booking" />
<br />
<?php
//Signup Links
if ( get_option('users_can_register') ) {
echo "<br />";
if ( function_exists('bp_get_signup_page') ) { //Buddypress
$register_link = bp_get_signup_page();
}elseif ( file_exists( ABSPATH."/wp-signup.php" ) ) { //MU + WP3
$register_link = site_url('wp-signup.php', 'login');
} else {
$register_link = site_url('wp-login.php?action=register', 'login');
}
?>
<a href="<?php echo $register_link ?>"><?php esc_html_e('Sign Up','events-manager') ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<?php
}
?>
<a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" title="<?php esc_html_e('Password Lost and Found', 'events-manager') ?>"><?php esc_html_e('Lost your password?', 'events-manager') ?></a>
</form>
</div>

View File

@ -1,52 +0,0 @@
<?php
/*
* This file generates the input fields for an event with a single ticket and settings set to not show a table for single tickets (default setting)
* If you want to add to this form this, you'd be better off hooking into the actions below.
*/
/* @var $EM_Ticket EM_Ticket */
/* @var $EM_Event EM_Event */
global $allowedposttags;
do_action('em_booking_form_ticket_header', $EM_Ticket); //do not delete
/*
* This variable can be overridden, by hooking into the em_booking_form_tickets_cols filter and adding your collumns into this array.
* Then, you should create a em_booking_form_ticket_field_arraykey action for your collumn data, which will pass a ticket and event object.
*/
$collumns = $EM_Event->get_tickets()->get_ticket_collumns(); //array of collumn type => title
foreach( $collumns as $type => $name ): ?>
<?php
//output collumn by type, or call a custom action
switch($type){
case 'type':
if(!empty($EM_Ticket->ticket_description)){ //show description if there is one
?><p class="ticket-desc"><?php echo wp_kses($EM_Ticket->ticket_description,$allowedposttags); ?></p><?php
}
break;
case 'price':
?><p class="ticket-price"><label><?php echo $name; ?></label><strong><?php echo $EM_Ticket->get_price(true); ?></strong></p><?php
break;
case 'spaces':
if( $EM_Ticket->get_available_spaces() > 1 && ( empty($EM_Ticket->ticket_max) || $EM_Ticket->ticket_max > 1 ) ): //more than one space available ?>
<p class="em-tickets-spaces">
<label for='em_tickets'><?php echo $name; ?></label>
<?php
$default = !empty($_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']) ? $_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']:0;
$spaces_options = $EM_Ticket->get_spaces_options(false,$default);
if( $spaces_options ){
echo $spaces_options;
}else{
echo "<strong>".__('N/A','events-manager')."</strong>";
}
?>
</p>
<?php do_action('em_booking_form_ticket_spaces', $EM_Ticket); //do not delete ?>
<?php else: //if only one space or ticket max spaces per booking is 1 ?>
<input type="hidden" name="em_tickets[<?php echo $EM_Ticket->ticket_id ?>][spaces]" value="1" class="em-ticket-select" />
<?php do_action('em_booking_form_ticket_spaces', $EM_Ticket); //do not delete ?>
<?php endif;
break;
default:
do_action('em_booking_form_ticket_field_'.$type, $EM_Ticket, $EM_Event);
break;
}
endforeach; ?>
<?php do_action('em_booking_form_ticket_footer', $EM_Ticket); //do not delete ?>

View File

@ -1,60 +0,0 @@
<?php
/*
* This file generates a tabular list of tickets for the event booking forms with input values for choosing ticket spaces.
* If you want to add to this form this, you'd be better off hooking into the actions below.
*/
/* @var $EM_Event EM_Event */
global $allowedposttags;
$EM_Tickets = $EM_Event->get_bookings()->get_tickets(); //already instantiated, so should be a quick retrieval.
/*
* This variable can be overridden, by hooking into the em_booking_form_tickets_cols filter and adding your collumns into this array.
* Then, you should create a em_booking_form_tickets_col_arraykey action for your collumn data, which will pass a ticket and event object.
*/
$collumns = $EM_Tickets->get_ticket_collumns(); //array of collumn type => title
?>
<table class="em-tickets" cellspacing="0" cellpadding="0">
<tr>
<?php foreach($collumns as $type => $name): ?>
<th class="em-bookings-ticket-table-<?php echo $type; ?>"><?php echo $name; ?></th>
<?php endforeach; ?>
</tr>
<?php foreach( $EM_Tickets->tickets as $EM_Ticket ): /* @var $EM_Ticket EM_Ticket */ ?>
<?php if( $EM_Ticket->is_displayable() ): ?>
<?php do_action('em_booking_form_tickets_loop_header', $EM_Ticket); //do not delete ?>
<tr class="em-ticket" id="em-ticket-<?php echo $EM_Ticket->ticket_id; ?>">
<?php foreach( $collumns as $type => $name ): ?>
<?php
//output collumn by type, or call a custom action
switch($type){
case 'type':
?>
<td class="em-bookings-ticket-table-type"><?php echo wp_kses_data($EM_Ticket->ticket_name); ?><?php if(!empty($EM_Ticket->ticket_description)) :?><br><span class="ticket-desc"><?php echo wp_kses($EM_Ticket->ticket_description,$allowedposttags); ?></span><?php endif; ?></td>
<?php
break;
case 'price':
?>
<td class="em-bookings-ticket-table-price"><?php echo $EM_Ticket->get_price(true); ?></td>
<?php
break;
case 'spaces':
?>
<td class="em-bookings-ticket-table-spaces">
<?php
$default = !empty($_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']) ? $_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']:0;
$spaces_options = $EM_Ticket->get_spaces_options(true,$default);
echo ( $spaces_options ) ? $spaces_options:"<strong>".__('N/A','events-manager')."</strong>";
?>
</td>
<?php
break;
default:
do_action('em_booking_form_tickets_col_'.$type, $EM_Ticket, $EM_Event);
break;
}
?>
<?php endforeach; ?>
</tr>
<?php do_action('em_booking_form_tickets_loop_footer', $EM_Ticket); //do not delete ?>
<?php endif; ?>
<?php endforeach; ?>
</table>

View File

@ -1,120 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to the event editor. If at all possible, try making customizations using CSS, jQuery, or using our hooks and filters. - 2012-02-14 */
/*
* To ensure compatability, it is recommended you maintain class, id and form name attributes, unless you now what you're doing.
* You also must keep the _wpnonce hidden field in this form too.
*/
global $EM_Event, $EM_Notices, $bp;
//check that user can access this page
if( is_object($EM_Event) && !$EM_Event->can_manage('edit_events','edit_others_events') ){
?>
<div class="wrap"><h2><?php esc_html_e('Unauthorized Access','events-manager'); ?></h2><p><?php echo sprintf(__('You do not have the rights to manage this %s.','events-manager'),__('Event','events-manager')); ?></p></div>
<?php
return false;
}elseif( !is_object($EM_Event) ){
$EM_Event = new EM_Event();
}
$required = apply_filters('em_required_html','<i>*</i>');
echo $EM_Notices;
//Success notice
if( !empty($_REQUEST['success']) ){
if(!get_option('dbem_events_form_reshow')) return false;
}
?>
<form enctype='multipart/form-data' id="event-form" class="em-event-admin-editor <?php if( $EM_Event->is_recurring() ) echo 'em-event-admin-recurring' ?>" method="post" action="<?php echo esc_url(add_query_arg(array('success'=>null))); ?>">
<div class="wrap">
<?php do_action('em_front_event_form_header'); ?>
<?php if(get_option('dbem_events_anonymous_submissions') && !is_user_logged_in()): ?>
<h3 class="event-form-submitter"><?php esc_html_e( 'Your Details', 'events-manager'); ?></h3>
<div class="inside event-form-submitter">
<p>
<label><?php esc_html_e('Name', 'events-manager'); ?></label>
<input type="text" name="event_owner_name" id="event-owner-name" value="<?php echo esc_attr($EM_Event->event_owner_name); ?>" />
</p>
<p>
<label><?php esc_html_e('Email', 'events-manager'); ?></label>
<input type="text" name="event_owner_email" id="event-owner-email" value="<?php echo esc_attr($EM_Event->event_owner_email); ?>" />
</p>
<?php do_action('em_front_event_form_guest'); ?>
<?php do_action('em_font_event_form_guest'); //deprecated ?>
</div>
<?php endif; ?>
<h3 class="event-form-name"><?php esc_html_e( 'Event Name', 'events-manager'); ?></h3>
<div class="inside event-form-name">
<input type="text" name="event_name" id="event-name" value="<?php echo esc_attr($EM_Event->event_name,ENT_QUOTES); ?>" /><?php echo $required; ?>
<br />
<?php esc_html_e('The event name. Example: Birthday party', 'events-manager'); ?>
<?php em_locate_template('forms/event/group.php',true); ?>
</div>
<h3 class="event-form-when"><?php esc_html_e( 'When', 'events-manager'); ?></h3>
<div class="inside event-form-when">
<?php
if( empty($EM_Event->event_id) && $EM_Event->can_manage('edit_recurring_events','edit_others_recurring_events') && get_option('dbem_recurrence_enabled') ){
em_locate_template('forms/event/when-with-recurring.php',true);
}elseif( $EM_Event->is_recurring() ){
em_locate_template('forms/event/recurring-when.php',true);
}else{
em_locate_template('forms/event/when.php',true);
}
?>
</div>
<?php if( get_option('dbem_locations_enabled') ): ?>
<h3 class="event-form-where"><?php esc_html_e( 'Where', 'events-manager'); ?></h3>
<div class="inside event-form-where">
<?php em_locate_template('forms/event/location.php',true); ?>
</div>
<?php endif; ?>
<h3 class="event-form-details"><?php esc_html_e( 'Details', 'events-manager'); ?></h3>
<div class="inside event-form-details">
<div class="event-editor">
<?php if( get_option('dbem_events_form_editor') && function_exists('wp_editor') ): ?>
<?php wp_editor($EM_Event->post_content, 'em-editor-content', array('textarea_name'=>'content') ); ?>
<?php else: ?>
<textarea name="content" rows="10" style="width:100%"><?php echo $EM_Event->post_content ?></textarea>
<br />
<?php esc_html_e( 'Details about the event.', 'events-manager')?> <?php esc_html_e( 'HTML allowed.', 'events-manager')?>
<?php endif; ?>
</div>
<div class="event-extra-details">
<?php if(get_option('dbem_attributes_enabled')) { em_locate_template('forms/event/attributes-public.php',true); } ?>
<?php if(get_option('dbem_categories_enabled')) { em_locate_template('forms/event/categories-public.php',true); } ?>
</div>
</div>
<?php if( $EM_Event->can_manage('upload_event_images','upload_event_images') ): ?>
<h3><?php esc_html_e( 'Event Image', 'events-manager'); ?></h3>
<div class="inside event-form-image">
<?php em_locate_template('forms/event/featured-image-public.php',true); ?>
</div>
<?php endif; ?>
<?php if( get_option('dbem_rsvp_enabled') && $EM_Event->can_manage('manage_bookings','manage_others_bookings') ) : ?>
<!-- START Bookings -->
<h3><?php esc_html_e('Bookings/Registration','events-manager'); ?></h3>
<div class="inside event-form-bookings">
<?php em_locate_template('forms/event/bookings.php',true); ?>
</div>
<!-- END Bookings -->
<?php endif; ?>
<?php do_action('em_front_event_form_footer'); ?>
</div>
<p class="submit">
<?php if( empty($EM_Event->event_id) ): ?>
<input type='submit' class='button-primary' value='<?php echo esc_attr(sprintf( __('Submit %s','events-manager'), __('Event','events-manager') )); ?>' />
<?php else: ?>
<input type='submit' class='button-primary' value='<?php echo esc_attr(sprintf( __('Update %s','events-manager'), __('Event','events-manager') )); ?>' />
<?php endif; ?>
</p>
<input type="hidden" name="event_id" value="<?php echo $EM_Event->event_id; ?>" />
<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('wpnonce_event_save'); ?>" />
<input type="hidden" name="action" value="event_save" />
<?php if( !empty($_REQUEST['redirect_to']) ): ?>
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($_REQUEST['redirect_to']); ?>" />
<?php endif; ?>
</form>

View File

@ -1,31 +0,0 @@
<?php
/*
* This file is called by templates/forms/event-editor.php to display attribute fields on your event form on your website.
* You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/event/ and editing it there.
*/
global $EM_Event;
/* @var $EM_Event EM_Event */
$attributes = em_get_attributes();
$has_deprecated = false;
?>
<?php if( count( $attributes['names'] ) > 0 ) : ?>
<?php foreach( $attributes['names'] as $name) : ?>
<div class="event-attributes">
<label for="em_attributes[<?php echo $name ?>]"><?php echo $name ?></label>
<?php if( count($attributes['values'][$name]) > 1 ): ?>
<select name="em_attributes[<?php echo $name ?>]">
<?php foreach($attributes['values'][$name] as $attribute_val): ?>
<?php if( is_array($EM_Event->event_attributes) && array_key_exists($name, $EM_Event->event_attributes) && $EM_Event->event_attributes[$name]==$attribute_val ): ?>
<option selected="selected"><?php echo $attribute_val; ?></option>
<?php else: ?>
<option><?php echo $attribute_val; ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php else: ?>
<?php $default_value = (!empty($attributes['values'][$name][0])) ? $attributes['values'][$name][0]:''; ?>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo array_key_exists($name, $EM_Event->event_attributes) ? esc_attr($EM_Event->event_attributes[$name], ENT_QUOTES):''; ?>" value="<?php echo $default_value; ?>" />
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -1,89 +0,0 @@
<?php
global $EM_Event;
$attributes = em_get_attributes();
$has_deprecated = false;
?>
<div id="event-attributes">
<?php if( !empty($attributes['names']) && count( $attributes['names'] ) > 0 ) : ?>
<table class="form-table">
<thead>
<tr valign="top">
<td><strong>Attribute Name</strong></td>
<td><strong>Value</strong></td>
</tr>
</thead>
<tbody id="mtm_body">
<?php
$count = 1;
foreach( $attributes['names'] as $name){
?>
<tr valign="top" id="em_attribute_<?php echo $count ?>">
<td scope="row"><?php echo $name ?></td>
<td>
<?php if( count($attributes['values'][$name]) > 1 ): ?>
<select name="em_attributes[<?php echo $name ?>]">
<?php foreach($attributes['values'][$name] as $attribute_val): ?>
<?php if( array_key_exists($name, $EM_Event->event_attributes) && $EM_Event->event_attributes[$name]==$attribute_val ): ?>
<option selected="selected"><?php echo $attribute_val; ?></option>
<?php else: ?>
<option><?php echo $attribute_val; ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php else: ?>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo array_key_exists($name, $EM_Event->event_attributes) ? esc_attr($EM_Event->event_attributes[$name], ENT_QUOTES):''; ?>" />
<?php endif; ?>
</td>
</tr>
<?php
$count++;
}
if($count == 1){
?>
<tr><td colspan="2"><?php echo sprintf(__("You don't have any custom attributes defined in any of your Events Manager template settings. Please add them the <a href='%s'>settings page</a>",'events-manager'),EM_ADMIN_URL ."&amp;page=events-manager-options"); ?></td></tr>
<?php
}
?>
</tbody>
</table>
<?php if( count(array_diff(array_keys($EM_Event->event_attributes), $attributes['names'])) > 0 ): ?>
<p><strong><?php _e('Deprecated Attributes', 'events-manager')?></strong></p>
<p><em><?php _e("If you see any attributes under here, that means they're not used in Events Manager formats. To add them, you need to add the custom attribute again to a formatting option in the settings page. To remove any of these deprecated attributes, give it a blank value and save.",'events-manager') ?></em></p>
<table class="form-table">
<thead>
<tr valign="top">
<td><strong>Attribute Name</strong></td>
<td><strong>Value</strong></td>
</tr>
</thead>
<tbody id="mtm_body">
<?php
if( is_array($EM_Event->event_attributes) and count($EM_Event->event_attributes) > 0){
foreach( $EM_Event->event_attributes as $name => $value){
if( is_array($value) ) $value = serialize($value);
if( !in_array($name, $attributes['names']) ){
?>
<tr valign="top" id="em_attribute_<?php echo $count ?>">
<td scope="row"><?php echo $name ?></td>
<td>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo esc_attr($value, ENT_QUOTES); ?>" />
</td>
</tr>
<?php
$count++;
}
}
}
?>
</tbody>
</table>
<?php endif; ?>
<?php else : ?>
<p>
<?php _e('In order to use attributes, you must define some in your templates, otherwise they\'ll never show. Go to Events > Settings > General to add attribute placeholders.', 'events-manager'); ?>
</p>
<script>
jQuery(document).ready(function($){ $('#event_attributes').addClass('closed'); });
</script>
<?php endif; ?>
</div>

View File

@ -1,37 +0,0 @@
<?php
global $EM_Event, $post;
?>
<div id='rsvp-data'>
<?php
$available_spaces = $EM_Event->get_bookings()->get_available_spaces();
$booked_spaces = $EM_Event->get_bookings()->get_booked_spaces();
if ( count($EM_Event->get_bookings()->bookings) > 0 ) {
?>
<div class='wrap'>
<p><strong><?php echo __('Available Spaces','events-manager').': '.$EM_Event->get_bookings()->get_available_spaces(); ?></strong></p>
<p><strong><?php echo __('Confirmed Spaces','events-manager').': '.$EM_Event->get_bookings()->get_booked_spaces(); ?></strong></p>
<p><strong><?php echo __('Pending Spaces','events-manager').': '.$EM_Event->get_bookings()->get_pending_spaces(); ?></strong></p>
</div>
<br class='clear'/>
<?php
} else {
?>
<p><em><?php _e('No responses yet!', 'events-manager')?></em></p>
<?php
}
?>
<div id='major-publishing-actions'>
<div id='publishing-action'>
<a id='printable' href='<?php echo $EM_Event->get_bookings_url(); ?>'><?php _e('manage bookings','events-manager')?></a><br />
<a target='_blank' href='<?php echo EM_ADMIN_URL ."&amp;page=events-manager-bookings&action=bookings_report&event_id=".$EM_Event->event_id ?>'><?php _e('printable view','events-manager')?></a>
<?php if( locate_template('plugins/events-manager/templates/csv-event-bookings.php', false) ): ?>
<br /><a href='<?php echo EM_ADMIN_URL ."&amp;page=events-manager-bookings&action=export_csv&event_id=".$EM_Event->event_id ?>'><?php _e('export csv','events-manager')?></a>
<?php endif; ?>
<?php do_action('em_admin_event_booking_options'); ?>
<br class='clear'/>
</div>
<br class='clear'/>
</div>
</div>

View File

@ -1,109 +0,0 @@
<?php
/*
* Used for both multiple and single tickets. $col_count will always be 1 in single ticket mode, and be a unique number for each ticket starting from 1
* This form should have $EM_Ticket and $col_count available globally.
*/
global $col_count, $EM_Ticket;
$col_count = absint($col_count); //now we know it's a number
?>
<div class="em-ticket-form">
<input type="hidden" name="em_tickets[<?php echo $col_count; ?>][ticket_id]" class="ticket_id" value="<?php echo esc_attr($EM_Ticket->ticket_id) ?>" />
<div class="em-ticket-form-main">
<div class="ticket-name">
<label title="<?php esc_attr_e('Enter a ticket name.','events-manager'); ?>"><?php esc_html_e('Name','events-manager') ?></label>
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_name]" value="<?php echo esc_attr($EM_Ticket->ticket_name) ?>" class="ticket_name" />
</div>
<div class="ticket-description">
<label><?php esc_html_e('Description','events-manager') ?></label>
<textarea name="em_tickets[<?php echo $col_count; ?>][ticket_description]" class="ticket_description"><?php echo esc_html(wp_unslash($EM_Ticket->ticket_description)) ?></textarea>
</div>
<div class="ticket-price"><label><?php esc_html_e('Price','events-manager') ?></label><input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_price]" class="ticket_price" value="<?php echo esc_attr($EM_Ticket->get_price_precise()) ?>" /></div>
<div class="ticket-spaces">
<label title="<?php esc_attr_e('Enter a maximum number of spaces (required).','events-manager'); ?>"><?php esc_html_e('Spaces','events-manager') ?></label>
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_spaces]" value="<?php echo esc_attr($EM_Ticket->ticket_spaces) ?>" class="ticket_spaces" />
</div>
</div>
<div class="em-ticket-form-advanced" style="display:none;">
<div class="ticket-spaces ticket-spaces-min">
<label title="<?php esc_attr_e('Leave either blank for no upper/lower limit.','events-manager'); ?>"><?php echo esc_html_x('At least','spaces per booking','events-manager');?></label>
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_min]" value="<?php echo esc_attr($EM_Ticket->ticket_min) ?>" class="ticket_min" />
<?php esc_html_e('spaces per booking', 'events-manager')?>
</div>
<div class="ticket-spaces ticket-spaces-max">
<label title="<?php esc_attr_e('Leave either blank for no upper/lower limit.','events-manager'); ?>"><?php echo esc_html_x('At most','spaces per booking', 'events-manager'); ?></label>
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_max]" value="<?php echo esc_attr($EM_Ticket->ticket_max) ?>" class="ticket_max" />
<?php esc_html_e('spaces per booking', 'events-manager')?>
</div>
<div class="ticket-dates em-time-range em-date-range">
<div class="ticket-dates-from">
<label title="<?php esc_attr_e('Add a start or end date (or both) to impose time constraints on ticket availability. Leave either blank for no upper/lower limit.','events-manager'); ?>">
<?php esc_html_e('Available from','events-manager') ?>
</label>
<div class="ticket-dates-from-normal">
<input type="text" name="ticket_start_pub" class="em-date-input-loc em-date-start" />
<input type="hidden" name="em_tickets[<?php echo $col_count; ?>][ticket_start]" class="em-date-input ticket_start" value="<?php echo ( !empty($EM_Ticket->ticket_start) ) ? date("Y-m-d", $EM_Ticket->start_timestamp):''; ?>" />
</div>
<div class="ticket-dates-from-recurring">
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_days]" size="3" value="<?php if( !empty($EM_Ticket->ticket_meta['recurrences']) && is_numeric($EM_Ticket->ticket_meta['recurrences']['start_days'])) echo absint($EM_Ticket->ticket_meta['recurrences']['start_days']); ?>" />
<?php esc_html_e('day(s)','events-manager'); ?>
<select name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_when]" class="ticket-dates-from-recurring-when">
<option value="before" <?php if( !empty($EM_Ticket->ticket_meta['recurrences']['start_days']) && $EM_Ticket->ticket_meta['recurrences']['start_days'] <= 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('Before','events-manager'))); ?></option>
<option value="after" <?php if( !empty($EM_Ticket->ticket_meta['recurrences']['start_days']) && $EM_Ticket->ticket_meta['recurrences']['start_days'] > 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('After','events-manager'))); ?></option>
</select>
</div>
<?php echo esc_html_x('at', 'time','events-manager'); ?>
<input id="start-time" class="em-time-input em-time-start" type="text" size="8" maxlength="8" name="em_tickets[<?php echo $col_count; ?>][ticket_start_time]" value="<?php echo ( !empty($EM_Ticket->ticket_start) ) ? date( em_get_hour_format(), $EM_Ticket->start_timestamp):''; ?>" />
</div>
<div class="ticket-dates-to">
<label title="<?php esc_attr_e('Add a start or end date (or both) to impose time constraints on ticket availability. Leave either blank for no upper/lower limit.','events-manager'); ?>">
<?php esc_html_e('Available until','events-manager') ?>
</label>
<div class="ticket-dates-to-normal">
<input type="text" name="ticket_end_pub" class="em-date-input-loc em-date-end" />
<input type="hidden" name="em_tickets[<?php echo $col_count; ?>][ticket_end]" class="em-date-input ticket_end" value="<?php echo ( !empty($EM_Ticket->ticket_end) ) ? date("Y-m-d", $EM_Ticket->end_timestamp):''; ?>" />
</div>
<div class="ticket-dates-to-recurring">
<input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_end_recurring_days]" size="3" value="<?php if( !empty($EM_Ticket->ticket_meta['recurrences']['end_days']) ) echo absint($EM_Ticket->ticket_meta['recurrences']['end_days']); ?>" />
<?php esc_html_e('day(s)','events-manager'); ?>
<select name="em_tickets[<?php echo $col_count; ?>][ticket_end_recurring_when]" class="ticket-dates-to-recurring-when">
<option value="before" <?php if( !empty($EM_Ticket->ticket_meta['recurrences']['end_days']) && $EM_Ticket->ticket_meta['recurrences']['end_days'] <= 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('Before','events-manager'))); ?></option>
<option value="after" <?php if( !empty($EM_Ticket->ticket_meta['recurrences']['end_days']) && $EM_Ticket->ticket_meta['recurrences']['end_days'] > 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('After','events-manager'))); ?></option>
</select>
</div>
<?php echo esc_html_x('at', 'time','events-manager'); ?>
<input id="end-time" class="em-time-input em-time-end" type="text" size="8" maxlength="8" name="em_tickets[<?php echo $col_count; ?>][ticket_end_time]" value="<?php echo ( !empty($EM_Ticket->ticket_end) ) ? date( em_get_hour_format(), $EM_Ticket->end_timestamp):''; ?>" />
</div>
</div>
<?php if( !get_option('dbem_bookings_tickets_single') || count($EM_Ticket->get_event()->get_tickets()->tickets) > 1 ): ?>
<div class="ticket-required">
<label title="<?php esc_attr_e('If checked every booking must select one or the minimum number of this ticket.','events-manager'); ?>"><?php esc_html_e('Required?','events-manager') ?></label>
<input type="checkbox" value="1" name="em_tickets[<?php echo $col_count; ?>][ticket_required]" <?php if($EM_Ticket->ticket_required) echo 'checked="checked"'; ?> class="ticket_required" />
</div>
<?php endif; ?>
<div class="ticket-type">
<label><?php esc_html_e('Available for','events-manager') ?></label>
<select name="em_tickets[<?php echo $col_count; ?>][ticket_type]" class="ticket_type">
<option value=""><?php _e('Everyone','events-manager'); ?></option>
<option value="members" <?php if($EM_Ticket->ticket_members) echo 'selected="selected"'; ?>><?php esc_html_e('Logged In Users','events-manager'); ?></option>
<option value="guests" <?php if($EM_Ticket->ticket_guests) echo 'selected="selected"'; ?>><?php esc_html_e('Guest Users','events-manager'); ?></option>
</select>
</div>
<div class="ticket-roles" <?php if( !$EM_Ticket->ticket_members ): ?>style="display:none;"<?php endif; ?>>
<label><?php _e('Restrict to','events-manager'); ?></label>
<div>
<?php
$WP_Roles = new WP_Roles();
foreach($WP_Roles->roles as $role => $role_data){ /* @var $WP_Role WP_Role */
?>
<input type="checkbox" name="em_tickets[<?php echo $col_count; ?>][ticket_members_roles][]" value="<?php echo esc_attr($role); ?>" <?php if( in_array($role, $EM_Ticket->ticket_members_roles) ) echo 'checked="checked"' ?> class="ticket_members_roles" /> <?php echo esc_html($role_data['name']); ?><br />
<?php
}
?>
</div>
</div>
<?php do_action('em_ticket_edit_form_fields', $col_count, $EM_Ticket); //do not delete, add your extra fields this way, remember to save them too! ?>
</div>
<div class="ticket-options">
<a href="#" class="ticket-options-advanced show"><span class="show-advanced"><?php esc_html_e('Show Advanced Options','events-manager'); ?></span><span class="hide-advanced" style="display:none;"><?php esc_html_e('Hide Advanced Options','events-manager'); ?></span></a>
</div>
</div>

View File

@ -1,200 +0,0 @@
<?php
global $EM_Event, $post, $allowedposttags, $EM_Ticket, $col_count;
$reschedule_warnings = !empty($EM_Event->event_id) && $EM_Event->is_recurring() && $EM_Event->event_rsvp;
?>
<div id="event-rsvp-box">
<input id="event-rsvp" name='event_rsvp' value='1' type='checkbox' <?php echo ($EM_Event->event_rsvp) ? 'checked="checked"' : ''; ?> />
&nbsp;&nbsp;
<?php _e ( 'Enable registration for this event', 'events-manager')?>
</div>
<div id="event-rsvp-options" style="<?php echo ($EM_Event->event_rsvp) ? '':'display:none;' ?>">
<?php
do_action('em_events_admin_bookings_header', $EM_Event);
//get tickets here and if there are none, create a blank ticket
$EM_Tickets = $EM_Event->get_tickets();
if( count($EM_Tickets->tickets) == 0 ){
$EM_Tickets->tickets[] = new EM_Ticket();
$delete_temp_ticket = true;
}
?>
<div class="event-rsvp-options-tickets <?php if( $reschedule_warnings ) echo 'em-recurrence-reschedule'; ?>">
<?php
//output title
if( get_option('dbem_bookings_tickets_single') && count($EM_Tickets->tickets) == 1 ){
?>
<h4><?php esc_html_e('Ticket Options','events-manager'); ?></h4>
<?php
}else{
?>
<h4><?php esc_html_e('Tickets','events-manager'); ?></h4>
<?php
}
//If this event is a recurring template, we need to warn the user that editing tickets will delete previous bookings
if( $reschedule_warnings ){
?>
<div class="recurrence-reschedule-warning">
<p><?php esc_html_e( 'Modifications to event tickets will cause all bookings to individual recurrences of this event to be deleted.', 'events-manager'); ?></p>
<p>
<a href="<?php echo esc_url( add_query_arg(array('scope'=>'all', 'recurrence_id'=>$EM_Event->event_id), em_get_events_admin_url()) ); ?>">
<strong><?php esc_html_e('You can edit individual recurrences and disassociate them with this recurring event.', 'events-manager'); ?></strong>
</a>
</p>
</div>
<?php
}
?>
<div id="em-tickets-form" class="em-tickets-form<?php if( $reschedule_warnings && empty($_REQUEST['recreate_tickets']) ) echo ' reschedule-hidden' ?>">
<?php
//output ticket options
if( get_option('dbem_bookings_tickets_single') && count($EM_Tickets->tickets) == 1 ){
$col_count = 1;
$EM_Ticket = $EM_Tickets->get_first();
include( em_locate_template('forms/ticket-form.php') ); //in future we'll be accessing forms/event/bookings-ticket-form.php directly
}else{
?>
<p><em><?php esc_html_e('You can have single or multiple tickets, where certain tickets become available under certain conditions, e.g. early bookings, group discounts, maximum bookings per ticket, etc.', 'events-manager'); ?> <?php esc_html_e('Basic HTML is allowed in ticket labels and descriptions.','events-manager'); ?></em></p>
<table class="form-table">
<thead>
<tr valign="top">
<th colspan="2"><?php esc_html_e('Ticket Name','events-manager'); ?></th>
<th><?php esc_html_e('Price','events-manager'); ?></th>
<th><?php esc_html_e('Min/Max','events-manager'); ?></th>
<th><?php esc_html_e('Start/End','events-manager'); ?></th>
<th><?php esc_html_e('Avail. Spaces','events-manager'); ?></th>
<th><?php esc_html_e('Booked Spaces','events-manager'); ?></th>
<th>&nbsp;</th>
</tr>
</thead>
<tfoot>
<tr valign="top">
<td colspan="8">
<a href="#" id="em-tickets-add"><?php esc_html_e('Add new ticket','events-manager'); ?></a>
</td>
</tr>
</tfoot>
<?php
$EM_Ticket = new EM_Ticket();
$EM_Ticket->event_id = $EM_Event->event_id;
array_unshift($EM_Tickets->tickets, $EM_Ticket); //prepend template ticket for JS
$col_count = 0;
foreach( $EM_Tickets->tickets as $EM_Ticket){
/* @var $EM_Ticket EM_Ticket */
?>
<tbody id="em-ticket-<?php echo $col_count ?>" <?php if( $col_count == 0 ) echo 'style="display:none;"' ?>>
<tr class="em-tickets-row">
<td class="ticket-status"><span class="<?php if($EM_Ticket->ticket_id && $EM_Ticket->is_available(true, true)){ echo 'ticket_on'; }elseif($EM_Ticket->ticket_id > 0){ echo 'ticket_off'; }else{ echo 'ticket_new'; } ?>"></span></td>
<td class="ticket-name">
<span class="ticket_name"><?php if($EM_Ticket->ticket_members) echo '* ';?><?php echo wp_kses_data($EM_Ticket->ticket_name); ?></span>
<div class="ticket_description"><?php echo wp_kses($EM_Ticket->ticket_description,$allowedposttags); ?></div>
<div class="ticket-actions">
<a href="#" class="ticket-actions-edit"><?php esc_html_e('Edit','events-manager'); ?></a>
<?php if( count($EM_Ticket->get_bookings()->bookings) == 0 ): ?>
| <a href="<?php bloginfo('wpurl'); ?>/wp-load.php" class="ticket-actions-delete"><?php esc_html_e('Delete','events-manager'); ?></a>
<?php else: ?>
| <a href="<?php echo esc_url(add_query_arg('ticket_id', $EM_Ticket->ticket_id, $EM_Event->get_bookings_url())); ?>"><?php esc_html_e('View Bookings','events-manager'); ?></a>
<?php endif; ?>
</div>
</td>
<td class="ticket-price">
<span class="ticket_price"><?php echo ($EM_Ticket->ticket_price) ? esc_html($EM_Ticket->get_price_precise()) : esc_html__('Free','events-manager'); ?></span>
</td>
<td class="ticket-limit">
<span class="ticket_min">
<?php echo ( !empty($EM_Ticket->ticket_min) ) ? esc_html($EM_Ticket->ticket_min):'-'; ?>
</span> /
<span class="ticket_max"><?php echo ( !empty($EM_Ticket->ticket_max) ) ? esc_html($EM_Ticket->ticket_max):'-'; ?></span>
</td>
<td class="ticket-time">
<span class="ticket_start ticket-dates-from-normal"><?php echo ( !empty($EM_Ticket->ticket_start) ) ? date(get_option('dbem_date_format'), $EM_Ticket->start_timestamp):''; ?></span>
<span class="ticket_start_recurring_days ticket-dates-from-recurring"><?php if( !empty($EM_Ticket->ticket_meta['recurrences']) ) echo $EM_Ticket->ticket_meta['recurrences']['start_days']; ?></span>
<span class="ticket_start_recurring_days_text ticket-dates-from-recurring <?php if( !empty($EM_Ticket->ticket_meta['recurrences']) && !is_numeric($EM_Ticket->ticket_meta['recurrences']['start_days']) ) echo 'hidden'; ?>"><?php _e('day(s)','events-manager'); ?></span>
<span class="ticket_start_time"><?php echo ( !empty($EM_Ticket->ticket_start) ) ? date( em_get_hour_format(), $EM_Ticket->start_timestamp):''; ?></span>
<br />
<span class="ticket_end ticket-dates-from-normal"><?php echo ( !empty($EM_Ticket->ticket_end) ) ? date(get_option('dbem_date_format'), $EM_Ticket->end_timestamp):''; ?></span>
<span class="ticket_end_recurring_days ticket-dates-from-recurring"><?php if( !empty($EM_Ticket->ticket_meta['recurrences']) ) echo $EM_Ticket->ticket_meta['recurrences']['end_days']; ?></span>
<span class="ticket_end_recurring_days_text ticket-dates-from-recurring <?php if( !empty($EM_Ticket->ticket_meta['recurrences']) && !is_numeric($EM_Ticket->ticket_meta['recurrences']['end_days']) ) echo 'hidden'; ?>"><?php _e('day(s)','events-manager'); ?></span>
<span class="ticket_end_time"><?php echo ( !empty($EM_Ticket->ticket_end) ) ? date( em_get_hour_format(), $EM_Ticket->end_timestamp):''; ?></span>
</td>
<td class="ticket-qty">
<span class="ticket_available_spaces"><?php echo $EM_Ticket->get_available_spaces(); ?></span>/
<span class="ticket_spaces"><?php echo $EM_Ticket->get_spaces() ? $EM_Ticket->get_spaces() : '-'; ?></span>
</td>
<td class="ticket-booked-spaces">
<span class="ticket_booked_spaces"><?php echo $EM_Ticket->get_booked_spaces(); ?></span>
</td>
<?php do_action('em_event_edit_ticket_td', $EM_Ticket); ?>
</tr>
<tr class="em-tickets-row-form" style="display:none;">
<td colspan="<?php echo apply_filters('em_event_edit_ticket_td_colspan', 7); ?>">
<?php include( em_locate_template('forms/event/bookings-ticket-form.php')); ?>
<div class="em-ticket-form-actions">
<button type="button" class="ticket-actions-edited"><?php esc_html_e('Close Ticket Editor','events-manager')?></button>
</div>
</td>
</tr>
</tbody>
<?php
$col_count++;
}
array_shift($EM_Tickets->tickets);
?>
</table>
<?php
}
?>
</div>
<?php if( $reschedule_warnings ): //If this event is a recurring template, we need to warn the user that editing tickets will delete previous bookings ?>
<div class="recurrence-reschedule-buttons">
<a href="<?php echo esc_url(add_query_arg('recreate_tickets', null)); ?>" class="button-secondary em-button em-reschedule-cancel<?php if( empty($_REQUEST['recreate_tickets']) ) echo ' reschedule-hidden'; ?>" data-target=".em-tickets-form">
<?php esc_html_e('Cancel Ticket Recreation', 'events-manager'); ?>
</a>
<a href="<?php echo esc_url(add_query_arg('recreate_tickets', '1')); ?>" class="em-reschedule-trigger em-button button-secondary<?php if( !empty($_REQUEST['recreate_tickets']) ) echo ' reschedule-hidden'; ?>" data-target=".em-tickets-form">
<?php esc_html_e('Modify Recurring Event Tickets ', 'events-manager'); ?>
</a>
<input type="hidden" name="event_recreate_tickets" class="em-reschedule-value" value="<?php echo empty($_REQUEST['recreate_tickets']) ? 0:1 ?>" />
</div>
<?php endif; ?>
</div>
<div id="em-booking-options" class="em-booking-options">
<?php if( !get_option('dbem_bookings_tickets_single') || count($EM_Ticket->get_event()->get_tickets()->tickets) > 1 ): ?>
<h4><?php esc_html_e('Event Options','events-manager'); ?></h4>
<p>
<label><?php esc_html_e('Total Spaces','events-manager'); ?></label>
<input type="text" name="event_spaces" value="<?php if( $EM_Event->event_spaces > 0 ){ echo $EM_Event->event_spaces; } ?>" /><br />
<em><?php esc_html_e('Individual tickets with remaining spaces will not be available if total booking spaces reach this limit. Leave blank for no limit.','events-manager'); ?></em>
</p>
<p>
<label><?php esc_html_e('Maximum Spaces Per Booking','events-manager'); ?></label>
<input type="text" name="event_rsvp_spaces" value="<?php if( $EM_Event->event_rsvp_spaces > 0 ){ echo $EM_Event->event_rsvp_spaces; } ?>" /><br />
<em><?php esc_html_e('If set, the total number of spaces for a single booking to this event cannot exceed this amount.','events-manager'); ?><?php esc_html_e('Leave blank for no limit.','events-manager'); ?></em>
</p>
<p>
<label><?php esc_html_e('Booking Cut-Off Date','events-manager'); ?></label>
<span class="em-booking-date-normal">
<span class="em-date-single">
<input id="em-bookings-date-loc" class="em-date-input-loc" type="text" />
<input id="em-bookings-date" class="em-date-input" type="hidden" name="event_rsvp_date" value="<?php echo $EM_Event->event_rsvp_date; ?>" />
</span>
</span>
<span class="em-booking-date-recurring">
<input type="text" name="recurrence_rsvp_days" size="3" value="<?php echo absint($EM_Event->recurrence_rsvp_days); ?>" />
<?php _e('day(s)','events-manager'); ?>
<select name="recurrence_rsvp_days_when">
<option value="before" <?php if( !empty($EM_Event->recurrence_rsvp_days) && $EM_Event->recurrence_rsvp_days <= 0) echo 'selected="selected"'; ?>><?php echo sprintf(_x('%s the event starts','before or after','events-manager'),__('Before','events-manager')); ?></option>
<option value="after" <?php if( !empty($EM_Event->recurrence_rsvp_days) && $EM_Event->recurrence_rsvp_days > 0) echo 'selected="selected"'; ?>><?php echo sprintf(_x('%s the event starts','before or after','events-manager'),__('After','events-manager')); ?></option>
</select>
<?php _e('at','events-manager'); ?>
</span>
<input type="text" name="event_rsvp_time" class="em-time-input" maxlength="8" size="8" value="<?php echo date( em_get_hour_format(), $EM_Event->rsvp_end ); ?>" />
<br />
<em><?php esc_html_e('This is the definite date after which bookings will be closed for this event, regardless of individual ticket settings above. Default value will be the event start date.','events-manager'); ?></em>
</p>
<?php endif; ?>
</div>
<?php
if( !empty($delete_temp_ticket) ){
array_pop($EM_Tickets->tickets);
}
do_action('em_events_admin_bookings_footer', $EM_Event);
?>
</div>

View File

@ -1,23 +0,0 @@
<?php
/*
* This file is called by templates/forms/location-editor.php to display fields for uploading images on your event form on your website. This does not affect the admin featured image section.
* You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/event/ and editing it there.
*/
global $EM_Event;
/* @var $EM_Event EM_Event */
$categories = EM_Categories::get(array('orderby'=>'name','hide_empty'=>0));
?>
<?php if( count($categories) > 0 ): ?>
<div class="event-categories">
<!-- START Categories -->
<label for="event_categories[]"><?php _e ( 'Category:', 'events-manager'); ?></label>
<select name="event_categories[]" multiple size="10">
<?php
$selected = $EM_Event->get_categories()->get_ids();
$walker = new EM_Walker_CategoryMultiselect();
$args_em = array( 'hide_empty' => 0, 'name' => 'event_categories[]', 'hierarchical' => true, 'id' => EM_TAXONOMY_CATEGORY, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'walker'=> $walker);
echo walk_category_dropdown_tree($categories, 0, $args_em);
?></select>
<!-- END Categories -->
</div>
<?php endif; ?>

View File

@ -1,20 +0,0 @@
<?php
/*
* This file is called by templates/forms/location-editor.php to display fields for uploading images on your event form on your website. This does not affect the admin featured image section.
* You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/event/ and editing it there.
*/
global $EM_Event;
/* @var $EM_Event EM_Event */
?>
<p id="event-image-img">
<?php if ($EM_Event->get_image_url() != '') : ?>
<img src='<?php echo $EM_Event->get_image_url('medium'); ?>' alt='<?php echo $EM_Event->event_name ?>'/>
<?php else : ?>
<?php _e('No image uploaded for this event yet', 'events-manager') ?>
<?php endif; ?>
</p>
<label for='event_image'><?php _e('Upload/change picture', 'events-manager') ?></label> <input id='event-image' name='event_image' id='event_image' type='file' size='40' />
<br />
<?php if ($EM_Event->get_image_url() != '') : ?>
<label for='event_image_delete'><?php _e('Delete Image?', 'events-manager') ?></label> <input id='event-image-delete' name='event_image_delete' id='event_image_delete' type='checkbox' value='1' />
<?php endif; ?>

View File

@ -1,48 +0,0 @@
<?php
global $EM_Event;
if( !function_exists('bp_is_active') || !bp_is_active('groups') ) return false;
$user_groups = array();
$group_data = groups_get_user_groups(get_current_user_id());
if( !is_super_admin() ){
foreach( $group_data['groups'] as $group_id ){
if( groups_is_user_admin(get_current_user_id(), $group_id) ){
$user_groups[] = groups_get_group( array('group_id'=>$group_id));
}
}
$group_count = count($user_groups);
}else{
$groups = groups_get_groups(array('show_hidden'=>true, 'per_page'=>0));
$user_groups = $groups['groups'];
$group_count = $groups['total'];
}
if( count($user_groups) > 0 ){
?>
<p>
<select name="group_id">
<option value=""><?php _e('Not a Group Event', 'events-manager'); ?></option>
<?php
//in case user isn't a group mod, but can edit other users' events
if( !empty($EM_Event->group_id) && !in_array($EM_Event->group_id, $group_data['groups']) ){
$other_group = groups_get_group( array('group_id'=>$EM_Event->group_id));
?>
<option value="<?php echo $other_group->id; ?>" selected="selected"><?php echo $other_group->name; ?></option>
<?php
}
//show user groups
foreach($user_groups as $BP_Group){
?>
<option value="<?php echo $BP_Group->id; ?>" <?php echo ($BP_Group->id == $EM_Event->group_id) ? 'selected="selected"':''; ?>><?php echo $BP_Group->name; ?></option>
<?php
}
?>
</select>
<br />
<em><?php _e ( 'Select a group you admin to attach this event to it. Note that all other admins of that group can modify the booking.', 'events-manager')?></em>
</p>
<?php if( is_super_admin() ): ?>
<p><em><?php _e ( 'As a site admin, you see all group events, users will only be able to choose groups they are admins of.', 'events-manager')?></em></p>
<?php endif;
}else{
?><p><em><?php _e('No groups defined yet.','events-manager'); ?></em></p><?php
}

View File

@ -1,128 +0,0 @@
<?php
global $EM_Event;
$required = apply_filters('em_required_html','<i>*</i>');
?>
<?php if( !get_option('dbem_require_location') && !get_option('dbem_use_select_for_locations') ): ?>
<div class="em-location-data-nolocation">
<p>
<input type="checkbox" name="no_location" id="no-location" value="1" <?php if( $EM_Event->location_id === '0' || $EM_Event->location_id === 0 ) echo 'checked="checked"'; ?> />
<?php _e('This event does not have a physical location.','events-manager'); ?>
</p>
<script type="text/javascript">
jQuery(document).ready(function($){
$('#no-location').change(function(){
if( $('#no-location').is(':checked') ){
$('#em-location-data').hide();
}else{
$('#em-location-data').show();
}
}).trigger('change');
});
</script>
</div>
<?php endif; ?>
<div id="em-location-data" class="em-location-data">
<div id="location_coordinates" style='display: none;'>
<input id='location-latitude' name='location_latitude' type='text' value='<?php echo esc_attr($EM_Event->get_location()->location_latitude); ?>' size='15' />
<input id='location-longitude' name='location_longitude' type='text' value='<?php echo esc_attr($EM_Event->get_location()->location_longitude); ?>' size='15' />
</div>
<?php if( get_option('dbem_use_select_for_locations') || !$EM_Event->can_manage('edit_locations','edit_others_locations') ) : ?>
<table class="em-location-data">
<tr class="em-location-data-select">
<th><?php esc_html_e('Location:','events-manager') ?> </th>
<td>
<select name="location_id" id='location-select-id' size="1">
<?php if(!get_option('dbem_require_location',true)): ?><option value="0"><?php esc_html_e('No Location','events-manager'); ?></option><?php endif; ?>
<?php
$ddm_args = array('blog'=>false, 'private'=>$EM_Event->can_manage('read_private_locations'));
$ddm_args['owner'] = (is_user_logged_in() && !current_user_can('read_others_locations')) ? get_current_user_id() : false;
$locations = EM_Locations::get($ddm_args);
$selected_location = !empty($EM_Event->location_id) || !empty($EM_Event->event_id) ? $EM_Event->location_id:get_option('dbem_default_location');
foreach($locations as $EM_Location) {
$selected = ($selected_location == $EM_Location->location_id) ? "selected='selected' " : '';
if( $selected ) $found_location = true;
?>
<option value="<?php echo esc_attr($EM_Location->location_id) ?>" title="<?php echo esc_attr("{$EM_Location->location_latitude},{$EM_Location->location_longitude}"); ?>" <?php echo $selected ?>><?php echo esc_html($EM_Location->location_name); ?></option>
<?php
}
if( empty($found_location) && !empty($EM_Event->location_id) ){
$EM_Location = $EM_Event->get_location();
if( $EM_Location->post_id ){
?>
<option value="<?php echo esc_attr($EM_Location->location_id) ?>" title="<?php echo esc_attr("{$EM_Location->location_latitude},{$EM_Location->location_longitude}"); ?>" selected="selected"><?php echo esc_html($EM_Location->location_name); ?></option>
<?php
}
}
?>
</select>
</td>
</tr>
</table>
<?php else : ?>
<table class="em-location-data">
<?php
global $EM_Location;
if( $EM_Event->location_id !== 0 ){
$EM_Location = $EM_Event->get_location();
}elseif(get_option('dbem_default_location') > 0){
$EM_Location = em_get_location(get_option('dbem_default_location'));
}else{
$EM_Location = new EM_Location();
}
?>
<tr class="em-location-data-name">
<th><?php _e ( 'Location Name:', 'events-manager')?></th>
<td>
<input id='location-id' name='location_id' type='hidden' value='<?php echo esc_attr($EM_Location->location_id); ?>' size='15' />
<input id="location-name" type="text" name="location_name" value="<?php echo esc_attr($EM_Location->location_name, ENT_QUOTES); ?>" /><?php echo $required; ?>
<br />
<em id="em-location-search-tip"><?php esc_html_e( 'Create a location or start typing to search a previously created location.', 'events-manager')?></em>
<em id="em-location-reset" style="display:none;"><?php esc_html_e('You cannot edit saved locations here.', 'events-manager'); ?> <a href="#"><?php esc_html_e('Reset this form to create a location or search again.', 'events-manager')?></a></em>
</td>
</tr>
<tr class="em-location-data-address">
<th><?php _e ( 'Address:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-address" type="text" name="location_address" value="<?php echo esc_attr($EM_Location->location_address); ; ?>" /><?php echo $required; ?>
</td>
</tr>
<tr class="em-location-data-town">
<th><?php _e ( 'City/Town:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-town" type="text" name="location_town" value="<?php echo esc_attr($EM_Location->location_town); ?>" /><?php echo $required; ?>
</td>
</tr>
<tr class="em-location-data-state">
<th><?php _e ( 'State/County:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-state" type="text" name="location_state" value="<?php echo esc_attr($EM_Location->location_state); ?>" />
</td>
</tr>
<tr class="em-location-data-postcode">
<th><?php _e ( 'Postcode:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-postcode" type="text" name="location_postcode" value="<?php echo esc_attr($EM_Location->location_postcode); ?>" />
</td>
</tr>
<tr class="em-location-data-region">
<th><?php _e ( 'Region:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-region" type="text" name="location_region" value="<?php echo esc_attr($EM_Location->location_region); ?>" />
</td>
</tr>
<tr class="em-location-data-country">
<th><?php _e ( 'Country:', 'events-manager')?>&nbsp;</th>
<td>
<select id="location-country" name="location_country">
<option value="0" <?php echo ( $EM_Location->location_country == '' && $EM_Location->location_id == '' && get_option('dbem_location_default_country') == '' ) ? 'selected="selected"':''; ?>><?php _e('none selected','events-manager'); ?></option>
<?php foreach(em_get_countries() as $country_key => $country_name): ?>
<option value="<?php echo esc_attr($country_key); ?>" <?php echo ( $EM_Location->location_country == $country_key || ($EM_Location->location_country == '' && $EM_Location->location_id == '' && get_option('dbem_location_default_country')==$country_key) ) ? 'selected="selected"':''; ?>><?php echo esc_html($country_name); ?></option>
<?php endforeach; ?>
</select><?php echo $required; ?>
</td>
</tr>
</table>
<?php endif; ?>
<?php if ( get_option( 'dbem_gmap_is_active' ) ) em_locate_template('forms/map-container.php',true); ?>
<br style="clear:both;" />
</div>

View File

@ -1,92 +0,0 @@
<?php
/* Used by the admin area to display recurring event time-related information - edit with caution */
global $EM_Event;
$days_names = em_get_days_names();
$hours_format = em_get_hour_format();
$classes = array();
?>
<div id="em-form-recurrence" class="event-form-recurrence event-form-when">
<p class="em-time-range">
<?php _e('Events start from','events-manager'); ?>
<input id="start-time" class="em-time-input em-time-start" type="text" size="8" maxlength="8" name="event_start_time" value="<?php echo date( $hours_format, $EM_Event->start ); ?>" />
<?php _e('to','events-manager'); ?>
<input id="end-time" class="em-time-input em-time-end" type="text" size="8" maxlength="8" name="event_end_time" value="<?php echo date( $hours_format, $EM_Event->end ); ?>" />
<?php _e('All day','events-manager'); ?> <input type="checkbox" class="em-time-allday" name="event_all_day" id="em-time-all-day" value="1" <?php if(!empty($EM_Event->event_all_day)) echo 'checked="checked"'; ?> />
</p>
<div class="<?php if( !empty($EM_Event->event_id) ) echo 'em-recurrence-reschedule'; ?>">
<?php if( !empty($EM_Event->event_id) ): ?>
<div class="recurrence-reschedule-warning">
<p><em><?php echo sprintf(esc_html__('Current Recurrence Pattern: %s', 'events-manager'), $EM_Event->get_recurrence_description()); ?></em></p>
<p><strong><?php esc_html_e( 'Modifications to event dates will cause all recurrences of this event to be deleted and recreated, previous bookings will be deleted.', 'events-manager'); ?></strong></p>
<p>
<a href="<?php echo esc_url( add_query_arg(array('scope'=>'all', 'recurrence_id'=>$EM_Event->event_id), em_get_events_admin_url()) ); ?>">
<strong><?php esc_html_e('You can edit individual recurrences and disassociate them with this recurring event.', 'events-manager'); ?></strong>
</a>
</p>
</div>
<?php endif; ?>
<div class="event-form-when-wrap <?php if( !empty($EM_Event->event_id) && empty($_REQUEST['reschedule']) ) echo 'reschedule-hidden'; ?>">
<?php _e ( 'This event repeats', 'events-manager'); ?>
<select id="recurrence-frequency" name="recurrence_freq">
<?php
$freq_options = array ("daily" => __ ( 'Daily', 'events-manager'), "weekly" => __ ( 'Weekly', 'events-manager'), "monthly" => __ ( 'Monthly', 'events-manager'), 'yearly' => __('Yearly','events-manager') );
em_option_items ( $freq_options, $EM_Event->recurrence_freq );
?>
</select>
<?php _e ( 'every', 'events-manager')?>
<input id="recurrence-interval" name='recurrence_interval' size='2' value='<?php echo $EM_Event->recurrence_interval ; ?>' />
<span class='interval-desc' id="interval-daily-singular"><?php _e ( 'day', 'events-manager')?></span>
<span class='interval-desc' id="interval-daily-plural"><?php _e ( 'days', 'events-manager') ?></span>
<span class='interval-desc' id="interval-weekly-singular"><?php _e ( 'week on', 'events-manager'); ?></span>
<span class='interval-desc' id="interval-weekly-plural"><?php _e ( 'weeks on', 'events-manager'); ?></span>
<span class='interval-desc' id="interval-monthly-singular"><?php _e ( 'month on the', 'events-manager')?></span>
<span class='interval-desc' id="interval-monthly-plural"><?php _e ( 'months on the', 'events-manager')?></span>
<span class='interval-desc' id="interval-yearly-singular"><?php _e ( 'year', 'events-manager')?></span>
<span class='interval-desc' id="interval-yearly-plural"><?php _e ( 'years', 'events-manager') ?></span>
<p class="alternate-selector" id="weekly-selector">
<?php
$saved_bydays = ($EM_Event->is_recurring() && $EM_Event->recurrence_byday != '' ) ? explode ( ",", $EM_Event->recurrence_byday ) : array();
em_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays );
?>
</p>
<p class="alternate-selector" id="monthly-selector" style="display:inline;">
<select id="monthly-modifier" name="recurrence_byweekno">
<?php
$weekno_options = array ("1" => __ ( 'first', 'events-manager'), '2' => __ ( 'second', 'events-manager'), '3' => __ ( 'third', 'events-manager'), '4' => __ ( 'fourth', 'events-manager'), '5' => __ ( 'fifth', 'events-manager'), '-1' => __ ( 'last', 'events-manager') );
em_option_items ( $weekno_options, $EM_Event->recurrence_byweekno );
?>
</select>
<select id="recurrence-weekday" name="recurrence_byday">
<?php em_option_items ( $days_names, $EM_Event->recurrence_byday ); ?>
</select>
<?php _e('of each month','events-manager'); ?>
&nbsp;
</p>
<div class="event-form-recurrence-when">
<p class="em-date-range">
<?php _e ( 'Recurrences span from ', 'events-manager'); ?>
<input class="em-date-start em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_start_date" value="<?php echo $EM_Event->event_start_date ?>" />
<?php _e('to','events-manager'); ?>
<input class="em-date-end em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_end_date" value="<?php echo $EM_Event->event_end_date ?>" />
</p>
<p class="em-duration-range">
<?php echo sprintf(__('Each event spans %s day(s)','events-manager'), '<input id="end-days" type="text" size="8" maxlength="8" name="recurrence_days" value="'. $EM_Event->recurrence_days .'" />'); ?>
</p>
<p class="em-range-description"><em><?php _e( 'For a recurring event, a one day event will be created on each recurring date within this date range.', 'events-manager'); ?></em></p>
</div>
</div>
<?php if( !empty($EM_Event->event_id) ): ?>
<div class="recurrence-reschedule-buttons">
<a href="<?php echo esc_url(add_query_arg('reschedule', null)); ?>" class="button-secondary em-button em-reschedule-cancel<?php if( empty($_REQUEST['reschedule']) ) echo ' reschedule-hidden'; ?>" data-target=".event-form-when-wrap">
<?php esc_html_e('Cancel Reschedule', 'events-manager'); ?>
</a>
<a href="<?php echo esc_url(add_query_arg('reschedule', '1')); ?>" class="em-reschedule-trigger em-button button-secondary<?php if( !empty($_REQUEST['reschedule']) ) echo ' reschedule-hidden'; ?>" data-target=".event-form-when-wrap">
<?php esc_html_e('Reschedule Recurring Event', 'events-manager'); ?>
</a>
<input type="hidden" name="event_reschedule" class="em-reschedule-value" value="<?php echo empty($_REQUEST['reschedule']) ? 0:1 ?>" />
</div>
<?php endif; ?>
</div>
</div>

View File

@ -1,88 +0,0 @@
<?php
/* Used by the buddypress and front-end editors to display event time-related information */
global $EM_Event;
$days_names = em_get_days_names();
$hours_format = em_get_hour_format();
$admin_recurring = is_admin() && $EM_Event->is_recurring();
?>
<!-- START recurrence postbox -->
<div id="em-form-with-recurrence" class="event-form-with-recurrence event-form-when">
<p><?php _e('This is a recurring event.', 'events-manager'); ?> <input type="checkbox" id="em-recurrence-checkbox" name="recurring" value="1" <?php if($EM_Event->is_recurring()) echo 'checked' ?> /></p>
<p class="em-date-range">
<span class="em-recurring-text"><?php _e ( 'Recurrences span from ', 'events-manager'); ?></span>
<span class="em-event-text"><?php _e ( 'From ', 'events-manager'); ?></span>
<input class="em-date-start em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_start_date" value="<?php echo $EM_Event->event_start_date ?>" />
<span class="em-recurring-text"><?php _e('to','events-manager'); ?></span>
<span class="em-event-text"><?php _e('to','events-manager'); ?></span>
<input class="em-date-end em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_end_date" value="<?php echo $EM_Event->event_end_date ?>" />
</p>
<p>
<span class="em-recurring-text"><?php _e('Events start from','events-manager'); ?></span>
<span class="em-event-text"><?php _e('Event starts at','events-manager'); ?></span>
<input id="start-time" class="em-time-input em-time-start" type="text" size="8" maxlength="8" name="event_start_time" value="<?php echo date( $hours_format, $EM_Event->start ); ?>" />
<?php _e('to','events-manager'); ?>
<input id="end-time" class="em-time-input em-time-end" type="text" size="8" maxlength="8" name="event_end_time" value="<?php echo date( $hours_format, $EM_Event->end ); ?>" />
<?php _e('All day','events-manager'); ?> <input type="checkbox" class="em-time-allday" name="event_all_day" id="em-time-all-day" value="1" <?php if(!empty($EM_Event->event_all_day)) echo 'checked="checked"'; ?> />
</p>
<div class="em-recurring-text">
<p>
<?php _e ( 'This event repeats', 'events-manager'); ?>
<select id="recurrence-frequency" name="recurrence_freq">
<?php
$freq_options = array ("daily" => __ ( 'Daily', 'events-manager'), "weekly" => __ ( 'Weekly', 'events-manager'), "monthly" => __ ( 'Monthly', 'events-manager'), 'yearly' => __('Yearly','events-manager') );
em_option_items ( $freq_options, $EM_Event->recurrence_freq );
?>
</select>
<?php _e ( 'every', 'events-manager')?>
<input id="recurrence-interval" name='recurrence_interval' size='2' value='<?php echo $EM_Event->recurrence_interval ; ?>' />
<span class='interval-desc' id="interval-daily-singular"><?php _e ( 'day', 'events-manager')?></span>
<span class='interval-desc' id="interval-daily-plural"><?php _e ( 'days', 'events-manager') ?></span>
<span class='interval-desc' id="interval-weekly-singular"><?php _e ( 'week on', 'events-manager'); ?></span>
<span class='interval-desc' id="interval-weekly-plural"><?php _e ( 'weeks on', 'events-manager'); ?></span>
<span class='interval-desc' id="interval-monthly-singular"><?php _e ( 'month on the', 'events-manager')?></span>
<span class='interval-desc' id="interval-monthly-plural"><?php _e ( 'months on the', 'events-manager')?></span>
<span class='interval-desc' id="interval-yearly-singular"><?php _e ( 'year', 'events-manager')?></span>
<span class='interval-desc' id="interval-yearly-plural"><?php _e ( 'years', 'events-manager') ?></span>
</p>
<p class="alternate-selector" id="weekly-selector">
<?php
$saved_bydays = ($EM_Event->is_recurring()) ? explode ( ",", $EM_Event->recurrence_byday ) : array();
em_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays );
?>
</p>
<p class="alternate-selector" id="monthly-selector" style="display:inline;">
<select id="monthly-modifier" name="recurrence_byweekno">
<?php
$weekno_options = array ("1" => __ ( 'first', 'events-manager'), '2' => __ ( 'second', 'events-manager'), '3' => __ ( 'third', 'events-manager'), '4' => __ ( 'fourth', 'events-manager'), '-1' => __ ( 'last', 'events-manager') );
em_option_items ( $weekno_options, $EM_Event->recurrence_byweekno );
?>
</select>
<select id="recurrence-weekday" name="recurrence_byday">
<?php em_option_items ( $days_names, $EM_Event->recurrence_byday ); ?>
</select>
<?php _e('of each month','events-manager'); ?>
</p>
<p class="em-duration-range">
<?php echo sprintf(__('Each event spans %s day(s)','events-manager'), '<input id="end-days" type="text" size="8" maxlength="8" name="recurrence_days" value="'. $EM_Event->recurrence_days .'" />'); ?>
</p>
<p class="em-range-description"><em><?php _e( 'For a recurring event, a one day event will be created on each recurring date within this date range.', 'events-manager'); ?></em></p>
</div>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready( function($) {
$('#em-recurrence-checkbox').change(function(){
if( $('#em-recurrence-checkbox').is(':checked') ){
$('.em-recurring-text').show();
$('.em-event-text').hide();
}else{
$('.em-recurring-text').hide();
$('.em-event-text').show();
}
});
$('#em-recurrence-checkbox').trigger('change');
});
//]]>
</script>
</div>

View File

@ -1,28 +0,0 @@
<?php
global $EM_Event, $post;
$hours_format = em_get_hour_format();
$required = apply_filters('em_required_html','<i>*</i>');
?>
<div class="event-form-when" id="em-form-when">
<p class="em-date-range">
<?php _e ( 'From ', 'events-manager'); ?>
<input class="em-date-start em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_start_date" value="<?php echo $EM_Event->event_start_date ?>" />
<?php _e('to','events-manager'); ?>
<input class="em-date-end em-date-input-loc" type="text" />
<input class="em-date-input" type="hidden" name="event_end_date" value="<?php echo $EM_Event->event_end_date ?>" />
</p>
<p class="em-time-range">
<span class="em-event-text"><?php _e('Event starts at','events-manager'); ?></span>
<input id="start-time" class="em-time-input em-time-start" type="text" size="8" maxlength="8" name="event_start_time" value="<?php echo date( $hours_format, $EM_Event->start ); ?>" />
<?php _e('to','events-manager'); ?>
<input id="end-time" class="em-time-input em-time-end" type="text" size="8" maxlength="8" name="event_end_time" value="<?php echo date( $hours_format, $EM_Event->end ); ?>" />
<?php _e('All day','events-manager'); ?> <input type="checkbox" class="em-time-all-day" name="event_all_day" id="em-time-all-day" value="1" <?php if(!empty($EM_Event->event_all_day)) echo 'checked="checked"'; ?> />
</p>
<span id='event-date-explanation'>
<?php _e( 'This event spans every day between the beginning and end date, with start/end times applying to each day.', 'events-manager'); ?>
</span>
</div>
<?php if( false && get_option('dbem_recurrence_enabled') && $EM_Event->is_recurrence() ) : //in future, we could enable this and then offer a detach option alongside, which resets the recurrence id and removes the attachment to the recurrence set ?>
<input type="hidden" name="recurrence_id" value="<?php echo $EM_Event->recurrence_id; ?>" />
<?php endif;

View File

@ -1,70 +0,0 @@
<?php
/* WARNING! This file may change in the near future as we intend to add features to the location editor. If at all possible, try making customizations using CSS, jQuery, or using our hooks and filters. - 2012-02-14 */
/*
* To ensure compatability, it is recommended you maintain class, id and form name attributes, unless you now what you're doing.
* You also must keep the _wpnonce hidden field in this form too.
*/
global $EM_Location, $EM_Notices;
//check that user can access this page
if( is_object($EM_Location) && !$EM_Location->can_manage('edit_locations','edit_others_locations') ){
?>
<div class="wrap"><h2><?php esc_html_e('Unauthorized Access','events-manager'); ?></h2><p><?php echo sprintf(__('You do not have the rights to manage this %s.','events-manager'),__('location','events-manager')); ?></p></div>
<?php
return false;
}elseif( !is_object($EM_Location) ){
$EM_Location = new EM_Location();
}
if(!is_admin()) echo $EM_Notices;
?>
<form enctype='multipart/form-data' id='location-form' method='post' action='<?php echo esc_url(add_query_arg(array('success'=>null))); ?>'>
<input type='hidden' name='action' value='location_save' />
<input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('location_save'); ?>' />
<input type='hidden' name='location_id' value='<?php echo $EM_Location->location_id ?>'/>
<?php do_action('em_front_location_form_header'); ?>
<h3 class="location-form-name"><?php esc_html_e( 'Location Name', 'events-manager'); ?></h3>
<div class="inside location-form-name">
<input name='location_name' id='location-name' type='text' value='<?php echo esc_attr($EM_Location->location_name, ENT_QUOTES); ?>' size='40' />
<br />
<?php esc_html_e('The name of the location', 'events-manager') ?>
</div>
<h3 class="location-form-where"><?php esc_html_e( 'Location', 'events-manager'); ?></h3>
<div class="inside location-form-where">
<?php em_locate_template('forms/location/where.php','events-manager'); ?>
</div>
<h3 class="location-form-details"><?php esc_html_e( 'Details', 'events-manager'); ?></h3>
<div class="inside location-form-details">
<?php if( get_option('dbem_events_form_editor') && function_exists('wp_editor') ): ?>
<?php wp_editor($EM_Location->post_content, 'em-editor-content', array('textarea_name'=>'content') ); ?>
<?php else: ?>
<textarea name="content" rows="10" style="width:100%"><?php echo $EM_Location->post_content; ?></textarea>
<br />
<?php esc_html_e( 'Details about the location.', 'events-manager')?> <?php esc_html_e( 'HTML Allowed.', 'events-manager')?>
<?php endif; ?>
</div>
<?php if(get_option('dbem_location_attributes_enabled')){ em_locate_template('forms/location/attributes-public.php',true); } ?>
<?php if( $EM_Location->can_manage('upload_event_images','upload_event_images') ): ?>
<h3 class="location-form-image"><?php esc_html_e( 'Location Image', 'events-manager'); ?></h3>
<div class="inside location-form-image" style="padding:10px;">
<?php em_locate_template('forms/location/featured-image-public.php',true); ?>
</div>
<?php endif; ?>
<?php do_action('em_front_location_form_footer'); ?>
<?php if( !empty($_REQUEST['redirect_to']) ): ?>
<input type="hidden" name="redirect_to" value="<?php echo esc_attr($_REQUEST['redirect_to']); ?>" />
<?php endif; ?>
<p class='submit'>
<?php if( empty($EM_Location->location_id) ): ?>
<input type='submit' class='button-primary' value='<?php echo esc_attr(sprintf( __('Submit %s','events-manager'), __('Location','events-manager') )); ?>' />
<?php else: ?>
<input type='submit' class='button-primary' value='<?php echo esc_attr(sprintf( __('Update %s','events-manager'), __('Location','events-manager') )); ?>' />
<?php endif; ?>
</p>
</form>

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is called by templates/forms/location-editor.php to display attribute fields on your location form on your website.
* You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/location/ and editing it there.
*/
global $EM_Location;
/* @var $EM_Location EM_Location */
$attributes = em_get_attributes(true); //lattributes only
$has_deprecated = false;
?>
<?php if( count( $attributes['names'] ) > 0 ) : ?>
<?php foreach( $attributes['names'] as $name) : ?>
<div class="location-attributes">
<label for="em_attributes[<?php echo $name ?>]"><?php echo $name ?></label>
<?php if( count($attributes['values'][$name]) > 1 ): ?>
<select name="em_attributes[<?php echo $name ?>]">
<?php foreach($attributes['values'][$name] as $attribute_val): ?>
<?php if( is_array($EM_Location->location_attributes) && array_key_exists($name, $EM_Location->location_attributes) && $EM_Location->location_attributes[$name]==$attribute_val ): ?>
<option selected="selected"><?php echo $attribute_val; ?></option>
<?php else: ?>
<option><?php echo $attribute_val; ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php else: ?>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo array_key_exists($name, $EM_Location->location_attributes) ? esc_attr($EM_Location->location_attributes[$name], ENT_QUOTES):''; ?>" />
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -1,89 +0,0 @@
<?php
global $EM_Location;
$attributes = em_get_attributes(true); //get Lattributes
$has_deprecated = false;
?>
<div id="location-attributes">
<?php if( !empty($attributes['names']) && count( $attributes['names'] ) > 0 ) : ?>
<table class="form-table">
<thead>
<tr valign="top">
<td><strong>Attribute Name</strong></td>
<td><strong>Value</strong></td>
</tr>
</thead>
<tbody id="mtm_body">
<?php
$count = 1;
foreach( $attributes['names'] as $name){
?>
<tr valign="top" id="em_attribute_<?php echo $count ?>">
<td scope="row"><?php echo $name ?></td>
<td>
<?php if( count($attributes['values'][$name]) > 1 ): ?>
<select name="em_attributes[<?php echo $name ?>]">
<?php foreach($attributes['values'][$name] as $attribute_val): ?>
<?php if( array_key_exists($name, $EM_Location->location_attributes) && $EM_Location->location_attributes[$name]==$attribute_val ): ?>
<option selected="selected"><?php echo $attribute_val; ?></option>
<?php else: ?>
<option><?php echo $attribute_val; ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php else: ?>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo array_key_exists($name, $EM_Location->location_attributes) ? esc_attr($EM_Location->location_attributes[$name], ENT_QUOTES):''; ?>" />
<?php endif; ?>
</td>
</tr>
<?php
$count++;
}
if($count == 1){
?>
<tr><td colspan="2"><?php echo sprintf(__("You don't have any custom attributes defined in any of your Locations Manager template settings. Please add them the <a href='%s'>settings page</a>",'events-manager'),EM_ADMIN_URL ."&amp;page=locations-manager-options"); ?></td></tr>
<?php
}
?>
</tbody>
</table>
<?php if( count(array_diff(array_keys($EM_Location->location_attributes), $attributes['names'])) > 0 ): ?>
<p><strong><?php _e('Deprecated Attributes', 'events-manager')?></strong></p>
<p><em><?php _e("If you see any attributes under here, that means they're not used in Locations Manager formats. To add them, you need to add the custom attribute again to a formatting option in the settings page. To remove any of these deprecated attributes, give it a blank value and save.",'events-manager') ?></em></p>
<table class="form-table">
<thead>
<tr valign="top">
<td><strong>Attribute Name</strong></td>
<td><strong>Value</strong></td>
</tr>
</thead>
<tbody id="mtm_body">
<?php
if( is_array($EM_Location->location_attributes) and count($EM_Location->location_attributes) > 0){
foreach( $EM_Location->location_attributes as $name => $value){
if( is_array($value) ) $value = serialize($value);
if( !in_array($name, $attributes['names']) ){
?>
<tr valign="top" id="em_attribute_<?php echo $count ?>">
<td scope="row"><?php echo $name ?></td>
<td>
<input type="text" name="em_attributes[<?php echo $name ?>]" value="<?php echo esc_attr($value, ENT_QUOTES); ?>" />
</td>
</tr>
<?php
$count++;
}
}
}
?>
</tbody>
</table>
<?php endif; ?>
<?php else : ?>
<p>
<?php _e('In order to use attributes, you must define some in your templates, otherwise they\'ll never show. Go to Events > Settings > General to add attribute placeholders.', 'events-manager'); ?>
</p>
<script>
jQuery(document).ready(function($){ $('#location_attributes').addClass('closed'); });
</script>
<?php endif; ?>
</div>

View File

@ -1,20 +0,0 @@
<?php
/*
* This file is called by templates/forms/location-editor.php to display fields for uploading images on your location form on your website. This does not affect the admin featured image section.
* You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/location/ and editing it there.
*/
global $EM_Location;
/* @var $EM_Location EM_Location */
?>
<p id="location-image-img">
<?php if ($EM_Location->get_image_url() != '') : ?>
<img src='<?php echo $EM_Location->get_image_url('medium'); ?>' alt='<?php echo $EM_Location->location_name ?>'/>
<?php else : ?>
<?php _e('No image uploaded for this location yet', 'events-manager') ?>
<?php endif; ?>
</p>
<label for='location_image'><?php _e('Upload/change picture', 'events-manager') ?></label> <input id='location-image' name='location_image' id='location_image' type='file' size='40' />
<br />
<?php if ($EM_Location->get_image_url() != '') : ?>
<label for='location_image_delete'><?php _e('Delete Image?', 'events-manager') ?></label> <input id='location-image-delete' name='location_image_delete' id='location_image_delete' type='checkbox' value='1' />
<?php endif; ?>

View File

@ -1,58 +0,0 @@
<?php
global $EM_Location, $post;
$required = apply_filters('em_required_html','<i>*</i>');
?>
<?php if ( get_option( 'dbem_gmap_is_active' ) ): ?>
<p class="em-location-data-maps-tip"><?php _e("If you're using the Google Maps, the more detail you provide, the more accurate Google can be at finding your location. If your address isn't being found, please <a href='http://maps.google.com'>try it on maps.google.com</a> by adding all the fields below separated by commas.",'events-manager')?></p>
<?php endif; ?>
<div id="em-location-data" class="em-location-data">
<table class="em-location-data">
<tr class="em-location-data-address">
<th><?php _e ( 'Address:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-address" type="text" name="location_address" value="<?php echo esc_attr($EM_Location->location_address, ENT_QUOTES); ; ?>" /> <?php echo $required; ?>
</td>
</tr>
<tr class="em-location-data-town">
<th><?php _e ( 'City/Town:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-town" type="text" name="location_town" value="<?php echo esc_attr($EM_Location->location_town, ENT_QUOTES); ?>" /> <?php echo $required; ?>
</td>
</tr>
<tr class="em-location-data-state">
<th><?php _e ( 'State/County:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-state" type="text" name="location_state" value="<?php echo esc_attr($EM_Location->location_state, ENT_QUOTES); ?>" />
</td>
</tr>
<tr class="em-location-data-postcode">
<th><?php _e ( 'Postcode:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-postcode" type="text" name="location_postcode" value="<?php echo esc_attr($EM_Location->location_postcode, ENT_QUOTES); ?>" />
</td>
</tr>
<tr class="em-location-data-region">
<th><?php _e ( 'Region:', 'events-manager')?>&nbsp;</th>
<td>
<input id="location-region" type="text" name="location_region" value="<?php echo esc_attr($EM_Location->location_region, ENT_QUOTES); ?>" />
<input id="location-region-wpnonce" type="hidden" value="<?php echo wp_create_nonce('search_regions'); ?>" />
</td>
</tr>
<tr class="em-location-data-country">
<th><?php _e ( 'Country:', 'events-manager')?>&nbsp;</th>
<td>
<select id="location-country" name="location_country">
<?php foreach(em_get_countries(__('none selected','events-manager')) as $country_key => $country_name): ?>
<option value="<?php echo $country_key; ?>" <?php echo ( $EM_Location->location_country === $country_key || ($EM_Location->location_country == '' && $EM_Location->location_id == '' && get_option('dbem_location_default_country')==$country_key) ) ? 'selected="selected"':''; ?>><?php echo $country_name; ?></option>
<?php endforeach; ?>
</select> <?php echo $required; ?>
</td>
</tr>
</table>
<?php if ( get_option( 'dbem_gmap_is_active' ) ) em_locate_template('forms/map-container.php',true); ?>
<br style="clear:both; " />
<div id="location_coordinates" style='display: none;'>
<input id='location-latitude' name='location_latitude' type='text' value='<?php echo $EM_Location->location_latitude; ?>' size='15' />
<input id='location-longitude' name='location_longitude' type='text' value='<?php echo $EM_Location->location_longitude; ?>' size='15' />
</div>
</div>

View File

@ -1,6 +0,0 @@
<div class="em-location-map-container">
<div id='em-map-404' class="em-location-map-404">
<p><em><?php _e ( 'Location not found', 'events-manager'); ?></em></p>
</div>
<div id='em-map' class="em-location-map-content" style='display: none;'></div>
</div>

View File

@ -1,13 +0,0 @@
This folder contains specific forms used throughout EM.
CAREFUL!! If you do override these files, make sure you keep form IDs, actions, filters and other php code of that nature.
Doing this could prevent the form from working properly.
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/forms/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,3 +0,0 @@
<?php
//DEPRECATED, MODIFY THE INCLUDED TEMPLATE INSTEAD
em_locate_template('forms/event/bookings-ticket-form.php', true);

View File

@ -1,2 +0,0 @@
<?php
//DEPRECATED, now only using event/bookings-ticket-form.php

View File

@ -1,20 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$people = array();
$EM_Bookings = $EM_Event->get_bookings();
if( count($EM_Bookings->bookings) > 0 ){
?>
<ul class="event-attendees">
<?php
foreach( $EM_Bookings as $EM_Booking){ /* @var $EM_Booking EM_Booking */
if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
$people[] = $EM_Booking->get_person()->ID;
echo '<li>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</li>';
}elseif($EM_Booking->booking_status == 1 && $EM_Booking->is_no_user() ){
echo '<li>'. get_avatar($EM_Booking->get_person()->ID, 50) .'</li>';
}
}
?>
</ul>
<?php
}

View File

@ -1,20 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$people = array();
$EM_Bookings = $EM_Event->get_bookings();
if( count($EM_Bookings->bookings) > 0 ){
?>
<ul class="event-attendees">
<?php
foreach( $EM_Bookings as $EM_Booking){ /* @var $EM_Booking EM_Booking */
if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
$people[] = $EM_Booking->get_person()->ID;
echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
}elseif($EM_Booking->booking_status == 1 && $EM_Booking->is_no_user() ){
echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
}
}
?>
</ul>
<?php
}

View File

@ -1,20 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$people = array();
$EM_Bookings = $EM_Event->get_bookings();
if( count($EM_Bookings->bookings) > 0 ){
?>
<ul class="event-attendees">
<?php
foreach( $EM_Bookings as $EM_Booking){ /* @var $EM_Booking EM_Booking */
if( $EM_Booking->is_pending() && !in_array($EM_Booking->get_person()->ID, $people) ){
$people[] = $EM_Booking->get_person()->ID;
echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
}elseif( $EM_Booking->is_pending() && $EM_Booking->is_no_user() ){
echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
}
}
?>
</ul>
<?php
}

View File

@ -1,34 +0,0 @@
<?php
/*
* You can override this by copying this file to wp-content/themesyourthemefolder/plugins/events-manager/placeholders/ and modifying it however you need.
* There are a few variables made available to you:
*
* $EM_Event - EM_Event object
*/
$notice_full = get_option('dbem_booking_button_msg_full');
$button_text = get_option('dbem_booking_button_msg_book');
$button_already_booked = get_option('dbem_booking_button_msg_already_booked');
$button_closed = get_option('dbem_booking_button_msg_closed');
$button_cancel = get_option('dbem_booking_button_msg_cancel');
/* @var $EM_Event EM_Event */
?>
<?php
if( is_user_logged_in() ){ //only show this to logged in users
ob_start();
$EM_Booking = $EM_Event->get_bookings()->has_booking();
if( is_object($EM_Booking) && $EM_Booking->booking_status != 3 && get_option('dbem_bookings_user_cancellation') ){
?><a id="em-cancel-button_<?php echo $EM_Booking->booking_id; ?>_<?php echo wp_create_nonce('booking_cancel'); ?>" class="button em-cancel-button" href="#"><?php echo $button_cancel; ?></a><?php
}elseif( $EM_Event->get_bookings()->is_open() ){
if( !is_object($EM_Booking) ){
?><a id="em-booking-button_<?php echo $EM_Event->event_id; ?>_<?php echo wp_create_nonce('booking_add_one'); ?>" class="button em-booking-button" href="#"><?php echo $button_text; ?></a><?php
}else{
?><span class="em-booked-button"><?php echo $button_already_booked ?></span><?php
}
}elseif( $EM_Event->get_bookings()->get_available_spaces() <= 0 ){
?><span class="em-full-button"><?php echo $notice_full ?></span><?php
}else{
?><span class="em-closed-button"><?php echo $button_closed ?></span><?php
}
echo apply_filters( 'em_booking_button', ob_get_clean(), $EM_Event );
};
?>

View File

@ -1,108 +0,0 @@
<?php
/*
* This is where the booking form is generated.
* For non-advanced users, It's SERIOUSLY NOT recommended you edit this form directly if avoidable, as you can change booking form settings in various less obtrusive and upgrade-safe ways:
* - check your booking form options panel in the Booking Options tab in your settings.
* - use CSS or jQuery to change the look of your booking forms
* - edit the files in the forms/bookingform folder individually instead of this file, to make it more upgrade-safe
* - hook into WP action/filters below to modify/generate information
* Again, even if you're an advanced user, consider NOT editing this form and using other methods instead.
*/
/* @var $EM_Event EM_Event */
global $EM_Notices;
//count tickets and available tickets
$tickets_count = count($EM_Event->get_bookings()->get_tickets()->tickets);
$available_tickets_count = count($EM_Event->get_bookings()->get_available_tickets());
//decide whether user can book, event is open for bookings etc.
$can_book = is_user_logged_in() || (get_option('dbem_bookings_anonymous') && !is_user_logged_in());
$is_open = $EM_Event->get_bookings()->is_open(); //whether there are any available tickets right now
$show_tickets = true;
//if user is logged out, check for member tickets that might be available, since we should ask them to log in instead of saying 'bookings closed'
if( !$is_open && !is_user_logged_in() && $EM_Event->get_bookings()->is_open(true) ){
$is_open = true;
$can_book = false;
$show_tickets = get_option('dbem_bookings_tickets_show_unavailable') && get_option('dbem_bookings_tickets_show_member_tickets');
}
?>
<div id="em-booking" class="em-booking <?php if( get_option('dbem_css_rsvp') ) echo 'css-booking'; ?>">
<?php
// We are firstly checking if the user has already booked a ticket at this event, if so offer a link to view their bookings.
$EM_Booking = $EM_Event->get_bookings()->has_booking();
?>
<?php if( is_object($EM_Booking) && !get_option('dbem_bookings_double') ): //Double bookings not allowed ?>
<p>
<?php echo get_option('dbem_bookings_form_msg_attending'); ?>
<a href="<?php echo em_get_my_bookings_url(); ?>"><?php echo get_option('dbem_bookings_form_msg_bookings_link'); ?></a>
</p>
<?php elseif( !$EM_Event->event_rsvp ): //bookings not enabled ?>
<p><?php echo get_option('dbem_bookings_form_msg_disabled'); ?></p>
<?php elseif( $EM_Event->get_bookings()->get_available_spaces() <= 0 ): ?>
<p><?php echo get_option('dbem_bookings_form_msg_full'); ?></p>
<?php elseif( !$is_open ): //event has started ?>
<p><?php echo get_option('dbem_bookings_form_msg_closed'); ?></p>
<?php else: ?>
<?php echo $EM_Notices; ?>
<?php if( $tickets_count > 0) : ?>
<?php //Tickets exist, so we show a booking form. ?>
<form class="em-booking-form" name='booking-form' method='post' action='<?php echo apply_filters('em_booking_form_action_url',''); ?>#em-booking'>
<input type='hidden' name='action' value='booking_add'/>
<input type='hidden' name='event_id' value='<?php echo $EM_Event->get_bookings()->event_id; ?>'/>
<input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_add'); ?>'/>
<?php
// Tickets Form
if( $show_tickets && ($can_book || get_option('dbem_bookings_tickets_show_loggedout')) && ($tickets_count > 1 || get_option('dbem_bookings_tickets_single_form')) ){ //show if more than 1 ticket, or if in forced ticket list view mode
do_action('em_booking_form_before_tickets', $EM_Event); //do not delete
//Show multiple tickets form to user, or single ticket list if settings enable this
//If logged out, can be allowed to see this in settings witout the register form
em_locate_template('forms/bookingform/tickets-list.php',true, array('EM_Event'=>$EM_Event));
do_action('em_booking_form_after_tickets', $EM_Event); //do not delete
$show_tickets = false;
}
?>
<?php if( $can_book ): ?>
<div class='em-booking-form-details'>
<?php
if( $show_tickets && $available_tickets_count == 1 && !get_option('dbem_bookings_tickets_single_form') ){
do_action('em_booking_form_before_tickets', $EM_Event); //do not delete
//show single ticket form, only necessary to show to users able to book (or guests if enabled)
$EM_Ticket = $EM_Event->get_bookings()->get_available_tickets()->get_first();
em_locate_template('forms/bookingform/ticket-single.php',true, array('EM_Event'=>$EM_Event, 'EM_Ticket'=>$EM_Ticket));
do_action('em_booking_form_after_tickets', $EM_Event); //do not delete
}
?>
<?php
do_action('em_booking_form_before_user_details', $EM_Event);
if( has_action('em_booking_form_custom') ){
//Pro Custom Booking Form. You can create your own custom form by hooking into this action and setting the option above to true
do_action('em_booking_form_custom', $EM_Event); //do not delete
}else{
//If you just want to modify booking form fields, you could do so here
em_locate_template('forms/bookingform/booking-fields.php',true, array('EM_Event'=>$EM_Event));
}
do_action('em_booking_form_after_user_details', $EM_Event);
?>
<?php do_action('em_booking_form_footer', $EM_Event); //do not delete ?>
<div class="em-booking-buttons">
<?php if( preg_match('/https?:\/\//',get_option('dbem_bookings_submit_button')) ): //Settings have an image url (we assume). Use it here as the button.?>
<input type="image" src="<?php echo get_option('dbem_bookings_submit_button'); ?>" class="em-booking-submit" id="em-booking-submit" />
<?php else: //Display normal submit button ?>
<input type="submit" class="em-booking-submit" id="em-booking-submit" value="<?php echo esc_attr(get_option('dbem_bookings_submit_button')); ?>" />
<?php endif; ?>
</div>
<?php do_action('em_booking_form_footer_after_buttons', $EM_Event); //do not delete ?>
</div>
<?php else: ?>
<p class="em-booking-form-details"><?php echo get_option('dbem_booking_feedback_log_in'); ?></p>
<?php endif; ?>
</form>
<?php
if( !is_user_logged_in() && get_option('dbem_bookings_login_form') ){
//User is not logged in, show login form (enabled on settings page)
em_locate_template('forms/bookingform/login.php',true, array('EM_Event'=>$EM_Event));
}
?>
<br class="clear" style="clear:left;" />
<?php endif; ?>
<?php endif; ?>
</div>

View File

@ -1,14 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$count_cats = count($EM_Event->get_categories()->categories) > 0;
if( $count_cats > 0 ){
?>
<ul class="event-categories">
<?php foreach($EM_Event->get_categories() as $EM_Category): ?>
<li><?php echo $EM_Category->output("#_CATEGORYLINK"); ?></li>
<?php endforeach; ?>
</ul>
<?php
}else{
echo get_option ( 'dbem_no_categories_message' );
}

View File

@ -1,20 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$count_cats = count($EM_Event->get_categories()->categories) > 0;
if( $count_cats > 0 ){
$one_image = false;
?>
<ul class="event-categories-images">
<?php foreach($EM_Event->get_categories() as $EM_Category): /* @var $EM_Category EM_Category */ ?>
<?php if( $EM_Category->get_image_url() != '' ): ?>
<li><?php echo $EM_Category->output('<a href="#_CATEGORYURL" title="#_CATEGORYNAME">#_CATEGORYIMAGE</a>'); $one_image = true; ?></li>
<?php endif; ?>
<?php endforeach; ?>
<?php if (!$one_image): ?>
<li><?php echo get_option ( 'dbem_no_categories_message' ); ?></li>
<?php endif; ?>
</ul>
<?php
}else{
echo get_option ( 'dbem_no_categories_message' );
}

View File

@ -1,12 +0,0 @@
<?php
/* @var $EM_Event EM_Event */
$tags = get_the_terms($EM_Event->post_id, EM_TAXONOMY_TAG);
if( is_array($tags) && count($tags) > 0 ){
$tags_list = array();
foreach($tags as $tag){
$link = get_term_link($tag->slug, EM_TAXONOMY_TAG);
if ( is_wp_error($link) ) $link = '';
$tags_list[] = '<a href="'. $link .'">'. $tag->name .'</a>';
}
echo implode(', ', $tags_list);
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file contains the HTML generated for a single location Google map. You can copy this file to yourthemefolder/plugins/events/templates and modify it in an upgrade-safe manner.
*
* There is one argument passed to you, which is the $args variable. This contains the arguments you could pass into shortcodes, template tags or functions like EM_Events::get().
*
* In this template, we encode the $args array into JSON for javascript to easily parse and request the locations from the server via AJAX.
*/
/* @var $EM_Location EM_Location */
if ( get_option('dbem_gmap_is_active') && ( is_object($EM_Location) && $EM_Location->location_latitude != 0 && $EM_Location->location_longitude != 0 ) ) {
//get dimensions with px or % added in
$width = (!empty($args['width'])) ? $args['width']:get_option('dbem_map_default_width','400px');
$width = preg_match('/(px)|%/', $width) ? $width:$width.'px';
$height = (!empty($args['height'])) ? $args['height']:get_option('dbem_map_default_height','300px');
$height = preg_match('/(px)|%/', $height) ? $height:$height.'px';
//assign random number for element id reference
$rand = substr(md5(rand().rand()),0,5);
?>
<div class="em-location-map-container" style='position:relative; background: #CDCDCD; width: <?php echo $width ?>; height: <?php echo $height ?>;'>
<div class='em-location-map' id='em-location-map-<?php echo $rand ?>' style="width: 100%; height: 100%;">
<?php _e('Loading Map....', 'events-manager'); ?>
</div>
</div>
<div class='em-location-map-info' id='em-location-map-info-<?php echo $rand ?>' style="display:none; visibility:hidden;">
<div class="em-map-balloon" style="font-size:12px;">
<div class="em-map-balloon-content" ><?php echo $EM_Location->output(get_option('dbem_location_baloon_format')); ?></div>
</div>
</div>
<div class='em-location-map-coords' id='em-location-map-coords-<?php echo $rand ?>' style="display:none; visibility:hidden;">
<span class="lat"><?php echo $EM_Location->location_latitude; ?></span>
<span class="lng"><?php echo $EM_Location->location_longitude; ?></span>
</div>
<?php
}elseif( is_object($EM_Location) && $EM_Location->location_latitude == 0 && $EM_Location->location_longitude == 0 ){
echo '<i>'. __('Map Unavailable', 'events-manager') .'</i>';
}

View File

@ -1,12 +0,0 @@
This folder has files containing some of the more complex placeholders output information.
Files in this folder are loaded automatically by the corresponding object and make certain variables available to them (see individual files for examples).
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/placeholders/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,16 +0,0 @@
This folder has files containing various templates which events manager uses to output its information.
Almost every aspect of the public interface (and some parts of the admin interface!) can be modified. Please individual folders for more information
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to "wp-content/themes/yourtheme/plugins/events-manager/filepath within this folder/" and edit as needed.
For example:
copy templates/events-single.php
to wp-content/themes/yourtheme/plugins/events-manager/templates/events-single.php
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,180 +0,0 @@
<?php
//TODO Simplify panel for events, use form flags to detect certain actions (e.g. submitted, etc)
global $wpdb, $bp, $EM_Notices;
/* @var $args array */
/* @var $EM_Events array */
/* @var $events_count int */
/* @var $future_count int */
/* @var $past_count int */
/* @var $pending_count int */
/* @var $url string */
/* @var $show_add_new bool */
/* @var $limit int */
//add new button will only appear if called from em_event_admin template tag, or if the $show_add_new var is set
?>
<div class="em-events-admin-list">
<?php
echo $EM_Notices;
if(!empty($show_add_new) && current_user_can('edit_events')) echo '<a class="em-button button add-new-h2" href="'.em_add_get_params($_SERVER['REQUEST_URI'],array('action'=>'edit','scope'=>null,'status'=>null,'event_id'=>null, 'success'=>null)).'">'.__('Add New','events-manager').'</a>';
?>
<form id="posts-filter" action="" method="get">
<div class="subsubsub">
<?php $default_params = array('scope'=>null,'status'=>null,'em_search'=>null,'pno'=>null); //template for cleaning the link for each view below ?>
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], $default_params + array('view'=>'future')); ?>' <?php echo ( !isset($_GET['view']) ) ? 'class="current"':''; ?>><?php _e ( 'Upcoming', 'events-manager'); ?> <span class="count">(<?php echo $future_count; ?>)</span></a> &nbsp;|&nbsp;
<?php if( $pending_count > 0 ): ?>
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], $default_params + array('view'=>'pending')); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'pending' ) ? 'class="current"':''; ?>><?php _e ( 'Pending', 'events-manager'); ?> <span class="count">(<?php echo $pending_count; ?>)</span></a> &nbsp;|&nbsp;
<?php endif; ?>
<?php if( $draft_count > 0 ): ?>
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], $default_params + array('view'=>'draft')); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'draft' ) ? 'class="current"':''; ?>><?php _e ( 'Draft', 'events-manager'); ?> <span class="count">(<?php echo $draft_count; ?>)</span></a> &nbsp;|&nbsp;
<?php endif; ?>
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], $default_params + array('view'=>'past')); ?>' <?php echo ( isset($_GET['view']) && $_GET['view'] == 'past' ) ? 'class="current"':''; ?>><?php _e ( 'Past Events', 'events-manager'); ?> <span class="count">(<?php echo $past_count; ?>)</span></a>
</div>
<p class="search-box">
<label class="screen-reader-text" for="post-search-input"><?php _e('Search Events','events-manager'); ?>:</label>
<input type="text" id="post-search-input" name="em_search" value="<?php echo (!empty($_REQUEST['em_search'])) ? esc_attr($_REQUEST['em_search']):''; ?>" />
<?php if( !empty($_REQUEST['view']) ): ?>
<input type="hidden" name="view" value="<?php echo esc_attr($_REQUEST['view']); ?>" />
<?php endif; ?>
<input type="submit" value="<?php _e('Search Events','events-manager'); ?>" class="button" />
</p>
<div class="tablenav">
<?php
if ( $events_count >= $limit ) {
$events_nav = em_admin_paginate( $events_count, $limit, $page);
echo $events_nav;
}
?>
<br class="clear" />
</div>
<?php
if ( empty($EM_Events) ) {
echo get_option ( 'dbem_no_events_message' );
} else {
?>
<table class="widefat events-table">
<thead>
<tr>
<?php /*
<th class='manage-column column-cb check-column' scope='col'>
<input class='select-all' type="checkbox" value='1' />
</th>
*/ ?>
<th><?php _e ( 'Name', 'events-manager'); ?></th>
<th>&nbsp;</th>
<th><?php _e ( 'Location', 'events-manager'); ?></th>
<th colspan="2"><?php _e ( 'Date and time', 'events-manager'); ?></th>
</tr>
</thead>
<tbody>
<?php
$rowno = 0;
foreach ( $EM_Events as $EM_Event ) {
/* @var $EM_Event EM_Event */
$rowno++;
$class = ($rowno % 2) ? 'alternate' : '';
// FIXME set to american
$localised_start_date = date_i18n(get_option('dbem_date_format'), $EM_Event->start);
$localised_end_date = date_i18n(get_option('dbem_date_format'), $EM_Event->end);
$style = "";
$today = current_time('timestamp');
$location_summary = "<b>" . esc_html($EM_Event->get_location()->location_name) . "</b><br/>" . esc_html($EM_Event->get_location()->location_address) . " - " . esc_html($EM_Event->get_location()->location_town);
if ($EM_Event->start < $today && $EM_Event->end < $today){
$class .= " past";
}
//Check pending approval events
if ( !$EM_Event->get_status() ){
$class .= " pending";
}
?>
<tr class="event <?php echo trim($class); ?>" <?php echo $style; ?> id="event_<?php echo $EM_Event->event_id ?>">
<?php /*
<td>
<input type='checkbox' class='row-selector' value='<?php echo $EM_Event->event_id; ?>' name='events[]' />
</td>
*/ ?>
<td>
<strong>
<?php echo esc_html($EM_Event->event_name); ?>
<!--<a class="row-title" href="<?php echo esc_url($EM_Event->get_edit_url()); ?>"><?php echo esc_html($EM_Event->event_name); ?></a>-->
</strong>
<?php
if( get_option('dbem_rsvp_enabled') == 1 && $EM_Event->event_rsvp == 1 ){
?>
<br/>
<a href="<?php echo $EM_Event->get_bookings_url(); ?>"><?php esc_html_e("Bookings",'events-manager'); ?></a> &ndash;
<?php esc_html_e("Booked",'events-manager'); ?>: <?php echo $EM_Event->get_bookings()->get_booked_spaces()."/".$EM_Event->get_spaces(); ?>
<?php if( get_option('dbem_bookings_approval') == 1 ): ?>
| <?php _e("Pending",'events-manager') ?>: <?php echo $EM_Event->get_bookings()->get_pending_spaces(); ?>
<?php endif;
}
?>
<div class="row-actions">
<?php if( current_user_can('delete_events')) : ?>
<span class="trash"><a href="<?php echo esc_url(add_query_arg(array('action'=>'event_delete', 'event_id'=>$EM_Event->event_id, '_wpnonce'=> wp_create_nonce('event_delete_'.$EM_Event->event_id)))); ?>" class="em-event-delete"><?php _e('Delete','events-manager'); ?></a></span>
<?php endif; ?>
</div>
</td>
<td>
<a href="<?php echo $EM_Event->duplicate_url(); ?>" title="<?php _e ( 'Duplicate this event', 'events-manager'); ?>">
<strong>+</strong>
</a>
</td>
<td>
<?php echo $location_summary; ?>
</td>
<td>
<?php echo $localised_start_date; ?>
<?php echo ($localised_end_date != $localised_start_date) ? " - $localised_end_date":'' ?>
<br />
<?php
if(!$EM_Event->event_all_day){
echo date_i18n(get_option('time_format'), $EM_Event->start) . " - " . date_i18n(get_option('time_format'), $EM_Event->end);
}else{
echo get_option('dbem_event_all_day_message');
}
?>
</td>
<td>
<?php
if ( $EM_Event->is_recurrence() ) {
$recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager');
?>
<strong>
<?php echo $EM_Event->get_recurrence_description(); ?> <br />
<a href="<?php echo esc_url($EM_Event->get_edit_reschedule_url()); ?>"><?php _e ( 'Edit Recurring Events', 'events-manager'); ?></a>
<?php if( current_user_can('delete_events')) : ?>
<span class="trash"><a href="<?php echo esc_url(add_query_arg(array('action'=>'event_delete', 'event_id'=>$EM_Event->recurrence_id, '_wpnonce'=> wp_create_nonce('event_delete_'.$EM_Event->recurrence_id)))); ?>" class="em-event-rec-delete" onclick ="if( !confirm('<?php echo $recurrence_delete_confirm; ?>') ){ return false; }"><?php _e('Delete','events-manager'); ?></a></span>
<?php endif; ?>
</strong>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
} // end of table
?>
<div class='tablenav'>
<div class="alignleft actions">
<br class='clear' />
</div>
<?php if ( $events_count >= $limit ) : ?>
<div class="tablenav-pages">
<?php
echo $events_nav;
?>
</div>
<?php endif; ?>
<br class='clear' />
</div>
</form>
</div>

View File

@ -1,94 +0,0 @@
<?php
global $wpdb, $EM_Notices;
//add new button will only appear if called from em_location_admin template tag, or if the $show_add_new var is set
if(!empty($show_add_new) && current_user_can('edit_locations')) echo '<a class="em-button button add-new-h2" href="'.em_add_get_params($_SERVER['REQUEST_URI'],array('action'=>'edit','scope'=>null,'status'=>null,'location_id'=>null)).'">'.__('Add New','events-manager').'</a>';
?>
<div class="em-locations-admin-list">
<?php if(!is_admin()) echo $EM_Notices; ?>
<form id='locations-filter' method='post' action=''>
<input type='hidden' name='pno' value='<?php echo esc_attr($page) ?>' />
<div class="subsubsub">
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], array('view'=>null, 'pno'=>null)); ?>' <?php echo ( empty($_REQUEST['view']) ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'My %s', 'events-manager'), __('Locations','events-manager')); ?> <span class="count">(<?php echo $locations_mine_count; ?>)</span></a>
<?php if( current_user_can('read_others_locations') ): ?>
&nbsp;|&nbsp;
<a href='<?php echo em_add_get_params($_SERVER['REQUEST_URI'], array('view'=>'others', 'pno'=>null)); ?>' <?php echo ( !empty($_REQUEST['view']) && $_REQUEST['view'] == 'others' ) ? 'class="current"':''; ?>><?php echo sprintf( __( 'All %s', 'events-manager'), __('Locations','events-manager')); ?><span class="count">(<?php echo $locations_all_count; ?>)</span></a>
<?php endif; ?>
</div>
<?php if ( $locations_count > 0 ) : ?>
<div class='tablenav'>
<?php if( (empty($_REQUEST['view']) && current_user_can('delete_events')) || (!empty($_REQUEST['view']) && $_REQUEST['view'] == 'others' && current_user_can('delete_others_events')) ): ?>
<div class="alignleft actions">
<select name="action">
<option value="" selected="selected"><?php _e ( 'Bulk Actions', 'events-manager'); ?></option>
<?php if( empty($_REQUEST['view']) && current_user_can('delete_events') ) : ?>
<option value="location_delete"><?php _e ( 'Delete selected','events-manager'); ?></option>
<?php endif; ?>
</select>
<input type="submit" value="<?php _e ( 'Apply' ); ?>" id="doaction2" class="button-secondary action" />
</div>
<?php else: $hide_checkboxes = true; /* @todo this and the first condition of this if statement will need to change when other bulk actions are added */ ?>
<?php endif; ?>
<?php
if ( $locations_count >= $limit ) {
$locations_nav = em_admin_paginate( $locations_count, $limit, $page );
echo $locations_nav;
}
?>
</div>
<table class='widefat'>
<thead>
<tr>
<?php if(empty($hide_checkboxes)): ?>
<th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>
<?php endif; ?>
<th><?php _e('Name', 'events-manager') ?></th>
<th><?php _e('Address', 'events-manager') ?></th>
<th><?php _e('State', 'events-manager') ?></th>
<th><?php _e('Country', 'events-manager') ?></th>
</tr>
</thead>
<tfoot>
<tr>
<?php if(empty($hide_checkboxes)): ?>
<th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th>
<?php endif; ?>
<th><?php _e('Name', 'events-manager') ?></th>
<th><?php _e('Address', 'events-manager') ?></th>
<th><?php _e('State', 'events-manager') ?></th>
<th><?php _e('Country', 'events-manager') ?></th>
</tr>
</tfoot>
<tbody>
<?php $rowno = 0; ?>
<?php foreach ($locations as $EM_Location) : ?>
<?php
$class = ($rowno % 2) ? 'alternate' : '';
$rowno++;
?>
<tr class="<?php echo $class; ?>">
<?php if(empty($hide_checkboxes)): ?>
<td><input type='checkbox' class ='row-selector' value='<?php echo $EM_Location->location_id ?>' name='locations[]'/></td>
<?php endif; ?>
<td>
<?php if( $EM_Location->can_manage('edit_events','edit_others_events') ): ?>
<a href='<?php echo esc_url($EM_Location->get_edit_url()); ?>'><?php echo esc_html($EM_Location->location_name); ?></a>
<?php else: ?>
<strong><?php echo esc_html($EM_Location->location_name) ?></strong> -
<a href='<?php echo $EM_Location->output('#_LOCATIONURL'); ?>'><?php esc_html_e('View') ?></a>
<?php endif; ?>
</td>
<td><?php echo esc_html(implode(', ', array($EM_Location->location_address,$EM_Location->location_town,$EM_Location->location_postcode))); ?></td>
<td><?php echo esc_html($EM_Location->location_state) ?></td>
<td><?php echo $EM_Location->get_country() ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<br class="clear" />
<p><?php esc_html_e('No locations have been inserted yet!', 'events-manager') ?></p>
<?php endif; ?>
<?php if ( !empty($locations_nav) ) echo $locations_nav; ?>
</form>
</div>

View File

@ -1,10 +0,0 @@
This folder has files containing table output layouts, such as event and location admin tables for the public pages.
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/tables/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,55 +0,0 @@
<?php
/*
* This page displays a printable view of bookings for a single event.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* Here you can assume that $EM_Event is globally available with the right EM_Event object.
*/
global $EM_Event;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php echo sprintf(__('Bookings for %s','events-manager'), $EM_Event->name); ?></title>
<link rel="stylesheet" href="<?php echo bloginfo('wpurl') ?>/wp-content/plugins/events-manager/includes/css/events_manager.css" type="text/css" media="screen" />
</head>
<body id="printable">
<div id="container">
<h1><?php echo sprintf(__('Bookings for %s','events-manager'), $EM_Event->name); ?></h1>
<p><?php echo $EM_Event->output("#d #M #Y"); ?></p>
<p><?php echo $EM_Event->output("#_LOCATION, #_ADDRESS, #_TOWN"); ?></p>
<h2><?php _e('Bookings data', 'events-manager');?></h2>
<table id="bookings-table">
<tr>
<th scope='col'><?php _e('Name', 'events-manager')?></th>
<th scope='col'><?php _e('E-mail', 'events-manager')?></th>
<th scope='col'><?php _e('Phone number', 'events-manager')?></th>
<th scope='col'><?php _e('Spaces', 'events-manager')?></th>
<th scope='col'><?php _e('Comment', 'events-manager')?></th>
</tr>
<?php foreach($EM_Event->get_bookings()->bookings as $EM_Booking) {
if( $EM_Booking->status == 1){
?>
<tr>
<td><?php echo $EM_Booking->person->get_name() ?></td>
<td><?php echo $EM_Booking->person->user_email ?></td>
<td><?php echo $EM_Booking->person->phone ?></td>
<td class='spaces-number'><?php echo $EM_Booking->get_spaces() ?></td>
<td><?php echo $EM_Booking->booking_comment ?></td>
</tr>
<?php }} ?>
<tr id='booked-spaces'>
<td colspan='3'>&nbsp;</td>
<td class='total-label'><?php _e('Booked', 'events-manager')?>:</td>
<td class='spaces-number'><?php echo $EM_Event->get_bookings()->get_booked_spaces(); ?></td>
</tr>
<tr id='available-spaces'>
<td colspan='3'>&nbsp;</td>
<td class='total-label'><?php _e('Available', 'events-manager')?>:</td>
<td class='spaces-number'><?php echo $EM_Event->get_bookings()->get_available_spaces(); ?></td>
</tr>
</table>
</div>
</body>
</html>

View File

@ -1,20 +0,0 @@
<?php
/*
* Default Calendar day
* This page displays a list of events or single event for a specific calendar day, called during the em_content() if this is an calendar day page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*
*/
$args['scope'] = $_REQUEST['calendar_day'];
$events_count = EM_Events::count( apply_filters('em_content_calendar_day_args', $args) ); //Get events first, so we know how many there are in advance
if ( $events_count > 1 || get_option('dbem_display_calendar_day_single') == 1 ) {
em_locate_template('templates/events-list.php', true, array('args' => apply_filters('em_content_calendar_day_output_args', $args)) );
} elseif( $events_count == 1 ) {
$args['format'] = get_option('dbem_single_event_format');
echo EM_Events::output(apply_filters('em_content_calendar_day_output_args', $args));
} else {
echo get_option('dbem_no_events_message');
}

View File

@ -1,61 +0,0 @@
<?php
/*
* This file contains the HTML generated for full calendars. You can copy this file to yourthemefolder/plugins/events-manager/templates and modify it in an upgrade-safe manner.
*
* There are two variables made available to you:
*
* $calendar - contains an array of information regarding the calendar and is used to generate the content
* $args - the arguments passed to EM_Calendar::output()
*
* Note that leaving the class names for the previous/next links will keep the AJAX navigation working.
*/
$cal_count = count($calendar['cells']); //to prevent an extra tr
$col_count = $tot_count = 1; //this counts collumns in the $calendar_array['cells'] array
$col_max = count($calendar['row_headers']); //each time this collumn number is reached, we create a new collumn, the number of cells should divide evenly by the number of row_headers
?>
<table class="em-calendar fullcalendar">
<thead>
<tr>
<td><a class="em-calnav full-link em-calnav-prev" href="<?php echo esc_url($calendar['links']['previous_url']); ?>">&lt;&lt;</a></td>
<td class="month_name" colspan="5"><?php echo esc_html(date_i18n(get_option('dbem_full_calendar_month_format'), $calendar['month_start'])); ?></td>
<td><a class="em-calnav full-link em-calnav-next" href="<?php echo esc_url($calendar['links']['next_url']); ?>">&gt;&gt;</a></td>
</tr>
</thead>
<tbody>
<tr class="days-names">
<td><?php echo implode('</td><td>',$calendar['row_headers']); ?></td>
</tr>
<tr>
<?php
foreach($calendar['cells'] as $date => $cell_data ){
$class = ( !empty($cell_data['events']) && count($cell_data['events']) > 0 ) ? 'eventful':'eventless';
if(!empty($cell_data['type'])){
$class .= "-".$cell_data['type'];
}
//In some cases (particularly when long events are set to show here) long events and all day events are not shown in the right order. In these cases,
//if you want to sort events cronologically on each day, including all day events at top and long events within the right times, add define('EM_CALENDAR_SORTTIME', true); to your wp-config.php file
if( defined('EM_CALENDAR_SORTTIME') && EM_CALENDAR_SORTTIME ) ksort($cell_data['events']); //indexes are timestamps
?>
<td class="<?php echo esc_attr($class); ?>">
<?php if( !empty($cell_data['events']) && count($cell_data['events']) > 0 ): ?>
<a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo esc_attr($cell_data['link_title']); ?>"><?php echo esc_html(date('j',$cell_data['date'])); ?></a>
<ul>
<?php echo EM_Events::output($cell_data['events'],array('format'=>get_option('dbem_full_calendar_event_format'))); ?>
<?php if( $args['limit'] && $cell_data['events_count'] > $args['limit'] && get_option('dbem_display_calendar_events_limit_msg') != '' ): ?>
<li><a href="<?php echo esc_url($cell_data['link']); ?>"><?php echo get_option('dbem_display_calendar_events_limit_msg'); ?></a></li>
<?php endif; ?>
</ul>
<?php else:?>
<?php echo esc_html(date('j',$cell_data['date'])); ?>
<?php endif; ?>
</td>
<?php
//create a new row once we reach the end of a table collumn
$col_count= ($col_count == $col_max ) ? 1 : $col_count+1;
echo ($col_count == 1 && $tot_count < $cal_count) ? '</tr><tr>':'';
$tot_count ++;
}
?>
</tr>
</tbody>
</table>

View File

@ -1,52 +0,0 @@
<?php
/*
* This file contains the HTML generated for small calendars. You can copy this file to yourthemefolder/plugins/events-manager/templates and modify it in an upgrade-safe manner.
*
* There are two variables made available to you:
*
* $calendar - contains an array of information regarding the calendar and is used to generate the content
* $args - the arguments passed to EM_Calendar::output()
*
* Note that leaving the class names for the previous/next links will keep the AJAX navigation working.
*/
?>
<table class="em-calendar">
<thead>
<tr>
<td><a class="em-calnav em-calnav-prev" href="<?php echo esc_url($calendar['links']['previous_url']); ?>" rel="nofollow">&lt;&lt;</a></td>
<td class="month_name" colspan="5"><?php echo esc_html(date_i18n(get_option('dbem_small_calendar_month_format'), $calendar['month_start'])); ?></td>
<td><a class="em-calnav em-calnav-next" href="<?php echo esc_url($calendar['links']['next_url']); ?>" rel="nofollow">&gt;&gt;</a></td>
</tr>
</thead>
<tbody>
<tr class="days-names">
<td><?php echo implode('</td><td>',$calendar['row_headers']); ?></td>
</tr>
<tr>
<?php
$cal_count = count($calendar['cells']);
$col_count = $count = 1; //this counts collumns in the $calendar_array['cells'] array
$col_max = count($calendar['row_headers']); //each time this collumn number is reached, we create a new collumn, the number of cells should divide evenly by the number of row_headers
foreach($calendar['cells'] as $date => $cell_data ){
$class = ( !empty($cell_data['events']) && count($cell_data['events']) > 0 ) ? 'eventful':'eventless';
if(!empty($cell_data['type'])){
$class .= "-".$cell_data['type'];
}
?>
<td class="<?php echo esc_attr($class); ?>">
<?php if( !empty($cell_data['events']) && count($cell_data['events']) > 0 ): ?>
<a href="<?php echo esc_url($cell_data['link']); ?>" title="<?php echo esc_attr($cell_data['link_title']); ?>"><?php echo esc_html(date('j',$cell_data['date'])); ?></a>
<?php else:?>
<?php echo esc_html(date('j',$cell_data['date'])); ?>
<?php endif; ?>
</td>
<?php
//create a new row once we reach the end of a table collumn
$col_count= ($col_count == $col_max ) ? 1 : $col_count+1;
echo ($col_count == 1 && $count < $cal_count) ? '</tr><tr>':'';
$count ++;
}
?>
</tr>
</tbody>
</table>

View File

@ -1,17 +0,0 @@
<?php
/*
* Default Categories List Template
* This page displays a list of locations, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display locations (or whatever) however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Categories::output()
*
*/
$args = apply_filters('em_content_categories_args', $args);
if( get_option('dbem_css_catlist') ) echo "<div class='css-cats-list'>";
echo EM_Categories::output( $args );
if( get_option('dbem_css_catlist') ) echo "</div>";

View File

@ -1,12 +0,0 @@
<?php
/*
* This page displays a single event, called during the em_content() if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
global $EM_Category;
/* @var $EM_Category EM_Category */
echo $EM_Category->output_single();
?>

View File

@ -1,17 +0,0 @@
<?php
/*
* Remember that this file is only used if you have chosen to override event pages with formats in your event settings!
* You can also override the single event page completely in any case (e.g. at a level where you can control sidebars etc.), as described here - http://codex.wordpress.org/Post_Types#Template_Files
* Your file would be named single-event.php
*/
/*
* This page displays a single event, called during the the_content filter if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
global $EM_Event;
/* @var $EM_Event EM_Event */
echo $EM_Event->output_single();
?>

View File

@ -1,13 +0,0 @@
<?php
/*
* Default Events List Template
* This page displays a list of events, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*
*/
$args['full'] = 1;
$args['long_events'] = get_option('dbem_full_calendar_long_events');
echo EM_Calendar::output( apply_filters('em_content_calendar_args', $args) );

View File

@ -1,17 +0,0 @@
<?php
/*
* Default Events List Template
* This page displays a list of events, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*
*/
$args = apply_filters('em_content_events_args', $args);
if( get_option('dbem_css_evlist') ) echo "<div class='css-events-list'>";
echo EM_Events::output_grouped($args); //note we're grabbing the content, not em_get_events_list_grouped function
if( get_option('dbem_css_evlist') ) echo "</div>";

View File

@ -1,17 +0,0 @@
<?php
/*
* Default Events List Template
* This page displays a list of events, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*
*/
$args = apply_filters('em_content_events_args', $args);
print_r($args);
if( get_option('dbem_css_evlist') ) echo "<div class='css-events-list'>";
echo EM_Events::output( $args );
if( get_option('dbem_css_evlist') ) echo "</div>";

View File

@ -1,69 +0,0 @@
<?php
/* WARNING!!! (2013-07-10) We intend to add a few more fields into this search form over the coming weeks/months.
* Overriding shouldn't hinder functionality at all but these new search options won't appear on your form!
*/
/*
* By modifying this in your theme folder within plugins/events-manager/templates/events-search.php, you can change the way the search form will look.
* To ensure compatability, it is recommended you maintain class, id and form name attributes, unless you now what you're doing.
* You also have an $args array available to you with search options passed on by your EM settings or shortcode
*/
$args = !empty($args) ? $args:array(); /* @var $args array */
?>
<div class="em-search-wrapper">
<div class="em-events-search em-search <?php if( !empty($args['main_classes']) ) echo esc_attr(implode(' ', $args['main_classes'])); ?>">
<form action="<?php echo !empty($args['search_url']) ? esc_url($args['search_url']) : EM_URI; ?>" method="post" class="em-events-search-form em-search-form">
<input type="hidden" name="action" value="<?php echo esc_attr($args['search_action']); ?>" />
<?php if( $args['show_main'] ): //show the 'main' search form ?>
<div class="em-search-main">
<?php do_action('em_template_events_search_form_header'); //hook in here to add extra fields, text etc. ?>
<?php
//search text
if( !empty($args['search_term']) ) em_locate_template('templates/search/search.php',true,array('args'=>$args));
if( !empty($args['search_geo']) ) em_locate_template('templates/search/geo.php',true,array('args'=>$args));
?>
<?php if( !empty($args['css']) ) : //show the button here if we're using the default styling, if you still want to use this and use custom CSS, then you have to override our rules ?>
<button type="submit" class="em-search-submit loading">
<?php //before you ask, this hack is necessary thanks to stupid IE7 ?>
<!--[if IE 7]><span><![endif]-->
<img src="<?php echo EM_DIR_URI; ?>includes/images/search-mag.png" alt="<?php esc_attr_e('Search', 'events-manager'); ?>" />
<!--[if IE 7]></span><![endif]-->
</button>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if( !empty($args['show_advanced']) ): //show advanced fields, collapesed if the main form is shown, inline if not ?>
<div class="em-search-advanced" <?php if( !empty($args['advanced_hidden']) ) echo 'style="display:none"'; ?>>
<?php
//date range (scope)
if( !empty($args['search_scope']) ) em_locate_template('templates/search/scope.php',true,array('args'=>$args));
//categories
if( get_option('dbem_categories_enabled') && !empty($args['search_categories']) ) em_locate_template('templates/search/categories.php',true,array('args'=>$args));
//Location data
em_locate_template('templates/search/location.php',true, array('args'=>$args));
if( !empty($args['search_geo_units']) ) em_locate_template('templates/search/geo-units.php',true, array('args'=>$args));
?>
<?php do_action('em_template_events_search_form_footer'); //hook in here to add extra fields, text etc. ?>
<?php if( !$args['show_main'] || empty($args['css']) ): //show button if it wasn't shown further up ?>
<input type="submit" value="<?php echo esc_attr($args['search_button']); ?>" class="em-search-submit" />
<?php endif; ?>
</div>
<?php endif; ?>
<?php if( !empty($args['advanced_hidden']) && !empty($args['show_advanced']) ): //show the advanced search toggle if advanced fields are collapsed ?>
<div class="em-search-options">
<a href="#" class="em-toggle" rel=".em-search-advanced:.em-search-form">
<span class="hide-advanced" style="display:none;"><?php echo esc_html($args['search_text_hide']); ?></span>
<span class="show-advanced"><?php echo esc_html($args['search_text_show']); ?></span>
</a>
</div>
<?php endif; ?>
<?php if( (empty($args['show_advanced']) || empty($args['search_countries'])) && !empty($args['country']) ): //show country in hidden field for geo searching ?>
<input type="hidden" name="country" value="<?php echo esc_attr($args['country']) ?>" />
<?php endif; ?>
<?php if( empty($args['show_advanced']) || empty($args['search_geo_units']) ): //show country in hidden field for geo searching ?>
<?php if( !empty($args['near_distance']) ) : ?><input name="near_distance" type="hidden" value="<?php echo $args['near_distance']; ?>" /><?php endif; ?>
<?php if( !empty($args['near_unit']) ) : ?><input name="near_unit" type="hidden" value="<?php echo $args['near_unit']; ?>" /><?php endif; ?>
<?php endif; ?>
</form>
</div>
<?php if( !empty($args['ajax']) ): ?><div class='em-search-ajax'></div><?php endif; ?>
</div>

View File

@ -1,135 +0,0 @@
<?php
//define and clean up formats for display
$summary_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_ical_description_format' ) ) );
$description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_ical_real_description_format') ) );
$location_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_ical_location_format' ) ) );
$parsed_url = parse_url(get_bloginfo('url'));
$site_domain = preg_replace('/^www./', '', $parsed_url['host']);
//figure out limits
$ical_limit = get_option('dbem_ical_limit');
$page_limit = $ical_limit > 50 || !$ical_limit ? 50:$ical_limit; //set a limit of 50 to output at a time, unless overall limit is lower
//get passed on $args and merge with defaults
$args = !empty($args) ? $args:array(); /* @var $args array */
$args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args);
$args = apply_filters('em_calendar_template_args',$args);
//get first round of events to show, we'll start adding more via the while loop
$EM_Events = EM_Events::get( $args );
//calendar header
$output = "BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//wp-events-plugin.com//".EM_VERSION."//EN";
echo preg_replace("/([^\r])\n/", "$1\r\n", $output);
//loop through events
$count = 0;
while ( count($EM_Events) > 0 ){
foreach ( $EM_Events as $EM_Event ) {
/* @var $EM_Event EM_Event */
if( $ical_limit != 0 && $count > $ical_limit ) break; //we've reached our maximum
//calculate the times along with timezone offsets
if($EM_Event->event_all_day){
$dateStart = ';VALUE=DATE:'.date('Ymd',$EM_Event->start); //all day
$dateEnd = ';VALUE=DATE:'.date('Ymd',$EM_Event->end + 86400); //add one day
}else{
$dateStart = ':'.get_gmt_from_date(date('Y-m-d H:i:s', $EM_Event->start), 'Ymd\THis\Z');
$dateEnd = ':'.get_gmt_from_date(date('Y-m-d H:i:s', $EM_Event->end), 'Ymd\THis\Z');
}
if( !empty($EM_Event->event_date_modified) && $EM_Event->event_date_modified != '0000-00-00 00:00:00' ){
$dateModified = get_gmt_from_date($EM_Event->event_date_modified, 'Ymd\THis\Z');
}else{
$dateModified = get_gmt_from_date($EM_Event->post_modified, 'Ymd\THis\Z');
}
//formats
$summary = em_mb_ical_wordwrap('SUMMARY:'.$EM_Event->output($summary_format,'ical'));
$description = em_mb_ical_wordwrap('DESCRIPTION:'.$EM_Event->output($description_format,'ical'));
$url = 'URL:'.$EM_Event->get_permalink();
$url = wordwrap($url, 74, "\n ", true);
$location = $geo = $apple_geo = $apple_location = $apple_location_title = $apple_structured_location = $categories = false;
if( $EM_Event->location_id ){
$location = em_mb_ical_wordwrap('LOCATION:'.$EM_Event->output($location_format, 'ical'));
if( $EM_Event->get_location()->location_latitude || $EM_Event->get_location()->location_longitude ){
$geo = 'GEO:'.$EM_Event->get_location()->location_latitude.";".$EM_Event->get_location()->location_longitude;
}
if( !defined('EM_ICAL_APPLE_STRUCT') || !EM_ICAL_APPLE_STRUCT ){
$apple_location = $EM_Event->output('#_LOCATIONFULLLINE, #_LOCATIONCOUNTRY', 'ical');
$apple_location_title = $EM_Event->output('#_LOCATIONNAME', 'ical');
$apple_geo = !empty($geo) ? $EM_Event->get_location()->location_latitude.",".$EM_Event->get_location()->location_longitude:'0,0';
$apple_structured_location = "X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS={$apple_location};X-APPLE-RADIUS=100;X-TITLE={$apple_location_title}:geo:{$apple_geo}";
$apple_structured_location = str_replace('"', '\"', $apple_structured_location); //google chucks a wobbly with these on this line
$apple_structured_location = em_mb_ical_wordwrap($apple_structured_location);
}
}
$categories = array();
foreach( $EM_Event->get_categories() as $EM_Category ){ /* @var EM_Category $EM_Category */
$categories[] = $EM_Category->name;
}
$image = $EM_Event->get_image_url();
//create a UID, make it unique and update independent
$UID = $EM_Event->event_id . '@' . $site_domain;
if( is_multisite() ) $UID = absint($EM_Event->blog_id) . '-' . $UID;
$UID = wordwrap("UID:".$UID, 74, "\r\n ", true);
//output ical item
$output = "\r\n"."BEGIN:VEVENT
{$UID}
DTSTART{$dateStart}
DTEND{$dateEnd}
DTSTAMP:{$dateModified}
{$url}
{$summary}";
//Description if available
if( $description ){
$output .= "\r\n" . $description;
}
//add featured image if exists
if( $image ){
$image = wordwrap("ATTACH;FMTTYPE=image/jpeg:".esc_url_raw($image), 74, "\n ", true);
$output .= "
{$image}";
}
//add categories if there are any
if( !empty($categories) ){
$categories = wordwrap("CATEGORIES:".implode(',', $categories), 74, "\n ", true);
$output .= "
{$categories}";
}
//Location if there is one
if( $location ){
$output .= "
{$location}";
//geo coordinates if they exist
if( $geo ){
$output .= "
{$geo}";
}
//create apple-compatible feature for locations
if( !empty($apple_structured_location) ){
$output .= "
{$apple_structured_location}";
}
}
//end the event
$output .= "
END:VEVENT";
//clean up new lines, rinse and repeat
echo preg_replace("/([^\r])\n/", "$1\r\n", $output);
$count++;
}
if( $ical_limit != 0 && $count >= $ical_limit ){
//we've reached our limit, or showing one event only
break;
}else{
//get next page of results
$args['page']++;
$EM_Events = EM_Events::get( $args );
}
}
//calendar footer
$output = "\r\n"."END:VCALENDAR";
echo preg_replace("/([^\r])\n/", "$1\r\n", $output);

View File

@ -1,17 +0,0 @@
<?php
/*
* Remember that this file is only used if you have chosen to override location pages with formats in your events manager settings!
* You can also override the single location page completely in any case (e.g. at a level where you can control sidebars etc.), as described here - http://codex.wordpress.org/Post_Types#Template_Files
* Your file would be named single-location.php
*/
/*
* This page displays a single event, called during the em_content() if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
global $EM_Location;
/* @var $EM_Location EM_Location */
echo $EM_Location->output_single();
?>

View File

@ -1,17 +0,0 @@
<?php
/*
* Default Location List Template
* This page displays a list of locations, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display locations (or whatever) however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Locations::output()
*
*/
$args = apply_filters('em_content_locations_args', $args);
if( get_option('dbem_css_loclist') ) echo "<div class='css-locations-list'>";
echo EM_Locations::output( $args );
if( get_option('dbem_css_loclist') ) echo "</div>";

View File

@ -1,14 +0,0 @@
<?php
/* WARNING!!! (2013-07-10) We intend to add a few more fields into this search form over the coming weeks/months.
* Overriding shouldn't hinder functionality at all but these new search options won't appear on your form!
*/
/*
* By modifying this in your theme folder within plugins/events-manager/templates/events-search.php, you can change the way the search form will look.
* To ensure compatability, it is recommended you maintain class, id and form name attributes, unless you now what you're doing.
* You also have an $args array available to you with search options passed on by your EM settings or shortcode
*/
/* @var $args array */
$args['search_action'] = 'search_locations';
$args['search_url'] = get_option('dbem_locations_page') ? get_permalink(get_option('dbem_locations_page')):EM_URI;
em_locate_template('templates/events-search.php', true, array('args'=>$args));
?>

View File

@ -1,26 +0,0 @@
<?php
/*
* This file contains the HTML generated for maps. You can copy this file to yourthemefolder/plugins/events/templates and modify it in an upgrade-safe manner.
*
* There is one argument passed to you, which is the $args variable. This contains the arguments you could pass into shortcodes, template tags or functions like EM_Events::get().
*
* In this template, we encode the $args array into JSON for javascript to easily parse and request the locations from the server via AJAX.
*/
if (get_option('dbem_gmap_is_active') == '1') {
?>
<div class="em-location-map-container" style='position:relative; background: #CDCDCD; width: <?php echo $args['width'] ?>; height: <?php echo $args['height'] ?>;'>
<div class='em-locations-map' id='em-locations-map-<?php echo $args['random_id']; ?>' style="width:100%; height:100%"><em><?php _e('Loading Map....', 'events-manager'); ?></em></div>
<div class='em-locations-map-coords' id='em-locations-map-coords-<?php echo $args['random_id']; ?>' style="display:none; visibility:hidden;"><?php echo EM_Object::json_encode($args); ?></div>
<?php if( !empty($map_json_style) ): ?>
<script type="text/javascript">
if( typeof EM == 'object'){
if( typeof EM.google_map_id_styles != 'object' ) EM.google_map_id_styles = [];
EM.google_map_id_styles['<?php echo $args['random_id']; ?>'] = <?php echo $map_json_style; ?>;
}
</script>
<?php endif; ?>
</div>
<?php
}
?>

View File

@ -1,97 +0,0 @@
<?php do_action('em_template_my_bookings_header'); ?>
<?php
global $wpdb, $current_user, $EM_Notices, $EM_Person;
if( is_user_logged_in() ):
$EM_Person = new EM_Person( get_current_user_id() );
$EM_Bookings = $EM_Person->get_bookings();
$bookings_count = count($EM_Bookings->bookings);
if($bookings_count > 0){
//Get events here in one query to speed things up
$event_ids = array();
foreach($EM_Bookings as $EM_Booking){
$event_ids[] = $EM_Booking->event_id;
}
}
$limit = ( !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit
$page = ( !empty($_GET['pno']) ) ? $_GET['pno']:1;
$offset = ( $page > 1 ) ? ($page-1)*$limit : 0;
echo $EM_Notices;
?>
<div class='em-my-bookings'>
<?php if ( $bookings_count >= $limit ) : ?>
<div class='tablenav'>
<?php
if ( $bookings_count >= $limit ) {
$link = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%'), false); //don't html encode, so em_paginate does its thing
$bookings_nav = em_paginate( $link, $bookings_count, $limit, $page);
echo $bookings_nav;
}
?>
<div class="clear"></div>
</div>
<?php endif; ?>
<div class="clear"></div>
<?php if( $bookings_count > 0 ): ?>
<div class='table-wrap'>
<table id='dbem-bookings-table' class='widefat post fixed'>
<thead>
<tr>
<th class='manage-column' scope='col'><?php _e('Event', 'events-manager'); ?></th>
<th class='manage-column' scope='col'><?php _e('Date', 'events-manager'); ?></th>
<th class='manage-column' scope='col'><?php _e('Spaces', 'events-manager'); ?></th>
<th class='manage-column' scope='col'><?php _e('Status', 'events-manager'); ?></th>
<th class='manage-column' scope='col'>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
$rowno = 0;
$event_count = 0;
$nonce = wp_create_nonce('booking_cancel');
foreach ($EM_Bookings as $EM_Booking) {
/* @var $EM_Booking EM_Booking */
$EM_Event = $EM_Booking->get_event();
if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) {
$rowno++;
?>
<tr>
<td><?php echo $EM_Event->output("#_EVENTLINK"); ?></td>
<td><?php echo date_i18n( get_option('dbem_date_format'), $EM_Event->start ); ?></td>
<td><?php echo $EM_Booking->get_spaces() ?></td>
<td>
<?php echo $EM_Booking->get_status(); ?>
</td>
<td>
<?php
$cancel_link = '';
if( !in_array($EM_Booking->booking_status, array(2,3)) && get_option('dbem_bookings_user_cancellation') && $EM_Event->get_bookings()->has_open_time() ){
$cancel_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action'=>'booking_cancel', 'booking_id'=>$EM_Booking->booking_id, '_wpnonce'=>$nonce));
$cancel_link = '<a class="em-bookings-cancel" href="'.$cancel_url.'" onclick="if( !confirm(EM.booking_warning_cancel) ){ return false; }">'.__('Cancel','events-manager').'</a>';
}
echo apply_filters('em_my_bookings_booking_actions', $cancel_link, $EM_Booking);
?>
</td>
</tr>
<?php
}
do_action('em_my_bookings_booking_loop',$EM_Booking);
$event_count++;
}
?>
</tbody>
</table>
</div>
<?php else: ?>
<?php _e('You do not have any bookings.', 'events-manager'); ?>
<?php endif; ?>
<?php if( !empty($bookings_nav) && $bookings_count >= $limit ) : ?>
<div class='tablenav'>
<?php echo $bookings_nav; ?>
<div class="clear"></div>
</div>
<?php endif; ?>
</div>
<?php do_action('em_template_my_bookings_footer', $EM_Bookings); ?>
<?php else: ?>
<p><?php echo sprintf(__('Please <a href="%s">Log In</a> to view your bookings.','events-manager'),site_url('wp-login.php?redirect_to=' . urlencode(get_permalink()), 'login'))?></p>
<?php endif; ?>

View File

@ -1,10 +0,0 @@
This folder has files containing various templates used by events manager. The file names are quite descriptive as to their functions.
Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly.
To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/templates/ and edit as needed.
If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there.
Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a
reported bug, please keep this in mind when updating.

View File

@ -1,57 +0,0 @@
<?php
/*
* RSS Page
* This page handles the even RSS feed.
* You can override this file by and copying it to yourthemefolder/plugins/events-manager/templates/ and modifying as necessary.
*
*/
header ( "Content-type: application/rss+xml; charset=UTF-8" );
echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><?php echo esc_html(get_option ( 'dbem_rss_main_title' )); ?></title>
<link><?php echo EM_URI; ?></link>
<description><?php echo esc_html(get_option('dbem_rss_main_description')); ?></description>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<pubDate><?php echo date('D, d M Y H:i:s +0000', get_option('em_last_modified', current_time('timestamp',true))); ?></pubDate>
<atom:link href="<?php echo esc_attr(EM_RSS_URI); ?>" rel="self" type="application/rss+xml" />
<?php
$description_format = str_replace ( ">", "&gt;", str_replace ( "<", "&lt;", get_option ( 'dbem_rss_description_format' ) ) );
$rss_limit = get_option('dbem_rss_limit');
$page_limit = $rss_limit > 50 || !$rss_limit ? 50 : $rss_limit; //set a limit of 50 to output at a time, unless overall limit is lower
$args = !empty($args) ? $args:array(); /* @var $args array */
$args = array_merge(array('scope'=>get_option('dbem_rss_scope'), 'owner'=>false, 'limit'=>$page_limit, 'page'=>1, 'order'=>get_option('dbem_rss_order'), 'orderby'=>get_option('dbem_rss_orderby')), $args);
$args = apply_filters('em_rss_template_args',$args);
$EM_Events = EM_Events::get( $args );
$count = 0;
while( count($EM_Events) > 0 ){
foreach ( $EM_Events as $EM_Event ) {
/* @var $EM_Event EM_Event */
$description = $EM_Event->output( get_option ( 'dbem_rss_description_format' ), "rss");
$description = ent2ncr(convert_chars($description)); //Some RSS filtering
$event_url = $EM_Event->output('#_EVENTURL');
?>
<item>
<title><?php echo $EM_Event->output( get_option('dbem_rss_title_format'), "rss" ); ?></title>
<link><?php echo $event_url; ?></link>
<guid><?php echo $event_url; ?></guid>
<pubDate><?php echo get_gmt_from_date(date('Y-m-d H:i:s', $EM_Event->start), 'D, d M Y H:i:s +0000'); ?></pubDate>
<description><![CDATA[<?php echo $description; ?>]]></description>
</item>
<?php
$count++;
}
if( $rss_limit != 0 && $count >= $rss_limit ){
//we've reached our limit, or showing one event only
break;
}else{
//get next page of results
$args['page']++;
$EM_Events = EM_Events::get( $args );
}
}
?>
</channel>
</rss>

View File

@ -1,23 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START Category Search -->
<div class="em-search-category em-search-field">
<label>
<span><?php echo esc_html($args['category_label']); ?></span>
<?php
EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS Global, nothing happens
wp_dropdown_categories(array(
'hide_empty' => 0,
'orderby' =>'name',
'name' => 'category',
'hierarchical' => true,
'taxonomy' => EM_TAXONOMY_CATEGORY,
'selected' => $args['category'],
'show_option_none' => $args['categories_label'],
'option_none_value'=> 0,
'class'=>'em-events-search-category'
));
EM_Object::ms_global_switch_back(); //if switched above, switch back
?>
</label>
</div>
<!-- END Category Search -->

View File

@ -1,20 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START Geo Units Search -->
<div class="em-search-geo-units em-search-field" <?php if( empty($args['geo']) || empty($args['near']) ): ?>style="display:none;"<?php endif; /* show location fields if no geo search is made */ ?>>
<label>
<span><?php echo esc_html($args['geo_units_label']); ?></span>
<select name="near_distance" class="em-search-geo-distance">
<?php foreach( $args['geo_distance_values'] as $unit ) : ?>
<option value="<?php echo $unit; ?>" <?php if($args['near_distance'] == $unit) echo 'selected="selected"' ?>><?php echo $unit; ?></option>
<?php endforeach; ?>
</select>
</label>
<label>
<span class="screen-reader-text"><?php echo esc_html(__('distance units','events-manager')); ?></span>
<select name="near_unit" class="em-search-geo-unit">
<option value="mi">mi</option>
<option value="km" <?php if($args['near_unit'] == 'km') echo 'selected="selected"' ?>>km</option>
</select>
</label>
</div>
<!-- END Geo Units Search -->

View File

@ -1,100 +0,0 @@
function em_geo_search_init(){
jQuery('input.em-search-geo').each(function(i){
var input = /** @type {HTMLInputElement} */ jQuery(this);
var wrapper = input.closest('div.em-search-geo');
var autocomplete = new google.maps.places.Autocomplete(input[0]);
var geo_coords = wrapper.find("input.em-search-geo-coords");
var geo_field_status = function( status ){
wrapper.data('status',status);
var em_search = wrapper.closest('.em-search');
if( status == 'on' ){
wrapper.css('background-image', wrapper.css('background-image').replace('search-geo.png', 'search-geo-on.png').replace('search-geo-off.png', 'search-geo-on.png'));
em_search.find('select.em-search-country option:first-child').prop('selected','selected').trigger('change');
em_search.find('.em-search-location').slideUp();
em_search.find('.em-search-geo-units').slideDown();
}else{
if( status == 'off' ){
wrapper.css('background-image', wrapper.css('background-image').replace('search-geo.png', 'search-geo-off.png').replace('search-geo-on.png', 'search-geo-off.png'));
}else{
wrapper.css('background-image', wrapper.css('background-image').replace('search-geo-off.png', 'search-geo.png').replace('search-geo-on.png', 'search-geo.png'));
}
geo_coords.val('');
em_search.find('.em-search-location').slideDown();
em_search.find('.em-search-geo-units').slideUp();
}
};
var ac_listener = function( place ) {
var place = autocomplete.getPlace();
if( !place || !place.geometry ){ //place not found
if( input.val() == '' || input.val() == EM.geo_placeholder ){
geo_field_status(false);
}else{
if( wrapper.data('last-search') == input.val() ){
geo_field_status('on');
geo_coords.val( wrapper.data('last-coords') );
return;
}
//do a nearest match suggestion as last resort
if( input.val().length >= 2 ){
geo_field_status(false);
autocompleteService = new google.maps.places.AutocompleteService();
autocompleteService.getPlacePredictions( {'input': input.val(), 'offset': input.val().length }, function listentoresult(list, status) {
if(list != null && list.length != 0) {
placesService = new google.maps.places.PlacesService(document.getElementById('em-search-geo-attr'));
placesService.getDetails( {'reference': list[0].reference}, function detailsresult(detailsResult, placesServiceStatus) {
//we have a match, ask the user
wrapper.data('last-search', detailsResult.formatted_address );
wrapper.data('last-coords', detailsResult.geometry.location.lat() + ',' + detailsResult.geometry.location.lng());
if( input.val() == detailsResult.formatted_address || confirm(EM.geo_alert_guess.replace('%s', '"'+detailsResult.formatted_address+'"')) ){
geo_coords.val( detailsResult.geometry.location.lat() + ',' + detailsResult.geometry.location.lng() );
geo_field_status('on');
input.val(detailsResult.formatted_address);
}else{
input.data('last-key',false);
geo_field_status('off');
}
});
}else{ geo_field_status('off'); }
});
}else{ geo_field_status('off'); }
}
wrapper.data('last-search', input.val() );
wrapper.data('last-coords', geo_coords.val());
return;
}
geo_coords.val( place.geometry.location.lat() + ',' + place.geometry.location.lng() );
geo_field_status('on');
wrapper.data('last-search', input.val() );
wrapper.data('last-coords', geo_coords.val());
};
google.maps.event.addListener(autocomplete, 'place_changed', ac_listener);
if( geo_coords.val() != '' ){
geo_field_status('on');
wrapper.data('last-search', input.val() );
wrapper.data('last-coords', geo_coords.val() );
}
input.keypress( function(e) {
//if enter is pressed once during 'near' input, don't do anything so Google can select location, otherwise let behavior (form submittal) proceed
if( e.which == 13 ) {
if( input.data('last-key') != 13 || wrapper.data('status') != 'on' ){
e.preventDefault();
}
}else{
geo_field_status(false);
}
}).keyup( function(e) {
if( this.value == '' ){ geo_field_status(false); }
else if( wrapper.data('last-search') != this.value ){ geo_field_status('off'); }
input.data('last-key', e.which);
}).blur( function(e){ //create HTML 5 placeholder effect if not HTML 5
if( this.value == '' && !('placeholder' in document.createElement('input')) ) this.value = EM.geo_placeholder;
}).focus( function(e){
if( this.value == EM.geo_placeholder ) this.value='';
input.data('last-key', 13);
}).attr('placeholder', EM.geo_placeholder);
});
}
jQuery(document).bind('em_maps_loaded', function(){ em_geo_search_init(); });

View File

@ -1,23 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START General Search -->
<div class="em-search-geo em-search-field">
<?php
/* This general search will find matches within event_name, event_notes, and the location_name, address, town, state and country. */
?>
<label>
<span class="screen-reader-text"><?php echo esc_html($args['geo_label']); ?></span>
<input type="text" name="geo" class="em-search-geo" value="<?php echo esc_attr($args['geo']); ?>"/>
</label>
<input type="hidden" name="near" class="em-search-geo-coords" value="<?php echo esc_attr($args['near']); ?>" />
<div id="em-search-geo-attr" ></div>
<script type="text/javascript">
EM.geo_placeholder = '<?php echo esc_attr($args['geo_label']); ?>';
EM.geo_alert_guess = '<?php esc_attr_e('We are going to use %s for searching.','events-manager'); ?> \n\n <?php esc_attr_e('If this is incorrect, click cancel and try a more specific address.','events-manager') ?>';
<?php
//include separately, which allows you to just modify the html or completely override the JS
em_locate_template('templates/search/geo.js',true);
?>
</script>
</div>
<!-- END General Search -->

View File

@ -1,27 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START Country Search -->
<div class="em-search-country em-search-field">
<label>
<span><?php echo esc_html($args['country_label']); ?></span>
<select name="country" class="em-search-country em-events-search-country">
<option value=''><?php echo esc_html($args['countries_label']); ?></option>
<?php
//get the counties from locations table
global $wpdb;
$countries = em_get_countries();
$em_countries = $wpdb->get_results("SELECT DISTINCT location_country FROM ".EM_LOCATIONS_TABLE." WHERE location_country IS NOT NULL AND location_country != '' AND location_status=1 ORDER BY location_country ASC", ARRAY_N);
$ddm_countries = array();
//filter out location countries so they're valid records (hence no sanitization)
foreach($em_countries as $em_country){
$ddm_countries[$em_country[0]] = $countries[$em_country[0]];
}
asort($ddm_countries);
foreach( $ddm_countries as $country_code => $country_name ):
//we're not using esc_ functions here because values are hard-coded within em_get_countries()
?>
<option value="<?php echo $country_code; ?>"<?php echo (!empty($args['country']) && $args['country'] == $country_code) ? ' selected="selected"':''; ?>><?php echo $country_name; ?></option>
<?php endforeach; ?>
</select>
</label>
</div>
<!-- END Country Search -->

View File

@ -1,24 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START Region Search -->
<div class="em-search-region em-search-field">
<label>
<span><?php echo esc_html($args['region_label']); ?></span>
<select name="region" class="em-search-region em-events-search-region">
<option value=''><?php echo esc_html(get_option('dbem_search_form_regions_label')); ?></option>
<?php
global $wpdb;
$em_states = $cond = array();
if( !empty($args['country']) ) $cond[] = $wpdb->prepare("AND location_country=%s", $args['country']);
if( !empty($cond) || empty($args['search_countries']) ){ //get specific country regions or all regions if no country fields exists
$em_states = $wpdb->get_results("SELECT DISTINCT location_region FROM ".EM_LOCATIONS_TABLE." WHERE location_region IS NOT NULL AND location_region != '' AND location_status=1 ".implode(' ', $cond)." ORDER BY location_region", ARRAY_N);
}
foreach($em_states as $region){
?>
<option<?php echo (!empty($args['region']) && $args['region'] == $region[0]) ? ' selected="selected"':''; ?>><?php echo esc_html($region[0]); ?></option>
<?php
}
?>
</select>
</label>
</div>
<!-- END Region Search -->

View File

@ -1,25 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START State/County Search -->
<div class="em-search-state em-search-field">
<label>
<span><?php echo esc_html($args['state_label']); ?></span>
<select name="state" class="em-search-state em-events-search-state">
<option value=''><?php echo esc_html(get_option('dbem_search_form_states_label')); ?></option>
<?php
global $wpdb;
$em_states = $cond = array();
if( !empty($args['country']) ) $cond[] = $wpdb->prepare("AND location_country=%s", $args['country']);
if( !empty($args['region']) ) $cond[] = $wpdb->prepare("AND location_region=%s", $args['region']);
if( !empty($cond) || empty($args['search_countries']) ){ //get specific states, whether restricted by country/region or all states if no country field is displayed
$em_states = $wpdb->get_results("SELECT DISTINCT location_state FROM ".EM_LOCATIONS_TABLE." WHERE location_state IS NOT NULL AND location_state != '' AND location_status=1 ".implode(' ', $cond)." ORDER BY location_state", ARRAY_N);
}
foreach($em_states as $state){
?>
<option<?php echo (!empty($args['state']) && $args['state'] == $state[0]) ? ' selected="selected"':''; ?>><?php echo esc_html($state[0]); ?></option>
<?php
}
?>
</select>
</label>
</div>
<!-- END State/County Search -->

View File

@ -1,26 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START City Search -->
<div class="em-search-town em-search-field">
<label>
<span><?php echo esc_html($args['town_label']); ?></span>
<select name="town" class="em-search-town em-events-search-town">
<option value=''><?php echo esc_html(get_option('dbem_search_form_towns_label')); ?></option>
<?php
global $wpdb;
$em_towns = $cond = array();
if( !empty($args['country']) ) $cond[] = $wpdb->prepare("AND location_country=%s", $args['country']);
if( !empty($args['region']) ) $cond[] = $wpdb->prepare("AND location_region=%s", $args['region']);
if( !empty($args['state']) ) $cond[] = $wpdb->prepare(" AND location_state=%s ", $args['state']);
if( !empty($cond) || empty($args['search_countries']) ){ //get specific towns, whether restricted by country/region/state or all towns if no country field is displayed
$em_towns = $wpdb->get_results("SELECT DISTINCT location_town FROM ".EM_LOCATIONS_TABLE." WHERE location_town IS NOT NULL AND location_town != '' AND location_status=1 ".implode(' ', $cond)." ORDER BY location_town", ARRAY_N);
}
foreach($em_towns as $town){
?>
<option<?php echo (!empty($args['town']) && $args['town'] == $town[0]) ? ' selected="selected"':''; ?>><?php echo esc_html($town[0]); ?></option>
<?php
}
?>
</select>
</label>
</div>
<!-- END City Search -->

View File

@ -1,18 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<div class="em-search-location" <?php if( !empty($args['search_geo']) && !empty($args['geo']) && !empty($args['near']) ): ?>style="display:none;"<?php endif; /* show location fields if no geo search is made */ ?>>
<?php
//figure out if we have a default country or one submitted via search
if( !empty($args['search_countries']) ){
em_locate_template('templates/search/location-countries.php',true,array('args'=>$args));
}else{
?><input type="hidden" name="country" value="<?php echo esc_attr($args['country']); ?>" /><?php
}
?>
<div class="em-search-location-meta" <?php if( empty($args['country']) && !empty($args['search_countries']) ): ?>style="display:none;"<?php endif; /* show location meta if country field has value or not shown */ ?>>
<?php
if( !empty($args['search_regions']) ) em_locate_template('templates/search/location-regions.php',true,array('args'=>$args));
if( !empty($args['search_states']) ) em_locate_template('templates/search/location-states.php',true,array('args'=>$args));
if( !empty($args['search_towns']) ) em_locate_template('templates/search/location-towns.php',true,array('args'=>$args));
?>
</div>
</div>

View File

@ -1,17 +0,0 @@
<?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
<!-- START Date Search -->
<div class="em-search-scope em-search-field">
<span class="em-search-scope em-events-search-dates em-date-range">
<label>
<span><?php echo esc_html($args['scope_label']); ?></span>
<input type="text" class="em-date-input-loc em-date-start" />
<input type="hidden" class="em-date-input" name="scope[0]" value="<?php echo esc_attr($args['scope'][0]); ?>" />
</label>
<label>
<?php echo esc_html($args['scope_seperator']); ?>
<input type="text" class="em-date-input-loc em-date-end" />
<input type="hidden" class="em-date-input" name="scope[1]" value="<?php echo esc_attr($args['scope'][1]); ?>" />
</label>
</span>
</div>
<!-- END Date Search -->

View File

@ -1,15 +0,0 @@
<?php
/* This general search will find matches within event_name, event_notes, and the location_name, address, town, state and country. */
$args = !empty($args) ? $args:array(); /* @var $args array */
?>
<!-- START General Search -->
<div class="em-search-text em-search-field">
<script type="text/javascript">
EM.search_term_placeholder = '<?php echo esc_attr($args['search_term_label']); ?>';
</script>
<label>
<span class="screen-reader-text"><?php echo esc_html($args['search_term_label']); ?></span>
<input type="text" name="em_search" class="em-events-search-text em-search-text" value="<?php echo esc_attr($args['search']); ?>" />
</label>
</div>
<!-- END General Search -->

View File

@ -1,12 +0,0 @@
<?php
/*
* This page displays a single event, called during the em_content() if this is an event page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display events however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Events::output()
*/
global $EM_Tag;
/* @var $EM_Tag EM_Tag */
echo $EM_Tag->output_single();
?>

View File

@ -1,17 +0,0 @@
<?php
/*
* Default tags List Template
* This page displays a list of locations, called during the em_content() if this is an events list page.
* You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager/templates/ and modifying it however you need.
* You can display locations (or whatever) however you wish, there are a few variables made available to you:
*
* $args - the args passed onto EM_Locations::output()
*
*/
$args = apply_filters('em_content_tags_args', $args);
if( get_option('dbem_css_taglist') ) echo "<div class='css-tags-list'>";
echo EM_Tags::output( $args );
if( get_option('dbem_css_taglist') ) echo "</div>";

View File

@ -1,62 +0,0 @@
/*
Theme Name: Leon Corre Theme
Theme URI: https://yourwebsite.com
Author: Your Name
Author URI: https://yourwebsite.com
Template: twentyseventeen
Description: Child theme for Twenty Seventeen.
Version: 0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags:
Text Domain: twentyseventeen-child
*/
@import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Slab');
body,
button,
input,
select,
textarea {
color: #333;
/*font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;*/
font-family:"Roboto Slab",arial !important;
font-size: 15px;
font-size: 0.9375rem;
font-weight: 400;
line-height: 1.66;
}
p {
font-family:"Roboto",arial !important;
text-align:justify !important;
}
p.site-description {text-align:center !important;}
select {width:100%;}
ul,
ol {padding: 0 50px; }
li {padding:5px;}
.elementor-widget-heading .elementor-heading-title {color:#000 !important;}
/*.wrap {padding:30px !important;}*/
.page.page-one-column .entry-header, .twentyseventeen-front-page.page-one-column .entry-header, .archive.page-one-column:not(.has-sidebar) .page-header {margin-bottom:1em !important;}
.custom-logo {width:200px !important;height:auto !important;max-height:1000px !important;}
.main-navigation a {color:#eee;}
.main-navigation a:hover
{ color:#fff;}
.icon-arrow-right {color:#fff;}
a, .page .panel-content .entry-title, .page-title, body.page:not(.twentyseventeen-front-page) .entry-title
{color: #000000;
font-family:"Libre Franklin", "Helvetica Neue", helvetica;
}
.elementor-divider-separator {border:2px solid #008000 !important;}
strong {color:#008000;}
button, input[type="button"], input[type="submit"]
{background-color:#008000;}
h2 {font-weight:500;color:#008000;}
.navigation-top {bottom:auto !important; top:0 !important; background-color:#008000; }
#post-16 .entry-header {display:none;}

View File

@ -1,32 +0,0 @@
<?php
/**
* Displays footer widgets if assigned
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<?php
if ( is_active_sidebar( 'sidebar-2' ) ||
is_active_sidebar( 'sidebar-3' ) ) :
?>
<aside class="widget-area" role="complementary">
<?php
if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
<div class="widget-column footer-widget-1">
<?php dynamic_sidebar( 'sidebar-2' ); ?>
</div>
<?php }
if ( is_active_sidebar( 'sidebar-3' ) ) { ?>
<div class="widget-column footer-widget-2">
<?php dynamic_sidebar( 'sidebar-3' ); ?>
</div>
<?php } ?>
</aside><!-- .widget-area -->
<?php endif; ?>

View File

@ -1,14 +0,0 @@
<?php
/**
* Displays footer site info
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->

View File

@ -1,20 +0,0 @@
<?php
/**
* Displays header media
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<div class="custom-header">
<div class="custom-header-media">
<?php the_custom_header_markup(); ?>
</div>
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
</div><!-- .custom-header -->

View File

@ -1,38 +0,0 @@
<?php
/**
* Displays header site branding
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<div class="site-branding">
<div class="wrap">
<div class="site-branding-logo" style="text-align:center;">
<?php the_custom_logo(); ?>
</div>
<div class="site-branding-text" style="text-align:center;width:100%;">
<?php if ( is_front_page() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
</div><!-- .site-branding-text -->
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
<?php endif; ?>
</div><!-- .wrap -->
</div><!-- .site-branding -->

View File

@ -1,29 +0,0 @@
<?php
/**
* Displays top navigation
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/
?>
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentyseventeen' ); ?>">
<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false">
<?php
echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) );
echo twentyseventeen_get_svg( array( 'icon' => 'close' ) );
_e( 'Menu', 'twentyseventeen' );
?>
</button>
<?php wp_nav_menu( array(
'theme_location' => 'top',
'menu_id' => 'top-menu',
) ); ?>
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
<?php endif; ?>
</nav><!-- #site-navigation -->

View File

@ -1,79 +0,0 @@
<?php
/**
* Template part for displaying pages on front page
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
global $twentyseventeencounter;
?>
<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
<?php if ( has_post_thumbnail() ) :
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
// Calculate aspect ratio: h / w * 100%.
$ratio = $thumbnail[2] / $thumbnail[1] * 100;
?>
<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
<div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
</div><!-- .panel-image -->
<?php endif; ?>
<span id="<?php echo get_post()->post_name; ?>" style="margin-bottom:20px;"></span>
<div class="panel-content">
<div class="wrap">
<header class="entry-header">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
?>
</div><!-- .entry-content -->
<?php
// Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int).
if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) : ?>
<?php // Show four most recent posts.
$recent_posts = new WP_Query( array(
'posts_per_page' => 3,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'no_found_rows' => true,
) );
?>
<?php if ( $recent_posts->have_posts() ) : ?>
<div class="recent-posts">
<?php
while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
get_template_part( 'template-parts/post/content', 'excerpt' );
endwhile;
wp_reset_postdata();
?>
</div><!-- .recent-posts -->
<?php endif; ?>
<?php endif; ?>
</div><!-- .wrap -->
</div><!-- .panel-content -->
</article><!-- #post-## -->

View File

@ -1,53 +0,0 @@
<?php
/**
* Displays content for front page
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
<?php if ( has_post_thumbnail() ) :
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
$thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
// Calculate aspect ratio: h / w * 100%.
$ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100;
?>
<div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
<div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
</div><!-- .panel-image -->
<?php endif; ?>
<div class="panel-content">
<div class="wrap">
<header class="entry-header" style="">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
?>
</div><!-- .entry-content -->
</div><!-- .wrap -->
</div><!-- .panel-content -->
</article><!-- #post-## -->

View File

@ -1,30 +0,0 @@
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->

View File

@ -1,105 +0,0 @@
<?php
/**
* Template part for displaying audio posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
?>
<header class="entry-header">
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
<?php
$content = apply_filters( 'the_content', get_the_content() );
$audio = false;
// Only get audio from the content if a playlist isn't present.
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );
}
?>
<?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
</a>
</div><!-- .post-thumbnail -->
<?php endif; ?>
<div class="entry-content">
<?php
if ( ! is_single() ) {
// If not a single post, highlight the audio file.
if ( ! empty( $audio ) ) {
foreach ( $audio as $audio_html ) {
echo '<div class="entry-audio">';
echo $audio_html;
echo '</div><!-- .entry-audio -->';
}
};
};
if ( is_single() || empty( $audio ) ) {
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
};
?>
</div><!-- .entry-content -->
<?php
if ( is_single() ) {
twentyseventeen_entry_footer();
}
?>
</article><!-- #post-## -->

View File

@ -1,46 +0,0 @@
<?php
/**
* Template part for displaying posts with excerpts
*
* Used in Search Results and for Recent Posts in Front Page panels.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.2
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
?>
</div><!-- .entry-meta -->
<?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?>
<div class="entry-meta">
<?php twentyseventeen_edit_link(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( is_front_page() && ! is_home() ) {
// The excerpt is being displayed within a front page section, so it's a lower hierarchy than h2.
the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );
} else {
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
} ?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</article><!-- #post-## -->

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