4.0
parent
f4a7a3c60e
commit
b6ca1fc142
674
LICENSE
674
LICENSE
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<https://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
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
48
README.md
48
README.md
|
@ -1,47 +1,65 @@
|
|||
## 主题介绍
|
||||
## CorePress Theme
|
||||
|
||||

|
||||
|
||||
CorePress,是一款多功能的WordPress主题,专为极客制作的一款主题,主题功能完善,设置丰富。
|
||||
|
||||
WordPress深度优化,颜值与性能并存,你想要的功能他都有,干掉收费主题,从这儿开始。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 主题特色
|
||||
|
||||
- 无框架设计
|
||||
* 超小体积
|
||||
|
||||
主题无前端界面库框架,加载更迅速。
|
||||
|
||||
* 响应式设计
|
||||
|
||||
主题采用响应式设计,完美兼容PC端、手机端和平板等各类设备访问
|
||||
主题体积小于2m,代码精,功能全,颜值高,兼容好。
|
||||
|
||||
* 无框架设计
|
||||
主题无前端界面库框架,代码为作者手撸,体积小,兼容好。
|
||||
* 大量优化功能
|
||||
另外,对于WordPress,主题供了很多的优化,屏蔽了WordPress很多无法使用的功能,使WordPress主题加载更为迅速。
|
||||
深度优化WordPress,干掉没有卵用的函数,让后台访问更快,再也不用莫名其妙的等待好多秒了。
|
||||
* 响应式设计
|
||||
主题采用响应式设计,完美兼容PC端、手机端和平板等各类设备访问
|
||||
|
||||
* 个性化主题设置
|
||||
主题提供可视化设置面板,可自定义配置超过即几十项,比一些收费的主题功能还多。
|
||||
|
||||
允许设置主色调,侧边栏位置,显示幻灯片等配置。
|
||||
支持自定义配色,允许设置主色调,侧边栏显示方式,显示幻灯片等配置。
|
||||
|
||||
* SEO友好
|
||||
主题自带SEO配置,智能设置每篇文章SEO功能,并提供文章独立SEO配置。
|
||||
|
||||
* 编辑器增强
|
||||
自带多种功能短代码,让文章撰写更方便。支持代码高亮,方便快捷插入与编辑代码
|
||||
* webp,SVG支持
|
||||
支持webp,SVG上传、显示。
|
||||
* 多个小工具
|
||||
主题自带多种小工具,最新评论,作者信息,热门文章
|
||||
* 前端用户中心
|
||||
开启用户中心,接管WordPress自带登录页面,注册页面,找回密码页面,同时自定义个人中心设置页面,支持修改昵称,签名,修改密码,绑定账号。
|
||||
* 多种功能模块
|
||||
防红模块,禁止文章复制,WordPress邮件配置,图片灯箱
|
||||
|
||||
### 环境要求
|
||||
PHP版本5.6以上,并且开启了eval函数
|
||||
PHP版本5.6以上,WordPress 5.0+
|
||||
|
||||
推荐使用宝塔建站
|
||||
|
||||

|
||||

|
||||
|
||||
### LICENSE
|
||||
|
||||
遵循GPL协议,非商业用途免费使用
|
||||
遵循GPL协议,非商业用途免费使用 ,请保留底部版权
|
||||
|
||||
### 使用文档
|
||||
|
||||
大多数的使用方法都写到文档了,有问题先看文档,能解决百分之90的问题
|
||||
|
||||
[https://www.yuque.com/applek/corepress](https://www.yuque.com/applek/corepress)
|
||||
|
||||
|
||||
|
||||
### 演示地址
|
||||
|
||||
[https://www.lovestu.com/](https://www.lovestu.com)
|
||||
|
|
25
category.php
25
category.php
|
@ -20,6 +20,31 @@
|
|||
<div class="html-main">
|
||||
<?php
|
||||
global $set;
|
||||
if ($set['theme']['sidebar']['other']) {
|
||||
?>
|
||||
<style>
|
||||
body .post-info-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-item-thumbnail img {
|
||||
max-width: 336px;
|
||||
}
|
||||
.post-item-content,.post-item-info {
|
||||
font-size: 16px;
|
||||
}
|
||||
.post-item h2 {
|
||||
font-size: 22px;
|
||||
|
||||
}
|
||||
</style>
|
||||
<div class="post-main post-main-closesidebar" style="flex-basis: 100%;">
|
||||
<?php
|
||||
get_template_part('component/post-main-index');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else
|
||||
if ($set['theme']['sidebar_position'] == 1) {
|
||||
?>
|
||||
<div class="post-main">
|
||||
|
|
30
comments.php
30
comments.php
|
@ -1,8 +1,30 @@
|
|||
<?php
|
||||
if (post_password_required())
|
||||
if (post_password_required()) {
|
||||
return;
|
||||
}
|
||||
global $set;
|
||||
?>
|
||||
<?php
|
||||
if (is_single()) {
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['post_4_phone'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-comment">
|
||||
<?php echo base64_decode($set['ad']['post_4_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['post_4'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-comment">
|
||||
<?php echo base64_decode($set['ad']['post_4']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div id="comments" class="responsesWrapper">
|
||||
<?php if (comments_open()) {
|
||||
|
@ -14,7 +36,7 @@ if (post_password_required())
|
|||
}
|
||||
?>
|
||||
<?php
|
||||
global $set;
|
||||
|
||||
$comment_face = '';
|
||||
if ($set['comment']['face'] == 1) {
|
||||
$comment_face = '<button class="popover-btn popover-btn-face" type="button"><i class="far fa-smile-wink"></i> 添加表情</button>
|
||||
|
@ -93,7 +115,7 @@ if (post_password_required())
|
|||
?>
|
||||
|
||||
<script type='text/javascript'
|
||||
src='<?php echo get_bloginfo('siteurl') ?>/wp-includes/js/comment-reply.min.js?ver=5.1.1'></script>
|
||||
src='<?php echo get_bloginfo('url') ?>/wp-includes/js/comment-reply.min.js?ver=5.1.1'></script>
|
||||
<script type='text/javascript'>
|
||||
|
||||
$('body').on('click', '.comment-reply-link', function (e) {
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
global $set;
|
||||
$logourl = $set['routine']['logo'];
|
||||
if ($logourl == '') {
|
||||
echo '<a href="' . get_bloginfo('siteurl') . '"><h2>CorePress</h2></a>';
|
||||
echo '<a href="' . get_bloginfo('url') . '"><h2>CorePress</h2></a>';
|
||||
} else {
|
||||
echo '<a href="/"><img src="' . $logourl . '" alt=""></a>';
|
||||
}
|
||||
|
@ -99,7 +99,6 @@
|
|||
src="<?php echo corepress_get_avatar_url() ?>" alt=""><span
|
||||
class="user-menu-name"><?php echo corepress_get_user_nickname() ?></span></a>
|
||||
<ul class="user-sub-menu">
|
||||
<li><a href="<?php echo admin_url('profile.php'); ?>"><i class="fas fa-user"></i> 个人中心</a></li>
|
||||
<?php
|
||||
if ($set['user']['usercenter'] == 1 && $set['user']['usercenterurl'] != null) {
|
||||
echo ' <li><a href="' . $set['user']['usercenterurl'] . '"><i class="fas fa-user-cog"></i> 账号设置</a></li>';
|
||||
|
@ -116,7 +115,7 @@
|
|||
}
|
||||
|
||||
?>
|
||||
<li><a href="<?php echo wp_logout_url(get_bloginfo('siteurl')) ?>"><i
|
||||
<li><a href="<?php echo wp_logout_url(get_bloginfo('url')) ?>"><i
|
||||
class="fas fa-sign-out-alt"></i> 退出登录</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
global $corepress_post_meta;
|
||||
global $corepress_post_meta, $set;
|
||||
if ($corepress_post_meta['postrighttag']['open'] == 1) {
|
||||
?>
|
||||
<style>
|
||||
.post-content:before {
|
||||
.crumbs-plane-body:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
@ -13,9 +13,10 @@ if ($corepress_post_meta['postrighttag']['open'] == 1) {
|
|||
height: 0;
|
||||
border-top: 80px solid<?php echo $corepress_post_meta['postrighttag']['color']?>;
|
||||
border-left: 80px solid transparent;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.post-content:after {
|
||||
.crumbs-plane-body:after {
|
||||
content: "<?php echo $corepress_post_meta['postrighttag']['text']?>";
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
|
@ -23,286 +24,345 @@ if ($corepress_post_meta['postrighttag']['open'] == 1) {
|
|||
top: 14px;
|
||||
z-index: 9;
|
||||
transform: rotate(45deg);
|
||||
z-index: 10;
|
||||
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="post-content">
|
||||
<h1 class="post-title">
|
||||
<?php the_title();
|
||||
global $set;
|
||||
?>
|
||||
</h1>
|
||||
<div class="post-info">
|
||||
<div class="post-info-left">
|
||||
<?php
|
||||
$author = get_the_author_meta('ID');
|
||||
$author_url = get_author_posts_url($author);
|
||||
$author_name = get_the_author();
|
||||
<div class="post-content-body">
|
||||
<div class="crumbs-plane-body">
|
||||
<?php
|
||||
if ($set['theme']['crumbs'] == 1) {
|
||||
?>
|
||||
<a class="nickname url fn j-user-card" data-user="<?php echo $author; ?>"
|
||||
href="<?php echo $author_url; ?>"><i class="fa fa-user"
|
||||
aria-hidden="true"></i><?php echo $author_name; ?>
|
||||
</a>
|
||||
<span class="dot">•</span>
|
||||
<time class="entry-date published"
|
||||
datetime="<?php echo get_post_time('c', false, $post); ?>>" pubdate><i class="far fa-clock"></i>
|
||||
<?php echo format_date(get_post_time('U', false, $post)); ?>
|
||||
</time>
|
||||
<span class="dot">•</span><i class="fas fa-folder"></i>
|
||||
<?php the_category(', ', '', false); ?>
|
||||
<?php if (function_exists('the_views')) {
|
||||
$views = intval(get_post_meta($post->ID, 'views', true));
|
||||
?>
|
||||
<span class="dot">•</span>
|
||||
<span><i class="fa fa-eye"
|
||||
aria-hidden="true"></i><?php echo sprintf('%s 阅读', $views); ?></span>
|
||||
<?php }
|
||||
if (get_edit_post_link() != null) {
|
||||
|
||||
?>
|
||||
<span class="dot">•</span>
|
||||
<a href="<?php echo get_edit_post_link(); ?>"><i class="fas fa-edit"></i> 编辑</a>
|
||||
<div class="crumbs-plane">
|
||||
<?php
|
||||
}
|
||||
the_breadcrumb();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<h1 class="post-title">
|
||||
<?php the_title();
|
||||
?>
|
||||
</div>
|
||||
<div class="post-info-right">
|
||||
</h1>
|
||||
<div class="post-info">
|
||||
<div class="post-info-left">
|
||||
<?php
|
||||
$author = get_the_author_meta('ID');
|
||||
$author_url = get_author_posts_url($author);
|
||||
$author_name = get_the_author();
|
||||
?>
|
||||
<a class="nickname url fn j-user-card" data-user="<?php echo $author; ?>"
|
||||
href="<?php echo $author_url; ?>"><i class="fa fa-user"
|
||||
aria-hidden="true"></i><?php echo $author_name; ?>
|
||||
</a>
|
||||
<span class="dot">•</span>
|
||||
<time class="entry-date published"
|
||||
datetime="<?php echo get_post_time('c', false, $post); ?>>" pubdate><i
|
||||
class="far fa-clock"></i>
|
||||
<?php echo format_date(get_post_time('U', false, $post)); ?>
|
||||
</time>
|
||||
<span class="dot">•</span><i class="fas fa-folder"></i>
|
||||
<?php the_category(', ', '', false); ?>
|
||||
<?php if (function_exists('the_views')) {
|
||||
$views = intval(get_post_meta($post->ID, 'views', true));
|
||||
?>
|
||||
<span class="dot">•</span>
|
||||
<span><i class="fa fa-eye"
|
||||
aria-hidden="true"></i><?php echo sprintf('%s 阅读', $views); ?></span>
|
||||
<?php }
|
||||
if (get_edit_post_link() != null) {
|
||||
|
||||
?>
|
||||
<span class="dot">•</span>
|
||||
<a href="<?php echo get_edit_post_link(); ?>"><i class="fas fa-edit"></i> 编辑</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="post-info-right">
|
||||
<span title="关闭或显示侧边栏" class="post-info-switch-sidebar post-info-switch-sidebar-show"><i
|
||||
class="fas fa-toggle-on"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-content-post">
|
||||
<div class="post-content-content">
|
||||
<?php
|
||||
the_content();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-end-tools">
|
||||
<?php if ($set['post']['copyright_show'] == 1) {
|
||||
<?php
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['post_2_phone'] != null) {
|
||||
?>
|
||||
<div class="post-copyright">
|
||||
<?php if ($set['post']['copyright'] == null) {
|
||||
<div class="ad-plane-post-in">
|
||||
<?php echo base64_decode($set['ad']['post_2_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['post_2'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-in">
|
||||
<?php echo base64_decode($set['ad']['post_2']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="post-content-post">
|
||||
<div class="post-content-content">
|
||||
<?php
|
||||
the_content();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-end-tools">
|
||||
<?php if ($set['post']['copyright_show'] == 1) {
|
||||
?>
|
||||
<div class="post-copyright">
|
||||
<?php if ($set['post']['copyright'] == null) {
|
||||
?>
|
||||
<p>版权声明:
|
||||
<br>作者:<?php echo $author_name ?>
|
||||
<br>链接:<span><u><a href="<?php echo get_permalink(); ?>"
|
||||
target="_blank"><?php echo get_permalink(); ?></a></u></span>
|
||||
<br>来源:<?php bloginfo('name'); ?>
|
||||
<br>文章版权归作者所有,未经允许请勿转载。
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
echo corepress_replace_copyright(base64_decode($set['post']['copyright']));
|
||||
}
|
||||
?>
|
||||
<p>版权声明:
|
||||
<br>作者:<?php echo $author_name ?>
|
||||
<br>链接:<span><u><a href="<?php echo get_permalink(); ?>"
|
||||
target="_blank"><?php echo get_permalink(); ?></a></u></span>
|
||||
<br>来源:<?php bloginfo('name'); ?>
|
||||
<br>文章版权归作者所有,未经允许请勿转载。
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
echo corepress_replace_copyright(base64_decode($set['post']['copyright']));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
<div class="post-end-dividing">
|
||||
THE END
|
||||
</div>
|
||||
<div class="post-tags">
|
||||
<?php
|
||||
the_tags('<span class="post-tags-icon"><i class="fas fa-tags"></i></span>', '');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-end-tool-btns">
|
||||
<div class="post-share-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-share-btn','#share-plane',event)">
|
||||
<?php file_echo_svg('share-btn.svg') ?>
|
||||
分享
|
||||
</div>
|
||||
<div class="post-qrcode-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-qrcode-btn','#qrcode-plane',event)">
|
||||
<?php file_echo_svg('svg-ewm.svg') ?>
|
||||
二维码
|
||||
</div>
|
||||
<?php if ($set['post']['reward1'] != null || $set['post']['reward2'] != null) {
|
||||
?>
|
||||
<div class="post-reward-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-reward-btn','#reward-plane',event)">
|
||||
<?php file_echo_svg('reward.svg') ?>
|
||||
打赏
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
<div class="post-end-dividing">
|
||||
THE END
|
||||
</div>
|
||||
<div class="post-tags">
|
||||
<?php
|
||||
the_tags('<span class="post-tags-icon"><i class="fas fa-tags"></i></span>', '');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$description = str_replace("\n", "", mb_strimwidth(strip_tags(get_the_content()), 0, 200, "…", 'utf-8'));
|
||||
?>
|
||||
<div id="share-plane" class="post-pop-plane">
|
||||
<div class="post-share-list">
|
||||
<a href="<?php echo get_share_url('qq', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-qq.svg') ?>
|
||||
</a>
|
||||
<a href="<?php echo get_share_url('qzone', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-qzone.svg') ?>
|
||||
</a>
|
||||
<a href="<?php echo get_share_url('weibo', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-weibo.svg') ?>
|
||||
</a>
|
||||
<div class="post-end-tool-btns">
|
||||
<div class="post-share-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-share-btn','#share-plane',event)">
|
||||
<?php file_echo_svg('share-btn.svg') ?>
|
||||
分享
|
||||
</div>
|
||||
<div class="post-qrcode-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-qrcode-btn','#qrcode-plane',event)">
|
||||
<?php file_echo_svg('svg-ewm.svg') ?>
|
||||
二维码
|
||||
</div>
|
||||
<?php if ($set['post']['reward1'] != null || $set['post']['reward2'] != null) {
|
||||
?>
|
||||
<div class="post-reward-btn post-end-tool-btn-item"
|
||||
onclick="showplane('.post-reward-btn','#reward-plane',event)">
|
||||
<?php file_echo_svg('reward.svg') ?>
|
||||
打赏
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
<?php
|
||||
$description = str_replace("\n", "", mb_strimwidth(strip_tags(get_the_content()), 0, 200, "…", 'utf-8'));
|
||||
?>
|
||||
<div id="share-plane" class="post-pop-plane">
|
||||
<div class="post-share-list">
|
||||
<a href="<?php echo get_share_url('qq', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-qq.svg') ?>
|
||||
</a>
|
||||
<a href="<?php echo get_share_url('qzone', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-qzone.svg') ?>
|
||||
</a>
|
||||
<a href="<?php echo get_share_url('weibo', get_the_title(), $description) ?>"
|
||||
target="_blank">
|
||||
<?php file_echo_svg('share-weibo.svg') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="qrcode-plane" class="post-pop-plane">
|
||||
<div id="qrcode-img"></div>
|
||||
</div>
|
||||
<div id="reward-plane" class="post-pop-plane">
|
||||
<img src="<?php echo $set['post']['reward1'] ?>" alt="">
|
||||
<img src="<?php echo $set['post']['reward2'] ?>" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div id="qrcode-plane" class="post-pop-plane">
|
||||
<div id="qrcode-img"></div>
|
||||
</div>
|
||||
<div id="reward-plane" class="post-pop-plane">
|
||||
<img src="<?php echo $set['post']['reward1'] ?>" alt="">
|
||||
<img src="<?php echo $set['post']['reward2'] ?>" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
if ($set['theme']['postcontent']['turn_page_plane'] == 1) {
|
||||
?>
|
||||
<div class="post-turn-page-plane">
|
||||
<?php
|
||||
$post_previous = get_previous_post(0);
|
||||
$post_obj['title'] = get_the_title($post_previous);
|
||||
$post_obj['thumbnail'] = get_the_post_thumbnail_url($post_previous);
|
||||
$post_obj['url'] = get_the_permalink($post_previous);
|
||||
<?php
|
||||
if ($set['theme']['postcontent']['turn_page_plane'] == 1) {
|
||||
?>
|
||||
<div class="post-turn-page post-turn-page-previous"
|
||||
style="background-image:url(<?php echo $post_obj['thumbnail'] ?>)">
|
||||
<div class="post-turn-page-main">
|
||||
<div>
|
||||
<a href="<?php echo $post_obj['url']; ?>"><?php echo $post_obj['title']; ?></a>
|
||||
<div class="post-turn-page-plane">
|
||||
<?php
|
||||
$post_previous = get_previous_post(0);
|
||||
$post_obj['title'] = get_the_title($post_previous);
|
||||
$post_obj['thumbnail'] = get_the_post_thumbnail_url($post_previous);
|
||||
$post_obj['url'] = get_the_permalink($post_previous);
|
||||
?>
|
||||
<div class="post-turn-page post-turn-page-previous"
|
||||
style="background-image:url(<?php echo $post_obj['thumbnail'] ?>)">
|
||||
<div class="post-turn-page-main">
|
||||
<div>
|
||||
<a href="<?php echo $post_obj['url']; ?>"><?php echo $post_obj['title']; ?></a>
|
||||
</div>
|
||||
<div class="post-turn-page-link-pre">
|
||||
<a href="<?php echo $post_obj['url']; ?>"><
|
||||
<上一篇
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-turn-page-link-pre">
|
||||
<a href="<?php echo $post_obj['url']; ?>"><
|
||||
<上一篇
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
$post_next = get_next_post(0);
|
||||
$post_obj['title'] = get_the_title($post_next);
|
||||
$post_obj['thumbnail'] = get_the_post_thumbnail_url($post_next);
|
||||
$post_obj['url'] = get_the_permalink($post_next);
|
||||
?>
|
||||
<div class="post-turn-page post-turn-page-next"
|
||||
style="background-image:url(<?php echo $post_obj['thumbnail'] ?>)">
|
||||
<div class="post-turn-page-main">
|
||||
<div>
|
||||
<a href="<?php echo $post_obj['url']; ?>"><?php echo $post_obj['title']; ?></a>
|
||||
</div>
|
||||
<div class="post-turn-page-link-next">
|
||||
<a href="<?php echo $post_obj['url']; ?>">下一篇>></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$post_next = get_next_post(0);
|
||||
$post_obj['title'] = get_the_title($post_next);
|
||||
$post_obj['thumbnail'] = get_the_post_thumbnail_url($post_next);
|
||||
$post_obj['url'] = get_the_permalink($post_next);
|
||||
?>
|
||||
<div class="post-turn-page post-turn-page-next"
|
||||
style="background-image:url(<?php echo $post_obj['thumbnail'] ?>)">
|
||||
<div class="post-turn-page-main">
|
||||
<div>
|
||||
<a href="<?php echo $post_obj['url']; ?>"><?php echo $post_obj['title']; ?></a>
|
||||
</div>
|
||||
<div class="post-turn-page-link-next">
|
||||
<a href="<?php echo $post_obj['url']; ?>">下一篇>></a>
|
||||
</div>
|
||||
</div>
|
||||
} ?>
|
||||
<script>
|
||||
$(document).click(function (e) {
|
||||
$('.post-pop-plane').removeClass("post-pop-plane-show");
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('.post-info-switch-sidebar').click(function () {
|
||||
$('.sidebar').toggleClass('sidebar-display');
|
||||
$('.post-main').toggleClass('post-main-full');
|
||||
$(this).toggleClass('post-info-switch-sidebar-show');
|
||||
})
|
||||
$('.clickshow').click(function () {
|
||||
$('#share-plane').removeClass("share-plane-show");
|
||||
$('#qrcode-plane').removeClass("share-plane-show");
|
||||
$(this).toggleClass('clickshow-show');
|
||||
});
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
<script>
|
||||
$(document).click(function (e) {
|
||||
$('.post-pop-plane').removeClass("post-pop-plane-show");
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('.post-info-switch-sidebar').click(function () {
|
||||
$('.sidebar').toggleClass('sidebar-display');
|
||||
$('.post-main').toggleClass('post-main-full');
|
||||
$(this).toggleClass('post-info-switch-sidebar-show');
|
||||
})
|
||||
$('.clickshow').click(function () {
|
||||
$('#share-plane').removeClass("share-plane-show");
|
||||
$('#qrcode-plane').removeClass("share-plane-show");
|
||||
$(this).toggleClass('clickshow-show');
|
||||
});
|
||||
|
||||
function showplane(btn_name, plane_name, e) {
|
||||
$('.post-pop-plane').removeClass("post-pop-plane-show");
|
||||
$(plane_name).addClass("post-pop-plane-show");
|
||||
var btn_left = $(btn_name).position().left;
|
||||
var plane_width = $(plane_name).outerWidth();
|
||||
var btn_width = $(btn_name).outerWidth();
|
||||
var btn_hight = $(btn_name).outerHeight();
|
||||
$(plane_name).css('left', btn_left - plane_width / 2 + btn_width / 2 + 'px');
|
||||
$(plane_name).css('bottom', btn_hight + 10 + 'px');
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
$('.post-qrcode-btn').click((e) => {
|
||||
$('#qrcode-plane').addClass("share-plane-show");
|
||||
e.stopPropagation();
|
||||
});
|
||||
new QRCode($('#qrcode-img')[0], window.location.href);
|
||||
$(this).next().animate({height: '100%'}, 500);
|
||||
$('.zd-plane-title').click(function (e) {
|
||||
if (!$(this).hasClass('zd-plane-title-zk')) {
|
||||
$(this).addClass('zd-plane-title-zk');
|
||||
$(this).next().slideDown();
|
||||
} else {
|
||||
$(this).removeClass('zd-plane-title-zk')
|
||||
$(this).next().slideUp();
|
||||
function showplane(btn_name, plane_name, e) {
|
||||
$('.post-pop-plane').removeClass("post-pop-plane-show");
|
||||
$(plane_name).addClass("post-pop-plane-show");
|
||||
var btn_left = $(btn_name).position().left;
|
||||
var plane_width = $(plane_name).outerWidth();
|
||||
var btn_width = $(btn_name).outerWidth();
|
||||
var btn_hight = $(btn_name).outerHeight();
|
||||
$(plane_name).css('left', btn_left - plane_width / 2 + btn_width / 2 + 'px');
|
||||
$(plane_name).css('bottom', btn_hight + 10 + 'px');
|
||||
e.stopPropagation();
|
||||
}
|
||||
})
|
||||
var clipboard = new ClipboardJS('.code-bar-btn-copy-fonticon', {
|
||||
text: function (trigger) {
|
||||
copynotmsg = 1;
|
||||
return $(trigger).parent().prev().text();
|
||||
}
|
||||
});
|
||||
|
||||
var copy_pwd = new ClipboardJS('.btn-copy-pwd', {
|
||||
text: function (trigger) {
|
||||
copynotmsg = 1;
|
||||
return $(trigger).parent().find('.c-downbtn-pwd-key').text();
|
||||
}
|
||||
});
|
||||
copy_pwd.on('success', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
setTimeout(function () {
|
||||
$('.post-qrcode-btn').click((e) => {
|
||||
$('#qrcode-plane').addClass("share-plane-show");
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
||||
new QRCode($('#qrcode-img')[0], window.location.href);
|
||||
|
||||
$(this).next().animate({height: '100%'}, 500);
|
||||
$('.zd-plane-title').click(function (e) {
|
||||
if (!$(this).hasClass('zd-plane-title-zk')) {
|
||||
$(this).addClass('zd-plane-title-zk');
|
||||
$(this).next().slideDown();
|
||||
} else {
|
||||
$(this).removeClass('zd-plane-title-zk')
|
||||
$(this).next().slideUp();
|
||||
}
|
||||
})
|
||||
var clipboard = new ClipboardJS('.code-bar-btn-copy-fonticon', {
|
||||
text: function (trigger) {
|
||||
copynotmsg = 1;
|
||||
return $(trigger).parent().prev().text();
|
||||
}
|
||||
});
|
||||
|
||||
var copy_pwd = new ClipboardJS('.btn-copy-pwd', {
|
||||
text: function (trigger) {
|
||||
copynotmsg = 1;
|
||||
return $(trigger).parent().find('.c-downbtn-pwd-key').text();
|
||||
}
|
||||
});
|
||||
copy_pwd.on('success', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
}, 2000);
|
||||
});
|
||||
setTimeout(function () {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
|
||||
clipboard.on('success', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
setTimeout(function () {
|
||||
//$(e.trigger).text('复制')
|
||||
clipboard.on('success', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
}, 2000);
|
||||
});
|
||||
clipboard.on('error', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal times')
|
||||
setTimeout(function () {
|
||||
setTimeout(function () {
|
||||
//$(e.trigger).text('复制')
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal fa-check')
|
||||
}, 2000);
|
||||
});
|
||||
clipboard.on('error', function (e) {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal times')
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="post-tool-plane">
|
||||
<?php
|
||||
if ($corepress_post_meta['catalog'] == 1) {
|
||||
?>
|
||||
<div id="post-catalog">
|
||||
<div class="catalog-title">文章目录</div>
|
||||
<div id="post-catalog-list">
|
||||
setTimeout(function () {
|
||||
$(e.trigger).toggleClass('fal fa-clone')
|
||||
$(e.trigger).toggleClass('fal times')
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="post-tool-plane">
|
||||
<?php
|
||||
if ($corepress_post_meta['catalog'] == 1) {
|
||||
?>
|
||||
<div id="post-catalog">
|
||||
<div class="catalog-title">文章目录</div>
|
||||
<div id="post-catalog-list">
|
||||
</div>
|
||||
<div class="catalog-close" onclick="close_show(0)">关闭</div>
|
||||
</div>
|
||||
<div class="catalog-close" onclick="close_show(0)">关闭</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['post_3_phone'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-in">
|
||||
<?php echo base64_decode($set['ad']['post_3_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
} else {
|
||||
if ($set['ad']['post_3'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-in">
|
||||
<?php echo base64_decode($set['ad']['post_3']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relevant-plane">
|
||||
|
|
|
@ -29,6 +29,8 @@ if (has_post_thumbnail()) {
|
|||
}
|
||||
|
||||
|
||||
} else if ($postitem['post_meta']['thumbnail'] != '') {
|
||||
$postitem['thumbnail'] = $postitem['post_meta']['thumbnail'];
|
||||
} else if ($set['routine']['autothumbnail'] == 1) {
|
||||
$preg = '/<img.*?src=[\"|\']?(.*?)[\"|\']?\s.*?>/i';
|
||||
preg_match($preg, $post->post_content, $imgArr);
|
||||
|
@ -46,6 +48,8 @@ if (function_exists('the_views')) {
|
|||
}
|
||||
$postitem['url'] = get_the_permalink();
|
||||
$postitem['author'] = get_the_author();
|
||||
$postitem['author_avatar'] = get_avatar(get_the_author_meta('email'), 24, '', '', array('class' => 'post-item-avatar'));
|
||||
|
||||
|
||||
$postitem['commentsnum'] = get_comments_number();
|
||||
$postitem['title'] = get_the_title();
|
||||
|
@ -67,7 +71,7 @@ if ($set['routine']['opennewlink'] == 1) {
|
|||
}
|
||||
if ($set['module']['imglazyload'] == 1) {
|
||||
$pathname = 'data-original';
|
||||
$imgtag = '<img src="' . file_get_img_url('loading.png') . '" data-original="' . $postitem['thumbnail'] . '">';
|
||||
$imgtag = '<img src="' . file_get_img_url('loading.gif') . '" data-original="' . $postitem['thumbnail'] . '">';
|
||||
} else {
|
||||
$imgtag = '<img src="' . $postitem['thumbnail'] . '">';
|
||||
}
|
||||
|
@ -90,24 +94,30 @@ if ($postitem['post_meta']['postshow'] == 1) {
|
|||
<div class="post-item-thumbnail-type1">
|
||||
<a href="<?php echo $postitem['url'] ?>" target="<?php echo $target; ?>"><?php echo $imgtag ?></a>
|
||||
</div>
|
||||
<div class="post-item-tags post-item-tags-type1">
|
||||
<?php
|
||||
foreach ($postitem['category'] as $catite) {
|
||||
?>
|
||||
<span class="cat-item"><a
|
||||
target="<?php echo $target ?>"
|
||||
href="<?php echo $catite->url ?>"><?php echo $catite->name ?></a></span>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-item-content post-item-content-type1">
|
||||
<?php echo $postitem['content'] ?>
|
||||
</div>
|
||||
<div class="post-item-info post-item-info-type1">
|
||||
<div class="post-item-tags">
|
||||
<?php
|
||||
foreach ($postitem['category'] as $catite) {
|
||||
?>
|
||||
<i class="cat-item-mark"></i><span class="cat-item"><a
|
||||
target="<?php echo $target ?>"
|
||||
href="<?php echo $catite->url ?>"><?php echo $catite->name ?></a></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="post-item-meta">
|
||||
<div class="post-item-meta-time">
|
||||
<?php echo $postitem['author'] ?>
|
||||
<span class="post-item-meta-author">
|
||||
<?php echo $postitem['author_avatar'] .
|
||||
$postitem['author'] ?>
|
||||
</span>
|
||||
<span class="post-item-time"><?php echo diffBetweenTwoDay($postitem['time']); ?></span>
|
||||
</div>
|
||||
<div class="item-post-meta-other">
|
||||
|
@ -118,7 +128,7 @@ if ($postitem['post_meta']['postshow'] == 1) {
|
|||
echo $postitem['views'] . '</span>';
|
||||
}
|
||||
?>
|
||||
<span><i class="fas fa-comments"></i><?php echo $postitem['commentsnum'] ?></span>
|
||||
<span><i class="fas fa-comment-alt-lines"></i><?php echo $postitem['commentsnum'] ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -131,6 +141,18 @@ if ($postitem['post_meta']['postshow'] == 1) {
|
|||
<div class="post-item-thumbnail">
|
||||
<a href="<?php echo $postitem['url'] ?>" target="<?php echo $target; ?>"><?php echo $imgtag ?></a>
|
||||
</div>
|
||||
<div class="post-item-tags">
|
||||
<?php
|
||||
foreach ($postitem['category'] as $catite) {
|
||||
?>
|
||||
<span class="cat-item"><a
|
||||
target="<?php echo $target ?>"
|
||||
href="<?php echo $catite->url ?>"><?php echo $catite->name ?></a></span>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="post-item-main">
|
||||
<h2>
|
||||
<?php
|
||||
|
@ -146,20 +168,12 @@ if ($postitem['post_meta']['postshow'] == 1) {
|
|||
<?php echo $postitem['content'] ?>
|
||||
</div>
|
||||
<div class="post-item-info">
|
||||
<div class="post-item-tags">
|
||||
<?php
|
||||
foreach ($postitem['category'] as $catite) {
|
||||
?>
|
||||
<i class="cat-item-mark"></i><span class="cat-item"><a
|
||||
target="<?php echo $target ?>"
|
||||
href="<?php echo $catite->url ?>"><?php echo $catite->name ?></a></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="post-item-meta">
|
||||
<div class="post-item-meta-time">
|
||||
<?php echo $postitem['author'] ?>
|
||||
<div class="post-item-meta-item">
|
||||
<span class="post-item-meta-author">
|
||||
<?php echo $postitem['author_avatar'] .
|
||||
$postitem['author'] ?>
|
||||
</span>
|
||||
<span class="post-item-time"><?php echo diffBetweenTwoDay($postitem['time']); ?></span>
|
||||
</div>
|
||||
<div class="item-post-meta-other">
|
||||
|
@ -170,7 +184,7 @@ if ($postitem['post_meta']['postshow'] == 1) {
|
|||
echo $postitem['views'] . '</span>';
|
||||
}
|
||||
?>
|
||||
<span><i class="fas fa-comments"></i><?php echo $postitem['commentsnum'] ?></span>
|
||||
<span><i class="fas fa-comment-alt-lines"></i><?php echo $postitem['commentsnum'] ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,8 +3,28 @@ global $paged;
|
|||
if (!$paged) {
|
||||
$paged = 1;
|
||||
}
|
||||
|
||||
if (is_home() && $paged == 1) {
|
||||
global $set;
|
||||
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['index_1_phone'] != null) {
|
||||
?>
|
||||
<div class="swiper-container carousel">
|
||||
<?php echo base64_decode($set['ad']['index_1_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['index_1'] != null) {
|
||||
?>
|
||||
<div class="swiper-container carousel">
|
||||
<?php echo base64_decode($set['ad']['index_1']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if ($set['index']['swiperlist'] != null || count($set['index']['swiperlist']) > 0) {
|
||||
?>
|
||||
<?php if ($set['index']['swiperlist'] !== null && count($set['index']['swiperlist'])) {
|
||||
|
@ -30,14 +50,14 @@ if (is_home() && $paged == 1) {
|
|||
?>
|
||||
</div>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="corepress-swiper-button-next corepress-swiper-button"><i class="fal fa-chevron-right"></i></div>
|
||||
<div class="corepress-swiper-button-prev corepress-swiper-button"><i class="fal fa-chevron-left"></i></div>
|
||||
<div class="swiper-button-prev "></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var mySwiper = new Swiper('.carousel', {
|
||||
var mySwiper = new Swiper('.swiper-container', {
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
delay: 3000,
|
||||
|
@ -46,8 +66,8 @@ if (is_home() && $paged == 1) {
|
|||
},
|
||||
// 如果需要前进后退按钮
|
||||
navigation: {
|
||||
nextEl: '.corepress-swiper-button-next',
|
||||
prevEl: '.corepress-swiper-button-prev',
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
@ -92,7 +112,26 @@ if (is_home() && $paged == 1) {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['index_2_phone'] != null) {
|
||||
?>
|
||||
<div class="swiper-container carousel">
|
||||
<?php echo base64_decode($set['ad']['index_2_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['index_2'] != null) {
|
||||
?>
|
||||
<div class="swiper-container carousel">
|
||||
<?php echo base64_decode($set['ad']['index_2']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="post-list-page-plane">
|
||||
<div class="list-plane-title">
|
||||
<?php
|
||||
|
|
|
@ -28,6 +28,14 @@ if ($corepress_post_meta['postrighttag']['open'] == 1) {
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.post-content{
|
||||
box-shadow: 0 0 2px 0 rgba(98, 124, 153, .1);
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<div class="post-content">
|
||||
<h1 class="post-title">
|
||||
<?php the_title();
|
||||
|
@ -105,7 +113,8 @@ if ($corepress_post_meta['postrighttag']['open'] == 1) {
|
|||
$('#qrcode-plane').addClass("share-plane-show");
|
||||
e.stopPropagation();
|
||||
});
|
||||
new QRCode($('#qrcode-img')[0], window.location.href);
|
||||
|
||||
|
||||
$(this).next().animate({height: '100%'}, 500);
|
||||
$('.zd-plane-title').click(function (e) {
|
||||
if (!$(this).hasClass('zd-plane-title-zk')) {
|
||||
|
|
|
@ -0,0 +1,294 @@
|
|||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告1
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_1">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
首页幻灯片顶部广告 <br>
|
||||
建议宽度:858px,直接填写广告HTML代码,图片链接广告代码参考:<a href="广告链接" target="_blank"><img src="图片链接"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告1[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_1_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告2
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_2">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
首页文章列表顶部广告
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告2[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_2_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告3
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_3">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
首页底部广告 <br>
|
||||
建议宽度:1180px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
首页广告3[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.index_3_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告1
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_1">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
位于文章顶部全宽广告 <br>
|
||||
建议宽度:1180px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告1[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_1_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告2
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_2">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
位于文章正文开始最上面 <br>
|
||||
建议宽度:858px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告2[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_2_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告3
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_3">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
位于文章结尾 <br>
|
||||
建议宽度:858px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告3[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_3_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告4
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_4">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
位于评论区上面 <br>
|
||||
建议宽度:858px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告4[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_4_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告5
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_5">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
位于文章页底部 <br>
|
||||
建议宽度:1180px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-nocenter">
|
||||
<div class="set-title">
|
||||
文章页广告5[移动端]
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入内容"
|
||||
v-model="set.ad.post_5_phone">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
|
@ -67,9 +67,29 @@
|
|||
<div>
|
||||
<el-button type="primary" size="small" @click="reThemeColor(1)">恢复默认</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3>字体设置</h3>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
选择字体
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-radio v-model="set.theme.font" label="no">默认</el-radio>
|
||||
<el-radio v-model="set.theme.font" label="ceym">仓耳与墨</el-radio>
|
||||
<el-radio v-model="set.theme.font" label="zkklt">站酷快乐体</el-radio>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
字体CDN来自jsdelivr,不同的字体加载速度不一样
|
||||
</div>
|
||||
</div>
|
||||
<h3>背景图片设置</h3>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
|
@ -139,3 +159,68 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<h3>侧边栏</h3>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
关闭首页侧边栏
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.theme.sidebar.index"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
关闭搜索,分类标签侧边栏
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.theme.sidebar.other"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
关闭内页侧边栏
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.theme.sidebar.post"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
本设置功能比文章设置中关闭侧边栏的权重高
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>文章设置</h3>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
开启面包屑导航
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.theme.crumbs"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -242,3 +242,25 @@
|
|||
在用户复制内容成功以后,自动添加本站网址(复制超过100个字生效)
|
||||
</div>
|
||||
</div>
|
||||
<h3>防红模块</h3>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
引导外部浏览器打开
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.module.preventred"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
使用QQ或者微信访问网站,引导用户使用浏览器打开
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
|
||||
<h3>输出优化</h3>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
自动英文固定链接
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.optimization.autoenfixedtitle"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
写文章的时候,如果是中文标题,固定链接也默认为中文,开启后,默认会设置中文为首拼字母
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
移除版本号
|
||||
|
@ -28,7 +47,7 @@
|
|||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.optimization.removesworg"
|
||||
v-model="set.optimization.removednsprefetch"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
|
@ -131,9 +150,72 @@
|
|||
WordPress 5.0以后加载的古腾堡编辑器样式,前端不需要
|
||||
</div>
|
||||
</div>
|
||||
<h3>函数禁用</h3>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
禁止 translations_api
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.optimization.banfun.translations_api"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
没卵用的功能,进入设置后,会访问WordPress.org查询翻译,非常慢
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
禁止 wp_check_php_version
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.optimization.banfun.wp_check_php_version"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
没卵用的功能,进入设置后,会访问WordPress.org查询提服务器PHP版本
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
禁止 wp_check_browser_version
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-switch
|
||||
v-model="set.optimization.banfun.wp_check_browser_version"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
没卵用的功能,WordPress会时不时提交你的浏览器版本
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>功能开关</h3>
|
||||
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
屏蔽 REST API
|
||||
|
@ -275,7 +357,7 @@
|
|||
WordPress在用户修改密码和邮箱,用户注册会发送邮件给站长邮箱,建议关闭
|
||||
</div>
|
||||
</div>
|
||||
<h3>评论优化</h3>
|
||||
<h3>CDN公共库加速</h3>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
|
@ -294,4 +376,21 @@
|
|||
<div class="set-object">
|
||||
评论默认头像使用的Gravatar,国内打开非常缓慢,拖累系统速度,建议使用CDN加速
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
字体图标库
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-radio v-model="set.optimization.iconfontcdn" label="JsDelivr">JsDelivr</el-radio>
|
||||
<el-radio v-model="set.optimization.iconfontcdn" label="no">不加速</el-radio>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
</div>
|
||||
<div class="set-object">
|
||||
字体图标大约1M体积大小,推荐使用CDN,CDN版本为完整Pro图标,支持IE8
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,12 @@
|
|||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane set-plane-note">
|
||||
<div class="set-title"></div>
|
||||
<div class="set-object">
|
||||
请在页面->创建页面->页面模板选择[CorrPress自定义用户中心页面]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>自定义登录</h3>
|
||||
<div class="set-plane">
|
||||
|
@ -226,8 +231,6 @@ if (!get_option('users_can_register')) {
|
|||
<div class="set-title"></div>
|
||||
<div class="set-object">
|
||||
请在页面->创建页面->页面模板选择[CorrPress自定义密码找回页面]
|
||||
<el-tag type="danger" size="mini">无法登录</el-tag>
|
||||
!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
18
footer.php
18
footer.php
|
@ -2,7 +2,10 @@
|
|||
global $set;
|
||||
echo '<script>console.log("\n %c CorePress主题v ' . THEME_VERSIONNAME . ' %c by applek | www.lovestu.com", "color:#fff;background:#409EFF;padding:5px 0;", "color:#eee;background:#444;padding:5px 10px;");
|
||||
</script>';
|
||||
/*吃水不忘挖井人,请勿删除版权,让更多人使用,作者才有动力更新下去*/
|
||||
/*吃水不忘挖井人,请勿删除版权,让更多人使用,作者才有动力更新下去
|
||||
删版权可能会影响SEO哦,good luck
|
||||
*/
|
||||
|
||||
if ($set['code']['footcode'] != null) {
|
||||
echo base64_decode($set['code']['footcode']);
|
||||
}
|
||||
|
@ -44,7 +47,7 @@ if ($set['code']['alifront'] != null) {
|
|||
if (reprint.copylenopen == 1) {
|
||||
if (copytext.length > reprint.copylen) {
|
||||
addarelt('复制内容太长,禁止复制', 'erro');
|
||||
JScopyText('');
|
||||
JScopyText(' ');
|
||||
copynotmsg = 0;
|
||||
} else {
|
||||
copyaddurl(copytext);
|
||||
|
@ -91,6 +94,10 @@ if ($set['code']['alifront'] != null) {
|
|||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
$('.menu-header-list > .menu-item-has-children');
|
||||
<?php
|
||||
if ($set['module']['imglightbox'] == 1) {
|
||||
|
||||
|
@ -129,6 +136,10 @@ if ($set['code']['alifront'] != null) {
|
|||
var html = '';
|
||||
$(".post-content h2,.post-content h3").each(function () {
|
||||
var tagName = $(this)[0].tagName.toLowerCase();
|
||||
console.log();
|
||||
if ($(this).parent().attr('class') == 'zd-plane-content') {
|
||||
return;
|
||||
}
|
||||
$(this).attr('catalog', 'catalog-' + tagName + '-' + i);
|
||||
var clickargs = "go_catalog('catalog-" + tagName + "-" + i + "','" + tagName + "')";
|
||||
html = html + '<p catalogtagName="' + tagName + '" catalog="' + 'catalog-' + tagName + '-' + i + '" class="catalog-item" onclick="' + clickargs + '">' + $(this).html() + '</p>';
|
||||
|
@ -241,12 +252,13 @@ if ($set['module']['highlight'] == 1) {
|
|||
<?php
|
||||
get_template_part('component/nav-footer');
|
||||
//吃水不忘挖井人,请勿主题信息,让更多人使用,作者才有动力更新下去
|
||||
//删版权可能会影响SEO哦,good luck
|
||||
?>
|
||||
<div class="footer-info">
|
||||
Copyright © 2020 <?php bloginfo('name'); ?>
|
||||
<span class="theme-copyright">
|
||||
<a
|
||||
href="https://www.lovestu.com/corepress.html">CorePress主题</a>
|
||||
href="https://www.lovestu.com/corepress.html">CorePress Theme</a>
|
||||
</span>
|
||||
Powered by WordPress
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
define('THEME_NAME', 'CorePress');
|
||||
define('THEME_VERSION', 27);
|
||||
define('THEME_VERSION', 31);
|
||||
define('THEME_DOWNURL', 'https://www.lovestu.com');
|
||||
define('THEME_VERSIONNAME', '3.6');
|
||||
define('THEME_VERSIONNAME', '4.0');
|
||||
define('THEME_PATH', get_template_directory());
|
||||
define('THEME_STATIC_PATH', get_template_directory_uri() . '/static');
|
||||
define('THEME_CSS_PATH', THEME_STATIC_PATH . '/css');
|
||||
|
@ -22,7 +22,11 @@ require_once(FRAMEWORK_PATH . '/ajax.php');
|
|||
require_once(FRAMEWORK_PATH . '/comment-pro.php');
|
||||
require_once(THEME_PATH . '/widgets/comments.php');
|
||||
require_once(THEME_PATH . '/widgets/author.php');
|
||||
require_once(THEME_PATH . '/widgets/hot-post.php');
|
||||
|
||||
require_once(FRAMEWORK_PATH . '/shortcode.php');
|
||||
add_editor_style('static/css/editor-style.css');
|
||||
error_reporting(0);
|
||||
error_reporting(0);
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
||||
WP_Filesystem();
|
|
@ -4,7 +4,8 @@ function CorePress_saveThemeset()
|
|||
global $set;
|
||||
$data['code'] = 200;
|
||||
$setdata['version'] = THEME_VERSION;
|
||||
$json = json_decode(file_get_contents('php://input'), true);
|
||||
global $wp_filesystem;
|
||||
$json = json_decode($wp_filesystem->get_contents('php://input'), true);
|
||||
if ($json) {
|
||||
$setdata['option'] = base64_decode($json['save']);
|
||||
if (options::saveData($setdata)) {
|
||||
|
@ -657,6 +658,16 @@ function CorePress_changebind()
|
|||
}
|
||||
}
|
||||
|
||||
function corepress_getfirstspell()
|
||||
{
|
||||
$text = replace_symbol($_POST['text']);
|
||||
$json['code'] = 1;
|
||||
$json['data'] = corepress_pinyin_long($text);
|
||||
wp_die(json_encode($json));
|
||||
}
|
||||
|
||||
add_action('wp_ajax_corepress_getfirstspell', 'corepress_getfirstspell');
|
||||
|
||||
add_action('wp_ajax_corepress_changebind', 'CorePress_changebind');
|
||||
add_action('wp_ajax_corepress_changepwd', 'CorePress_changepwd');
|
||||
add_action('wp_ajax_corepress_getpwdmailcode', 'CorePress_getpwdmailcode');
|
||||
|
|
|
@ -19,7 +19,7 @@ function my_comment($comment, $args, $depth)
|
|||
}
|
||||
?>
|
||||
<li class="comment">
|
||||
<div class="comment-item" id="li-comment-<?php comment_ID(); ?>">
|
||||
<div class="comment-item" id="comment-<?php comment_ID(); ?>">
|
||||
<div class="comment-media">
|
||||
<div class="avatar-img">
|
||||
<?php if (function_exists('get_avatar') && get_option('show_avatars')) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -65,6 +65,10 @@ wp_enqueue_media();
|
|||
<i class="el-icon-link"></i>
|
||||
<span slot="title">插入代码</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="12">
|
||||
<i class="el-icon-s-order"></i>
|
||||
<span slot="title">广告代码</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="7">
|
||||
<i class="el-icon-info"></i>
|
||||
<span slot="title">关于主题</span>
|
||||
|
@ -105,6 +109,9 @@ wp_enqueue_media();
|
|||
<div v-if="menu_active==11">
|
||||
<?php get_template_part('component/set-module'); ?>
|
||||
</div>
|
||||
<div v-if="menu_active==12">
|
||||
<?php get_template_part('component/set-ad'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -95,6 +95,17 @@ remove_filter('the_content', 'wptexturize');
|
|||
//禁止对标签自动校正
|
||||
remove_filter('the_content', 'balanceTags');
|
||||
|
||||
//WordPress函数禁用
|
||||
if ($set['optimization']['banfun']['translations_api'] == 1) {
|
||||
add_filter('translations_api', '__return_false');
|
||||
}
|
||||
if ($set['optimization']['banfun']['wp_check_php_version'] == 1) {
|
||||
add_filter('wp_check_php_version', '__return_false');
|
||||
}
|
||||
if ($set['optimization']['banfun']['wp_check_browser_version'] == 1) {
|
||||
add_filter('wp_check_browser_version', '__return_false');
|
||||
}
|
||||
|
||||
|
||||
if ($set['optimization']['notification_reg_email'] === 1) {
|
||||
//关闭新用户注册用户邮件通知
|
||||
|
@ -109,7 +120,14 @@ if ($set['optimization']['notification_changepwdandmail_email'] === 1) {
|
|||
add_filter('wp_new_user_notification_email_admin', '__return_false');
|
||||
//关闭更新邮箱用户邮件通知
|
||||
}
|
||||
if ($set['optimization']['autoenfixedtitle'] == 1) {
|
||||
add_filter('get_sample_permalink_html', 'corepress_sample_permalink');
|
||||
|
||||
}
|
||||
function corepress_sample_permalink($html, $new_title = null, $new_slug = null)
|
||||
{
|
||||
return $html . '<span id="btn-link-cntoen"><button type="button" class="button button-small hide-if-no-js">转换成英文</button></span>';
|
||||
}
|
||||
|
||||
function ban_scripts()
|
||||
{
|
||||
|
@ -211,6 +229,29 @@ if ($set['optimization']['banimgresolving'] === 1) {
|
|||
// 禁止大图片压缩
|
||||
add_filter('big_image_size_threshold', '__return_false');
|
||||
}
|
||||
//支持svg
|
||||
function upload_support($mimes = array())
|
||||
{
|
||||
$mimes['svg'] = 'image/svg+xml';
|
||||
return $mimes;
|
||||
}
|
||||
|
||||
//支持webp
|
||||
function webp_filter_mime_types($array)
|
||||
{
|
||||
$array['webp'] = 'image/webp';
|
||||
return $array;
|
||||
}
|
||||
function webp_file_display($result, $path) {
|
||||
$info = @getimagesize( $path );
|
||||
if($info['mime'] == 'image/webp') {
|
||||
$result = true;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
add_filter( 'file_is_displayable_image', 'webp_file_display');
|
||||
add_filter('mime_types', 'webp_filter_mime_types');
|
||||
add_filter('upload_mimes', 'upload_support');
|
||||
|
||||
if ($set['optimization']['closeemoji'] === 1) {
|
||||
//禁止emoji
|
||||
|
@ -244,19 +285,19 @@ function CorePress_replace_avatar($avatarUrl)
|
|||
$avatarUrl = str_replace("http://", "https://", $avatarUrl);
|
||||
if ($set['optimization']['gravatarsite'] == 'v2ex') {
|
||||
//$avatar = preg_replace(["/[0-9]\.gravatar\.com\/avatar/", "/secure.gravatar\.com\/avatar/"], "cdn.v2ex.com/gravatar", $avatarUrl);
|
||||
$avatarUrl = str_replace(array("www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "cdn.v2ex.com/gravatar", $avatarUrl);
|
||||
$avatarUrl = str_replace(array("secure.gravatar.com/avatar", "www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "cdn.v2ex.com/gravatar", $avatarUrl);
|
||||
|
||||
} elseif ($set['optimization']['gravatarsite'] == 'geek') {
|
||||
$avatarUrl = str_replace(array("www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "sdn.geekzu.org/avatar", $avatarUrl);
|
||||
$avatarUrl = str_replace(array("secure.gravatar.com/avatar", "www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "sdn.geekzu.org/avatar", $avatarUrl);
|
||||
} elseif ($set['optimization']['gravatarsite'] == 'cn') {
|
||||
$avatarUrl = str_replace(array("www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "cn.gravatar.com/avatar", $avatarUrl);
|
||||
$avatarUrl = str_replace(array("secure.gravatar.com/avatar", "www.gravatar.com/avatar", "0.gravatar.com/avatar", "1.gravatar.com/avatar", "2.gravatar.com/avatar"), "cn.gravatar.com/avatar", $avatarUrl);
|
||||
}
|
||||
return $avatarUrl;
|
||||
}
|
||||
|
||||
//print_r($set['optimization']['gravatarsite'] );
|
||||
add_filter('get_avatar', 'CorePress_replace_avatar');
|
||||
add_filter('get_avatar_url', 'CorePress_replace_avatar');
|
||||
add_filter('get_avatar', 'CorePress_replace_avatar', 20);
|
||||
add_filter('get_avatar_url', 'CorePress_replace_avatar', 20);
|
||||
|
||||
|
||||
add_filter('emoji_svg_url', '__return_false');
|
||||
|
@ -308,7 +349,7 @@ function corepress_updateTheme()
|
|||
update_option('corepress_updatetheme', time());
|
||||
}
|
||||
if (time() - $lasttime > 60 * 60) {
|
||||
$url = 'http://theme.lovestu.com/version.php?site=' . get_bloginfo('siteurl', 'display') . '&n=1&v=' . THEME_VERSION;
|
||||
$url = 'http://theme.lovestu.com/version.php?site=' . get_bloginfo('url', 'display') . '&n=1&v=' . THEME_VERSION;
|
||||
$request = new WP_Http;
|
||||
$result = $request->request($url);
|
||||
if (!is_wp_error($result)) {
|
||||
|
@ -341,19 +382,18 @@ function corepress_comment_face($incoming_comment)
|
|||
}
|
||||
|
||||
|
||||
function corepress_loginurl($url)
|
||||
function corepress_loginurl($login_url, $redirect, $force_reauth)
|
||||
{
|
||||
global $set;
|
||||
|
||||
if ($set['user']['loginpage'] == 1) {
|
||||
$query = parse_url($url);
|
||||
if (!isset($query['query'])) {
|
||||
return $url;
|
||||
$login_url = $set['user']['lgoinpageurl'];
|
||||
if (!empty($redirect)) {
|
||||
$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
|
||||
}
|
||||
parse_str($query['query'], $output);
|
||||
return $set['user']['lgoinpageurl'] . '?re=' . $output['redirect_to'];
|
||||
return $login_url;
|
||||
}
|
||||
return $url;
|
||||
|
||||
return $login_url;
|
||||
}
|
||||
|
||||
function corepress_registerurl($url)
|
||||
|
@ -416,10 +456,21 @@ function corepress_addbutton()
|
|||
</script>
|
||||
<?php
|
||||
file_load_js('editor-functions.js');
|
||||
load_js_parameter('ajaxobj', array('ajax_url' => admin_url('admin-ajax.php')));
|
||||
add_filter('mce_external_plugins', 'corepress_add_editor_plugin');
|
||||
}
|
||||
}
|
||||
|
||||
function corepress_block_editor_loadobj() {
|
||||
file_load_js('vue.min.js');
|
||||
file_load_css('admin.css');
|
||||
file_load_lib('element/index.css', 'css');
|
||||
file_load_lib('element/index.js', 'js');
|
||||
file_load_js('tools.js');
|
||||
file_load_css('editor-window.css');
|
||||
}
|
||||
add_action( 'enqueue_block_editor_assets', 'corepress_block_editor_loadobj' );
|
||||
|
||||
function corepress_add_editor_plugin($plugin_array)
|
||||
{
|
||||
$plugin_array['gh-addShortCode'] = THEME_JS_PATH . '/editorButton.js';
|
||||
|
@ -435,7 +486,7 @@ add_action('media_buttons', 'corepress_add_media_button');
|
|||
add_action('edit_form_top', 'corepress_addbutton');
|
||||
add_filter('comment_text', 'corepress_comment_face');
|
||||
add_filter('comment_text_rss', 'corepress_comment_face');
|
||||
add_filter('login_url', 'corepress_loginurl', 1);
|
||||
add_filter('login_url', 'corepress_loginurl', 10, 3);
|
||||
add_filter('register_url', 'corepress_registerurl', 1);
|
||||
add_filter('lostpassword_url', 'corepress_lostpassword_url', 1);
|
||||
|
||||
|
@ -494,6 +545,9 @@ function corepress_meta_box_form($post)
|
|||
if (!isset($corepress_post_meta['set']['postshow'])) {
|
||||
$corepress_post_meta['set']['postshow'] = '0';
|
||||
}
|
||||
if (!isset($corepress_post_meta['set']['thumbnail'])) {
|
||||
$corepress_post_meta['set']['thumbnail'] = '';
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="corepress-post-meta">
|
||||
|
@ -562,8 +616,8 @@ function corepress_meta_box_form($post)
|
|||
<el-button type="primary" size="small" @click="retagcolor('#409EFF')">恢复默认</el-button>
|
||||
<el-button type="success" size="small" @click="retagcolor('#67C23A')">#67C23A</el-button>
|
||||
<el-button type="info" size="small" @click="retagcolor('#909399')">#909399</el-button>
|
||||
<el-button type="warning" size="small" @click="retagcolor('#F56C6C')">#F56C6C</el-button>
|
||||
<el-button type="danger" size="small" @click="retagcolor('#E6A23C')">#E6A23C</el-button>
|
||||
<el-button type="warning" size="small" @click="retagcolor('#E6A23C')">#E6A23C</el-button>
|
||||
<el-button type="danger" size="small" @click="retagcolor('#F56C6C')">#F56C6C</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -619,6 +673,16 @@ function corepress_meta_box_form($post)
|
|||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set-plane">
|
||||
<div class="set-title">
|
||||
自定义缩略图地址
|
||||
</div>
|
||||
<div class="set-object">
|
||||
<el-input placeholder="" v-model="set.thumbnail" size="small">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var set = JSON.parse('<?php echo json_encode($corepress_post_meta)?>');
|
||||
|
@ -725,3 +789,11 @@ function disable_open_sans($translations, $text, $context, $domain)
|
|||
}
|
||||
|
||||
|
||||
//上传文件接管
|
||||
|
||||
//add_filter('wp_handle_upload_prefilter', 'custom_upload_filter' );
|
||||
function custom_upload_filter( $file ) {
|
||||
|
||||
$file['name'] = 'wordpress-is-awesome-' . $file['name'];
|
||||
return $file;
|
||||
}
|
|
@ -9,6 +9,11 @@ function file_load_js($path)
|
|||
echo '<script src="' . THEME_JS_PATH . '/' . $path . '?v=' . THEME_VERSIONNAME . '"></script>';
|
||||
}
|
||||
|
||||
function load_js_parameter($name, $arr)
|
||||
{
|
||||
echo '<script>var ' . $name . '=JSON.parse(' . "'" . json_encode($arr) . "'" . ')</script>';
|
||||
}
|
||||
|
||||
function file_load_img($path)
|
||||
{
|
||||
echo "<img src=\"" . THEME_IMG_PATH . "/{$path}\">";
|
||||
|
@ -21,8 +26,12 @@ function file_get_img_url($path)
|
|||
|
||||
function file_echo_svg($path)
|
||||
{
|
||||
$size = readfile(THEME_PATH . '/static/img/' . $path);
|
||||
//echo file_get_contents(THEME_IMG_PATH . "/" . $path);
|
||||
|
||||
global $wp_filesystem;
|
||||
$svg = $wp_filesystem->get_contents(THEME_PATH . '/static/img/' . $path);
|
||||
print_r($svg);
|
||||
//readfile(THEME_PATH . '/static/img/' . $path);
|
||||
|
||||
}
|
||||
|
||||
function file_load_face()
|
||||
|
@ -334,3 +343,197 @@ function ajax_die($msg, $code = 0)
|
|||
$json['msg'] = $msg;
|
||||
wp_die(json_encode($json));
|
||||
}
|
||||
|
||||
function is_wx_qq()
|
||||
{
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (strpos($user_agent, 'MicroMessenger') == false && strpos($user_agent, 'QQ/') == false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function loadiconfont_by_cdn()
|
||||
{
|
||||
global $set;
|
||||
if ($set['optimization']['iconfontcdn'] == 'JsDelivr') {
|
||||
echo '<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ghboke/corepresscdn@master/static/lib/fontawesome5pro/css/all.min.css?v=' . THEME_VERSIONNAME . '">';
|
||||
|
||||
} else {
|
||||
file_load_lib('fontawesome5/css/all.min.css', 'css');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function corepress_pinyin_long($zh)
|
||||
{
|
||||
//获取整条字符串汉字拼音首字母
|
||||
$ret = "";
|
||||
$zh = preg_replace('# #', '', $zh);
|
||||
$s1 = iconv("UTF-8", "gb2312", $zh);
|
||||
$s2 = iconv("gb2312", "UTF-8", $s1);
|
||||
if ($s2 == $zh) {
|
||||
$zh = $s1;
|
||||
}
|
||||
for ($i = 0; $i < strlen($zh); $i++) {
|
||||
$s1 = substr($zh, $i, 1);
|
||||
$p = ord($s1);
|
||||
if ($p > 160) {
|
||||
$s2 = substr($zh, $i++, 2);
|
||||
$ret .= corepress_getFirstPing($s2);
|
||||
} else {
|
||||
$ret .= $s1;
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function replace_symbol($str)
|
||||
{
|
||||
$str = str_replace('?', '', $str);
|
||||
$str = str_replace('`', '', $str);
|
||||
$str = str_replace('·', '', $str);
|
||||
$str = str_replace('~', '', $str);
|
||||
$str = str_replace('!', '', $str);
|
||||
$str = str_replace('!', '', $str);
|
||||
$str = str_replace('@', '', $str);
|
||||
$str = str_replace('#', '', $str);
|
||||
$str = str_replace('$', '', $str);
|
||||
$str = str_replace('¥', '', $str);
|
||||
$str = str_replace('%', '', $str);
|
||||
$str = str_replace('^', '', $str);
|
||||
$str = str_replace('……', '', $str);
|
||||
$str = str_replace('&', '', $str);
|
||||
$str = str_replace('*', '', $str);
|
||||
$str = str_replace('(', '', $str);
|
||||
$str = str_replace(')', '', $str);
|
||||
$str = str_replace('(', '', $str);
|
||||
$str = str_replace(')', '', $str);
|
||||
$str = str_replace('-', '', $str);
|
||||
$str = str_replace('_', '', $str);
|
||||
$str = str_replace('——', '', $str);
|
||||
$str = str_replace('+', '', $str);
|
||||
$str = str_replace('=', '', $str);
|
||||
$str = str_replace('|', '', $str);
|
||||
$str = str_replace('\\', '', $str);
|
||||
$str = str_replace('[', '', $str);
|
||||
$str = str_replace(']', '', $str);
|
||||
$str = str_replace('【', '', $str);
|
||||
$str = str_replace('】', '', $str);
|
||||
$str = str_replace('{', '', $str);
|
||||
$str = str_replace('}', '', $str);
|
||||
$str = str_replace(';', '', $str);
|
||||
$str = str_replace(';', '', $str);
|
||||
$str = str_replace(':', '', $str);
|
||||
$str = str_replace(':', '', $str);
|
||||
$str = str_replace('\'', '', $str);
|
||||
$str = str_replace('"', '', $str);
|
||||
$str = str_replace('“', '', $str);
|
||||
$str = str_replace('”', '', $str);
|
||||
$str = str_replace(',', '', $str);
|
||||
$str = str_replace(',', '', $str);
|
||||
$str = str_replace('<', '', $str);
|
||||
$str = str_replace('>', '', $str);
|
||||
$str = str_replace('《', '', $str);
|
||||
$str = str_replace('》', '', $str);
|
||||
$str = str_replace('.', '', $str);
|
||||
$str = str_replace('。', '', $str);
|
||||
$str = str_replace('/', '', $str);
|
||||
$str = str_replace('、', '', $str);
|
||||
$str = str_replace('?', '', $str);
|
||||
$str = str_replace('?', '', $str);
|
||||
return trim($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首字符拼音首字母
|
||||
* 判断是否为汉字 !preg_match('/^[\x{4e00}-\x{9fa5}]+$/u', $s0)
|
||||
* 已知 “泸”,无法识别
|
||||
*/
|
||||
function corepress_getFirstPing($str)
|
||||
{
|
||||
$s0 = mb_substr($str, 0, 1, 'utf-8');
|
||||
$fchar = ord($s0[0]);
|
||||
if ($fchar >= ord("A") and $fchar <= ord("z")) return strtoupper($s0[0]);
|
||||
$s1 = iconv("UTF-8", "gb2312", $s0);
|
||||
$s2 = iconv("gb2312", "UTF-8", $s1);
|
||||
if ($s2 == $s0) {
|
||||
$s = $s1;
|
||||
} else {
|
||||
$s = $s0;
|
||||
}
|
||||
$asc = ord($s[0]) * 256 + ord($s[0]) - 65536;
|
||||
if ($asc >= -20319 && $asc <= -20284) return "A";
|
||||
if ($asc >= -20283 && $asc <= -19776) return "B";
|
||||
if ($asc >= -19775 && $asc <= -19219) return "C";
|
||||
if ($asc >= -19218 && $asc <= -18711) return "D";
|
||||
if ($asc >= -18710 && $asc <= -18527) return "E";
|
||||
if ($asc >= -18526 && $asc <= -18240) return "F";
|
||||
if ($asc >= -18239 && $asc <= -17923) return "G";
|
||||
if ($asc >= -17922 && $asc <= -17418) return "H";
|
||||
if ($asc >= -17922 && $asc <= -17418) return "I";
|
||||
if ($asc >= -17417 && $asc <= -16475) return "J";
|
||||
if ($asc >= -16474 && $asc <= -16213) return "K";
|
||||
if ($asc >= -16212 && $asc <= -15641) return "L";
|
||||
if ($asc >= -15640 && $asc <= -15166) return "M";
|
||||
if ($asc >= -15165 && $asc <= -14923) return "N";
|
||||
if ($asc >= -14922 && $asc <= -14915) return "O";
|
||||
if ($asc >= -14914 && $asc <= -14631) return "P";
|
||||
if ($asc >= -14630 && $asc <= -14150) return "Q";
|
||||
if ($asc >= -14149 && $asc <= -14091) return "R";
|
||||
if ($asc >= -14090 && $asc <= -13319) return "S";
|
||||
if ($asc >= -13318 && $asc <= -12839) return "T";
|
||||
if ($asc >= -12838 && $asc <= -12557) return "W";
|
||||
if ($asc >= -12556 && $asc <= -11848) return "X";
|
||||
if ($asc >= -11847 && $asc <= -11056) return "Y";
|
||||
if ($asc >= -11055 && $asc <= -10247) return "Z";
|
||||
return $s0;
|
||||
}
|
||||
|
||||
function the_breadcrumb()
|
||||
{
|
||||
echo '<span class="corepress-crumbs-ul">';
|
||||
if (!is_home()) {
|
||||
echo '<li><a href="';
|
||||
echo get_option('home');
|
||||
echo '">';
|
||||
echo '<i class="fas fa-home"></i> 主页';
|
||||
echo "</a></li>";
|
||||
if (is_category() || is_single()) {
|
||||
echo '<li>';
|
||||
the_category(' </li><li> ');
|
||||
if (is_single()) {
|
||||
echo "</li>";
|
||||
}
|
||||
} elseif (is_page()) {
|
||||
echo '<li>';
|
||||
echo the_title();
|
||||
echo '</li>';
|
||||
}
|
||||
} elseif (is_tag()) {
|
||||
single_tag_title();
|
||||
} elseif (is_day()) {
|
||||
echo "<li>Archive for ";
|
||||
the_time('F jS, Y');
|
||||
echo '</li>';
|
||||
} elseif (is_month()) {
|
||||
echo "<li>Archive for ";
|
||||
the_time('F, Y');
|
||||
echo '</li>';
|
||||
} elseif (is_year()) {
|
||||
echo "<li>Archive for ";
|
||||
the_time('Y');
|
||||
echo '</li>';
|
||||
} elseif (is_author()) {
|
||||
echo "<li>Author Archive";
|
||||
echo '</li>';
|
||||
} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
|
||||
echo "<li>Blog Archives";
|
||||
echo '</li>';
|
||||
} elseif (is_search()) {
|
||||
echo "<li>Search Results";
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
|
|
22
header.php
22
header.php
|
@ -39,13 +39,30 @@ if ($set['routine']['favicon'] != null) {
|
|||
--fontSelectedColor: <?php echo $set['theme']['fontSelectedColor']?> !important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
<?php
|
||||
if ($set['module']['preventred'] == 1) {
|
||||
if (is_wx_qq()) {
|
||||
die('网站不支持QQ或者微信内访问,请点击右上角菜单,使用外部浏览器打开网站');
|
||||
}
|
||||
}
|
||||
if ($set['theme']['font'] != 'no') {
|
||||
echo '<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/ghboke/corepresscdn@master/static/lib/font/' . $set['theme']['font'] . '/font.css">';
|
||||
?>
|
||||
<style>
|
||||
html, textarea {
|
||||
font-family: <?php echo $set['theme']['font']?>, PingFang\ SC, Hiragino\ Sans\ GB, Microsoft\ YaHei, STHeiti, WenQuanYi\ Micro\ Hei, Helvetica, Arial, sans-serif !important;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
file_load_css('main-mobile.css');
|
||||
loadiconfont_by_cdn();
|
||||
|
||||
file_load_css('main.css');
|
||||
file_load_lib('fontawesome5/css/all.min.css', 'css');
|
||||
|
||||
file_load_js('jquery.min.js');
|
||||
wp_head();
|
||||
if ($set['module']['imglazyload'] == 1) {
|
||||
|
@ -57,6 +74,7 @@ if (is_home()) {
|
|||
file_load_lib('swiper/swiper.min.js', 'js');
|
||||
}
|
||||
|
||||
|
||||
global $set;
|
||||
if (is_home()) {
|
||||
if ($set['seo']['openseo'] == 1) {
|
||||
|
|
44
index.php
44
index.php
|
@ -19,7 +19,31 @@
|
|||
<div class="html-main">
|
||||
<?php
|
||||
global $set;
|
||||
if ($set['theme']['sidebar_position'] == 1) {
|
||||
if ($set['theme']['sidebar']['index']) {
|
||||
?>
|
||||
<style>
|
||||
body .post-info-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-item-thumbnail img {
|
||||
max-width: 336px;
|
||||
}
|
||||
.post-item-content,.post-item-info {
|
||||
font-size: 16px;
|
||||
}
|
||||
.post-item h2 {
|
||||
font-size: 22px;
|
||||
|
||||
}
|
||||
</style>
|
||||
<div class="post-main post-main-closesidebar" style="flex-basis: 100%;">
|
||||
<?php
|
||||
get_template_part('component/post-main-index');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else if ($set['theme']['sidebar_position'] == 1) {
|
||||
?>
|
||||
<div class="post-main">
|
||||
<?php get_template_part('component/post-main-index'); ?>
|
||||
|
@ -67,7 +91,25 @@
|
|||
</div>
|
||||
<?php
|
||||
}
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['index_3_phone'] != null) {
|
||||
?>
|
||||
<div class="ad-plane">
|
||||
<?php echo base64_decode($set['ad']['index_3_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['index_3'] != null) {
|
||||
?>
|
||||
<div class="ad-plane">
|
||||
<?php echo base64_decode($set['ad']['index_3']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main>
|
||||
<footer>
|
||||
<?php
|
||||
|
|
|
@ -112,7 +112,7 @@ if ($set['user']['lgoinpageimg'] != null) {
|
|||
if (obj) {
|
||||
if (obj.code === 1) {
|
||||
$('#login-note').text('登录成功,跳转中');
|
||||
window.location.href = getQueryVariable('re') ? getQueryVariable('re') : '/';
|
||||
window.location.href = getQueryVariable('redirect_to') ? decodeURIComponent(getQueryVariable('redirect_to')) : '/';
|
||||
} else {
|
||||
$('#login-note').text(obj.msg);
|
||||
recodeimg();
|
||||
|
|
|
@ -4,6 +4,10 @@ if (islogin()) {
|
|||
header("Location: " . get_bloginfo('url'));
|
||||
exit();
|
||||
}
|
||||
if (!get_option('users_can_register')) {
|
||||
header("Location: " . get_bloginfo('url'));
|
||||
exit();
|
||||
}
|
||||
global $set;
|
||||
?>
|
||||
<!doctype html>
|
||||
|
@ -146,7 +150,6 @@ if ($set['user']['regpageimg'] != null) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
$('#login-note').text('正在注册,请稍后');
|
||||
$('#login-note').css('visibility', 'visible');
|
||||
$.post('<?php echo AJAX_URL?>', {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
Binary file not shown.
After Width: | Height: | Size: 150 KiB |
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
25
search.php
25
search.php
|
@ -19,6 +19,31 @@
|
|||
<div class="html-main">
|
||||
<?php
|
||||
global $set;
|
||||
if ($set['theme']['sidebar']['other']) {
|
||||
?>
|
||||
<style>
|
||||
body .post-info-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-item-thumbnail img {
|
||||
max-width: 336px;
|
||||
}
|
||||
.post-item-content,.post-item-info {
|
||||
font-size: 16px;
|
||||
}
|
||||
.post-item h2 {
|
||||
font-size: 22px;
|
||||
|
||||
}
|
||||
</style>
|
||||
<div class="post-main post-main-closesidebar" style="flex-basis: 100%;">
|
||||
<?php
|
||||
get_template_part('component/post-main-index');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else
|
||||
if ($set['theme']['sidebar_position'] == 1) {
|
||||
?>
|
||||
<div class="post-main">
|
||||
|
|
46
single.php
46
single.php
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
the_post();
|
||||
global $set;
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
|
@ -8,7 +9,6 @@ the_post();
|
|||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
|
||||
<header>
|
||||
<div class="header-main container">
|
||||
<?php
|
||||
|
@ -18,12 +18,31 @@ the_post();
|
|||
</header>
|
||||
<div class="top-divider"></div>
|
||||
<main class="container">
|
||||
<?php
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['post_1_phone'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post">
|
||||
<?php echo base64_decode($set['ad']['post_1_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['post_1'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post">
|
||||
<?php echo base64_decode($set['ad']['post_1']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="html-main">
|
||||
<?php
|
||||
global $set;
|
||||
global $corepress_post_meta;
|
||||
|
||||
if ($corepress_post_meta['closesidebar'] == 1) {
|
||||
if ($corepress_post_meta['closesidebar'] == 1 || $set['theme']['sidebar']['post']) {
|
||||
?>
|
||||
<style>
|
||||
body .post-info-right {
|
||||
|
@ -64,6 +83,25 @@ the_post();
|
|||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (wp_is_mobile()) {
|
||||
if ($set['ad']['post_5_phone'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-bottom">
|
||||
<?php echo base64_decode($set['ad']['post_5_phone']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if ($set['ad']['post_5'] != null) {
|
||||
?>
|
||||
<div class="ad-plane-post-bottom">
|
||||
<?php echo base64_decode($set['ad']['post_5']); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
<footer>
|
||||
<?php get_footer(); ?>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
/**
|
||||
移动适配
|
||||
*/.mobile-menu-btn,.mobile-search-btn{display:none;padding:10px}@media screen and (max-width:1040px){body .user-menu-pc-search{display:none}body .header-menu{display:none!important}body .header-logo img{height:40px}body .mobile-search-btn{display:block}body .mobile-menu-btn,.mobile-search-btn{display:block}.menu-header-list>.menu-item-has-children:after,.user-menu:after{display:none}body .menu-header-list>.menu-item>a:before{display:none!important}body .menu-header-list>.menu-item{padding:0}header .current-menu-item:before{display:none!important}body .menu-header-list{flex-direction:column}body .menu-item-has-children:hover>.sub-menu{width:100%}body .user-sub-menu{width:100%;left:unset}.m-dropdown{display:block;position:absolute;right:3px;top:0;width:50px;text-align:center;line-height:62px;transition:all .3s ease-out 0s}body .sub-menu .sub-menu{left:0;top:100%}}@media screen and (max-width:800px){::-webkit-scrollbar{width:4px!important;height:4px!important}body .index-top-postcard-item{margin-bottom:10px}body .carousel{margin-bottom:10px}body .index-top-postcard-item{flex-basis:49%}body .post-qrcode-btn{display:none}body .post-content{padding:15px}body .post-info-right{display:none}body .post-item-thumbnail{flex:35%;flex-shrink:0}body .post-item h2{font-size:18px}body .mobile-menu-btn,.mobile-search-btn{display:block}body .sidebar,.footer-container{display:none}body .header-main{justify-content:space-between}body .go-top-plane{display:none}body .post-main{margin:0;margin-bottom:10px;flex-basis:95%!important}body .header-logo img{height:40px}body .html-main{justify-content:center}.footer-container .footer-left{flex:100%;flex-shrink:0}.footer-container .footer-right,.footer-container .footer-aside-box,.footer-container .menu-footer-plane{display:none}.frinds-links{display:none}body .c-downbtn-item{width:100%}body .usercenter-plane{display:block}body .usercenter-menu{margin-bottom:10px}body .usercenter-right{margin-left:0}body .header-zhanwei{min-height:50px!important}}@media screen and (max-width:500px){body .cat-item{font-size:12px}body .index-top-postcard-item{flex-basis:48%}body .post-item h2{font-size:16px}body .pageobj-item{display:none}body .avatar-img{width:30px;height:30px}body .commentlist{padding:0 20px}body .commentlist>.comment>.children{padding-left:30px}body .comment-pub-time{font-size:12px}body .commentlist>.comment>.children>.comment{padding:0 10px}body .comment-metadata{margin-left:10px}body .comment-btn-reply{opacity:1;visibility:visible}body .comment-reply-link{font-size:12px}body .top-divider{min-height:60px}body .c-downbtn-item{display:block}body .c-downbtn-describe{margin-bottom:10px}body .post-turn-page-plane,body .post-info-left{display:none}body .post-title{margin-bottom:0}body #reward-plane img{max-width:150px}body .post-pop-plane{padding:10px}}@media screen and (max-width:1384px){#post-catalog{visibility:hidden!important}}@media screen and (max-width:500px){body .post-item-meta{display:none}body .post-content{padding:10px}.post-item-content{display:none}body .logged-in-as{display:none}body .post-item-info-type1{display:none}}@media screen and (max-width:360px){body .theme-copyright{display:none}}.drawer-menu-plane-show{visibility:visible!important;left:0!important;opacity:1!important}.drawer-menu-plane{opacity:0;display:flex;visibility:hidden;position:fixed;top:0;left:-100px;right:0;bottom:0;overflow:hidden;z-index:9999;transition:all .3s ease-out 0s}.drawer-menu-list{position:relative;flex:70%;max-width:400px;background:#fff}.drawer-menu-write{flex:30%;background:#000;opacity:.4}.mobile-menu-header-list .menu-item{padding:10px}.dialog-search-plane-show{visibility:visible!important}.dialog-search-plane-show .dialog-plane{opacity:1!important;top:0!important}.dialog-search-plane{display:flex;visibility:hidden;position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:9999;justify-content:center;align-items:center}.dialog-mask{position:absolute;top:0;left:0;right:0;bottom:0;opacity:.4;background:#000}.dialog-plane{padding:10px;top:-100px;transition:all .3s ease-out 0s;opacity:0;position:relative;flex:70%;max-width:400px;background:#fff;z-index:99999;height:150px;border-radius:4px;text-align:center}.dialog-plane h2{font-size:20px;font-weight:500;padding:6px 10px}.dialog-plane .search-form{padding:20px}
|
||||
*/.mobile-menu-btn,.mobile-search-btn{display:none;padding:10px}@media screen and (max-width:1040px){body .user-menu-pc-search{display:none}body .header-menu{display:none!important}body .header-logo img{height:40px}body .mobile-search-btn{display:block}body .mobile-menu-btn,.mobile-search-btn{display:block}.menu-header-list>.menu-item-has-children:after,.user-menu:after{display:none}body .menu-header-list>.menu-item>a:before{display:none!important}body .menu-header-list>.menu-item{padding:0}header .current-menu-item:before{display:none!important}body .ad-plane-post{padding:10px;margin-top:-10px}body .menu-header-list{flex-direction:column}body .menu-item-has-children:hover>.sub-menu{width:100%}body .user-sub-menu{width:100%;left:unset}.m-dropdown{display:block;position:absolute;right:3px;top:0;width:50px;text-align:center;line-height:62px;transition:all .3s ease-out 0s}body .sub-menu .sub-menu{left:0;top:100%}}@media screen and (max-width:800px){body .slide-title{font-size:20px}::-webkit-scrollbar{width:4px!important;height:4px!important}body .post-item-meta-author{display:none}body .index-top-postcard-item{margin-bottom:10px}body .carousel{margin-bottom:10px}body .index-top-postcard-item{flex-basis:49%}body .post-qrcode-btn{display:none}body .post-content{padding:15px}body .post-info{margin-bottom:10px}body .post-info-right{display:none}body .post-item-thumbnail{flex:35%;flex-shrink:0}body .post-item h2{font-size:18px}body .mobile-menu-btn,.mobile-search-btn{display:block}body .sidebar,.footer-container{display:none}body .header-main{justify-content:space-between}body .go-top-plane{display:none}body .post-main{margin:0;margin-bottom:10px;flex-basis:95%!important}body .header-logo img{height:40px}body .html-main{justify-content:center}.footer-container .footer-left{flex:100%;flex-shrink:0}.footer-container .footer-right,.footer-container .footer-aside-box,.footer-container .menu-footer-plane{display:none}.frinds-links{display:none}body .c-downbtn-item{width:100%}body .usercenter-plane{display:block}body .usercenter-menu{margin-bottom:10px}body .usercenter-right{margin-left:0}body .header-zhanwei{min-height:50px!important}}@media screen and (max-width:500px){body .cat-item{font-size:12px}body .post-item-tags{display:none}body .index-top-postcard-item{flex-basis:48%}body .post-item h2{font-size:16px}body .pageobj-item{display:none}body .avatar-img{width:30px;height:30px}body .commentlist{padding:0 20px}body .commentlist>.comment>.children{padding-left:30px}body .comment-pub-time{font-size:12px}body .commentlist>.comment>.children>.comment{padding:0 10px}body .comment-metadata{margin-left:10px}body .comment-btn-reply{opacity:1;visibility:visible}body .comment-reply-link{font-size:12px}body .top-divider{min-height:60px}body .c-downbtn-item{display:block}body .c-downbtn-describe{margin-bottom:10px}body .post-turn-page-plane,body .post-info-left{display:none}body .post-title{margin-bottom:0}body #reward-plane img{max-width:150px}body .post-pop-plane{padding:10px}}@media screen and (max-width:1384px){#post-catalog{visibility:hidden!important}}@media screen and (max-width:500px){body .post-content{padding:10px}.post-item-content{display:none}body .logged-in-as{display:none}body .post-item-info-type1{display:none}}@media screen and (max-width:360px){body .theme-copyright{display:none}}.drawer-menu-plane-show{visibility:visible!important;left:0!important;opacity:1!important}.drawer-menu-plane{opacity:0;display:flex;visibility:hidden;position:fixed;top:0;left:-100px;right:0;bottom:0;overflow:hidden;z-index:9999;transition:all .3s ease-out 0s}.drawer-menu-list{position:relative;flex:70%;max-width:400px;background:#fff}.drawer-menu-write{flex:30%;background:#000;opacity:.4}.mobile-menu-header-list .menu-item{padding:10px}.dialog-search-plane-show{visibility:visible!important}.dialog-search-plane-show .dialog-plane{opacity:1!important;top:0!important}.dialog-search-plane{display:flex;visibility:hidden;position:fixed;top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:9999;justify-content:center;align-items:center}.dialog-mask{position:absolute;top:0;left:0;right:0;bottom:0;opacity:.4;background:#000}.dialog-plane{padding:10px;top:-100px;transition:all .3s ease-out 0s;opacity:0;position:relative;flex:70%;max-width:400px;background:#fff;z-index:99999;height:150px;border-radius:4px;text-align:center}.dialog-plane h2{font-size:20px;font-weight:500;padding:6px 10px}.dialog-plane .search-form{padding:20px}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
(function(){tinymce.PluginManager.add("gh-addShortCode",function(c,e){c.on("click",function(b){var a=$(b.toElement).parents();if("corepress-editbtn"==$(a).attr("id")){var c=a.find("#corepress-editbtn").parent().find("code").text(),d=a.find("#corepress-editbtn").parent().find("code");editcode(c,d)}else"corepress-delbtn"==$(a).attr("id")&&layer.confirm("\u786e\u5b9a\u5220\u9664\u672c\u884c\u4ee3\u7801\uff1f",{title:"\u5220\u9664\u63d0\u793a",btn:["\u786e\u5b9a","\u53d6\u6d88"]},function(b){$(a[1]).remove();layer.close(b)});a.find("#corepress-editbtn").remove();a.find("#corepress-delbtn").remove();"PRE"==b.toElement.tagName&&($(b.toElement).append('\x3cdiv id\x3d"corepress-editbtn" title\x3d"\u7f16\u8f91"\x3e\x3cspan class\x3d"dashicons dashicons-welcome-write-blog"\x3e\x3c/span\x3e\x3c/div\x3e'),$(b.toElement).append('\x3cdiv id\x3d"corepress-delbtn" title\x3d"\u5220\u9664"\x3e\x3cspan class\x3d"dashicons dashicons-no"\x3e\x3c/span\x3e\x3c/div\x3e'))})})})();
|
||||
(function(){$("#edit-slug-box").on("click","#btn-link-cntoen",function(a){$("#edit-slug-buttons button").click();a=$("#new-post-slug").val();void 0==a?alert("\u5148\u70b9\u51fb\u7f16\u8f91\u5728\u70b9\u51fb\u8f6c\u6362"):(a=$("#title").val(),$.post(ajaxobj.ajax_url,{action:"corepress_getfirstspell",text:a},function(a){a=JSON.parse(a);1==a.code&&$("#new-post-slug").val(a.data.toLowerCase())}))});tinymce.PluginManager.add("gh-addShortCode",function(a,e){a.on("click",function(a){var b=$(a.toElement).parents();if("corepress-editbtn"==$(b).attr("id")){var c=b.find("#corepress-editbtn").parent().find("code").text(),d=b.find("#corepress-editbtn").parent().find("code");editcode(c,d)}else"corepress-delbtn"==$(b).attr("id")&&layer.confirm("\u786e\u5b9a\u5220\u9664\u672c\u884c\u4ee3\u7801\uff1f",{title:"\u5220\u9664\u63d0\u793a",btn:["\u786e\u5b9a","\u53d6\u6d88"]},function(a){$(b[1]).remove();layer.close(a)});b.find("#corepress-editbtn").remove();b.find("#corepress-delbtn").remove();"PRE"==a.toElement.tagName&&($(a.toElement).append('\x3cdiv id\x3d"corepress-editbtn" title\x3d"\u7f16\u8f91"\x3e\x3cspan class\x3d"dashicons dashicons-welcome-write-blog"\x3e\x3c/span\x3e\x3c/div\x3e'),$(a.toElement).append('\x3cdiv id\x3d"corepress-delbtn" title\x3d"\u5220\u9664"\x3e\x3cspan class\x3d"dashicons dashicons-no"\x3e\x3c/span\x3e\x3c/div\x3e'))})})})();
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Theme Name: CorePress
|
||||
Theme URI: https://www.lovestu.com/CorePress
|
||||
Version: 3.6
|
||||
Version: 4.0
|
||||
Author: applek
|
||||
Author URI: https://www.lovestu.com
|
||||
Description: 极客个人主题,多功能CMS主题
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<?php get_header(); ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<header>
|
||||
<div class="header-main-plane">
|
||||
<div class="header-main container">
|
||||
<?php
|
||||
get_template_part('component/nav-header');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="top-divider"></div>
|
||||
<main class="container">
|
||||
<div class="html-main">
|
||||
<?php
|
||||
global $set;
|
||||
if ($set['theme']['sidebar']['other']) {
|
||||
?>
|
||||
<style>
|
||||
body .post-info-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-item-thumbnail img {
|
||||
max-width: 336px;
|
||||
}
|
||||
.post-item-content,.post-item-info {
|
||||
font-size: 16px;
|
||||
}
|
||||
.post-item h2 {
|
||||
font-size: 22px;
|
||||
|
||||
}
|
||||
</style>
|
||||
<div class="post-main post-main-closesidebar" style="flex-basis: 100%;">
|
||||
<?php
|
||||
get_template_part('component/post-main-index');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else
|
||||
if ($set['theme']['sidebar_position'] == 1) {
|
||||
?>
|
||||
<div class="post-main">
|
||||
<?php get_template_part('component/post-main-index'); ?>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<?php dynamic_sidebar('index_sidebar'); ?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="sidebar">
|
||||
<?php dynamic_sidebar('index_sidebar'); ?>
|
||||
</div>
|
||||
<div class="post-main">
|
||||
<?php get_template_part('component/post-main-index'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<?php
|
||||
wp_footer();
|
||||
get_footer(); ?>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
|
@ -0,0 +1,132 @@
|
|||
<?php
|
||||
|
||||
|
||||
class CorePress_hot_post_widget extends WP_Widget
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
'corepress_hot_post_widget',
|
||||
'CorePress热门文章',
|
||||
array(
|
||||
'description' => '热门文章排行'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function form($instance)
|
||||
{
|
||||
$num = isset($instance['number']) ? absint($instance['number']) : 5;
|
||||
$title = isset($instance['title']) ? $instance['title'] : '热门文章';
|
||||
$type = isset($instance['type']) ? $instance['type'] : 'comment';
|
||||
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
|
||||
name="<?php echo $this->get_field_name('title'); ?>" type="text"
|
||||
value="<?php echo esc_attr($title); ?>"/></p>
|
||||
|
||||
<p><label for="<?php echo $this->get_field_id('number'); ?>">文章数量</label>
|
||||
<input class="tiny-text" id="<?php echo $this->get_field_id('number'); ?>"
|
||||
name="<?php echo $this->get_field_name('number'); ?>" type="number" step="1" min="1"
|
||||
value="<?php echo $num; ?>" size="3"/></p>
|
||||
|
||||
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('type'); ?>">文章数量</label>
|
||||
<select name="<?php echo $this->get_field_name('type'); ?>">
|
||||
<option value="view" <?php if ($type == 'view') echo 'selected' ?>>阅读量</option>
|
||||
<option value="comment"<?php if ($type == 'comment') echo 'selected' ?>>评论</option>
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function widget_start($args, $instance)
|
||||
{
|
||||
echo $args['before_widget'];
|
||||
if ($title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base)) {
|
||||
echo $args['before_title'] . $title . $args['after_title'];
|
||||
}
|
||||
}
|
||||
|
||||
public function widget_end($args)
|
||||
{
|
||||
echo $args['after_widget'];
|
||||
}
|
||||
|
||||
|
||||
function update($new_instance, $old_instance)
|
||||
{
|
||||
/* $instance = $old_instance;
|
||||
$instance['num'] = absint($new_instance['num']);
|
||||
$instance['title'] = sanitize_text_field($new_instance['title']);*/
|
||||
return $new_instance;
|
||||
}
|
||||
|
||||
function widget($args, $instance)
|
||||
{
|
||||
|
||||
$this->widget_start($args, $instance);
|
||||
$number = (!empty($instance['number'])) ? absint($instance['number']) : 5;
|
||||
$type = (!empty($instance['type'])) ? $instance['type'] : 'comment';
|
||||
if ($type == 'comment') {
|
||||
$the_query = new WP_Query(array('order' => 'DESC', 'orderby' => 'comment_count', 'posts_per_page' => $number));
|
||||
|
||||
} elseif ($type == 'view') {
|
||||
$the_query = new WP_Query(array('order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key'=>'views','posts_per_page' => $number));
|
||||
}
|
||||
|
||||
if ($the_query->have_posts()) {
|
||||
$postitem = array();
|
||||
$i = 0;
|
||||
while ($the_query->have_posts()) {
|
||||
$i++;
|
||||
$the_query->the_post();
|
||||
$postitem['title'] = get_the_title();
|
||||
$postitem['time'] = get_the_time('Y-m-d');
|
||||
$postitem['category'] = get_the_category();
|
||||
$postitem['url'] = get_the_permalink();
|
||||
?>
|
||||
<div class="hot-post-widget-item">
|
||||
<div>
|
||||
<span class="hot-post-widget-item-num">
|
||||
<?php echo $i; ?>
|
||||
</span>
|
||||
<span class="hot-post-widget-item-title">
|
||||
<a href="<?php echo $postitem['url']; ?>"> <?php echo $postitem['title'] ?></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="hot-post-widget-item-meta">
|
||||
<div>
|
||||
<?php echo $postitem['time']; ?>
|
||||
</div>
|
||||
<div>
|
||||
<a href="<?php echo get_category_link($postitem['category'][0]->cat_ID) ?>"> <?php echo $postitem['category'][0]->name ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
$this->widget_end($args, $instance);
|
||||
}
|
||||
}
|
||||
|
||||
// register widget
|
||||
function register_corepress_hot_post_widget()
|
||||
{
|
||||
register_widget('CorePress_hot_post_widget');
|
||||
}
|
||||
|
||||
add_action('widgets_init', 'register_corepress_hot_post_widget');
|
Loading…
Reference in New Issue