Version Description
The plugin code had been rewritten from scratch, adding several new functionalities and improved security, updated the readme.txt file .
Download this release
Release Info
Developer | Rajesh Babu |
Plugin | Platinum SEO Pack |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 2.0
- Changelog.txt +12 -1
- aioseop-migrate.php +0 -65
- images/techblissonline-logo.png +0 -0
- images/techblissonline-platinum-seo-pack.ico +0 -0
- license.txt +339 -0
- platinum-seo-pack.php +70 -0
- platinum-seo-pack.po +0 -546
- platinum_seo_pack-ru_RU.mo +0 -0
- platinum_seo_pack.php +0 -2417
- psp-include/generators/breadcrumbs.php +1231 -0
- psp-include/generators/css/pspsb.css +230 -0
- psp-include/generators/psp_home_others_seo_metas.php +1100 -0
- psp-include/generators/psp_pts_seo_metas.php +1393 -0
- psp-include/generators/psp_social_metas.php +965 -0
- psp-include/generators/psp_tax_seo_metas.php +1276 -0
- psp-include/settings/css/jquery-ui-classic.css +575 -0
- psp-include/settings/css/jquery-ui-demo.css +5 -0
- psp-include/settings/css/jquery-ui-fresh.css +575 -0
- psp-include/settings/css/jquery-ui-techblissonline.css +1 -0
- psp-include/settings/css/psp-html-settings.css +24 -0
- psp-include/settings/css/psp-settings-bs.css +6 -0
- psp-include/settings/css/psp-settings.css +114 -0
- psp-include/settings/js/atags.js +1 -0
- psp-include/settings/js/cm-home.js +37 -0
- psp-include/settings/js/cm-hta.js +15 -0
- psp-include/settings/js/cm.js +16 -0
- psp-include/settings/js/cmjs.js +15 -0
- psp-include/settings/js/cmpt.js +19 -0
- psp-include/settings/js/pspinputtypetoggler.js +20 -0
- psp-include/settings/js/pspmediauploader.js +1 -0
- psp-include/settings/js/pspmetabox.js +1 -0
- psp-include/settings/js/pspsnippet.js +4 -0
- psp-include/settings/js/pspsocialhandler.js +1 -0
- psp-include/settings/js/snippetpreview.js +1 -0
- psp-include/settings/psp_advanced_metabox_renderer.php +188 -0
- psp-include/settings/psp_basic_metabox_renderer.php +93 -0
- psp-include/settings/psp_basic_social_metabox_renderer.php +31 -0
- psp-include/settings/psp_pre_settings.php +854 -0
- psp-include/settings/psp_premiumad_metabox_renderer.php +25 -0
- psp-include/settings/psp_settings.php +4716 -0
- psp-include/settings/psp_social_settings.php +481 -0
- psp-include/settings/psp_tools_renderer.php +43 -0
- psp-include/settings/psp_tools_settings.php +545 -0
Changelog.txt
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2 |
Â
|
3 |
Â
* 2010-09-24 - Support for custom taxonomies. You can now have a title format that includes the custom taxonomy term in your title for the custom taxonomy archive page.
|
4 |
Â
* 2010-09-24 - Some minor superficial bug corrections
|
1 |
+
= 2.0.0 =
|
2 |
+
* 2013-12-06 - Techblissonline Platinum SEO Wordpress plugin has been completely rewritten in this latest version and offers several new features in adiition to fixing the bugs in the earlier version.
|
3 |
+
|
4 |
+
= 1.3.8 =
|
5 |
+
* 2013-09-12 - Fixed a security issue (thanks to James Pearson)
|
6 |
+
= 1.3.7 =
|
7 |
+
* 2010-12-01 - Just a day after I released 1.3.6, wordpress released 3.0.2 to fix a few security issues.I am releasing a fresh version after testing with this one
|
8 |
+
|
9 |
+
= 1.3.6 =
|
10 |
+
* 2010-11-30 - Added Plugin meta box for custom post types - Version 1.3.6
|
11 |
+
|
12 |
+
* 2010-11-11 - Space after closing php tag removed. - Version 1.3.5
|
13 |
Â
|
14 |
Â
* 2010-09-24 - Support for custom taxonomies. You can now have a title format that includes the custom taxonomy term in your title for the custom taxonomy archive page.
|
15 |
Â
* 2010-09-24 - Some minor superficial bug corrections
|
aioseop-migrate.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$message = null;
|
3 |
-
$message_updated = __("All in one SEO Pack migrated.", 'platinum_seo_pack');
|
4 |
-
|
5 |
-
// update options
|
6 |
-
if ($_POST['action'] && $_POST['action'] == 'aioseop-migrate') {
|
7 |
-
$nonce = $_POST['aioseop-migrate-nonce'];
|
8 |
-
if (!wp_verify_nonce($nonce, 'aioseop-migrate-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
|
9 |
-
|
10 |
-
$aioseop_options = get_option('aioseop_options');
|
11 |
-
|
12 |
-
update_option('aiosp_home_title',$aioseop_options['aiosp_home_title']);
|
13 |
-
update_option('aiosp_home_keywords',$aioseop_options['aiosp_home_keywords']);
|
14 |
-
update_option('aiosp_home_description',$aioseop_options['aiosp_home_description']);
|
15 |
-
|
16 |
-
update_option('psp_canonical', $aioseop_options['aiosp_can']);
|
17 |
-
update_option('aiosp_rewrite_titles', $aioseop_options['aiosp_rewrite_titles']);
|
18 |
-
update_option('aiosp_post_title_format', $aioseop_options['aiosp_post_title_format']);
|
19 |
-
update_option('aiosp_page_title_format', $aioseop_options['aiosp_page_title_format']);
|
20 |
-
update_option('aiosp_category_title_format', $aioseop_options['aiosp_category_title_format']);
|
21 |
-
update_option('aiosp_archive_title_format', $aioseop_options['aiosp_archive_title_format']);
|
22 |
-
update_option('aiosp_tag_title_format', $aioseop_options['aiosp_tag_title_format']);
|
23 |
-
update_option('aiosp_search_title_format', $aioseop_options['aiosp_search_title_format']);
|
24 |
-
update_option('aiosp_description_format', $aioseop_options['aiosp_description_format']);
|
25 |
-
update_option('aiosp_404_title_format', $aioseop_options['aiosp_404_title_format']);
|
26 |
-
update_option('aiosp_paged_format', $aioseop_options['aiosp_paged_format']);
|
27 |
-
|
28 |
-
update_option('psp_category_noindex', $aioseop_options['aiosp_category_noindex']);
|
29 |
-
update_option('psp_archive_noindex', $aioseop_options['aiosp_archive_noindex']);
|
30 |
-
update_option('psp_tags_noindex', $aioseop_options['aiosp_tags_noindex']);
|
31 |
-
|
32 |
-
update_option('aiosp_generate_descriptions', $aioseop_options['aiosp_generate_descriptions']);
|
33 |
-
update_option('aiosp_post_meta_tags', $aioseop_options['aiosp_post_meta_tags']);
|
34 |
-
update_option('aiosp_page_meta_tags', $aioseop_options['aiosp_page_meta_tags']);
|
35 |
-
update_option('aiosp_home_meta_tags', $aioseop_options['aiosp_home_meta_tags']);
|
36 |
-
update_option('aiosp_do_log', $aioseop_options['aiosp_do_log']);
|
37 |
-
|
38 |
-
global $wpdb;
|
39 |
-
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'keywords' WHERE meta_key = '_aioseop_keywords'");
|
40 |
-
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'title' WHERE meta_key = '_aioseop_title'");
|
41 |
-
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'description' WHERE meta_key = '_aioseop_description'");
|
42 |
-
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'psp_disable' WHERE meta_key in ('_aioseop_disable', 'aioseop_disable')" );
|
43 |
-
echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>Migrated All in One SEO to Platinum SEO.</strong></p></div";
|
44 |
-
}
|
45 |
-
?>
|
46 |
-
<div class="wrap"><h2><?php _e('Migrate from All in one SEO', 'platinum_seo_pack'); ?></h2>
|
47 |
-
<p>
|
48 |
-
<a target="_blank" title="<?php _e('FAQ', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack-faq/"><?php _e('FAQ', 'platinum_seo_pack') ?></a>
|
49 |
-
| <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('Feedback', 'platinum_seo_pack') ?></a>
|
50 |
-
| <a target="_blank" title="<?php _e('Platinum SEO - What is new in version 1.3.4?', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('What is new in version 1.3.4?', 'platinum_seo_pack') ?></a>
|
51 |
-
| <a target="_blank" title="<?php _e('Platinum SEO - Smart Options, Smart Benefits', 'platinum_seo_pack') ?>" href="http://techblissonline.com/wordpress-seo-plugin-smart-options-benefits/"><?php _e('Wordpress SEO options', 'platinum_seo_pack') ?></a>
|
52 |
-
| <a target="_blank" title="<?php _e('Donations for Platinum SEO Plugin', 'platinum_seo_pack') ?>" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rrajeshbab%40gmail%2ecom&item_name=Platinum%20SEO%20plugin%20development%20and%20support%20expenses&item_number=1&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=IN&bn=PP%2dDonationsBF&charset=UTF%2d8"><?php _e('Please Donate', 'platinum_seo_pack') ?></a>
|
53 |
-
| <a target="_blank" title="<?php _e('Save Bandwidth with Chennai Central Plugin', 'platinum_seo_pack') ?>" href="http://techblissonline.com/save-bandwidth/"><?php _e('Save Bandwidth with Chennai Central Plugin', 'platinum_seo_pack') ?></a>
|
54 |
-
</p>
|
55 |
-
<p><strong><?php _e('Click the button to migrate All in one SEO options to Platinum SEO.(It is recommended to back up your database before updating.)', 'platinum_seo_pack') ?></em></strong></p></div>
|
56 |
-
<form name="aioseop-migrate" action="" method="post">
|
57 |
-
<p class="submit">
|
58 |
-
<input type="hidden" name="action" value="aioseop-migrate" />
|
59 |
-
<input type="hidden" name="aioseop-migrate-nonce" value="<?php echo wp_create_nonce('aioseop-migrate-nonce'); ?>" />
|
60 |
-
<input type="submit" name="Submit" value="<?php _e('Migrate from All in One SEO', 'platinum_seo_pack')?> »" />
|
61 |
-
</p>
|
62 |
-
</form>
|
63 |
-
<?php $pspurl = get_option( 'siteurl' ). "/wp-admin/admin.php?page=platinum-seo-pack/platinum_seo_pack.php"; ?>
|
64 |
-
<p><a title="<?php _e('Go back to Platinum SEO Options Page', 'platinum_seo_pack') ?>" href="<?php echo "$pspurl" ?>"><?php _e('Go back to Platinum SEO Options Page', 'platinum_seo_pack') ?>»</a></p>
|
65 |
-
</div>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
platinum-seo-pack.php
ADDED
@@ -0,0 +1,70 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Platinum SEO Pack
|
5 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
+
Description: Complete SEO and Social optimization solution for your Wordpress blog/site. It is Simple, Uncomplicated and User friendly with several useful features.
|
7 |
+
Version: 2.0
|
8 |
+
Author: Techblissonline (Rajesh)
|
9 |
+
Author URI: https://techblissonline.com/
|
10 |
+
Text Domain: platinum-seo-pack
|
11 |
+
License: GPLv2 or later
|
12 |
+
*/
|
13 |
+
|
14 |
+
/*
|
15 |
+
Copyright (C) 2008-2019 Techblissonline (https://techblissonline.com)
|
16 |
+
- Founder - Rajesh
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 3 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
30 |
+
*/
|
31 |
+
|
32 |
+
add_action( 'plugins_loaded', 'psp_load_textdomain' );
|
33 |
+
/**
|
34 |
+
* Load plugin textdomain.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
*/
|
38 |
+
|
39 |
+
define ( 'PSP_PLUGIN_HOME', dirname ( __FILE__ ) . '/' );
|
40 |
+
define( 'PSPINC', 'psp-include' );
|
41 |
+
|
42 |
+
// Set the plugin URL root.
|
43 |
+
define( 'PSP_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
|
44 |
+
|
45 |
+
function psp_load_textdomain() {
|
46 |
+
load_plugin_textdomain( 'platinum-seo-pack', false, PSP_PLUGIN_HOME . 'languages' );
|
47 |
+
}
|
48 |
+
|
49 |
+
// Load early WordPress files.
|
50 |
+
include_once( PSP_PLUGIN_HOME . '/psp_main.php' );
|
51 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/utilities/psp_helper.php' );
|
52 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/generators/psp_home_others_seo_metas.php' );
|
53 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/generators/psp_pts_seo_metas.php' );
|
54 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/generators/psp_tax_seo_metas.php' );
|
55 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/generators/psp_social_metas.php' );
|
56 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/generators/breadcrumbs.php' );
|
57 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/settings/psp_settings.php' );
|
58 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/settings/psp_pre_settings.php' );
|
59 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/settings/psp_social_settings.php' );
|
60 |
+
include_once( PSP_PLUGIN_HOME . PSPINC . '/settings/psp_tools_settings.php' );
|
61 |
+
|
62 |
+
|
63 |
+
global $psp;
|
64 |
+
$psp = PspMain::get_instance();
|
65 |
+
|
66 |
+
register_activation_hook ( __FILE__, array ($psp, 'psp_activate' ) );
|
67 |
+
register_deactivation_hook ( __FILE__, array ($psp, 'psp_deactivate' ) );
|
68 |
+
add_action( 'upgrader_process_complete', array ($psp, 'psp_plugin_upgrade'),10, 2);
|
69 |
+
|
70 |
+
?>
|
platinum-seo-pack.po
DELETED
@@ -1,546 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: platinum-seo-pack\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2008-06-28 13:30+0530\n"
|
6 |
-
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator: Rajesh <rrajeshbab@gmail.com>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-SearchPath-0: E:\\wordpress-2.5\\platinum-seo-pack(2)\\wp-server\\trunk\n"
|
15 |
-
|
16 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:876
|
17 |
-
#, php-format
|
18 |
-
msgid "Could not download distribution (%s)"
|
19 |
-
msgstr ""
|
20 |
-
|
21 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:879
|
22 |
-
#, php-format
|
23 |
-
msgid "Could not download distribution (%s): %s"
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:886
|
27 |
-
#, php-format
|
28 |
-
msgid "Could not open %s for writing"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:888
|
32 |
-
#, php-format
|
33 |
-
msgid "Please make sure %s is writable"
|
34 |
-
msgstr ""
|
35 |
-
|
36 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:894
|
37 |
-
#, php-format
|
38 |
-
msgid "Could not write to %s"
|
39 |
-
msgstr ""
|
40 |
-
|
41 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1042
|
42 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1049
|
43 |
-
msgid "Platinum SEO Pack"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1055
|
47 |
-
msgid "Click here for Support"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1063
|
51 |
-
msgid "Title:"
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1067
|
55 |
-
msgid "Description:"
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1072
|
59 |
-
msgid " characters. Most search engines use a maximum of 160 chars for the description."
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1076
|
63 |
-
msgid "Keywords (comma separated):"
|
64 |
-
msgstr ""
|
65 |
-
|
66 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1082
|
67 |
-
msgid "PSP Meta Index and Nofollow Tags:"
|
68 |
-
msgstr ""
|
69 |
-
|
70 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1093
|
71 |
-
msgid "NOARCHIVE this page/post:"
|
72 |
-
msgstr ""
|
73 |
-
|
74 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1101
|
75 |
-
msgid "NOSNIPPET of this page/post:"
|
76 |
-
msgstr ""
|
77 |
-
|
78 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1109
|
79 |
-
msgid "Disable on this page/post:"
|
80 |
-
msgstr ""
|
81 |
-
|
82 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1138
|
83 |
-
msgid "Platinum SEO"
|
84 |
-
msgstr ""
|
85 |
-
|
86 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1171
|
87 |
-
msgid "Platinum SEO Options Updated."
|
88 |
-
msgstr ""
|
89 |
-
|
90 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1216
|
91 |
-
msgid "Upgraded to newest version. Please revisit the options page to ensure you see the newest version."
|
92 |
-
msgstr ""
|
93 |
-
|
94 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1219
|
95 |
-
msgid "Upgrade failed"
|
96 |
-
msgstr ""
|
97 |
-
|
98 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1234
|
99 |
-
msgid "Platinum SEO Plugin Options"
|
100 |
-
msgstr ""
|
101 |
-
|
102 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1236
|
103 |
-
msgid "This is version "
|
104 |
-
msgstr ""
|
105 |
-
|
106 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1238
|
107 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1239
|
108 |
-
msgid "FAQ"
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1240
|
112 |
-
msgid "Platinum SEO Plugin Feedback"
|
113 |
-
msgstr ""
|
114 |
-
|
115 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1241
|
116 |
-
msgid "Feedback"
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1242
|
120 |
-
msgid "Donations for Platinum SEO Plugin"
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1243
|
124 |
-
msgid "Please Donate"
|
125 |
-
msgstr ""
|
126 |
-
|
127 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1252
|
128 |
-
msgid "One Click Upgrade"
|
129 |
-
msgstr ""
|
130 |
-
|
131 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1253
|
132 |
-
msgid "(Remember: Backup early, backup often!)"
|
133 |
-
msgstr ""
|
134 |
-
|
135 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1259
|
136 |
-
#, php-format
|
137 |
-
msgid "Please make sure that %s is writable."
|
138 |
-
msgstr ""
|
139 |
-
|
140 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1275
|
141 |
-
msgid "Click on option titles to get help!"
|
142 |
-
msgstr ""
|
143 |
-
|
144 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1282
|
145 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1298
|
146 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1314
|
147 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1330
|
148 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1346
|
149 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1373
|
150 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1398
|
151 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1420
|
152 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1441
|
153 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1462
|
154 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1483
|
155 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1505
|
156 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1527
|
157 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1547
|
158 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1562
|
159 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1578
|
160 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1594
|
161 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1610
|
162 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1626
|
163 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1642
|
164 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1658
|
165 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1674
|
166 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1690
|
167 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1706
|
168 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1722
|
169 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1738
|
170 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1754
|
171 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1770
|
172 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1786
|
173 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1802
|
174 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1818
|
175 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1834
|
176 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1850
|
177 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1866
|
178 |
-
msgid "Click for Help!"
|
179 |
-
msgstr ""
|
180 |
-
|
181 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1283
|
182 |
-
msgid "Home Title:"
|
183 |
-
msgstr ""
|
184 |
-
|
185 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1290
|
186 |
-
msgid "As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used."
|
187 |
-
msgstr ""
|
188 |
-
|
189 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1299
|
190 |
-
msgid "Home Description:"
|
191 |
-
msgstr ""
|
192 |
-
|
193 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1306
|
194 |
-
msgid "The META description for your homepage. The default is no META description, if this is not set."
|
195 |
-
msgstr ""
|
196 |
-
|
197 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1315
|
198 |
-
msgid "Home Keywords (comma separated):"
|
199 |
-
msgstr ""
|
200 |
-
|
201 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1322
|
202 |
-
msgid "A comma separated list of the most important keywords for your site homepage. Use optimal number of keywords."
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1331
|
206 |
-
msgid "Rewrite Titles:"
|
207 |
-
msgstr ""
|
208 |
-
|
209 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1338
|
210 |
-
msgid "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: Blog Archive >> Blog Name >> Post Title. But this is far from optimal. With the default post title format, Rewrite Title rewrites this to Post Title | Blog Name. If you have manually defined a title (in one of the text fields for Platinum SEO Plugin input) this will become the title of your post in the format string."
|
211 |
-
msgstr ""
|
212 |
-
|
213 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1347
|
214 |
-
msgid "Post Title Format:"
|
215 |
-
msgstr ""
|
216 |
-
|
217 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1354
|
218 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1381
|
219 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1406
|
220 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1428
|
221 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1449
|
222 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1470
|
223 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1491
|
224 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1513
|
225 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1536
|
226 |
-
msgid "The following macros are supported:"
|
227 |
-
msgstr ""
|
228 |
-
|
229 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1356
|
230 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1383
|
231 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1408
|
232 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1430
|
233 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1451
|
234 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1472
|
235 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1493
|
236 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1515
|
237 |
-
msgid "%blog_title% - Your blog title"
|
238 |
-
msgstr ""
|
239 |
-
|
240 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1357
|
241 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1384
|
242 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1409
|
243 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1431
|
244 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1452
|
245 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1473
|
246 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1494
|
247 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1516
|
248 |
-
msgid "%blog_description% - Your blog description"
|
249 |
-
msgstr ""
|
250 |
-
|
251 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1358
|
252 |
-
msgid "%post_title% - The original title of the post"
|
253 |
-
msgstr ""
|
254 |
-
|
255 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1359
|
256 |
-
msgid "%category_title% - The (main) category of the post"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1360
|
260 |
-
msgid "%category% - Alias for %category_title%"
|
261 |
-
msgstr ""
|
262 |
-
|
263 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1361
|
264 |
-
msgid "%post_author_login% - This post author's login"
|
265 |
-
msgstr ""
|
266 |
-
|
267 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1362
|
268 |
-
msgid "%post_author_nicename% - This post author's nicename"
|
269 |
-
msgstr ""
|
270 |
-
|
271 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1363
|
272 |
-
msgid "%post_author_firstname% - This post author's first name (capitalized)"
|
273 |
-
msgstr ""
|
274 |
-
|
275 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1364
|
276 |
-
msgid "%post_author_lastname% - This post author's last name (capitalized)"
|
277 |
-
msgstr ""
|
278 |
-
|
279 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1374
|
280 |
-
msgid "Page Title Format:"
|
281 |
-
msgstr ""
|
282 |
-
|
283 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1385
|
284 |
-
msgid "%page_title% - The original title of the page"
|
285 |
-
msgstr ""
|
286 |
-
|
287 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1386
|
288 |
-
msgid "%page_author_login% - This page author's login"
|
289 |
-
msgstr ""
|
290 |
-
|
291 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1387
|
292 |
-
msgid "%page_author_nicename% - This page author's nicename"
|
293 |
-
msgstr ""
|
294 |
-
|
295 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1388
|
296 |
-
msgid "%page_author_firstname% - This page author's first name (capitalized)"
|
297 |
-
msgstr ""
|
298 |
-
|
299 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1389
|
300 |
-
msgid "%page_author_lastname% - This page author's last name (capitalized)"
|
301 |
-
msgstr ""
|
302 |
-
|
303 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1399
|
304 |
-
msgid "Category Title Format:"
|
305 |
-
msgstr ""
|
306 |
-
|
307 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1410
|
308 |
-
msgid "%category_title% - The original title of the category"
|
309 |
-
msgstr ""
|
310 |
-
|
311 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1411
|
312 |
-
msgid "%category_description% - The description of the category"
|
313 |
-
msgstr ""
|
314 |
-
|
315 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1421
|
316 |
-
msgid "Archive Title Format:"
|
317 |
-
msgstr ""
|
318 |
-
|
319 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1432
|
320 |
-
msgid "%date% - The original archive title given by wordpress, e.g. \"2007\" or \"2007 August\""
|
321 |
-
msgstr ""
|
322 |
-
|
323 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1442
|
324 |
-
msgid "Tag Title Format:"
|
325 |
-
msgstr ""
|
326 |
-
|
327 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1453
|
328 |
-
msgid "%tag% - The name of the tag"
|
329 |
-
msgstr ""
|
330 |
-
|
331 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1463
|
332 |
-
msgid "Search Title Format:"
|
333 |
-
msgstr ""
|
334 |
-
|
335 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1474
|
336 |
-
msgid "%search% - What was searched for"
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1484
|
340 |
-
msgid "Description Format:"
|
341 |
-
msgstr ""
|
342 |
-
|
343 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1495
|
344 |
-
msgid "%description% - The original description as determined by the plugin, for e.g. the excerpt if one is set or an auto-generated one, if that option is set"
|
345 |
-
msgstr ""
|
346 |
-
|
347 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1496
|
348 |
-
msgid "%wp_title% - The original wordpress title, for e.g. post title for posts"
|
349 |
-
msgstr ""
|
350 |
-
|
351 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1506
|
352 |
-
msgid "404 Title Format:"
|
353 |
-
msgstr ""
|
354 |
-
|
355 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1517
|
356 |
-
msgid "%request_url% - The original URL path, like \"/url-that-does-not-exist/\""
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1518
|
360 |
-
msgid "%request_words% - The URL path in human readable form, like \"Url That Does Not Exist\""
|
361 |
-
msgstr ""
|
362 |
-
|
363 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1528
|
364 |
-
msgid "Paged Format:"
|
365 |
-
msgstr ""
|
366 |
-
|
367 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1535
|
368 |
-
msgid "This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages)."
|
369 |
-
msgstr ""
|
370 |
-
|
371 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1538
|
372 |
-
msgid "%page% - The page number"
|
373 |
-
msgstr ""
|
374 |
-
|
375 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1548
|
376 |
-
msgid "Use Categories for META keywords:"
|
377 |
-
msgstr ""
|
378 |
-
|
379 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1554
|
380 |
-
msgid "Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page)."
|
381 |
-
msgstr ""
|
382 |
-
|
383 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1563
|
384 |
-
msgid "Use noindex for Categories:"
|
385 |
-
msgstr ""
|
386 |
-
|
387 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1570
|
388 |
-
msgid "Check this for excluding category pages from being crawled. Might help to avoid duplicate content."
|
389 |
-
msgstr ""
|
390 |
-
|
391 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1579
|
392 |
-
msgid "Use noindex for Date based Archives:"
|
393 |
-
msgstr ""
|
394 |
-
|
395 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1586
|
396 |
-
msgid "Check this for excluding date based archive pages from being crawled. Useful for avoiding duplicate content."
|
397 |
-
msgstr ""
|
398 |
-
|
399 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1595
|
400 |
-
msgid "Use noindex for Tag Archives:"
|
401 |
-
msgstr ""
|
402 |
-
|
403 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1602
|
404 |
-
msgid "Check this for excluding tag pages from being crawled. Might help to avoid duplicate content."
|
405 |
-
msgstr ""
|
406 |
-
|
407 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1611
|
408 |
-
msgid "Use noindex for comments RSS feeds:"
|
409 |
-
msgstr ""
|
410 |
-
|
411 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1618
|
412 |
-
msgid "Check this for excluding comments RSS feeds from being indexed."
|
413 |
-
msgstr ""
|
414 |
-
|
415 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1627
|
416 |
-
msgid "Use noindex for all RSS feeds:"
|
417 |
-
msgstr ""
|
418 |
-
|
419 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1634
|
420 |
-
msgid "Check this for excluding all RSS feeds from being indexed."
|
421 |
-
msgstr ""
|
422 |
-
|
423 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1643
|
424 |
-
msgid "Use noindex for Search result pages on the site:"
|
425 |
-
msgstr ""
|
426 |
-
|
427 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1650
|
428 |
-
msgid "Check this for excluding all search result pages from being indexed."
|
429 |
-
msgstr ""
|
430 |
-
|
431 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1659
|
432 |
-
msgid "Use noindex for sub pages of home:"
|
433 |
-
msgstr ""
|
434 |
-
|
435 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1666
|
436 |
-
msgid "Check this for excluding all sub pages of home from being indexed."
|
437 |
-
msgstr ""
|
438 |
-
|
439 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1675
|
440 |
-
msgid "Use noindex for author archives:"
|
441 |
-
msgstr ""
|
442 |
-
|
443 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1682
|
444 |
-
msgid "Check this for excluding author archives from being indexed."
|
445 |
-
msgstr ""
|
446 |
-
|
447 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1691
|
448 |
-
msgid "Add noodp meta tag:"
|
449 |
-
msgstr ""
|
450 |
-
|
451 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1698
|
452 |
-
msgid "Check this for adding noopd meta tag."
|
453 |
-
msgstr ""
|
454 |
-
|
455 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1707
|
456 |
-
msgid "Add noydir meta tag:"
|
457 |
-
msgstr ""
|
458 |
-
|
459 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1714
|
460 |
-
msgid "Check this for adding noydir meta tag."
|
461 |
-
msgstr ""
|
462 |
-
|
463 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1723
|
464 |
-
msgid "nofollow category listings on pages:"
|
465 |
-
msgstr ""
|
466 |
-
|
467 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1730
|
468 |
-
msgid "Check this to nofollow category listings on pages."
|
469 |
-
msgstr ""
|
470 |
-
|
471 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1739
|
472 |
-
msgid "nofollow category listings on posts:"
|
473 |
-
msgstr ""
|
474 |
-
|
475 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1746
|
476 |
-
msgid "Check this to nofollow category listings on posts (Not recommended)"
|
477 |
-
msgstr ""
|
478 |
-
|
479 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1755
|
480 |
-
msgid "nofollow external links on front page:"
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1762
|
484 |
-
msgid "Check this to nofollow external links on front page including home,category,author,tag and search pages."
|
485 |
-
msgstr ""
|
486 |
-
|
487 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1771
|
488 |
-
msgid "nofollow login and registration links:"
|
489 |
-
msgstr ""
|
490 |
-
|
491 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1778
|
492 |
-
msgid "Check this to nofollow login and registration links"
|
493 |
-
msgstr ""
|
494 |
-
|
495 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1787
|
496 |
-
msgid "nofollow links to tag pages:"
|
497 |
-
msgstr ""
|
498 |
-
|
499 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1794
|
500 |
-
msgid "Check this to nofollow links to tag pages"
|
501 |
-
msgstr ""
|
502 |
-
|
503 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1803
|
504 |
-
msgid "Autogenerate Descriptions:"
|
505 |
-
msgstr ""
|
506 |
-
|
507 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1810
|
508 |
-
msgid "Check this and your META descriptions will get autogenerated, if there's no excerpt."
|
509 |
-
msgstr ""
|
510 |
-
|
511 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1819
|
512 |
-
msgid "Additional Post Headers:"
|
513 |
-
msgstr ""
|
514 |
-
|
515 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1826
|
516 |
-
msgid "What you enter here will be copied verbatim to your header on post pages. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links."
|
517 |
-
msgstr ""
|
518 |
-
|
519 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1835
|
520 |
-
msgid "Additional Page Headers:"
|
521 |
-
msgstr ""
|
522 |
-
|
523 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1842
|
524 |
-
msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links"
|
525 |
-
msgstr ""
|
526 |
-
|
527 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1851
|
528 |
-
msgid "Additional Home Headers:"
|
529 |
-
msgstr ""
|
530 |
-
|
531 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1858
|
532 |
-
msgid "What you enter here will be copied verbatim to your header on the home page. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links"
|
533 |
-
msgstr ""
|
534 |
-
|
535 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1867
|
536 |
-
msgid "Log important events:"
|
537 |
-
msgstr ""
|
538 |
-
|
539 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1874
|
540 |
-
msgid "Check this and Platinum SEO pack will create a log of important events (platinum_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable."
|
541 |
-
msgstr ""
|
542 |
-
|
543 |
-
#: E:\wordpress-2.5\platinum-seo-pack(2)\wp-server\trunk/platinum_seo_pack.php:1883
|
544 |
-
msgid "Update Options"
|
545 |
-
msgstr ""
|
546 |
-
|
Â
|
|
Â
|
|
Â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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
platinum_seo_pack-ru_RU.mo
DELETED
Binary file
|
platinum_seo_pack.php
DELETED
@@ -1,2417 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: Platinum SEO Pack
|
5 |
-
Plugin URI: http://techblissonline.com/platinum-seo-pack/
|
6 |
-
Description: Complete SEO solution for your Wordpress blog.
|
7 |
-
Version: 1.3.5
|
8 |
-
Author: Rajesh - Techblissonline Dot Com
|
9 |
-
Author URI: http://techblissonline.com/
|
10 |
-
*/
|
11 |
-
|
12 |
-
/*
|
13 |
-
Copyright (C) 2008 Rajesh (http://techblissonline.com) (platinumseopack AT techblissonline DOT com)
|
14 |
-
Some code copyright 2007-2008 Uberdose, joost de valk
|
15 |
-
|
16 |
-
This program is free software; you can redistribute it and/or modify
|
17 |
-
it under the terms of the GNU General Public License as published by
|
18 |
-
the Free Software Foundation; either version 3 of the License, or
|
19 |
-
(at your option) any later version.
|
20 |
-
|
21 |
-
This program is distributed in the hope that it will be useful,
|
22 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
-
GNU General Public License for more details.
|
25 |
-
|
26 |
-
You should have received a copy of the GNU General Public License
|
27 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28 |
-
*/
|
29 |
-
|
30 |
-
class Platinum_SEO_Pack {
|
31 |
-
|
32 |
-
var $version = "1.3.5";
|
33 |
-
|
34 |
-
/** Max numbers of chars in auto-generated description */
|
35 |
-
var $max_description_length = 160;
|
36 |
-
|
37 |
-
/** Minimum number of chars an excerpt should be so that it can be used
|
38 |
-
* as description. Touch only if you know what you're doing
|
39 |
-
*/
|
40 |
-
var $min_description_length = 1;
|
41 |
-
|
42 |
-
//var $ob_start_detected = false;
|
43 |
-
|
44 |
-
var $title_start = -1;
|
45 |
-
|
46 |
-
var $title_end = -1;
|
47 |
-
|
48 |
-
/** The title before rewriting */
|
49 |
-
var $orig_title = '';
|
50 |
-
|
51 |
-
/** Temp filename for the latest version. */
|
52 |
-
var $upgrade_filename = 'psptemp.zip';
|
53 |
-
|
54 |
-
/** Where to extract the downloaded newest version. */
|
55 |
-
var $upgrade_folder;
|
56 |
-
|
57 |
-
/** Any error in upgrading. */
|
58 |
-
var $upgrade_error;
|
59 |
-
|
60 |
-
/** Which zip to download in order to upgrade .*/
|
61 |
-
var $upgrade_url = 'http://downloads.wordpress.org/plugin/platinum-seo-pack.zip';
|
62 |
-
|
63 |
-
/** Filename of log file. */
|
64 |
-
var $log_file;
|
65 |
-
|
66 |
-
/** Flag whether there should be logging. */
|
67 |
-
var $do_log;
|
68 |
-
|
69 |
-
var $wp_version;
|
70 |
-
|
71 |
-
function Platinum_SEO_Pack() {
|
72 |
-
global $wp_version;
|
73 |
-
$this->wp_version = $wp_version;
|
74 |
-
|
75 |
-
// Pre-2.6 compatibility
|
76 |
-
if ( ! defined( 'WP_CONTENT_URL' ) )
|
77 |
-
define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
|
78 |
-
if ( ! defined( 'WP_CONTENT_DIR' ) )
|
79 |
-
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
80 |
-
if ( ! defined( 'WP_PLUGIN_URL' ) )
|
81 |
-
define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
|
82 |
-
if ( ! defined( 'WP_PLUGIN_DIR' ) )
|
83 |
-
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
|
84 |
-
|
85 |
-
$this->log_file = dirname(__FILE__) . '/platinum_seo_pack.log';
|
86 |
-
if (get_option('aiosp_do_log')) {
|
87 |
-
$this->do_log = true;
|
88 |
-
} else {
|
89 |
-
$this->do_log = false;
|
90 |
-
}
|
91 |
-
|
92 |
-
$this->upgrade_filename = dirname(__FILE__) . '/' . $this->upgrade_filename;
|
93 |
-
$this->upgrade_folder = dirname(__FILE__);
|
94 |
-
}
|
95 |
-
|
96 |
-
// Check if a given slug belongs to a post in the database
|
97 |
-
function does_post_exist( $slug ) {
|
98 |
-
|
99 |
-
global $wpdb;
|
100 |
-
|
101 |
-
if( $ID = $wpdb->get_var( 'SELECT ID FROM '.$wpdb->posts.' WHERE post_name = "'.$slug.'" AND post_status = "publish" ' ) ) {
|
102 |
-
return $ID;
|
103 |
-
}
|
104 |
-
else {
|
105 |
-
return false;
|
106 |
-
}
|
107 |
-
|
108 |
-
}
|
109 |
-
|
110 |
-
//301 redirect to new permalink
|
111 |
-
function redirect_to_new_location( $post_new_location ) {
|
112 |
-
|
113 |
-
//301 redirect to new location
|
114 |
-
header( "HTTP/1.1 301 Moved Permanently" );
|
115 |
-
header( "Location: $post_new_location" );
|
116 |
-
}
|
117 |
-
|
118 |
-
|
119 |
-
// When the post is not found, and is_404() == true, verify if the requested slug belongs to a post in the database.
|
120 |
-
|
121 |
-
function has_permalink_changed() {
|
122 |
-
|
123 |
-
if( is_404() ) {
|
124 |
-
|
125 |
-
$slug = basename( $_SERVER['REQUEST_URI'] );
|
126 |
-
|
127 |
-
$exts=array("/",".php",".html",".htm");
|
128 |
-
|
129 |
-
// works with PHP version <= 5.x.x
|
130 |
-
foreach( $exts as $ext )
|
131 |
-
{
|
132 |
-
$slug = str_replace( $ext, "", $slug );
|
133 |
-
$slug = trim($slug);
|
134 |
-
}
|
135 |
-
|
136 |
-
if( $ID = $this->does_post_exist( $slug )) {
|
137 |
-
|
138 |
-
$this->redirect_to_new_location( get_permalink( $ID ));
|
139 |
-
|
140 |
-
}
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
function apply_seo_title() {
|
145 |
-
global $wp_query;
|
146 |
-
$post = $wp_query->get_queried_object();
|
147 |
-
|
148 |
-
if (is_feed()) {
|
149 |
-
return;
|
150 |
-
}
|
151 |
-
|
152 |
-
if (is_single() || is_page() || $this->is_static_front_page()) {
|
153 |
-
$psp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_disable', true)));
|
154 |
-
$psp_notitlerewrite = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitlerewrite', true)));
|
155 |
-
if ($psp_disable) {
|
156 |
-
return;
|
157 |
-
}
|
158 |
-
if ($psp_notitlerewrite) {
|
159 |
-
return;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
if (get_option('aiosp_rewrite_titles')) {
|
164 |
-
ob_start(array($this, 'callback_for_title_rewrite'));
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
function callback_for_title_rewrite($content) {
|
169 |
-
|
170 |
-
$content = $this->rewrite_title($content);
|
171 |
-
if (get_option('psp_nofollow_ext_links')){
|
172 |
-
$content = $this->nofollow_home_category($content);
|
173 |
-
}
|
174 |
-
|
175 |
-
return $content;
|
176 |
-
}
|
177 |
-
|
178 |
-
function init() {
|
179 |
-
if (function_exists('load_plugin_textdomain')) {
|
180 |
-
|
181 |
-
load_plugin_textdomain('platinum_seo_pack', false, WP_PLUGIN_DIR . '/platinum-seo-pack');
|
182 |
-
|
183 |
-
}
|
184 |
-
}
|
185 |
-
|
186 |
-
function is_static_front_page() {
|
187 |
-
global $wp_query;
|
188 |
-
$post = $wp_query->get_queried_object();
|
189 |
-
return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
|
190 |
-
}
|
191 |
-
|
192 |
-
function is_static_posts_page() {
|
193 |
-
global $wp_query;
|
194 |
-
$post = $wp_query->get_queried_object();
|
195 |
-
return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
|
196 |
-
}
|
197 |
-
|
198 |
-
function add_nofollow($matches) {
|
199 |
-
$origin = get_bloginfo('wpurl');
|
200 |
-
if ((strpos($matches[2],$origin)) === false && ( strpos($matches[1],'rel="nofollow"') === false ) && ( strpos($matches[3],'rel="nofollow"') === false ) && ( strpos($matches[1],'rel="external nofollow"') === false ) && ( strpos($matches[3],'rel="external nofollow"') === false )) {
|
201 |
-
$nofollow = ' rel="nofollow" ';
|
202 |
-
} else {
|
203 |
-
$nofollow = '';
|
204 |
-
}
|
205 |
-
return '<a href="' . $matches[2] . '"' . $nofollow . $matches[1] . $matches[3] . '>' . $matches[4] . '</a>';
|
206 |
-
}
|
207 |
-
|
208 |
-
function nofollow_home_category($output) {
|
209 |
-
// Loop through the content of each post and add a nofollow to links on home page or a category page.
|
210 |
-
if (is_home() || is_category() ||is_search() || (function_exists('is_tag') && is_tag()) || is_author()) {
|
211 |
-
//$anchorPattern = '/<a (.*?)href="(.*?)"(.*?)>(.*?)<\/a>/i';
|
212 |
-
$anchorPattern = '/<a ([^<>]*?)href="(.*?)"([^<>]*?)>(.*?)<\/a>/i';
|
213 |
-
$output = preg_replace_callback($anchorPattern,array(get_class($this),'add_nofollow'),$output);
|
214 |
-
}
|
215 |
-
return $output;
|
216 |
-
}
|
217 |
-
|
218 |
-
function noindex_feed() {
|
219 |
-
|
220 |
-
echo '<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />'."\n";
|
221 |
-
}
|
222 |
-
|
223 |
-
function nofollow_link($output) {
|
224 |
-
|
225 |
-
return str_replace('<a ','<a rel="nofollow" ',$output);
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
|
230 |
-
function nofollow_category_listing($output) {
|
231 |
-
|
232 |
-
if ( (get_option('psp_nofollow_cat_posts') && (is_single() || is_search()) ) || (get_option('psp_nofollow_cat_pages') && (is_home() || is_page() || is_category() || is_tag() || $this->is_static_front_page()) ) ) {
|
233 |
-
|
234 |
-
$output = $this->nofollow_link($output);
|
235 |
-
return $output;
|
236 |
-
|
237 |
-
} else {
|
238 |
-
|
239 |
-
return $output;
|
240 |
-
}
|
241 |
-
}
|
242 |
-
|
243 |
-
function nofollow_archive_listing($output) {
|
244 |
-
|
245 |
-
if ( (get_option('psp_nofollow_arc_posts') && (is_single() || is_search()) ) || (get_option('psp_nofollow_arc_pages') && (is_home() || is_page() || is_category() || is_tag() || $this->is_static_front_page()) ) ) {
|
246 |
-
$output = $this->nofollow_link($output);
|
247 |
-
return $output;
|
248 |
-
|
249 |
-
} else {
|
250 |
-
|
251 |
-
return $output;
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
function nofollow_taglinks($output) {
|
256 |
-
|
257 |
-
$output = str_replace('rel="tag"','rel="nofollow tag"',$output);
|
258 |
-
return $output;
|
259 |
-
}
|
260 |
-
|
261 |
-
function echo_to_blog_header() {
|
262 |
-
if (is_feed()) {
|
263 |
-
return;
|
264 |
-
}
|
265 |
-
|
266 |
-
global $wp_query;
|
267 |
-
$post = $wp_query->get_queried_object();
|
268 |
-
$meta_string = null;
|
269 |
-
$meta = null;
|
270 |
-
$can_link = '';
|
271 |
-
$canonical = get_option('psp_canonical');
|
272 |
-
|
273 |
-
//echo("wp_head() " . wp_title('', false) . " is_home() => " . is_home() . ", is_page() => " . is_page() . ", is_single() => " . is_single() . ", is_static_front_page() => " . $this->is_static_front_page() . ", is_static_posts_page() => " . $this->is_static_posts_page());
|
274 |
-
|
275 |
-
if (is_single() || is_page()) {
|
276 |
-
$psp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_disable', true)));
|
277 |
-
|
278 |
-
if ($psp_disable) {
|
279 |
-
return;
|
280 |
-
}
|
281 |
-
|
282 |
-
//$pspmeta = $_POST["psp_robotsmeta"];
|
283 |
-
$pspmeta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'robotsmeta', true)));
|
284 |
-
|
285 |
-
if (isset($pspmeta) && !empty($pspmeta)) {
|
286 |
-
if ( get_option('psp_comnts_pages_noindex') && get_option('page_comments') && (get_query_var('cpage') >= 1 || get_query_var('cpage') < get_comment_pages_count()) ) {
|
287 |
-
$meta .= "noindex,follow";
|
288 |
-
} else {
|
289 |
-
$meta = $pspmeta;
|
290 |
-
}
|
291 |
-
|
292 |
-
} else {
|
293 |
-
if ( get_option('psp_comnts_pages_noindex') && get_option('page_comments') && (get_query_var('cpage') >= 1 || get_query_var('cpage') < get_comment_pages_count()) ) {
|
294 |
-
$meta .= "noindex,follow";
|
295 |
-
} else {
|
296 |
-
$meta .= "index,follow";
|
297 |
-
}
|
298 |
-
|
299 |
-
}
|
300 |
-
$psp_noarchive = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_noarchive', true)));
|
301 |
-
if ($psp_noarchive) {
|
302 |
-
if ($meta != "") {
|
303 |
-
$meta .= ",";
|
304 |
-
}
|
305 |
-
|
306 |
-
$meta .= "noarchive";
|
307 |
-
|
308 |
-
}
|
309 |
-
|
310 |
-
$psp_nosnippet = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_nosnippet', true)));
|
311 |
-
if ($psp_nosnippet) {
|
312 |
-
if ($meta != "") {
|
313 |
-
$meta .= ",";
|
314 |
-
}
|
315 |
-
|
316 |
-
$meta .= "nosnippet";
|
317 |
-
|
318 |
-
}
|
319 |
-
|
320 |
-
} else if ( (is_author() && get_option('psp_author_archives_noindex')) || (is_category() && get_option('psp_category_noindex')) || (is_date() && get_option('psp_archive_noindex')) || (is_search() && get_option('psp_search_results_noindex')) || (function_exists('is_tag') && is_tag() && get_option('psp_tags_noindex')) ) {
|
321 |
-
$meta .= "noindex,follow";
|
322 |
-
|
323 |
-
} else if (is_home()) {
|
324 |
-
if (get_option('psp_sub_pages_home_noindex') && get_query_var('paged') > 1) {
|
325 |
-
$meta .= "noindex,follow";
|
326 |
-
} else {
|
327 |
-
$meta .= "index,follow";
|
328 |
-
}
|
329 |
-
}else if ((function_exists('is_tag') && is_tag() && !get_option('psp_tags_noindex'))|| (is_category() && !get_option('psp_category_noindex')) || (is_author() && !get_option('psp_author_archives_noindex')) || (is_date() && !get_option('psp_archive_noindex')) || (is_search() && !get_option('psp_search_results_noindex')) ) {
|
330 |
-
if (get_option('psp_sub_pages_home_noindex') && get_query_var('paged') > 1) {
|
331 |
-
$meta .= "noindex,follow";
|
332 |
-
} else {
|
333 |
-
$meta .= "index,follow";
|
334 |
-
}
|
335 |
-
}
|
336 |
-
if (get_option('psp_noodp_metatag')) {
|
337 |
-
|
338 |
-
if ($meta != "") {
|
339 |
-
$meta .= ",";
|
340 |
-
}
|
341 |
-
|
342 |
-
$meta .= "noodp";
|
343 |
-
}
|
344 |
-
|
345 |
-
if (get_option('psp_noydir_metatag')) {
|
346 |
-
|
347 |
-
if ($meta != "") {
|
348 |
-
$meta .= ",";
|
349 |
-
}
|
350 |
-
|
351 |
-
$meta .= "noydir";
|
352 |
-
|
353 |
-
}
|
354 |
-
|
355 |
-
if ($meta != "" || isset($meta)) {
|
356 |
-
|
357 |
-
if ($meta_string != "" || isset($meta_string)) {
|
358 |
-
|
359 |
-
$$meta_string .= "\n";
|
360 |
-
}
|
361 |
-
|
362 |
-
$meta_string .= '<meta name="robots" content="'.$meta.'" />';
|
363 |
-
|
364 |
-
}
|
365 |
-
|
366 |
-
echo "\n<!-- platinum seo pack $this->version ";
|
367 |
-
if ($this->ob_start_detected) {
|
368 |
-
echo "ob_start_detected ";
|
369 |
-
}
|
370 |
-
//echo "[$this->title_start,$this->title_end] ";
|
371 |
-
echo "-->\n";
|
372 |
-
|
373 |
-
if ((is_home() && get_option('aiosp_home_keywords'))) { // || $this->is_static_front_page()) {
|
374 |
-
$keywords = trim($this->internationalize(get_option('aiosp_home_keywords')));
|
375 |
-
} else {
|
376 |
-
$keywords = $this->get_all_keywords();
|
377 |
-
}
|
378 |
-
if (is_single() || is_page() || $this->is_static_front_page()) {
|
379 |
-
//if ($this->is_static_front_page()) {
|
380 |
-
// $description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
381 |
-
//} else {
|
382 |
-
$description = $this->get_post_description($post);
|
383 |
-
if ($canonical) {
|
384 |
-
$post_link = get_permalink($post->ID);
|
385 |
-
$can_link = $this->paged_link($post_link);
|
386 |
-
//$can_link = trailingslashit($can_link);
|
387 |
-
|
388 |
-
if ($this->is_static_front_page()){
|
389 |
-
$can_link = trailingslashit($can_link);
|
390 |
-
}
|
391 |
-
}
|
392 |
-
// }
|
393 |
-
} else if (is_home()) {
|
394 |
-
|
395 |
-
$description = trim(stripcslashes($this->internationalize(get_option('aiosp_home_description'))));
|
396 |
-
|
397 |
-
if ($canonical) {
|
398 |
-
if ((get_option('show_on_front') == 'page') && ($pageid = get_option('page_for_posts')))
|
399 |
-
{
|
400 |
-
$page_for_posts_link = get_permalink($pageid);
|
401 |
-
$can_link = $this->paged_link($page_for_posts_link);
|
402 |
-
$can_link = trailingslashit($can_link);
|
403 |
-
} else {
|
404 |
-
$home_link = get_option('home');
|
405 |
-
$can_link = $this->paged_link($home_link);
|
406 |
-
$can_link = trailingslashit($can_link);
|
407 |
-
}
|
408 |
-
}
|
409 |
-
} else if (is_category()) {
|
410 |
-
|
411 |
-
$cat_description = category_description();
|
412 |
-
$description = $this->get_string_between($cat_description, "[description]", "[/description]");
|
413 |
-
$keywords = $this->get_string_between($cat_description, "[keywords]", "[/keywords]");
|
414 |
-
|
415 |
-
if ($description == "" || $description == null) {
|
416 |
-
$description = $this->trim_excerpt_without_filters($this->internationalize($cat_description));
|
417 |
-
} else {
|
418 |
-
$description = $this->trim_excerpt_without_filters($this->internationalize($description));
|
419 |
-
}
|
420 |
-
|
421 |
-
if ($keywords != "" || $keywords != null) {
|
422 |
-
$keywords = $this->internationalize($keywords);
|
423 |
-
}
|
424 |
-
if ($canonical) {
|
425 |
-
$cat_link = get_category_link(get_query_var('cat'));
|
426 |
-
$can_link = $this->paged_link($cat_link);
|
427 |
-
}
|
428 |
-
} else if (is_date() && ($canonical)) {
|
429 |
-
if (get_query_var('m')) {
|
430 |
-
$m = preg_replace('/[^0-9]/', '', get_query_var('m'));
|
431 |
-
switch (strlen($m)) {
|
432 |
-
case 4:
|
433 |
-
$can_link = get_year_link($m);
|
434 |
-
$can_link = $this->paged_link($can_link);
|
435 |
-
break;
|
436 |
-
case 6:
|
437 |
-
$can_link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
|
438 |
-
$can_link = $this->paged_link($can_link);
|
439 |
-
break;
|
440 |
-
case 8:
|
441 |
-
$can_link = get_day_link(substr($m, 0, 4), substr($m, 4, 2),
|
442 |
-
substr($m, 6, 2));
|
443 |
-
$can_link = $this->paged_link($can_link);
|
444 |
-
break;
|
445 |
-
default:
|
446 |
-
$can_link = '';
|
447 |
-
}
|
448 |
-
}
|
449 |
-
if ($wp_query->is_day) {
|
450 |
-
$can_link = get_day_link(get_query_var('year'),
|
451 |
-
get_query_var('monthnum'),
|
452 |
-
get_query_var('day'));
|
453 |
-
$can_link = $this->paged_link($can_link);
|
454 |
-
} else if ($wp_query->is_month) {
|
455 |
-
$can_link = get_month_link(get_query_var('year'),
|
456 |
-
get_query_var('monthnum'));
|
457 |
-
$can_link = $this->paged_link($can_link);
|
458 |
-
} else if ($wp_query->is_year) {
|
459 |
-
$can_link = get_year_link(get_query_var('year'));
|
460 |
-
$can_link = $this->paged_link($can_link);
|
461 |
-
}
|
462 |
-
} else if (function_exists('is_tag') && is_tag()) {
|
463 |
-
|
464 |
-
if (function_exists('tag_description')) {
|
465 |
-
$tag_description = tag_description();
|
466 |
-
$description = $this->get_string_between($tag_description, "[description]", "[/description]");
|
467 |
-
$keywords = $this->get_string_between($tag_description, "[keywords]", "[/keywords]");
|
468 |
-
|
469 |
-
if ($description == "" || $description == null) {
|
470 |
-
$description = $this->trim_excerpt_without_filters($this->internationalize($tag_description));
|
471 |
-
} else {
|
472 |
-
$description = $this->trim_excerpt_without_filters($this->internationalize($description));
|
473 |
-
}
|
474 |
-
|
475 |
-
if ($keywords != "" || $keywords != null) {
|
476 |
-
$keywords = $this->internationalize($keywords);
|
477 |
-
}
|
478 |
-
}
|
479 |
-
|
480 |
-
if ($canonical) {
|
481 |
-
$tag = get_term_by('slug',get_query_var('tag'),'post_tag');
|
482 |
-
if (!empty($tag->term_id)) {
|
483 |
-
$tag_link = get_tag_link($tag->term_id);
|
484 |
-
}
|
485 |
-
$can_link = $this->paged_link($tag_link);
|
486 |
-
}
|
487 |
-
} else if (is_author() && ($canonical)) {
|
488 |
-
global $wp_version;
|
489 |
-
if ($wp_version >= '2') {
|
490 |
-
$author = get_userdata(get_query_var('author'));
|
491 |
-
if ($author === false)
|
492 |
-
return false;
|
493 |
-
$auth_link = get_author_link(false, $author->ID, $author->user_nicename);
|
494 |
-
$can_link = $this->paged_link($auth_link);
|
495 |
-
} else {
|
496 |
-
global $cache_userdata;
|
497 |
-
$userid = get_query_var('author');
|
498 |
-
$auth_link = get_author_link(false, $userid, $cache_userdata[$userid]->user_nicename);
|
499 |
-
$can_link = $this->paged_link($auth_link);
|
500 |
-
}
|
501 |
-
}
|
502 |
-
|
503 |
-
if (isset($description) && (strlen($description) > $this->min_description_length) && !((is_home() && is_paged()) || (is_category() && is_paged()) || (function_exists('is_tag') && is_tag() && is_paged()))) {
|
504 |
-
$description = trim(strip_tags($description));
|
505 |
-
$description = str_replace('"', '', $description);
|
506 |
-
|
507 |
-
// replace newlines on mac / windows?
|
508 |
-
$description = str_replace("\r\n", ' ', $description);
|
509 |
-
|
510 |
-
// maybe linux uses this alone
|
511 |
-
$description = str_replace("\n", ' ', $description);
|
512 |
-
|
513 |
-
if (isset($meta_string)) {
|
514 |
-
$meta_string .= "\n";
|
515 |
-
} else {
|
516 |
-
$meta_string = '';
|
517 |
-
}
|
518 |
-
|
519 |
-
// description format
|
520 |
-
$description_format = get_option('aiosp_description_format');
|
521 |
-
if (!isset($description_format) || empty($description_format)) {
|
522 |
-
$description_format = "%description%";
|
523 |
-
}
|
524 |
-
$description = str_replace('%description%', $description, $description_format);
|
525 |
-
$description = str_replace('%blog_title%', get_bloginfo('name'), $description);
|
526 |
-
$description = str_replace('%blog_description%', get_bloginfo('description'), $description);
|
527 |
-
$description = str_replace('%wp_title%', $this->get_original_title(), $description);
|
528 |
-
|
529 |
-
$meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", $description);
|
530 |
-
}
|
531 |
-
|
532 |
-
if (isset($keywords) && !empty($keywords) && !((is_home() && is_paged()) || (is_category() && is_paged()) || (function_exists('is_tag') && is_tag() && is_paged()))) {
|
533 |
-
if (isset($meta_string)) {
|
534 |
-
$meta_string .= "\n";
|
535 |
-
}
|
536 |
-
$meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", $keywords);
|
537 |
-
}
|
538 |
-
|
539 |
-
$page_meta = stripcslashes(get_option('aiosp_page_meta_tags'));
|
540 |
-
$post_meta = stripcslashes(get_option('aiosp_post_meta_tags'));
|
541 |
-
$home_meta = stripcslashes(get_option('aiosp_home_meta_tags'));
|
542 |
-
if (is_page() && isset($page_meta) && !empty($page_meta)) {
|
543 |
-
if (isset($meta_string)) {
|
544 |
-
$meta_string .= "\n";
|
545 |
-
}
|
546 |
-
echo "\n$page_meta";
|
547 |
-
}
|
548 |
-
|
549 |
-
if (is_single() && isset($post_meta) && !empty($post_meta)) {
|
550 |
-
if (isset($meta_string)) {
|
551 |
-
$meta_string .= "\n";
|
552 |
-
}
|
553 |
-
$meta_string .= "$post_meta";
|
554 |
-
}
|
555 |
-
|
556 |
-
if (is_home() && !empty($home_meta)) {
|
557 |
-
if (isset($meta_string)) {
|
558 |
-
$meta_string .= "\n";
|
559 |
-
}
|
560 |
-
$meta_string .= "$home_meta";
|
561 |
-
}
|
562 |
-
|
563 |
-
if ($meta_string != null) {
|
564 |
-
echo "$meta_string\n";
|
565 |
-
}
|
566 |
-
|
567 |
-
if ($can_link != '' && ($canonical)) {
|
568 |
-
echo "".'<link rel="canonical" href="'.$can_link.'" />'."\n";
|
569 |
-
}
|
570 |
-
|
571 |
-
echo "<!-- /platinum one seo pack -->\n";
|
572 |
-
}
|
573 |
-
|
574 |
-
function paged_link($link) {
|
575 |
-
$page = get_query_var('paged');
|
576 |
-
$has_ut = function_exists('user_trailingslashit');
|
577 |
-
if ($page && $page > 1) {
|
578 |
-
$link = trailingslashit($link) ."page/". "$page";
|
579 |
-
if ($has_ut) {
|
580 |
-
$link = user_trailingslashit($link, 'paged');
|
581 |
-
} else {
|
582 |
-
$link .= '/';
|
583 |
-
}
|
584 |
-
}
|
585 |
-
return $link;
|
586 |
-
}
|
587 |
-
|
588 |
-
function psp_category_description() {
|
589 |
-
$cat_description = category_description();
|
590 |
-
|
591 |
-
$description = $this->get_string_between($cat_description, "[description]", "[/description]");
|
592 |
-
if ($description == "" || $description == null) {
|
593 |
-
$description = $this->internationalize($cat_description);
|
594 |
-
} else {
|
595 |
-
$description = $this->internationalize($description);
|
596 |
-
}
|
597 |
-
echo "$description"."\n";
|
598 |
-
}
|
599 |
-
|
600 |
-
function psp_category_keywords() {
|
601 |
-
$cat_description = category_description();
|
602 |
-
$keywords = $this->get_string_between($cat_description, "[keywords]", "[/keywords]");
|
603 |
-
|
604 |
-
if ($keywords != "" || $keywords != null) {
|
605 |
-
$keywords = $this->internationalize($keywords);
|
606 |
-
}
|
607 |
-
echo "$keywords"."\n";
|
608 |
-
}
|
609 |
-
|
610 |
-
function psp_tag_description() {
|
611 |
-
$tag_description = tag_description();
|
612 |
-
|
613 |
-
$description = $this->get_string_between($tag_description, "[description]", "[/description]");
|
614 |
-
if ($description == "" || $description == null) {
|
615 |
-
$description = $this->internationalize($tag_description);
|
616 |
-
} else {
|
617 |
-
$description = $this->internationalize($description);
|
618 |
-
}
|
619 |
-
echo "$description"."\n";
|
620 |
-
}
|
621 |
-
|
622 |
-
function psp_tag_keywords() {
|
623 |
-
$tag_description = tag_description();
|
624 |
-
$keywords = $this->get_string_between($tag_description, "[keywords]", "[/keywords]");
|
625 |
-
|
626 |
-
if ($keywords != "" || $keywords != null) {
|
627 |
-
$keywords = $this->internationalize($keywords);
|
628 |
-
}
|
629 |
-
echo "$keywords"."\n";
|
630 |
-
}
|
631 |
-
|
632 |
-
function get_post_description($post) {
|
633 |
-
$description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "description", true))));
|
634 |
-
if (!$description) {
|
635 |
-
$description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt));
|
636 |
-
if (!$description && get_option("aiosp_generate_descriptions")) {
|
637 |
-
$description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content));
|
638 |
-
}
|
639 |
-
}
|
640 |
-
|
641 |
-
// "internal whitespace trim"
|
642 |
-
$description = preg_replace("/\s\s+/", " ", $description);
|
643 |
-
|
644 |
-
return $description;
|
645 |
-
}
|
646 |
-
|
647 |
-
function get_string_between($string, $start, $end){
|
648 |
-
$string = " ".$string;
|
649 |
-
$ini = strpos($string,$start);
|
650 |
-
if ($ini == 0) return "";
|
651 |
-
$ini += strlen($start);
|
652 |
-
$len = strpos($string,$end,$ini) - $ini;
|
653 |
-
return substr($string,$ini,$len);
|
654 |
-
}
|
655 |
-
|
656 |
-
function replace_title($content, $title) {
|
657 |
-
$title = trim(strip_tags($title));
|
658 |
-
|
659 |
-
$title_tag_start = "<title>";
|
660 |
-
$title_tag_end = "</title>";
|
661 |
-
$len_start = strlen($title_tag_start);
|
662 |
-
$len_end = strlen($title_tag_end);
|
663 |
-
$title = stripcslashes(trim($title));
|
664 |
-
$start = strpos($content, $title_tag_start);
|
665 |
-
$end = strpos($content, $title_tag_end);
|
666 |
-
|
667 |
-
$this->title_start = $start;
|
668 |
-
$this->title_end = $end;
|
669 |
-
$this->orig_title = $title;
|
670 |
-
|
671 |
-
if ($start && $end) {
|
672 |
-
$header = substr($content, 0, $start + $len_start) . $title . substr($content, $end);
|
673 |
-
} else {
|
674 |
-
// this breaks some sitemap plugins (like wpg2)
|
675 |
-
//$header = $content . "<title>$title</title>";
|
676 |
-
|
677 |
-
$header = $content;
|
678 |
-
}
|
679 |
-
|
680 |
-
return $header;
|
681 |
-
}
|
682 |
-
|
683 |
-
function internationalize($in) {
|
684 |
-
if (function_exists('langswitch_filter_langs_with_message')) {
|
685 |
-
$in = langswitch_filter_langs_with_message($in);
|
686 |
-
}
|
687 |
-
if (function_exists('polyglot_filter')) {
|
688 |
-
$in = polyglot_filter($in);
|
689 |
-
}
|
690 |
-
if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
|
691 |
-
$in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
|
692 |
-
}
|
693 |
-
$in = apply_filters('localization', $in);
|
694 |
-
return $in;
|
695 |
-
}
|
696 |
-
|
697 |
-
/** @return The original title as delivered by WP (well, in most cases) */
|
698 |
-
function get_original_title() {
|
699 |
-
global $wp_query;
|
700 |
-
if (!$wp_query) {
|
701 |
-
return null;
|
702 |
-
}
|
703 |
-
|
704 |
-
$post = $wp_query->get_queried_object();
|
705 |
-
|
706 |
-
// the_search_query() is not suitable, it cannot just return
|
707 |
-
global $s;
|
708 |
-
|
709 |
-
$title = null;
|
710 |
-
|
711 |
-
if (is_home()) {
|
712 |
-
$title = get_option('blogname');
|
713 |
-
} else if (is_single()) {
|
714 |
-
$title = $this->internationalize(wp_title('', false));
|
715 |
-
} else if (is_search() && isset($s) && !empty($s)) {
|
716 |
-
if (function_exists('attribute_escape')) {
|
717 |
-
$search = attribute_escape(stripcslashes($s));
|
718 |
-
} else {
|
719 |
-
$search = wp_specialchars(stripcslashes($s), true);
|
720 |
-
}
|
721 |
-
$search = $this->capitalize($search);
|
722 |
-
$title = $search;
|
723 |
-
} else if (is_category() && !is_feed()) {
|
724 |
-
//$category_description = $this->internationalize(category_description());
|
725 |
-
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
726 |
-
$title = $category_name;
|
727 |
-
} else if (is_page()) {
|
728 |
-
$title = $this->internationalize(wp_title('', false));
|
729 |
-
} else if (function_exists('is_tag') && is_tag()) {
|
730 |
-
global $utw;
|
731 |
-
if ($utw) {
|
732 |
-
$tags = $utw->GetCurrentTagSet();
|
733 |
-
$tag = $tags[0]->tag;
|
734 |
-
$tag = str_replace('-', ' ', $tag);
|
735 |
-
} else {
|
736 |
-
// wordpress > 2.3
|
737 |
-
$tag = $this->internationalize(wp_title('', false));
|
738 |
-
}
|
739 |
-
if ($tag) {
|
740 |
-
$title = $tag;
|
741 |
-
}
|
742 |
-
} else if (is_archive()) {
|
743 |
-
$title = $this->internationalize(wp_title('', false));
|
744 |
-
} else if (is_404()) {
|
745 |
-
$title_format = get_option('aiosp_404_title_format');
|
746 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
747 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
748 |
-
$new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
|
749 |
-
$new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
|
750 |
-
$title = $new_title;
|
751 |
-
}
|
752 |
-
|
753 |
-
return trim($title);
|
754 |
-
}
|
755 |
-
|
756 |
-
function paged_title($title) {
|
757 |
-
// the page number if paged
|
758 |
-
global $paged;
|
759 |
-
|
760 |
-
// simple tagging support
|
761 |
-
global $STagging;
|
762 |
-
|
763 |
-
if (is_paged() || (isset($STagging) && $STagging->is_tag_view() && $paged)) {
|
764 |
-
$part = $this->internationalize(get_option('aiosp_paged_format'));
|
765 |
-
if (isset($part) || !empty($part)) {
|
766 |
-
$part = " " . trim($part);
|
767 |
-
$part = str_replace('%page%', $paged, $part);
|
768 |
-
$this->log("paged_title() [$title] [$part]");
|
769 |
-
$title .= $part;
|
770 |
-
}
|
771 |
-
}
|
772 |
-
return $title;
|
773 |
-
}
|
774 |
-
|
775 |
-
function rewrite_title($header) {
|
776 |
-
global $wp_query;
|
777 |
-
if (!$wp_query) {
|
778 |
-
$header .= "<!-- no wp_query found! -->\n";
|
779 |
-
return $header;
|
780 |
-
}
|
781 |
-
|
782 |
-
$post = $wp_query->get_queried_object();
|
783 |
-
|
784 |
-
// the_search_query() is not suitable, it cannot just return
|
785 |
-
global $s;
|
786 |
-
|
787 |
-
// simple tagging support
|
788 |
-
global $STagging;
|
789 |
-
|
790 |
-
if (is_home()) {
|
791 |
-
$title = $this->internationalize(get_option('aiosp_home_title'));
|
792 |
-
if (empty($title)) {
|
793 |
-
$title = $this->internationalize(get_option('blogname'));
|
794 |
-
}
|
795 |
-
$title = $this->paged_title($title);
|
796 |
-
$header = $this->replace_title($header, $title);
|
797 |
-
} else if (is_single() || $this->is_static_front_page()) {
|
798 |
-
// we're not in the loop :(
|
799 |
-
$authordata = get_userdata($post->post_author);
|
800 |
-
$categories = get_the_category($post->ID);
|
801 |
-
$category = '';
|
802 |
-
if (count($categories) > 0) {
|
803 |
-
$category = $categories[0]->cat_name;
|
804 |
-
}
|
805 |
-
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
806 |
-
if (!$title) {
|
807 |
-
$title = $this->internationalize(get_post_meta($post->ID, "title_tag", true));
|
808 |
-
if (!$title) {
|
809 |
-
$title = $this->internationalize(wp_title('', false));
|
810 |
-
}
|
811 |
-
}
|
812 |
-
$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
813 |
-
if (!$psp_notitleformat) {
|
814 |
-
|
815 |
-
$title_format = get_option('aiosp_post_title_format');
|
816 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
817 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
818 |
-
$new_title = str_replace('%post_title%', $title, $new_title);
|
819 |
-
$new_title = str_replace('%category%', $category, $new_title);
|
820 |
-
$new_title = str_replace('%category_title%', $category, $new_title);
|
821 |
-
$new_title = str_replace('%post_author_login%', $authordata->user_login, $new_title);
|
822 |
-
$new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
|
823 |
-
$new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title);
|
824 |
-
$new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title);
|
825 |
-
$title = $new_title;
|
826 |
-
}
|
827 |
-
$title = trim($title);
|
828 |
-
$header = $this->replace_title($header, $title);
|
829 |
-
} else if (is_search() && isset($s) && !empty($s)) {
|
830 |
-
if (function_exists('attribute_escape')) {
|
831 |
-
$search = attribute_escape(stripcslashes($s));
|
832 |
-
} else {
|
833 |
-
$search = wp_specialchars(stripcslashes($s), true);
|
834 |
-
}
|
835 |
-
$search = $this->capitalize($search);
|
836 |
-
$title_format = get_option('aiosp_search_title_format');
|
837 |
-
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
838 |
-
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
839 |
-
$title = str_replace('%search%', $search, $title);
|
840 |
-
$header = $this->replace_title($header, $title);
|
841 |
-
} else if (is_category() && !is_feed()) {
|
842 |
-
$category_description = $this->internationalize(category_description());
|
843 |
-
$category_name = ucwords($this->internationalize(single_cat_title('', false)));
|
844 |
-
$title_format = get_option('aiosp_category_title_format');
|
845 |
-
$title = str_replace('%category_title%', $category_name, $title_format);
|
846 |
-
$title = str_replace('%category_description%', $category_description, $title);
|
847 |
-
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title);
|
848 |
-
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
849 |
-
$title = $this->paged_title($title);
|
850 |
-
$header = $this->replace_title($header, $title);
|
851 |
-
} else if (is_page()) {
|
852 |
-
// we're not in the loop :(
|
853 |
-
$authordata = get_userdata($post->post_author);
|
854 |
-
//if ($this->is_static_front_page()) {
|
855 |
-
//if ($this->internationalize(get_option('aiosp_home_title'))) {
|
856 |
-
// $header = $this->replace_title($header, $this->internationalize(get_option('aiosp_home_title')));
|
857 |
-
//}
|
858 |
-
//} else {
|
859 |
-
$title = $this->internationalize(get_post_meta($post->ID, "title", true));
|
860 |
-
if (!$title) {
|
861 |
-
$title = $this->internationalize(wp_title('', false));
|
862 |
-
}
|
863 |
-
$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
864 |
-
if (!$psp_notitleformat) {
|
865 |
-
$title_format = get_option('aiosp_page_title_format');
|
866 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
867 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
868 |
-
$new_title = str_replace('%page_title%', $title, $new_title);
|
869 |
-
$new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title);
|
870 |
-
$new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title);
|
871 |
-
$new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
|
872 |
-
$new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
|
873 |
-
$title = trim($new_title);
|
874 |
-
}
|
875 |
-
$header = $this->replace_title($header, $title);
|
876 |
-
//}
|
877 |
-
} else if (function_exists('is_tag') && is_tag()) {
|
878 |
-
global $utw;
|
879 |
-
if ($utw) {
|
880 |
-
$tags = $utw->GetCurrentTagSet();
|
881 |
-
$tag = $tags[0]->tag;
|
882 |
-
$tag = str_replace('-', ' ', $tag);
|
883 |
-
} else {
|
884 |
-
// wordpress > 2.3
|
885 |
-
$tag = $this->internationalize(wp_title('', false));
|
886 |
-
}
|
887 |
-
if ($tag) {
|
888 |
-
$tag = $this->capitalize($tag);
|
889 |
-
$title_format = get_option('aiosp_tag_title_format');
|
890 |
-
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
891 |
-
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
892 |
-
$title = str_replace('%tag%', $tag, $title);
|
893 |
-
$title = $this->paged_title($title);
|
894 |
-
$header = $this->replace_title($header, $title);
|
895 |
-
}
|
896 |
-
} else if (isset($STagging) && $STagging->is_tag_view()) { // simple tagging support
|
897 |
-
$tag = $STagging->search_tag;
|
898 |
-
if ($tag) {
|
899 |
-
$tag = $this->capitalize($tag);
|
900 |
-
$title_format = get_option('aiosp_tag_title_format');
|
901 |
-
$title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
902 |
-
$title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title);
|
903 |
-
$title = str_replace('%tag%', $tag, $title);
|
904 |
-
$title = $this->paged_title($title);
|
905 |
-
$header = $this->replace_title($header, $title);
|
906 |
-
}
|
907 |
-
} else if (is_tax()) { // added by Aidan Curran, sww.co.nz
|
908 |
-
$term = get_term_by('slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
|
909 |
-
$title_format = get_option('psp_taxonomy_title_format');
|
910 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
911 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
912 |
-
$new_title = str_replace('%term%', $term->name, $new_title);
|
913 |
-
$title = $this->paged_title($new_title);
|
914 |
-
$header = $this->replace_title($header, $title);
|
915 |
-
} else if (is_archive()) {
|
916 |
-
$date = $this->internationalize(wp_title('', false));
|
917 |
-
$title_format = get_option('aiosp_archive_title_format');
|
918 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
919 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
920 |
-
$new_title = str_replace('%date%', $date, $new_title);
|
921 |
-
|
922 |
-
$title = trim($new_title);
|
923 |
-
$title = $this->paged_title($title);
|
924 |
-
$header = $this->replace_title($header, $title);
|
925 |
-
} else if (is_404()) {
|
926 |
-
$title_format = get_option('aiosp_404_title_format');
|
927 |
-
$new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format);
|
928 |
-
$new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title);
|
929 |
-
$new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title);
|
930 |
-
$new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title);
|
931 |
-
$header = $this->replace_title($header, $new_title);
|
932 |
-
}
|
933 |
-
|
934 |
-
return $header;
|
935 |
-
|
936 |
-
}
|
937 |
-
|
938 |
-
/**
|
939 |
-
* @return User-readable nice words for a given request.
|
940 |
-
*/
|
941 |
-
function request_as_words($request) {
|
942 |
-
$request = htmlspecialchars($request);
|
943 |
-
$request = str_replace('.html', ' ', $request);
|
944 |
-
$request = str_replace('.htm', ' ', $request);
|
945 |
-
$request = str_replace('.', ' ', $request);
|
946 |
-
$request = str_replace('/', ' ', $request);
|
947 |
-
$request_a = explode(' ', $request);
|
948 |
-
$request_new = array();
|
949 |
-
foreach ($request_a as $token) {
|
950 |
-
$request_new[] = ucwords(trim($token));
|
951 |
-
}
|
952 |
-
$request = implode(' ', $request_new);
|
953 |
-
return $request;
|
954 |
-
}
|
955 |
-
|
956 |
-
function capitalize($s) {
|
957 |
-
$s = trim($s);
|
958 |
-
$tokens = explode(' ', $s);
|
959 |
-
while (list($key, $val) = each($tokens)) {
|
960 |
-
$tokens[$key] = trim($tokens[$key]);
|
961 |
-
/*if (function_exists('mb_strtoupper')) {
|
962 |
-
$tokens[$key] = mb_strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
|
963 |
-
} else {*/
|
964 |
-
$tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1);
|
965 |
-
/*}*/
|
966 |
-
}
|
967 |
-
$s = implode(' ', $tokens);
|
968 |
-
return $s;
|
969 |
-
}
|
970 |
-
|
971 |
-
function trim_excerpt_without_filters($text) {
|
972 |
-
$text = str_replace(']]>', ']]>', $text);
|
973 |
-
$text = strip_tags($text);
|
974 |
-
$max = $this->max_description_length;
|
975 |
-
|
976 |
-
if ($max < strlen($text)) {
|
977 |
-
while($text[$max] != ' ' && $max > $this->min_description_length) {
|
978 |
-
$max--;
|
979 |
-
}
|
980 |
-
}
|
981 |
-
$text = substr($text, 0, $max);
|
982 |
-
return trim(stripcslashes($text));
|
983 |
-
}
|
984 |
-
|
985 |
-
function trim_excerpt_without_filters_full_length($text) {
|
986 |
-
$text = str_replace(']]>', ']]>', $text);
|
987 |
-
$text = strip_tags($text);
|
988 |
-
return trim(stripcslashes($text));
|
989 |
-
}
|
990 |
-
|
991 |
-
/**
|
992 |
-
* @return comma-separated list of unique keywords
|
993 |
-
*/
|
994 |
-
function get_all_keywords() {
|
995 |
-
global $posts;
|
996 |
-
|
997 |
-
if (is_404()) {
|
998 |
-
return null;
|
999 |
-
}
|
1000 |
-
|
1001 |
-
// if we are on synthetic pages
|
1002 |
-
if (!is_home() && !is_page() && !is_single() && !$this->is_static_front_page() && !$this->is_static_posts_page()) {
|
1003 |
-
return null;
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
$keywords = array();
|
1007 |
-
if (is_array($posts)) {
|
1008 |
-
foreach ($posts as $post) {
|
1009 |
-
if ($post) {
|
1010 |
-
|
1011 |
-
// custom field keywords
|
1012 |
-
$keywords_a = $keywords_i = null;
|
1013 |
-
$description_a = $description_i = null;
|
1014 |
-
$id = $post->ID;
|
1015 |
-
$keywords_i = stripcslashes($this->internationalize(get_post_meta($post->ID, "keywords", true)));
|
1016 |
-
$keywords_i = str_replace('"', '', $keywords_i);
|
1017 |
-
if (isset($keywords_i) && !empty($keywords_i)) {
|
1018 |
-
$traverse = explode(',', $keywords_i);
|
1019 |
-
foreach ($traverse as $keyword) {
|
1020 |
-
$keywords[] = $keyword;
|
1021 |
-
}
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
if (get_option('psp_use_tags') && !is_page()) {
|
1025 |
-
// WP 2.3 tags
|
1026 |
-
if (function_exists('get_the_tags')) {
|
1027 |
-
$tags = get_the_tags($post->ID);
|
1028 |
-
if ($tags && is_array($tags)) {
|
1029 |
-
foreach ($tags as $tag) {
|
1030 |
-
$keywords[] = $this->internationalize($tag->name);
|
1031 |
-
}
|
1032 |
-
}
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
// Ultimate Tag Warrior integration
|
1036 |
-
global $utw;
|
1037 |
-
if ($utw) {
|
1038 |
-
$tags = $utw->GetTagsForPost($post);
|
1039 |
-
if (is_array($tags)) {
|
1040 |
-
foreach ($tags as $tag) {
|
1041 |
-
$tag = $tag->tag;
|
1042 |
-
$tag = str_replace('_',' ', $tag);
|
1043 |
-
$tag = str_replace('-',' ',$tag);
|
1044 |
-
$tag = stripcslashes($tag);
|
1045 |
-
$keywords[] = $tag;
|
1046 |
-
}
|
1047 |
-
}
|
1048 |
-
}
|
1049 |
-
}
|
1050 |
-
// autometa
|
1051 |
-
$autometa = stripcslashes(get_post_meta($post->ID, "autometa", true));
|
1052 |
-
if (isset($autometa) && !empty($autometa)) {
|
1053 |
-
$autometa_array = explode(' ', $autometa);
|
1054 |
-
foreach ($autometa_array as $e) {
|
1055 |
-
$keywords[] = $e;
|
1056 |
-
}
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
if (get_option('aiosp_use_categories') && !is_page()) {
|
1060 |
-
$categories = get_the_category($post->ID);
|
1061 |
-
foreach ($categories as $category) {
|
1062 |
-
$keywords[] = $this->internationalize($category->cat_name);
|
1063 |
-
}
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
}
|
1067 |
-
}
|
1068 |
-
}
|
1069 |
-
|
1070 |
-
return $this->get_unique_keywords($keywords);
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
function get_meta_keywords() {
|
1074 |
-
global $posts;
|
1075 |
-
|
1076 |
-
$keywords = array();
|
1077 |
-
if (is_array($posts)) {
|
1078 |
-
foreach ($posts as $post) {
|
1079 |
-
if ($post) {
|
1080 |
-
// custom field keywords
|
1081 |
-
$keywords_a = $keywords_i = null;
|
1082 |
-
$description_a = $description_i = null;
|
1083 |
-
$id = $post->ID;
|
1084 |
-
$keywords_i = stripcslashes(get_post_meta($post->ID, "keywords", true));
|
1085 |
-
$keywords_i = str_replace('"', '', $keywords_i);
|
1086 |
-
if (isset($keywords_i) && !empty($keywords_i)) {
|
1087 |
-
$keywords[] = $keywords_i;
|
1088 |
-
}
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
return $this->get_unique_keywords($keywords);
|
1094 |
-
}
|
1095 |
-
|
1096 |
-
function get_unique_keywords($keywords) {
|
1097 |
-
$uni_keywords = array();
|
1098 |
-
foreach ($keywords as $word) {
|
1099 |
-
$uni_keywords[] = $word;
|
1100 |
-
/*if (function_exists('mb_strtolower')) {
|
1101 |
-
if (mb_detect_encoding($word) == 'UTF8') {
|
1102 |
-
$small_keywords[] = mb_strtolower($word, 'UTF8');
|
1103 |
-
} else {
|
1104 |
-
$small_keywords[] = strtolower($word);
|
1105 |
-
}
|
1106 |
-
} else {
|
1107 |
-
$small_keywords[] = strtolower($word);
|
1108 |
-
}*/
|
1109 |
-
}
|
1110 |
-
$keywords_ar = array_unique($uni_keywords);
|
1111 |
-
return implode(',', $keywords_ar);
|
1112 |
-
}
|
1113 |
-
|
1114 |
-
function get_url($url) {
|
1115 |
-
if (function_exists('file_get_contents')) {
|
1116 |
-
$file = file_get_contents($url);
|
1117 |
-
} else {
|
1118 |
-
$curl = curl_init($url);
|
1119 |
-
curl_setopt($curl, CURLOPT_HEADER, 0);
|
1120 |
-
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
1121 |
-
$file = curl_exec($curl);
|
1122 |
-
curl_close($curl);
|
1123 |
-
}
|
1124 |
-
return $file;
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
function add_footer_link()
|
1128 |
-
{
|
1129 |
-
?>
|
1130 |
-
<small>SEO Powered by <a href="http://techblissonline.com/platinum-seo-pack/" target="_blank">Platinum SEO</a> from <a href="http://techblissonline.com/" target="_blank">Techblissonline</a></small>
|
1131 |
-
<?php
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
function log($message) {
|
1135 |
-
if ($this->do_log) {
|
1136 |
-
error_log(date('Y-m-d H:i:s') . " " . $message . "\n", 3, $this->log_file);
|
1137 |
-
}
|
1138 |
-
}
|
1139 |
-
|
1140 |
-
function download_newest_version() {
|
1141 |
-
$success = true;
|
1142 |
-
$file_content = $this->get_url($this->upgrade_url);
|
1143 |
-
if ($file_content === false) {
|
1144 |
-
$this->upgrade_error = sprintf(__("Could not download distribution (%s)"), $this->upgrade_url);
|
1145 |
-
$success = false;
|
1146 |
-
} else if (strlen($file_content) < 100) {
|
1147 |
-
$this->upgrade_error = sprintf(__("Could not download distribution (%s): %s"), $this->upgrade_url, $file_content);
|
1148 |
-
$success = false;
|
1149 |
-
} else {
|
1150 |
-
$this->log(sprintf("filesize of download ZIP: %d", strlen($file_content)));
|
1151 |
-
$fh = @fopen($this->upgrade_filename, 'w');
|
1152 |
-
$this->log("fh is $fh");
|
1153 |
-
if (!$fh) {
|
1154 |
-
$this->upgrade_error = sprintf(__("Could not open %s for writing"), $this->upgrade_filename);
|
1155 |
-
$this->upgrade_error .= "<br />";
|
1156 |
-
$this->upgrade_error .= sprintf(__("Please make sure %s is writable"), $this->upgrade_folder);
|
1157 |
-
$success = false;
|
1158 |
-
} else {
|
1159 |
-
$bytes_written = @fwrite($fh, $file_content);
|
1160 |
-
$this->log("wrote $bytes_written bytes");
|
1161 |
-
if (!$bytes_written) {
|
1162 |
-
$this->upgrade_error = sprintf(__("Could not write to %s"), $this->upgrade_filename);
|
1163 |
-
$success = false;
|
1164 |
-
}
|
1165 |
-
}
|
1166 |
-
if ($success) {
|
1167 |
-
fclose($fh);
|
1168 |
-
}
|
1169 |
-
}
|
1170 |
-
return $success;
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
function install_newest_version() {
|
1174 |
-
$success = $this->download_newest_version();
|
1175 |
-
if ($success) {
|
1176 |
-
$success = $this->extract_plugin();
|
1177 |
-
unlink($this->upgrade_filename);
|
1178 |
-
}
|
1179 |
-
return $success;
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
function extract_plugin() {
|
1183 |
-
if (!class_exists('PclZip')) {
|
1184 |
-
require_once ('pclzip.lib.php');
|
1185 |
-
}
|
1186 |
-
$archive = new PclZip($this->upgrade_filename);
|
1187 |
-
$files = $archive->extract(PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $this->upgrade_folder);
|
1188 |
-
$this->log("files is $files");
|
1189 |
-
if (is_array($files)) {
|
1190 |
-
$num_extracted = sizeof($files);
|
1191 |
-
$this->log("extracted $num_extracted files to $this->upgrade_folder");
|
1192 |
-
$this->log(print_r($files, true));
|
1193 |
-
return true;
|
1194 |
-
} else {
|
1195 |
-
$this->upgrade_error = $archive->errorInfo();
|
1196 |
-
return false;
|
1197 |
-
}
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
/** crude approximization of whether current user is an admin */
|
1201 |
-
function is_admin() {
|
1202 |
-
return current_user_can('level_8');
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
function add_meta_index_tags($id) {
|
1206 |
-
$awmp_edit = $_POST["psp_edit"];
|
1207 |
-
$nonce = $_POST['psp-meta-nonce'];
|
1208 |
-
if (isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'psp-meta-nonce')) {
|
1209 |
-
$keywords = $_POST["psp_keywords"];
|
1210 |
-
$description = $_POST["psp_description"];
|
1211 |
-
$title = $_POST["psp_title"];
|
1212 |
-
//$pspmeta = $_POST["psp_robotsmeta"];
|
1213 |
-
//$psp_disable = $_POST["psp_disable"];
|
1214 |
-
//$psp_noarchive = $_POST["psp_noarchive"];
|
1215 |
-
//$psp_nosnippet = $_POST["psp_nosnippet"];
|
1216 |
-
|
1217 |
-
delete_post_meta($id, 'keywords');
|
1218 |
-
delete_post_meta($id, 'description');
|
1219 |
-
delete_post_meta($id, 'title');
|
1220 |
-
if ($this->is_admin()) {
|
1221 |
-
delete_post_meta($id, 'psp_disable');
|
1222 |
-
delete_post_meta($id, 'robotsmeta');
|
1223 |
-
delete_post_meta($id, 'psp_notitlerewrite');
|
1224 |
-
delete_post_meta($id, 'psp_notitleformat');
|
1225 |
-
delete_post_meta($id, 'psp_noarchive');
|
1226 |
-
delete_post_meta($id, 'psp_nosnippet');
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
if (isset($keywords) && !empty($keywords)) {
|
1230 |
-
add_post_meta($id, 'keywords', $keywords);
|
1231 |
-
}
|
1232 |
-
if (isset($description) && !empty($description)) {
|
1233 |
-
add_post_meta($id, 'description', $description);
|
1234 |
-
}
|
1235 |
-
if (isset($title) && !empty($title)) {
|
1236 |
-
add_post_meta($id, 'title', $title);
|
1237 |
-
}
|
1238 |
-
if ($this->is_admin()) {
|
1239 |
-
|
1240 |
-
$pspmeta = $_POST["psp_robotsmeta"];
|
1241 |
-
$psp_disable = $_POST["psp_disable"];
|
1242 |
-
$psp_notitlerewrite = $_POST["psp_notitlerewrite"];
|
1243 |
-
$psp_notitleformat = $_POST["psp_notitleformat"];
|
1244 |
-
$psp_noarchive = $_POST["psp_noarchive"];
|
1245 |
-
$psp_nosnippet = $_POST["psp_nosnippet"];
|
1246 |
-
|
1247 |
-
if (isset($psp_disable) && !empty($psp_disable)) {
|
1248 |
-
|
1249 |
-
add_post_meta($id, 'psp_disable', $psp_disable);
|
1250 |
-
}
|
1251 |
-
if (isset($psp_notitlerewrite) && !empty($psp_notitlerewrite)) {
|
1252 |
-
|
1253 |
-
add_post_meta($id, 'psp_notitlerewrite', $psp_notitlerewrite);
|
1254 |
-
}
|
1255 |
-
if (isset($psp_notitleformat) && !empty($psp_notitleformat)) {
|
1256 |
-
|
1257 |
-
add_post_meta($id, 'psp_notitleformat', $psp_notitleformat);
|
1258 |
-
}
|
1259 |
-
if (isset($pspmeta) && !empty($pspmeta)) {
|
1260 |
-
|
1261 |
-
add_post_meta($id, 'robotsmeta', $pspmeta);
|
1262 |
-
}
|
1263 |
-
if (isset($psp_noarchive) && !empty($psp_noarchive)) {
|
1264 |
-
|
1265 |
-
add_post_meta($id, 'psp_noarchive', $psp_noarchive);
|
1266 |
-
}
|
1267 |
-
if (isset($psp_nosnippet) && !empty($psp_nosnippet)) {
|
1268 |
-
|
1269 |
-
add_post_meta($id, 'psp_nosnippet', $psp_nosnippet);
|
1270 |
-
}
|
1271 |
-
}
|
1272 |
-
}
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
function psp_form_to_add_metatags() {
|
1276 |
-
global $post;
|
1277 |
-
$post_id = $post;
|
1278 |
-
if (is_object($post_id)) {
|
1279 |
-
$post_id = $post_id->ID;
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
$robotsmeta = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'robotsmeta', true)));
|
1283 |
-
if (isset($robotsmeta) && empty($robotsmeta)) {
|
1284 |
-
$robotsmeta = "index,follow";
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
$keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'keywords', true)));
|
1288 |
-
$title = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'title', true)));
|
1289 |
-
$description = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'description', true)));
|
1290 |
-
$psp_meta = $robotsmeta;
|
1291 |
-
$psp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'psp_disable', true)));
|
1292 |
-
$psp_notitlerewrite = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'psp_notitlerewrite', true)));
|
1293 |
-
$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'psp_notitleformat', true)));
|
1294 |
-
$psp_noarchive = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'psp_noarchive', true)));
|
1295 |
-
$psp_nosnippet = htmlspecialchars(stripcslashes(get_post_meta($post_id, 'psp_nosnippet', true)));
|
1296 |
-
?>
|
1297 |
-
<SCRIPT LANGUAGE="JavaScript">
|
1298 |
-
<!-- Begin
|
1299 |
-
function countChars(field,cntfield) {
|
1300 |
-
cntfield.value = field.value.length;
|
1301 |
-
}
|
1302 |
-
// End -->
|
1303 |
-
</script>
|
1304 |
-
|
1305 |
-
<?php if ((substr($this->wp_version, 0, 3) < '2.5')) { ?>
|
1306 |
-
<div class="dbx-b-ox-wrapper">
|
1307 |
-
<fieldset id="seodiv" class="dbx-box">
|
1308 |
-
<div class="dbx-h-andle-wrapper">
|
1309 |
-
<h3 class="dbx-handle"><?php _e('Platinum SEO Pack', 'platinum_seo_pack') ?></h3>
|
1310 |
-
</div>
|
1311 |
-
<div class="dbx-c-ontent-wrapper">
|
1312 |
-
<div class="dbx-content">
|
1313 |
-
<?php } ?>
|
1314 |
-
|
1315 |
-
<a target="__blank" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('Click here for Support', 'platinum_seo_pack') ?></a> |
|
1316 |
-
<a target="__blank" href="http://techblissonline.com/meta-robots-tag-indexfollownoindexnofollow-in-platinum-seo-plugin/"><?php _e('Know about the meta tags', 'platinum_seo_pack') ?></a>
|
1317 |
-
<input value="psp_edit" type="hidden" name="psp_edit" />
|
1318 |
-
<table style="margin-bottom:40px">
|
1319 |
-
<tr>
|
1320 |
-
<th style="text-align:left;" colspan="2">
|
1321 |
-
</th>
|
1322 |
-
</tr>
|
1323 |
-
<tr>
|
1324 |
-
<th scope="row" style="text-align:right;"><?php _e('Title:', 'platinum_seo_pack') ?></th>
|
1325 |
-
<td><input value="<?php echo $title ?>" type="text" name="psp_title" id="psp_title" size="62"/></td>
|
1326 |
-
</tr>
|
1327 |
-
<tr>
|
1328 |
-
<th scope="row" style="text-align:right;"><?php _e('Description:', 'platinum_seo_pack') ?></th>
|
1329 |
-
<td><textarea name="psp_description" id="psp_description" rows="1" cols="60"
|
1330 |
-
onKeyDown="countChars(document.post.psp_description,document.post.length1)"
|
1331 |
-
onKeyUp="countChars(document.post.psp_description,document.post.length1)"><?php echo $description ?></textarea><br />
|
1332 |
-
<input readonly type="text" name="length1" size="3" maxlength="3" value="<?php echo strlen($description);?>" />
|
1333 |
-
<?php _e(' characters. Most search engines use a maximum of 160 chars for the description.', 'platinum_seo_pack') ?>
|
1334 |
-
</td>
|
1335 |
-
</tr>
|
1336 |
-
<tr>
|
1337 |
-
<th scope="row" style="text-align:left;"><?php _e('Keywords (comma separated):', 'platinum_seo_pack') ?></th>
|
1338 |
-
<td><input value="<?php echo $keywords ?>" type="text" name="psp_keywords" size="62"/></td>
|
1339 |
-
</tr>
|
1340 |
-
<input type="hidden" name="psp-meta-nonce" value="<?php echo wp_create_nonce('psp-meta-nonce') ?>" />
|
1341 |
-
|
1342 |
-
<?php if ( $this->is_admin() ) { ?>
|
1343 |
-
<tr>
|
1344 |
-
<th scope="row" style="text-align:left;"><?php _e('PSP Meta Index and Nofollow Tags:', 'platinum_seo_pack') ?></th>
|
1345 |
-
<td><label for="meta_robots_index_follow" class="selectit"><input id="meta_robots_index_follow" name="psp_robotsmeta" type="radio" value="index,follow" <?php if ($psp_meta == "index,follow") echo 'checked="1"'?>/>index, follow</label>
|
1346 |
-
<label for="meta_robots_index_nofollow" class="selectit"><input id="meta_robots_index_nofollow" name="psp_robotsmeta" type="radio" value="index,nofollow" <?php if ($psp_meta == "index,nofollow") echo 'checked="1"'?>/>index, nofollow</label>
|
1347 |
-
<label for="meta_robots_noindex_follow" class="selectit"><input id="meta_robots_noindex_follow" name="psp_robotsmeta" type="radio" value="noindex,follow" <?php if ($psp_meta == "noindex,follow") echo 'checked="1"'?>/>noindex, follow</label>
|
1348 |
-
<label for="meta_robots_noindex_nofollow" class="selectit"><input id="meta_robots_noindex_nofollow" name="psp_robotsmeta" type="radio" value="noindex,nofollow" <?php if ($psp_meta == "noindex,nofollow") echo 'checked="1"'?>/>noindex, nofollow</label></td>
|
1349 |
-
</tr>
|
1350 |
-
<?php } ?>
|
1351 |
-
|
1352 |
-
<?php if ($this->is_admin()) { ?>
|
1353 |
-
<tr>
|
1354 |
-
<th scope="row" style="text-align:left; vertical-align:top;">
|
1355 |
-
<?php _e('NOARCHIVE this page/post:', 'platinum_seo_pack')?>
|
1356 |
-
</th>
|
1357 |
-
<td>
|
1358 |
-
<input type="checkbox" name="psp_noarchive" <?php if ($psp_noarchive) echo "checked=\"1\""; ?>/>
|
1359 |
-
</td>
|
1360 |
-
</tr>
|
1361 |
-
<tr>
|
1362 |
-
</tr>
|
1363 |
-
<tr>
|
1364 |
-
<th scope="row" style="text-align:left; vertical-align:top;">
|
1365 |
-
<?php _e('NOSNIPPET of this page/post:', 'platinum_seo_pack')?>
|
1366 |
-
</th>
|
1367 |
-
<td>
|
1368 |
-
<input type="checkbox" name="psp_nosnippet" <?php if ($psp_nosnippet) echo "checked=\"1\""; ?>/>
|
1369 |
-
</td>
|
1370 |
-
</tr>
|
1371 |
-
<tr>
|
1372 |
-
</tr>
|
1373 |
-
<tr>
|
1374 |
-
<th scope="row" style="text-align:left; vertical-align:top;">
|
1375 |
-
<?php _e('Disable title rewrite on this page/post:', 'platinum_seo_pack')?>
|
1376 |
-
</th>
|
1377 |
-
<td>
|
1378 |
-
<input type="checkbox" name="psp_notitlerewrite" <?php if ($psp_notitlerewrite) echo "checked=\"1\""; ?>/>
|
1379 |
-
</td>
|
1380 |
-
</tr>
|
1381 |
-
<tr>
|
1382 |
-
</tr>
|
1383 |
-
<tr>
|
1384 |
-
<th scope="row" style="text-align:left; vertical-align:top;">
|
1385 |
-
<?php _e('Disable PSP title format on this page/post:', 'platinum_seo_pack')?>
|
1386 |
-
</th>
|
1387 |
-
<td>
|
1388 |
-
<input type="checkbox" name="psp_notitleformat" <?php if ($psp_notitleformat) echo "checked=\"1\""; ?>/>
|
1389 |
-
</td>
|
1390 |
-
</tr>
|
1391 |
-
<tr>
|
1392 |
-
</tr>
|
1393 |
-
<tr>
|
1394 |
-
<th scope="row" style="text-align:left; vertical-align:top;">
|
1395 |
-
<?php _e('Disable PSP on this page/post:', 'platinum_seo_pack')?>
|
1396 |
-
</th>
|
1397 |
-
<td>
|
1398 |
-
<input type="checkbox" name="psp_disable" <?php if ($psp_disable) echo "checked=\"1\""; ?>/>
|
1399 |
-
</td>
|
1400 |
-
</tr>
|
1401 |
-
<?php } ?>
|
1402 |
-
|
1403 |
-
</table>
|
1404 |
-
|
1405 |
-
<?php if ((substr($this->wp_version, 0, 3) < '2.5')) { ?>
|
1406 |
-
</div>
|
1407 |
-
</fieldset>
|
1408 |
-
</div>
|
1409 |
-
<?php } ?>
|
1410 |
-
<?php
|
1411 |
-
}
|
1412 |
-
|
1413 |
-
function admin_menu() {
|
1414 |
-
$file = __FILE__;
|
1415 |
-
$filem = 'platinum-seo-pack/aioseop-migrate.php';
|
1416 |
-
|
1417 |
-
// hack for 1.5
|
1418 |
-
if (substr($this->wp_version, 0, 3) == '1.5') {
|
1419 |
-
$file = 'platinum-seo-pack/platinum_seo_pack.php';
|
1420 |
-
}
|
1421 |
-
//add_management_page(__('Platinum SEO Title', 'platinum_seo_pack'), __('Platinum SEO', 'platinum_seo_pack'), 10, $file, array($this, 'management_panel'));
|
1422 |
-
//add_submenu_page('options-general.php', __('Platinum SEO', 'platinum_seo_pack'), __('Platinum SEO', 'platinum_seo_pack'), 10, $file, array($this, 'options_panel'));
|
1423 |
-
add_menu_page(__('Platinum SEO', 'platinum_seo_pack'), __('Platinum SEO', 'platinum_seo_pack'), 10, $file, array($this, 'options_panel'));
|
1424 |
-
add_submenu_page($file, __('Migrate from All in one SEO', 'platinum_seo_pack'), __('Migrate from All in one SEO', 'platinum_seo_pack'), 10, $filem);
|
1425 |
-
if( function_exists( 'add_meta_box' )) {
|
1426 |
-
add_meta_box( 'postpsp', __( 'Platinum SEO Pack', 'platinum_seo_pack' ),
|
1427 |
-
array($this, 'psp_form_to_add_metatags'), 'post', 'advanced' );
|
1428 |
-
add_meta_box( 'postpsp', __( 'Platinum SEO Pack', 'platinum_seo_pack' ),
|
1429 |
-
array($this, 'psp_form_to_add_metatags'), 'page', 'advanced' );
|
1430 |
-
} else {
|
1431 |
-
add_action('dbx_post_advanced', 'psp_form_to_add_metatags' );
|
1432 |
-
add_action('dbx_page_advanced', 'psp_form_to_add_metatags' );
|
1433 |
-
}
|
1434 |
-
}
|
1435 |
-
|
1436 |
-
function management_panel() {
|
1437 |
-
$message = null;
|
1438 |
-
$base_url = "edit.php?page=" . __FILE__;
|
1439 |
-
//echo($base_url);
|
1440 |
-
$type = $_REQUEST['type'];
|
1441 |
-
if (!isset($type)) {
|
1442 |
-
$type = "posts";
|
1443 |
-
}
|
1444 |
-
|
1445 |
-
?>
|
1446 |
-
|
1447 |
-
<ul class="psp_menu">
|
1448 |
-
<li><a href="<?php echo $base_url ?>&type=posts">Posts</a>
|
1449 |
-
</li>
|
1450 |
-
<li><a href="<?php echo $base_url ?>&type=pages">Pages</a>
|
1451 |
-
</li>
|
1452 |
-
</ul>
|
1453 |
-
|
1454 |
-
<?php
|
1455 |
-
|
1456 |
-
if ($type == "posts") {
|
1457 |
-
echo("posts");
|
1458 |
-
} elseif ($type == "pages") {
|
1459 |
-
echo("pages");
|
1460 |
-
}
|
1461 |
-
|
1462 |
-
}
|
1463 |
-
|
1464 |
-
function options_panel() {
|
1465 |
-
$message = null;
|
1466 |
-
$message_updated = __("Platinum SEO Options Updated.", 'platinum_seo_pack');
|
1467 |
-
|
1468 |
-
// update options
|
1469 |
-
if ($_POST['action'] && $_POST['action'] == 'psp_update') {
|
1470 |
-
$nonce = $_POST['psp-options-nonce'];
|
1471 |
-
if (!wp_verify_nonce($nonce, 'psp-options-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress');
|
1472 |
-
$message = $message_updated;
|
1473 |
-
update_option('aiosp_home_title', $_POST['psp_home_title']);
|
1474 |
-
update_option('aiosp_home_description', $_POST['psp_home_description']);
|
1475 |
-
update_option('aiosp_home_keywords', $_POST['psp_home_keywords']);
|
1476 |
-
update_option('psp_max_words_excerpt', $_POST['psp_max_words_excerpt']);
|
1477 |
-
update_option('psp_canonical', $_POST['psp_canonical']);
|
1478 |
-
update_option('aiosp_rewrite_titles', $_POST['psp_rewrite_titles']);
|
1479 |
-
update_option('aiosp_post_title_format', $_POST['psp_post_title_format']);
|
1480 |
-
update_option('aiosp_page_title_format', $_POST['psp_page_title_format']);
|
1481 |
-
update_option('aiosp_category_title_format', $_POST['psp_category_title_format']);
|
1482 |
-
update_option('psp_taxonomy_title_format', $_POST['psp_taxonomy_title_format']); // added by Aidan - sww.co.nz
|
1483 |
-
update_option('aiosp_archive_title_format', $_POST['psp_archive_title_format']);
|
1484 |
-
update_option('aiosp_tag_title_format', $_POST['psp_tag_title_format']);
|
1485 |
-
update_option('aiosp_search_title_format', $_POST['psp_search_title_format']);
|
1486 |
-
update_option('aiosp_description_format', $_POST['psp_description_format']);
|
1487 |
-
update_option('aiosp_404_title_format', $_POST['psp_404_title_format']);
|
1488 |
-
update_option('aiosp_paged_format', $_POST['psp_paged_format']);
|
1489 |
-
update_option('aiosp_use_categories', $_POST['psp_use_categories']);
|
1490 |
-
update_option('psp_use_tags', $_POST['psp_use_tags']);
|
1491 |
-
update_option('psp_category_noindex', $_POST['psp_category_noindex']);
|
1492 |
-
update_option('psp_archive_noindex', $_POST['psp_archive_noindex']);
|
1493 |
-
update_option('psp_tags_noindex', $_POST['psp_tags_noindex']);
|
1494 |
-
update_option('psp_comnts_pages_noindex', $_POST['psp_comnts_pages_noindex']);
|
1495 |
-
update_option('psp_comnts_feeds_noindex', $_POST['psp_comnts_feeds_noindex']);
|
1496 |
-
update_option('psp_rss_feeds_noindex', $_POST['psp_rss_feeds_noindex']);
|
1497 |
-
update_option('psp_search_results_noindex', $_POST['psp_search_results_noindex']);
|
1498 |
-
update_option('psp_sub_pages_home_noindex', $_POST['psp_sub_pages_home_noindex']);
|
1499 |
-
update_option('psp_author_archives_noindex', $_POST['psp_author_archives_noindex']);
|
1500 |
-
update_option('psp_noodp_metatag', $_POST['psp_noodp_metatag']);
|
1501 |
-
update_option('psp_noydir_metatag', $_POST['psp_noydir_metatag']);
|
1502 |
-
update_option('psp_nofollow_cat_pages', $_POST['psp_nofollow_cat_pages']);
|
1503 |
-
update_option('psp_nofollow_cat_posts', $_POST['psp_nofollow_cat_posts']);
|
1504 |
-
update_option('psp_nofollow_arc_pages', $_POST['psp_nofollow_arc_pages']);
|
1505 |
-
update_option('psp_nofollow_arc_posts', $_POST['psp_nofollow_arc_posts']);
|
1506 |
-
update_option('psp_nofollow_ext_links', $_POST['psp_nofollow_ext_links']);
|
1507 |
-
update_option('psp_nofollow_login_reg', $_POST['psp_nofollow_login_reg']);
|
1508 |
-
update_option('psp_nofollow_tag_pages', $_POST['psp_nofollow_tag_pages']);
|
1509 |
-
update_option('psp_permalink_redirect', $_POST['psp_permalink_redirect']);
|
1510 |
-
update_option('aiosp_generate_descriptions', $_POST['psp_generate_descriptions']);
|
1511 |
-
update_option('psp_debug_info', $_POST['psp_debug_info']);
|
1512 |
-
update_option('aiosp_post_meta_tags', $_POST['psp_post_meta_tags']);
|
1513 |
-
update_option('aiosp_page_meta_tags', $_POST['psp_page_meta_tags']);
|
1514 |
-
update_option('aiosp_home_meta_tags', $_POST['psp_home_meta_tags']);
|
1515 |
-
update_option('aiosp_do_log', $_POST['psp_do_log']);
|
1516 |
-
update_option('psp_link_home', $_POST['psp_link_home']);
|
1517 |
-
if (function_exists('wp_cache_flush')) {
|
1518 |
-
wp_cache_flush();
|
1519 |
-
}
|
1520 |
-
} elseif ($_POST['psp_upgrade']) {
|
1521 |
-
$message = __("Upgraded to newest version. Please revisit the options page to ensure you see the newest version.", 'platinum_seo_pack');
|
1522 |
-
$success = $this->install_newest_version();
|
1523 |
-
if (!$success) {
|
1524 |
-
$message = __("Upgrade failed", 'platinum_seo_pack');
|
1525 |
-
if (isset($this->upgrade_error) && !empty($this->upgrade_error)) {
|
1526 |
-
$message .= ": " . $this->upgrade_error;
|
1527 |
-
} else {
|
1528 |
-
$message .= ".";
|
1529 |
-
}
|
1530 |
-
}
|
1531 |
-
}
|
1532 |
-
|
1533 |
-
?>
|
1534 |
-
<?php if ($message) : ?>
|
1535 |
-
<div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
|
1536 |
-
<?php endif; ?>
|
1537 |
-
<div id="dropmessage" class="updated" style="display:none;"></div>
|
1538 |
-
<div class="wrap">
|
1539 |
-
<h2><?php _e('Platinum SEO Plugin Options', 'platinum_seo_pack'); ?></h2>
|
1540 |
-
<p>
|
1541 |
-
<?php _e("This is version ", 'platinum_seo_pack') ?><?php _e("$this->version ", 'platinum_seo_pack') ?>
|
1542 |
-
|
1543 |
-
| <a target="_blank" title="<?php _e('FAQ', 'platinum_seo_pack') ?>"
|
1544 |
-
href="http://techblissonline.com/platinum-seo-pack-faq/"><?php _e('FAQ', 'platinum_seo_pack') ?></a>
|
1545 |
-
| <a target="_blank" title="<?php _e('Platinum SEO Plugin Feedback', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('Feedback', 'platinum_seo_pack') ?></a>
|
1546 |
-
| <a target="_blank" title="<?php _e('Platinum SEO - What is new in version 1.3.4?', 'platinum_seo_pack') ?>" href="http://techblissonline.com/platinum-seo-pack/"><?php _e('What is new in version 1.3.4?', 'platinum_seo_pack') ?></a>
|
1547 |
-
| <a target="_blank" title="<?php _e('Platinum SEO - Smart Options, Smart Benefits', 'platinum_seo_pack') ?>" href="http://techblissonline.com/wordpress-seo-plugin-smart-options-benefits/"><?php _e('Wordpress SEO options', 'platinum_seo_pack') ?></a>
|
1548 |
-
| <a target="_blank" title="<?php _e('Donations for Platinum SEO Plugin', 'platinum_seo_pack') ?>" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rrajeshbab%40gmail%2ecom&item_name=Platinum%20SEO%20plugin%20development%20and%20support%20expenses&item_number=1&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=IN&bn=PP%2dDonationsBF&charset=UTF%2d8"><?php _e('Please Donate', 'platinum_seo_pack') ?></a>
|
1549 |
-
| <a target="_blank" title="<?php _e('Save Bandwidth with Chennai Central Plugin', 'platinum_seo_pack') ?>" href="http://techblissonline.com/save-bandwidth/"><?php _e('Save Bandwidth with Chennai Central Plugin', 'platinum_seo_pack') ?></a>
|
1550 |
-
</p>
|
1551 |
-
|
1552 |
-
<script type="text/javascript">
|
1553 |
-
<!--
|
1554 |
-
function toggleVisibility(id) {
|
1555 |
-
var e = document.getElementById(id);
|
1556 |
-
if(e.style.display == 'block')
|
1557 |
-
e.style.display = 'none';
|
1558 |
-
else
|
1559 |
-
e.style.display = 'block';
|
1560 |
-
}
|
1561 |
-
//-->
|
1562 |
-
</script>
|
1563 |
-
<h3><?php _e('Pls. write a review or choose to link back, if you cannot donate', 'platinum_seo_pack') ?></h3>
|
1564 |
-
<h3><?php _e('Click on option titles to get help!', 'platinum_seo_pack') ?></h3>
|
1565 |
-
|
1566 |
-
<form name="dofollow" action="" method="post">
|
1567 |
-
<table class="form-table">
|
1568 |
-
|
1569 |
-
<tr>
|
1570 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1571 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_permalink_redirect_tip');">
|
1572 |
-
<?php _e('Automatically do 301 redirects for permalink changes:', 'platinum_seo_pack')?>
|
1573 |
-
</a>
|
1574 |
-
</td>
|
1575 |
-
<td>
|
1576 |
-
<input type="checkbox" name="psp_permalink_redirect" <?php if (get_option('psp_permalink_redirect')) echo "checked=\"1\""; ?>/>
|
1577 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_permalink_redirect_tip">
|
1578 |
-
<?php
|
1579 |
-
_e('Check this to Automatically do 301 redirects for any permalink changes', 'platinum_seo_pack');
|
1580 |
-
?>
|
1581 |
-
</div>
|
1582 |
-
</td>
|
1583 |
-
</tr>
|
1584 |
-
|
1585 |
-
<tr>
|
1586 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1587 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_home_title_tip');">
|
1588 |
-
<?php _e('Home Title:', 'platinum_seo_pack')?>
|
1589 |
-
</a>
|
1590 |
-
</td>
|
1591 |
-
<td>
|
1592 |
-
<textarea cols="57" rows="2" name="psp_home_title"><?php echo stripcslashes(get_option('aiosp_home_title')); ?></textarea>
|
1593 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_home_title_tip">
|
1594 |
-
<?php
|
1595 |
-
_e('As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used.', 'platinum_seo_pack');
|
1596 |
-
?>
|
1597 |
-
</div>
|
1598 |
-
</td>
|
1599 |
-
</tr>
|
1600 |
-
|
1601 |
-
<tr>
|
1602 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1603 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_home_description_tip');">
|
1604 |
-
<?php _e('Home Description:', 'platinum_seo_pack')?>
|
1605 |
-
</a>
|
1606 |
-
</td>
|
1607 |
-
<td>
|
1608 |
-
<textarea cols="57" rows="2" name="psp_home_description"><?php echo stripcslashes(get_option('aiosp_home_description')); ?></textarea>
|
1609 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_home_description_tip">
|
1610 |
-
<?php
|
1611 |
-
_e('The META description for your homepage. The default is no META description, if this is not set.', 'platinum_seo_pack');
|
1612 |
-
?>
|
1613 |
-
</div>
|
1614 |
-
</td>
|
1615 |
-
</tr>
|
1616 |
-
|
1617 |
-
<tr>
|
1618 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1619 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_home_keywords_tip');">
|
1620 |
-
<?php _e('Home Keywords (comma separated):', 'platinum_seo_pack')?>
|
1621 |
-
</a>
|
1622 |
-
</td>
|
1623 |
-
<td>
|
1624 |
-
<textarea cols="57" rows="2" name="psp_home_keywords"><?php echo stripcslashes(get_option('aiosp_home_keywords')); ?></textarea>
|
1625 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_home_keywords_tip">
|
1626 |
-
<?php
|
1627 |
-
_e("A comma separated list of the most important keywords for your site homepage. Use optimal number of keywords.", 'platinum_seo_pack');
|
1628 |
-
?>
|
1629 |
-
</div>
|
1630 |
-
</td>
|
1631 |
-
</tr>
|
1632 |
-
|
1633 |
-
<tr>
|
1634 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1635 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_canonical_tip');">
|
1636 |
-
<?php _e('Canonical URLs:', 'platinum_seo_pack')?>
|
1637 |
-
</a>
|
1638 |
-
</td>
|
1639 |
-
<td>
|
1640 |
-
<input type="checkbox" name="psp_canonical" <?php if (get_option('psp_canonical')) echo "checked=\"1\""; ?>/>
|
1641 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_canonical_tip">
|
1642 |
-
<?php
|
1643 |
-
_e("Choose this option to set up canonical URLs for your Home page, Single Post, Category and Tag Pages.", 'platinum_seo_pack');
|
1644 |
-
?>
|
1645 |
-
</div>
|
1646 |
-
</td>
|
1647 |
-
</tr>
|
1648 |
-
|
1649 |
-
<tr>
|
1650 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1651 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_rewrite_titles_tip');">
|
1652 |
-
<?php _e('Rewrite Titles:', 'platinum_seo_pack')?>
|
1653 |
-
</a>
|
1654 |
-
</td>
|
1655 |
-
<td>
|
1656 |
-
<input type="checkbox" name="psp_rewrite_titles" <?php if (get_option('aiosp_rewrite_titles')) echo "checked=\"1\""; ?>/>
|
1657 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_rewrite_titles_tip">
|
1658 |
-
<?php
|
1659 |
-
_e("Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: Blog Archive >> Blog Name >> Post Title. But this is far from optimal. With the default post title format, Rewrite Title rewrites this to Post Title | Blog Name. If you have manually defined a title (in one of the text fields for Platinum SEO Plugin input) this will become the title of your post in the format string.", 'platinum_seo_pack');
|
1660 |
-
?>
|
1661 |
-
</div>
|
1662 |
-
</td>
|
1663 |
-
</tr>
|
1664 |
-
|
1665 |
-
<tr>
|
1666 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1667 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_post_title_format_tip');">
|
1668 |
-
<?php _e('Post Title Format:', 'platinum_seo_pack')?>
|
1669 |
-
</a>
|
1670 |
-
</td>
|
1671 |
-
<td>
|
1672 |
-
<input size="59" name="psp_post_title_format" value="<?php echo stripcslashes(get_option('aiosp_post_title_format')); ?>"/>
|
1673 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_post_title_format_tip">
|
1674 |
-
<?php
|
1675 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1676 |
-
echo('<ul>');
|
1677 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1678 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1679 |
-
echo('<li>'); _e('%post_title% - The original title of the post', 'platinum_seo_pack'); echo('</li>');
|
1680 |
-
echo('<li>'); _e('%category_title% - The (main) category of the post', 'platinum_seo_pack'); echo('</li>');
|
1681 |
-
echo('<li>'); _e('%category% - Alias for %category_title%', 'platinum_seo_pack'); echo('</li>');
|
1682 |
-
echo('<li>'); _e("%post_author_login% - This post author's login", 'platinum_seo_pack'); echo('</li>');
|
1683 |
-
echo('<li>'); _e("%post_author_nicename% - This post author's nicename", 'platinum_seo_pack'); echo('</li>');
|
1684 |
-
echo('<li>'); _e("%post_author_firstname% - This post author's first name (capitalized)", 'platinum_seo_pack'); echo('</li>');
|
1685 |
-
echo('<li>'); _e("%post_author_lastname% - This post author's last name (capitalized)", 'platinum_seo_pack'); echo('</li>');
|
1686 |
-
echo('</ul>');
|
1687 |
-
?>
|
1688 |
-
</div>
|
1689 |
-
</td>
|
1690 |
-
</tr>
|
1691 |
-
|
1692 |
-
<tr>
|
1693 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1694 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_page_title_format_tip');">
|
1695 |
-
<?php _e('Page Title Format:', 'platinum_seo_pack')?>
|
1696 |
-
</a>
|
1697 |
-
</td>
|
1698 |
-
<td>
|
1699 |
-
<input size="59" name="psp_page_title_format" value="<?php echo stripcslashes(get_option('aiosp_page_title_format')); ?>"/>
|
1700 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_page_title_format_tip">
|
1701 |
-
<?php
|
1702 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1703 |
-
echo('<ul>');
|
1704 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1705 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1706 |
-
echo('<li>'); _e('%page_title% - The original title of the page', 'platinum_seo_pack'); echo('</li>');
|
1707 |
-
echo('<li>'); _e("%page_author_login% - This page author's login", 'platinum_seo_pack'); echo('</li>');
|
1708 |
-
echo('<li>'); _e("%page_author_nicename% - This page author's nicename", 'platinum_seo_pack'); echo('</li>');
|
1709 |
-
echo('<li>'); _e("%page_author_firstname% - This page author's first name (capitalized)", 'platinum_seo_pack'); echo('</li>');
|
1710 |
-
echo('<li>'); _e("%page_author_lastname% - This page author's last name (capitalized)", 'platinum_seo_pack'); echo('</li>');
|
1711 |
-
echo('</ul>');
|
1712 |
-
?>
|
1713 |
-
</div>
|
1714 |
-
</td>
|
1715 |
-
</tr>
|
1716 |
-
|
1717 |
-
<tr>
|
1718 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1719 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_category_title_format_tip');">
|
1720 |
-
<?php _e('Category Title Format:', 'platinum_seo_pack')?>
|
1721 |
-
</a>
|
1722 |
-
</td>
|
1723 |
-
<td>
|
1724 |
-
<input size="59" name="psp_category_title_format" value="<?php echo stripcslashes(get_option('aiosp_category_title_format')); ?>"/>
|
1725 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_category_title_format_tip">
|
1726 |
-
<?php
|
1727 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1728 |
-
echo('<ul>');
|
1729 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1730 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1731 |
-
echo('<li>'); _e('%category_title% - The original title of the category', 'platinum_seo_pack'); echo('</li>');
|
1732 |
-
echo('<li>'); _e('%category_description% - The description of the category', 'platinum_seo_pack'); echo('</li>');
|
1733 |
-
echo('</ul>');
|
1734 |
-
?>
|
1735 |
-
</div>
|
1736 |
-
</td>
|
1737 |
-
</tr>
|
1738 |
-
|
1739 |
-
<?php /* added by Aidan - sww.co.nz */ ?>
|
1740 |
-
<tr>
|
1741 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1742 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_taxonomy_title_format_tip');">
|
1743 |
-
<?php _e('Custom Taxonomy Title Format:', 'platinum_seo_pack')?>
|
1744 |
-
</a>
|
1745 |
-
</td>
|
1746 |
-
<td>
|
1747 |
-
<input size="59" name="psp_taxonomy_title_format" value="<?php echo stripcslashes(get_option('psp_taxonomy_title_format')); ?>"/>
|
1748 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_taxonomy_title_format_tip">
|
1749 |
-
<?php
|
1750 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1751 |
-
echo('<ul>');
|
1752 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1753 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1754 |
-
echo('<li>'); _e('%term% - The custom taxonomy term', 'platinum_seo_pack'); echo('</li>');
|
1755 |
-
echo('</ul>');
|
1756 |
-
?>
|
1757 |
-
</div>
|
1758 |
-
</td>
|
1759 |
-
</tr>
|
1760 |
-
|
1761 |
-
|
1762 |
-
<tr>
|
1763 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1764 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_archive_title_format_tip');">
|
1765 |
-
<?php _e('Archive Title Format:', 'platinum_seo_pack')?>
|
1766 |
-
</a>
|
1767 |
-
</td>
|
1768 |
-
<td>
|
1769 |
-
<input size="59" name="psp_archive_title_format" value="<?php echo stripcslashes(get_option('aiosp_archive_title_format')); ?>"/>
|
1770 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_archive_title_format_tip">
|
1771 |
-
<?php
|
1772 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1773 |
-
echo('<ul>');
|
1774 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1775 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1776 |
-
echo('<li>'); _e('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'platinum_seo_pack'); echo('</li>');
|
1777 |
-
echo('</ul>');
|
1778 |
-
?>
|
1779 |
-
</div>
|
1780 |
-
</td>
|
1781 |
-
</tr>
|
1782 |
-
|
1783 |
-
<tr>
|
1784 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1785 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_tag_title_format_tip');">
|
1786 |
-
<?php _e('Tag Title Format:', 'platinum_seo_pack')?>
|
1787 |
-
</a>
|
1788 |
-
</td>
|
1789 |
-
<td>
|
1790 |
-
<input size="59" name="psp_tag_title_format" value="<?php echo stripcslashes(get_option('aiosp_tag_title_format')); ?>"/>
|
1791 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_tag_title_format_tip">
|
1792 |
-
<?php
|
1793 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1794 |
-
echo('<ul>');
|
1795 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1796 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1797 |
-
echo('<li>'); _e('%tag% - The name of the tag', 'platinum_seo_pack'); echo('</li>');
|
1798 |
-
echo('</ul>');
|
1799 |
-
?>
|
1800 |
-
</div>
|
1801 |
-
</td>
|
1802 |
-
</tr>
|
1803 |
-
|
1804 |
-
<tr>
|
1805 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1806 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_search_title_format_tip');">
|
1807 |
-
<?php _e('Search Title Format:', 'platinum_seo_pack')?>
|
1808 |
-
</a>
|
1809 |
-
</td>
|
1810 |
-
<td>
|
1811 |
-
<input size="59" name="psp_search_title_format" value="<?php echo stripcslashes(get_option('aiosp_search_title_format')); ?>"/>
|
1812 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_search_title_format_tip">
|
1813 |
-
<?php
|
1814 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1815 |
-
echo('<ul>');
|
1816 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1817 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1818 |
-
echo('<li>'); _e('%search% - What was searched for', 'platinum_seo_pack'); echo('</li>');
|
1819 |
-
echo('</ul>');
|
1820 |
-
?>
|
1821 |
-
</div>
|
1822 |
-
</td>
|
1823 |
-
</tr>
|
1824 |
-
|
1825 |
-
<tr>
|
1826 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1827 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_description_format_tip');">
|
1828 |
-
<?php _e('Description Format:', 'platinum_seo_pack')?>
|
1829 |
-
</a>
|
1830 |
-
</td>
|
1831 |
-
<td>
|
1832 |
-
<input size="59" name="psp_description_format" value="<?php echo stripcslashes(get_option('aiosp_description_format')); ?>"/>
|
1833 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_description_format_tip">
|
1834 |
-
<?php
|
1835 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1836 |
-
echo('<ul>');
|
1837 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1838 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1839 |
-
echo('<li>'); _e('%description% - The original description as determined by the plugin, for e.g. the excerpt if one is set or an auto-generated one, if that option is set', 'platinum_seo_pack'); echo('</li>');
|
1840 |
-
echo('<li>'); _e('%wp_title% - The original wordpress title, for e.g. post title for posts', 'platinum_seo_pack'); echo('</li>');
|
1841 |
-
echo('</ul>');
|
1842 |
-
?>
|
1843 |
-
</div>
|
1844 |
-
</td>
|
1845 |
-
</tr>
|
1846 |
-
|
1847 |
-
<tr>
|
1848 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1849 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_404_title_format_tip');">
|
1850 |
-
<?php _e('404 Title Format:', 'platinum_seo_pack')?>
|
1851 |
-
</a>
|
1852 |
-
</td>
|
1853 |
-
<td>
|
1854 |
-
<input size="59" name="psp_404_title_format" value="<?php echo stripcslashes(get_option('aiosp_404_title_format')); ?>"/>
|
1855 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_404_title_format_tip">
|
1856 |
-
<?php
|
1857 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1858 |
-
echo('<ul>');
|
1859 |
-
echo('<li>'); _e('%blog_title% - Your blog title', 'platinum_seo_pack'); echo('</li>');
|
1860 |
-
echo('<li>'); _e('%blog_description% - Your blog description', 'platinum_seo_pack'); echo('</li>');
|
1861 |
-
echo('<li>'); _e('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'platinum_seo_pack'); echo('</li>');
|
1862 |
-
echo('<li>'); _e('%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'platinum_seo_pack'); echo('</li>');
|
1863 |
-
echo('</ul>');
|
1864 |
-
?>
|
1865 |
-
</div>
|
1866 |
-
</td>
|
1867 |
-
</tr>
|
1868 |
-
|
1869 |
-
<tr>
|
1870 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1871 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_paged_format_tip');">
|
1872 |
-
<?php _e('Paged Format:', 'platinum_seo_pack')?>
|
1873 |
-
</a>
|
1874 |
-
</td>
|
1875 |
-
<td>
|
1876 |
-
<input size="59" name="psp_paged_format" value="<?php echo stripcslashes(get_option('aiosp_paged_format')); ?>"/>
|
1877 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_paged_format_tip">
|
1878 |
-
<?php
|
1879 |
-
_e('This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages).', 'platinum_seo_pack');
|
1880 |
-
_e('The following macros are supported:', 'platinum_seo_pack');
|
1881 |
-
echo('<ul>');
|
1882 |
-
echo('<li>'); _e('%page% - The page number', 'platinum_seo_pack'); echo('</li>');
|
1883 |
-
echo('</ul>');
|
1884 |
-
?>
|
1885 |
-
</div>
|
1886 |
-
</td>
|
1887 |
-
</tr>
|
1888 |
-
|
1889 |
-
<tr>
|
1890 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1891 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_use_categories_tip');">
|
1892 |
-
<?php _e('Use Categories for META keywords:', 'platinum_seo_pack')?>
|
1893 |
-
</td>
|
1894 |
-
<td>
|
1895 |
-
<input type="checkbox" name="psp_use_categories" <?php if (get_option('aiosp_use_categories')) echo "checked=\"1\""; ?>/>
|
1896 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_use_categories_tip">
|
1897 |
-
<?php
|
1898 |
-
_e('Check this if you want your categories for a given post to be used as META keywords for the post (in addition to any keywords you specify on the post edit page).', 'platinum_seo_pack');
|
1899 |
-
?>
|
1900 |
-
</div>
|
1901 |
-
</td>
|
1902 |
-
</tr>
|
1903 |
-
|
1904 |
-
<tr>
|
1905 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1906 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_category_noindex_tip');">
|
1907 |
-
<?php _e('Use noindex for Categories:', 'platinum_seo_pack')?>
|
1908 |
-
</a>
|
1909 |
-
</td>
|
1910 |
-
<td>
|
1911 |
-
<input type="checkbox" name="psp_category_noindex" <?php if (get_option('psp_category_noindex')) echo "checked=\"1\""; ?>/>
|
1912 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_category_noindex_tip">
|
1913 |
-
<?php
|
1914 |
-
_e('Check this for excluding category pages from being crawled. Might help to avoid duplicate content.', 'platinum_seo_pack');
|
1915 |
-
?>
|
1916 |
-
</div>
|
1917 |
-
</td>
|
1918 |
-
</tr>
|
1919 |
-
|
1920 |
-
<tr>
|
1921 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1922 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_archive_noindex_tip');">
|
1923 |
-
<?php _e('Use noindex for Date based Archives:', 'platinum_seo_pack')?>
|
1924 |
-
</a>
|
1925 |
-
</td>
|
1926 |
-
<td>
|
1927 |
-
<input type="checkbox" name="psp_archive_noindex" <?php if (get_option('psp_archive_noindex')) echo "checked=\"1\""; ?>/>
|
1928 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_archive_noindex_tip">
|
1929 |
-
<?php
|
1930 |
-
_e('Check this for excluding date based archive pages from being crawled. Useful for avoiding duplicate content.', 'platinum_seo_pack');
|
1931 |
-
?>
|
1932 |
-
</div>
|
1933 |
-
</td>
|
1934 |
-
</tr>
|
1935 |
-
|
1936 |
-
<tr>
|
1937 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1938 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_use_tags_tip');">
|
1939 |
-
<?php _e('Use Tags for META keywords:', 'platinum_seo_pack')?>
|
1940 |
-
</td>
|
1941 |
-
<td>
|
1942 |
-
<input type="checkbox" name="psp_use_tags" <?php if (get_option('psp_use_tags')) echo "checked=\"1\""; ?>/>
|
1943 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_use_tags_tip">
|
1944 |
-
<?php
|
1945 |
-
_e('Check this if you want your tags for a given post to be used as META keywords for the post (in addition to any keywords you specify on the post edit page).', 'platinum_seo_pack');
|
1946 |
-
?>
|
1947 |
-
</div>
|
1948 |
-
</td>
|
1949 |
-
</tr>
|
1950 |
-
|
1951 |
-
<tr>
|
1952 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1953 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_tags_noindex_tip');">
|
1954 |
-
<?php _e('Use noindex for Tag Archives:', 'platinum_seo_pack')?>
|
1955 |
-
</a>
|
1956 |
-
</td>
|
1957 |
-
<td>
|
1958 |
-
<input type="checkbox" name="psp_tags_noindex" <?php if (get_option('psp_tags_noindex')) echo "checked=\"1\""; ?>/>
|
1959 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_tags_noindex_tip">
|
1960 |
-
<?php
|
1961 |
-
_e('Check this for excluding tag pages from being crawled. Might help to avoid duplicate content.', 'platinum_seo_pack');
|
1962 |
-
?>
|
1963 |
-
</div>
|
1964 |
-
</td>
|
1965 |
-
</tr>
|
1966 |
-
|
1967 |
-
<tr>
|
1968 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1969 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_comnts_pages_noindex_tip');">
|
1970 |
-
<?php _e('Use noindex for comment pages of posts(Introduced in wordpress 2.7):', 'platinum_seo_pack')?>
|
1971 |
-
</a>
|
1972 |
-
</td>
|
1973 |
-
<td>
|
1974 |
-
<input type="checkbox" name="psp_comnts_pages_noindex" <?php if (get_option('psp_comnts_pages_noindex')) echo "checked=\"1\""; ?>/>
|
1975 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_comnts_pages_noindex_tip">
|
1976 |
-
<?php
|
1977 |
-
_e('Check this for excluding comments pages from being indexed. Thereby avoid duplicate content if you wish to use Comment paging (from wordpress 2.7). Note that wordpress 2.7 creates comments pages when the option to break comments into pages is chosen in WP 2.7 under Settings-->Discussion', 'platinum_seo_pack');
|
1978 |
-
?>
|
1979 |
-
</div>
|
1980 |
-
</td>
|
1981 |
-
</tr>
|
1982 |
-
|
1983 |
-
<tr>
|
1984 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
1985 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_comnts_feeds_noindex_tip');">
|
1986 |
-
<?php _e('Use noindex for comments RSS feeds:', 'platinum_seo_pack')?>
|
1987 |
-
</a>
|
1988 |
-
</td>
|
1989 |
-
<td>
|
1990 |
-
<input type="checkbox" name="psp_comnts_feeds_noindex" <?php if (get_option('psp_comnts_feeds_noindex')) echo "checked=\"1\""; ?>/>
|
1991 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_comnts_feeds_noindex_tip">
|
1992 |
-
<?php
|
1993 |
-
_e('Check this for excluding comments RSS feeds from being indexed.', 'platinum_seo_pack');
|
1994 |
-
?>
|
1995 |
-
</div>
|
1996 |
-
</td>
|
1997 |
-
</tr>
|
1998 |
-
|
1999 |
-
<tr>
|
2000 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2001 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_rss_feeds_noindex_tip');">
|
2002 |
-
<?php _e('Use noindex for all RSS feeds:', 'platinum_seo_pack')?>
|
2003 |
-
</a>
|
2004 |
-
</td>
|
2005 |
-
<td>
|
2006 |
-
<input type="checkbox" name="psp_rss_feeds_noindex" <?php if (get_option('psp_rss_feeds_noindex')) echo "checked=\"1\""; ?>/>
|
2007 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_rss_feeds_noindex_tip">
|
2008 |
-
<?php
|
2009 |
-
_e('Check this for excluding all RSS feeds from being indexed.', 'platinum_seo_pack');
|
2010 |
-
?>
|
2011 |
-
</div>
|
2012 |
-
</td>
|
2013 |
-
</tr>
|
2014 |
-
|
2015 |
-
<tr>
|
2016 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2017 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_search_results_noindex_tip');">
|
2018 |
-
<?php _e('Use noindex for Search result pages on the site:', 'platinum_seo_pack')?>
|
2019 |
-
</a>
|
2020 |
-
</td>
|
2021 |
-
<td>
|
2022 |
-
<input type="checkbox" name="psp_search_results_noindex" <?php if (get_option('psp_search_results_noindex')) echo "checked=\"1\""; ?>/>
|
2023 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_search_results_noindex_tip">
|
2024 |
-
<?php
|
2025 |
-
_e('Check this for excluding all search result pages from being indexed.', 'platinum_seo_pack');
|
2026 |
-
?>
|
2027 |
-
</div>
|
2028 |
-
</td>
|
2029 |
-
</tr>
|
2030 |
-
|
2031 |
-
<tr>
|
2032 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2033 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_sub_pages_home_noindex_tip');">
|
2034 |
-
<?php _e('Use noindex for sub pages:', 'platinum_seo_pack')?>
|
2035 |
-
</a>
|
2036 |
-
</td>
|
2037 |
-
<td>
|
2038 |
-
<input type="checkbox" name="psp_sub_pages_home_noindex" <?php if (get_option('psp_sub_pages_home_noindex')) echo "checked=\"1\""; ?>/>
|
2039 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_sub_pages_home_noindex_tip">
|
2040 |
-
<?php
|
2041 |
-
_e('Check this for excluding all sub pages of home, categories, date based archives, tag, search and author pages from being indexed.', 'platinum_seo_pack');
|
2042 |
-
?>
|
2043 |
-
</div>
|
2044 |
-
</td>
|
2045 |
-
</tr>
|
2046 |
-
|
2047 |
-
<tr>
|
2048 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2049 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_author_archives_noindex_tip');">
|
2050 |
-
<?php _e('Use noindex for author archives:', 'platinum_seo_pack')?>
|
2051 |
-
</a>
|
2052 |
-
</td>
|
2053 |
-
<td>
|
2054 |
-
<input type="checkbox" name="psp_author_archives_noindex" <?php if (get_option('psp_author_archives_noindex')) echo "checked=\"1\""; ?>/>
|
2055 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_author_archives_noindex_tip">
|
2056 |
-
<?php
|
2057 |
-
_e('Check this for excluding author archives from being indexed.', 'platinum_seo_pack');
|
2058 |
-
?>
|
2059 |
-
</div>
|
2060 |
-
</td>
|
2061 |
-
</tr>
|
2062 |
-
|
2063 |
-
<tr>
|
2064 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2065 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_noodp_metatag_tip');">
|
2066 |
-
<?php _e('Add noodp meta tag:', 'platinum_seo_pack')?>
|
2067 |
-
</a>
|
2068 |
-
</td>
|
2069 |
-
<td>
|
2070 |
-
<input type="checkbox" name="psp_noodp_metatag" <?php if (get_option('psp_noodp_metatag')) echo "checked=\"1\""; ?>/>
|
2071 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_noodp_metatag_tip">
|
2072 |
-
<?php
|
2073 |
-
_e('Check this for adding noopd meta tag.', 'platinum_seo_pack');
|
2074 |
-
?>
|
2075 |
-
</div>
|
2076 |
-
</td>
|
2077 |
-
</tr>
|
2078 |
-
|
2079 |
-
<tr>
|
2080 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2081 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_noydir_metatag_tip');">
|
2082 |
-
<?php _e('Add noydir meta tag:', 'platinum_seo_pack')?>
|
2083 |
-
</a>
|
2084 |
-
</td>
|
2085 |
-
<td>
|
2086 |
-
<input type="checkbox" name="psp_noydir_metatag" <?php if (get_option('psp_noydir_metatag')) echo "checked=\"1\""; ?>/>
|
2087 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_noydir_metatag_tip">
|
2088 |
-
<?php
|
2089 |
-
_e('Check this for adding noydir meta tag.', 'platinum_seo_pack');
|
2090 |
-
?>
|
2091 |
-
</div>
|
2092 |
-
</td>
|
2093 |
-
</tr>
|
2094 |
-
|
2095 |
-
<tr>
|
2096 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2097 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_cat_pages_tip');">
|
2098 |
-
<?php _e('nofollow category listings on pages:', 'platinum_seo_pack')?>
|
2099 |
-
</a>
|
2100 |
-
</td>
|
2101 |
-
<td>
|
2102 |
-
<input type="checkbox" name="psp_nofollow_cat_pages" <?php if (get_option('psp_nofollow_cat_pages')) echo "checked=\"1\""; ?>/>
|
2103 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_cat_pages_tip">
|
2104 |
-
<?php
|
2105 |
-
_e('Check this to nofollow category listings on pages.', 'platinum_seo_pack');
|
2106 |
-
?>
|
2107 |
-
</div>
|
2108 |
-
</td>
|
2109 |
-
</tr>
|
2110 |
-
|
2111 |
-
<tr>
|
2112 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2113 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_cat_posts_tip');">
|
2114 |
-
<?php _e('nofollow category listings on posts:', 'platinum_seo_pack')?>
|
2115 |
-
</a>
|
2116 |
-
</td>
|
2117 |
-
<td>
|
2118 |
-
<input type="checkbox" name="psp_nofollow_cat_posts" <?php if (get_option('psp_nofollow_cat_posts')) echo "checked=\"1\""; ?>/>
|
2119 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_cat_posts_tip">
|
2120 |
-
<?php
|
2121 |
-
_e('Check this to nofollow category listings on posts (Not recommended)', 'platinum_seo_pack');
|
2122 |
-
?>
|
2123 |
-
</div>
|
2124 |
-
</td>
|
2125 |
-
</tr>
|
2126 |
-
|
2127 |
-
<tr>
|
2128 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2129 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_arc_pages_tip');">
|
2130 |
-
<?php _e('nofollow archive listings on pages:', 'platinum_seo_pack')?>
|
2131 |
-
</a>
|
2132 |
-
</td>
|
2133 |
-
<td>
|
2134 |
-
<input type="checkbox" name="psp_nofollow_arc_pages" <?php if (get_option('psp_nofollow_arc_pages')) echo "checked=\"1\""; ?>/>
|
2135 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_arc_pages_tip">
|
2136 |
-
<?php
|
2137 |
-
_e('Check this to nofollow archive listings on pages.', 'platinum_seo_pack');
|
2138 |
-
?>
|
2139 |
-
</div>
|
2140 |
-
</td>
|
2141 |
-
</tr>
|
2142 |
-
|
2143 |
-
<tr>
|
2144 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2145 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_arc_posts_tip');">
|
2146 |
-
<?php _e('nofollow archive listings on posts:', 'platinum_seo_pack')?>
|
2147 |
-
</a>
|
2148 |
-
</td>
|
2149 |
-
<td>
|
2150 |
-
<input type="checkbox" name="psp_nofollow_arc_posts" <?php if (get_option('psp_nofollow_arc_posts')) echo "checked=\"1\""; ?>/>
|
2151 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_arc_posts_tip">
|
2152 |
-
<?php
|
2153 |
-
_e('Check this to nofollow archive listings on posts (Not recommended)', 'platinum_seo_pack');
|
2154 |
-
?>
|
2155 |
-
</div>
|
2156 |
-
</td>
|
2157 |
-
</tr>
|
2158 |
-
|
2159 |
-
<tr>
|
2160 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2161 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_ext_links_tip');">
|
2162 |
-
<?php _e('nofollow external links on front page:', 'platinum_seo_pack')?>
|
2163 |
-
</a>
|
2164 |
-
</td>
|
2165 |
-
<td>
|
2166 |
-
<input type="checkbox" name="psp_nofollow_ext_links" <?php if (get_option('psp_nofollow_ext_links')) echo "checked=\"1\""; ?>/>
|
2167 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_ext_links_tip">
|
2168 |
-
<?php
|
2169 |
-
_e('Check this to nofollow external links on front page including home,category,author,tag and search pages.', 'platinum_seo_pack');
|
2170 |
-
?>
|
2171 |
-
</div>
|
2172 |
-
</td>
|
2173 |
-
</tr>
|
2174 |
-
|
2175 |
-
<tr>
|
2176 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2177 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_login_reg_tip');">
|
2178 |
-
<?php _e('nofollow login and registration links:', 'platinum_seo_pack')?>
|
2179 |
-
</a>
|
2180 |
-
</td>
|
2181 |
-
<td>
|
2182 |
-
<input type="checkbox" name="psp_nofollow_login_reg" <?php if (get_option('psp_nofollow_login_reg')) echo "checked=\"1\""; ?>/>
|
2183 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_login_reg_tip">
|
2184 |
-
<?php
|
2185 |
-
_e('Check this to nofollow login and registration links', 'platinum_seo_pack');
|
2186 |
-
?>
|
2187 |
-
</div>
|
2188 |
-
</td>
|
2189 |
-
</tr>
|
2190 |
-
|
2191 |
-
<tr>
|
2192 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2193 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_nofollow_tag_pages_tip');">
|
2194 |
-
<?php _e('nofollow links to tag pages:', 'platinum_seo_pack')?>
|
2195 |
-
</a>
|
2196 |
-
</td>
|
2197 |
-
<td>
|
2198 |
-
<input type="checkbox" name="psp_nofollow_tag_pages" <?php if (get_option('psp_nofollow_tag_pages')) echo "checked=\"1\""; ?>/>
|
2199 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_nofollow_tag_pages_tip">
|
2200 |
-
<?php
|
2201 |
-
_e('Check this to nofollow links to tag pages', 'platinum_seo_pack');
|
2202 |
-
?>
|
2203 |
-
</div>
|
2204 |
-
</td>
|
2205 |
-
</tr>
|
2206 |
-
|
2207 |
-
<tr>
|
2208 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2209 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_generate_descriptions_tip');">
|
2210 |
-
<?php _e('Autogenerate Descriptions:', 'platinum_seo_pack')?>
|
2211 |
-
</a>
|
2212 |
-
</td>
|
2213 |
-
<td>
|
2214 |
-
<input type="checkbox" name="psp_generate_descriptions" <?php if (get_option('aiosp_generate_descriptions')) echo "checked=\"1\""; ?>/>
|
2215 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_generate_descriptions_tip">
|
2216 |
-
<?php
|
2217 |
-
_e("Check this and your META descriptions will get autogenerated, if there's no excerpt.", 'platinum_seo_pack');
|
2218 |
-
?>
|
2219 |
-
</div>
|
2220 |
-
</td>
|
2221 |
-
</tr>
|
2222 |
-
|
2223 |
-
<tr>
|
2224 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2225 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_post_meta_tags_tip');">
|
2226 |
-
<?php _e('Additional Post Headers:', 'platinum_seo_pack')?>
|
2227 |
-
</a>
|
2228 |
-
</td>
|
2229 |
-
<td>
|
2230 |
-
<textarea cols="57" rows="2" name="psp_post_meta_tags"><?php echo stripcslashes(get_option('aiosp_post_meta_tags')); ?></textarea>
|
2231 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_post_meta_tags_tip">
|
2232 |
-
<?php
|
2233 |
-
_e('What you enter here will be copied verbatim to your header on post pages. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links.', 'platinum_seo_pack');
|
2234 |
-
?>
|
2235 |
-
</div>
|
2236 |
-
</td>
|
2237 |
-
</tr>
|
2238 |
-
|
2239 |
-
<tr>
|
2240 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2241 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_page_meta_tags_tip');">
|
2242 |
-
<?php _e('Additional Page Headers:', 'platinum_seo_pack')?>
|
2243 |
-
</a>
|
2244 |
-
</td>
|
2245 |
-
<td>
|
2246 |
-
<textarea cols="57" rows="2" name="psp_page_meta_tags"><?php echo stripcslashes(get_option('aiosp_page_meta_tags')); ?></textarea>
|
2247 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_page_meta_tags_tip">
|
2248 |
-
<?php
|
2249 |
-
_e('What you enter here will be copied verbatim to your header on pages. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links', 'platinum_seo_pack');
|
2250 |
-
?>
|
2251 |
-
</div>
|
2252 |
-
</td>
|
2253 |
-
</tr>
|
2254 |
-
|
2255 |
-
<tr>
|
2256 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2257 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_home_meta_tags_tip');">
|
2258 |
-
<?php _e('Additional Home Headers:', 'platinum_seo_pack')?>
|
2259 |
-
</a>
|
2260 |
-
</td>
|
2261 |
-
<td>
|
2262 |
-
<textarea cols="57" rows="2" name="psp_home_meta_tags"><?php echo stripcslashes(get_option('aiosp_home_meta_tags')); ?></textarea>
|
2263 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_home_meta_tags_tip">
|
2264 |
-
<?php
|
2265 |
-
_e('What you enter here will be copied verbatim to your header on the home page. You can enter whatever additional headers you want here, even references to stylesheets or google, yahoo, msn verification links', 'platinum_seo_pack');
|
2266 |
-
?>
|
2267 |
-
</div>
|
2268 |
-
</td>
|
2269 |
-
</tr>
|
2270 |
-
|
2271 |
-
<tr>
|
2272 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2273 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_do_log_tip');">
|
2274 |
-
<?php _e('Log important events:', 'platinum_seo_pack')?>
|
2275 |
-
</a>
|
2276 |
-
</td>
|
2277 |
-
<td>
|
2278 |
-
<input type="checkbox" name="psp_do_log" <?php if (get_option('aiosp_do_log')) echo "checked=\"1\""; ?>/>
|
2279 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_do_log_tip">
|
2280 |
-
<?php
|
2281 |
-
_e('Check this and Platinum SEO pack will create a log of important events (platinum_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable.', 'platinum_seo_pack');
|
2282 |
-
?>
|
2283 |
-
</div>
|
2284 |
-
</td>
|
2285 |
-
</tr>
|
2286 |
-
|
2287 |
-
<tr>
|
2288 |
-
<th scope="row" style="text-align:right; vertical-align:top;">
|
2289 |
-
<a style="cursor:pointer;" title="<?php _e('Click for Help!', 'platinum_seo_pack')?>" onclick="toggleVisibility('psp_link_home_tip');">
|
2290 |
-
<?php _e('Link To Platinum SEO:', 'platinum_seo_pack')?>
|
2291 |
-
</a>
|
2292 |
-
</td>
|
2293 |
-
<td>
|
2294 |
-
<input type="checkbox" name="psp_link_home" <?php if (get_option('psp_link_home')) echo "checked=\"1\""; ?>/>
|
2295 |
-
<div style="max-width:500px; text-align:left; display:none" id="psp_link_home_tip">
|
2296 |
-
<?php
|
2297 |
-
_e('Check this to link to Platinum SEO and spread the word.If you do not want to donate, atleast link to home.Linking would not hurt your site in any way.Think twice before you decide not to link', 'platinum_seo_pack');
|
2298 |
-
?>
|
2299 |
-
</div>
|
2300 |
-
</td>
|
2301 |
-
</tr>
|
2302 |
-
|
2303 |
-
</table>
|
2304 |
-
<p class="submit">
|
2305 |
-
<input type="hidden" name="action" value="psp_update" />
|
2306 |
-
<input type="hidden" name="psp-options-nonce" value="<?php echo wp_create_nonce('psp-options-nonce'); ?>" />
|
2307 |
-
<input type="submit" name="Submit" value="<?php _e('Update Options', 'platinum_seo_pack')?> »" />
|
2308 |
-
</p>
|
2309 |
-
</form>
|
2310 |
-
</div>
|
2311 |
-
<?php
|
2312 |
-
|
2313 |
-
} // options_panel
|
2314 |
-
|
2315 |
-
}
|
2316 |
-
|
2317 |
-
add_option("aiosp_home_description", null, '', 'yes');
|
2318 |
-
add_option("aiosp_home_title", null, '', 'yes');
|
2319 |
-
add_option("psp_canonical", 1, '', 'yes');
|
2320 |
-
add_option("aiosp_home_keywords", null, '', 'yes');
|
2321 |
-
add_option("aiosp_rewrite_titles", 1, '', 'yes');
|
2322 |
-
add_option("aiosp_use_categories", 0, '', 'yes');
|
2323 |
-
add_option("psp_use_tags", 0, '', 'yes');
|
2324 |
-
add_option("psp_category_noindex", 0, '', 'yes');
|
2325 |
-
add_option("psp_archive_noindex", 1, '', 'yes');
|
2326 |
-
add_option("psp_tags_noindex", 0, '', 'yes');
|
2327 |
-
add_option("psp_comnts_pages_noindex", 1, '', 'yes');
|
2328 |
-
add_option("psp_comnts_feeds_noindex", 1, '', 'yes');
|
2329 |
-
add_option("psp_rss_feeds_noindex", 1, '', 'yes');
|
2330 |
-
add_option("psp_search_results_noindex", 1, '', 'yes');
|
2331 |
-
add_option("psp_sub_pages_home_noindex", 1, '', 'yes');
|
2332 |
-
add_option("psp_author_archives_noindex", 1, '', 'yes');
|
2333 |
-
add_option("psp_noodp_metatag", 1, '', 'yes');
|
2334 |
-
add_option("psp_noydir_metatag", 1, '', 'yes');
|
2335 |
-
add_option("psp_nofollow_cat_pages", 0, '', 'yes');
|
2336 |
-
add_option("psp_nofollow_cat_posts", 0, '', 'yes');
|
2337 |
-
add_option("psp_nofollow_arc_pages", 0, '', 'yes');
|
2338 |
-
add_option("psp_nofollow_arc_posts", 0, '', 'yes');
|
2339 |
-
add_option("psp_nofollow_ext_links", 0, '', 'yes');
|
2340 |
-
add_option("psp_nofollow_login_reg", 1, '', 'yes');
|
2341 |
-
add_option("psp_nofollow_tag_pages", 0, '', 'yes');
|
2342 |
-
add_option("psp_permalink_redirect", 1, '', 'yes');
|
2343 |
-
add_option("aiosp_generate_descriptions", 1, '', 'yes');
|
2344 |
-
add_option("aiosp_post_title_format", '%post_title% | %blog_title%', '', 'yes');
|
2345 |
-
add_option("aiosp_page_title_format", '%page_title% | %blog_title%', '', 'yes');
|
2346 |
-
add_option("aiosp_category_title_format", '%category_title% | %blog_title%', '', 'yes');
|
2347 |
-
add_option("psp_taxonomy_title_format", '%term% | %blog_title%', '', 'yes'); // added by Aidan - sww.co.nz
|
2348 |
-
add_option("aiosp_archive_title_format", '%date% | %blog_title%', '', 'yes');
|
2349 |
-
add_option("aiosp_tag_title_format", '%tag% | %blog_title%', '', 'yes');
|
2350 |
-
add_option("aiosp_search_title_format", '%search% | %blog_title%', '', 'yes');
|
2351 |
-
add_option("aiosp_description_format", '%description%', '', 'yes');
|
2352 |
-
add_option("aiosp_paged_format", ' - Part %page%', '', 'yes');
|
2353 |
-
add_option("aiosp_404_title_format", 'Nothing found for %request_words%', '', 'yes');
|
2354 |
-
add_option("aiosp_post_meta_tags", '', '', 'yes');
|
2355 |
-
add_option("aiosp_page_meta_tags", '', '', 'yes');
|
2356 |
-
add_option("aiosp_home_meta_tags", '', '', 'yes');
|
2357 |
-
add_option("aiosp_do_log", null, '', 'yes');
|
2358 |
-
add_option("psp_link_home", 0, '', 'yes');
|
2359 |
-
|
2360 |
-
$psp = new Platinum_SEO_Pack();
|
2361 |
-
add_action('wp_head', array($psp, 'echo_to_blog_header'));
|
2362 |
-
|
2363 |
-
if (get_option('psp_permalink_redirect')) {
|
2364 |
-
add_action( 'template_redirect', array($psp, 'has_permalink_changed') );
|
2365 |
-
}
|
2366 |
-
|
2367 |
-
add_action('get_header', array($psp, 'apply_seo_title'));
|
2368 |
-
|
2369 |
-
add_action('init', array($psp, 'init'));
|
2370 |
-
|
2371 |
-
add_action('edit_post', array($psp, 'add_meta_index_tags'));
|
2372 |
-
add_action('publish_post', array($psp, 'add_meta_index_tags'));
|
2373 |
-
add_action('save_post', array($psp, 'add_meta_index_tags'));
|
2374 |
-
add_action('edit_page_form', array($psp, 'add_meta_index_tags'));
|
2375 |
-
|
2376 |
-
add_action('admin_menu', array($psp, 'admin_menu'));
|
2377 |
-
|
2378 |
-
if ((substr($psp->wp_version, 0, 3) >= '2.3') || (substr($psp->wp_version, 0, 3) == '2.5') || (substr($psp->wp_version, 0, 3) == '2.6')) {
|
2379 |
-
if (get_option('psp_comnts_feeds_noindex') || get_option('psp_rss_feeds_noindex')) {
|
2380 |
-
add_action('commentsrss2_head', array($psp,'noindex_feed'));
|
2381 |
-
}
|
2382 |
-
}
|
2383 |
-
if (get_option('psp_rss_feeds_noindex')) {
|
2384 |
-
add_action('rss_head', array($psp,'noindex_feed'));
|
2385 |
-
add_action('rss2_head', array($psp,'noindex_feed'));
|
2386 |
-
}
|
2387 |
-
|
2388 |
-
if (get_option('psp_nofollow_cat_pages') || get_option('psp_nofollow_cat_posts')) {
|
2389 |
-
add_filter('wp_list_categories',array($psp,'nofollow_category_listing'));
|
2390 |
-
add_filter('the_category',array($psp,'nofollow_category_listing'));
|
2391 |
-
}
|
2392 |
-
|
2393 |
-
if (get_option('psp_nofollow_arc_pages') || get_option('psp_nofollow_arc_posts')) {
|
2394 |
-
add_filter('get_archives_link',array($psp,'nofollow_archive_listing'));
|
2395 |
-
}
|
2396 |
-
if (get_option('psp_nofollow_login_reg')) {
|
2397 |
-
add_filter('loginout',array($psp,'nofollow_link'));
|
2398 |
-
add_filter('register',array($psp,'nofollow_link'));
|
2399 |
-
}
|
2400 |
-
if (get_option('psp_nofollow_tag_pages')) {
|
2401 |
-
add_filter('the_tags',array($psp,'nofollow_taglinks'));
|
2402 |
-
}
|
2403 |
-
|
2404 |
-
if (get_option('psp_link_home')) {
|
2405 |
-
add_action('wp_footer',array($psp,'add_footer_link'));
|
2406 |
-
}
|
2407 |
-
|
2408 |
-
add_action('get_psp_category_description',array($psp,'psp_category_description'));
|
2409 |
-
add_action('get_psp_category_keywords',array($psp,'psp_category_keywords'));
|
2410 |
-
add_action('get_psp_tag_description',array($psp,'psp_tag_description'));
|
2411 |
-
add_action('get_psp_tag_keywords',array($psp,'psp_tag_keywords'));
|
2412 |
-
|
2413 |
-
/** if (get_option('psp_nofollow_ext_links')) {
|
2414 |
-
add_filter('the_content',array($psp,'nofollow_home_category'));
|
2415 |
-
} **/
|
2416 |
-
|
2417 |
-
?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Breadcrumb Trail - A breadcrumb menu script for WordPress.
|
4 |
+
*
|
5 |
+
* Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page. It tries to
|
6 |
+
* anticipate any type of structure and display the best possible trail that matches your site's
|
7 |
+
* permalink structure. While not perfect, it attempts to fill in the gaps left by many other
|
8 |
+
* breadcrumb scripts.
|
9 |
+
*
|
10 |
+
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
11 |
+
* General Public License as published by the Free Software Foundation; either version 2 of the License,
|
12 |
+
* or (at your option) any later version.
|
13 |
+
*
|
14 |
+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
15 |
+
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
16 |
+
*
|
17 |
+
* @package BreadcrumbTrail
|
18 |
+
* @version 0.6.1
|
19 |
+
* @author Justin Tadlock <justin@justintadlock.com>
|
20 |
+
* @copyright Copyright (c) 2008 - 2013, Justin Tadlock
|
21 |
+
* @link http://themehybrid.com/plugins/breadcrumb-trail
|
22 |
+
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
23 |
+
*/
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
|
27 |
+
* which should be used in theme templates.
|
28 |
+
*
|
29 |
+
* @since 0.1.0
|
30 |
+
* @access public
|
31 |
+
* @param array $args Arguments to pass to Breadcrumb_Trail.
|
32 |
+
* @return void
|
33 |
+
*/
|
34 |
+
function psp_breadcrumb_trail( $args = array() ) {
|
35 |
+
|
36 |
+
if ( function_exists( 'is_bbpress' ) && is_bbpress() )
|
37 |
+
$breadcrumb = new PSP_bbPress_Breadcrumb_Trail( $args );
|
38 |
+
else
|
39 |
+
$breadcrumb = new PSP_Breadcrumb_Trail( $args );
|
40 |
+
|
41 |
+
return $breadcrumb->trail();
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Creates a breadcrumbs menu for the site based on the current page that's being viewed by the user.
|
46 |
+
*
|
47 |
+
* @since 0.6.0
|
48 |
+
*/
|
49 |
+
class PSP_Breadcrumb_Trail {
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Array of items belonging to the current breadcrumb trail.
|
53 |
+
*
|
54 |
+
* @since 0.1.0
|
55 |
+
* @access public
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
+
public $items = array();
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Arguments used to build the breadcrumb trail.
|
62 |
+
*
|
63 |
+
* @since 0.1.0
|
64 |
+
* @access public
|
65 |
+
* @var array
|
66 |
+
*/
|
67 |
+
public $args = array();
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Sets up the breadcrumb trail.
|
71 |
+
*
|
72 |
+
* @since 0.6.0
|
73 |
+
* @access public
|
74 |
+
* @param array $args The arguments for how to build the breadcrumb trail.
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function __construct( $args = array() ) {
|
78 |
+
|
79 |
+
/* Remove the bbPress breadcrumbs. */
|
80 |
+
add_filter( 'bbp_get_breadcrumb', '__return_false' );
|
81 |
+
|
82 |
+
$defaults = array(
|
83 |
+
'container' => 'div',
|
84 |
+
'separator' => '/',
|
85 |
+
'before' => '',
|
86 |
+
'after' => '',
|
87 |
+
'show_on_front' => true,
|
88 |
+
'network' => false,
|
89 |
+
//'show_edit_link' => false,
|
90 |
+
'show_title' => true,
|
91 |
+
'show_browse' => true,
|
92 |
+
'echo' => true,
|
93 |
+
|
94 |
+
/* Post taxonomy (examples follow). */
|
95 |
+
'post_taxonomy' => array(
|
96 |
+
// 'post' => 'post_tag',
|
97 |
+
// 'book' => 'genre',
|
98 |
+
),
|
99 |
+
|
100 |
+
/* Labels for text used (see Breadcrumb_Trail::default_labels). */
|
101 |
+
'labels' => array()
|
102 |
+
);
|
103 |
+
|
104 |
+
$this->args = apply_filters( 'psp_breadcrumb_trail_args', wp_parse_args( $args, $defaults ) );
|
105 |
+
|
106 |
+
/* Merge the user-added labels with the defaults. */
|
107 |
+
$this->args['labels'] = wp_parse_args( $this->args['labels'], $this->default_labels() );
|
108 |
+
|
109 |
+
$this->do_trail_items();
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Formats and outputs the breadcrumb trail.
|
114 |
+
*
|
115 |
+
* @since 0.6.0
|
116 |
+
* @access public
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
public function trail() {
|
120 |
+
|
121 |
+
$breadcrumb = '';
|
122 |
+
|
123 |
+
/* Connect the breadcrumb trail if there are items in the trail. */
|
124 |
+
if ( !empty( $this->items ) && is_array( $this->items ) ) {
|
125 |
+
|
126 |
+
/* Make sure we have a unique array of items. */
|
127 |
+
$this->items = array_unique( $this->items );
|
128 |
+
|
129 |
+
/* Open the breadcrumb trail containers. */
|
130 |
+
$breadcrumb = "\n\t\t" . '<' . tag_escape( $this->args['container'] ) . ' class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">';
|
131 |
+
|
132 |
+
/* If $before was set, wrap it in a container. */
|
133 |
+
$breadcrumb .= ( !empty( $this->args['before'] ) ? "\n\t\t\t" . '<span class="trail-before">' . $this->args['before'] . '</span> ' . "\n\t\t\t" : '' );
|
134 |
+
|
135 |
+
/* Add 'browse' label if it should be shown. */
|
136 |
+
if ( true === $this->args['show_browse'] )
|
137 |
+
$breadcrumb .= "\n\t\t\t" . '<span class="trail-browse">' . $this->args['labels']['browse'] . '</span> ';
|
138 |
+
|
139 |
+
/* Adds the 'trail-begin' class around first item if there's more than one item. */
|
140 |
+
if ( 1 < count( $this->items ) )
|
141 |
+
array_unshift( $this->items, '<span class="trail-begin">' . array_shift( $this->items ) . '</span>' );
|
142 |
+
|
143 |
+
/* Adds the 'trail-end' class around last item. */
|
144 |
+
array_push( $this->items, '<span class="trail-end">' . array_pop( $this->items ) . '</span>' );
|
145 |
+
|
146 |
+
/* Format the separator. */
|
147 |
+
$separator = ( !empty( $this->args['separator'] ) ? '<span class="sep">' . $this->args['separator'] . '</span>' : '<span class="sep">/</span>' );
|
148 |
+
|
149 |
+
/* Join the individual trail items into a single string. */
|
150 |
+
$breadcrumb .= join( "\n\t\t\t {$separator} ", $this->items );
|
151 |
+
|
152 |
+
/* If $after was set, wrap it in a container. */
|
153 |
+
$breadcrumb .= ( !empty( $this->args['after'] ) ? "\n\t\t\t" . ' <span class="trail-after">' . $this->args['after'] . '</span>' : '' );
|
154 |
+
|
155 |
+
/* Close the breadcrumb trail containers. */
|
156 |
+
$breadcrumb .= "\n\t\t" . '</' . tag_escape( $this->args['container'] ) . '>';
|
157 |
+
}
|
158 |
+
|
159 |
+
/* Allow developers to filter the breadcrumb trail HTML. */
|
160 |
+
$breadcrumb = apply_filters( 'psp_breadcrumb_trail', $breadcrumb, $this->args );
|
161 |
+
|
162 |
+
if ( true === $this->args['echo'] )
|
163 |
+
echo $breadcrumb;
|
164 |
+
else
|
165 |
+
return $breadcrumb;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Returns an array of the default labels.
|
170 |
+
*
|
171 |
+
* @since 0.6.0
|
172 |
+
* @access public
|
173 |
+
* @return array
|
174 |
+
*/
|
175 |
+
public function default_labels() {
|
176 |
+
|
177 |
+
$labels = array(
|
178 |
+
'browse' => __( 'Browse:', 'breadcrumb-trail' ),
|
179 |
+
'home' => __( 'Home', 'breadcrumb-trail' ),
|
180 |
+
'error_404' => __( '404 Not Found', 'breadcrumb-trail' ),
|
181 |
+
'archives' => __( 'Archives', 'breadcrumb-trail' ),
|
182 |
+
/* Translators: %s is the search query. The HTML entities are opening and closing curly quotes. */
|
183 |
+
'search' => __( 'Search results for “%s”', 'breadcrumb-trail' ),
|
184 |
+
/* Translators: %s is the page number. */
|
185 |
+
'paged' => __( 'Page %s', 'breadcrumb-trail' ),
|
186 |
+
/* Translators: Minute archive title. %s is the minute time format. */
|
187 |
+
'archive_minute' => __( 'Minute %s', 'breadcrumb-trail' ),
|
188 |
+
/* Translators: Weekly archive title. %s is the week date format. */
|
189 |
+
'archive_week' => __( 'Week %s', 'breadcrumb-trail' ),
|
190 |
+
|
191 |
+
/* "%s" is replaced with the translated date/time format. */
|
192 |
+
'archive_minute_hour' => '%s',
|
193 |
+
'archive_hour' => '%s',
|
194 |
+
'archive_day' => '%s',
|
195 |
+
'archive_month' => '%s',
|
196 |
+
'archive_year' => '%s',
|
197 |
+
);
|
198 |
+
|
199 |
+
return $labels;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Runs through the various WordPress conditional tags to check the current page being viewed. Once
|
204 |
+
* a condition is met, a specific method is launched to add items to the $items array.
|
205 |
+
*
|
206 |
+
* @since 0.6.0
|
207 |
+
* @access public
|
208 |
+
* @return void
|
209 |
+
*/
|
210 |
+
public function do_trail_items() {
|
211 |
+
|
212 |
+
/* If viewing the front page. */
|
213 |
+
if ( is_front_page() ) {
|
214 |
+
$this->do_front_page_items();
|
215 |
+
}
|
216 |
+
|
217 |
+
/* If not viewing the front page. */
|
218 |
+
else {
|
219 |
+
|
220 |
+
/* Add the network and site home links. */
|
221 |
+
$this->do_network_home_link();
|
222 |
+
$this->do_site_home_link();
|
223 |
+
|
224 |
+
/* If viewing the home/blog page. */
|
225 |
+
if ( is_home() ) {
|
226 |
+
$this->do_posts_page_items();
|
227 |
+
}
|
228 |
+
|
229 |
+
/* If viewing a single post. */
|
230 |
+
elseif ( is_singular() ) {
|
231 |
+
$this->do_singular_items();
|
232 |
+
}
|
233 |
+
|
234 |
+
/* If viewing an archive page. */
|
235 |
+
elseif ( is_archive() ) {
|
236 |
+
|
237 |
+
if ( is_post_type_archive() )
|
238 |
+
$this->do_post_type_archive_items();
|
239 |
+
|
240 |
+
elseif ( is_category() || is_tag() || is_tax() )
|
241 |
+
$this->do_term_archive_items();
|
242 |
+
|
243 |
+
elseif ( is_author() )
|
244 |
+
$this->do_user_archive_items();
|
245 |
+
|
246 |
+
elseif ( get_query_var( 'minute' ) && get_query_var( 'hour' ) )
|
247 |
+
$this->do_minute_hour_archive_items();
|
248 |
+
|
249 |
+
elseif ( get_query_var( 'minute' ) )
|
250 |
+
$this->do_minute_archive_items();
|
251 |
+
|
252 |
+
elseif ( get_query_var( 'hour' ) )
|
253 |
+
$this->do_hour_archive_items();
|
254 |
+
|
255 |
+
elseif ( is_day() )
|
256 |
+
$this->do_day_archive_items();
|
257 |
+
|
258 |
+
elseif ( get_query_var( 'w' ) )
|
259 |
+
$this->do_week_archive_items();
|
260 |
+
|
261 |
+
elseif ( is_month() )
|
262 |
+
$this->do_month_archive_items();
|
263 |
+
|
264 |
+
elseif ( is_year() )
|
265 |
+
$this->do_year_archive_items();
|
266 |
+
|
267 |
+
else
|
268 |
+
$this->do_default_archive_items();
|
269 |
+
}
|
270 |
+
|
271 |
+
/* If viewing a search results page. */
|
272 |
+
elseif ( is_search() ) {
|
273 |
+
$this->do_search_items();
|
274 |
+
}
|
275 |
+
|
276 |
+
/* If viewing the 404 page. */
|
277 |
+
elseif ( is_404() ) {
|
278 |
+
$this->do_404_items();
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
/* Add paged items if they exist. */
|
283 |
+
$this->do_paged_items();
|
284 |
+
|
285 |
+
/* Allow developers to overwrite the items for the breadcrumb trail. */
|
286 |
+
$this->items = apply_filters( 'psp_breadcrumb_trail_items', $this->items, $this->args );
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Gets front items based on $wp_rewrite->front.
|
291 |
+
*
|
292 |
+
* @since 0.6.0
|
293 |
+
* @access public
|
294 |
+
* @return void
|
295 |
+
*/
|
296 |
+
public function do_rewrite_front_items() {
|
297 |
+
global $wp_rewrite;
|
298 |
+
|
299 |
+
if ( $wp_rewrite->front )
|
300 |
+
$this->do_path_parents( $wp_rewrite->front );
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Adds the page/paged number to the items array.
|
305 |
+
*
|
306 |
+
* @since 0.6.0
|
307 |
+
* @access public
|
308 |
+
* @return void
|
309 |
+
*/
|
310 |
+
public function do_paged_items() {
|
311 |
+
|
312 |
+
/* If viewing a paged singular post. */
|
313 |
+
if ( is_singular() && 1 < get_query_var( 'page' ) && true === $this->args['show_title'] )
|
314 |
+
$this->items[] = sprintf( $this->args['labels']['paged'], number_format_i18n( absint( get_query_var( 'page' ) ) ) );
|
315 |
+
|
316 |
+
/* If viewing a paged archive-type page. */
|
317 |
+
elseif ( is_paged() && true === $this->args['show_title'] )
|
318 |
+
$this->items[] = sprintf( $this->args['labels']['paged'], number_format_i18n( absint( get_query_var( 'paged' ) ) ) );
|
319 |
+
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Adds the network (all sites) home page link to the items array.
|
324 |
+
*
|
325 |
+
* @since 0.6.0
|
326 |
+
* @access public
|
327 |
+
* @return void
|
328 |
+
*/
|
329 |
+
public function do_network_home_link() {
|
330 |
+
if ( is_multisite() && !is_main_site() && true === $this->args['network'] )
|
331 |
+
$this->items[] = '<a href="' . network_home_url() . '" title="' . esc_attr( $this->args['labels']['home'] ) . '" rel="home">' . $this->args['labels']['home'] . '</a>';
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Adds the current site's home page link to the items array.
|
336 |
+
*
|
337 |
+
* @since 0.6.0
|
338 |
+
* @access public
|
339 |
+
* @return void
|
340 |
+
*/
|
341 |
+
public function do_site_home_link() {
|
342 |
+
$label = ( is_multisite() && !is_main_site() && true === $this->args['network'] ) ? get_bloginfo( 'name' ) : $this->args['labels']['home'];
|
343 |
+
$rel = ( is_multisite() && !is_main_site() && true === $this->args['network'] ) ? '' : ' rel="home"';
|
344 |
+
$this->items[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '"' . $rel .'>' . $label . '</a>';
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Adds items for the front page to the items array.
|
349 |
+
*
|
350 |
+
* @since 0.6.0
|
351 |
+
* @access public
|
352 |
+
* @return void
|
353 |
+
*/
|
354 |
+
public function do_front_page_items() {
|
355 |
+
|
356 |
+
/* Only show front items if the 'show_on_front' argument is set to 'true'. */
|
357 |
+
if ( true === $this->args['show_on_front'] || is_paged() || ( is_singular() && 1 < get_query_var( 'page' ) ) ) {
|
358 |
+
|
359 |
+
/* If on a paged view, add the home link items. */
|
360 |
+
if ( is_paged() ) {
|
361 |
+
$this->do_network_home_link();
|
362 |
+
$this->do_site_home_link();
|
363 |
+
}
|
364 |
+
|
365 |
+
/* If on the main front page, add the network home link item and the home item. */
|
366 |
+
else {
|
367 |
+
$this->do_network_home_link();
|
368 |
+
|
369 |
+
if ( true === $this->args['show_title'] )
|
370 |
+
$this->items[] = ( is_multisite() && true === $this->args['network'] ) ? get_bloginfo( 'name' ) : $this->args['labels']['home'];
|
371 |
+
}
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Adds items for the posts page (i.e., is_home()) to the items array.
|
377 |
+
*
|
378 |
+
* @since 0.6.0
|
379 |
+
* @access public
|
380 |
+
* @return void
|
381 |
+
*/
|
382 |
+
public function do_posts_page_items() {
|
383 |
+
|
384 |
+
/* Get the post ID and post. */
|
385 |
+
$post_id = get_queried_object_id();
|
386 |
+
$post = get_page( $post_id );
|
387 |
+
|
388 |
+
/* If the post has parents, add them to the trail. */
|
389 |
+
if ( 0 < $post->post_parent )
|
390 |
+
$this->do_post_parents( $post->post_parent );
|
391 |
+
|
392 |
+
/* Get the page title. */
|
393 |
+
$title = get_the_title( $post_id );
|
394 |
+
|
395 |
+
/* Add the posts page item. */
|
396 |
+
if ( is_paged() )
|
397 |
+
$this->items[] = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( $title ) . '">' . $title . '</a>';
|
398 |
+
|
399 |
+
elseif ( $title && true === $this->args['show_title'] )
|
400 |
+
$this->items[] = $title;
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Adds singular post items to the items array.
|
405 |
+
*
|
406 |
+
* @since 0.6.0
|
407 |
+
* @access public
|
408 |
+
* @return void
|
409 |
+
*/
|
410 |
+
public function do_singular_items() {
|
411 |
+
|
412 |
+
/* Get the queried post. */
|
413 |
+
$post = get_queried_object();
|
414 |
+
$post_id = get_queried_object_id();
|
415 |
+
|
416 |
+
/* If the post has a parent, follow the parent trail. */
|
417 |
+
if ( 0 < $post->post_parent )
|
418 |
+
$this->do_post_parents( $post->post_parent );
|
419 |
+
|
420 |
+
/* If the post doesn't have a parent, get its hierarchy based off the post type. */
|
421 |
+
else
|
422 |
+
$this->do_post_hierarchy( $post_id );
|
423 |
+
|
424 |
+
/* Display terms for specific post type taxonomy if requested. */
|
425 |
+
$this->do_post_terms( $post_id );
|
426 |
+
|
427 |
+
/* End with the post title. */
|
428 |
+
if ( $post_title = single_post_title( '', false ) ) {
|
429 |
+
|
430 |
+
if ( 1 < get_query_var( 'page' ) )
|
431 |
+
$this->items[] = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( $post_title ) . '">' . $post_title . '</a>';
|
432 |
+
|
433 |
+
elseif ( true === $this->args['show_title'] )
|
434 |
+
$this->items[] = $post_title;
|
435 |
+
}
|
436 |
+
}
|
437 |
+
|
438 |
+
/**
|
439 |
+
* Adds a specific post's parents to the items array.
|
440 |
+
*
|
441 |
+
* @since 0.6.0
|
442 |
+
* @access public
|
443 |
+
* @param int $post_id The ID of the post to get the parents of.
|
444 |
+
* @return void
|
445 |
+
*/
|
446 |
+
public function do_post_parents( $post_id ) {
|
447 |
+
$parents = array();
|
448 |
+
|
449 |
+
while ( $post_id ) {
|
450 |
+
|
451 |
+
/* Get the post by ID. */
|
452 |
+
$post = get_post( $post_id );
|
453 |
+
|
454 |
+
/* Add the formatted post link to the array of parents. */
|
455 |
+
$parents[] = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . get_the_title( $post_id ) . '</a>';
|
456 |
+
|
457 |
+
/* If there's no longer a post parent, brea out of the loop. */
|
458 |
+
if ( 0 >= $post->post_parent )
|
459 |
+
break;
|
460 |
+
|
461 |
+
/* Change the post ID to the parent post to continue looping. */
|
462 |
+
$post_id = $post->post_parent;
|
463 |
+
}
|
464 |
+
|
465 |
+
/* Get the post hierarchy based off the final parent post. */
|
466 |
+
$this->do_post_hierarchy( $post_id );
|
467 |
+
|
468 |
+
/* Merge the parent items into the items array. */
|
469 |
+
$this->items = array_merge( $this->items, array_reverse( $parents ) );
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* Adds a post's terms from a specific taxonomy to the items array.
|
474 |
+
*
|
475 |
+
* @since 0.6.0
|
476 |
+
* @access public
|
477 |
+
* @param int $post_id The ID of the post to get the terms for.
|
478 |
+
* @return void
|
479 |
+
*/
|
480 |
+
public function do_post_terms( $post_id ) {
|
481 |
+
|
482 |
+
/* Get the post type. */
|
483 |
+
$post_type = get_post_type( $post_id );
|
484 |
+
//error_log($this->args['post_taxonomy'][ $post_type ]);
|
485 |
+
/* Add the terms of the taxonomy for this post. */
|
486 |
+
if ( !empty( $this->args['post_taxonomy'][ $post_type ] ) )
|
487 |
+
$this->items[] = get_the_term_list( $post_id, $this->args['post_taxonomy'][ $post_type ], '', ', ', '' );
|
488 |
+
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Adds a specific post's hierarchy to the items array. The hierarchy is determined by post type's
|
493 |
+
* rewrite arguments and whether it has an archive page.
|
494 |
+
*
|
495 |
+
* @since 0.6.0
|
496 |
+
* @access public
|
497 |
+
* @param int $post_id The ID of the post to get the hierarchy for.
|
498 |
+
* @return void
|
499 |
+
*/
|
500 |
+
public function do_post_hierarchy( $post_id ) {
|
501 |
+
|
502 |
+
/* Get the post type. */
|
503 |
+
$post_type = get_post_type( $post_id );
|
504 |
+
$post_type_object = get_post_type_object( $post_type );
|
505 |
+
|
506 |
+
/* If this is the 'post' post type, get the rewrite front items and map the rewrite tags. */
|
507 |
+
if ( 'post' === $post_type ) {
|
508 |
+
|
509 |
+
/* Add $wp_rewrite->front to the trail. */
|
510 |
+
$this->do_rewrite_front_items();
|
511 |
+
|
512 |
+
/* Map the rewrite tags. */
|
513 |
+
$this->map_rewrite_tags( $post_id, get_option( 'permalink_structure' ) );
|
514 |
+
}
|
515 |
+
|
516 |
+
/* If the post type has rewrite rules. */
|
517 |
+
elseif ( false !== $post_type_object->rewrite ) {
|
518 |
+
|
519 |
+
/* If 'with_front' is true, add $wp_rewrite->front to the trail. */
|
520 |
+
if ( $post_type_object->rewrite['with_front'] )
|
521 |
+
$this->do_rewrite_front_items();
|
522 |
+
|
523 |
+
/* If there's a path, check for parents. */
|
524 |
+
if ( !empty( $post_type_object->rewrite['slug'] ) )
|
525 |
+
$this->do_path_parents( $post_type_object->rewrite['slug'] );
|
526 |
+
}
|
527 |
+
|
528 |
+
/* If there's an archive page, add it to the trail. */
|
529 |
+
if ( !empty( $post_type_object->has_archive ) ) {
|
530 |
+
|
531 |
+
/* Add support for a non-standard label of 'archive_title' (special use case). */
|
532 |
+
$label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name;
|
533 |
+
|
534 |
+
$this->items[] = '<a href="' . get_post_type_archive_link( $post_type ) . '">' . $label . '</a>';
|
535 |
+
}
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Gets post types by slug. This is needed because the get_post_types() function doesn't exactly
|
540 |
+
* match the 'has_archive' argument when it's set as a string instead of a boolean.
|
541 |
+
*
|
542 |
+
* @since 0.6.0
|
543 |
+
* @access public
|
544 |
+
* @param int $slug The post type archive slug to search for.
|
545 |
+
* @return void
|
546 |
+
*/
|
547 |
+
public function get_post_types_by_slug( $slug ) {
|
548 |
+
|
549 |
+
$return = array();
|
550 |
+
|
551 |
+
$post_types = get_post_types( array(), 'objects' );
|
552 |
+
|
553 |
+
foreach ( $post_types as $type ) {
|
554 |
+
|
555 |
+
if ( $slug === $type->has_archive || ( true === $type->has_archive && $slug === $type->rewrite['slug'] ) )
|
556 |
+
$return[] = $type;
|
557 |
+
}
|
558 |
+
|
559 |
+
return $return;
|
560 |
+
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Adds the items to the trail items array for taxonomy term archives.
|
564 |
+
*
|
565 |
+
* @since 0.6.0
|
566 |
+
* @access public
|
567 |
+
* @global object $wp_rewrite
|
568 |
+
* @return void
|
569 |
+
*/
|
570 |
+
public function do_term_archive_items() {
|
571 |
+
global $wp_rewrite;
|
572 |
+
|
573 |
+
/* Get some taxonomy and term variables. */
|
574 |
+
$term = get_queried_object();
|
575 |
+
$taxonomy = get_taxonomy( $term->taxonomy );
|
576 |
+
|
577 |
+
/* If there are rewrite rules for the taxonomy. */
|
578 |
+
if ( false !== $taxonomy->rewrite ) {
|
579 |
+
|
580 |
+
/* If 'with_front' is true, dd $wp_rewrite->front to the trail. */
|
581 |
+
if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front )
|
582 |
+
$this->do_rewrite_front_items();
|
583 |
+
|
584 |
+
/* Get parent pages by path if they exist. */
|
585 |
+
$this->do_path_parents( $taxonomy->rewrite['slug'] );
|
586 |
+
|
587 |
+
/* Add post type archive if its 'has_archive' matches the taxonomy rewrite 'slug'. */
|
588 |
+
if ( $taxonomy->rewrite['slug'] ) {
|
589 |
+
|
590 |
+
$slug = trim( $taxonomy->rewrite['slug'], '/' );
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Deals with the situation if the slug has a '/' between multiple strings. For
|
594 |
+
* example, "movies/genres" where "movies" is the post type archive.
|
595 |
+
*/
|
596 |
+
$matches = explode( '/', $slug );
|
597 |
+
|
598 |
+
/* If matches are found for the path. */
|
599 |
+
if ( isset( $matches ) ) {
|
600 |
+
|
601 |
+
/* Reverse the array of matches to search for posts in the proper order. */
|
602 |
+
$matches = array_reverse( $matches );
|
603 |
+
|
604 |
+
/* Loop through each of the path matches. */
|
605 |
+
foreach ( $matches as $match ) {
|
606 |
+
|
607 |
+
/* If a match is found. */
|
608 |
+
$slug = $match;
|
609 |
+
|
610 |
+
/* Get public post types that match the rewrite slug. */
|
611 |
+
$post_types = $this->get_post_types_by_slug( $match );
|
612 |
+
|
613 |
+
if ( !empty( $post_types ) ) {
|
614 |
+
|
615 |
+
$post_type_object = $post_types[0];
|
616 |
+
|
617 |
+
/* Add support for a non-standard label of 'archive_title' (special use case). */
|
618 |
+
$label = !empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name;
|
619 |
+
|
620 |
+
/* Add the post type archive link to the trail. */
|
621 |
+
$this->items[] = '<a href="' . get_post_type_archive_link( $post_type_object->name ) . '" title="' . esc_attr( $label ) . '">' . $label . '</a>';
|
622 |
+
|
623 |
+
/* Break out of the loop. */
|
624 |
+
break;
|
625 |
+
}
|
626 |
+
}
|
627 |
+
}
|
628 |
+
}
|
629 |
+
}
|
630 |
+
|
631 |
+
/* If the taxonomy is hierarchical, list its parent terms. */
|
632 |
+
if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent )
|
633 |
+
$this->do_term_parents( $term->parent, $term->taxonomy );
|
634 |
+
|
635 |
+
/* Add the term name to the trail end. */
|
636 |
+
if ( is_paged() )
|
637 |
+
$this->items[] = '<a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '" title="' . esc_attr( single_term_title( '', false ) ) . '">' . single_term_title( '', false ) . '</a>';
|
638 |
+
|
639 |
+
elseif ( true === $this->args['show_title'] )
|
640 |
+
$this->items[] = single_term_title( '', false );
|
641 |
+
}
|
642 |
+
|
643 |
+
/**
|
644 |
+
* Adds the items to the trail items array for post type archives.
|
645 |
+
*
|
646 |
+
* @since 0.6.0
|
647 |
+
* @access public
|
648 |
+
* @return void
|
649 |
+
*/
|
650 |
+
public function do_post_type_archive_items() {
|
651 |
+
|
652 |
+
/* Get the post type object. */
|
653 |
+
$post_type_object = get_post_type_object( get_query_var( 'post_type' ) );
|
654 |
+
|
655 |
+
if ( false !== $post_type_object->rewrite ) {
|
656 |
+
|
657 |
+
/* If 'with_front' is true, add $wp_rewrite->front to the trail. */
|
658 |
+
if ( $post_type_object->rewrite['with_front'] )
|
659 |
+
$this->do_rewrite_front_items();
|
660 |
+
|
661 |
+
/* If there's a rewrite slug, check for parents. */
|
662 |
+
if ( !empty( $post_type_object->rewrite['slug'] ) )
|
663 |
+
$this->do_path_parents( $post_type_object->rewrite['slug'] );
|
664 |
+
}
|
665 |
+
|
666 |
+
/* Add the post type [plural] name to the trail end. */
|
667 |
+
if ( is_paged() )
|
668 |
+
$this->items[] = '<a href="' . esc_url( get_post_type_archive_link( $post_type_object->name ) ) . '" title="' . esc_attr( post_type_archive_title( '', false ) ) . '">' . post_type_archive_title( '', false ) . '</a>';
|
669 |
+
|
670 |
+
elseif ( true === $this->args['show_title'] )
|
671 |
+
$this->items[] = post_type_archive_title( '', false );
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* Adds the items to the trail items array for user (author) archives.
|
676 |
+
*
|
677 |
+
* @since 0.6.0
|
678 |
+
* @access public
|
679 |
+
* @global object $wp_rewrite
|
680 |
+
* @return void
|
681 |
+
*/
|
682 |
+
public function do_user_archive_items() {
|
683 |
+
global $wp_rewrite;
|
684 |
+
|
685 |
+
/* Add $wp_rewrite->front to the trail. */
|
686 |
+
$this->do_rewrite_front_items();
|
687 |
+
|
688 |
+
/* Get the user ID. */
|
689 |
+
$user_id = get_query_var( 'author' );
|
690 |
+
|
691 |
+
/* If $author_base exists, check for parent pages. */
|
692 |
+
if ( !empty( $wp_rewrite->author_base ) )
|
693 |
+
$this->do_path_parents( $wp_rewrite->author_base );
|
694 |
+
|
695 |
+
/* Add the author's display name to the trail end. */
|
696 |
+
if ( is_paged() )
|
697 |
+
$this->items[] = '<a href="'. esc_url( get_author_posts_url( $user_id ) ) . '" title="' . esc_attr( get_the_author_meta( 'display_name', $user_id ) ) . '">' . get_the_author_meta( 'display_name', $user_id ) . '</a>';
|
698 |
+
|
699 |
+
elseif ( true === $this->args['show_title'] )
|
700 |
+
$this->items[] = get_the_author_meta( 'display_name', $user_id );
|
701 |
+
}
|
702 |
+
|
703 |
+
/**
|
704 |
+
* Adds the items to the trail items array for minute + hour archives.
|
705 |
+
*
|
706 |
+
* @since 0.6.0
|
707 |
+
* @access public
|
708 |
+
* @return void
|
709 |
+
*/
|
710 |
+
public function do_minute_hour_archive_items() {
|
711 |
+
|
712 |
+
/* Add $wp_rewrite->front to the trail. */
|
713 |
+
$this->do_rewrite_front_items();
|
714 |
+
|
715 |
+
/* Add the minute + hour item. */
|
716 |
+
if ( true === $this->args['show_title'] )
|
717 |
+
$this->items[] = sprintf( $this->args['labels']['archive_minute_hour'], get_the_time( _x( 'g:i a', 'minute and hour archives time format', 'breadcrumb-trail' ) ) );
|
718 |
+
}
|
719 |
+
|
720 |
+
/**
|
721 |
+
* Adds the items to the trail items array for minute archives.
|
722 |
+
*
|
723 |
+
* @since 0.6.0
|
724 |
+
* @access public
|
725 |
+
* @return void
|
726 |
+
*/
|
727 |
+
public function do_minute_archive_items() {
|
728 |
+
|
729 |
+
/* Add $wp_rewrite->front to the trail. */
|
730 |
+
$this->do_rewrite_front_items();
|
731 |
+
|
732 |
+
/* Add the minute item. */
|
733 |
+
if ( true === $this->args['show_title'] )
|
734 |
+
$this->items[] = sprintf( $this->args['labels']['archive_minute'], get_the_time( _x( 'i', 'minute archives time format', 'breadcrumb-trail' ) ) );
|
735 |
+
}
|
736 |
+
|
737 |
+
/**
|
738 |
+
* Adds the items to the trail items array for hour archives.
|
739 |
+
*
|
740 |
+
* @since 0.6.0
|
741 |
+
* @access public
|
742 |
+
* @return void
|
743 |
+
*/
|
744 |
+
public function do_hour_archive_items() {
|
745 |
+
|
746 |
+
/* Add $wp_rewrite->front to the trail. */
|
747 |
+
$this->do_rewrite_front_items();
|
748 |
+
|
749 |
+
/* Add the hour item. */
|
750 |
+
if ( true === $this->args['show_title'] )
|
751 |
+
$this->items[] = sprintf( $this->args['labels']['archive_hour'], get_the_time( _x( 'g a', 'hour archives time format', 'breadcrumb-trail' ) ) );
|
752 |
+
}
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Adds the items to the trail items array for day archives.
|
756 |
+
*
|
757 |
+
* @since 0.6.0
|
758 |
+
* @access public
|
759 |
+
* @return void
|
760 |
+
*/
|
761 |
+
public function do_day_archive_items() {
|
762 |
+
|
763 |
+
/* Add $wp_rewrite->front to the trail. */
|
764 |
+
$this->do_rewrite_front_items();
|
765 |
+
|
766 |
+
/* Get year, month, and day. */
|
767 |
+
$year = sprintf( $this->args['labels']['archive_year'], get_the_time( _x( 'Y', 'yearly archives date format', 'breadcrumb-trail' ) ) );
|
768 |
+
$month = sprintf( $this->args['labels']['archive_month'], get_the_time( _x( 'F', 'monthly archives date format', 'breadcrumb-trail' ) ) );
|
769 |
+
$day = sprintf( $this->args['labels']['archive_day'], get_the_time( _x( 'j', 'daily archives date format', 'breadcrumb-trail' ) ) );
|
770 |
+
|
771 |
+
/* Add the year and month items. */
|
772 |
+
$this->items[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . esc_attr( $year ) . '">' . $year . '</a>';
|
773 |
+
$this->items[] = '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . esc_attr( $month ) . '">' . $month . '</a>';
|
774 |
+
|
775 |
+
/* Add the day item. */
|
776 |
+
if ( is_paged() )
|
777 |
+
$this->items[] = '<a href="' . get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) . '" title="' . esc_attr( $day ) . '">' . $day . '</a>';
|
778 |
+
|
779 |
+
elseif ( true === $this->args['show_title'] )
|
780 |
+
$this->items[] = $day;
|
781 |
+
}
|
782 |
+
|
783 |
+
/**
|
784 |
+
* Adds the items to the trail items array for week archives.
|
785 |
+
*
|
786 |
+
* @since 0.6.0
|
787 |
+
* @access public
|
788 |
+
* @return void
|
789 |
+
*/
|
790 |
+
public function do_week_archive_items() {
|
791 |
+
|
792 |
+
/* Add $wp_rewrite->front to the trail. */
|
793 |
+
$this->do_rewrite_front_items();
|
794 |
+
|
795 |
+
/* Get the year and week. */
|
796 |
+
$year = sprintf( $this->args['labels']['archive_year'], get_the_time( _x( 'Y', 'yearly archives date format', 'breadcrumb-trail' ) ) );
|
797 |
+
$week = sprintf( $this->args['labels']['archive_week'], get_the_time( _x( 'W', 'weekly archives date format', 'breadcrumb-trail' ) ) );
|
798 |
+
|
799 |
+
/* Add the year item. */
|
800 |
+
$this->items[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . esc_attr( $year ) . '">' . $year . '</a>';
|
801 |
+
|
802 |
+
/* Add the week item. */
|
803 |
+
if ( is_paged() )
|
804 |
+
$this->items[] = get_archives_link( add_query_arg( array( 'm' => get_the_time( 'Y' ), 'w' => get_the_time( 'W' ) ), home_url() ), $week, false );
|
805 |
+
|
806 |
+
elseif ( true === $this->args['show_title'] )
|
807 |
+
$this->items[] = $week;
|
808 |
+
}
|
809 |
+
|
810 |
+
/**
|
811 |
+
* Adds the items to the trail items array for month archives.
|
812 |
+
*
|
813 |
+
* @since 0.6.0
|
814 |
+
* @access public
|
815 |
+
* @return void
|
816 |
+
*/
|
817 |
+
public function do_month_archive_items() {
|
818 |
+
|
819 |
+
/* Add $wp_rewrite->front to the trail. */
|
820 |
+
$this->do_rewrite_front_items();
|
821 |
+
|
822 |
+
/* Get the year and month. */
|
823 |
+
$year = sprintf( $this->args['labels']['archive_year'], get_the_time( _x( 'Y', 'yearly archives date format', 'breadcrumb-trail' ) ) );
|
824 |
+
$month = sprintf( $this->args['labels']['archive_month'], get_the_time( _x( 'F', 'monthly archives date format', 'breadcrumb-trail' ) ) );
|
825 |
+
|
826 |
+
/* Add the year item. */
|
827 |
+
$this->items[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . esc_attr( $year ) . '">' . $year . '</a>';
|
828 |
+
|
829 |
+
/* Add the month item. */
|
830 |
+
if ( is_paged() )
|
831 |
+
$this->items[] = '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . esc_attr( $month ) . '">' . $month . '</a>';
|
832 |
+
|
833 |
+
elseif ( true === $this->args['show_title'] )
|
834 |
+
$this->items[] = $month;
|
835 |
+
}
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Adds the items to the trail items array for year archives.
|
839 |
+
*
|
840 |
+
* @since 0.6.0
|
841 |
+
* @access public
|
842 |
+
* @return void
|
843 |
+
*/
|
844 |
+
public function do_year_archive_items() {
|
845 |
+
|
846 |
+
/* Add $wp_rewrite->front to the trail. */
|
847 |
+
$this->do_rewrite_front_items();
|
848 |
+
|
849 |
+
/* Get the year. */
|
850 |
+
$year = sprintf( $this->args['labels']['archive_year'], get_the_time( _x( 'Y', 'yearly archives date format', 'breadcrumb-trail' ) ) );
|
851 |
+
|
852 |
+
/* Add the year item. */
|
853 |
+
if ( is_paged() )
|
854 |
+
$this->items[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . esc_attr( $year ) . '">' . $year . '</a>';
|
855 |
+
|
856 |
+
elseif ( true === $this->args['show_title'] )
|
857 |
+
$this->items[] = $year;
|
858 |
+
}
|
859 |
+
|
860 |
+
/**
|
861 |
+
* Adds the items to the trail items array for archives that don't have a more specific method
|
862 |
+
* defined in this class.
|
863 |
+
*
|
864 |
+
* @since 0.6.0
|
865 |
+
* @access public
|
866 |
+
* @return void
|
867 |
+
*/
|
868 |
+
public function do_default_archive_items() {
|
869 |
+
|
870 |
+
/* If this is a date-/time-based archive, add $wp_rewrite->front to the trail. */
|
871 |
+
if ( is_date() || is_time() )
|
872 |
+
$this->do_rewrite_front_items();
|
873 |
+
|
874 |
+
if ( true === $this->args['show_title'] )
|
875 |
+
$this->items[] = $this->args['labels']['archives'];
|
876 |
+
}
|
877 |
+
|
878 |
+
/**
|
879 |
+
* Adds the items to the trail items array for search results.
|
880 |
+
*
|
881 |
+
* @since 0.6.0
|
882 |
+
* @access public
|
883 |
+
* @return void
|
884 |
+
*/
|
885 |
+
public function do_search_items() {
|
886 |
+
|
887 |
+
if ( is_paged() )
|
888 |
+
$this->items[] = '<a href="' . get_search_link() . '" title="' . esc_attr( sprintf( $this->args['labels']['search'], get_search_query() ) ) . '">' . sprintf( $this->args['labels']['search'], get_search_query() ) . '</a>';
|
889 |
+
|
890 |
+
elseif ( true === $this->args['show_title'] )
|
891 |
+
$this->items[] = sprintf( $this->args['labels']['search'], get_search_query() );
|
892 |
+
}
|
893 |
+
|
894 |
+
/**
|
895 |
+
* Adds the items to the trail items array for 404 pages.
|
896 |
+
*
|
897 |
+
* @since 0.6.0
|
898 |
+
* @access public
|
899 |
+
* @return void
|
900 |
+
*/
|
901 |
+
public function do_404_items() {
|
902 |
+
|
903 |
+
if ( true === $this->args['show_title'] )
|
904 |
+
$this->items[] = $this->args['labels']['error_404'];
|
905 |
+
}
|
906 |
+
|
907 |
+
/**
|
908 |
+
* Get parent posts by path. Currently, this method only supports getting parents of the 'page'
|
909 |
+
* post type. The goal of this function is to create a clear path back to home given what would
|
910 |
+
* normally be a "ghost" directory. If any page matches the given path, it'll be added.
|
911 |
+
*
|
912 |
+
* @since 0.6.0
|
913 |
+
* @access public
|
914 |
+
* @param string $path The path (slug) to search for posts by.
|
915 |
+
* @return void
|
916 |
+
*/
|
917 |
+
function do_path_parents( $path ) {
|
918 |
+
|
919 |
+
/* Trim '/' off $path in case we just got a simple '/' instead of a real path. */
|
920 |
+
$path = trim( $path, '/' );
|
921 |
+
|
922 |
+
/* If there's no path, return. */
|
923 |
+
if ( empty( $path ) )
|
924 |
+
return;
|
925 |
+
|
926 |
+
/* Get parent post by the path. */
|
927 |
+
$post = get_page_by_path( $path );
|
928 |
+
|
929 |
+
if ( !empty( $post ) ) {
|
930 |
+
$this->do_post_parents( $post->ID );
|
931 |
+
}
|
932 |
+
|
933 |
+
elseif ( is_null( $post ) ) {
|
934 |
+
|
935 |
+
/* Separate post names into separate paths by '/'. */
|
936 |
+
$path = trim( $path, '/' );
|
937 |
+
preg_match_all( "/\/.*?\z/", $path, $matches );
|
938 |
+
|
939 |
+
/* If matches are found for the path. */
|
940 |
+
if ( isset( $matches ) ) {
|
941 |
+
|
942 |
+
/* Reverse the array of matches to search for posts in the proper order. */
|
943 |
+
$matches = array_reverse( $matches );
|
944 |
+
|
945 |
+
/* Loop through each of the path matches. */
|
946 |
+
foreach ( $matches as $match ) {
|
947 |
+
|
948 |
+
/* If a match is found. */
|
949 |
+
if ( isset( $match[0] ) ) {
|
950 |
+
|
951 |
+
/* Get the parent post by the given path. */
|
952 |
+
$path = str_replace( $match[0], '', $path );
|
953 |
+
$post = get_page_by_path( trim( $path, '/' ) );
|
954 |
+
|
955 |
+
/* If a parent post is found, set the $post_id and break out of the loop. */
|
956 |
+
if ( !empty( $post ) && 0 < $post->ID ) {
|
957 |
+
$this->do_post_parents( $post->ID );
|
958 |
+
break;
|
959 |
+
}
|
960 |
+
}
|
961 |
+
}
|
962 |
+
}
|
963 |
+
}
|
964 |
+
}
|
965 |
+
|
966 |
+
/**
|
967 |
+
* Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress
|
968 |
+
* function get_category_parents() but handles any type of taxonomy.
|
969 |
+
*
|
970 |
+
* @since 0.6.0
|
971 |
+
* @param int $term_id ID of the term to get the parents of.
|
972 |
+
* @param string $taxonomy Name of the taxonomy for the given term.
|
973 |
+
* @return void
|
974 |
+
*/
|
975 |
+
function do_term_parents( $term_id, $taxonomy ) {
|
976 |
+
|
977 |
+
/* Set up some default arrays. */
|
978 |
+
$parents = array();
|
979 |
+
|
980 |
+
/* While there is a parent ID, add the parent term link to the $parents array. */
|
981 |
+
while ( $term_id ) {
|
982 |
+
|
983 |
+
/* Get the parent term. */
|
984 |
+
$term = get_term( $term_id, $taxonomy );
|
985 |
+
|
986 |
+
/* Add the formatted term link to the array of parent terms. */
|
987 |
+
$parents[] = '<a href="' . get_term_link( $term, $taxonomy ) . '" title="' . esc_attr( $term->name ) . '">' . $term->name . '</a>';
|
988 |
+
|
989 |
+
/* Set the parent term's parent as the parent ID. */
|
990 |
+
$term_id = $term->parent;
|
991 |
+
}
|
992 |
+
|
993 |
+
/* If we have parent terms, reverse the array to put them in the proper order for the trail. */
|
994 |
+
if ( !empty( $parents ) )
|
995 |
+
$this->items = array_merge( $this->items, $parents );
|
996 |
+
}
|
997 |
+
|
998 |
+
/**
|
999 |
+
* Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of
|
1000 |
+
* hackish for now because we're checking for specific %tag% examples and only doing it for the 'post'
|
1001 |
+
* post type. In the future, maybe it'll handle a wider variety of possibilities, especially for custom post
|
1002 |
+
* types.
|
1003 |
+
*
|
1004 |
+
* @since 0.6.0
|
1005 |
+
* @access public
|
1006 |
+
* @param int $post_id ID of the post whose parents we want.
|
1007 |
+
* @param string $path Path of a potential parent page.
|
1008 |
+
* @param array $args Mixed arguments for the menu.
|
1009 |
+
* @return array
|
1010 |
+
*/
|
1011 |
+
public function map_rewrite_tags( $post_id, $path ) {
|
1012 |
+
|
1013 |
+
/* Get the post based on the post ID. */
|
1014 |
+
$post = get_post( $post_id );
|
1015 |
+
|
1016 |
+
/* If no post is returned, an error is returned, or the post does not have a 'post' post type, return. */
|
1017 |
+
if ( empty( $post ) || is_wp_error( $post ) || 'post' !== $post->post_type )
|
1018 |
+
return $trail;
|
1019 |
+
|
1020 |
+
/* Trim '/' from both sides of the $path. */
|
1021 |
+
$path = trim( $path, '/' );
|
1022 |
+
|
1023 |
+
/* Split the $path into an array of strings. */
|
1024 |
+
$matches = explode( '/', $path );
|
1025 |
+
|
1026 |
+
/* If matches are found for the path. */
|
1027 |
+
if ( is_array( $matches ) ) {
|
1028 |
+
|
1029 |
+
/* Loop through each of the matches, adding each to the $trail array. */
|
1030 |
+
foreach ( $matches as $match ) {
|
1031 |
+
|
1032 |
+
/* Trim any '/' from the $match. */
|
1033 |
+
$tag = trim( $match, '/' );
|
1034 |
+
|
1035 |
+
/* If using the %year% tag, add a link to the yearly archive. */
|
1036 |
+
if ( '%year%' == $tag )
|
1037 |
+
$this->items[] = '<a href="' . get_year_link( get_the_time( 'Y', $post_id ) ) . '">' . sprintf( $this->args['labels']['archive_year'], get_the_time( _x( 'Y', 'yearly archives date format', 'breadcrumb-trail' ) ) ) . '</a>';
|
1038 |
+
|
1039 |
+
/* If using the %monthnum% tag, add a link to the monthly archive. */
|
1040 |
+
elseif ( '%monthnum%' == $tag )
|
1041 |
+
$this->items[] = '<a href="' . get_month_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ) ) . '">' . sprintf( $this->args['labels']['archive_month'], get_the_time( _x( 'F', 'monthly archives date format', 'breadcrumb-trail' ) ) ) . '</a>';
|
1042 |
+
|
1043 |
+
/* If using the %day% tag, add a link to the daily archive. */
|
1044 |
+
elseif ( '%day%' == $tag )
|
1045 |
+
$this->items[] = '<a href="' . get_day_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ), get_the_time( 'd', $post_id ) ) . '">' . sprintf( $this->args['labels']['archive_day'], get_the_time( _x( 'j', 'daily archives date format', 'breadcrumb-trail' ) ) ) . '</a>';
|
1046 |
+
|
1047 |
+
/* If using the %author% tag, add a link to the post author archive. */
|
1048 |
+
elseif ( '%author%' == $tag )
|
1049 |
+
$this->items[] = '<a href="' . get_author_posts_url( $post->post_author ) . '" title="' . esc_attr( get_the_author_meta( 'display_name', $post->post_author ) ) . '">' . get_the_author_meta( 'display_name', $post->post_author ) . '</a>';
|
1050 |
+
|
1051 |
+
/* If using the %category% tag, add a link to the first category archive to match permalinks. */
|
1052 |
+
elseif ( '%category%' == $tag ) {
|
1053 |
+
|
1054 |
+
/* Force override terms in this post type. */
|
1055 |
+
$this->args['post_taxonomy'][ $post->post_type ] = false;
|
1056 |
+
|
1057 |
+
/* Get the post categories. */
|
1058 |
+
$terms = get_the_category( $post_id );
|
1059 |
+
|
1060 |
+
/* Check that categories were returned. */
|
1061 |
+
if ( $terms ) {
|
1062 |
+
|
1063 |
+
/* Sort the terms by ID and get the first category. */
|
1064 |
+
usort( $terms, '_usort_terms_by_ID' );
|
1065 |
+
$term = get_term( $terms[0], 'category' );
|
1066 |
+
|
1067 |
+
/* If the category has a parent, add the hierarchy to the trail. */
|
1068 |
+
if ( 0 < $term->parent )
|
1069 |
+
$this->do_term_parents( $term->parent, 'category' );
|
1070 |
+
|
1071 |
+
/* Add the category archive link to the trail. */
|
1072 |
+
$this->items[] = '<a href="' . get_term_link( $term, 'category' ) . '" title="' . esc_attr( $term->name ) . '">' . $term->name . '</a>';
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
/**
|
1081 |
+
* Extends the Breadcrumb_Trail class for bbPress. Only use this if bbPress is in use. This should
|
1082 |
+
* serve as an example for other plugin developers to build custom breadcrumb items.
|
1083 |
+
*
|
1084 |
+
* @since 0.6.0
|
1085 |
+
* @access public
|
1086 |
+
*/
|
1087 |
+
class PSP_bbPress_Breadcrumb_Trail extends PSP_Breadcrumb_Trail {
|
1088 |
+
|
1089 |
+
/**
|
1090 |
+
* Runs through the various bbPress conditional tags to check the current page being viewed. Once
|
1091 |
+
* a condition is met, add items to the $items array.
|
1092 |
+
*
|
1093 |
+
* @since 0.6.0
|
1094 |
+
* @access public
|
1095 |
+
* @return void
|
1096 |
+
*/
|
1097 |
+
public function do_trail_items() {
|
1098 |
+
|
1099 |
+
/* Add the network and site home links. */
|
1100 |
+
$this->do_network_home_link();
|
1101 |
+
$this->do_site_home_link();
|
1102 |
+
|
1103 |
+
/* Get the forum post type object. */
|
1104 |
+
$post_type_object = get_post_type_object( bbp_get_forum_post_type() );
|
1105 |
+
|
1106 |
+
/* If not viewing the forum root/archive page and a forum archive exists, add it. */
|
1107 |
+
if ( !empty( $post_type_object->has_archive ) && !bbp_is_forum_archive() )
|
1108 |
+
$this->items[] = '<a href="' . get_post_type_archive_link( bbp_get_forum_post_type() ) . '">' . bbp_get_forum_archive_title() . '</a>';
|
1109 |
+
|
1110 |
+
/* If viewing the forum root/archive. */
|
1111 |
+
if ( bbp_is_forum_archive() ) {
|
1112 |
+
|
1113 |
+
if ( true === $this->args['show_title'] )
|
1114 |
+
$this->items[] = bbp_get_forum_archive_title();
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
/* If viewing the topics archive. */
|
1118 |
+
elseif ( bbp_is_topic_archive() ) {
|
1119 |
+
|
1120 |
+
if ( true === $this->args['show_title'] )
|
1121 |
+
$this->items[] = bbp_get_topic_archive_title();
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
/* If viewing a topic tag archive. */
|
1125 |
+
elseif ( bbp_is_topic_tag() ) {
|
1126 |
+
|
1127 |
+
if ( true === $this->args['show_title'] )
|
1128 |
+
$this->items[] = bbp_get_topic_tag_name();
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/* If viewing a topic tag edit page. */
|
1132 |
+
elseif ( bbp_is_topic_tag_edit() ) {
|
1133 |
+
$this->items[] = '<a href="' . bbp_get_topic_tag_link() . '">' . bbp_get_topic_tag_name() . '</a>';
|
1134 |
+
|
1135 |
+
if ( true === $this->args['show_title'] )
|
1136 |
+
$this->items[] = __( 'Edit', 'breadcrumb-trail' );
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
/* If viewing a "view" page. */
|
1140 |
+
elseif ( bbp_is_single_view() ) {
|
1141 |
+
|
1142 |
+
if ( true === $this->args['show_title'] )
|
1143 |
+
$this->items[] = bbp_get_view_title();
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
/* If viewing a single topic page. */
|
1147 |
+
elseif ( bbp_is_single_topic() ) {
|
1148 |
+
|
1149 |
+
/* Get the queried topic. */
|
1150 |
+
$topic_id = get_queried_object_id();
|
1151 |
+
|
1152 |
+
/* Get the parent items for the topic, which would be its forum (and possibly forum grandparents). */
|
1153 |
+
$this->do_post_parents( bbp_get_topic_forum_id( $topic_id ) );
|
1154 |
+
|
1155 |
+
/* If viewing a split, merge, or edit topic page, show the link back to the topic. Else, display topic title. */
|
1156 |
+
if ( bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_topic_edit() )
|
1157 |
+
$this->items[] = '<a href="' . bbp_get_topic_permalink( $topic_id ) . '">' . bbp_get_topic_title( $topic_id ) . '</a>';
|
1158 |
+
|
1159 |
+
elseif ( true === $this->args['show_title'] )
|
1160 |
+
$this->items[] = bbp_get_topic_title( $topic_id );
|
1161 |
+
|
1162 |
+
/* If viewing a topic split page. */
|
1163 |
+
if ( bbp_is_topic_split() && true === $this->args['show_title'] )
|
1164 |
+
$this->items[] = __( 'Split', 'breadcrumb-trail' );
|
1165 |
+
|
1166 |
+
/* If viewing a topic merge page. */
|
1167 |
+
elseif ( bbp_is_topic_merge() && true === $this->args['show_title'] )
|
1168 |
+
$this->items[] = __( 'Merge', 'breadcrumb-trail' );
|
1169 |
+
|
1170 |
+
/* If viewing a topic edit page. */
|
1171 |
+
elseif ( bbp_is_topic_edit() && true === $this->args['show_title'] )
|
1172 |
+
$this->items[] = __( 'Edit', 'breadcrumb-trail' );
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
/* If viewing a single reply page. */
|
1176 |
+
elseif ( bbp_is_single_reply() ) {
|
1177 |
+
|
1178 |
+
/* Get the queried reply object ID. */
|
1179 |
+
$reply_id = get_queried_object_id();
|
1180 |
+
|
1181 |
+
/* Get the parent items for the reply, which should be its topic. */
|
1182 |
+
$this->do_post_parents( bbp_get_reply_topic_id( $reply_id ) );
|
1183 |
+
|
1184 |
+
/* If viewing a reply edit page, link back to the reply. Else, display the reply title. */
|
1185 |
+
if ( bbp_is_reply_edit() ) {
|
1186 |
+
$this->items[] = '<a href="' . bbp_get_reply_url( $reply_id ) . '">' . bbp_get_reply_title( $reply_id ) . '</a>';
|
1187 |
+
|
1188 |
+
if ( true === $this->args['show_title'] )
|
1189 |
+
$this->items[] = __( 'Edit', 'breadcrumb-trail' );
|
1190 |
+
|
1191 |
+
} elseif ( true === $this->args['show_title'] ) {
|
1192 |
+
$this->items[] = bbp_get_reply_title( $reply_id );
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
/* If viewing a single forum. */
|
1198 |
+
elseif ( bbp_is_single_forum() ) {
|
1199 |
+
|
1200 |
+
/* Get the queried forum ID and its parent forum ID. */
|
1201 |
+
$forum_id = get_queried_object_id();
|
1202 |
+
$forum_parent_id = bbp_get_forum_parent_id( $forum_id );
|
1203 |
+
|
1204 |
+
/* If the forum has a parent forum, get its parent(s). */
|
1205 |
+
if ( 0 !== $forum_parent_id)
|
1206 |
+
$this->do_post_parents( $forum_parent_id );
|
1207 |
+
|
1208 |
+
/* Add the forum title to the end of the trail. */
|
1209 |
+
if ( true === $this->args['show_title'] )
|
1210 |
+
$this->items[] = bbp_get_forum_title( $forum_id );
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
/* If viewing a user page or user edit page. */
|
1214 |
+
elseif ( bbp_is_single_user() || bbp_is_single_user_edit() ) {
|
1215 |
+
|
1216 |
+
if ( bbp_is_single_user_edit() ) {
|
1217 |
+
$this->items[] = '<a href="' . bbp_get_user_profile_url() . '">' . bbp_get_displayed_user_field( 'display_name' ) . '</a>';
|
1218 |
+
|
1219 |
+
if ( true === $this->args['show_title'] )
|
1220 |
+
$this->items[] = __( 'Edit', 'breadcrumb-trail' );
|
1221 |
+
} elseif ( true === $this->args['show_title'] ) {
|
1222 |
+
$this->items[] = bbp_get_displayed_user_field( 'display_name' );
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
/* Return the bbPress breadcrumb trail items. */
|
1227 |
+
$this->items = apply_filters( 'psp_breadcrumb_trail_get_bbpress_items', $this->items, $this->args );
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
?>
|
psp-include/generators/css/pspsb.css
ADDED
@@ -0,0 +1,230 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*=========================
|
2 |
+
Icons
|
3 |
+
================= */
|
4 |
+
/*.badge {
|
5 |
+
background-color: #FFFFFF !important;
|
6 |
+
color: #111 !important;
|
7 |
+
margin:0 auto 0 auto;
|
8 |
+
padding: 3px;
|
9 |
+
-moz-border-radius:50%;
|
10 |
+
-webkit-border-radius:50%;
|
11 |
+
border-radius:50%;
|
12 |
+
}*/
|
13 |
+
.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#111 !important;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#fff !important;border-radius:10px}
|
14 |
+
.social-flat .badge:empty{display:none}
|
15 |
+
.lf{color: #ccc !important;}
|
16 |
+
|
17 |
+
.btn-rss {
|
18 |
+
background-color: #F56505;
|
19 |
+
color:#fff;
|
20 |
+
}
|
21 |
+
.btn-facebook {
|
22 |
+
background-color:#3B5998;
|
23 |
+
color:#fff;
|
24 |
+
}
|
25 |
+
.btn-twitter {
|
26 |
+
background-color:#33ccff;
|
27 |
+
color:#fff;
|
28 |
+
}
|
29 |
+
.btn-google {
|
30 |
+
background-color:#BD3518;
|
31 |
+
color:#fff;
|
32 |
+
}
|
33 |
+
.btn-pinterest {
|
34 |
+
background-color:#D60009;
|
35 |
+
color:#fff;
|
36 |
+
}
|
37 |
+
.btn-email {
|
38 |
+
background-color:#FFC90E;
|
39 |
+
color:#fff;
|
40 |
+
}
|
41 |
+
.btn-linkedin {
|
42 |
+
background-color:#007bb7;
|
43 |
+
color:#fff;
|
44 |
+
}
|
45 |
+
.social-flat .btn-total {
|
46 |
+
background-color:#519A24;
|
47 |
+
color:#fff;
|
48 |
+
}
|
49 |
+
|
50 |
+
ul.pspss-buttons {
|
51 |
+
margin: 0;
|
52 |
+
padding: 0;
|
53 |
+
list-style-type: none;
|
54 |
+
font-size: 150%;//32px;
|
55 |
+
line-height: 1.5em; }
|
56 |
+
ul.pspss-buttons li {
|
57 |
+
display: inline-block;
|
58 |
+
margin: 0; }
|
59 |
+
ul.pspss-buttons a {
|
60 |
+
display: inline-block;
|
61 |
+
/*padding-right: 0.25em;
|
62 |
+
padding-bottom: 0.5em;*/
|
63 |
+
text-decoration: none;
|
64 |
+
color: #ffffff;
|
65 |
+
border: none; }
|
66 |
+
|
67 |
+
.pspss-image-wrap {
|
68 |
+
position: relative;
|
69 |
+
display: inline-block;
|
70 |
+
width: auto;
|
71 |
+
line-height: 0;
|
72 |
+
max-width: 100%; }
|
73 |
+
.pspss-image-wrap > a {
|
74 |
+
display: inline-block;
|
75 |
+
max-width: 100%; }
|
76 |
+
.pspss-image-wrap:hover .pspss-buttons, .pspss-image-wrap:active .pspss-buttons, .pspss-image-wrap:focus .pspss-buttons {
|
77 |
+
opacity: 1;
|
78 |
+
visibility: visible; }
|
79 |
+
.pspss-image-wrap .pspss-buttons {
|
80 |
+
position: absolute;
|
81 |
+
top: 0;
|
82 |
+
right: 0;
|
83 |
+
opacity: 1;
|
84 |
+
margin-bottom: 0;
|
85 |
+
visibility: hidden;
|
86 |
+
-webkit-transition: opacity 0.2s ease;
|
87 |
+
transition: opacity 0.2s ease; }
|
88 |
+
|
89 |
+
/* social icons */
|
90 |
+
ul.social-network {
|
91 |
+
list-style: none;
|
92 |
+
display: inline;
|
93 |
+
margin-left:0 !important;
|
94 |
+
padding: 0;
|
95 |
+
}
|
96 |
+
ul.social-network li {
|
97 |
+
display: inline;
|
98 |
+
margin: 5px !important;
|
99 |
+
}
|
100 |
+
|
101 |
+
ul.social-flat li a {
|
102 |
+
display:inline-block;
|
103 |
+
width: 90px !important; //60px
|
104 |
+
max-width: 15% !important;
|
105 |
+
height:30px !important;
|
106 |
+
text-align: center !important;
|
107 |
+
vertical-align: middle !important;
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
.social-flat li a i {
|
112 |
+
margin:0;
|
113 |
+
line-height:30px;
|
114 |
+
text-align: center;
|
115 |
+
}
|
116 |
+
|
117 |
+
ul.with-text li a {
|
118 |
+
width: 150px !important; //60px
|
119 |
+
max-width: 20% !important;
|
120 |
+
}
|
121 |
+
|
122 |
+
/* social icons */
|
123 |
+
.social-network a.icoRss {
|
124 |
+
background-color: #F56505;
|
125 |
+
}
|
126 |
+
.social-network a.icoFacebook {
|
127 |
+
background-color:#3B5998;
|
128 |
+
}
|
129 |
+
.social-network a.icoTwitter {
|
130 |
+
background-color:#33ccff;
|
131 |
+
}
|
132 |
+
.social-network a.icoGoogle {
|
133 |
+
background-color:#BD3518;
|
134 |
+
}
|
135 |
+
.social-network a.icoPinterest {
|
136 |
+
background-color:#D60009;
|
137 |
+
}
|
138 |
+
.social-network a.icoVimeo {
|
139 |
+
background-color:#0590B8;
|
140 |
+
}
|
141 |
+
.social-network a.icoEmail {
|
142 |
+
background-color:#FFC90E;
|
143 |
+
}
|
144 |
+
.social-network a.icoLinkedin {
|
145 |
+
background-color:#007bb7;
|
146 |
+
}
|
147 |
+
/*.social-network a.icoRss:hover i, .social-network a.icoFacebook:hover i, .social-network a.icoTwitter:hover i,
|
148 |
+
.social-network a.icoGoogle:hover i, .social-network a.icoVimeo:hover i, .social-network a.icoLinkedin:hover i,a.icoEmail:hover i {
|
149 |
+
color:#fff;
|
150 |
+
}*/
|
151 |
+
.social-network a.icoRss:hover, .social-network a.icoFacebook:hover, .social-network a.icoTwitter:hover,
|
152 |
+
.social-network a.icoGoogle:hover, .social-network a.icoPinterest:hover, .social-network a.icoVimeo:hover, .social-network a.icoLinkedin:hover,a.icoEmail:hover {
|
153 |
+
color:#fff;
|
154 |
+
}
|
155 |
+
a.socialIcon:hover, .socialHoverClass {
|
156 |
+
color:#44BCDD;
|
157 |
+
}
|
158 |
+
|
159 |
+
.social-circle li a {
|
160 |
+
display:inline-block;
|
161 |
+
position:relative;
|
162 |
+
//margin:0 auto 0 auto;
|
163 |
+
margin-bottom:10px;
|
164 |
+
margin-top:10px;
|
165 |
+
-moz-border-radius:50%;
|
166 |
+
-webkit-border-radius:50%;
|
167 |
+
border-radius:50%;
|
168 |
+
text-align:center;
|
169 |
+
width: 50px;
|
170 |
+
height: 50px;
|
171 |
+
vertical-align:top;
|
172 |
+
font-size:30px;
|
173 |
+
}
|
174 |
+
.social-circle li a.btn-total {
|
175 |
+
padding-top:15px; !important;
|
176 |
+
}
|
177 |
+
.social-circle li a.btn-total span.badge {
|
178 |
+
background: transparent !important;
|
179 |
+
font-size:15px;
|
180 |
+
}
|
181 |
+
.social-circle li a i {
|
182 |
+
margin:5px;
|
183 |
+
line-height:40px;
|
184 |
+
text-align: center;
|
185 |
+
}
|
186 |
+
|
187 |
+
.social-circle li a:hover i, .triggeredHover {
|
188 |
+
-moz-transform: rotate(360deg);
|
189 |
+
-webkit-transform: rotate(360deg);
|
190 |
+
-ms--transform: rotate(360deg);
|
191 |
+
transform: rotate(360deg);
|
192 |
+
-webkit-transition: all 0.2s;
|
193 |
+
-moz-transition: all 0.2s;
|
194 |
+
-o-transition: all 0.2s;
|
195 |
+
-ms-transition: all 0.2s;
|
196 |
+
transition: all 0.2s;
|
197 |
+
}
|
198 |
+
|
199 |
+
.social-circle i {
|
200 |
+
color: #fff;
|
201 |
+
-webkit-transition: all 0.8s;
|
202 |
+
-moz-transition: all 0.8s;
|
203 |
+
-o-transition: all 0.8s;
|
204 |
+
-ms-transition: all 0.8s;
|
205 |
+
transition: all 0.8s;
|
206 |
+
}
|
207 |
+
|
208 |
+
.social-flat li a:hover i, .triggeredHover {
|
209 |
+
-moz-transform: rotate(360deg);
|
210 |
+
-webkit-transform: rotate(360deg);
|
211 |
+
-ms--transform: rotate(360deg);
|
212 |
+
transform: rotate(360deg);
|
213 |
+
-webkit-transition: all 0.2s;
|
214 |
+
-moz-transition: all 0.2s;
|
215 |
+
-o-transition: all 0.2s;
|
216 |
+
-ms-transition: all 0.2s;
|
217 |
+
transition: all 0.2s;
|
218 |
+
}
|
219 |
+
.social-flat i {
|
220 |
+
color: #fff;
|
221 |
+
-webkit-transition: all 0.8s;
|
222 |
+
-moz-transition: all 0.8s;
|
223 |
+
-o-transition: all 0.8s;
|
224 |
+
-ms-transition: all 0.8s;
|
225 |
+
transition: all 0.8s;
|
226 |
+
}
|
227 |
+
|
228 |
+
a {
|
229 |
+
//background-color: #D3D3D3;
|
230 |
+
}
|
psp-include/generators/psp_home_others_seo_metas.php
ADDED
@@ -0,0 +1,1100 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
+
Description: Complete SEO solution for your Wordpress blog.
|
6 |
+
Author: Rajesh - Techblissonline
|
7 |
+
Author URI: https://techblissonline.com/
|
8 |
+
*/
|
9 |
+
|
10 |
+
class PspHomeOthersSeoMetas {
|
11 |
+
|
12 |
+
//public $plugin_settings_name = "psp-pts-seo-metas";
|
13 |
+
|
14 |
+
private static $obj_handle = null;
|
15 |
+
|
16 |
+
protected $index_tag = "index,follow";
|
17 |
+
protected $noindex_tag = "noindex";
|
18 |
+
protected $noindex_nofollow_tag = "noindex,nofollow";
|
19 |
+
protected $noodp_tag = "noodp";
|
20 |
+
protected $noydir_tag = "noydir";
|
21 |
+
protected $noarchive_tag = "noarchive";
|
22 |
+
protected $nosnippet_tag = "nosnippet";
|
23 |
+
|
24 |
+
protected $sitename = "";
|
25 |
+
protected $sitedescription = "";
|
26 |
+
|
27 |
+
protected $psp_helper;
|
28 |
+
protected $psp_home_settings = array();
|
29 |
+
protected $psp_author_archive_settings = array();
|
30 |
+
protected $psp_date_archive_settings = array();
|
31 |
+
protected $psp_posttype_archive_settings = array();
|
32 |
+
protected $psp_search_result_settings = array();
|
33 |
+
protected $psp_sitewide_settungs = array();
|
34 |
+
protected $psp_404_settings = array();
|
35 |
+
|
36 |
+
public $home_description = "";
|
37 |
+
public $home_keywords = "";
|
38 |
+
public $home_title = "";
|
39 |
+
public $home_can_link = "";
|
40 |
+
public $archive_can_link = "";
|
41 |
+
|
42 |
+
public $search_results_title = "";
|
43 |
+
public $author_archive_title = "";
|
44 |
+
public $date_archive_title = "";
|
45 |
+
public $pt_archive_title = "";
|
46 |
+
|
47 |
+
public static function get_instance() {
|
48 |
+
|
49 |
+
if ( null == self::$obj_handle ) {
|
50 |
+
self::$obj_handle = new self;
|
51 |
+
}
|
52 |
+
|
53 |
+
return self::$obj_handle;
|
54 |
+
|
55 |
+
} // end get_instance;
|
56 |
+
//can be made private for singleton pattern
|
57 |
+
public function __construct() {
|
58 |
+
|
59 |
+
$psp_helper_instance = PspHelper::get_instance();
|
60 |
+
$this->psp_helper = $psp_helper_instance;
|
61 |
+
|
62 |
+
//$this->psp_home_settings = get_option("psp_home_settings");
|
63 |
+
//$this->psp_search_result_settings = get_option("psp_search_result_settings");
|
64 |
+
//$this->psp_author_archive_settings = get_option("psp_author_archive_settings");
|
65 |
+
//$this->psp_date_archive_settings = get_option("psp_date_archive_settings");
|
66 |
+
//$this->psp_posttype_archive_settings = get_option("psp_posttype_archive_settings");
|
67 |
+
$this->psp_sitewide_settungs = get_option("psp_sitewide_settings");
|
68 |
+
$this->psp_404_settings = get_option("psp_404_page_settings");
|
69 |
+
|
70 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
71 |
+
$this->sitedescription = $psp_helper_instance->get_sitedescription();
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
private function get_home_robots_meta() {
|
76 |
+
|
77 |
+
$robots_meta = "";
|
78 |
+
$robots_meta_string = "";
|
79 |
+
$psp_home_settings = array();
|
80 |
+
$psp_settings = array();
|
81 |
+
|
82 |
+
if (!empty($this->psp_home_settings)) $psp_home_settings = $this->psp_home_settings;
|
83 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
84 |
+
|
85 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
86 |
+
$robots_meta .= $this->noindex_tag;
|
87 |
+
} else {
|
88 |
+
$robots_meta .= $this->index_tag;
|
89 |
+
}
|
90 |
+
|
91 |
+
//$psp_noarchive = htmlspecialchars(stripcslashes($psp_home_settings['noarchive']));
|
92 |
+
$psp_noarchive = isset($psp_home_settings['noarchive']) ? htmlspecialchars(stripcslashes($psp_home_settings['noarchive'])) : "";
|
93 |
+
|
94 |
+
if ($psp_noarchive) {
|
95 |
+
if ($robots_meta != "") {
|
96 |
+
$robots_meta .= ",";
|
97 |
+
}
|
98 |
+
|
99 |
+
$robots_meta .= $this->noarchive_tag;
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
//$psp_nosnippet = htmlspecialchars(stripcslashes($psp_home_settings['nosnippet']));
|
104 |
+
$psp_nosnippet = isset($psp_home_settings['nosnippet']) ? htmlspecialchars(stripcslashes($psp_home_settings['nosnippet'])) : "";
|
105 |
+
|
106 |
+
if ($psp_nosnippet) {
|
107 |
+
if ($robots_meta != "") {
|
108 |
+
$robots_meta .= ",";
|
109 |
+
}
|
110 |
+
|
111 |
+
$robots_meta .= $this->nosnippet_tag;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
116 |
+
|
117 |
+
if ($robots_meta != "") {
|
118 |
+
$robots_meta .= ",";
|
119 |
+
}
|
120 |
+
|
121 |
+
$robots_meta .= $this->noodp_tag;
|
122 |
+
}
|
123 |
+
|
124 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
125 |
+
|
126 |
+
if ($robots_meta != "") {
|
127 |
+
$robots_meta .= ",";
|
128 |
+
}
|
129 |
+
|
130 |
+
$robots_meta .= $this->noydir_tag;
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
if ($robots_meta != "" ) {
|
135 |
+
|
136 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
137 |
+
$robots_meta_string .= "\r\n";
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
return $robots_meta_string;
|
142 |
+
|
143 |
+
} // end get_home_robots_meta;
|
144 |
+
|
145 |
+
public function get_home_description_meta() {
|
146 |
+
|
147 |
+
$desc_meta_string = "";
|
148 |
+
$keyword_meta_string = "";
|
149 |
+
$psp_home_settings = array();
|
150 |
+
$psp_settings = array();
|
151 |
+
|
152 |
+
if (!empty($this->psp_home_settings)) $psp_home_settings = $this->psp_home_settings;
|
153 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
154 |
+
|
155 |
+
|
156 |
+
$description = isset($psp_home_settings['description']) ? trim(stripcslashes($this->psp_helper->internationalize($psp_home_settings['description']))) : ""; // home_description
|
157 |
+
|
158 |
+
if (empty ($description)) $description = trim(stripcslashes($this->psp_helper->internationalize(get_option('aiosp_description_format')))); // home_description
|
159 |
+
|
160 |
+
if (!empty($description)) {
|
161 |
+
$description = str_replace('%site_name%', $this->sitename, $description);
|
162 |
+
$description = str_replace('%site_description%', $this->sitedescription, $description);
|
163 |
+
$description = str_replace('%sep%', $psp_settings['separator'], $description);
|
164 |
+
}
|
165 |
+
|
166 |
+
if (empty ($description)) $description = $this->sitedescription;
|
167 |
+
|
168 |
+
if (!empty($description)) {
|
169 |
+
|
170 |
+
$this->home_description = stripcslashes($description);
|
171 |
+
$desc_meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", esc_attr($description));
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
//check for use_meta_keywords
|
176 |
+
if ( isset($psp_settings['use_meta_keywords']) && $psp_settings['use_meta_keywords'] ) {
|
177 |
+
|
178 |
+
//if ( isset($psp_home_settings['keywords']) && $psp_home_settings['keywords'] ) {
|
179 |
+
|
180 |
+
$keywords = isset($psp_home_settings['keywords']) ? trim($this->psp_helper->internationalize($psp_home_settings['keywords'])) : "";
|
181 |
+
|
182 |
+
//} else {
|
183 |
+
//$keywords = $this->get_all_keywords();
|
184 |
+
//}
|
185 |
+
|
186 |
+
if (!empty($keywords)) {
|
187 |
+
//$keywords = $this->psp_helper->internationalize($keywords);
|
188 |
+
$this->home_keywords = $keywords;
|
189 |
+
$keyword_meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", esc_attr($keywords));
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
if (isset($desc_meta_string) && $desc_meta_string != "" && isset($keyword_meta_string) && $keyword_meta_string != "") {
|
194 |
+
$desc_meta_string .= "\r\n";
|
195 |
+
//$keyword_meta_string .= "\r\n";
|
196 |
+
}
|
197 |
+
|
198 |
+
return $desc_meta_string.$keyword_meta_string;
|
199 |
+
|
200 |
+
} // end get_home_description_meta;
|
201 |
+
|
202 |
+
private function get_home_canonical_meta($canonical) {
|
203 |
+
|
204 |
+
$canonical_meta_string = "";
|
205 |
+
|
206 |
+
$home_link = get_option('home');
|
207 |
+
$can_link = $this->psp_helper->paged_link($home_link);
|
208 |
+
$can_link = trailingslashit($can_link);
|
209 |
+
|
210 |
+
$this->home_can_link = $can_link;
|
211 |
+
|
212 |
+
if ($can_link != '' && ($canonical)) {
|
213 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
214 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
215 |
+
}
|
216 |
+
|
217 |
+
return $canonical_meta_string;
|
218 |
+
|
219 |
+
} // end get_home_canonical_meta;
|
220 |
+
|
221 |
+
private function get_search_robots_meta() {
|
222 |
+
|
223 |
+
$robots_meta = "";
|
224 |
+
$robots_meta_string = "";
|
225 |
+
$psp_search_result_settings = array();
|
226 |
+
$psp_settings = array();
|
227 |
+
|
228 |
+
if (!empty($this->psp_search_result_settings)) $psp_search_result_settings = $this->psp_search_result_settings;
|
229 |
+
//$psp_search_result_settings = get_option("psp_search_result_settings");
|
230 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
231 |
+
|
232 |
+
if (isset($psp_search_result_settings['robots']) && $psp_search_result_settings['robots']) {
|
233 |
+
$robots_meta .= $this->noindex_tag;
|
234 |
+
} else {
|
235 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
236 |
+
//if ($psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
237 |
+
$robots_meta .= $this->noindex_tag;
|
238 |
+
} else {
|
239 |
+
$robots_meta .= $this->index_tag;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
$psp_noarchive = isset($psp_search_result_settings['noarchive']) ? htmlspecialchars(stripcslashes($psp_search_result_settings['noarchive'])) : "";
|
244 |
+
|
245 |
+
if ($psp_noarchive) {
|
246 |
+
if ($robots_meta != "") {
|
247 |
+
$robots_meta .= ",";
|
248 |
+
}
|
249 |
+
|
250 |
+
$robots_meta .= $this->noarchive_tag;
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
$psp_nosnippet = isset($psp_search_result_settings['nosnippet']) ? htmlspecialchars(stripcslashes($psp_search_result_settings['nosnippet'])) : "";
|
255 |
+
|
256 |
+
if ($psp_nosnippet) {
|
257 |
+
if ($robots_meta != "") {
|
258 |
+
$robots_meta .= ",";
|
259 |
+
}
|
260 |
+
|
261 |
+
$robots_meta .= $this->nosnippet_tag;
|
262 |
+
|
263 |
+
}
|
264 |
+
|
265 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
266 |
+
|
267 |
+
if ($robots_meta != "") {
|
268 |
+
$robots_meta .= ",";
|
269 |
+
}
|
270 |
+
|
271 |
+
$robots_meta .= $this->noodp_tag;
|
272 |
+
}
|
273 |
+
|
274 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
275 |
+
|
276 |
+
if ($robots_meta != "") {
|
277 |
+
$robots_meta .= ",";
|
278 |
+
}
|
279 |
+
|
280 |
+
$robots_meta .= $this->noydir_tag;
|
281 |
+
|
282 |
+
}
|
283 |
+
|
284 |
+
if ($robots_meta != "" ) {
|
285 |
+
|
286 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
287 |
+
//$robots_meta_string .= "\n";
|
288 |
+
|
289 |
+
}
|
290 |
+
|
291 |
+
return $robots_meta_string;
|
292 |
+
|
293 |
+
} // end get_search_robots_meta;
|
294 |
+
|
295 |
+
private function get_search_canonical_meta($canonical) {
|
296 |
+
|
297 |
+
$canonical_meta_string = "";
|
298 |
+
return $canonical_meta_string;
|
299 |
+
|
300 |
+
} // end get_search_canonical_meta;
|
301 |
+
|
302 |
+
private function get_author_archives_robots_meta() {
|
303 |
+
|
304 |
+
$robots_meta = "";
|
305 |
+
$robots_meta_string = "";
|
306 |
+
$psp_author_archive_settings = array();
|
307 |
+
$psp_settings = array();
|
308 |
+
|
309 |
+
if (!empty($this->psp_author_archive_settings)) $psp_author_archive_settings = $this->psp_author_archive_settings;
|
310 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
311 |
+
|
312 |
+
if (isset($psp_author_archive_settings['robots']) && $psp_author_archive_settings['robots']) {
|
313 |
+
$robots_meta .= $this->noindex_tag;
|
314 |
+
} else {
|
315 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
316 |
+
//if ($psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
317 |
+
$robots_meta .= $this->noindex_tag;
|
318 |
+
} else {
|
319 |
+
$robots_meta .= $this->index_tag;
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
$psp_noarchive = isset($psp_author_archive_settings['noarchive']) ? htmlspecialchars(stripcslashes($psp_author_archive_settings['noarchive'])) : "";
|
324 |
+
|
325 |
+
if ($psp_noarchive) {
|
326 |
+
if ($robots_meta != "") {
|
327 |
+
$robots_meta .= ",";
|
328 |
+
}
|
329 |
+
|
330 |
+
$robots_meta .= $this->noarchive_tag;
|
331 |
+
|
332 |
+
}
|
333 |
+
|
334 |
+
$psp_nosnippet = isset($psp_author_archive_settings['nosnippet']) ? htmlspecialchars(stripcslashes($psp_author_archive_settings['nosnippet'])) : "";
|
335 |
+
|
336 |
+
if ($psp_nosnippet) {
|
337 |
+
if ($robots_meta != "") {
|
338 |
+
$robots_meta .= ",";
|
339 |
+
}
|
340 |
+
|
341 |
+
$robots_meta .= $this->nosnippet_tag;
|
342 |
+
|
343 |
+
}
|
344 |
+
|
345 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
346 |
+
|
347 |
+
if ($robots_meta != "") {
|
348 |
+
$robots_meta .= ",";
|
349 |
+
}
|
350 |
+
|
351 |
+
$robots_meta .= $this->noodp_tag;
|
352 |
+
}
|
353 |
+
|
354 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
355 |
+
|
356 |
+
if ($robots_meta != "") {
|
357 |
+
$robots_meta .= ",";
|
358 |
+
}
|
359 |
+
|
360 |
+
$robots_meta .= $this->noydir_tag;
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
if ($robots_meta != "" ) {
|
365 |
+
|
366 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
367 |
+
|
368 |
+
}
|
369 |
+
|
370 |
+
return $robots_meta_string;
|
371 |
+
|
372 |
+
} // end get_author_archives_robots_meta;
|
373 |
+
|
374 |
+
private function get_author_arch_canonical_meta($canonical) {
|
375 |
+
|
376 |
+
$canonical_meta_string = "";
|
377 |
+
$can_link = "";
|
378 |
+
|
379 |
+
$author = get_userdata(get_query_var('author'));
|
380 |
+
if ($author === false)
|
381 |
+
{
|
382 |
+
$can_link = "";
|
383 |
+
} else {
|
384 |
+
//$auth_link = get_author_link(false, $author->ID, $author->user_nicename);
|
385 |
+
$auth_link = get_author_posts_url($author->ID, $author->user_nicename);
|
386 |
+
$can_link = $this->psp_helper->paged_link($auth_link);
|
387 |
+
//if (!is_paged()) {
|
388 |
+
// $can_link = $auth_link;
|
389 |
+
//}
|
390 |
+
}
|
391 |
+
|
392 |
+
//$can_link = trailingslashit($can_link);
|
393 |
+
$this->archive_can_link = $can_link;
|
394 |
+
if ($can_link != '' && ($canonical)) {
|
395 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
396 |
+
//$this->archive_can_link = $can_link;
|
397 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
398 |
+
}
|
399 |
+
|
400 |
+
return $canonical_meta_string;
|
401 |
+
|
402 |
+
} // end get_author_arch_canonical_meta;
|
403 |
+
|
404 |
+
private function get_date_archives_robots_meta() {
|
405 |
+
|
406 |
+
$robots_meta = "";
|
407 |
+
$robots_meta_string = "";
|
408 |
+
$psp_date_archive_settings = array();
|
409 |
+
$psp_settings = array();
|
410 |
+
|
411 |
+
if (!empty($this->psp_date_archive_settings)) $psp_date_archive_settings = $this->psp_date_archive_settings;
|
412 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
413 |
+
|
414 |
+
if (isset($psp_date_archive_settings['robots']) && $psp_date_archive_settings['robots']) {
|
415 |
+
$robots_meta .= $this->noindex_tag;
|
416 |
+
} else {
|
417 |
+
|
418 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
419 |
+
//if ($psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
420 |
+
$robots_meta .= $this->noindex_tag;
|
421 |
+
} else {
|
422 |
+
$robots_meta .= $this->index_tag;
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
$psp_noarchive = isset($psp_date_archive_settings['noarchive']) ? htmlspecialchars(stripcslashes($psp_date_archive_settings['noarchive'])) : "";
|
427 |
+
|
428 |
+
if ($psp_noarchive) {
|
429 |
+
if ($robots_meta != "") {
|
430 |
+
$robots_meta .= ",";
|
431 |
+
}
|
432 |
+
|
433 |
+
$robots_meta .= $this->noarchive_tag;
|
434 |
+
|
435 |
+
}
|
436 |
+
|
437 |
+
$psp_nosnippet = isset($psp_date_archive_settings['nosnippet']) ? htmlspecialchars(stripcslashes($psp_date_archive_settings['nosnippet'])) : "";
|
438 |
+
|
439 |
+
if ($psp_nosnippet) {
|
440 |
+
if ($robots_meta != "") {
|
441 |
+
$robots_meta .= ",";
|
442 |
+
}
|
443 |
+
|
444 |
+
$robots_meta .= $this->nosnippet_tag;
|
445 |
+
|
446 |
+
}
|
447 |
+
|
448 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
449 |
+
|
450 |
+
if ($robots_meta != "") {
|
451 |
+
$robots_meta .= ",";
|
452 |
+
}
|
453 |
+
|
454 |
+
$robots_meta .= $this->noodp_tag;
|
455 |
+
}
|
456 |
+
|
457 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
458 |
+
|
459 |
+
if ($robots_meta != "") {
|
460 |
+
$robots_meta .= ",";
|
461 |
+
}
|
462 |
+
|
463 |
+
$robots_meta .= $this->noydir_tag;
|
464 |
+
|
465 |
+
}
|
466 |
+
|
467 |
+
if ($robots_meta != "" ) {
|
468 |
+
|
469 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
470 |
+
|
471 |
+
}
|
472 |
+
|
473 |
+
return $robots_meta_string;
|
474 |
+
|
475 |
+
} // end get_date_archives_robots_meta;
|
476 |
+
|
477 |
+
private function get_date_arch_canonical_meta($canonical) {
|
478 |
+
|
479 |
+
$canonical_meta_string = "";
|
480 |
+
$can_link = "";
|
481 |
+
|
482 |
+
global $wp_query;
|
483 |
+
|
484 |
+
if ($canonical) {
|
485 |
+
if (get_query_var('m')) {
|
486 |
+
$m = preg_replace('/[^0-9]/', '', get_query_var('m'));
|
487 |
+
switch (strlen($m)) {
|
488 |
+
case 4:
|
489 |
+
$can_link = get_year_link($m);
|
490 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
491 |
+
break;
|
492 |
+
case 6:
|
493 |
+
$can_link = get_month_link(substr($m, 0, 4), substr($m, 4, 2));
|
494 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
495 |
+
break;
|
496 |
+
case 8:
|
497 |
+
$can_link = get_day_link(substr($m, 0, 4), substr($m, 4, 2),
|
498 |
+
substr($m, 6, 2));
|
499 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
500 |
+
break;
|
501 |
+
default:
|
502 |
+
$can_link = '';
|
503 |
+
}
|
504 |
+
}
|
505 |
+
if ($wp_query->is_day) {
|
506 |
+
$can_link = get_day_link(get_query_var('year'),
|
507 |
+
get_query_var('monthnum'),
|
508 |
+
get_query_var('day'));
|
509 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
510 |
+
} else if ($wp_query->is_month) {
|
511 |
+
$can_link = get_month_link(get_query_var('year'),
|
512 |
+
get_query_var('monthnum'));
|
513 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
514 |
+
} else if ($wp_query->is_year) {
|
515 |
+
$can_link = get_year_link(get_query_var('year'));
|
516 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
517 |
+
}
|
518 |
+
}
|
519 |
+
|
520 |
+
//$can_link = trailingslashit($can_link);
|
521 |
+
$this->archive_can_link = $can_link;
|
522 |
+
if ($can_link != '' && ($canonical)) {
|
523 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
524 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
525 |
+
}
|
526 |
+
|
527 |
+
return $canonical_meta_string;
|
528 |
+
|
529 |
+
} // end get_date_arch_canonical_meta;
|
530 |
+
|
531 |
+
private function get_pt_archives_robots_meta($post_type) {
|
532 |
+
|
533 |
+
$robots_meta = "";
|
534 |
+
$robots_meta_string = "";
|
535 |
+
|
536 |
+
//$post_type_noindex_option = "psp_". $post_type. "_archives_noindex";
|
537 |
+
if (!empty($this->psp_posttype_archive_settings)) $psp_pt_archive_settings = $this->psp_posttype_archive_settings;
|
538 |
+
//$psp_pt_archive_settings = get_option("psp_posttype_archive_settings");
|
539 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
540 |
+
|
541 |
+
//need to do for individual custom post type
|
542 |
+
//if (get_option($psp_archive_noindex)) {
|
543 |
+
//if (get_option($post_type_noindex_option)) {
|
544 |
+
if (isset($psp_pt_archive_settings['robots']) && $psp_pt_archive_settings['robots']) {
|
545 |
+
$robots_meta .= $this->noindex_tag;
|
546 |
+
} else {
|
547 |
+
|
548 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
549 |
+
$robots_meta .= $this->noindex_tag;
|
550 |
+
} else {
|
551 |
+
$robots_meta .= $this->index_tag;
|
552 |
+
}
|
553 |
+
}
|
554 |
+
|
555 |
+
$psp_noarchive = isset($psp_pt_archive_settings['noarchive']) ? htmlspecialchars(stripcslashes($psp_pt_archive_settings['noarchive'])) : "";
|
556 |
+
|
557 |
+
if ($psp_noarchive) {
|
558 |
+
if ($robots_meta != "") {
|
559 |
+
$robots_meta .= ",";
|
560 |
+
}
|
561 |
+
|
562 |
+
$robots_meta .= $this->noarchive_tag;
|
563 |
+
|
564 |
+
}
|
565 |
+
|
566 |
+
$psp_nosnippet = isset($psp_pt_archive_settings['nosnippet']) ? htmlspecialchars(stripcslashes($psp_pt_archive_settings['nosnippet'])) : "";
|
567 |
+
|
568 |
+
if ($psp_nosnippet) {
|
569 |
+
if ($robots_meta != "") {
|
570 |
+
$robots_meta .= ",";
|
571 |
+
}
|
572 |
+
|
573 |
+
$robots_meta .= $this->nosnippet_tag;
|
574 |
+
|
575 |
+
}
|
576 |
+
|
577 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
578 |
+
|
579 |
+
if ($robots_meta != "") {
|
580 |
+
$robots_meta .= ",";
|
581 |
+
}
|
582 |
+
|
583 |
+
$robots_meta .= $this->noodp_tag;
|
584 |
+
}
|
585 |
+
|
586 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
587 |
+
|
588 |
+
if ($robots_meta != "") {
|
589 |
+
$robots_meta .= ",";
|
590 |
+
}
|
591 |
+
|
592 |
+
$robots_meta .= $this->noydir_tag;
|
593 |
+
|
594 |
+
}
|
595 |
+
|
596 |
+
if ($robots_meta != "" ) {
|
597 |
+
|
598 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
599 |
+
|
600 |
+
}
|
601 |
+
|
602 |
+
return $robots_meta_string;
|
603 |
+
|
604 |
+
} // end get_pt_archives_robots_meta;
|
605 |
+
|
606 |
+
private function get_pt_arch_canonical_meta($post_type, $canonical) {
|
607 |
+
|
608 |
+
$canonical_meta_string = "";
|
609 |
+
$can_link = "";
|
610 |
+
|
611 |
+
//$post_type = get_query_var( 'post_type' );
|
612 |
+
//if ( is_array( $post_type ) ) $post_type = reset( $post_type );
|
613 |
+
|
614 |
+
$post_type_archive_link = get_post_type_archive_link( $post_type );
|
615 |
+
$can_link = $this->psp_helper->paged_link($post_type_archive_link);
|
616 |
+
$this->archive_can_link = $can_link;
|
617 |
+
if ($can_link != '' && ($canonical)) {
|
618 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
619 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
620 |
+
}
|
621 |
+
|
622 |
+
return $canonical_meta_string;
|
623 |
+
|
624 |
+
} // end get_pt_arch_canonical_meta;
|
625 |
+
|
626 |
+
/***********
|
627 |
+
private function paged_link($link) {
|
628 |
+
$page = get_query_var('paged');
|
629 |
+
$has_ut = function_exists('user_trailingslashit');
|
630 |
+
if ($page && $page > 1) {
|
631 |
+
$link = trailingslashit($link) ."page/". "$page";
|
632 |
+
if ($has_ut) {
|
633 |
+
$link = user_trailingslashit($link, 'paged');
|
634 |
+
} else {
|
635 |
+
$link .= '/';
|
636 |
+
}
|
637 |
+
}
|
638 |
+
return $link;
|
639 |
+
} // end paged_link;
|
640 |
+
*********/
|
641 |
+
|
642 |
+
public function get_home_psp_title() {
|
643 |
+
|
644 |
+
$title = "";
|
645 |
+
|
646 |
+
if (empty($this->psp_home_settings)) $this->psp_home_settings = get_option("psp_home_settings");
|
647 |
+
if (!empty($this->psp_home_settings)) $psp_home_settings = $this->psp_home_settings;
|
648 |
+
if (!empty($this->psp_sitewide_settungs)) $psp_settings = $this->psp_sitewide_settungs;
|
649 |
+
|
650 |
+
$title = isset($psp_home_settings['title']) ? $this->psp_helper->internationalize($psp_home_settings['title']) : "";
|
651 |
+
|
652 |
+
if (empty($title)) {
|
653 |
+
$title = $this->psp_helper->internationalize(get_option('aiosp_home_title'));
|
654 |
+
}
|
655 |
+
|
656 |
+
if (!empty($title)) {
|
657 |
+
$title = str_replace('%site_name%', $this->sitename, $title);
|
658 |
+
$title = str_replace('%site_description%', $this->sitedescription, $title);
|
659 |
+
//$title = str_replace('%sep%', htmlentities($psp_settings['separator']), $title);
|
660 |
+
$title = str_replace('%sep%', $psp_settings['separator'], $title);
|
661 |
+
$title = trim(stripcslashes($title));
|
662 |
+
}
|
663 |
+
|
664 |
+
if (empty($title)) {
|
665 |
+
$title = $this->sitename;
|
666 |
+
}
|
667 |
+
//$title = trim(stripcslashes($title));
|
668 |
+
$title = stripcslashes($this->psp_helper->paged_title($title));
|
669 |
+
$this->home_title = $title;
|
670 |
+
return $title;
|
671 |
+
//$header = $this->replace_title($header, $title);
|
672 |
+
} // end get_home_psp_title
|
673 |
+
|
674 |
+
public function get_search_psp_title() {
|
675 |
+
|
676 |
+
$title = "";
|
677 |
+
$search = "";
|
678 |
+
global $s;
|
679 |
+
|
680 |
+
if (empty($this->psp_search_result_settings)) $this->psp_search_result_settings = get_option("psp_search_result_settings");
|
681 |
+
|
682 |
+
if (is_search() && isset($s) && !empty($s)) {
|
683 |
+
if (function_exists('attribute_escape')) {
|
684 |
+
$search = attribute_escape($s);
|
685 |
+
} else {
|
686 |
+
$search = esc_attr($s);
|
687 |
+
}
|
688 |
+
$search = str_replace('+', ' ', $search);
|
689 |
+
//$search = $this->capitalize($search);
|
690 |
+
$search = ucwords($this->psp_helper->internationalize($search));
|
691 |
+
$title_format = isset($this->psp_search_result_settings['title']) ? $this->psp_search_result_settings['title'] : "";
|
692 |
+
if (empty($title_format)) {
|
693 |
+
$title_format = "%search%";
|
694 |
+
$title = str_replace('%search%', $search, $title_format);
|
695 |
+
} else {
|
696 |
+
//get_option('aiosp_search_title_format');
|
697 |
+
//$title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $title_format);
|
698 |
+
//$title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $title);
|
699 |
+
//$title = str_replace('%blog_title%', $this->sitename, $title_format);
|
700 |
+
//$title = str_replace('%blog_description%', $this->sitedescription, $title);
|
701 |
+
$title = str_replace('%site_name%', $this->sitename, $title_format);
|
702 |
+
$title = str_replace('%site_description%', $this->sitedescription, $title);
|
703 |
+
$title = str_replace('%search%', $search, $title);
|
704 |
+
$title = str_replace('%title%', $search, $title);
|
705 |
+
//$title = str_replace('%sep%', htmlentities($this->psp_sitewide_settungs['separator']), $title);
|
706 |
+
$title = str_replace('%sep%', $this->psp_sitewide_settungs['separator'], $title);
|
707 |
+
//$title = $this->paged_title($title);
|
708 |
+
}
|
709 |
+
}
|
710 |
+
$title = trim($title);
|
711 |
+
$title = $this->psp_helper->paged_title($title);
|
712 |
+
$this->search_results_title = stripcslashes($title);
|
713 |
+
return $title;
|
714 |
+
|
715 |
+
} // end get_search_psp_title
|
716 |
+
|
717 |
+
public function get_404_psp_title() {
|
718 |
+
|
719 |
+
$title = "";
|
720 |
+
|
721 |
+
if ( is_404() ) {
|
722 |
+
|
723 |
+
$title_format = isset($this->psp_404_settings['title']) ? $this->psp_404_settings['title'] : "";
|
724 |
+
if (empty($title_format)) {
|
725 |
+
$title_format = "%title_404%";
|
726 |
+
$title = str_replace('%title_404%', "404 Not Found", $title_format);
|
727 |
+
} else {
|
728 |
+
//get_option('aiosp_search_title_format');
|
729 |
+
//$title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $title_format);
|
730 |
+
//$title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $title);
|
731 |
+
//$title = str_replace('%blog_title%', $this->sitename, $title_format);
|
732 |
+
//$title = str_replace('%blog_description%', $this->sitedescription, $title);
|
733 |
+
$title = str_replace('%title_404%', "404 Not Found", $title_format);
|
734 |
+
$title = str_replace('%title%', "404 Not Found", $title);
|
735 |
+
$title = str_replace('%seo_title%', "404 Not Found", $title);
|
736 |
+
$title = str_replace('%site_name%', $this->sitename, $title);
|
737 |
+
//$title = str_replace('%sep%', htmlentities($this->psp_sitewide_settungs['separator']), $title);
|
738 |
+
$title = str_replace('%sep%', $this->psp_sitewide_settungs['separator'], $title);
|
739 |
+
//$title = $this->paged_title($title);
|
740 |
+
}
|
741 |
+
}
|
742 |
+
$title = trim($title);
|
743 |
+
return $title;
|
744 |
+
|
745 |
+
} // end get_404_psp_title
|
746 |
+
|
747 |
+
public function get_date_archive_psp_title() {
|
748 |
+
|
749 |
+
global $wp_locale;
|
750 |
+
|
751 |
+
$title = "";
|
752 |
+
//$sep = isset($this->psp_sitewide_settungs['separator']) ? htmlentities($this->psp_sitewide_settungs['separator']) : "";
|
753 |
+
$sep = isset($this->psp_sitewide_settungs['separator']) ? $this->psp_sitewide_settungs['separator'] : "";
|
754 |
+
|
755 |
+
if (empty($this->psp_date_archive_settings)) $this->psp_date_archive_settings = get_option("psp_date_archive_settings");
|
756 |
+
|
757 |
+
//$date = $this->psp_helper->internationalize(wp_title('', false));
|
758 |
+
|
759 |
+
/**************get title************/
|
760 |
+
$m = get_query_var('m');
|
761 |
+
$year = get_query_var('year');
|
762 |
+
$monthnum = get_query_var('monthnum');
|
763 |
+
$day = get_query_var('day');
|
764 |
+
|
765 |
+
$t_sep = '%WP_TITILE_SEP%'; // Temporary separator, for accurate flipping, if necessary
|
766 |
+
|
767 |
+
// If there's a month
|
768 |
+
if ( is_archive() && !empty($m) ) {
|
769 |
+
$psp_year = substr($m, 0, 4);
|
770 |
+
$psp_month = $wp_locale->get_month(substr($m, 4, 2));
|
771 |
+
$psp_day = intval(substr($m, 6, 2));
|
772 |
+
$datetitle = $psp_year . ( $psp_month ? $t_sep . $psp_month : '' ) . ( $psp_day ? $t_sep . $psp_day : '' );
|
773 |
+
}
|
774 |
+
|
775 |
+
// If there's a year
|
776 |
+
if ( is_archive() && !empty($year) ) {
|
777 |
+
$datetitle = $year;
|
778 |
+
if ( !empty($monthnum) ) $datetitle .= $t_sep . $wp_locale->get_month($monthnum);
|
779 |
+
if ( !empty($day) ) $datetitle .= $t_sep . zeroise($day, 2);
|
780 |
+
}
|
781 |
+
|
782 |
+
$title_array = explode( $t_sep, $datetitle );
|
783 |
+
$title_array = array_reverse( $title_array );
|
784 |
+
$datetitle = implode( " $sep ", $title_array );
|
785 |
+
|
786 |
+
$date = $this->psp_helper->internationalize($datetitle);
|
787 |
+
/***************/
|
788 |
+
$title_format = $this->psp_date_archive_settings['title'];
|
789 |
+
//$title_format = get_option('aiosp_archive_title_format');
|
790 |
+
|
791 |
+
if (empty($title_format)) {
|
792 |
+
$title_format = "%title_date%";
|
793 |
+
$title = str_replace('%title_date%', $date, $title_format);
|
794 |
+
} else {
|
795 |
+
$new_title = str_replace('%title_date%', $date, $title_format);
|
796 |
+
$new_title = str_replace('%title%', $date, $new_title);
|
797 |
+
$new_title = str_replace('%seo_title%', $date, $new_title);
|
798 |
+
//$new_title = str_replace('%blog_title%', $this->sitename, $new_title);
|
799 |
+
//$new_title = str_replace('%blog_description%', $this->sitedescription, $new_title);
|
800 |
+
$new_title = str_replace('%site_name%', $this->sitename, $new_title);
|
801 |
+
$new_title = str_replace('%site_description%', $this->sitedescription, $new_title);
|
802 |
+
$new_title = str_replace('%sep%', $sep, $new_title);
|
803 |
+
}
|
804 |
+
$title = trim($new_title);
|
805 |
+
$title = $this->psp_helper->paged_title($title);
|
806 |
+
$this->date_archive_title = $title;
|
807 |
+
return $title;
|
808 |
+
|
809 |
+
} // end get_date_archive_psp_title
|
810 |
+
|
811 |
+
public function get_pt_archive_psp_title() {
|
812 |
+
|
813 |
+
$title = "";
|
814 |
+
|
815 |
+
$title = post_type_archive_title('', false);
|
816 |
+
|
817 |
+
if (empty($this->psp_posttype_archive_settings)) $this->psp_posttype_archive_settings = get_option("psp_posttype_archive_settings");
|
818 |
+
|
819 |
+
$title_format = isset($this->psp_posttype_archive_settings['title']) ? $this->psp_posttype_archive_settings['title'] : "";
|
820 |
+
|
821 |
+
//$title_format = get_option('psp_pt_archive_title_format');
|
822 |
+
//$title_format = get_option($post_type_archive_title_format);
|
823 |
+
|
824 |
+
//$new_title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $title_format);
|
825 |
+
//$new_title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $new_title);
|
826 |
+
|
827 |
+
if (empty($title_format)) {
|
828 |
+
$title_format = "%title%";
|
829 |
+
$new_title = str_replace('%title%', $title, $title_format);
|
830 |
+
} else {
|
831 |
+
$new_title = str_replace('%title%', $title, $title_format);
|
832 |
+
$new_title = str_replace('%seo_title%', $title, $new_title);
|
833 |
+
//$new_title = str_replace('%blog_title%', $this->sitename, $new_title);
|
834 |
+
//$new_title = str_replace('%blog_description%', $this->sitedescription, $new_title);
|
835 |
+
$new_title = str_replace('%site_name%', $this->sitename, $new_title);
|
836 |
+
$new_title = str_replace('%site_description%', $this->sitedescription, $new_title);
|
837 |
+
//$new_title = str_replace('%sep%', htmlentities($this->psp_sitewide_settungs['separator']), $new_title);
|
838 |
+
$new_title = str_replace('%sep%', $this->psp_sitewide_settungs['separator'], $new_title);
|
839 |
+
}
|
840 |
+
$title = trim($new_title);
|
841 |
+
$title = $this->psp_helper->paged_title($title);
|
842 |
+
$this->pt_archive_title = $title;
|
843 |
+
|
844 |
+
return $title;
|
845 |
+
|
846 |
+
} // end get_pt_archive_psp_title
|
847 |
+
|
848 |
+
public function get_author_archive_psp_title() {
|
849 |
+
|
850 |
+
$title = "";
|
851 |
+
$author = "";
|
852 |
+
|
853 |
+
if(empty($this->psp_author_archive_settings)) $this->psp_author_archive_settings = get_option("psp_author_archive_settings");
|
854 |
+
|
855 |
+
$author_obj = get_userdata( get_query_var('author') );
|
856 |
+
|
857 |
+
if ($author_obj) $author = $author_obj->display_name;
|
858 |
+
//$author = $this->psp_helper->internationalize( $author_obj->display_name );
|
859 |
+
|
860 |
+
//$title_format = get_option('psp_archive_title_format');
|
861 |
+
$title_format = isset($this->psp_author_archive_settings['title']) ? $this->psp_author_archive_settings['title'] : "";
|
862 |
+
|
863 |
+
|
864 |
+
if (empty($title_format)) {
|
865 |
+
$title_format = "%title_author%";
|
866 |
+
$new_title = str_replace('%title_author%', $author, $title_format);
|
867 |
+
} else {
|
868 |
+
$new_title = str_replace( '%title_author%', $author, $title_format );
|
869 |
+
$new_title = str_replace( '%author%', $author, $new_title );
|
870 |
+
$new_title = str_replace( '%title%', $author, $new_title );
|
871 |
+
$new_title = str_replace( '%seo_title%', $author, $new_title );
|
872 |
+
//$new_title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $new_title);
|
873 |
+
//$new_title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $new_title);
|
874 |
+
//$new_title = str_replace('%blog_title%', $this->sitename, $new_title);
|
875 |
+
//$new_title = str_replace('%blog_description%', $this->sitedescription, $new_title);
|
876 |
+
$new_title = str_replace('%site_name%', $this->sitename, $new_title);
|
877 |
+
$new_title = str_replace('%site_description%', $this->sitedescription, $new_title);
|
878 |
+
//$new_title = str_replace('%sep%', htmlentities($this->psp_sitewide_settungs['separator']), $new_title);
|
879 |
+
$new_title = str_replace('%sep%', $this->psp_sitewide_settungs['separator'], $new_title);
|
880 |
+
}
|
881 |
+
$title = trim($new_title);
|
882 |
+
$title = $this->psp_helper->paged_title($title);
|
883 |
+
$this->author_archive_title = $title;
|
884 |
+
|
885 |
+
return $title;
|
886 |
+
|
887 |
+
} // end get_author_archive_psp_title
|
888 |
+
|
889 |
+
public function get_home_seo_metas($canonical) {
|
890 |
+
|
891 |
+
$can_link = "";
|
892 |
+
$term_link = "";
|
893 |
+
$robots_meta_string = "";
|
894 |
+
$desc_keyword_meta_string = "";
|
895 |
+
$canonical_meta_string = "";
|
896 |
+
$seo_meta_string = "";
|
897 |
+
$prevnext_meta_string = "";
|
898 |
+
$json_schema_string = "";
|
899 |
+
$jsonld_script_tag = "";
|
900 |
+
|
901 |
+
//To handle exta metas,if any, defined in settings.
|
902 |
+
$home_meta = "";
|
903 |
+
|
904 |
+
$this->psp_home_settings = get_option("psp_home_settings");
|
905 |
+
|
906 |
+
$robots_meta_string = $this->get_home_robots_meta();
|
907 |
+
if (!is_paged()) {
|
908 |
+
$desc_keyword_meta_string = $this->get_home_description_meta();
|
909 |
+
}
|
910 |
+
if (!empty($desc_keyword_meta_string)) $desc_keyword_meta_string .= "\r\n";
|
911 |
+
|
912 |
+
if ($canonical) {
|
913 |
+
$canonical_meta_string = $this->get_home_canonical_meta($canonical);
|
914 |
+
}
|
915 |
+
//$home_meta = stripcslashes(get_option('aiosp_home_meta_tags', $home_meta));
|
916 |
+
$home_meta = (isset($this->psp_home_settings['headers']) && !empty($this->psp_home_settings['headers'])) ? html_entity_decode(stripcslashes(esc_html($this->psp_home_settings['headers']))) : '';
|
917 |
+
//validate headers
|
918 |
+
if( !empty( $home_meta ) ) {
|
919 |
+
|
920 |
+
$allowed_html = array(
|
921 |
+
'meta' => array(
|
922 |
+
'name' => array(),
|
923 |
+
'property' => array(),
|
924 |
+
'itemprop' => array(),
|
925 |
+
'content' => array(),
|
926 |
+
),
|
927 |
+
);
|
928 |
+
|
929 |
+
$home_meta = wp_kses($home_meta, $allowed_html);
|
930 |
+
}
|
931 |
+
if (!empty($home_meta)) $home_meta .= "\r\n";
|
932 |
+
|
933 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
934 |
+
|
935 |
+
if (isset($this->psp_home_settings['schema']) && !empty($this->psp_home_settings['schema'])) {
|
936 |
+
$json_schema_string = $this->psp_home_settings['schema'];
|
937 |
+
$json_schema_string = html_entity_decode(esc_html(stripcslashes($json_schema_string)));
|
938 |
+
//validate it is a json object
|
939 |
+
$schema_obj = json_decode($json_schema_string);
|
940 |
+
if($schema_obj === null) {
|
941 |
+
$json_schema_string = "";
|
942 |
+
}
|
943 |
+
}
|
944 |
+
if (!empty($json_schema_string)) {
|
945 |
+
$jsonld_script_tag = '<scri' . 'pt type="application/ld+json">'. "\r\n". $json_schema_string . "\r\n". '</scri' . 'pt>';
|
946 |
+
}
|
947 |
+
|
948 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$home_meta.$prevnext_meta_string;
|
949 |
+
if (!empty($jsonld_script_tag) && !is_paged() ) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
950 |
+
|
951 |
+
return $seo_meta_string;
|
952 |
+
|
953 |
+
} // end get_home_seo_metas;
|
954 |
+
|
955 |
+
public function get_search_seo_metas($canonical) {
|
956 |
+
|
957 |
+
$can_link = "";
|
958 |
+
$term_link = "";
|
959 |
+
$robots_meta_string = "";
|
960 |
+
$desc_keyword_meta_string = "";
|
961 |
+
$canonical_meta_string = "";
|
962 |
+
$seo_meta_string = "";
|
963 |
+
$prevnext_meta_string = "";
|
964 |
+
|
965 |
+
$this->psp_search_result_settings = get_option("psp_search_result_settings");
|
966 |
+
|
967 |
+
if ($desc_keyword_meta_string) $desc_keyword_meta_string .= "\r\n";
|
968 |
+
|
969 |
+
$robots_meta_string = $this->get_search_robots_meta();
|
970 |
+
|
971 |
+
if ($robots_meta_string) $robots_meta_string .= "\r\n";
|
972 |
+
|
973 |
+
if ($canonical) {
|
974 |
+
$canonical_meta_string = $this->get_search_canonical_meta($canonical);
|
975 |
+
}
|
976 |
+
|
977 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
978 |
+
|
979 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
980 |
+
|
981 |
+
return $seo_meta_string;
|
982 |
+
|
983 |
+
} // end get_search_seo_metas;
|
984 |
+
|
985 |
+
public function get_404_seo_metas() {
|
986 |
+
|
987 |
+
$robots_meta = "";
|
988 |
+
$robots_meta_string = "";
|
989 |
+
$seo_meta_string = "";
|
990 |
+
|
991 |
+
if (isset($this->psp_404_settings['robots']) && $this->psp_404_settings['robots']) {
|
992 |
+
$robots_meta .= $this->noindex_tag;
|
993 |
+
} else {
|
994 |
+
$robots_meta .= $this->index_tag;
|
995 |
+
}
|
996 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
997 |
+
$seo_meta_string = $robots_meta_string."\r\n";
|
998 |
+
|
999 |
+
return $seo_meta_string;
|
1000 |
+
|
1001 |
+
} // end get_404_seo_metas;
|
1002 |
+
|
1003 |
+
public function get_author_seo_metas($canonical) {
|
1004 |
+
|
1005 |
+
$can_link = "";
|
1006 |
+
$term_link = "";
|
1007 |
+
$robots_meta_string = "";
|
1008 |
+
$desc_keyword_meta_string = "";
|
1009 |
+
$canonical_meta_string = "";
|
1010 |
+
$seo_meta_string = "";
|
1011 |
+
$prevnext_meta_string = "";
|
1012 |
+
|
1013 |
+
$this->psp_author_archive_settings = get_option("psp_author_archive_settings");
|
1014 |
+
|
1015 |
+
if ($desc_keyword_meta_string) $desc_keyword_meta_string .= "\r\n";
|
1016 |
+
|
1017 |
+
$robots_meta_string = $this->get_author_archives_robots_meta();
|
1018 |
+
|
1019 |
+
if ($robots_meta_string) $robots_meta_string .= "\r\n";
|
1020 |
+
|
1021 |
+
if ($canonical) {
|
1022 |
+
$canonical_meta_string = $this->get_author_arch_canonical_meta($canonical);
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1026 |
+
|
1027 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1028 |
+
|
1029 |
+
return $seo_meta_string;
|
1030 |
+
|
1031 |
+
} // end get_author_seo_metas;
|
1032 |
+
|
1033 |
+
public function get_date_archives_seo_metas($canonical) {
|
1034 |
+
|
1035 |
+
$can_link = "";
|
1036 |
+
$term_link = "";
|
1037 |
+
$robots_meta_string = "";
|
1038 |
+
$desc_keyword_meta_string = "";
|
1039 |
+
$canonical_meta_string = "";
|
1040 |
+
$seo_meta_string = "";
|
1041 |
+
$prevnext_meta_string = "";
|
1042 |
+
|
1043 |
+
$this->psp_date_archive_settings = get_option("psp_date_archive_settings");
|
1044 |
+
|
1045 |
+
if ($desc_keyword_meta_string) $desc_keyword_meta_string .= "\r\n";
|
1046 |
+
|
1047 |
+
$robots_meta_string = $this->get_date_archives_robots_meta();
|
1048 |
+
|
1049 |
+
if ($robots_meta_string) $robots_meta_string .= "\r\n";
|
1050 |
+
|
1051 |
+
if ($canonical) {
|
1052 |
+
$canonical_meta_string = $this->get_date_arch_canonical_meta($canonical);
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1056 |
+
|
1057 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1058 |
+
|
1059 |
+
return $seo_meta_string;
|
1060 |
+
|
1061 |
+
} // end get_date_archives_seo_metas;
|
1062 |
+
|
1063 |
+
public function get_pt_archives_seo_metas($canonical) {
|
1064 |
+
|
1065 |
+
$can_link = "";
|
1066 |
+
$term_link = "";
|
1067 |
+
$robots_meta_string = "";
|
1068 |
+
$desc_keyword_meta_string = "";
|
1069 |
+
$canonical_meta_string = "";
|
1070 |
+
$seo_meta_string = "";
|
1071 |
+
$prevnext_meta_string = "";
|
1072 |
+
|
1073 |
+
$post_type = get_query_var( 'post_type' );
|
1074 |
+
if ( is_array( $post_type ) ) $post_type = reset( $post_type );
|
1075 |
+
//$curr_post_type_obj = get_post_type_object( $post_type );
|
1076 |
+
//$curr_post_type_obj_title = $post_type_obj->labels->name;
|
1077 |
+
//if ( ! $curr_post_type_obj->has_archive ) $curr_post_type_obj_title = post_type_archive_title( '', false );
|
1078 |
+
|
1079 |
+
$this->psp_posttype_archive_settings = get_option("psp_posttype_archive_settings");
|
1080 |
+
|
1081 |
+
if ($desc_keyword_meta_string) $desc_keyword_meta_string .= "\r\n";
|
1082 |
+
|
1083 |
+
$robots_meta_string = $this->get_pt_archives_robots_meta($post_type);
|
1084 |
+
|
1085 |
+
if ($robots_meta_string) $robots_meta_string .= "\r\n";
|
1086 |
+
|
1087 |
+
if ($canonical) {
|
1088 |
+
$canonical_meta_string = $this->get_pt_arch_canonical_meta($post_type, $canonical);
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1092 |
+
|
1093 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1094 |
+
|
1095 |
+
return $seo_meta_string;
|
1096 |
+
|
1097 |
+
} // end get_pt_archives_seo_metas;
|
1098 |
+
|
1099 |
+
}
|
1100 |
+
?>
|
psp-include/generators/psp_pts_seo_metas.php
ADDED
@@ -0,0 +1,1393 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Platinum SEO Pack
|
5 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
+
Description: Complete SEO solution for your Wordpress blog.
|
7 |
+
Author: Rajesh - Techblissonline
|
8 |
+
Author URI: https://techblissonline.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class PspPtsSeoMetas {
|
12 |
+
|
13 |
+
//public $plugin_settings_name = "psp-pts-seo-metas";
|
14 |
+
|
15 |
+
private static $obj_handle = null;
|
16 |
+
|
17 |
+
protected static $cust_posttypes = array();
|
18 |
+
|
19 |
+
protected $index_tag = "index,follow";
|
20 |
+
protected $noindex_tag = "noindex";
|
21 |
+
protected $noindex_nofollow_tag = "noindex,nofollow";
|
22 |
+
protected $noodp_tag = "noodp";
|
23 |
+
protected $noydir_tag = "noydir";
|
24 |
+
protected $noarchive_tag = "noarchive";
|
25 |
+
protected $nosnippet_tag = "nosnippet";
|
26 |
+
protected $noimageindex = "noimageindex";
|
27 |
+
|
28 |
+
protected $psp_current_ptype_format = array();
|
29 |
+
protected $psp_sitewide_settings = array();
|
30 |
+
protected $sitename = "";
|
31 |
+
protected $sitedescription = "";
|
32 |
+
//protected $wp_post_meta_data_arr = array();
|
33 |
+
|
34 |
+
protected $psp_helper;
|
35 |
+
|
36 |
+
public $preferred_taxonomy_for_bc = "";
|
37 |
+
public $default_taxonomy_for_bc = "";
|
38 |
+
|
39 |
+
public $post_type_name = "";
|
40 |
+
public $post_type_title = "";
|
41 |
+
public $post_type_description = "";
|
42 |
+
public $post_type_keywords = "";
|
43 |
+
public $post_type_can_link = "";
|
44 |
+
|
45 |
+
public $psp_current_ptype_meta = array();
|
46 |
+
public $psp_current_ptype_social_meta = array();
|
47 |
+
|
48 |
+
private $default_post_types = array ('post', 'page', 'attachment', 'nav_menu_item', 'revision');
|
49 |
+
|
50 |
+
public static function get_instance() {
|
51 |
+
|
52 |
+
if ( null == self::$obj_handle ) {
|
53 |
+
self::$obj_handle = new self;
|
54 |
+
}
|
55 |
+
|
56 |
+
return self::$obj_handle;
|
57 |
+
|
58 |
+
} // end get_instance;
|
59 |
+
|
60 |
+
//compare function (numeric)
|
61 |
+
public static function pspcmp($a, $b)
|
62 |
+
{
|
63 |
+
// return strcmp($a->name, $b->name);
|
64 |
+
if ($a->term_id == $b->term_id) {
|
65 |
+
return 0;
|
66 |
+
}
|
67 |
+
return ($a->term_id < $b->term_id) ? -1 : 1;
|
68 |
+
}
|
69 |
+
|
70 |
+
//can be made private for singleton pattern
|
71 |
+
public function __construct() {
|
72 |
+
|
73 |
+
$psp_helper_instance = PspHelper::get_instance();
|
74 |
+
$this->psp_helper = $psp_helper_instance;
|
75 |
+
|
76 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
77 |
+
$this->sitedescription = $psp_helper_instance->get_sitedescription();
|
78 |
+
$this->psp_sitewide_settings = get_option('psp_sitewide_settings');
|
79 |
+
}
|
80 |
+
|
81 |
+
public function get_cust_posttypes() {
|
82 |
+
|
83 |
+
return self::$cust_posttypes;
|
84 |
+
|
85 |
+
} // end get_cust_taxonomies;
|
86 |
+
|
87 |
+
private function get_pt_robots_meta($post, $psp_post_meta, $paged, $cpage) {
|
88 |
+
|
89 |
+
$robots_meta = "";
|
90 |
+
$robots_meta_string = "";
|
91 |
+
|
92 |
+
$psp_settings = $this->psp_sitewide_settings;
|
93 |
+
|
94 |
+
if(empty($cpage)) {
|
95 |
+
$cpage = 0;
|
96 |
+
}
|
97 |
+
|
98 |
+
$psp_robots_meta = !empty($psp_post_meta['robots']) ? htmlspecialchars(stripcslashes($psp_post_meta['robots'])) : '';
|
99 |
+
|
100 |
+
$psp_noindex_meta = !empty($psp_post_meta['noindex']) ? htmlspecialchars(stripcslashes($psp_post_meta['noindex'])) : '';
|
101 |
+
|
102 |
+
$psp_nofollow_meta = !empty($psp_post_meta['nofollow']) ? htmlspecialchars(stripcslashes($psp_post_meta['nofollow'])) : '';
|
103 |
+
|
104 |
+
//if (empty($psp_robots_meta)) {
|
105 |
+
if (!empty($psp_noindex_meta) || !empty($psp_nofollow_meta)) {
|
106 |
+
if (isset($psp_post_meta['noindex']) && empty($psp_noindex_meta) && empty($psp_nofollow_meta)) {
|
107 |
+
$psp_robots_meta = 'index,follow';
|
108 |
+
}
|
109 |
+
|
110 |
+
if (!empty($psp_noindex_meta)) {
|
111 |
+
$psp_robots_meta = 'noindex,follow';
|
112 |
+
}
|
113 |
+
|
114 |
+
if (!empty($psp_nofollow_meta)) {
|
115 |
+
$psp_robots_meta = 'index,nofollow';
|
116 |
+
}
|
117 |
+
|
118 |
+
if (!empty($psp_noindex_meta) && !empty($psp_nofollow_meta)) {
|
119 |
+
$psp_robots_meta = 'noindex,nofollow';
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
if (empty($psp_robots_meta)) {
|
124 |
+
$psp_robots_meta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'robotsmeta', true)));
|
125 |
+
}
|
126 |
+
|
127 |
+
if (empty($psp_robots_meta)) {
|
128 |
+
$yoast_noindex_meta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_yoast_wpseo_meta-robots-noindex', true)));
|
129 |
+
$yoast_nofollow_meta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_yoast_wpseo_meta-robots-nofollow', true)));
|
130 |
+
|
131 |
+
//if (!empty($yoast_noindex_meta)) $psp_noindex_meta = $yoast_noindex_meta;
|
132 |
+
if (!empty($yoast_noindex_meta) && $yoast_noindex_meta == 1) {
|
133 |
+
$psp_noindex_meta = $yoast_noindex_meta;
|
134 |
+
}
|
135 |
+
if (!empty($yoast_nofollow_meta)) {
|
136 |
+
$psp_nofollow_meta = $yoast_nofollow_meta;
|
137 |
+
}
|
138 |
+
//build psp meta robots
|
139 |
+
//if (empty($psp_noindex_meta) && empty($psp_nofollow_meta)) {
|
140 |
+
//$psp_robots_meta = 'index,follow';
|
141 |
+
//}
|
142 |
+
|
143 |
+
if (!empty($psp_noindex_meta)) {
|
144 |
+
$psp_robots_meta = 'noindex,follow';
|
145 |
+
}
|
146 |
+
|
147 |
+
if (!empty($psp_nofollow_meta)) {
|
148 |
+
$psp_robots_meta = 'index,nofollow';
|
149 |
+
}
|
150 |
+
|
151 |
+
if (!empty($psp_noindex_meta) && !empty($psp_nofollow_meta)) {
|
152 |
+
$psp_robots_meta = 'noindex,nofollow';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
//if (empty($psp_post_meta) && empty($psp_robots_meta)) {
|
157 |
+
/**
|
158 |
+
if (empty($psp_robots_meta)) {
|
159 |
+
$psp_robots_meta = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'robotsmeta', true)));
|
160 |
+
}
|
161 |
+
**/
|
162 |
+
//$post_type_format = $this->current_ptype_format;
|
163 |
+
if (!empty($this->psp_current_ptype_format)) $post_type_format = $this->psp_current_ptype_format;
|
164 |
+
|
165 |
+
//is this a paginated post?
|
166 |
+
//$paged = $this->is_this_paged($post);
|
167 |
+
|
168 |
+
if (isset($psp_robots_meta) && !empty($psp_robots_meta)) {
|
169 |
+
//if ( get_option('psp_comnts_pages_noindex') && get_option('page_comments') && $cpage >= 1) {
|
170 |
+
if ( (isset($psp_settings['noindex_pt_comment_pages']) && $psp_settings['noindex_pt_comment_pages'] && get_option('page_comments') && $cpage >= 1) || (isset($psp_settings['noindex_pt_paginations']) && $psp_settings['noindex_pt_paginations'] && $paged && $paged>1) ) {
|
171 |
+
$robots_meta .= $this->noindex_tag;
|
172 |
+
} else {
|
173 |
+
$robots_meta = $psp_robots_meta;
|
174 |
+
}
|
175 |
+
|
176 |
+
} else {
|
177 |
+
|
178 |
+
//if ( get_option('psp_comnts_pages_noindex') && get_option('page_comments') && $cpage >= 1) {
|
179 |
+
if ( (isset($psp_settings['noindex_pt_comment_pages']) && $psp_settings['noindex_pt_comment_pages'] && get_option('page_comments') && $cpage >= 1) || (isset($psp_settings['noindex_pt_paginations']) && $psp_settings['noindex_pt_paginations'] && $paged && $paged>1)) {
|
180 |
+
$robots_meta .= $this->noindex_tag;
|
181 |
+
} else {
|
182 |
+
|
183 |
+
if (isset($post_type_format['robots']) && $post_type_format['robots']) {
|
184 |
+
$robots_meta .= $this->noindex_tag;
|
185 |
+
} else {
|
186 |
+
$robots_meta .= $this->index_tag;
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
$psp_noimageindex = !empty($psp_post_meta['noimageindex']) ? htmlspecialchars(stripcslashes($psp_post_meta['noimageindex'])) : '';
|
194 |
+
$psp_imagepreview = !empty($psp_post_meta['maximage']) ? htmlspecialchars(stripcslashes($psp_post_meta['maximage'])) : '';
|
195 |
+
$psp_videopreview = !empty($psp_post_meta['maxvideo']) ? htmlspecialchars(stripcslashes($psp_post_meta['maxvideo'])) : '';
|
196 |
+
|
197 |
+
if ($psp_noimageindex) {
|
198 |
+
if ($robots_meta != "") {
|
199 |
+
$robots_meta .= ",";
|
200 |
+
}
|
201 |
+
|
202 |
+
$robots_meta .= $this->noimageindex;
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
$psp_noarchive = !empty($psp_post_meta['noarchive']) ? htmlspecialchars(stripcslashes($psp_post_meta['noarchive'])) : '';
|
207 |
+
if (empty($psp_post_meta)) {
|
208 |
+
$psp_noarchive = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_noarchive', true)));
|
209 |
+
}
|
210 |
+
|
211 |
+
if ($psp_noarchive) {
|
212 |
+
if ($robots_meta != "") {
|
213 |
+
$robots_meta .= ",";
|
214 |
+
}
|
215 |
+
|
216 |
+
$robots_meta .= $this->noarchive_tag;
|
217 |
+
|
218 |
+
}
|
219 |
+
|
220 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
221 |
+
|
222 |
+
if ($robots_meta != "") {
|
223 |
+
$robots_meta .= ",";
|
224 |
+
}
|
225 |
+
|
226 |
+
$robots_meta .= $this->noodp_tag;
|
227 |
+
}
|
228 |
+
|
229 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
230 |
+
|
231 |
+
if ($robots_meta != "") {
|
232 |
+
$robots_meta .= ",";
|
233 |
+
}
|
234 |
+
|
235 |
+
$robots_meta .= $this->noydir_tag;
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
$psp_nosnippet = !empty($psp_post_meta['nosnippet']) ? htmlspecialchars(stripcslashes($psp_post_meta['nosnippet'])) : '';
|
240 |
+
$psp_maxsnippet = !empty($psp_post_meta['maxsnippet']) ? htmlspecialchars(stripcslashes($psp_post_meta['maxsnippet'])) : '';
|
241 |
+
|
242 |
+
if (empty($psp_post_meta)) {
|
243 |
+
|
244 |
+
$psp_nosnippet = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_nosnippet', true)));
|
245 |
+
|
246 |
+
}
|
247 |
+
if ($psp_nosnippet) {
|
248 |
+
if ($robots_meta != "") {
|
249 |
+
$robots_meta .= ",";
|
250 |
+
}
|
251 |
+
|
252 |
+
$robots_meta .= $this->nosnippet_tag;
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
if (!$psp_nosnippet && $psp_maxsnippet) {
|
257 |
+
if ($robots_meta != "") {
|
258 |
+
$robots_meta .= ",";
|
259 |
+
}
|
260 |
+
if($psp_maxsnippet == "zero") $psp_maxsnippet = 0;
|
261 |
+
$robots_meta .= "max-snippet:".esc_attr($psp_maxsnippet);
|
262 |
+
|
263 |
+
}
|
264 |
+
|
265 |
+
if (!$psp_noimageindex && $psp_imagepreview) {
|
266 |
+
if ($robots_meta != "") {
|
267 |
+
$robots_meta .= ",";
|
268 |
+
}
|
269 |
+
|
270 |
+
$robots_meta .= "max-image-preview:".esc_attr($psp_imagepreview);
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
if ($psp_videopreview) {
|
275 |
+
if ($robots_meta != "") {
|
276 |
+
$robots_meta .= ",";
|
277 |
+
}
|
278 |
+
if($psp_videopreview == "zero") $psp_videopreview = 0;
|
279 |
+
$robots_meta .= "max-video-preview:".esc_attr($psp_videopreview);
|
280 |
+
|
281 |
+
}
|
282 |
+
|
283 |
+
if ($robots_meta != "" ) {
|
284 |
+
|
285 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
return $robots_meta_string;
|
290 |
+
|
291 |
+
} // end get_pt_robots_meta;
|
292 |
+
|
293 |
+
private function get_unique_keywords($keywords) {
|
294 |
+
|
295 |
+
$uni_keywords = array();
|
296 |
+
foreach ($keywords as $word) {
|
297 |
+
$uni_keywords[] = $word;
|
298 |
+
/*if (function_exists('mb_strtolower')) {
|
299 |
+
if (mb_detect_encoding($word) == 'UTF8') {
|
300 |
+
$small_keywords[] = mb_strtolower($word, 'UTF8');
|
301 |
+
} else {
|
302 |
+
$small_keywords[] = strtolower($word);
|
303 |
+
}
|
304 |
+
} else {
|
305 |
+
$small_keywords[] = strtolower($word);
|
306 |
+
}*/
|
307 |
+
}
|
308 |
+
$keywords_ar = array_unique($uni_keywords);
|
309 |
+
return implode(',', $keywords_ar);
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* @return comma-separated list of unique keywords
|
314 |
+
*/
|
315 |
+
private function get_all_keywords($post, $psp_post_meta) {
|
316 |
+
|
317 |
+
if (is_404()) {
|
318 |
+
return null;
|
319 |
+
}
|
320 |
+
|
321 |
+
$keywords = array();
|
322 |
+
|
323 |
+
if ($post) {
|
324 |
+
|
325 |
+
// custom field keywords
|
326 |
+
$keywords_a = $keywords_i = null;
|
327 |
+
|
328 |
+
$keywords_i = !empty($psp_post_meta['keywords']) ? htmlspecialchars(stripcslashes($psp_post_meta['keywords'])) : '';
|
329 |
+
|
330 |
+
if (empty($psp_post_meta)) {
|
331 |
+
|
332 |
+
$keywords_i = stripcslashes($this->psp_helper->internationalize(get_post_meta($post->ID, "keywords", true)));
|
333 |
+
}
|
334 |
+
//get other SEO plugins keywords here
|
335 |
+
$keywords_i = str_replace('"', '', $keywords_i);
|
336 |
+
|
337 |
+
if (isset($keywords_i) && !empty($keywords_i)) {
|
338 |
+
$traverse = explode(',', $keywords_i);
|
339 |
+
foreach ($traverse as $keyword) {
|
340 |
+
$keywords[] = $keyword;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
/**************use tags and use categories in meta keywords commented**********************
|
344 |
+
if (get_option('psp_use_tags') && !is_page()) {
|
345 |
+
|
346 |
+
// WP 2.3 tags
|
347 |
+
if (function_exists('get_the_tags')) {
|
348 |
+
$tags = get_the_tags($post->ID);
|
349 |
+
if ($tags && is_array($tags)) {
|
350 |
+
foreach ($tags as $tag) {
|
351 |
+
$keywords[] = $this->psp_helper->internationalize($tag->name);
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
if (get_option('aiosp_use_categories') && !is_page()) {
|
358 |
+
$categories = get_the_category($post->ID);
|
359 |
+
foreach ($categories as $category) {
|
360 |
+
$keywords[] = $this->psp_helper->internationalize($category->cat_name);
|
361 |
+
}
|
362 |
+
}
|
363 |
+
******************use tags and use categories in meta keywords commented******/
|
364 |
+
}
|
365 |
+
//$keywords_ar = array_unique($keywords);
|
366 |
+
//return implode(',', $keywords_ar);
|
367 |
+
return $this->get_unique_keywords($keywords);
|
368 |
+
}
|
369 |
+
|
370 |
+
private function get_pt_description_meta($post, $psp_post_meta) {
|
371 |
+
|
372 |
+
$desc_meta = "";
|
373 |
+
$desc_meta_string = "";
|
374 |
+
$keyword_meta_string = "";
|
375 |
+
|
376 |
+
$psp_settings = $this->psp_sitewide_settings;
|
377 |
+
$this->post_type_name = $post->post_type;
|
378 |
+
|
379 |
+
if (is_page()) {
|
380 |
+
if ($this->is_static_front_page($post)){
|
381 |
+
//$home_desc_keyword_meta_string = get_home_description_meta();
|
382 |
+
//return $home_desc_keyword_meta_string;
|
383 |
+
//$psp_home_settings = get_option('psp_home_settings');
|
384 |
+
//$title = $this->psp_helper->internationalize($psp_home_settings['title']);
|
385 |
+
$psp_ho_instance = PspHomeOthersSeoMetas::get_instance();
|
386 |
+
$home_desc_keyword_meta_string = $psp_ho_instance->get_home_description_meta();
|
387 |
+
return $home_desc_keyword_meta_string;
|
388 |
+
}
|
389 |
+
}
|
390 |
+
|
391 |
+
//$ptype_name = get_post_type($post);
|
392 |
+
//$post_type_desc_format = "psp_".$ptype_name."_desc_format";
|
393 |
+
if (!empty($this->psp_current_ptype_format)) $post_type_format = $this->psp_current_ptype_format;
|
394 |
+
|
395 |
+
$description = !empty($psp_post_meta['description']) ? trim(stripcslashes($this->psp_helper->internationalize($psp_post_meta['description']))) : '';
|
396 |
+
$psp_nogendescription = !empty($psp_post_meta['disable_description']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_description'])) : '';
|
397 |
+
|
398 |
+
//if ($psp_nogendescription) return "";
|
399 |
+
|
400 |
+
|
401 |
+
if (empty($psp_post_meta)) {
|
402 |
+
$description = trim(stripcslashes($this->psp_helper->internationalize(get_post_meta($post->ID, "description", true))));// post_description
|
403 |
+
|
404 |
+
if(empty($description)) {
|
405 |
+
$description = trim(stripcslashes($this->psp_helper->internationalize(get_post_meta($post->ID, "_yoast_wpseo_metadesc", true))));// yoast_description
|
406 |
+
if(!empty(description)) {
|
407 |
+
//trim yoast description of tags
|
408 |
+
$description = preg_replace('/%%[^%]+%%/', '', $description);
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
$psp_nogendescription = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_nogendescription', true)));
|
413 |
+
}
|
414 |
+
//Get another SEO plugin's description here
|
415 |
+
if (empty ($psp_nogendescription)) $psp_nogendescription = false;
|
416 |
+
|
417 |
+
if (!$description) {
|
418 |
+
|
419 |
+
$description = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($post->post_excerpt));
|
420 |
+
|
421 |
+
if (!$description && !$psp_nogendescription && isset($psp_settings['autogenerate_description']) && $psp_settings['autogenerate_description']) {
|
422 |
+
$description = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($post->post_content));
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
// $description = $post->title. $description;
|
427 |
+
// "internal whitespace trim"
|
428 |
+
$description = preg_replace("/\s\s+/", " ", $description);
|
429 |
+
|
430 |
+
$description = trim(strip_tags($description));
|
431 |
+
//$description = str_replace('"', '', $description); // not using addslashes
|
432 |
+
|
433 |
+
// replace newlines on mac / windows?
|
434 |
+
$description = str_replace("\r\n", ' ', $description);
|
435 |
+
|
436 |
+
// maybe linux uses this alone
|
437 |
+
$description = str_replace("\n", ' ', $description);
|
438 |
+
|
439 |
+
if (empty($desc_meta)) {
|
440 |
+
if (isset($description) && $description !== "") {
|
441 |
+
$desc_meta = $description;
|
442 |
+
}
|
443 |
+
} else {
|
444 |
+
//do nothing
|
445 |
+
}
|
446 |
+
|
447 |
+
if (!empty($desc_meta)) {
|
448 |
+
|
449 |
+
// description format
|
450 |
+
//$description_format = get_option($post_type_desc_format);
|
451 |
+
$description_format = isset($post_type_format['description']) ? $post_type_format['description'] : '';
|
452 |
+
$psp_desc_format = isset($psp_post_meta['descformat']) ? $psp_post_meta['descformat'] : $description_format;
|
453 |
+
$description_format = $psp_desc_format;
|
454 |
+
|
455 |
+
//description format disable check for this post/page.
|
456 |
+
$psp_nodescformat = !empty($psp_post_meta['disable_desc_format']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_desc_format'])) : '';
|
457 |
+
if ($psp_nodescformat) $description_format = "";
|
458 |
+
|
459 |
+
if (!isset($description_format) || empty($description_format)) {
|
460 |
+
$description_format = "%description%";
|
461 |
+
$description = str_replace('%description%', $desc_meta, $description_format);
|
462 |
+
} else {
|
463 |
+
$original_wp_title = $this->psp_helper->internationalize($post->post_title);
|
464 |
+
/************commented**********
|
465 |
+
$description = str_replace('%description%', $desc_meta, $description_format);
|
466 |
+
$description = str_replace('%blog_title%', get_bloginfo('name'), $description);
|
467 |
+
$description = str_replace('%blog_description%', get_bloginfo('description'), $description);
|
468 |
+
//$original_wp_title = $this->psp_helper->internationalize(wp_title('', false));
|
469 |
+
$description = str_replace('%wp_title%', $original_wp_title, $description);
|
470 |
+
|
471 |
+
|
472 |
+
$post_title_desc = $this->psp_helper->internationalize(get_post_meta($post->ID, "title", true));
|
473 |
+
if (!$post_title_desc) {
|
474 |
+
$post_title_desc = $this->psp_helper->internationalize(get_post_meta($post->ID, "title_tag", true));
|
475 |
+
if (!$post_title_desc) {
|
476 |
+
$post_title_desc = $original_wp_title;
|
477 |
+
//$post_title_desc = str_replace(']]>', ']]>', $post_title_desc);
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
$post_title_desc = htmlspecialchars(stripcslashes($post_title_desc), ENT_QUOTES);
|
482 |
+
|
483 |
+
$description = str_replace('%post_title%', trim($post_title_desc), $description);
|
484 |
+
**********************/
|
485 |
+
$sitename = $this->sitename;
|
486 |
+
$sitedescription = $this->sitedescription;
|
487 |
+
//$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? htmlentities($this->psp_sitewide_settings['separator']) : '';
|
488 |
+
$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? $this->psp_sitewide_settings['separator'] : '';
|
489 |
+
$psp_seo_title = "";
|
490 |
+
if (!empty($this->post_type_title)) $psp_seo_title = $this->post_type_title;
|
491 |
+
|
492 |
+
$search_format = array('%seo_description%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%seo_title%', '%sep%');
|
493 |
+
$replaced_format = array($desc_meta, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $psp_seo_title, $psp_title_separator);
|
494 |
+
$description = str_replace($search_format, $replaced_format, $description_format);
|
495 |
+
}
|
496 |
+
$this->post_type_description = $description;
|
497 |
+
$desc_meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", stripcslashes(esc_attr($description)));
|
498 |
+
//descripyion is disabled for this page
|
499 |
+
if (!empty($psp_post_meta['disable_description']) && $psp_post_meta['disable_description']) $desc_meta_string = "";
|
500 |
+
}
|
501 |
+
|
502 |
+
//check for use_meta_keywords
|
503 |
+
$use_meta_keywords = isset($psp_settings['use_meta_keywords']) ? $psp_settings['use_meta_keywords'] : '';
|
504 |
+
$disable_keywords_for_post = !empty($psp_post_meta['disable_keywords']) ? $psp_post_meta['disable_keywords'] : '';
|
505 |
+
if ( $use_meta_keywords && !$disable_keywords_for_post ) {
|
506 |
+
//Fetch keywords and Form meta keyword string
|
507 |
+
$keywords = $this->get_all_keywords($post, $psp_post_meta);
|
508 |
+
|
509 |
+
//if ($keywords != "" || $keywords != null) {
|
510 |
+
if (!empty($keywords)) {
|
511 |
+
$keywords = $this->psp_helper->internationalize($keywords);
|
512 |
+
$this->post_type_keywords = $keywords;
|
513 |
+
$keyword_meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", stripcslashes(esc_attr($keywords)));
|
514 |
+
}
|
515 |
+
}
|
516 |
+
|
517 |
+
if (isset($desc_meta_string) && $desc_meta_string != "" && isset($keyword_meta_string) && $keyword_meta_string != "") {
|
518 |
+
$desc_meta_string .= "\r\n";
|
519 |
+
}
|
520 |
+
|
521 |
+
|
522 |
+
return $desc_meta_string.$keyword_meta_string;
|
523 |
+
|
524 |
+
} // end get_pt_description_meta;
|
525 |
+
|
526 |
+
private function get_pt_canonical_meta($post, $psp_post_meta, $canonical=false, $pagednum) {
|
527 |
+
|
528 |
+
$post_link = "";
|
529 |
+
$cat_link = "";
|
530 |
+
$set_can_link = "";
|
531 |
+
$canonical_meta_string = "";
|
532 |
+
//global $wp_query;
|
533 |
+
$this_is_static_front_page = false;
|
534 |
+
$disable_canonical_here = false;
|
535 |
+
|
536 |
+
$disable_canonical_here = !empty($psp_post_meta['disable_canonical']) ? $psp_post_meta['disable_canonical'] : '';
|
537 |
+
|
538 |
+
if ($disable_canonical_here) return $canonical_meta_string;
|
539 |
+
|
540 |
+
if ( !$disable_canonical_here ) {
|
541 |
+
$can_link = !empty($psp_post_meta['canonical_url']) ? esc_url($psp_post_meta['canonical_url']) : '';
|
542 |
+
}
|
543 |
+
//get other seoplugins canonical here
|
544 |
+
if ( $canonical ) {
|
545 |
+
|
546 |
+
if (empty($can_link)) {
|
547 |
+
$post_link = get_permalink($post->ID);
|
548 |
+
$can_link = $post_link;
|
549 |
+
}
|
550 |
+
|
551 |
+
/*commendted out, so no canlinks for sub pages of post types
|
552 |
+
if ($paged && $paged > 1) {
|
553 |
+
$can_link = $this->pt_paged_link($post_link, $post, $pagednum);
|
554 |
+
}*/
|
555 |
+
|
556 |
+
|
557 |
+
//$can_link = trailingslashit($can_link);
|
558 |
+
|
559 |
+
|
560 |
+
if (is_page()) {
|
561 |
+
if ($this->is_static_front_page($post)){
|
562 |
+
|
563 |
+
$this_is_static_front_page = true;
|
564 |
+
$home_link = get_option('home');
|
565 |
+
//can link for sub pages created using Next page quicktag.Is it needed?
|
566 |
+
$can_link = $this->pt_paged_link($home_link, $post, $pagednum);
|
567 |
+
$can_link = trailingslashit($can_link);
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
if (is_attachment()){
|
572 |
+
$can_link = get_permalink($post->post_parent);
|
573 |
+
}
|
574 |
+
}
|
575 |
+
|
576 |
+
if (!empty($can_link)) {
|
577 |
+
//if ($can_link != '' && ($canonical)) {
|
578 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
579 |
+
$this->post_type_can_link = $can_link;
|
580 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
581 |
+
}
|
582 |
+
|
583 |
+
if (!$this_is_static_front_page && $pagednum > 1) $canonical_meta_string = "";
|
584 |
+
|
585 |
+
return $canonical_meta_string;
|
586 |
+
|
587 |
+
} // end get_pt_canonical_meta;
|
588 |
+
|
589 |
+
private function is_static_front_page($post) {
|
590 |
+
//global $wp_query;
|
591 |
+
//$post = $wp_query->get_queried_object();
|
592 |
+
return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front');
|
593 |
+
}
|
594 |
+
|
595 |
+
private function is_static_posts_page($post) {
|
596 |
+
//global $wp_query;
|
597 |
+
//$post = $wp_query->get_queried_object();
|
598 |
+
return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts');
|
599 |
+
}
|
600 |
+
|
601 |
+
private function pt_paged_link($link, $post, $paged) {
|
602 |
+
|
603 |
+
//$paged = get_query_var('paged');
|
604 |
+
//$paged = $this->is_this_paged($post);
|
605 |
+
$has_ut = function_exists('user_trailingslashit');
|
606 |
+
if ($paged && $paged > 1) {
|
607 |
+
$link = trailingslashit($link) ."page/". "$paged";
|
608 |
+
if ($has_ut) {
|
609 |
+
$link = user_trailingslashit($link, 'paged');
|
610 |
+
} else {
|
611 |
+
$link .= '/';
|
612 |
+
}
|
613 |
+
}
|
614 |
+
return $link;
|
615 |
+
}
|
616 |
+
/***
|
617 |
+
private function trim_excerpt_without_filters_full_length($text) {
|
618 |
+
$text = str_replace(']]>', ']]>', $text);
|
619 |
+
$text = strip_tags($text);
|
620 |
+
return trim(stripcslashes($text));
|
621 |
+
}
|
622 |
+
**********/
|
623 |
+
private function is_this_paged() {
|
624 |
+
|
625 |
+
/*$paged = get_query_var( 'paged', 1 );
|
626 |
+
if (is_page($post->ID)) {
|
627 |
+
if (is_static_front_page($post)) {
|
628 |
+
$paged = get_query_var('page', 1);
|
629 |
+
}
|
630 |
+
}*/
|
631 |
+
|
632 |
+
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
|
633 |
+
elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
|
634 |
+
else { $paged = 1; }
|
635 |
+
|
636 |
+
return $paged;
|
637 |
+
}
|
638 |
+
|
639 |
+
public function pt_paged_title($title) {
|
640 |
+
// the page number if paged
|
641 |
+
$paged = $this->is_this_paged();
|
642 |
+
|
643 |
+
if ($paged && $paged>1) {
|
644 |
+
//$part = $this->internationalize(get_option('aiosp_paged_format'));
|
645 |
+
$psp_settings = $this->psp_sitewide_settings;
|
646 |
+
$part = isset($psp_settings['psp_paged_title_format']) ? $this->psp_helper->internationalize($psp_settings['psp_paged_title_format']) : '';
|
647 |
+
|
648 |
+
//if (isset($part) || !empty($part)) {
|
649 |
+
if (isset($part) && !empty($part)) {
|
650 |
+
$part = " " . trim($part);
|
651 |
+
$part = str_replace('%page%', $paged, $part);
|
652 |
+
//$this->log("pt_paged_title() [$title] [$part]");
|
653 |
+
$title .= $part;
|
654 |
+
}
|
655 |
+
}
|
656 |
+
return $title;
|
657 |
+
}
|
658 |
+
|
659 |
+
/**
|
660 |
+
* Check if a post is a custom post type.
|
661 |
+
* @param mixed $post Post object or ID
|
662 |
+
* @return boolean
|
663 |
+
*/
|
664 |
+
private function is_custom_post_type( $post = NULL )
|
665 |
+
{
|
666 |
+
$custom_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
667 |
+
|
668 |
+
// if there are no custom post types, return false
|
669 |
+
if ( empty ( $custom_post_types ) )
|
670 |
+
return FALSE;
|
671 |
+
|
672 |
+
$custom_types = array_keys( $custom_post_types );
|
673 |
+
$current_post_type = get_post_type( $post );
|
674 |
+
|
675 |
+
// if current post type cannot be detected
|
676 |
+
if ( ! $current_post_type )
|
677 |
+
return FALSE;
|
678 |
+
|
679 |
+
return in_array( $current_post_type, $custom_types );
|
680 |
+
}
|
681 |
+
|
682 |
+
public function get_single_psp_title($post) {
|
683 |
+
|
684 |
+
$title = "";
|
685 |
+
|
686 |
+
if (!empty($this->psp_current_ptype_format)){
|
687 |
+
$current_ptype_format = $this->psp_current_ptype_format;
|
688 |
+
} else {
|
689 |
+
//$ptype_name = get_post_type($post);
|
690 |
+
$current_ptype_format_option = "psp_post_settings";
|
691 |
+
$current_ptype_format = get_option($current_ptype_format_option);
|
692 |
+
$this->psp_current_ptype_format = $current_ptype_format;
|
693 |
+
}
|
694 |
+
|
695 |
+
if (!empty($this->psp_current_ptype_meta)){
|
696 |
+
$psp_post_meta = $this->psp_current_ptype_meta;
|
697 |
+
} else {
|
698 |
+
$psp_post_meta = get_post_meta($post_id, '_psp_post_seo_meta', true);
|
699 |
+
$this->psp_current_ptype_meta = $psp_post_meta;
|
700 |
+
}
|
701 |
+
|
702 |
+
$title = $this->psp_helper->internationalize($psp_post_meta['title']);
|
703 |
+
if (empty($title)) {
|
704 |
+
$title = $this->psp_helper->internationalize(get_post_meta($post->ID, "title", true));
|
705 |
+
if (!$title) {
|
706 |
+
//$title = $this->psp_helper->internationalize(get_post_meta($post->ID, "title_tag", true));
|
707 |
+
$title = $this->psp_helper->internationalize($post->post_title);
|
708 |
+
//if (!$title) {
|
709 |
+
//$title = $this->psp_helper->internationalize(wp_title('', false));
|
710 |
+
//$title = $this->psp_helper->internationalize($post->post_title);
|
711 |
+
//}
|
712 |
+
}
|
713 |
+
}
|
714 |
+
$psp_notitleformat = $psp_post_meta['disable_title_format'];
|
715 |
+
|
716 |
+
if (empty($psp_notitleformat)) {
|
717 |
+
$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
718 |
+
}
|
719 |
+
|
720 |
+
if (!$psp_notitleformat) {
|
721 |
+
|
722 |
+
$authordata = get_userdata($post->post_author);
|
723 |
+
$categories = get_the_category($post->ID);
|
724 |
+
//$category = '';
|
725 |
+
//if (count($categories) > 0) {
|
726 |
+
// $category = $categories[0]->cat_name;
|
727 |
+
//}
|
728 |
+
|
729 |
+
//$title_format = get_option('aiosp_post_title_format');
|
730 |
+
$title_format = $current_ptype_format['title'];
|
731 |
+
$psp_single_title_format = isset($psp_post_meta['titleformat']) ? $psp_post_meta['titleformat'] : $title_format;
|
732 |
+
$title_format = $psp_single_title_format;
|
733 |
+
|
734 |
+
$sitename = $this->sitename;
|
735 |
+
$sitedescription = $this->sitedescription;
|
736 |
+
|
737 |
+
$categoryname = $categories[0]->cat_name; //not needed
|
738 |
+
$userlogin = $authordata->user_login;
|
739 |
+
$usernicename = $authordata->user_nicename;
|
740 |
+
$userfirstname = $authordata->user_firstname;
|
741 |
+
$userlastname = $authordata->user_lastname;
|
742 |
+
|
743 |
+
$search_format = array('%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%');
|
744 |
+
$replaced_format = array($sitename, $sitedescription, $sitename, $sitedescription, $title, $categoryname, $categoryname, $userlogin, $usernicename, $userfirstname, $userlastname);
|
745 |
+
$new_title = str_replace($search_format, $replaced_format, $title_format);
|
746 |
+
$title = $new_title;
|
747 |
+
/************commented**************
|
748 |
+
$new_title = str_replace('%blog_title%', $sitename, $title_format);
|
749 |
+
$new_title = str_replace('%blog_description%', $sitedescription, $new_title);
|
750 |
+
$new_title = str_replace('%site_name%', $sitename, $new_title);
|
751 |
+
$new_title = str_replace('%site_description%', $sitedescription, $new_title);
|
752 |
+
$new_title = str_replace('%post_title%', $title, $new_title);
|
753 |
+
//$new_title = str_replace('%category%', $category, $new_title);
|
754 |
+
//$new_title = str_replace('%category_title%', $category, $new_title);
|
755 |
+
$new_title = str_replace('%category%', $categories[0]->cat_name, $new_title);
|
756 |
+
$new_title = str_replace('%category_title%', $categories[0]->cat_name, $new_title);
|
757 |
+
$new_title = str_replace('%post_author_username%', $authordata->user_login, $new_title);
|
758 |
+
$new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title);
|
759 |
+
$new_title = str_replace('%post_author_firstname%', ucwords($authordata->user_firstname), $new_title);
|
760 |
+
$new_title = str_replace('%post_author_lastname%', ucwords($authordata->user_lastname), $new_title);
|
761 |
+
$title = $new_title;
|
762 |
+
********************/
|
763 |
+
}
|
764 |
+
$title = stripcslashes(trim($title));
|
765 |
+
if (1 < $this->is_this_paged()) $title = $this->pt_paged_title($title);
|
766 |
+
|
767 |
+
$title = trim($title);
|
768 |
+
//$title = trim($title, $psp_title_separator );
|
769 |
+
return $title;
|
770 |
+
|
771 |
+
} // end get_single_psp_title
|
772 |
+
|
773 |
+
public function get_pt_psp_title($post, $psparr = false) {
|
774 |
+
|
775 |
+
$title = "";
|
776 |
+
$psp_post_meta = array();
|
777 |
+
$psp_post_meta_data = array();
|
778 |
+
//$current_ptype_format = array();
|
779 |
+
//$wp_post_meta_data_arr = array();
|
780 |
+
// we're not in the loop :(
|
781 |
+
$ptype_name = '';
|
782 |
+
//$post_type_title_format = "psp_".$ptype_name."_title_format";
|
783 |
+
if(!is_object($post) || !isset( $post->ID )) return "";
|
784 |
+
if (!empty($this->psp_current_ptype_meta)){
|
785 |
+
|
786 |
+
$psp_post_meta = $this->psp_current_ptype_meta;
|
787 |
+
} else {
|
788 |
+
//$psp_post_meta = get_post_meta($post_id, '_psp_post_seo_meta', true);
|
789 |
+
$wp_post_meta_data_arr = get_post_meta($post->ID);
|
790 |
+
/************
|
791 |
+
foreach ($wp_post_meta_data_arr as $key => $value) {
|
792 |
+
|
793 |
+
$wp_post_meta_data[$key] = $value[0];
|
794 |
+
|
795 |
+
}
|
796 |
+
$psp_post_meta_data['title'] = $wp_post_meta_data['_techblissonline_psp_title'];
|
797 |
+
$psp_post_meta_data['description'] = $wp_post_meta_data['_techblissonline_psp_description'];
|
798 |
+
$psp_post_meta_data['keywords'] = $wp_post_meta_data['_techblissonline_psp_keywords'];
|
799 |
+
$psp_post_meta_data['robots'] = $wp_post_meta_data['_techblissonline_psp_robots_meta'];
|
800 |
+
$psp_post_meta_data['canonical_url'] = $wp_post_meta_data['_techblissonline_psp_canonical_url'];
|
801 |
+
$psp_post_meta_data['noarchive'] = $wp_post_meta_data['_techblissonline_psp_noarchive'];
|
802 |
+
$psp_post_meta_data['nosnippet'] = $wp_post_meta_data['_techblissonline_psp_nosnippet'];
|
803 |
+
$psp_post_meta_data['noimageindex'] = $wp_post_meta_data_arr['_techblissonline_psp_noimageidx'];
|
804 |
+
$psp_post_meta_data['redirect_to_url'] = $wp_post_meta_data['_techblissonline_psp_redirect_to_url'];
|
805 |
+
$psp_post_meta_data['redirect_status_code'] = $wp_post_meta_data['_techblissonline_psp_redirect_status_code'];
|
806 |
+
|
807 |
+
//$psp_post_disablers = $wp_post_meta_data['_techblissonline_psp_disable_flags'];
|
808 |
+
$psp_post_disablers = unserialize($wp_post_meta_data['_techblissonline_psp_disable_flags']);
|
809 |
+
***********/
|
810 |
+
$psp_post_meta_data['title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_title'][0] : '';
|
811 |
+
if(isset($wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0])) {
|
812 |
+
$psp_post_meta_data['titleformat'] = $wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0];
|
813 |
+
}
|
814 |
+
if(isset($wp_post_meta_data_arr['_techblissonline_psp_descformat'][0])) {
|
815 |
+
$psp_post_meta_data['descformat'] = $wp_post_meta_data_arr['_techblissonline_psp_descformat'][0];
|
816 |
+
}
|
817 |
+
|
818 |
+
$psp_post_meta_data['description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_description'][0] : '';
|
819 |
+
$psp_post_meta_data['keywords'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_keywords'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_keywords'][0] : '';
|
820 |
+
$psp_post_meta_data['robots'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0] : '';
|
821 |
+
$psp_post_meta_data['noindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noindex'][0] : '';
|
822 |
+
$psp_post_meta_data['nofollow'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0] : '';
|
823 |
+
$psp_post_meta_data['nositemap'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0] : '';
|
824 |
+
$psp_post_meta_data['maxsnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0] : '';
|
825 |
+
$psp_post_meta_data['maxvideo'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0] : '';
|
826 |
+
$psp_post_meta_data['maximage'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maximage'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maximage'][0] : '';
|
827 |
+
$psp_post_meta_data['canonical_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0] : '';
|
828 |
+
$psp_post_meta_data['noarchive'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0] : '';
|
829 |
+
$psp_post_meta_data['nosnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0] : '';
|
830 |
+
$psp_post_meta_data['noimageindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0] : '';
|
831 |
+
$psp_post_meta_data['redirect_to_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0] : '';
|
832 |
+
$psp_post_meta_data['redirect_status_code'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0] : '';
|
833 |
+
$psp_post_meta_data['preferred_tax'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0] : '';
|
834 |
+
$psp_post_meta_data['schema_string'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0] : '';
|
835 |
+
|
836 |
+
$psp_post_disablers = !empty($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) : array();
|
837 |
+
//social meta
|
838 |
+
$psp_social_meta['fb_og_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0] : '';
|
839 |
+
$psp_social_meta['fb_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0] : '';
|
840 |
+
$psp_social_meta['fb_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0] : '';
|
841 |
+
$psp_social_meta['fb_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0] : '';
|
842 |
+
//$psp_social_meta['fb_ogtype_properties'] = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0] : '';
|
843 |
+
//$psp_post_fb_ogtype_properties = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) : array();
|
844 |
+
$psp_post_fb_ogtype_properties = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0] : '';
|
845 |
+
//$psp_social_meta['fb_ogtype_properties'] = http_build_query($psp_post_fb_ogtype_properties, '', '\r\n');
|
846 |
+
$psp_social_meta['fb_ogtype_properties'] =$psp_post_fb_ogtype_properties;
|
847 |
+
$psp_social_meta['fb_media_properties'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0] : '';
|
848 |
+
|
849 |
+
$psp_social_meta['tw_card_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0] : '';
|
850 |
+
$psp_social_meta['tw_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0] : '';
|
851 |
+
$psp_social_meta['tw_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0] : '';
|
852 |
+
|
853 |
+
$psp_post_tw_data_images = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) : array();
|
854 |
+
$psp_post_social_tw_label_data = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) : array();
|
855 |
+
|
856 |
+
$psp_social_meta['tw_creator'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0] : '';
|
857 |
+
$psp_social_meta['tw_imagealt'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0] : '';
|
858 |
+
$psp_social_meta['tw_player'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0] : '';
|
859 |
+
$psp_social_meta['tw_player_stream'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0] : '';
|
860 |
+
$psp_social_meta['tw_player_width'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0] : '';
|
861 |
+
$psp_social_meta['tw_player_height'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0] : '';
|
862 |
+
|
863 |
+
$psp_social_meta['tw_app_country'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0] : '';
|
864 |
+
$psp_social_meta['tw_app_name_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0] : '';
|
865 |
+
$psp_social_meta['tw_app_id_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0] : '';
|
866 |
+
$psp_social_meta['tw_app_url_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0] : '';
|
867 |
+
$psp_social_meta['tw_app_name_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0] : '';
|
868 |
+
$psp_social_meta['tw_app_id_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0] : '';
|
869 |
+
$psp_social_meta['tw_app_url_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0] : '';
|
870 |
+
$psp_social_meta['tw_app_name_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0] : '';
|
871 |
+
$psp_social_meta['tw_app_id_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0] : '';
|
872 |
+
$psp_social_meta['tw_app_url_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0] : '';
|
873 |
+
|
874 |
+
$psp_social_meta['sc_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0] : '';
|
875 |
+
$psp_social_meta['sc_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0] : '';
|
876 |
+
$psp_social_meta['sc_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0] : '';
|
877 |
+
|
878 |
+
$psp_social_meta = array_merge((array)$psp_social_meta, (array)$psp_post_tw_data_images, (array)$psp_post_social_tw_label_data);
|
879 |
+
$this->psp_current_ptype_social_meta = $psp_social_meta;
|
880 |
+
|
881 |
+
$psp_post_meta = array_merge((array)$psp_post_meta_data, (array)$psp_post_disablers);
|
882 |
+
|
883 |
+
$this->psp_current_ptype_meta = $psp_post_meta;
|
884 |
+
}
|
885 |
+
|
886 |
+
$psp_disable = !empty($psp_post_meta['disable_psp']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_psp'])) : '';
|
887 |
+
$psp_disable_title_here = !empty($psp_post_meta['disable_title']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_title'])) : '';
|
888 |
+
|
889 |
+
if (!empty($this->psp_current_ptype_format)){
|
890 |
+
$current_ptype_format = $this->psp_current_ptype_format;
|
891 |
+
} else {
|
892 |
+
$ptype_name = get_post_type($post);
|
893 |
+
$current_ptype_format_option = "psp_".$ptype_name."_settings";
|
894 |
+
$current_ptype_format = get_option($current_ptype_format_option);
|
895 |
+
$this->psp_current_ptype_format = $current_ptype_format;
|
896 |
+
}
|
897 |
+
|
898 |
+
//$title = $this->psp_helper->internationalize($psp_post_meta['title']);
|
899 |
+
$title = !empty($psp_post_meta['title']) ? htmlspecialchars(stripcslashes($this->psp_helper->internationalize($psp_post_meta['title']))) : '';
|
900 |
+
if ($psp_disable || $psp_disable_title_here) {
|
901 |
+
//return "";
|
902 |
+
$title = htmlspecialchars(stripcslashes($this->psp_helper->internationalize($post->post_title)));
|
903 |
+
}
|
904 |
+
//get other seo plugins title here
|
905 |
+
if (empty($title)) {
|
906 |
+
//$title = htmlspecialchars(stripcslashes($this->psp_helper->internationalize(get_post_meta($post->ID, "title", true))));
|
907 |
+
$title = get_post_meta($post->ID, "title", true);
|
908 |
+
if (isset($title) && !empty($title)) {
|
909 |
+
$title = htmlspecialchars(stripcslashes($this->psp_helper->internationalize($title)));
|
910 |
+
//if (!$title) {
|
911 |
+
} else {
|
912 |
+
|
913 |
+
$yoast_title = trim(stripcslashes($this->psp_helper->internationalize(get_post_meta($post->ID, "_yoast_wpseo_title", true))));// yoast_title
|
914 |
+
//trim yoast title of tags
|
915 |
+
if (!empty($yoast_title)) {
|
916 |
+
$yoast_title = preg_replace('/%%[^%]+%%/', '', $yoast_title);
|
917 |
+
$title = !empty($yoast_title) ? $yoast_title : '';
|
918 |
+
}
|
919 |
+
|
920 |
+
//$title = htmlspecialchars(stripcslashes($this->psp_helper->internationalize($post->post_title)));
|
921 |
+
}
|
922 |
+
}
|
923 |
+
//assign wp title, if seo title is still empty
|
924 |
+
//$title = empty($title) ? htmlspecialchars(stripcslashes($this->psp_helper->internationalize($post->post_title))):'';
|
925 |
+
if (empty($title)) {
|
926 |
+
$title = htmlspecialchars(stripcslashes($this->psp_helper->internationalize($post->post_title)));
|
927 |
+
}
|
928 |
+
|
929 |
+
$psp_notitleformat = !empty($psp_post_meta['disable_title_format']) ? $psp_post_meta['disable_title_format'] : '';
|
930 |
+
if (empty($psp_notitleformat)) {
|
931 |
+
$psp_notitleformat = get_post_meta($post->ID, 'psp_notitleformat', true);
|
932 |
+
if (!empty($psp_notitleformat)) $psp_notitleformat = htmlspecialchars(stripcslashes($psp_notitleformat));
|
933 |
+
//$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
934 |
+
}
|
935 |
+
$title = stripcslashes(trim($title));
|
936 |
+
//if (!$psp_notitleformat) {
|
937 |
+
|
938 |
+
$authordata = get_userdata($post->post_author);
|
939 |
+
//$categories = get_the_category($post->ID);
|
940 |
+
//$categoryname = isset($categories[0]->cat_name) ? $categories[0]->cat_name : '';
|
941 |
+
|
942 |
+
//$categoryname = $categories[0]->cat_name; //not needed
|
943 |
+
//$category = '';
|
944 |
+
//if (count($categories) > 0) {
|
945 |
+
// $category = $categories[0]->cat_name;
|
946 |
+
//}
|
947 |
+
|
948 |
+
//$title_format = get_option($post_type_title_format);
|
949 |
+
/***
|
950 |
+
$args = array(
|
951 |
+
'taxonomy' => $psp_post_meta_data['preferred_tax'],
|
952 |
+
'orderby' => 'name',
|
953 |
+
'hierarchical' => true,
|
954 |
+
'title_li' => ''
|
955 |
+
);
|
956 |
+
wp_list_categories($args);
|
957 |
+
****/
|
958 |
+
$preferred_tax = !empty($psp_post_meta['preferred_tax']) ? $psp_post_meta['preferred_tax'] : 'category';
|
959 |
+
$categories = get_the_terms( $post, $preferred_tax );
|
960 |
+
//sort by ID
|
961 |
+
//if ($categories) usort($categories, array('PspPtsSeoMetas','pspcmp'));
|
962 |
+
$categoryname = isset($categories[0]->name) ? $categories[0]->name : '';
|
963 |
+
|
964 |
+
$title_format = !empty($current_ptype_format['title']) ? $current_ptype_format['title'] : '';
|
965 |
+
$psp_post_title_format = isset($psp_post_meta['titleformat']) ? $psp_post_meta['titleformat'] : $title_format;
|
966 |
+
$title_format = $psp_post_title_format;
|
967 |
+
|
968 |
+
//if(!empty($title_format)) {
|
969 |
+
$sitename = $this->sitename;
|
970 |
+
$sitedescription = $this->sitedescription;
|
971 |
+
|
972 |
+
$original_wp_title = $this->psp_helper->internationalize($post->post_title);
|
973 |
+
|
974 |
+
$userlogin = $authordata->user_login;
|
975 |
+
$usernicename = $authordata->user_nicename;
|
976 |
+
$userfirstname = $authordata->user_firstname;
|
977 |
+
$userlastname = $authordata->user_lastname;
|
978 |
+
|
979 |
+
//$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? htmlentities($this->psp_sitewide_settings['separator']) : '';
|
980 |
+
|
981 |
+
$psp_title_separator = isset($this->psp_sitewide_settings['separator']) ? $this->psp_sitewide_settings['separator'] : '';
|
982 |
+
global $pagenow;
|
983 |
+
if (is_admin()) $screen = get_current_screen();
|
984 |
+
if (( $pagenow == 'post.php' ) && ($screen->parent_base == 'edit')) {
|
985 |
+
//if (isset($_GET['post']) && (isset($_GET['action']) && $_GET['action'] == 'edit')) {
|
986 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
987 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
988 |
+
} else {
|
989 |
+
if($post->post_status=="publish"){
|
990 |
+
|
991 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
992 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
993 |
+
} else {
|
994 |
+
|
995 |
+
//$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
996 |
+
//$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
997 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%seo_title%', '%wp_title%', '%category%','%taxonomy%','%author_username%','%author_nicename%','%author_firstname%','%author_lastname%', '%sep%');
|
998 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $original_wp_title, $categoryname, $categoryname, $userlogin, $usernicename,$userfirstname, $userlastname, $psp_title_separator);
|
999 |
+
}
|
1000 |
+
|
1001 |
+
}
|
1002 |
+
if(!empty($title_format)) {
|
1003 |
+
$new_title = str_replace($search_format, $replaced_format, $title_format);
|
1004 |
+
if (!$psp_disable && !$psp_notitleformat) $title = $new_title;
|
1005 |
+
}
|
1006 |
+
//} //titleformat empty
|
1007 |
+
//} //notitileformat
|
1008 |
+
|
1009 |
+
if (1 < $this->is_this_paged()) $title = $this->pt_paged_title($title);
|
1010 |
+
$this->post_type_title = $title;
|
1011 |
+
|
1012 |
+
if ($psparr) {
|
1013 |
+
|
1014 |
+
$sitedescription = !empty($sitedescription) ? $sitedescription : '';
|
1015 |
+
$sitename = !empty($sitename) ? $sitename : '';
|
1016 |
+
$categoryname = !empty($categoryname) ? $categoryname : '';
|
1017 |
+
$title = !empty($title) ? $title : '';
|
1018 |
+
$original_wp_title = !empty($original_wp_title) ? $original_wp_title : '';
|
1019 |
+
$psp_title_separator = !empty($psp_title_separator) ? $psp_title_separator : '';
|
1020 |
+
|
1021 |
+
$psp_post_format_arr = array('site_name' => $sitename, 'site_description' => $sitedescription, 'category' => $categoryname, 'title' => $title, 'seo_title' => $title, 'wp_title' => $original_wp_title, 'sep' => $psp_title_separator);
|
1022 |
+
|
1023 |
+
return $psp_post_format_arr;
|
1024 |
+
|
1025 |
+
}
|
1026 |
+
$title = trim($title);
|
1027 |
+
$psp_title_separator = html_entity_decode($psp_title_separator);
|
1028 |
+
$title = trim($title, $psp_title_separator );
|
1029 |
+
return $title;
|
1030 |
+
|
1031 |
+
} // end get_pt_psp_title
|
1032 |
+
|
1033 |
+
public function get_preferred_taxonomy_for_bc() {
|
1034 |
+
return $this->preferred_taxonomy_for_bc;
|
1035 |
+
} //get_preferred_taxonomy_for_bc
|
1036 |
+
|
1037 |
+
public function get_default_taxonomy_for_bc() {
|
1038 |
+
return $this->default_taxonomy_for_bc;
|
1039 |
+
} //get_default_taxonomy_for_bc
|
1040 |
+
|
1041 |
+
public function get_page_psp_title($post) {
|
1042 |
+
|
1043 |
+
$title = "";
|
1044 |
+
|
1045 |
+
// we're not in the loop :(
|
1046 |
+
|
1047 |
+
if (!empty($this->psp_current_ptype_meta)){
|
1048 |
+
$psp_post_meta = $this->psp_current_ptype_meta;
|
1049 |
+
} else {
|
1050 |
+
$psp_post_meta = get_post_meta($post_id, '_psp_post_seo_meta', true);
|
1051 |
+
$this->psp_current_ptype_meta = $psp_post_meta;
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
$psp_disable = !empty($psp_post_meta['disable_psp']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_psp'])) : '';
|
1055 |
+
$psp_disable_title_here = !empty($psp_post_meta['disable_title']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_title'])) : '';
|
1056 |
+
|
1057 |
+
if ($psp_disable || $psp_disable_title_here) {
|
1058 |
+
return "";
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
if (!empty($this->psp_current_ptype_format)){
|
1062 |
+
$current_ptype_format = $this->psp_current_ptype_format;
|
1063 |
+
} else {
|
1064 |
+
//$ptype_name = get_post_type($post);
|
1065 |
+
$current_ptype_format_option = "psp_page_settings";
|
1066 |
+
$current_ptype_format = get_option($current_ptype_format_option);
|
1067 |
+
$this->psp_current_ptype_format = $current_ptype_format;
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
//if ($this->is_static_front_page()) {
|
1071 |
+
//if ($this->psp_helper->internationalize(get_option('aiosp_home_title'))) {
|
1072 |
+
// $header = $this->replace_title($header, $this->psp_helper->internationalize(get_option('aiosp_home_title')));
|
1073 |
+
//}
|
1074 |
+
//} else {
|
1075 |
+
$title = !empty($psp_post_meta['title']) ? $this->psp_helper->internationalize($psp_post_meta['title']) : '';
|
1076 |
+
//get other seo plugins title here for pages.
|
1077 |
+
if (empty($title)) {
|
1078 |
+
$title = $this->psp_helper->internationalize(get_post_meta($post->ID, "title", true));
|
1079 |
+
}
|
1080 |
+
if (!$title) {
|
1081 |
+
if ($this->is_static_front_page()) {
|
1082 |
+
$psp_home_settings = get_option('psp_home_settings');
|
1083 |
+
$title = isset($psp_home_settings['title']) ? $this->psp_helper->internationalize($psp_home_settings['title']) : '';
|
1084 |
+
if (empty($title)) {
|
1085 |
+
$title = $this->psp_helper->internationalize(get_option('aiosp_home_title'));
|
1086 |
+
}
|
1087 |
+
} else {
|
1088 |
+
//$title = $this->psp_helper->internationalize(wp_title('', false));
|
1089 |
+
$title = $this->psp_helper->internationalize($post->post_title);
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
$psp_notitleformat = !empty($psp_post_meta['disable_title_format']) ? $psp_post_meta['disable_title_format'] : '';
|
1093 |
+
/*if (empty($psp_notitleformat)) {
|
1094 |
+
$psp_notitleformat = htmlspecialchars(stripcslashes(get_post_meta($post->ID, 'psp_notitleformat', true)));
|
1095 |
+
}*/
|
1096 |
+
if (!$psp_notitleformat) {
|
1097 |
+
|
1098 |
+
$authordata = get_userdata($post->post_author);
|
1099 |
+
$sitename = $this->sitename;
|
1100 |
+
$sitedescription = $this->sitedescription;
|
1101 |
+
|
1102 |
+
//$title_format = get_option('aiosp_page_title_format');
|
1103 |
+
$title_format = isset($current_ptype_format['title']) ? $current_ptype_format['title'] : '';
|
1104 |
+
$psp_page_title_format = isset($psp_post_meta['titleformat']) ? $psp_post_meta['titleformat'] : $title_format;
|
1105 |
+
$title_format = $psp_page_title_format;
|
1106 |
+
|
1107 |
+
if(!empty($title_format)) {
|
1108 |
+
//$categoryname = $categories[0]->cat_name; //not needed
|
1109 |
+
$userlogin = $authordata->user_login;
|
1110 |
+
$usernicename = $authordata->user_nicename;
|
1111 |
+
$userfirstname = $authordata->user_firstname;
|
1112 |
+
$userlastname = $authordata->user_lastname;
|
1113 |
+
|
1114 |
+
$search_format = array('%post_type%', '%blog_title%', '%blog_description%', '%site_name%', '%site_description%', '%page_title%', '%page_author_username%','%page_author_nicename%','%page_author_firstname%','%page_author_lastname%');
|
1115 |
+
$replaced_format = array($ptype_name, $sitename, $sitedescription, $sitename, $sitedescription, $title, $userlogin, $usernicename,$userfirstname, $userlastname);
|
1116 |
+
$new_title = str_replace($search_format, $replaced_format, $title_format);
|
1117 |
+
/****************
|
1118 |
+
$new_title = str_replace('%blog_title%', $sitename, $title_format);
|
1119 |
+
$new_title = str_replace('%blog_description%', $sitedescription, $new_title);
|
1120 |
+
$new_title = str_replace('%page_title%', $title, $new_title);
|
1121 |
+
//author info
|
1122 |
+
$new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title);
|
1123 |
+
$new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title);
|
1124 |
+
$new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title);
|
1125 |
+
$new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title);
|
1126 |
+
***************/
|
1127 |
+
$title = stripcslashes(trim($new_title));
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
//$header = $this->replace_title($header, $title);
|
1131 |
+
if (1 < $this->is_this_paged()) $title = $this->pt_paged_title($title);
|
1132 |
+
return $title;
|
1133 |
+
|
1134 |
+
} // end get_page_psp_title
|
1135 |
+
|
1136 |
+
public function get_pt_seo_metas($post, $canonical) {
|
1137 |
+
|
1138 |
+
$can_link = "";
|
1139 |
+
$term_link = "";
|
1140 |
+
$robots_meta_string = "";
|
1141 |
+
$desc_keyword_meta_string = "";
|
1142 |
+
$canonical_meta_string = "";
|
1143 |
+
$json_schema_string = "";
|
1144 |
+
$jsonld_script_tag = "";
|
1145 |
+
$seo_meta_string = "";
|
1146 |
+
$post_meta = "";
|
1147 |
+
|
1148 |
+
$psp_post_meta = array();
|
1149 |
+
$psp_post_meta_data = array();
|
1150 |
+
$current_ptype_format = array();
|
1151 |
+
|
1152 |
+
$cpage = get_query_var('cpage');
|
1153 |
+
|
1154 |
+
//To handle exta metas,if any, defined in settings.
|
1155 |
+
$meta_string = "";
|
1156 |
+
$meta_psp_string = "";
|
1157 |
+
|
1158 |
+
if(!is_object($post) || !isset( $post->ID )) return "";
|
1159 |
+
|
1160 |
+
$post_id = $post->ID;
|
1161 |
+
|
1162 |
+
//get post meta
|
1163 |
+
//$psp_post_meta = get_post_meta($post_id, '_psp_post_seo_meta', true);
|
1164 |
+
if (!empty($this->psp_current_ptype_meta)){
|
1165 |
+
$psp_post_meta = $this->psp_current_ptype_meta;
|
1166 |
+
} else {
|
1167 |
+
//$psp_post_meta = get_post_meta($post_id, '_psp_post_seo_meta', true);
|
1168 |
+
|
1169 |
+
$wp_post_meta_data_arr = get_post_meta($post->ID);
|
1170 |
+
/**********
|
1171 |
+
foreach ($wp_post_meta_data_arr as $key => $value) {
|
1172 |
+
|
1173 |
+
$wp_post_meta_data[$key] = $value[0];
|
1174 |
+
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
$psp_post_meta_data['title'] = $wp_post_meta_data['_techblissonline_psp_title'];
|
1178 |
+
$psp_post_meta_data['description'] = $wp_post_meta_data['_techblissonline_psp_description'];
|
1179 |
+
$psp_post_meta_data['keywords'] = $wp_post_meta_data['_techblissonline_psp_keywords'];
|
1180 |
+
$psp_post_meta_data['robots'] = $wp_post_meta_data['_techblissonline_psp_robots_meta'];
|
1181 |
+
$psp_post_meta_data['canonical_url'] = $wp_post_meta_data['_techblissonline_psp_canonical_url'];
|
1182 |
+
$psp_post_meta_data['noarchive'] = $wp_post_meta_data['_techblissonline_psp_noarchive'];
|
1183 |
+
$psp_post_meta_data['nosnippet'] = $wp_post_meta_data['_techblissonline_psp_nosnippet'];
|
1184 |
+
$psp_post_meta_data['noimageindex'] = $wp_post_meta_data_arr['_techblissonline_psp_noimageidx'];
|
1185 |
+
$psp_post_meta_data['redirect_to_url'] = $wp_post_meta_data['_techblissonline_psp_redirect_to_url'];
|
1186 |
+
$psp_post_meta_data['redirect_status_code'] = $wp_post_meta_data['_techblissonline_psp_redirect_status_code'];
|
1187 |
+
|
1188 |
+
//$psp_post_disablers = $wp_post_meta_data['_techblissonline_psp_disable_flags'];
|
1189 |
+
$psp_post_disablers = unserialize($wp_post_meta_data['_techblissonline_psp_disable_flags']);
|
1190 |
+
***********/
|
1191 |
+
$psp_post_meta_data['title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_title'][0] : '';
|
1192 |
+
if(isset($wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0])) {
|
1193 |
+
$psp_post_meta_data['titleformat'] = $wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0];
|
1194 |
+
}
|
1195 |
+
if(isset($wp_post_meta_data_arr['_techblissonline_psp_descformat'][0])) {
|
1196 |
+
$psp_post_meta_data['descformat'] = $wp_post_meta_data_arr['_techblissonline_psp_descformat'][0];
|
1197 |
+
}
|
1198 |
+
$psp_post_meta_data['description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_description'][0] : '';
|
1199 |
+
$psp_post_meta_data['keywords'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_keywords'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_keywords'][0] : '';
|
1200 |
+
$psp_post_meta_data['robots'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0] : '';
|
1201 |
+
$psp_post_meta_data['noindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noindex'][0] : '';
|
1202 |
+
$psp_post_meta_data['nofollow'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0] : '';
|
1203 |
+
$psp_post_meta_data['nositemap'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0] : '';
|
1204 |
+
$psp_post_meta_data['maxsnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0] : '';
|
1205 |
+
$psp_post_meta_data['maxvideo'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0] : '';
|
1206 |
+
$psp_post_meta_data['maximage'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maximage'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_maximage'][0] : '';
|
1207 |
+
$psp_post_meta_data['canonical_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0] : '';
|
1208 |
+
$psp_post_meta_data['noarchive'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0] : '';
|
1209 |
+
$psp_post_meta_data['nosnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0] : '';
|
1210 |
+
$psp_post_meta_data['noimageindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0] : '';
|
1211 |
+
$psp_post_meta_data['redirect_to_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0] : '';
|
1212 |
+
$psp_post_meta_data['redirect_status_code'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0] : '';
|
1213 |
+
$psp_post_meta_data['preferred_tax'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0] : '';
|
1214 |
+
$psp_post_meta_data['schema_string'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0] : '';
|
1215 |
+
|
1216 |
+
$psp_post_disablers = !empty($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) : array();
|
1217 |
+
//social meta
|
1218 |
+
$psp_social_meta['fb_og_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0] : '';
|
1219 |
+
$psp_social_meta['fb_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0] : '';
|
1220 |
+
$psp_social_meta['fb_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0] : '';
|
1221 |
+
$psp_social_meta['fb_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0] : '';
|
1222 |
+
//$psp_social_meta['fb_ogtype_properties'] = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0] : '';
|
1223 |
+
//$psp_post_fb_ogtype_properties = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) : array();
|
1224 |
+
$psp_post_fb_ogtype_properties = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0] : '';
|
1225 |
+
//$psp_social_meta['fb_ogtype_properties'] = http_build_query($psp_post_fb_ogtype_properties, '', '\r\n');
|
1226 |
+
$psp_social_meta['fb_ogtype_properties'] =$psp_post_fb_ogtype_properties;
|
1227 |
+
$psp_social_meta['fb_media_properties'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0] : '';
|
1228 |
+
|
1229 |
+
$psp_social_meta['tw_card_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0] : '';
|
1230 |
+
$psp_social_meta['tw_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0] : '';
|
1231 |
+
$psp_social_meta['tw_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0] : '';
|
1232 |
+
|
1233 |
+
$psp_post_tw_data_images = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) : array();
|
1234 |
+
$psp_post_social_tw_label_data = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) : array();
|
1235 |
+
|
1236 |
+
$psp_social_meta['tw_creator'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0] : '';
|
1237 |
+
$psp_social_meta['tw_imagealt'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0] : '';
|
1238 |
+
$psp_social_meta['tw_player'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0] : '';
|
1239 |
+
$psp_social_meta['tw_player_stream'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0] : '';
|
1240 |
+
$psp_social_meta['tw_player_width'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0] : '';
|
1241 |
+
$psp_social_meta['tw_player_height'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0] : '';
|
1242 |
+
|
1243 |
+
$psp_social_meta['tw_app_country'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0] : '';
|
1244 |
+
$psp_social_meta['tw_app_name_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0] : '';
|
1245 |
+
$psp_social_meta['tw_app_id_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0] : '';
|
1246 |
+
$psp_social_meta['tw_app_url_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0] : '';
|
1247 |
+
$psp_social_meta['tw_app_name_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0] : '';
|
1248 |
+
$psp_social_meta['tw_app_id_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0] : '';
|
1249 |
+
$psp_social_meta['tw_app_url_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0] : '';
|
1250 |
+
$psp_social_meta['tw_app_name_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0] : '';
|
1251 |
+
$psp_social_meta['tw_app_id_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0] : '';
|
1252 |
+
$psp_social_meta['tw_app_url_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0] : '';
|
1253 |
+
|
1254 |
+
$psp_social_meta['sc_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0] : '';
|
1255 |
+
$psp_social_meta['sc_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0] : '';
|
1256 |
+
$psp_social_meta['sc_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0]) ? $wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0] : '';
|
1257 |
+
|
1258 |
+
$psp_social_meta = array_merge((array)$psp_social_meta, (array)$psp_post_tw_data_images, (array)$psp_post_social_tw_label_data);
|
1259 |
+
$this->psp_current_ptype_social_meta = $psp_social_meta;
|
1260 |
+
|
1261 |
+
$psp_post_meta = array_merge((array)$psp_post_meta_data, (array)$psp_post_disablers);
|
1262 |
+
|
1263 |
+
$this->psp_current_ptype_meta = $psp_post_meta;
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
if (!empty($psp_post_meta)) {
|
1267 |
+
$this->preferred_taxonomy_for_bc = !empty($psp_post_meta['preferred_tax']) ? $psp_post_meta['preferred_tax'] : '';
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
$psp_disable = !empty($psp_post_meta['disable_psp']) ? htmlspecialchars(stripcslashes($psp_post_meta['disable_psp'])) : '';
|
1271 |
+
|
1272 |
+
if ($psp_disable) {
|
1273 |
+
return "";
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
|
1277 |
+
if (!empty($this->psp_current_ptype_format)){
|
1278 |
+
$current_ptype_format = $this->psp_current_ptype_format;
|
1279 |
+
} else {
|
1280 |
+
$ptype_name = get_post_type($post);
|
1281 |
+
$current_ptype_format_option = "psp_".$ptype_name."_settings";
|
1282 |
+
$current_ptype_format = get_option($current_ptype_format_option);
|
1283 |
+
$this->psp_current_ptype_format = $current_ptype_format;
|
1284 |
+
}
|
1285 |
+
|
1286 |
+
if (!empty($current_ptype_format)) {
|
1287 |
+
$this->default_taxonomy_for_bc = isset($current_ptype_format['default_tax']) ? $current_ptype_format['default_tax'] : '';
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
//$paged = $this->is_this_paged($post);
|
1291 |
+
$paged = $this->is_this_paged();
|
1292 |
+
|
1293 |
+
$robots_meta_string = $this->get_pt_robots_meta($post, $psp_post_meta, $paged, $cpage);
|
1294 |
+
|
1295 |
+
//$paged = get_query_var('paged');
|
1296 |
+
//if (is_page()) {
|
1297 |
+
// if (is_static_front_page()) {
|
1298 |
+
// $paged = get_query_var('page');
|
1299 |
+
// }
|
1300 |
+
//}
|
1301 |
+
|
1302 |
+
|
1303 |
+
if ($paged < 2 || (!$paged)) {
|
1304 |
+
//if ($paged < 2) {
|
1305 |
+
$desc_keyword_meta_string = $this->get_pt_description_meta($post, $psp_post_meta);
|
1306 |
+
}
|
1307 |
+
if ($canonical)
|
1308 |
+
{
|
1309 |
+
$canonical_meta_string = $this->get_pt_canonical_meta($post, $psp_post_meta, $canonical, $paged);
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
|
1313 |
+
|
1314 |
+
$json_schema_string = !empty($this->psp_current_ptype_meta['schema_string']) ? $this->psp_current_ptype_meta['schema_string'] : '';
|
1315 |
+
//error_log("Schema JSON ".$json_schema_string);
|
1316 |
+
|
1317 |
+
$json_schema_string = html_entity_decode(stripcslashes(esc_html($json_schema_string)));
|
1318 |
+
//validate it is a json object
|
1319 |
+
$schema_obj = json_decode($json_schema_string);
|
1320 |
+
if($schema_obj === null) {
|
1321 |
+
$json_schema_string = "";
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
if (!empty($json_schema_string)) {
|
1325 |
+
//$jsonld_script_tag = '<scri' + 'pt type="application/ld+json">'.' \r\n'. $json_schema_string . '\r\n </scri' . 'pt>';
|
1326 |
+
$jsonld_script_tag = '<scri'.'pt type="application/ld+json">'. "\r\n" . $json_schema_string . "\r\n" . '</scri'.'pt>' ."\r\n";
|
1327 |
+
}
|
1328 |
+
//$current_ptype_format['headers'];
|
1329 |
+
|
1330 |
+
//$page_meta = stripcslashes(get_option('aiosp_page_meta_tags'));
|
1331 |
+
//$post_meta = stripcslashes(get_option('aiosp_post_meta_tags'));
|
1332 |
+
//$post_meta = isset($current_ptype_format['headers']) ? stripcslashes($current_ptype_format['headers']) : '';
|
1333 |
+
$post_meta = isset($current_ptype_format['headers']) ? html_entity_decode(stripcslashes(esc_html($current_ptype_format['headers']))) : '';
|
1334 |
+
//validate headers
|
1335 |
+
if( !empty( $post_meta ) ) {
|
1336 |
+
|
1337 |
+
$allowed_html = array(
|
1338 |
+
'meta' => array(
|
1339 |
+
'name' => array(),
|
1340 |
+
'property' => array(),
|
1341 |
+
'itemprop' => array(),
|
1342 |
+
'content' => array(),
|
1343 |
+
),
|
1344 |
+
);
|
1345 |
+
|
1346 |
+
$post_meta = wp_kses($post_meta, $allowed_html);
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
$page_meta = $post_meta;
|
1350 |
+
//$home_meta = stripcslashes(get_option('aiosp_home_meta_tags'));
|
1351 |
+
|
1352 |
+
if (is_page() && isset($page_meta) && !empty($page_meta)) {
|
1353 |
+
if (isset($meta_string) && !empty($meta_string)) {
|
1354 |
+
$meta_string .= "\r\n";
|
1355 |
+
}
|
1356 |
+
//echo "\r\n$page_meta";
|
1357 |
+
$meta_string .= "$page_meta";
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
if (is_single() && isset($post_meta) && !empty($post_meta)) {
|
1361 |
+
if (isset($meta_string) && !empty($meta_string)) {
|
1362 |
+
$meta_string .= "\r\n";
|
1363 |
+
}
|
1364 |
+
$meta_string .= "$post_meta";
|
1365 |
+
}
|
1366 |
+
/**
|
1367 |
+
if (is_home() && !empty($home_meta)) {
|
1368 |
+
if (isset($meta_string)) {
|
1369 |
+
$meta_string .= "\r\n";
|
1370 |
+
}
|
1371 |
+
$meta_string .= "$home_meta";
|
1372 |
+
}
|
1373 |
+
**/
|
1374 |
+
if ($meta_string != null) {
|
1375 |
+
//echo "$meta_string\r\n";
|
1376 |
+
//$meta_psp_string .= "$meta_string\r\n";
|
1377 |
+
$meta_psp_string .= "$meta_string";
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
//$seo_meta_string = $desc_keyword_meta_string."\r\n".$robots_meta_string."\r\n".$meta_psp_string.$canonical_meta_string;
|
1381 |
+
|
1382 |
+
if (!empty($desc_keyword_meta_string)) $seo_meta_string = $desc_keyword_meta_string;
|
1383 |
+
if (!empty($robots_meta_string)) $seo_meta_string = $seo_meta_string."\r\n".$robots_meta_string;
|
1384 |
+
if (!empty($canonical_meta_string)) $seo_meta_string = $seo_meta_string."\r\n".$canonical_meta_string;
|
1385 |
+
if (!empty($jsonld_script_tag)) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1386 |
+
if (!empty($meta_psp_string)) $seo_meta_string = $seo_meta_string.$meta_psp_string;
|
1387 |
+
|
1388 |
+
return $seo_meta_string;
|
1389 |
+
|
1390 |
+
} // end get_pt_seo_metas;
|
1391 |
+
|
1392 |
+
}
|
1393 |
+
?>
|
psp-include/generators/psp_social_metas.php
ADDED
@@ -0,0 +1,965 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Platinum SEO Pack
|
5 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
+
Description: Complete SEO solution for your Wordpress blog.
|
7 |
+
Author: Rajesh - Techblissonline
|
8 |
+
Author URI: https://techblissonline.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class PspSocialMetas {
|
12 |
+
private static $instance = null;
|
13 |
+
|
14 |
+
//public $default_image = "";
|
15 |
+
//public $apply_the_content = false;
|
16 |
+
|
17 |
+
// Facebook additional
|
18 |
+
public $ogtags_active = false;
|
19 |
+
public $fbadmins = array();
|
20 |
+
public $fbapp = "";
|
21 |
+
public $fb_profile = "";
|
22 |
+
public $fb_locale = "";
|
23 |
+
public $fb_publisher = "";
|
24 |
+
//public $fb_og_type = "";
|
25 |
+
public $fb_site_name = "";
|
26 |
+
public $fb_default_image = "";
|
27 |
+
|
28 |
+
// Twitter Cards
|
29 |
+
public $twitter_cards_active = false;
|
30 |
+
//public $card_type = "";
|
31 |
+
public $twitter_user = "";
|
32 |
+
public $tw_default_image = "";
|
33 |
+
|
34 |
+
// Google Schema.org
|
35 |
+
public $google_authorship = false;
|
36 |
+
public $google_markup = false;
|
37 |
+
public $google_publisher = "";
|
38 |
+
//public $google_author = "";
|
39 |
+
|
40 |
+
//social_metas
|
41 |
+
public $psp_social_metas = array();
|
42 |
+
|
43 |
+
//SEO metas
|
44 |
+
public $psp_seo_title = "";
|
45 |
+
public $psp_seo_description = "";
|
46 |
+
public $psp_can_link = "";
|
47 |
+
public $psp_type = "";
|
48 |
+
|
49 |
+
protected $sitename = "";
|
50 |
+
protected $sitedescription = "";
|
51 |
+
|
52 |
+
// Post defaults
|
53 |
+
private $post_title = "";
|
54 |
+
private $post_description = "";
|
55 |
+
private $post_image = "";
|
56 |
+
private $post_url = "";
|
57 |
+
private $site_name = "";
|
58 |
+
|
59 |
+
private $fb_og_type = "";
|
60 |
+
private $fb_title = "";
|
61 |
+
private $fb_description = "";
|
62 |
+
private $fb_image = array();
|
63 |
+
private $fb_ogtype_properties = array();
|
64 |
+
private $fb_media_properties = "";
|
65 |
+
private $fb_video_url = "";
|
66 |
+
private $fb_video_h = "";
|
67 |
+
private $fb_video_w = "";
|
68 |
+
|
69 |
+
private $tw_card_type = "";
|
70 |
+
private $twitter_title = "";
|
71 |
+
private $twitter_description = "";
|
72 |
+
private $twitter_image = array();
|
73 |
+
private $tw_label_1 = "";
|
74 |
+
private $tw_data_1 = "";
|
75 |
+
private $tw_label_2 = "";
|
76 |
+
private $tw_data_2 = "";
|
77 |
+
private $tw_imagealt = "";
|
78 |
+
private $tw_content_creator = "";
|
79 |
+
private $tw_player = "";
|
80 |
+
private $tw_player_stream = "";
|
81 |
+
private $tw_player_px_width = "";
|
82 |
+
private $tw_player_px_height = "";
|
83 |
+
private $tw_app_country = "";
|
84 |
+
private $tw_app_name_iphone = "";
|
85 |
+
private $tw_app_id_iphone = "";
|
86 |
+
private $tw_app_url_iphone = "";
|
87 |
+
private $tw_app_name_ipad = "";
|
88 |
+
private $tw_app_id_ipad = "";
|
89 |
+
private $tw_app_url_ipad = "";
|
90 |
+
private $tw_app_name_googleplay = "";
|
91 |
+
private $tw_app_id_googleplay = "";
|
92 |
+
private $tw_app_url_googleplay = "";
|
93 |
+
|
94 |
+
private $sc_title = "";
|
95 |
+
private $sc_description = "";
|
96 |
+
private $sc_image = array();
|
97 |
+
|
98 |
+
private $sso_active = false;
|
99 |
+
|
100 |
+
private $options;
|
101 |
+
|
102 |
+
private $meta = array();
|
103 |
+
|
104 |
+
protected $psp_helper;
|
105 |
+
|
106 |
+
public static function get_instance() {
|
107 |
+
|
108 |
+
if ( null == self::$instance ) {
|
109 |
+
self::$instance = new self;
|
110 |
+
}
|
111 |
+
|
112 |
+
return self::$instance;
|
113 |
+
|
114 |
+
} // end get_instance;
|
115 |
+
|
116 |
+
function __construct() {
|
117 |
+
//$essb_options = EasySocialShareButtons_Options::get_instance();
|
118 |
+
//$this->options = $essb_options->options;
|
119 |
+
|
120 |
+
$psp_helper_instance = PspHelper::get_instance();
|
121 |
+
$this->psp_helper = $psp_helper_instance;
|
122 |
+
|
123 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
124 |
+
$this->sitedescription = $psp_helper_instance->get_sitedescription();
|
125 |
+
|
126 |
+
$this->load_social_defaults();
|
127 |
+
|
128 |
+
if ($this->sso_active) {
|
129 |
+
add_filter ( 'language_attributes', array ($this, 'insert_language_attributes' ) );
|
130 |
+
//add_action ( 'wp_head', array ($this, 'outputMeta' ) );
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
public function psp_get_fb_title() {
|
135 |
+
return $this->fb_title;
|
136 |
+
}
|
137 |
+
|
138 |
+
public function psp_get_fb_description() {
|
139 |
+
return $this->fb_description;
|
140 |
+
}
|
141 |
+
|
142 |
+
public function psp_get_fb_image() {
|
143 |
+
return $this->fb_image;
|
144 |
+
}
|
145 |
+
|
146 |
+
private function load_social_defaults() {
|
147 |
+
|
148 |
+
$psp_settings_name = "psp_social_settings";
|
149 |
+
$psp_social_settings = get_option($psp_settings_name);
|
150 |
+
|
151 |
+
|
152 |
+
$opengraph_tags = isset ( $psp_social_settings['psp_og_tags_enabled'] ) ? $psp_social_settings['psp_og_tags_enabled'] : '';
|
153 |
+
//$this->default_image = isset ( $this->options ['sso_default_image'] ) ? $this->options ['sso_default_image'] : '';
|
154 |
+
$this->fb_default_image = isset ( $psp_social_settings['fb_default_image'] ) ? esc_url($psp_social_settings['fb_default_image']) : '';
|
155 |
+
$this->tw_default_image = isset ( $psp_social_settings['tw_default_image'] ) ? esc_url($psp_social_settings['tw_default_image']) : '';
|
156 |
+
|
157 |
+
//if ($opengraph_tags == 'true') {
|
158 |
+
if ($opengraph_tags) {
|
159 |
+
$this->ogtags_active = true;
|
160 |
+
|
161 |
+
|
162 |
+
//$this->fbadmins = isset ( $psp_social_settings['fb_admins'] ) ? $psp_social_settings['fb_admins'] : '';
|
163 |
+
if (isset($psp_social_settings['fb_admins']) && !empty($psp_social_settings['fb_admins'])) {
|
164 |
+
if (strpos($psp_social_settings['fb_admins'], ",")) {
|
165 |
+
$this->fbadmins = explode(",", $psp_social_settings['fb_admins']);
|
166 |
+
} else {
|
167 |
+
//$this->fbadmins[] = esc_url($psp_social_settings['fb_admins']);
|
168 |
+
$this->fbadmins[] = $psp_social_settings['fb_admins'];
|
169 |
+
}
|
170 |
+
}
|
171 |
+
$this->fb_profile = isset ( $psp_social_settings['fb_profile'] ) ? $psp_social_settings['fb_profile'] : '';
|
172 |
+
$this->fbapp = isset ( $psp_social_settings['fb_app'] ) ? $psp_social_settings['fb_app'] : '';
|
173 |
+
$this->fb_locale = isset ( $psp_social_settings['fb_locale'] ) ? $psp_social_settings['fb_locale'] : '';
|
174 |
+
$this->fb_og_type = isset ( $psp_social_settings['fb_og_type'] ) ? $psp_social_settings['fb_og_type'] : '';
|
175 |
+
$this->fb_publisher = isset ( $psp_social_settings['fb_publisher'] ) ? $psp_social_settings['fb_publisher'] : '';
|
176 |
+
$this->fb_site_name = isset ( $psp_social_settings['fb_site_name'] ) ? $psp_social_settings['fb_site_name'] : '';
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
$twitter_card_active = isset ( $psp_social_settings['psp_twitter_card_enabled'] ) ? $psp_social_settings['psp_twitter_card_enabled'] : '';
|
181 |
+
|
182 |
+
//if ($twitter_card_active == "true") {
|
183 |
+
if ($twitter_card_active) {
|
184 |
+
$this->twitter_cards_active = true;
|
185 |
+
|
186 |
+
$this->tw_card_type = isset ( $psp_social_settings['tw_ct_type'] ) ? $psp_social_settings['tw_ct_type'] : '';
|
187 |
+
$this->twitter_user = isset ( $psp_social_settings['tw_user'] ) ? $psp_social_settings['tw_user'] : '';
|
188 |
+
}
|
189 |
+
|
190 |
+
//$this->google_author = isset ( $psp_social_settings['sc_author'] ) ? $psp_social_settings['sc_author'] : '';
|
191 |
+
$this->google_publisher = isset ( $psp_social_settings['sc_publisher'] ) ? $psp_social_settings['sc_publisher'] : '';
|
192 |
+
$google_markup = isset ( $psp_social_settings['psp_schemaorg_markup_enabled'] ) ? $psp_social_settings['psp_schemaorg_markup_enabled'] : '';
|
193 |
+
//if ($google_markup == "true") {
|
194 |
+
if ($google_markup) {
|
195 |
+
$this->google_markup = true;
|
196 |
+
}
|
197 |
+
|
198 |
+
if ($this->ogtags_active || $this->twitter_cards_active || $this->google_markup) {
|
199 |
+
$this->sso_active = true;
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
private function load_content_metas() {
|
204 |
+
global $post;
|
205 |
+
|
206 |
+
$psp_social_metas = $this->psp_social_metas;
|
207 |
+
|
208 |
+
if ($this->ogtags_active) {
|
209 |
+
|
210 |
+
if (isset($psp_social_metas['fb_og_type']) && !empty($psp_social_metas['fb_og_type'])) {
|
211 |
+
$this->fb_og_type = $psp_social_metas['fb_og_type'];
|
212 |
+
}
|
213 |
+
|
214 |
+
if (isset($psp_social_metas['fb_title']) && !empty($psp_social_metas['fb_title'])) {
|
215 |
+
$this->fb_title = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['fb_title']))));
|
216 |
+
}
|
217 |
+
|
218 |
+
if (isset($psp_social_metas['fb_description']) && !empty($psp_social_metas['fb_description'])) {
|
219 |
+
$this->fb_description = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['fb_description']))));
|
220 |
+
}
|
221 |
+
|
222 |
+
if (isset($psp_social_metas['fb_image']) && !empty($psp_social_metas['fb_image'])) {
|
223 |
+
if (strpos($psp_social_metas['fb_image'], ",")) {
|
224 |
+
$this->fb_image = explode(",", $psp_social_metas['fb_image']);
|
225 |
+
} else {
|
226 |
+
$this->fb_image[0] = esc_url($psp_social_metas['fb_image']);
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
if (isset($psp_social_metas['fb_ogtype_properties']) && !empty($psp_social_metas['fb_ogtype_properties'])) {
|
231 |
+
|
232 |
+
|
233 |
+
//$this->fb_ogtype_properties = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($psp_social_metas['fb_ogtype_properties']))));
|
234 |
+
//parse_str($psp_social_metas['fb_ogtype_properties'], $this->fb_ogtype_properties);
|
235 |
+
//$this->fb_ogtype_properties = $psp_social_metas['fb_ogtype_properties'];
|
236 |
+
//$this->fb_ogtype_properties = isset($psp_social_metas['fb_ogtype_properties'][0]) ? unserialize($psp_social_metas['fb_ogtype_properties'][0]) : array();
|
237 |
+
$psp_post_fb_ogtype_properties = isset($psp_social_metas['fb_ogtype_properties']) ? unserialize($psp_social_metas['fb_ogtype_properties']) : array();
|
238 |
+
$psp_post_fb_ogtype_properties = array_map( 'esc_attr', $psp_post_fb_ogtype_properties );
|
239 |
+
$this->fb_ogtype_properties = array_map( 'html_entity_decode', $psp_post_fb_ogtype_properties );
|
240 |
+
}
|
241 |
+
|
242 |
+
if (isset($psp_social_metas['fb_media_properties']) && !empty($psp_social_metas['fb_media_properties'])) {
|
243 |
+
|
244 |
+
//$this->fb_media_properties = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($psp_social_metas['fb_media_properties']))));
|
245 |
+
//parse_str($psp_social_metas['fb_media_properties'], $this->fb_media_properties);
|
246 |
+
//$this->fb_media_properties = $psp_social_metas['fb_media_properties'];
|
247 |
+
|
248 |
+
$psp_post_fb_media_properties = isset($psp_social_metas['fb_media_properties']) ? unserialize($psp_social_metas['fb_media_properties']) : array();
|
249 |
+
$psp_post_fb_media_properties = array_map( 'esc_attr', $psp_post_fb_media_properties );
|
250 |
+
$this->fb_media_properties = array_map( 'html_entity_decode', $psp_post_fb_media_properties );
|
251 |
+
}
|
252 |
+
|
253 |
+
if ($this->fb_description == "") {
|
254 |
+
$this->fb_description = $this->psp_seo_description;
|
255 |
+
}
|
256 |
+
if ($this->fb_title == "") {
|
257 |
+
$this->fb_title = $this->psp_seo_title;
|
258 |
+
}
|
259 |
+
if (empty($this->fb_image) && !empty($this->post_image)) {
|
260 |
+
$this->fb_image[0] = esc_url($this->post_image);
|
261 |
+
}
|
262 |
+
if (empty($this->fb_image)) {
|
263 |
+
$this->fb_image[0] = $this->fb_default_image;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
if ($this->twitter_cards_active) {
|
268 |
+
|
269 |
+
|
270 |
+
if (isset($psp_social_metas['tw_card_type']) && !empty($psp_social_metas['tw_card_type'])) {
|
271 |
+
$this->tw_card_type = $psp_social_metas['tw_card_type'];
|
272 |
+
}
|
273 |
+
|
274 |
+
if (isset($psp_social_metas['tw_title']) && !empty($psp_social_metas['tw_title'])) {
|
275 |
+
$this->twitter_title = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['tw_title']))));
|
276 |
+
}
|
277 |
+
|
278 |
+
if (isset($psp_social_metas['tw_description']) && !empty($psp_social_metas['tw_description'])) {
|
279 |
+
$this->twitter_description = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['tw_description']))));
|
280 |
+
}
|
281 |
+
|
282 |
+
if (isset($psp_social_metas['tw_image']) && !empty($psp_social_metas['tw_image'])) {
|
283 |
+
|
284 |
+
$this->twitter_image[0] = esc_url($psp_social_metas['tw_image']);
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
if ( $this->tw_card_type == "gallery" ) {
|
289 |
+
|
290 |
+
if (isset($psp_social_metas['tw_image_1']) && !empty($psp_social_metas['tw_image_1'])) {
|
291 |
+
|
292 |
+
$this->twitter_image[1] = esc_url($psp_social_metas['tw_image_1']);
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
if (isset($psp_social_metas['tw_image_2']) && !empty($psp_social_metas['tw_image_2'])) {
|
297 |
+
|
298 |
+
$this->twitter_image[2] = esc_url($psp_social_metas['tw_image_2']);
|
299 |
+
|
300 |
+
}
|
301 |
+
|
302 |
+
if (isset($psp_social_metas['tw_image_3']) && !empty($psp_social_metas['tw_image_3'])) {
|
303 |
+
|
304 |
+
$this->twitter_image[3] = esc_url($psp_social_metas['tw_image_3']);
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
if ( $this->tw_card_type == "product" ) {
|
311 |
+
$this->tw_label_1 = $psp_social_metas['tw_label_1'];
|
312 |
+
$this->tw_data_1 = $psp_social_metas['tw_data_1'];
|
313 |
+
$this->tw_label_2 = $psp_social_metas['tw_label_2'];
|
314 |
+
$this->tw_data_2 = $psp_social_metas['tw_data_2'];
|
315 |
+
}
|
316 |
+
|
317 |
+
if (isset($psp_social_metas['tw_creator']) && !empty($psp_social_metas['tw_creator'])) {
|
318 |
+
$this->tw_content_creator = trim(stripcslashes($psp_social_metas['tw_creator']));
|
319 |
+
}
|
320 |
+
|
321 |
+
if (isset($psp_social_metas['tw_imagealt']) && !empty($psp_social_metas['tw_imagealt'])) {
|
322 |
+
$this->tw_imagealt = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['tw_imagealt']))));
|
323 |
+
}
|
324 |
+
|
325 |
+
if ( $this->tw_card_type == "player" ) {
|
326 |
+
|
327 |
+
if (isset($psp_social_metas['tw_player']) && !empty($psp_social_metas['tw_player'])) {
|
328 |
+
|
329 |
+
$this->tw_player = esc_url($psp_social_metas['tw_player']);
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
if (isset($psp_social_metas['tw_player_stream']) && !empty($psp_social_metas['tw_player_stream'])) {
|
334 |
+
|
335 |
+
$this->tw_player_stream = esc_url($psp_social_metas['tw_player_stream']);
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
$this->tw_player_width = $psp_social_metas['tw_player_width'];
|
340 |
+
$this->tw_player_height = $psp_social_metas['tw_player_height'];
|
341 |
+
|
342 |
+
}
|
343 |
+
|
344 |
+
if ( $this->tw_card_type == "app" ) {
|
345 |
+
|
346 |
+
if (isset($psp_social_metas['tw_app_country']) && !empty($psp_social_metas['tw_app_country'])) {
|
347 |
+
|
348 |
+
$this->tw_app_country = trim(stripcslashes($psp_social_metas['tw_app_country']));
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
if (isset($psp_social_metas['tw_app_name_iphone']) && !empty($psp_social_metas['tw_app_name_iphone'])) {
|
353 |
+
|
354 |
+
$this->tw_app_name_iphone = trim(stripcslashes($psp_social_metas['tw_app_name_iphone']));
|
355 |
+
|
356 |
+
}
|
357 |
+
|
358 |
+
if (isset($psp_social_metas['tw_app_id_iphone']) && !empty($psp_social_metas['tw_app_id_iphone'])) {
|
359 |
+
|
360 |
+
$this->tw_app_id_iphone = trim(stripcslashes($psp_social_metas['tw_app_id_iphone']));
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
|
365 |
+
if (isset($psp_social_metas['tw_app_url_iphone']) && !empty($psp_social_metas['tw_app_url_iphone'])) {
|
366 |
+
|
367 |
+
$this->tw_app_url_iphone = esc_attr($psp_social_metas['tw_app_url_iphone']);
|
368 |
+
|
369 |
+
}
|
370 |
+
|
371 |
+
if (isset($psp_social_metas['tw_app_name_ipad']) && !empty($psp_social_metas['tw_app_name_ipad'])) {
|
372 |
+
|
373 |
+
$this->tw_app_name_ipad = trim(stripcslashes($psp_social_metas['tw_app_name_ipad']));
|
374 |
+
|
375 |
+
}
|
376 |
+
|
377 |
+
if (isset($psp_social_metas['tw_app_id_ipad']) && !empty($psp_social_metas['tw_app_id_ipad'])) {
|
378 |
+
|
379 |
+
$this->tw_app_id_ipad = trim(stripcslashes($psp_social_metas['tw_app_id_ipad']));
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
|
384 |
+
if (isset($psp_social_metas['tw_app_url_ipad']) && !empty($psp_social_metas['tw_app_url_ipad'])) {
|
385 |
+
|
386 |
+
$this->tw_app_url_ipad = esc_attr($psp_social_metas['tw_app_url_ipad']);
|
387 |
+
|
388 |
+
}
|
389 |
+
|
390 |
+
if (isset($psp_social_metas['tw_app_name_googleplay']) && !empty($psp_social_metas['tw_app_name_googleplay'])) {
|
391 |
+
|
392 |
+
$this->tw_app_name_googleplay = trim(stripcslashes($psp_social_metas['tw_app_name_googleplay']));
|
393 |
+
|
394 |
+
}
|
395 |
+
|
396 |
+
if (isset($psp_social_metas['tw_app_id_googleplay']) && !empty($psp_social_metas['tw_app_id_googleplay'])) {
|
397 |
+
|
398 |
+
$this->tw_app_id_googleplay = trim(stripcslashes($psp_social_metas['tw_app_id_googleplay']));
|
399 |
+
|
400 |
+
}
|
401 |
+
|
402 |
+
|
403 |
+
if (isset($psp_social_metas['tw_app_url_googleplay']) && !empty($psp_social_metas['tw_app_url_googleplay'])) {
|
404 |
+
|
405 |
+
$this->tw_app_url_googleplay = esc_url($psp_social_metas['tw_app_url_googleplay']);
|
406 |
+
|
407 |
+
}
|
408 |
+
|
409 |
+
}
|
410 |
+
|
411 |
+
if ($this->twitter_title == "") {
|
412 |
+
$this->twitter_title = $this->fb_title;
|
413 |
+
}
|
414 |
+
|
415 |
+
if ($this->twitter_description == "") {
|
416 |
+
$this->twitter_description = $this->fb_description;
|
417 |
+
}
|
418 |
+
|
419 |
+
if (empty($this->twitter_image)) {
|
420 |
+
$this->twitter_image = $this->fb_image;
|
421 |
+
}
|
422 |
+
|
423 |
+
if ($this->twitter_title == "") {
|
424 |
+
$this->twitter_title = $this->psp_seo_title;
|
425 |
+
}
|
426 |
+
|
427 |
+
if ($this->twitter_description == "") {
|
428 |
+
$this->twitter_description = $this->psp_seo_description;
|
429 |
+
}
|
430 |
+
|
431 |
+
if (empty($this->twitter_image) && !empty($this->post_image)) {
|
432 |
+
$this->twitter_image[0] = esc_url($this->post_image);
|
433 |
+
}
|
434 |
+
|
435 |
+
if (empty($this->twitter_image)) {
|
436 |
+
$this->twitter_image[0] = $this->tw_default_image;
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
if ($this->google_markup) {
|
441 |
+
|
442 |
+
if (isset($psp_social_metas['sc_title']) && !empty($psp_social_metas['sc_title'])) {
|
443 |
+
$this->sc_title = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['sc_title']))));
|
444 |
+
}
|
445 |
+
|
446 |
+
if (isset($psp_social_metas['sc_description']) && !empty($psp_social_metas['sc_description'])) {
|
447 |
+
$this->sc_description = trim(stripcslashes($this->psp_helper->trim_excerpt_without_filters_full_length($this->psp_helper->internationalize($psp_social_metas['sc_description']))));
|
448 |
+
}
|
449 |
+
|
450 |
+
if (isset($psp_social_metas['sc_image']) && !empty($psp_social_metas['sc_image'])) {
|
451 |
+
if (strpos($psp_social_metas['sc_image'], ",")) {
|
452 |
+
$this->sc_image = explode(",", $psp_social_metas['sc_image']);
|
453 |
+
} else {
|
454 |
+
$this->sc_image[0] = esc_url($psp_social_metas['sc_image']);
|
455 |
+
}
|
456 |
+
}
|
457 |
+
|
458 |
+
if ($this->sc_title == "") {
|
459 |
+
$this->sc_title = $this->fb_title;
|
460 |
+
}
|
461 |
+
if ($this->sc_description == "") {
|
462 |
+
$this->sc_description = $this->fb_description;
|
463 |
+
}
|
464 |
+
|
465 |
+
if (empty($this->sc_image)) {
|
466 |
+
$this->sc_image = $this->fb_image;
|
467 |
+
}
|
468 |
+
|
469 |
+
if ($this->sc_title == "") {
|
470 |
+
$this->sc_title = $this->psp_seo_title;
|
471 |
+
}
|
472 |
+
|
473 |
+
if ($this->sc_description == "") {
|
474 |
+
$this->sc_description = $this->psp_seo_description;
|
475 |
+
}
|
476 |
+
|
477 |
+
if (empty($this->sc_image) && !empty($this->post_image)) {
|
478 |
+
$this->sc_image[0] = esc_url($this->post_image);
|
479 |
+
}
|
480 |
+
|
481 |
+
if (empty($this->sc_image)) {
|
482 |
+
$this->sc_image[0] = $this->fb_default_image; //use fb default image
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
|
487 |
+
|
488 |
+
//}
|
489 |
+
|
490 |
+
}
|
491 |
+
|
492 |
+
public function insert_language_attributes($content) {
|
493 |
+
if ($this->ogtags_active) {
|
494 |
+
if (!empty($this->fbadmins) || $this->fbapp != '') {
|
495 |
+
//if ($this->fbadmins != '' || $this->fbapp != '') {
|
496 |
+
$content .= ' prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"';
|
497 |
+
} else {
|
498 |
+
$content .= ' prefix="og: http://ogp.me/ns#"';
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
+
if ($this->google_markup && is_singular () && $this->fb_og_type == "article" ) {
|
503 |
+
$content .= ' itemscope itemtype="http://schema.org/Article"';
|
504 |
+
}
|
505 |
+
|
506 |
+
return $content;
|
507 |
+
}
|
508 |
+
|
509 |
+
public function psp_set_post_image($psp_post = null) {
|
510 |
+
|
511 |
+
$post_image = "";
|
512 |
+
$post_id = "";
|
513 |
+
|
514 |
+
if ($psp_post) $post_id = $psp_post->ID;
|
515 |
+
|
516 |
+
if (!$post_image && $post_id) {
|
517 |
+
/* Check for a post image ID (set by WP as a custom field). */
|
518 |
+
$post_thumbnail_id = get_post_thumbnail_id( $post_id );
|
519 |
+
|
520 |
+
if ( !$post_thumbnail_id ) {
|
521 |
+
$post_image = "";
|
522 |
+
} else {
|
523 |
+
$post_image = wp_get_attachment_image_src ( $post_thumbnail_id, 'full' );
|
524 |
+
if ($post_image) {
|
525 |
+
$this->post_image = $post_image[0];
|
526 |
+
}
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
if (!$post_image && $post_id) {
|
531 |
+
|
532 |
+
/* Get attachments for the inputted $post_id. */
|
533 |
+
$image_attachments = get_children(
|
534 |
+
array(
|
535 |
+
'post_parent' => $post_id,
|
536 |
+
'post_status' => 'inherit',
|
537 |
+
'post_type' => 'attachment',
|
538 |
+
'post_mime_type' => 'image',
|
539 |
+
'order' => 'ASC',
|
540 |
+
'orderby' => 'menu_order ID',
|
541 |
+
'suppress_filters' => true
|
542 |
+
)
|
543 |
+
);
|
544 |
+
|
545 |
+
if ( !empty( $image_attachments ) ) {
|
546 |
+
foreach ( $image_attachments as $id => $attachment ) {
|
547 |
+
$attachment_id = $id;
|
548 |
+
break;
|
549 |
+
}
|
550 |
+
|
551 |
+
if (!empty( $attachment_id )) {
|
552 |
+
$post_image = wp_get_attachment_image_src ( $attachment_id, 'full' );
|
553 |
+
if ($post_image) {
|
554 |
+
$this->post_image = $post_image[0];
|
555 |
+
}
|
556 |
+
}
|
557 |
+
}
|
558 |
+
}
|
559 |
+
|
560 |
+
if (!$post_image && $post_id) {
|
561 |
+
/* Search the post's content for the <img /> tag and get its URL. */
|
562 |
+
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $post_id ), $post_images );
|
563 |
+
|
564 |
+
/* If there is a match for the image, return its URL. */
|
565 |
+
if ( isset( $post_images ) && !empty( $post_images[1][0] ) )
|
566 |
+
$post_image = $post_images[1][0];
|
567 |
+
|
568 |
+
if ($post_image) {
|
569 |
+
$this->post_image = $post_image;
|
570 |
+
}
|
571 |
+
}
|
572 |
+
|
573 |
+
}
|
574 |
+
|
575 |
+
public function psp_get_social_metas() {
|
576 |
+
global $post;
|
577 |
+
|
578 |
+
$this->load_content_metas();
|
579 |
+
|
580 |
+
if ($this->google_markup) {
|
581 |
+
$this->buildGoogleMeta();
|
582 |
+
}
|
583 |
+
|
584 |
+
if ($this->ogtags_active) {
|
585 |
+
$this->buildFacebookMeta();
|
586 |
+
}
|
587 |
+
if ($this->twitter_cards_active) {
|
588 |
+
$this->buildTwitterMeta();
|
589 |
+
}
|
590 |
+
|
591 |
+
|
592 |
+
$output_meta = "";
|
593 |
+
|
594 |
+
//echo "\r\n";
|
595 |
+
foreach ($this->meta as $single) {
|
596 |
+
$output_meta .= $single."\r\n";
|
597 |
+
}
|
598 |
+
return $output_meta;
|
599 |
+
|
600 |
+
}
|
601 |
+
|
602 |
+
// Google
|
603 |
+
|
604 |
+
private function buildGoogleMeta() {
|
605 |
+
|
606 |
+
if ($this->fb_og_type == "article") {
|
607 |
+
$this->googleAuthorshipBuilder('publisher', $this->google_publisher);
|
608 |
+
}
|
609 |
+
|
610 |
+
if ($this->google_markup) {
|
611 |
+
$this->googleMetaBuilder('name', $this->sc_title, true);
|
612 |
+
$this->googleMetaBuilder('description', $this->sc_description, true);
|
613 |
+
$this->googleMetaBuilder('image', $this->sc_image[0]);
|
614 |
+
}
|
615 |
+
}
|
616 |
+
|
617 |
+
private function googleMetaBuilder($property = '', $value = '', $apply_filters = false) {
|
618 |
+
if ($apply_filters) {
|
619 |
+
//$value = str_replace ( '\'', "’", $value );
|
620 |
+
//$value = str_replace ( '"', "&qout;", $value );
|
621 |
+
|
622 |
+
//$value = addslashes(strip_tags($value));
|
623 |
+
}
|
624 |
+
|
625 |
+
if ($property != '' && $value != '') {
|
626 |
+
$this->meta[] = '<meta itemprop="'.esc_attr($property).'" content="'.esc_attr($value).'" />';
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
private function googleAuthorshipBuilder($property = '', $value = '') {
|
631 |
+
if ($property != '' && $value != '') {
|
632 |
+
$this->meta[] = '<link rel="'.$property.'" href="'.$value.'"/>';
|
633 |
+
}
|
634 |
+
}
|
635 |
+
|
636 |
+
// Twitter
|
637 |
+
|
638 |
+
private function buildTwitterMeta() {
|
639 |
+
if ($this->tw_card_type == "") {
|
640 |
+
$this->tw_card_type = "summary";
|
641 |
+
}
|
642 |
+
|
643 |
+
$this->twitterMetaTagBuilder('card', $this->tw_card_type);
|
644 |
+
if ($this->twitter_user != '') {
|
645 |
+
$this->twitterMetaTagBuilder('site', '@'.$this->twitter_user);
|
646 |
+
}
|
647 |
+
$this->twitterMetaTagBuilder('title', $this->twitter_title, true);
|
648 |
+
$this->twitterMetaTagBuilder('description', $this->twitter_description, true);
|
649 |
+
|
650 |
+
$this->twitterMetaTagBuilder('image:alt', $this->tw_imagealt, false);
|
651 |
+
|
652 |
+
if ($this->tw_content_creator != '') {
|
653 |
+
$this->twitterMetaTagBuilder('site', '@'.$this->tw_content_creator);
|
654 |
+
}
|
655 |
+
|
656 |
+
if ($this->tw_card_type == "player") {
|
657 |
+
if (isset($this->tw_player) && !empty($this->tw_player)) {
|
658 |
+
$this->twitterMetaTagBuilder('player', $this->tw_player);
|
659 |
+
}
|
660 |
+
if (isset($this->tw_player_stream) && !empty($this->tw_player_stream)) {
|
661 |
+
$this->twitterMetaTagBuilder('player:stream', $this->tw_player_stream);
|
662 |
+
}
|
663 |
+
if (isset($this->tw_player_width) && !empty($this->tw_player_width)) {
|
664 |
+
$this->twitterMetaTagBuilder('player:width', $this->tw_player_width);
|
665 |
+
}
|
666 |
+
if (isset($this->tw_player_height) && !empty($this->tw_player_height)) {
|
667 |
+
$this->twitterMetaTagBuilder('player:height', $this->tw_player_height);
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
if ($this->tw_card_type == "app") {
|
672 |
+
if (isset($this->tw_app_country) && !empty($this->tw_app_country)) {
|
673 |
+
$this->twitterMetaTagBuilder('app:country', $this->tw_app_country);
|
674 |
+
}
|
675 |
+
if (isset($this->tw_app_name_iphone) && !empty($this->tw_app_name_iphone)) {
|
676 |
+
$this->twitterMetaTagBuilder('app:name:iphone', $this->tw_app_name_iphone);
|
677 |
+
}
|
678 |
+
if (isset($this->tw_app_id_iphone) && !empty($this->tw_app_id_iphone)) {
|
679 |
+
$this->twitterMetaTagBuilder('app:id:iphone', $this->tw_app_id_iphone);
|
680 |
+
}
|
681 |
+
if (isset($this->tw_app_url_iphone) && !empty($this->tw_app_url_iphone)) {
|
682 |
+
$this->twitterMetaTagBuilder('app:url:iphone', $this->tw_app_url_iphone);
|
683 |
+
}
|
684 |
+
if (isset($this->tw_app_name_ipad) && !empty($this->tw_app_name_ipad)) {
|
685 |
+
$this->twitterMetaTagBuilder('app:name:ipad', $this->tw_app_name_ipad);
|
686 |
+
}
|
687 |
+
if (isset($this->tw_app_id_ipad) && !empty($this->tw_app_id_ipad)) {
|
688 |
+
$this->twitterMetaTagBuilder('app:id:ipad', $this->tw_app_id_ipad);
|
689 |
+
}
|
690 |
+
if (isset($this->tw_app_url_ipad) && !empty($this->tw_app_url_ipad)) {
|
691 |
+
$this->twitterMetaTagBuilder('app:url:ipad', $this->tw_app_url_ipad);
|
692 |
+
}
|
693 |
+
if (isset($this->tw_app_name_googleplay) && !empty($this->tw_app_name_googleplay)) {
|
694 |
+
$this->twitterMetaTagBuilder('app:name:googleplay', $this->tw_app_name_googleplay);
|
695 |
+
}
|
696 |
+
if (isset($this->tw_app_id_googleplay) && !empty($this->tw_app_id_googleplay)) {
|
697 |
+
$this->twitterMetaTagBuilder('app:id:googleplay', $this->tw_app_id_googleplay);
|
698 |
+
}
|
699 |
+
if (isset($this->tw_app_url_googleplay) && !empty($this->tw_app_url_googleplay)) {
|
700 |
+
$this->twitterMetaTagBuilder('app:url:googleplay', $this->tw_app_url_googleplay);
|
701 |
+
}
|
702 |
+
}
|
703 |
+
|
704 |
+
if ($this->tw_card_type == "gallery") {
|
705 |
+
if (isset($this->twitter_image[0]) && !empty($this->twitter_image[0])) {
|
706 |
+
$this->twitterMetaTagBuilder('image0', $this->twitter_image[0]);
|
707 |
+
}
|
708 |
+
if (isset($this->twitter_image[1]) && !empty($this->twitter_image[1])) {
|
709 |
+
$this->twitterMetaTagBuilder('image1', $this->twitter_image[1]);
|
710 |
+
}
|
711 |
+
if (isset($this->twitter_image[2]) && !empty($this->twitter_image[2])) {
|
712 |
+
$this->twitterMetaTagBuilder('image2', $this->twitter_image[2]);
|
713 |
+
}
|
714 |
+
if (isset($this->twitter_image[3]) && !empty($this->twitter_image[3])) {
|
715 |
+
$this->twitterMetaTagBuilder('image3', $this->twitter_image[3]);
|
716 |
+
}
|
717 |
+
} else {
|
718 |
+
if (isset($this->twitter_image[0]) && !empty($this->twitter_image[0])) {
|
719 |
+
//$this->twitterMetaTagBuilder('image:src', $this->twitter_image[0]);
|
720 |
+
$this->twitterMetaTagBuilder('image', $this->twitter_image[0]);
|
721 |
+
}
|
722 |
+
}
|
723 |
+
|
724 |
+
|
725 |
+
|
726 |
+
if ($this->tw_card_type == "product") {
|
727 |
+
if ($this->tw_label_1 != "" && $this->tw_data_1 != "") {
|
728 |
+
$this->twitterMetaTagBuilder('label1', $this->tw_label_1);
|
729 |
+
$this->twitterMetaTagBuilder('data1', $this->tw_data_1);
|
730 |
+
}
|
731 |
+
if ($this->tw_label_2 != "" && $this->tw_data_2 != "") {
|
732 |
+
$this->twitterMetaTagBuilder('label2', $this->tw_label_2);
|
733 |
+
$this->twitterMetaTagBuilder('data2', $this->tw_data_2);
|
734 |
+
}
|
735 |
+
}
|
736 |
+
|
737 |
+
$this->twitterMetaTagBuilder('url', $this->psp_can_link);
|
738 |
+
|
739 |
+
$this->twitterMetaTagBuilder('domain', $this->sitename, true);
|
740 |
+
}
|
741 |
+
|
742 |
+
private function twitterMetaTagBuilder($property = '', $value = '', $apply_filters = false, $prefix = 'twitter') {
|
743 |
+
if ($apply_filters) {
|
744 |
+
//$value = str_replace ( '\'', "’", $value );
|
745 |
+
//$value = str_replace ( '"', "&qout;", $value );
|
746 |
+
|
747 |
+
//$value = addslashes(strip_tags($value));
|
748 |
+
}
|
749 |
+
|
750 |
+
if ($property != '' && $value != '') {
|
751 |
+
$this->meta[] = '<meta property="'.esc_attr($prefix).':'.esc_attr($property).'" content="'.esc_attr($value).'" />';
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
// Facebook
|
756 |
+
|
757 |
+
private function buildFacebookMeta() {
|
758 |
+
|
759 |
+
$media_property_types = array("video", "video:url","video:secure_url", "video:type", "video:width", "video:height", "audio", "audio:url", "audio:secure_url", "audio:type");
|
760 |
+
|
761 |
+
$media_property_url_types = array("video", "video:url", "video:secure_url", "audio", "audio:url", "audio:secure_url");
|
762 |
+
$fburl = $this->psp_can_link . '?utm_medium=tbpsp&utm_source=facebook';
|
763 |
+
$this->openGraphMetaTagBuilder('url', $fburl);
|
764 |
+
|
765 |
+
$fb_site_name = $this->fb_site_name;
|
766 |
+
if (empty($fb_site_name)) $fb_site_name = $this->sitename;
|
767 |
+
$this->openGraphMetaTagBuilder('site_name', $fb_site_name, true);
|
768 |
+
$fbapp = (isset($this->fbapp) && !empty($this->fbapp)) ? $this->fbapp : "";
|
769 |
+
$this->openGraphMetaTagBuilder('app_id', $fbapp, false, 'fb');
|
770 |
+
//$this->openGraphMetaTagBuilder('admins', $this->fbadmins[0], false, 'fb');
|
771 |
+
$fbadmins = (isset($this->fbadmins[0]) && !empty($this->fbadmins[0])) ? $this->fbadmins[0] : "";
|
772 |
+
$this->openGraphMetaTagBuilder('admins', $fbadmins, false, 'fb');
|
773 |
+
$this->openGraphMetaTagBuilder('profile_id', $this->fb_profile, false, 'fb');
|
774 |
+
|
775 |
+
if (empty($this->fb_og_type)) $this->fb_og_type = "article";
|
776 |
+
if (is_front_page()) $this->fb_og_type = "Website";
|
777 |
+
if (is_post_type_archive()) $this->fb_og_type = "Website";
|
778 |
+
$content_type = $this->fb_og_type;
|
779 |
+
|
780 |
+
//$content_type = (is_single () || is_page ()) ? "article" : "website";
|
781 |
+
$this->openGraphMetaTagBuilder('type', $content_type);
|
782 |
+
|
783 |
+
//$this->openGraphMetaTagBuilder('publisher', $this->fb_publisher, false, 'fb');
|
784 |
+
|
785 |
+
$this->openGraphMetaTagBuilder('title', $this->fb_title, true);
|
786 |
+
$this->openGraphMetaTagBuilder('description', $this->fb_description, true);
|
787 |
+
$this->openGraphMetaTagBuilder('locale', $this->fb_locale);
|
788 |
+
//$this->openGraphMetaTagBuilder('image', esc_url($this->fb_image[0]));
|
789 |
+
foreach ($this->fb_image as $fb_each_image) {
|
790 |
+
$this->openGraphMetaTagBuilder('image', esc_url($fb_each_image));
|
791 |
+
}
|
792 |
+
|
793 |
+
if (!empty($this->fb_ogtype_properties)) {
|
794 |
+
|
795 |
+
//$ogtype_properties = explode('&', $this->fb_ogtype_properties);
|
796 |
+
$ogtype_properties = $this->fb_ogtype_properties;
|
797 |
+
foreach ($ogtype_properties as $ogtype_property_name => $ogtype_property_value) {
|
798 |
+
|
799 |
+
//list($ogtype_property_name, $ogtype_property_value) = explode('=', $ogtype_property, 2);
|
800 |
+
$ogtype_property_name = trim($ogtype_property_name);
|
801 |
+
$ogtype_property_value = trim($ogtype_property_value);
|
802 |
+
|
803 |
+
if (strpos($ogtype_property_value, ",")) {
|
804 |
+
$ogtype_property_arr_value = explode(",", $ogtype_property_value);
|
805 |
+
foreach ($ogtype_property_arr_value as $ogtype_property_arr_value_each) {
|
806 |
+
|
807 |
+
$this->openGraphMetaTagBuilder($ogtype_property_name, html_entity_decode($ogtype_property_arr_value_each), false, "none");
|
808 |
+
}
|
809 |
+
} else {
|
810 |
+
|
811 |
+
$this->openGraphMetaTagBuilder($ogtype_property_name, html_entity_decode($ogtype_property_value), false, "none");
|
812 |
+
|
813 |
+
}
|
814 |
+
|
815 |
+
|
816 |
+
|
817 |
+
}
|
818 |
+
|
819 |
+
}
|
820 |
+
|
821 |
+
if (!empty($this->fb_media_properties)) {
|
822 |
+
|
823 |
+
//$ogtype_properties = explode('&', $this->fb_ogtype_properties);
|
824 |
+
$media_properties = $this->fb_media_properties;
|
825 |
+
|
826 |
+
foreach ($media_properties as $media_property_name => $media_property_value) {
|
827 |
+
|
828 |
+
//list($ogtype_property_name, $ogtype_property_value) = explode('=', $ogtype_property, 2);
|
829 |
+
$media_property_name = esc_attr(trim($media_property_name));
|
830 |
+
$media_property_value = esc_attr(trim($media_property_value));
|
831 |
+
|
832 |
+
if ( in_array($media_property_name, $media_property_url_types) ) {
|
833 |
+
$media_property_value = esc_url(trim($media_property_value));
|
834 |
+
}
|
835 |
+
|
836 |
+
if (strpos($media_property_value, ",")) {
|
837 |
+
$media_property_arr_value = explode(",", $media_property_value);
|
838 |
+
foreach ($media_property_arr_value as $media_property_arr_value_each) {
|
839 |
+
|
840 |
+
$this->openGraphMetaTagBuilder($media_property_name, html_entity_decode($media_property_arr_value_each), false, "none");
|
841 |
+
}
|
842 |
+
} else {
|
843 |
+
|
844 |
+
$this->openGraphMetaTagBuilder($media_property_name, html_entity_decode($media_property_value), false, "none");
|
845 |
+
|
846 |
+
}
|
847 |
+
|
848 |
+
|
849 |
+
|
850 |
+
}
|
851 |
+
|
852 |
+
}
|
853 |
+
/**
|
854 |
+
if (!empty($this->fb_media_properties)) {
|
855 |
+
|
856 |
+
$media_properties = explode('&', $this->fb_media_properties);
|
857 |
+
|
858 |
+
foreach ($media_properties as $media_property) {
|
859 |
+
|
860 |
+
list($media_property_name, $media_property_value) = explode('=', $media_property, 2);
|
861 |
+
$media_property_name = trim($media_property_name);
|
862 |
+
$media_property_value = trim($media_property_value);
|
863 |
+
|
864 |
+
if ( in_array($media_property_name, $media_property_types) ) {
|
865 |
+
|
866 |
+
//if ($media_property_name == "video" || $media_property_name == "video:url" || $media_property_name == "video:secure_url" || $media_property_name == "audio" || $media_property_name == "audio:url" || $media_property_name == "audio:secure_url") {
|
867 |
+
if ( in_array($media_property_name, $media_property_url_types) ) {
|
868 |
+
|
869 |
+
$media_property_value = esc_attr($media_property_value);
|
870 |
+
}
|
871 |
+
|
872 |
+
if ($media_property_name == "video:width" || $media_property_name == "video:height") {
|
873 |
+
$media_property_value = esc_attr($media_property_value);
|
874 |
+
}
|
875 |
+
|
876 |
+
$this->openGraphMetaTagBuilder($media_property_name, $media_property_value);
|
877 |
+
|
878 |
+
}
|
879 |
+
|
880 |
+
}
|
881 |
+
|
882 |
+
}
|
883 |
+
**/
|
884 |
+
|
885 |
+
// @since 2.0 output video meta tags
|
886 |
+
/**************
|
887 |
+
if ($this->fb_video_url != '') {
|
888 |
+
$this->openGraphMetaTagBuilder('video', esc_url($this->fb_video_url), false);
|
889 |
+
$this->openGraphMetaTagBuilder('video:height', esc_attr($this->fb_video_h), false);
|
890 |
+
$this->openGraphMetaTagBuilder('video:width', esc_attr($this->fb_video_w), false);
|
891 |
+
$this->openGraphMetaTagBuilder('video:type', 'application/x-shockwave-flash', false);
|
892 |
+
}
|
893 |
+
**************/
|
894 |
+
// only for posts
|
895 |
+
if (is_singular () && !is_front_page() && $this->fb_og_type == "article" ) {
|
896 |
+
//$this->og_tags();
|
897 |
+
//$this->og_category();
|
898 |
+
$this->og_publish_date();
|
899 |
+
//if ($this->fbpage != '') {
|
900 |
+
// $this->openGraphMetaTagBuilder('publisher', $this->fbpage, false, 'article');
|
901 |
+
//}
|
902 |
+
}
|
903 |
+
}
|
904 |
+
|
905 |
+
private function openGraphMetaTagBuilder($property = '', $value = '', $apply_filters = false, $prefix = 'og') {
|
906 |
+
if ($apply_filters) {
|
907 |
+
|
908 |
+
//$value = str_replace ( '\'', "’", $value );
|
909 |
+
//$value = str_replace ( '"', "&qout;", $value );
|
910 |
+
//$value = addslashes(strip_tags($value));
|
911 |
+
}
|
912 |
+
|
913 |
+
if ($property != '' && $value != '') {
|
914 |
+
if ($prefix == "none") {
|
915 |
+
$this->meta[] = '<meta property="'.esc_attr($property).'" content="'.esc_attr($value).'" />';
|
916 |
+
} else {
|
917 |
+
$this->meta[] = '<meta property="'.esc_attr($prefix).':'.$property.'" content="'.esc_attr($value).'" />';
|
918 |
+
}
|
919 |
+
}
|
920 |
+
|
921 |
+
}
|
922 |
+
|
923 |
+
function og_tags() {
|
924 |
+
if (! is_singular ()) {
|
925 |
+
return;
|
926 |
+
}
|
927 |
+
|
928 |
+
$tags = get_the_tags ();
|
929 |
+
if (! is_wp_error ( $tags ) && (is_array ( $tags ) && $tags !== array ())) {
|
930 |
+
foreach ( $tags as $tag ) {
|
931 |
+
$this->openGraphMetaTagBuilder('tag', $tag->name, false, 'article');
|
932 |
+
}
|
933 |
+
}
|
934 |
+
}
|
935 |
+
|
936 |
+
public function og_category() {
|
937 |
+
if ( ! is_singular() ) {
|
938 |
+
return;
|
939 |
+
}
|
940 |
+
|
941 |
+
$terms = get_the_category();
|
942 |
+
if ( ! is_wp_error( $terms ) && ( is_array( $terms ) && $terms !== array() ) ) {
|
943 |
+
foreach ( $terms as $term ) {
|
944 |
+
$this->openGraphMetaTagBuilder('section', $term->name, false, 'article');
|
945 |
+
}
|
946 |
+
}
|
947 |
+
}
|
948 |
+
|
949 |
+
public function og_publish_date() {
|
950 |
+
if ( ! is_singular() ) {
|
951 |
+
return;
|
952 |
+
}
|
953 |
+
|
954 |
+
$pub = get_the_date( 'c' );
|
955 |
+
$this->openGraphMetaTagBuilder('published_time', $pub, false, 'article');
|
956 |
+
|
957 |
+
$mod = get_the_modified_date( 'c' );
|
958 |
+
if ( $mod != $pub ) {
|
959 |
+
$this->openGraphMetaTagBuilder('modified_time', $mod, false, 'article');
|
960 |
+
$this->openGraphMetaTagBuilder('updated_time', $mod);
|
961 |
+
}
|
962 |
+
}
|
963 |
+
}
|
964 |
+
|
965 |
+
?>
|
psp-include/generators/psp_tax_seo_metas.php
ADDED
@@ -0,0 +1,1276 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Platinum SEO Pack
|
5 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
6 |
+
Description: Complete SEO solution for your Wordpress blog.
|
7 |
+
Author: Rajesh - Techblissonline
|
8 |
+
Author URI: https://techblissonline.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
class PspTaxSeoMetas {
|
12 |
+
|
13 |
+
//public static $plugin_settings_name = "psp-tax-seo-metas";
|
14 |
+
|
15 |
+
private static $obj_handle = null;
|
16 |
+
|
17 |
+
//private static $psp_seo_meta_tags = null;
|
18 |
+
|
19 |
+
protected static $cust_taxonomies = array();
|
20 |
+
|
21 |
+
protected $psp_cat_meta = array();
|
22 |
+
protected $psp_tag_meta = array();
|
23 |
+
protected $psp_term_meta = array();
|
24 |
+
|
25 |
+
protected $psp_current_tax_format = array();
|
26 |
+
protected $psp_sitewide_settings = array();
|
27 |
+
|
28 |
+
protected $psp_current_cat_obj;
|
29 |
+
protected $psp_current_tag_obj;
|
30 |
+
protected $psp_current_term_obj;
|
31 |
+
|
32 |
+
protected $index_tag = "index,follow";
|
33 |
+
protected $noindex_tag = "noindex,follow";
|
34 |
+
protected $noindex_nofollow_tag = "noindex,nofollow";
|
35 |
+
protected $noodp_tag = "noodp";
|
36 |
+
protected $noydir_tag = "noydir";
|
37 |
+
protected $noarchive_tag = "noarchive";
|
38 |
+
protected $nosnippet_tag = "nosnippet";
|
39 |
+
protected $noimageindex = "noimageindex";
|
40 |
+
|
41 |
+
protected $sitename = "";
|
42 |
+
protected $sitedescription = "";
|
43 |
+
|
44 |
+
protected $psp_helper;
|
45 |
+
|
46 |
+
public $taxonomy_name = "";
|
47 |
+
public $taxonomy_description = "";
|
48 |
+
public $taxonomy_title = "";
|
49 |
+
public $taxonomy_keywords = "";
|
50 |
+
public $taxonomy_can_link = "";
|
51 |
+
|
52 |
+
public $term_social_meta = array();
|
53 |
+
|
54 |
+
//public $options = array();
|
55 |
+
|
56 |
+
public static function get_instance() {
|
57 |
+
|
58 |
+
if ( null == self::$obj_handle ) {
|
59 |
+
self::$obj_handle = new self;
|
60 |
+
}
|
61 |
+
|
62 |
+
return self::$obj_handle;
|
63 |
+
|
64 |
+
} // end get_instance;
|
65 |
+
|
66 |
+
function __construct() {
|
67 |
+
/*************
|
68 |
+
if ( null == self::$cust_taxonomies ) {
|
69 |
+
$args = array(
|
70 |
+
'public' => true,
|
71 |
+
'_builtin' => false
|
72 |
+
);
|
73 |
+
$output = 'names'; // or objects
|
74 |
+
$operator = 'and'; // 'and' or 'or'
|
75 |
+
$cust_taxonomies = get_taxonomies( $args, $output, $operator );
|
76 |
+
self::$cust_taxonomies = $cust_taxonomies;
|
77 |
+
}
|
78 |
+
**********/
|
79 |
+
//not needed here
|
80 |
+
//$this->sitename = $this->psp_helper->internationalize(get_bloginfo('name'));
|
81 |
+
//$this->sitedescription = $this->psp_helper->internationalize(get_bloginfo('description'));
|
82 |
+
|
83 |
+
$psp_helper_instance = PspHelper::get_instance();
|
84 |
+
$this->psp_helper = $psp_helper_instance;
|
85 |
+
|
86 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
87 |
+
$this->sitedescription = $psp_helper_instance->get_sitedescription();
|
88 |
+
$this->psp_sitewide_settings = get_option('psp_sitewide_settings');
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
public function get_cust_taxonomies() {
|
93 |
+
|
94 |
+
return self::$cust_taxonomies;
|
95 |
+
|
96 |
+
} // end get_cust_taxonomies;
|
97 |
+
|
98 |
+
private function get_tax_robots_meta($term_meta) {
|
99 |
+
|
100 |
+
$robots_meta = "";
|
101 |
+
$robots_meta_string = "";
|
102 |
+
|
103 |
+
$psp_settings = $this->psp_sitewide_settings;
|
104 |
+
$current_tax_format = $this->psp_current_tax_format;
|
105 |
+
|
106 |
+
$noindex_tax = !empty($current_tax_format['robots']) ? $current_tax_format['robots'] : "";
|
107 |
+
//$tax_meta = "psp_".$tax_name."_noindex";
|
108 |
+
$term_meta_robots = !empty($term_meta['robots']) ? $term_meta['robots'] : "";
|
109 |
+
$term_meta_noidx = !empty($term_meta['noindex']) ? $term_meta['noindex'] : "";
|
110 |
+
$term_meta_nofollow = !empty($term_meta['nofollow']) ? $term_meta['nofollow'] : "";
|
111 |
+
/**
|
112 |
+
if (empty($term_meta_noidx) && empty($term_meta_nofollow)) {
|
113 |
+
$term_meta_robots = 'index,follow';
|
114 |
+
}
|
115 |
+
**/
|
116 |
+
if (!empty($term_meta_noidx)) {
|
117 |
+
$term_meta_robots = 'noindex,follow';
|
118 |
+
}
|
119 |
+
|
120 |
+
if (!empty($term_meta_nofollow)) {
|
121 |
+
$term_meta_robots = 'index,nofollow';
|
122 |
+
}
|
123 |
+
|
124 |
+
if (!empty($term_meta_noidx) && !empty($term_meta_nofollow)) {
|
125 |
+
$term_meta_robots = 'noindex,nofollow';
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
if ($term_meta_robots) {
|
130 |
+
//$robots_meta .= $this->noindex_tag;
|
131 |
+
$robots_meta .= $term_meta_robots;
|
132 |
+
}
|
133 |
+
|
134 |
+
if (empty($robots_meta)) {
|
135 |
+
//if (get_option($tax_meta)) {
|
136 |
+
if ($noindex_tax) {
|
137 |
+
$robots_meta .= $this->noindex_tag;
|
138 |
+
} else {
|
139 |
+
if (isset($psp_settings['noindex_subpages']) && $psp_settings['noindex_subpages'] && get_query_var('paged') > 1) {
|
140 |
+
$robots_meta .= $this->noindex_tag;
|
141 |
+
} else {
|
142 |
+
$robots_meta .= $this->index_tag;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
$psp_noimageindex = !empty($term_meta['noimageindex']) ? htmlspecialchars(stripcslashes($term_meta['noimageindex'])) : '';
|
148 |
+
$psp_imagepreview = !empty($term_meta['maximage']) ? htmlspecialchars(stripcslashes($term_meta['maximage'])) : '';
|
149 |
+
$psp_videopreview = !empty($term_meta['maxvideo']) ? htmlspecialchars(stripcslashes($term_meta['maxvideo'])) : '';
|
150 |
+
|
151 |
+
if ($psp_noimageindex) {
|
152 |
+
if ($robots_meta != "") {
|
153 |
+
$robots_meta .= ",";
|
154 |
+
}
|
155 |
+
|
156 |
+
$robots_meta .= $this->noimageindex;
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
+
$psp_noarchive = isset($term_meta['noarchive']) ? htmlspecialchars(stripcslashes($term_meta['noarchive'])) : "";
|
161 |
+
|
162 |
+
if ($psp_noarchive) {
|
163 |
+
if ($robots_meta != "") {
|
164 |
+
$robots_meta .= ",";
|
165 |
+
}
|
166 |
+
|
167 |
+
$robots_meta .= $this->noarchive_tag;
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
+
if (isset($psp_settings['use_meta_noodp']) && $psp_settings['use_meta_noodp']) {
|
172 |
+
|
173 |
+
if ($robots_meta != "") {
|
174 |
+
$robots_meta .= ",";
|
175 |
+
}
|
176 |
+
|
177 |
+
$robots_meta .= $this->noodp_tag;
|
178 |
+
}
|
179 |
+
|
180 |
+
if (isset($psp_settings['use_meta_noydir']) && $psp_settings['use_meta_noydir']) {
|
181 |
+
|
182 |
+
if ($robots_meta != "") {
|
183 |
+
$robots_meta .= ",";
|
184 |
+
}
|
185 |
+
|
186 |
+
$robots_meta .= $this->noydir_tag;
|
187 |
+
|
188 |
+
}
|
189 |
+
|
190 |
+
$psp_nosnippet = isset($term_meta['nosnippet']) ? htmlspecialchars(stripcslashes($term_meta['nosnippet'])) : "";
|
191 |
+
$psp_maxsnippet = !empty($term_meta['maxsnippet']) ? htmlspecialchars(stripcslashes($term_meta['maxsnippet'])) : '';
|
192 |
+
|
193 |
+
if ($psp_nosnippet) {
|
194 |
+
if ($robots_meta != "") {
|
195 |
+
$robots_meta .= ",";
|
196 |
+
}
|
197 |
+
|
198 |
+
$robots_meta .= $this->nosnippet_tag;
|
199 |
+
|
200 |
+
}
|
201 |
+
|
202 |
+
if (!$psp_nosnippet && $psp_maxsnippet) {
|
203 |
+
if ($robots_meta != "") {
|
204 |
+
$robots_meta .= ",";
|
205 |
+
}
|
206 |
+
if($psp_maxsnippet == "zero") $psp_maxsnippet = 0;
|
207 |
+
$robots_meta .= "max-snippet:".esc_attr($psp_maxsnippet);
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
if (!$psp_noimageindex && $psp_imagepreview) {
|
212 |
+
if ($robots_meta != "") {
|
213 |
+
$robots_meta .= ",";
|
214 |
+
}
|
215 |
+
|
216 |
+
$robots_meta .= "max-image-preview:".esc_attr($psp_imagepreview);
|
217 |
+
|
218 |
+
}
|
219 |
+
|
220 |
+
if ($psp_videopreview) {
|
221 |
+
if ($robots_meta != "") {
|
222 |
+
$robots_meta .= ",";
|
223 |
+
}
|
224 |
+
if($psp_videopreview == "zero") $psp_videopreview = 0;
|
225 |
+
$robots_meta .= "max-video-preview:".esc_attr($psp_videopreview);
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
if ($robots_meta != "") {
|
230 |
+
|
231 |
+
$robots_meta_string .= '<meta name="robots" content="'.esc_attr($robots_meta).'" />';
|
232 |
+
$robots_meta_string .= "\r\n";
|
233 |
+
|
234 |
+
}
|
235 |
+
|
236 |
+
return $robots_meta_string;
|
237 |
+
|
238 |
+
} // end get_tax_robots_meta;
|
239 |
+
|
240 |
+
|
241 |
+
private function get_cat_description_meta( $current_cat_obj, $term_meta ) {
|
242 |
+
|
243 |
+
$desc_meta = "";
|
244 |
+
$desc_meta_string = "";
|
245 |
+
$keyword_meta_string = "";
|
246 |
+
|
247 |
+
$current_tax_format = $this->psp_current_tax_format;
|
248 |
+
$psp_settings = $this->psp_sitewide_settings;
|
249 |
+
|
250 |
+
$this->taxonomy_name = "category";
|
251 |
+
|
252 |
+
/************moved to parent*****************
|
253 |
+
$term_meta = array();
|
254 |
+
//$tax_format = "psp_".$tax_name."_desc_format";
|
255 |
+
|
256 |
+
|
257 |
+
//$current_cat_obj = get_category(get_query_var('cat'));
|
258 |
+
$cat_id = $current_cat_obj->cat_ID;
|
259 |
+
$cat_name = $current_cat_obj->name;
|
260 |
+
|
261 |
+
//$cat_ID = get_query_var('cat'); //move it to parent
|
262 |
+
|
263 |
+
$term_meta_option_name = $cat_name. "_". $cat_id. "_metas";
|
264 |
+
|
265 |
+
$term_meta = unserialize(get_option( "$cat_name_$cat_id_metas"));
|
266 |
+
|
267 |
+
************moved to parent*****************/
|
268 |
+
|
269 |
+
$description = isset($term_meta['description']) ? $term_meta['description'] : "";
|
270 |
+
|
271 |
+
$term_description = category_description();
|
272 |
+
$term_description = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($term_description));
|
273 |
+
|
274 |
+
if (empty($description)) {
|
275 |
+
|
276 |
+
$description = category_description();// term_description
|
277 |
+
$desc_meta = $this->get_string_between($description, "[description]", "[/description]");
|
278 |
+
|
279 |
+
}
|
280 |
+
|
281 |
+
//$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
282 |
+
|
283 |
+
|
284 |
+
//if ($desc_meta == "" || $desc_meta == null) {
|
285 |
+
if (empty($desc_meta)) {
|
286 |
+
if (isset($description) && $description !== "") {
|
287 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($description));
|
288 |
+
}
|
289 |
+
} else {
|
290 |
+
//equivalent to doing nothing
|
291 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($desc_meta));
|
292 |
+
}
|
293 |
+
|
294 |
+
//if (isset($desc_meta) && $desc_meta !== "") {
|
295 |
+
if (isset($desc_meta) && !empty($desc_meta)) {
|
296 |
+
|
297 |
+
/*********might not be needed********
|
298 |
+
// "internal whitespace trim"
|
299 |
+
$desc_meta = preg_replace("/\s\s+/", " ", $desc_meta);
|
300 |
+
|
301 |
+
$desc_meta = trim(strip_tags($desc_meta));
|
302 |
+
$desc_meta = str_replace('"', '', $desc_meta);
|
303 |
+
|
304 |
+
// replace newlines on mac / windows?
|
305 |
+
$desc_meta = str_replace("\r\n", ' ', $desc_meta);
|
306 |
+
|
307 |
+
// maybe linux uses this alone
|
308 |
+
$desc_meta = str_replace("\n", ' ', $desc_meta);
|
309 |
+
**************************************/
|
310 |
+
|
311 |
+
// description format
|
312 |
+
//$description_format = get_option('psp_cat_description_format');
|
313 |
+
$description_format = isset($current_tax_format['description']) ? $current_tax_format['description'] : "";
|
314 |
+
$psp_term_desc_format = isset($term_meta['descformat']) ? $term_meta['descformat'] : $description_format;
|
315 |
+
$description_format = $psp_term_desc_format;
|
316 |
+
|
317 |
+
if (!isset($description_format) || empty($description_format)) {
|
318 |
+
$description_format = "%description%";
|
319 |
+
$description = str_replace('%description%', $desc_meta, $description_format);
|
320 |
+
} else {
|
321 |
+
|
322 |
+
$psp_seo_title = "";
|
323 |
+
if (!empty($this->taxonomy_title)) $psp_seo_title = $this->taxonomy_title;
|
324 |
+
|
325 |
+
$description = str_replace('%seo_description%', $desc_meta, $description_format);
|
326 |
+
$description = str_replace('%description%', $term_description, $description);
|
327 |
+
$description = str_replace('%term_description%', $term_description, $description);
|
328 |
+
//$description = str_replace('%blog_title%', $this->sitename, $description);
|
329 |
+
//$description = str_replace('%blog_description%', $this->sitedescription, $description);
|
330 |
+
$description = str_replace('%site_name%', $this->sitename, $description);
|
331 |
+
$description = str_replace('%site_description%', $this->sitedescription, $description);
|
332 |
+
$description = str_replace('%category_name%', single_cat_title( '', false ), $description);
|
333 |
+
$description = str_replace('%term_name%', single_cat_title( '', false ), $description);
|
334 |
+
$description = str_replace('%title%', single_cat_title( '', false ), $description);
|
335 |
+
$description = str_replace('%seo_title%', $psp_seo_title, $description);
|
336 |
+
$description = str_replace('%sep%', $psp_settings['separator'], $description);
|
337 |
+
}
|
338 |
+
$this->taxonomy_description = $description;
|
339 |
+
$desc_meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", esc_attr($description));
|
340 |
+
}
|
341 |
+
|
342 |
+
//check for use_meta_keywords
|
343 |
+
if ( isset($psp_settings['use_meta_keywords']) && $psp_settings['use_meta_keywords'] ) {
|
344 |
+
|
345 |
+
$keywords = isset($term_meta['keywords']) ? $term_meta['keywords'] : "";
|
346 |
+
|
347 |
+
if (empty($keywords)) {
|
348 |
+
|
349 |
+
$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
350 |
+
|
351 |
+
}
|
352 |
+
|
353 |
+
//if ($keywords != "" || $keywords != null) {
|
354 |
+
if (isset($keywords) && !empty($keywords)) {
|
355 |
+
$keywords = $this->psp_helper->internationalize($keywords);
|
356 |
+
$this->taxonomy_keywords = $keywords;
|
357 |
+
$keyword_meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", esc_attr($keywords));
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
if (isset($desc_meta_string) && $desc_meta_string != "" && isset($keyword_meta_string) && $keyword_meta_string != "") {
|
362 |
+
$desc_meta_string .= "\r\n";
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
return $desc_meta_string.$keyword_meta_string;
|
367 |
+
|
368 |
+
} // end get_cat_description_meta;
|
369 |
+
|
370 |
+
private function get_tag_description_meta($current_tag_obj, $term_meta) {
|
371 |
+
|
372 |
+
$desc_meta = "";
|
373 |
+
$desc_meta_string = "";
|
374 |
+
$keyword_meta_string = "";
|
375 |
+
|
376 |
+
$current_tax_format = $this->psp_current_tax_format;
|
377 |
+
$psp_settings = $this->psp_sitewide_settings;
|
378 |
+
|
379 |
+
$this->taxonomy_name = "tag";
|
380 |
+
|
381 |
+
/**********moved to parent**********
|
382 |
+
$term_meta = array();
|
383 |
+
//$tax_format = "psp_".$tax_name."_desc_format";
|
384 |
+
|
385 |
+
$term_id = $current_tag_obj->term_id;
|
386 |
+
$term_name = $current_tag_obj->name;
|
387 |
+
|
388 |
+
$term_meta_option_name = $term_name. "_". $term_id. "_metas";
|
389 |
+
|
390 |
+
$term_meta = unserialize(get_option("$term_name_$term_id_metas"));
|
391 |
+
****************/
|
392 |
+
|
393 |
+
$description = isset($term_meta['description']) ? $term_meta['description'] : "";
|
394 |
+
|
395 |
+
$term_description = tag_description();
|
396 |
+
$term_description = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($term_description));
|
397 |
+
|
398 |
+
if (empty($description)) {
|
399 |
+
|
400 |
+
$description = tag_description();// term_description
|
401 |
+
$desc_meta = $this->get_string_between($description, "[description]", "[/description]");
|
402 |
+
}
|
403 |
+
|
404 |
+
//$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
405 |
+
|
406 |
+
|
407 |
+
//if ($desc_meta == "" || $desc_meta == null) {
|
408 |
+
if (empty($desc_meta)) {
|
409 |
+
if (isset($description) && $description !== "") {
|
410 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($description));
|
411 |
+
}
|
412 |
+
} else {
|
413 |
+
//equivalent to do nothing
|
414 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($desc_meta));
|
415 |
+
}
|
416 |
+
|
417 |
+
//if (isset($desc_meta) && $desc_meta !== "") {
|
418 |
+
if (isset($desc_meta) && !empty($desc_meta)) {
|
419 |
+
|
420 |
+
/*********might not be needed********
|
421 |
+
// "internal whitespace trim"
|
422 |
+
$desc_meta = preg_replace("/\s\s+/", " ", $desc_meta);
|
423 |
+
|
424 |
+
$desc_meta = trim(strip_tags($desc_meta));
|
425 |
+
$desc_meta = str_replace('"', '', $desc_meta);
|
426 |
+
|
427 |
+
// replace newlines on mac / windows?
|
428 |
+
$desc_meta = str_replace("\r\n", ' ', $desc_meta);
|
429 |
+
|
430 |
+
// maybe linux uses this alone
|
431 |
+
$desc_meta = str_replace("\n", ' ', $desc_meta);
|
432 |
+
**************************************/
|
433 |
+
|
434 |
+
// description format
|
435 |
+
//$description_format = get_option('psp_tag_description_format');
|
436 |
+
$description_format = isset($current_tax_format['description']) ? $current_tax_format['description'] : "";
|
437 |
+
$psp_term_desc_format = isset($term_meta['descformat']) ? $term_meta['descformat'] : $description_format;
|
438 |
+
$description_format = $psp_term_desc_format;
|
439 |
+
|
440 |
+
if (!isset($description_format) || empty($description_format)) {
|
441 |
+
$description_format = "%description%";
|
442 |
+
$description = str_replace('%description%', $desc_meta, $description_format);
|
443 |
+
|
444 |
+
} else {
|
445 |
+
|
446 |
+
$psp_seo_title = "";
|
447 |
+
if (!empty($this->taxonomy_title)) $psp_seo_title = $this->taxonomy_title;
|
448 |
+
|
449 |
+
$description = str_replace('%seo_description%', $desc_meta, $description_format);
|
450 |
+
$description = str_replace('%description%', $term_description, $description);
|
451 |
+
$description = str_replace('%term_description%', $term_description, $description);
|
452 |
+
//$description = str_replace('%blog_title%', $this->sitename, $description);
|
453 |
+
//$description = str_replace('%blog_description%', $this->sitedescription, $description);
|
454 |
+
$description = str_replace('%site_name%', $this->sitename, $description);
|
455 |
+
$description = str_replace('%site_description%', $this->sitedescription, $description);
|
456 |
+
$description = str_replace('%tag_name%', single_tag_title( '', false ), $description);
|
457 |
+
$description = str_replace('%term_name%', single_tag_title( '', false ), $description);
|
458 |
+
$description = str_replace('%title%', single_tag_title( '', false ), $description);
|
459 |
+
$description = str_replace('%seo_title%', $psp_seo_title, $description);
|
460 |
+
$description = str_replace('%sep%', $psp_settings['separator'], $description);
|
461 |
+
|
462 |
+
}
|
463 |
+
$this->taxonomy_description = $description;
|
464 |
+
$desc_meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", esc_attr($description));
|
465 |
+
}
|
466 |
+
|
467 |
+
//check for use_meta_keywords
|
468 |
+
if ( isset($psp_settings['use_meta_keywords']) && $psp_settings['use_meta_keywords'] ) {
|
469 |
+
|
470 |
+
$keywords = isset($term_meta['keywords']) ? $term_meta['keywords'] : "";
|
471 |
+
|
472 |
+
if (empty($keywords)) {
|
473 |
+
|
474 |
+
$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
+
//if ($keywords != "" || $keywords != null) {
|
479 |
+
if (isset($keywords) && !empty($keywords)) {
|
480 |
+
$keywords = $this->psp_helper->internationalize($keywords);
|
481 |
+
$this->taxonomy_keywords = $keywords;
|
482 |
+
$keyword_meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", esc_attr($keywords));
|
483 |
+
}
|
484 |
+
}
|
485 |
+
if (isset($desc_meta_string) && $desc_meta_string != "" && isset($keyword_meta_string) && $keyword_meta_string != "") {
|
486 |
+
$desc_meta_string .= "\r\n";
|
487 |
+
}
|
488 |
+
|
489 |
+
|
490 |
+
return $desc_meta_string.$keyword_meta_string;
|
491 |
+
|
492 |
+
} // end get_tag_description_meta;
|
493 |
+
|
494 |
+
private function get_tax_description_meta($current_term_obj, $term_meta, $tax_name) {
|
495 |
+
|
496 |
+
$desc_meta = "";
|
497 |
+
$desc_meta_string = "";
|
498 |
+
$keyword_meta_string = "";
|
499 |
+
|
500 |
+
$current_tax_format = $this->psp_current_tax_format;
|
501 |
+
$psp_settings = $this->psp_sitewide_settings;
|
502 |
+
|
503 |
+
$this->taxonomy_name = $tax_name;
|
504 |
+
|
505 |
+
/********moved to parent************
|
506 |
+
$term_meta = array();
|
507 |
+
|
508 |
+
$tax_format = "psp_".$tax_name."_desc_format";
|
509 |
+
|
510 |
+
$term_id = $current_term_obj->term_id;
|
511 |
+
$term_name = $current_term_obj->name;
|
512 |
+
|
513 |
+
$term_meta_option_name = $term_name. "_". $term_id. "_metas";
|
514 |
+
|
515 |
+
$term_meta = unserialize(get_option("$term_name_$term_id_metas"));
|
516 |
+
***************************************/
|
517 |
+
|
518 |
+
$description = isset($term_meta['description']) ? $term_meta['description'] : "";
|
519 |
+
|
520 |
+
$term_description = term_description();
|
521 |
+
$term_description = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($term_description));
|
522 |
+
|
523 |
+
if (empty($description)) {
|
524 |
+
|
525 |
+
$description = term_description();// term_description
|
526 |
+
$desc_meta = $this->get_string_between($description, "[description]", "[/description]");
|
527 |
+
|
528 |
+
}
|
529 |
+
|
530 |
+
//$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
531 |
+
|
532 |
+
|
533 |
+
//if ($desc_meta == "" || $desc_meta == null) {
|
534 |
+
if (empty($desc_meta)) {
|
535 |
+
if (isset($description) && !empty($description)) {
|
536 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($description));
|
537 |
+
}
|
538 |
+
} else {
|
539 |
+
//equivalent to do nothing
|
540 |
+
$desc_meta = $this->psp_helper->trim_excerpt_without_filters($this->psp_helper->internationalize($desc_meta));
|
541 |
+
}
|
542 |
+
|
543 |
+
//if (isset($desc_meta) && $desc_meta !== "") {
|
544 |
+
if (isset($desc_meta) && !empty($desc_meta)) {
|
545 |
+
|
546 |
+
/*********might not be needed********
|
547 |
+
// "internal whitespace trim"
|
548 |
+
$desc_meta = preg_replace("/\s\s+/", " ", $desc_meta);
|
549 |
+
|
550 |
+
$desc_meta = trim(strip_tags($desc_meta));
|
551 |
+
$desc_meta = str_replace('"', '', $desc_meta);
|
552 |
+
|
553 |
+
// replace newlines on mac / windows?
|
554 |
+
$desc_meta = str_replace("\r\n", ' ', $desc_meta);
|
555 |
+
|
556 |
+
// maybe linux uses this alone
|
557 |
+
$desc_meta = str_replace("\n", ' ', $desc_meta);
|
558 |
+
**************************************/
|
559 |
+
|
560 |
+
// description format
|
561 |
+
$description_format = isset($current_tax_format['description']) ? $current_tax_format['description'] : "";//get_option($tax_format);
|
562 |
+
$psp_term_desc_format = isset($term_meta['descformat']) ? $term_meta['descformat'] : $description_format;
|
563 |
+
$description_format = $psp_term_desc_format;
|
564 |
+
|
565 |
+
if (!isset($description_format) || empty($description_format)) {
|
566 |
+
$description_format = "%description%";
|
567 |
+
$description = str_replace('%description%', $desc_meta, $description_format);
|
568 |
+
} else {
|
569 |
+
|
570 |
+
//Term object
|
571 |
+
//$term = get_term_by( 'slug', get_query_var('term'), get_query_var( 'taxonomy' ) );
|
572 |
+
$term = $current_term_obj;
|
573 |
+
|
574 |
+
$psp_seo_title = "";
|
575 |
+
if (!empty($this->taxonomy_title)) $psp_seo_title = $this->taxonomy_title;
|
576 |
+
|
577 |
+
$description = str_replace('%seo_description%', $desc_meta, $description_format);
|
578 |
+
$description = str_replace('%description%', $term_description, $description);
|
579 |
+
//$description = str_replace('%blog_title%', $this->sitename, $description);
|
580 |
+
//$description = str_replace('%blog_description%', $this->sitedescription, $description);
|
581 |
+
$description = str_replace('%site_name%', $this->sitename, $description);
|
582 |
+
$description = str_replace('%site_description%', $this->sitedescription, $description);
|
583 |
+
$description = str_replace('%tax_name%', $tax_name, $description);
|
584 |
+
$description = str_replace('%term_name%', $term->name, $description);
|
585 |
+
$description = str_replace('%seo_title%', $psp_seo_title, $description);
|
586 |
+
$description = str_replace('%title%', $term->name, $description);
|
587 |
+
$description = str_replace('%sep%', $psp_settings['separator'], $description);
|
588 |
+
|
589 |
+
}
|
590 |
+
$this->taxonomy_description = $description;
|
591 |
+
$desc_meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />", esc_attr($description));
|
592 |
+
}
|
593 |
+
|
594 |
+
//check for use_meta_keywords
|
595 |
+
if ( isset($psp_settings['use_meta_keywords']) && $psp_settings['use_meta_keywords'] ) {
|
596 |
+
|
597 |
+
$keywords = isset($term_meta['keywords']) ? $term_meta['keywords'] : "";
|
598 |
+
|
599 |
+
if (empty($keywords)) {
|
600 |
+
|
601 |
+
$keywords = $this->get_string_between($description, "[keywords]", "[/keywords]");
|
602 |
+
|
603 |
+
}
|
604 |
+
|
605 |
+
//if ($keywords != "" || $keywords != null) {
|
606 |
+
if (isset($keywords) && !empty($keywords)) {
|
607 |
+
$keywords = $this->psp_helper->internationalize($keywords);
|
608 |
+
$this->taxonomy_keywords = $keywords;
|
609 |
+
$keyword_meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />", esc_attr($keywords));
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
if (isset($desc_meta_string) && $desc_meta_string != "" && isset($keyword_meta_string) && $keyword_meta_string != "") {
|
614 |
+
$desc_meta_string .= "\r\n";
|
615 |
+
}
|
616 |
+
|
617 |
+
return $desc_meta_string.$keyword_meta_string;
|
618 |
+
|
619 |
+
} // end get_tax_description_meta;
|
620 |
+
|
621 |
+
private function get_string_between($string, $start, $end){
|
622 |
+
$string = " ".$string;
|
623 |
+
$ini = strpos($string,$start);
|
624 |
+
//if ($ini == 0) return "";
|
625 |
+
if ($ini === false) {
|
626 |
+
if ($start == "[description]") {
|
627 |
+
return $string;
|
628 |
+
} else {
|
629 |
+
return "";
|
630 |
+
}
|
631 |
+
}
|
632 |
+
$ini += strlen($start);
|
633 |
+
$len = strpos($string,$end,$ini) - $ini;
|
634 |
+
return substr($string,$ini,$len);
|
635 |
+
} //get_string_between
|
636 |
+
|
637 |
+
private function get_cat_canonical_meta($current_cat_obj, $term_meta) {
|
638 |
+
|
639 |
+
$can_link = "";
|
640 |
+
$cat_link = "";
|
641 |
+
$canonical_meta_string = "";
|
642 |
+
|
643 |
+
if (isset($term_meta['canonical_url']) && !empty($term_meta['canonical_url'])) {
|
644 |
+
$can_link = esc_url($term_meta['canonical_url']);
|
645 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
646 |
+
}
|
647 |
+
|
648 |
+
//$cat_link = get_category_link(get_query_var('cat'));
|
649 |
+
if(isset($current_cat_obj->cat_ID) && !empty($current_cat_obj->cat_ID)) $cat_link = get_category_link($current_cat_obj->cat_ID);
|
650 |
+
|
651 |
+
//$can_link = $this->psp_helper->paged_link($cat_link);
|
652 |
+
if (empty($can_link)) $can_link = $this->psp_helper->paged_link($cat_link);
|
653 |
+
|
654 |
+
if ($can_link != '') {
|
655 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
656 |
+
$this->taxonomy_can_link = $can_link;
|
657 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
658 |
+
}
|
659 |
+
|
660 |
+
return $canonical_meta_string;
|
661 |
+
|
662 |
+
} // end get_cat_canonical_meta;
|
663 |
+
|
664 |
+
private function get_tag_canonical_meta( $tag, $term_meta) {
|
665 |
+
|
666 |
+
$can_link = "";
|
667 |
+
$tag_link = "";
|
668 |
+
$canonical_meta_string = "";
|
669 |
+
|
670 |
+
if (isset($term_meta['canonical_url']) && !empty($term_meta['canonical_url'])) {
|
671 |
+
$can_link = esc_url($term_meta['canonical_url']);
|
672 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
673 |
+
}
|
674 |
+
|
675 |
+
//$tag = get_term_by('slug',get_query_var('tag'),'post_tag');
|
676 |
+
if (isset($tag->term_id) && !empty($tag->term_id)) {
|
677 |
+
$tag_link = get_tag_link($tag->term_id);
|
678 |
+
}
|
679 |
+
//$can_link = $this->psp_helper->paged_link($tag_link);
|
680 |
+
if (empty($can_link)) $can_link = $this->psp_helper->paged_link($tag_link);
|
681 |
+
|
682 |
+
if ($can_link != '') {
|
683 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
684 |
+
$this->taxonomy_can_link = $can_link;
|
685 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
686 |
+
}
|
687 |
+
|
688 |
+
return $canonical_meta_string;
|
689 |
+
|
690 |
+
} // end get_tag_canonical_meta;
|
691 |
+
|
692 |
+
private function get_tax_canonical_meta($term_object, $term_meta) {
|
693 |
+
|
694 |
+
$can_link = "";
|
695 |
+
$term_link = "";
|
696 |
+
$canonical_meta_string = "";
|
697 |
+
|
698 |
+
//$curr_term = get_query_var('term');
|
699 |
+
//$term_object = get_term_by( 'slug', $curr_term, get_query_var( 'taxonomy' ) );
|
700 |
+
|
701 |
+
if (isset($term_meta['canonical_url']) && !empty($term_meta['canonical_url'])) {
|
702 |
+
$can_link = esc_url($term_meta['canonical_url']);
|
703 |
+
$can_link = $this->psp_helper->paged_link($can_link);
|
704 |
+
}
|
705 |
+
|
706 |
+
if (isset($term_object->term_id) && !empty($term_object->term_id)) {
|
707 |
+
$term_link = get_term_link( $term_object );
|
708 |
+
}
|
709 |
+
|
710 |
+
if (empty($can_link)) $can_link = $this->psp_helper->paged_link($term_link);
|
711 |
+
|
712 |
+
if ($can_link != '') {
|
713 |
+
//echo "".'<link rel="canonical" href="'.$can_link.'" />'."\r\n";
|
714 |
+
$this->taxonomy_can_link = $can_link;
|
715 |
+
$canonical_meta_string .= '<link rel="canonical" href="'.esc_url($can_link).'" />'."\r\n";
|
716 |
+
}
|
717 |
+
|
718 |
+
return $canonical_meta_string;
|
719 |
+
} // end get_tax_canonical_meta;
|
720 |
+
|
721 |
+
public function get_cat_psp_title() {
|
722 |
+
|
723 |
+
$title = "";
|
724 |
+
$term_id = "";
|
725 |
+
$term_name = "";
|
726 |
+
$cat_id = "";
|
727 |
+
$cat_name = "";
|
728 |
+
$term_meta = array();
|
729 |
+
|
730 |
+
$psp_settings = $this->psp_sitewide_settings;
|
731 |
+
|
732 |
+
if (isset($this->psp_current_tax_format) && !empty($this->psp_current_tax_format)){
|
733 |
+
$current_tax_format = $this->psp_current_tax_format;
|
734 |
+
} else {
|
735 |
+
$current_tax_format_option = "psp_category_settings";
|
736 |
+
$current_tax_format = get_option($current_tax_format_option);
|
737 |
+
$this->psp_current_tax_format = $current_tax_format;
|
738 |
+
}
|
739 |
+
|
740 |
+
if (isset($this->psp_current_cat_obj) && !empty($this->psp_current_cat_obj)){
|
741 |
+
$current_cat_obj = $this->psp_current_cat_obj;
|
742 |
+
} else {
|
743 |
+
$current_cat_obj = get_category(get_query_var('cat'));
|
744 |
+
$this->psp_current_cat_obj = $current_cat_obj;
|
745 |
+
}
|
746 |
+
if (is_object($current_cat_obj)) {
|
747 |
+
$cat_id = isset($current_cat_obj->cat_ID) ? $current_cat_obj->cat_ID : '';
|
748 |
+
$cat_name = isset($current_cat_obj->name) ? $current_cat_obj->name : '';
|
749 |
+
}
|
750 |
+
//$cat_ID = get_query_var('cat'); //move it to parent
|
751 |
+
|
752 |
+
if (empty($this->psp_cat_meta)) {
|
753 |
+
|
754 |
+
$term_meta_option_name = "psp_category_seo_metas_".$cat_id;
|
755 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
756 |
+
if (!empty($cat_id)) $term_meta = get_option( "psp_category_seo_metas_$cat_id");
|
757 |
+
|
758 |
+
$this->psp_cat_meta = $term_meta;
|
759 |
+
} else {
|
760 |
+
$term_meta = $this->psp_cat_meta;
|
761 |
+
}
|
762 |
+
|
763 |
+
if (empty($this->term_social_meta)) {
|
764 |
+
if (!empty($cat_id)) $this->term_social_meta = get_option( "psp_category_social_metas_$cat_id");
|
765 |
+
}
|
766 |
+
|
767 |
+
$title = isset($term_meta['title']) ? $this->psp_helper->internationalize($term_meta['title']) : "";
|
768 |
+
$category_name = ucwords($this->psp_helper->internationalize($cat_name));
|
769 |
+
if (empty($title)) {
|
770 |
+
|
771 |
+
$title = $category_name;
|
772 |
+
}
|
773 |
+
|
774 |
+
$title = trim(stripcslashes($title));
|
775 |
+
//is this needed?
|
776 |
+
$category_description = $this->psp_helper->internationalize(category_description());
|
777 |
+
//$category_name = ucwords($this->psp_helper->internationalize(single_cat_title('', false)));
|
778 |
+
|
779 |
+
//$title_format = get_option('aiosp_category_title_format');
|
780 |
+
$title_format = isset($current_tax_format['title']) ? $current_tax_format['title'] : "";
|
781 |
+
$psp_term_title_format = isset($term_meta['titleformat']) ? $term_meta['titleformat'] : $title_format;
|
782 |
+
$title_format = $psp_term_title_format;
|
783 |
+
|
784 |
+
if (!isset($title_format) || empty($title_format)) {
|
785 |
+
$title_format = "%seo_title%";
|
786 |
+
$title = str_replace('%seo_title%', $title, $title_format);
|
787 |
+
} else {
|
788 |
+
$title = str_replace('%seo_title%', $title, $title_format);
|
789 |
+
$title = str_replace('%title%', $category_name, $title);
|
790 |
+
$title = str_replace('%category_name%', $category_name, $title);
|
791 |
+
$title = str_replace('%term_name%', $category_name, $title);
|
792 |
+
//$title = str_replace('%sep%', htmlentities($psp_settings['separator']), $title);
|
793 |
+
$title = str_replace('%sep%', ($psp_settings['separator']), $title);
|
794 |
+
$title = str_replace('%term_description%', $category_description, $title);
|
795 |
+
$title = str_replace('%description%', $category_description, $title);
|
796 |
+
//$title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $title);
|
797 |
+
//$title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $title);
|
798 |
+
//$title = str_replace('%blog_title%', $this->sitename, $title);
|
799 |
+
//$title = str_replace('%blog_description%', $this->sitedescription, $title);
|
800 |
+
$title = str_replace('%site_name%', $this->sitename, $title);
|
801 |
+
$title = str_replace('%site_description%', $this->sitedescription, $title);
|
802 |
+
//$title = str_replace ("+"," ", $title);
|
803 |
+
}
|
804 |
+
|
805 |
+
//$title = $this->paged_title($title);
|
806 |
+
$title = $this->psp_helper->paged_title($title);
|
807 |
+
$this->taxonomy_title = $title;
|
808 |
+
return $title;
|
809 |
+
|
810 |
+
} // end get_cat_psp_title
|
811 |
+
|
812 |
+
public function get_tag_psp_title() {
|
813 |
+
|
814 |
+
//global $STagging;
|
815 |
+
|
816 |
+
$title = "";
|
817 |
+
$term_meta = array();
|
818 |
+
$term_id = "";
|
819 |
+
$term_name = "";
|
820 |
+
|
821 |
+
$psp_settings = $this->psp_sitewide_settings;
|
822 |
+
|
823 |
+
if (isset($this->psp_current_tax_format) && !empty($this->psp_current_tax_format)){
|
824 |
+
$current_tax_format = $this->psp_current_tax_format;
|
825 |
+
} else {
|
826 |
+
$current_tax_format_option = "psp_tag_settings";
|
827 |
+
$current_tax_format = get_option($current_tax_format_option);
|
828 |
+
$this->psp_current_tax_format = $current_tax_format;
|
829 |
+
}
|
830 |
+
|
831 |
+
if (isset($this->psp_current_tag_obj) && !empty($this->psp_current_tag_obj)){
|
832 |
+
$current_tag_obj = $this->psp_current_tag_obj;
|
833 |
+
} else {
|
834 |
+
$current_tag_obj = get_term_by('slug',get_query_var('tag'),'post_tag');
|
835 |
+
$this->psp_current_tag_obj = $current_tag_obj;
|
836 |
+
}
|
837 |
+
if ( is_object($current_tag_obj)) {
|
838 |
+
$term_id = isset($current_tag_obj->term_id) ? $current_tag_obj->term_id : '';
|
839 |
+
$term_name = isset($current_tag_obj->name) ? $current_tag_obj->name : '';
|
840 |
+
}
|
841 |
+
//$psp_tag_meta = isset($this->psp_tag_meta) : $this->psp_tag_meta : "";
|
842 |
+
if (empty($this->psp_tag_meta)) {
|
843 |
+
|
844 |
+
$term_meta_option_name = "psp_taxonomy_seo_metas_".$term_id;
|
845 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
846 |
+
if (!empty($term_id)) $term_meta = get_option( "psp_taxonomy_seo_metas_$term_id");
|
847 |
+
$this->psp_tag_meta = $term_meta;
|
848 |
+
} else {
|
849 |
+
$term_meta = $this->psp_tag_meta;
|
850 |
+
}
|
851 |
+
//$psp_term_social_meta = isset($this->term_social_meta) : $this->term_social_meta : "";
|
852 |
+
if (empty($this->term_social_meta)) {
|
853 |
+
if (!empty($term_id)) $this->term_social_meta = get_option( "psp_taxonomy_social_metas_$term_id");
|
854 |
+
}
|
855 |
+
|
856 |
+
$title = isset($term_meta['title']) ? $this->psp_helper->internationalize($term_meta['title']) : "";
|
857 |
+
$term_name = ucwords($this->psp_helper->internationalize($term_name));
|
858 |
+
if (empty($title)) {
|
859 |
+
//$tag = $this->psp_helper->internationalize($term_name);
|
860 |
+
//$tag = $this->capitalize($tag);
|
861 |
+
//$tag = ucwords($this->psp_helper->internationalize($term_name));
|
862 |
+
//$title = $tag;
|
863 |
+
$title = $term_name;
|
864 |
+
}
|
865 |
+
$title = trim(stripcslashes($title));
|
866 |
+
//is this needed?
|
867 |
+
$tag_description = $this->psp_helper->internationalize(tag_description());
|
868 |
+
|
869 |
+
//$title_format = get_option('aiosp_tag_title_format');
|
870 |
+
$title_format = isset($current_tax_format['title']) ? $current_tax_format['title'] : "";
|
871 |
+
$psp_term_title_format = isset($term_meta['titleformat']) ? $term_meta['titleformat'] : $title_format;
|
872 |
+
$title_format = $psp_term_title_format;
|
873 |
+
|
874 |
+
if (!isset($title_format) || empty($title_format)) {
|
875 |
+
$title_format = "%seo_title%";
|
876 |
+
$title = str_replace('%seo_title%', $title, $title_format);
|
877 |
+
} else {
|
878 |
+
|
879 |
+
$title = str_replace('%seo_title%', $title, $title_format);
|
880 |
+
$title = str_replace('%title%', $term_name, $title);
|
881 |
+
$title = str_replace('%tag_name%', $term_name, $title);
|
882 |
+
$title = str_replace('%term_name%', $term_name, $title);
|
883 |
+
//$title = str_replace('%sep%', htmlentities($psp_settings['separator']), $title);
|
884 |
+
$title = str_replace('%sep%', $psp_settings['separator'], $title);
|
885 |
+
$title = str_replace('%term_description%', $tag_description, $title);
|
886 |
+
$title = str_replace('%description%', $tag_description, $title);
|
887 |
+
//$title = str_replace('%blog_title%', $this->psp_helper->internationalize(get_bloginfo('name')), $title);
|
888 |
+
//$title = str_replace('%blog_description%', $this->psp_helper->internationalize(get_bloginfo('description')), $title);
|
889 |
+
//$title = str_replace('%blog_title%', $this->sitename, $title);
|
890 |
+
//$title = str_replace('%blog_description%', $this->sitedescription, $title);
|
891 |
+
$title = str_replace('%site_name%', $this->sitename, $title);
|
892 |
+
$title = str_replace('%site_description%', $this->sitedescription, $title);
|
893 |
+
}
|
894 |
+
|
895 |
+
//$title = $this->paged_title($title);
|
896 |
+
$title = $this->psp_helper->paged_title($title);
|
897 |
+
$this->taxonomy_title = $title;
|
898 |
+
return $title;
|
899 |
+
|
900 |
+
} // end get_tag_psp_title
|
901 |
+
|
902 |
+
public function get_tax_psp_title($psparr = false) {
|
903 |
+
|
904 |
+
$title = "";
|
905 |
+
$term_meta = array();
|
906 |
+
//$term_id = isset($_GET['tag_ID']) ? $_GET['tag_ID'] : '';
|
907 |
+
$term_id = '';
|
908 |
+
|
909 |
+
$term_name = "";
|
910 |
+
$tax_slug = '';
|
911 |
+
|
912 |
+
$psp_settings = $this->psp_sitewide_settings;
|
913 |
+
|
914 |
+
// if (!empty($this->psp_current_tax_format)){
|
915 |
+
// $current_tax_format = $this->psp_current_tax_format;
|
916 |
+
|
917 |
+
// } else {
|
918 |
+
//$current_tax_object = get_taxonomy( get_query_var( 'taxonomy' ));
|
919 |
+
//$tax_name = $current_tax_object->labels->name;
|
920 |
+
if (!$term_id) $term_id = get_queried_object_id(); //get_queried_object()->term_id;
|
921 |
+
if (!$tax_slug) $tax_slug = get_query_var( 'taxonomy' );
|
922 |
+
$current_tax_format_option = "psp_". $tax_slug. "_settings";
|
923 |
+
//error_log($current_tax_format_option);
|
924 |
+
$current_tax_format = get_option($current_tax_format_option);
|
925 |
+
$this->psp_current_tax_format = $current_tax_format;
|
926 |
+
// }
|
927 |
+
|
928 |
+
//$curr_term = get_query_var('term');
|
929 |
+
|
930 |
+
if (isset($this->psp_current_term_obj) && !empty($this->psp_current_term_obj)){
|
931 |
+
$term_object = $this->psp_current_term_obj;
|
932 |
+
} else {
|
933 |
+
if ($tax_slug && $term_id) {
|
934 |
+
$term_object = get_term_by( 'id', $term_id, $tax_slug );
|
935 |
+
} else {
|
936 |
+
$term_object = get_term_by( 'slug', get_query_var('term'), get_query_var( 'taxonomy' ) );
|
937 |
+
}
|
938 |
+
$this->psp_current_term_obj = $term_object;
|
939 |
+
}
|
940 |
+
if ( is_object($term_object)) {
|
941 |
+
$term_id = isset($term_object->term_id) ? $term_object->term_id : '';
|
942 |
+
$term_name = isset($term_object->name) ? $term_object->name : '';
|
943 |
+
}
|
944 |
+
//$psp_term_meta = isset($this->psp_term_meta) ? $this->psp_term_meta : "";
|
945 |
+
if (empty($this->psp_term_meta)) {
|
946 |
+
|
947 |
+
$term_meta_option_name = "psp_taxonomy_seo_metas_".$term_id;
|
948 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
949 |
+
if (!empty($term_id)) $term_meta = get_option( "psp_taxonomy_seo_metas_$term_id");
|
950 |
+
$this->psp_term_meta = $term_meta;
|
951 |
+
|
952 |
+
} else {
|
953 |
+
$term_meta = $this->psp_term_meta;
|
954 |
+
}
|
955 |
+
$psp_term_social_meta = isset($this->term_social_meta) ? $this->term_social_meta : "";
|
956 |
+
if (empty($psp_term_social_meta)) {
|
957 |
+
if (!empty($term_id)) $this->term_social_meta = get_option( "psp_taxonomy_social_metas_$term_id");
|
958 |
+
}
|
959 |
+
//continue
|
960 |
+
//$title = $this->psp_helper->internationalize($term_meta->title);
|
961 |
+
$title = isset($term_meta['title']) ? $this->psp_helper->internationalize($term_meta['title']) : "";
|
962 |
+
$term_name = ucwords($this->psp_helper->internationalize($term_name));
|
963 |
+
if (empty($title)) {
|
964 |
+
$title = $term_name;
|
965 |
+
}
|
966 |
+
$title = trim(stripcslashes($title));
|
967 |
+
$term_description = $this->psp_helper->internationalize(term_description());
|
968 |
+
|
969 |
+
$title_format = isset($current_tax_format['title']) ? $current_tax_format['title'] : "";
|
970 |
+
$psp_term_title_format = isset($term_meta['titleformat']) ? $term_meta['titleformat'] : $title_format;
|
971 |
+
$title_format = $psp_term_title_format;
|
972 |
+
//$title_format = get_option($tax_title_format);
|
973 |
+
//$title_format = get_option('psp_taxonomy_title_format');
|
974 |
+
//error_log($title_format);
|
975 |
+
|
976 |
+
if (!isset($title_format) || empty($title_format)) {
|
977 |
+
$title_format = "%seo_title%";
|
978 |
+
//$new_title = str_replace('%seo_title%', $title, $title_format);
|
979 |
+
//$new_title = isset($_GET['tag_ID'], $_GET['taxonomy']) ? $title_format : str_replace('%seo_title%', $title, $title_format);
|
980 |
+
$new_title = is_tax() ? str_replace('%seo_title%', $title, $title_format) : $title_format ;
|
981 |
+
} else {
|
982 |
+
//$new_title = isset($_GET['tag_ID'], $_GET['taxonomy']) ? $title_format : str_replace('%seo_title%', $title, $title_format);
|
983 |
+
$new_title = is_tax() ? str_replace('%seo_title%', $title, $title_format) : $title_format ;
|
984 |
+
//$new_title = str_replace('%seo_title%', $title, $title_format);
|
985 |
+
$new_title = str_replace('%title%', $term_name, $new_title);
|
986 |
+
$new_title = str_replace('%term_name%', $term_name, $new_title);
|
987 |
+
// $new_title = str_replace('%sep%', htmlentities($psp_settings['separator']), $new_title);
|
988 |
+
$new_title = str_replace('%sep%', $psp_settings['separator'], $new_title);
|
989 |
+
//$new_title = str_replace('%term_description%', $term_description, $new_title);
|
990 |
+
$new_title = str_replace('%description%', $term_description, $new_title);
|
991 |
+
//$new_title = str_replace('%blog_title%', $this->sitename, $new_title);
|
992 |
+
//$new_title = str_replace('%blog_description%', $this->sitedescription, $new_title);
|
993 |
+
$new_title = str_replace('%site_name%', $this->sitename, $new_title);
|
994 |
+
$new_title = str_replace('%site_description%', $this->sitedescription, $new_title);
|
995 |
+
}
|
996 |
+
//$title = $this->paged_title($new_title);
|
997 |
+
$title = $this->psp_helper->paged_title($new_title);
|
998 |
+
$this->taxonomy_title = $title;
|
999 |
+
|
1000 |
+
|
1001 |
+
$sitename = $this->sitename;
|
1002 |
+
$sitedescription = $this->sitedescription;
|
1003 |
+
//$psp_title_separator = isset($psp_settings['separator']) ? htmlentities($psp_settings['separator']) : '';
|
1004 |
+
$psp_title_separator = isset($psp_settings['separator']) ? ($psp_settings['separator']) : '';
|
1005 |
+
|
1006 |
+
if ($psparr) {
|
1007 |
+
|
1008 |
+
$sitedescription = !empty($sitedescription) ? $sitedescription : '';
|
1009 |
+
$sitename = !empty($sitename) ? $sitename : '';
|
1010 |
+
$term_name = !empty($term_name) ? $term_name : '';
|
1011 |
+
$title = !empty($title) ? $title : '';
|
1012 |
+
$term_description = !empty($term_description) ? $term_description : '';
|
1013 |
+
$psp_title_separator = !empty($psp_title_separator) ? $psp_title_separator : '';
|
1014 |
+
|
1015 |
+
$psp_term_format_arr = array('site_name' => $sitename, 'site_description' => $sitedescription, 'description' => $term_description, 'wp_title' => $term_name, 'seo_title' => $title, 'sep' => $psp_title_separator);
|
1016 |
+
|
1017 |
+
return $psp_term_format_arr;
|
1018 |
+
|
1019 |
+
}
|
1020 |
+
$title = trim($title);
|
1021 |
+
$title = trim($title, $psp_title_separator);
|
1022 |
+
return $title;
|
1023 |
+
|
1024 |
+
} // end get_tax_psp_title
|
1025 |
+
|
1026 |
+
public function get_cat_seo_metas($canonical) {
|
1027 |
+
|
1028 |
+
$can_link = "";
|
1029 |
+
$term_link = "";
|
1030 |
+
$robots_meta_string = "";
|
1031 |
+
$desc_keyword_meta_string = "";
|
1032 |
+
$canonical_meta_string = "";
|
1033 |
+
$seo_meta_string = "";
|
1034 |
+
$term_meta = array();
|
1035 |
+
$prevnext_meta_string = "";
|
1036 |
+
$cat_id = "";
|
1037 |
+
$cat_name = "";
|
1038 |
+
$json_schema_string = "";
|
1039 |
+
$jsonld_script_tag = "";
|
1040 |
+
|
1041 |
+
if (!empty($this->psp_current_tax_format)){
|
1042 |
+
$current_tax_format = $this->psp_current_tax_format;
|
1043 |
+
} else {
|
1044 |
+
$current_tax_format_option = "psp_category_settings";
|
1045 |
+
$current_tax_format = get_option($current_tax_format_option);
|
1046 |
+
$this->psp_current_tax_format = $current_tax_format;
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
if (isset($this->psp_current_cat_obj) && !empty($this->psp_current_cat_obj)){
|
1050 |
+
$current_cat_obj = $this->psp_current_cat_obj;
|
1051 |
+
} else {
|
1052 |
+
$current_cat_obj = get_category(get_query_var('cat'));
|
1053 |
+
$this->psp_current_cat_obj = $current_cat_obj;
|
1054 |
+
}
|
1055 |
+
if ( is_object($current_cat_obj)) {
|
1056 |
+
$cat_id = isset($current_cat_obj->cat_ID) ? $current_cat_obj->cat_ID : '';
|
1057 |
+
$cat_name = isset($current_cat_obj->name) ? $current_cat_obj->name : '';
|
1058 |
+
}
|
1059 |
+
//$cat_ID = get_query_var('cat'); //move it to parent
|
1060 |
+
|
1061 |
+
if (empty($this->psp_cat_meta)) {
|
1062 |
+
|
1063 |
+
$term_meta_option_name = "psp_category_seo_metas_".$cat_id;
|
1064 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
1065 |
+
if (!empty($cat_id)) $term_meta = get_option( "psp_category_seo_metas_$cat_id");
|
1066 |
+
|
1067 |
+
$this->psp_cat_meta = $term_meta;
|
1068 |
+
} else {
|
1069 |
+
$term_meta = $this->psp_cat_meta;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
if (empty($this->term_social_meta)) {
|
1073 |
+
if (!empty($cat_id)) $this->term_social_meta = get_option( "psp_category_social_metas_$cat_id");
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
$robots_meta_string = $this->get_tax_robots_meta($term_meta);
|
1077 |
+
if (!is_paged()) {
|
1078 |
+
$desc_keyword_meta_string = $this->get_cat_description_meta($current_cat_obj, $term_meta);
|
1079 |
+
}
|
1080 |
+
if (!empty($desc_keyword_meta_string)) $desc_keyword_meta_string .= "\r\n";
|
1081 |
+
|
1082 |
+
if ( $canonical ) {
|
1083 |
+
$canonical_meta_string = $this->get_cat_canonical_meta($current_cat_obj, $term_meta);
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1087 |
+
|
1088 |
+
if (isset($term_meta['schema_string']) && !empty($term_meta['schema_string'])) {
|
1089 |
+
$json_schema_string = $term_meta['schema_string'];
|
1090 |
+
$json_schema_string = html_entity_decode(esc_html(stripcslashes($json_schema_string)));
|
1091 |
+
$schema_obj = json_decode($json_schema_string);
|
1092 |
+
if($schema_obj === null) {
|
1093 |
+
$json_schema_string = "";
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
if (!empty($json_schema_string)) {
|
1097 |
+
$jsonld_script_tag = '<scri'. 'pt type="application/ld+json">'. "\r\n". $json_schema_string . "\r\n". '</scri' . 'pt>';
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1101 |
+
if (!empty($jsonld_script_tag) && !is_paged() ) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1102 |
+
|
1103 |
+
return $seo_meta_string;
|
1104 |
+
|
1105 |
+
} // end get_cat_seo_metas;
|
1106 |
+
|
1107 |
+
public function get_tag_seo_metas($canonical) {
|
1108 |
+
|
1109 |
+
$can_link = "";
|
1110 |
+
$term_link = "";
|
1111 |
+
$robots_meta_string = "";
|
1112 |
+
$desc_keyword_meta_string = "";
|
1113 |
+
$canonical_meta_string = "";
|
1114 |
+
$seo_meta_string = "";
|
1115 |
+
$term_meta = array();
|
1116 |
+
$prevnext_meta_string = "";
|
1117 |
+
$term_id = "";
|
1118 |
+
$term_name = "";
|
1119 |
+
$json_schema_string = "";
|
1120 |
+
$jsonld_script_tag = "";
|
1121 |
+
|
1122 |
+
if (!empty($this->psp_current_tax_format)){
|
1123 |
+
$current_tax_format = $this->psp_current_tax_format;
|
1124 |
+
} else {
|
1125 |
+
$current_tax_format_option = "psp_tag_settings";
|
1126 |
+
$current_tax_format = get_option($current_tax_format_option);
|
1127 |
+
$this->psp_current_tax_format = $current_tax_format;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
if (isset($this->psp_current_tag_obj) && !empty($this->psp_current_tag_obj)){
|
1131 |
+
$current_tag_obj = $this->psp_current_tag_obj;
|
1132 |
+
} else {
|
1133 |
+
$current_tag_obj = get_term_by('slug',get_query_var('tag'),'post_tag');
|
1134 |
+
$this->psp_current_tag_obj = $current_tag_obj;
|
1135 |
+
}
|
1136 |
+
if ( is_object($current_tag_obj)) {
|
1137 |
+
$term_id = isset($current_tag_obj->term_id) ? $current_tag_obj->term_id : '';
|
1138 |
+
$term_name = isset($current_tag_obj->name) ? $current_tag_obj->name : '';
|
1139 |
+
}
|
1140 |
+
if (empty($this->psp_tag_meta)) {
|
1141 |
+
|
1142 |
+
$term_meta_option_name = "psp_taxonomy_seo_metas_".$term_id;
|
1143 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
1144 |
+
if (!empty($term_id)) $term_meta = get_option( "psp_taxonomy_seo_metas_$term_id");
|
1145 |
+
$this->psp_tag_meta = $term_meta;
|
1146 |
+
} else {
|
1147 |
+
$term_meta = $this->psp_tag_meta;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
if (empty($this->term_social_meta)) {
|
1151 |
+
if (!empty($term_id)) $this->term_social_meta = get_option( "psp_taxonomy_social_metas_$term_id");
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
$robots_meta_string = $this->get_tax_robots_meta($term_meta);
|
1155 |
+
if (!is_paged()) {
|
1156 |
+
$desc_keyword_meta_string = $this->get_tag_description_meta($current_tag_obj, $term_meta);
|
1157 |
+
}
|
1158 |
+
|
1159 |
+
if (!empty($desc_keyword_meta_string)) $desc_keyword_meta_string .= "\r\n";
|
1160 |
+
|
1161 |
+
if ( $canonical ) {
|
1162 |
+
$canonical_meta_string = $this->get_tag_canonical_meta($current_tag_obj, $term_meta);
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1166 |
+
|
1167 |
+
if (isset($term_meta['schema_string']) && !empty($term_meta['schema_string'])) {
|
1168 |
+
$json_schema_string = $term_meta['schema_string'];
|
1169 |
+
$json_schema_string = html_entity_decode(esc_html(stripcslashes($json_schema_string)));
|
1170 |
+
$schema_obj = json_decode($json_schema_string);
|
1171 |
+
if($schema_obj === null) {
|
1172 |
+
$json_schema_string = "";
|
1173 |
+
}
|
1174 |
+
}
|
1175 |
+
if (!empty($json_schema_string)) {
|
1176 |
+
$jsonld_script_tag = '<scri' . 'pt type="application/ld+json">'. "\r\n". $json_schema_string . "\r\n". '</scri' . 'pt>';
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1180 |
+
//if (!empty($jsonld_script_tag)) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1181 |
+
if (!empty($jsonld_script_tag) && !is_paged() ) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1182 |
+
|
1183 |
+
return $seo_meta_string;
|
1184 |
+
|
1185 |
+
|
1186 |
+
} // end get_tag_seo_metas;
|
1187 |
+
|
1188 |
+
public function get_tax_seo_metas($canonical) {
|
1189 |
+
|
1190 |
+
$can_link = "";
|
1191 |
+
$term_link = "";
|
1192 |
+
$robots_meta_string = "";
|
1193 |
+
$desc_keyword_meta_string = "";
|
1194 |
+
$canonical_meta_string = "";
|
1195 |
+
$seo_meta_string = "";
|
1196 |
+
$term_meta = array();
|
1197 |
+
$prevnext_meta_string = "";
|
1198 |
+
$json_schema_string = "";
|
1199 |
+
$jsonld_script_tag = "";
|
1200 |
+
|
1201 |
+
$current_tax_object = get_taxonomy( get_query_var( 'taxonomy' ));
|
1202 |
+
$tax_name = $current_tax_object->labels->name;
|
1203 |
+
|
1204 |
+
if (!empty($this->psp_current_tax_format)){
|
1205 |
+
$current_tax_format = $this->psp_current_tax_format;
|
1206 |
+
} else {
|
1207 |
+
|
1208 |
+
$tax_slug = get_query_var( 'taxonomy' );
|
1209 |
+
$current_tax_format_option = "psp_". $tax_slug. "_settings";
|
1210 |
+
$current_tax_format = get_option($current_tax_format_option);
|
1211 |
+
$this->psp_current_tax_format = $current_tax_format;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
//$curr_term = get_query_var('term');
|
1215 |
+
if (isset($this->psp_current_term_obj) && !empty($this->psp_current_term_obj)){
|
1216 |
+
$term_object = $this->psp_current_term_obj;
|
1217 |
+
} else {
|
1218 |
+
$term_object = get_term_by( 'slug', get_query_var('term'), get_query_var( 'taxonomy' ) );
|
1219 |
+
$this->psp_current_term_obj = $term_object;
|
1220 |
+
}
|
1221 |
+
if ( is_object($term_object)) {
|
1222 |
+
$term_id = isset($term_object->term_id) ? $term_object->term_id : '';
|
1223 |
+
$term_name = isset($term_object->name) ? $term_object->name : '';
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
if (empty($this->psp_term_meta)) {
|
1227 |
+
|
1228 |
+
$term_meta_option_name = "psp_taxonomy_seo_metas_".$term_id;
|
1229 |
+
//$term_meta = get_option("$cat_name_$cat_id_metas");
|
1230 |
+
if (!empty($term_id)) $term_meta = get_option( "psp_taxonomy_seo_metas_$term_id");
|
1231 |
+
$this->psp_term_meta = $term_meta;
|
1232 |
+
|
1233 |
+
} else {
|
1234 |
+
$term_meta = $this->psp_term_meta;
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
if (empty($this->term_social_meta)) {
|
1238 |
+
if (!empty($term_id)) $this->term_social_meta = get_option( "psp_taxonomy_social_metas_$term_id");
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
$robots_meta_string = $this->get_tax_robots_meta($term_meta);
|
1242 |
+
if (!is_paged()) {
|
1243 |
+
$desc_keyword_meta_string = $this->get_tax_description_meta($term_object, $term_meta, $tax_name);
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
if (!empty($desc_keyword_meta_string)) $desc_keyword_meta_string .= "\r\n";
|
1247 |
+
|
1248 |
+
if ( $canonical ) {
|
1249 |
+
$canonical_meta_string = $this->get_tax_canonical_meta($term_object, $term_meta);
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
$prevnext_meta_string = $this->psp_helper->get_prev_next_links();
|
1253 |
+
|
1254 |
+
if (isset($term_meta['schema_string']) && !empty($term_meta['schema_string'])) {
|
1255 |
+
$json_schema_string = $term_meta['schema_string'];
|
1256 |
+
$json_schema_string = html_entity_decode(esc_html(stripcslashes($json_schema_string)));
|
1257 |
+
$schema_obj = json_decode($json_schema_string);
|
1258 |
+
if($schema_obj === null) {
|
1259 |
+
$json_schema_string = "";
|
1260 |
+
}
|
1261 |
+
}
|
1262 |
+
if (!empty($json_schema_string)) {
|
1263 |
+
$jsonld_script_tag = '<scri' . 'pt type="application/ld+json">'. "\r\n". $json_schema_string . "\r\n".'</scri' . 'pt>';
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
$seo_meta_string = $desc_keyword_meta_string.$robots_meta_string.$canonical_meta_string.$prevnext_meta_string;
|
1267 |
+
//if (!empty($jsonld_script_tag)) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1268 |
+
if (!empty($jsonld_script_tag) && !is_paged() ) $seo_meta_string = $seo_meta_string.$jsonld_script_tag;
|
1269 |
+
|
1270 |
+
return $seo_meta_string;
|
1271 |
+
|
1272 |
+
} // end get_tax_seo_metas;
|
1273 |
+
|
1274 |
+
|
1275 |
+
}
|
1276 |
+
?>
|
psp-include/settings/css/jquery-ui-classic.css
ADDED
@@ -0,0 +1,575 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.16
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming/API
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Layout helpers
|
12 |
+
----------------------------------*/
|
13 |
+
.ui-helper-hidden { display: none; }
|
14 |
+
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
17 |
+
.ui-helper-clearfix { display: inline-block; }
|
18 |
+
/* required comment for clearfix to work in Opera \*/
|
19 |
+
* html .ui-helper-clearfix { height:1%; }
|
20 |
+
.ui-helper-clearfix { display:block; }
|
21 |
+
/* end clearfix */
|
22 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
23 |
+
|
24 |
+
|
25 |
+
/* Interaction Cues
|
26 |
+
----------------------------------*/
|
27 |
+
.ui-state-disabled { cursor: default !important; }
|
28 |
+
|
29 |
+
|
30 |
+
/* Icons
|
31 |
+
----------------------------------*/
|
32 |
+
|
33 |
+
/* states and images */
|
34 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
35 |
+
|
36 |
+
|
37 |
+
/* Misc visuals
|
38 |
+
----------------------------------*/
|
39 |
+
|
40 |
+
/* Overlays */
|
41 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
42 |
+
|
43 |
+
|
44 |
+
/*
|
45 |
+
* jQuery UI CSS Framework 1.8.16
|
46 |
+
*
|
47 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
48 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
49 |
+
* http://jquery.org/license
|
50 |
+
*
|
51 |
+
* http://docs.jquery.com/UI/Theming/API
|
52 |
+
*
|
53 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=sans-serif&fwDefault=normal&fsDefault=12px&cornerRadius=3px&bgColorHeader=eff8ff&bgTextureHeader=04_highlight_hard.png&bgImgOpacityHeader=75&borderColorHeader=d1e5ee&fcHeader=333333&iconColorHeader=21759b&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=d1e5ee&fcContent=333333&iconColorContent=333333&bgColorDefault=eff8ff&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=d1e5ee&fcDefault=333333&iconColorDefault=333333&bgColorHover=f7fcfe&bgTextureHover=06_inset_hard.png&bgImgOpacityHover=75&borderColorHover=b8d7e5&fcHover=000000&iconColorHover=333333&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=d1e5ee&fcActive=333333&iconColorActive=333333&bgColorHighlight=ffffe0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=e6db55&fcHighlight=333333&iconColorHighlight=21759b&bgColorError=ffebe8&bgTextureError=01_flat.png&bgImgOpacityError=95&borderColorError=cc0000&fcError=cc0000&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=3px
|
54 |
+
*/
|
55 |
+
|
56 |
+
|
57 |
+
/* Component containers
|
58 |
+
----------------------------------*/
|
59 |
+
.ui-widget { font-family: sans-serif; font-size: 12px; }
|
60 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
61 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
|
62 |
+
.ui-widget-content { border: 1px solid #d1e5ee; background: #ffffff; color: #333333; }
|
63 |
+
.ui-widget-header { border: 1px solid #d1e5ee; background-color: #f5fafd; background-image: -ms-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -moz-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -o-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -webkit-gradient(linear, left top, left bottom, from(#f7fcfe), to(#eff8ff)); background-image: -webkit-linear-gradient(top, #f7fcfe, #eff8ff); background-image: linear-gradient(top, #f7fcfe, #eff8ff); color: #333333; font-weight: bold; }
|
64 |
+
.ui-widget-header a { color: #333333; }
|
65 |
+
|
66 |
+
/* Interaction states
|
67 |
+
----------------------------------*/
|
68 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d1e5ee; background-color: #f5fafd; background-image: -ms-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -moz-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -o-linear-gradient(top, #f7fcfe, #eff8ff); background-image: -webkit-gradient(linear, left top, left bottom, from(#f7fcfe), to(#eff8ff)); background-image: -webkit-linear-gradient(top, #f7fcfe, #eff8ff); background-image: linear-gradient(top, #f7fcfe, #eff8ff); font-weight: normal; color: #333333; }
|
69 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #333333; text-decoration: none; }
|
70 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #b8d7e5; background-color: #f7fcfe; background-image: -ms-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -moz-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -o-linear-gradient(top, #eff8ff, #f7fcfe); background-image: -webkit-gradient(linear, left top, left bottom, from(#eff8ff), to(#f7fcfe)); background-image: -webkit-linear-gradient(top, #eff8ff, #f7fcfe); background-image: linear-gradient(top, #eff8ff, #f7fcfe);; font-weight: normal; color: #000000; }
|
71 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #000000; text-decoration: none; }
|
72 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #d1e5ee; background: #ffffff; font-weight: normal; color: #333333; }
|
73 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #333333; text-decoration: none; }
|
74 |
+
.ui-widget :active { outline: none; }
|
75 |
+
|
76 |
+
/* Interaction Cues
|
77 |
+
----------------------------------*/
|
78 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #e6db55; background: #ffffe0; color: #333333; }
|
79 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; }
|
80 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cc0000; background: #ffebe8; color: #cc0000; }
|
81 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cc0000; }
|
82 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cc0000; }
|
83 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
84 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
85 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
86 |
+
|
87 |
+
/* Icons
|
88 |
+
----------------------------------*/
|
89 |
+
|
90 |
+
/* states and images */
|
91 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_333333_256x240.png); }
|
92 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
93 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_999999_256x240.png); }
|
94 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_333333_256x240.png); }
|
95 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
96 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
97 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_21759b_256x240.png); }
|
98 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); }
|
99 |
+
|
100 |
+
/* positioning */
|
101 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
102 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
103 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
104 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
105 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
106 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
107 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
108 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
109 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
110 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
111 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
112 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
113 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
114 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
115 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
116 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
117 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
118 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
119 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
120 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
121 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
122 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
123 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
124 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
125 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
126 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
127 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
128 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
129 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
130 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
131 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
132 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
133 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
134 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
135 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
136 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
137 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
138 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
139 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
140 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
141 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
142 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
143 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
144 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
145 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
146 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
147 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
148 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
149 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
150 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
151 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
152 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
153 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
154 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
155 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
156 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
157 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
158 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
159 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
160 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
161 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
162 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
163 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
164 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
165 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
166 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
167 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
168 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
169 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
170 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
171 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
172 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
173 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
174 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
175 |
+
.ui-icon-document { background-position: -32px -96px; }
|
176 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
177 |
+
.ui-icon-note { background-position: -64px -96px; }
|
178 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
179 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
180 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
181 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
182 |
+
.ui-icon-person { background-position: -144px -96px; }
|
183 |
+
.ui-icon-print { background-position: -160px -96px; }
|
184 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
185 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
186 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
187 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
188 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
189 |
+
.ui-icon-home { background-position: 0 -112px; }
|
190 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
191 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
192 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
193 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
194 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
195 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
196 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
197 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
198 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
199 |
+
.ui-icon-search { background-position: -160px -112px; }
|
200 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
201 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
202 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
203 |
+
.ui-icon-star { background-position: -224px -112px; }
|
204 |
+
.ui-icon-link { background-position: -240px -112px; }
|
205 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
206 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
207 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
208 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
209 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
210 |
+
.ui-icon-close { background-position: -80px -128px; }
|
211 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
212 |
+
.ui-icon-key { background-position: -112px -128px; }
|
213 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
214 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
215 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
216 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
217 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
218 |
+
.ui-icon-image { background-position: -208px -128px; }
|
219 |
+
.ui-icon-video { background-position: -224px -128px; }
|
220 |
+
.ui-icon-script { background-position: -240px -128px; }
|
221 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
222 |
+
.ui-icon-info { background-position: -16px -144px; }
|
223 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
224 |
+
.ui-icon-help { background-position: -48px -144px; }
|
225 |
+
.ui-icon-check { background-position: -64px -144px; }
|
226 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
227 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
228 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
229 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
230 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
231 |
+
.ui-icon-play { background-position: 0 -160px; }
|
232 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
233 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
234 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
235 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
236 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
237 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
238 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
239 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
240 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
241 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
242 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
243 |
+
.ui-icon-power { background-position: 0 -176px; }
|
244 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
245 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
246 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
247 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
248 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
249 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
250 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
251 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
252 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
253 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
254 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
255 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
256 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
257 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
258 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
259 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
260 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
261 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
262 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
263 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
264 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
265 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
266 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
267 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
268 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
269 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
270 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
271 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
272 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
273 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
274 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
275 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
276 |
+
|
277 |
+
|
278 |
+
/* Misc visuals
|
279 |
+
----------------------------------*/
|
280 |
+
|
281 |
+
/* Corner radius */
|
282 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
283 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
284 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
285 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; -khtml-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
286 |
+
|
287 |
+
/* Overlays */
|
288 |
+
.ui-widget-overlay { background: #000000; opacity: .6;filter:Alpha(Opacity=60); }
|
289 |
+
.ui-widget-shadow { box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); }/*
|
290 |
+
* jQuery UI Resizable 1.8.16
|
291 |
+
*
|
292 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
293 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
294 |
+
* http://jquery.org/license
|
295 |
+
*
|
296 |
+
* http://docs.jquery.com/UI/Resizable#theming
|
297 |
+
*/
|
298 |
+
.ui-resizable { position: relative;}
|
299 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
|
300 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
301 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
302 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
303 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
304 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
305 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
306 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
307 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
308 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
309 |
+
* jQuery UI Selectable 1.8.16
|
310 |
+
*
|
311 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
312 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
313 |
+
* http://jquery.org/license
|
314 |
+
*
|
315 |
+
* http://docs.jquery.com/UI/Selectable#theming
|
316 |
+
*/
|
317 |
+
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
318 |
+
/*
|
319 |
+
* jQuery UI Accordion 1.8.16
|
320 |
+
*
|
321 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
322 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
323 |
+
* http://jquery.org/license
|
324 |
+
*
|
325 |
+
* http://docs.jquery.com/UI/Accordion#theming
|
326 |
+
*/
|
327 |
+
/* IE/Win - Fix animation bug - #4615 */
|
328 |
+
.ui-accordion { width: 100%; }
|
329 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
330 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
331 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
332 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
333 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
334 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
335 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
336 |
+
.ui-accordion .ui-accordion-content-active { display: block; }
|
337 |
+
/*
|
338 |
+
* jQuery UI Autocomplete 1.8.16
|
339 |
+
*
|
340 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
341 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
342 |
+
* http://jquery.org/license
|
343 |
+
*
|
344 |
+
* http://docs.jquery.com/UI/Autocomplete#theming
|
345 |
+
*/
|
346 |
+
.ui-autocomplete { position: absolute; cursor: default; }
|
347 |
+
|
348 |
+
/* workarounds */
|
349 |
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
350 |
+
|
351 |
+
/*
|
352 |
+
* jQuery UI Menu 1.8.16
|
353 |
+
*
|
354 |
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
355 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
356 |
+
* http://jquery.org/license
|
357 |
+
*
|
358 |
+
* http://docs.jquery.com/UI/Menu#theming
|
359 |
+
*/
|
360 |
+
.ui-menu {
|
361 |
+
list-style:none;
|
362 |
+
padding: 2px;
|
363 |
+
margin: 0;
|
364 |
+
display:block;
|
365 |
+
float: left;
|
366 |
+
}
|
367 |
+
.ui-menu .ui-menu {
|
368 |
+
margin-top: -3px;
|
369 |
+
}
|
370 |
+
.ui-menu .ui-menu-item {
|
371 |
+
margin:0;
|
372 |
+
padding: 0;
|
373 |
+
zoom: 1;
|
374 |
+
float: left;
|
375 |
+
clear: left;
|
376 |
+
width: 100%;
|
377 |
+
}
|
378 |
+
.ui-menu .ui-menu-item a {
|
379 |
+
text-decoration:none;
|
380 |
+
display:block;
|
381 |
+
padding:.2em .4em;
|
382 |
+
line-height:1.5;
|
383 |
+
zoom:1;
|
384 |
+
}
|
385 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
386 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
387 |
+
font-weight: normal;
|
388 |
+
margin: -1px;
|
389 |
+
}
|
390 |
+
/*
|
391 |
+
* jQuery UI Button 1.8.16
|
392 |
+
*
|
393 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
394 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
395 |
+
* http://jquery.org/license
|
396 |
+
*
|
397 |
+
* http://docs.jquery.com/UI/Button#theming
|
398 |
+
*/
|
399 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
400 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
401 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
402 |
+
.ui-button-icons-only { width: 3.4em; }
|
403 |
+
button.ui-button-icons-only { width: 3.7em; }
|
404 |
+
|
405 |
+
/*button text element */
|
406 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
407 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
408 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
409 |
+
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
410 |
+
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
411 |
+
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
412 |
+
/* no icon support for input elements, provide padding by default */
|
413 |
+
input.ui-button { padding: .4em 1em; }
|
414 |
+
|
415 |
+
/*button icon element(s) */
|
416 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
417 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
418 |
+
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
419 |
+
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
420 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
421 |
+
|
422 |
+
/*button sets*/
|
423 |
+
.ui-buttonset { margin-right: 7px; }
|
424 |
+
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
425 |
+
|
426 |
+
/* workarounds */
|
427 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
428 |
+
/*
|
429 |
+
* jQuery UI Dialog 1.8.16
|
430 |
+
*
|
431 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
432 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
433 |
+
* http://jquery.org/license
|
434 |
+
*
|
435 |
+
* http://docs.jquery.com/UI/Dialog#theming
|
436 |
+
*/
|
437 |
+
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
438 |
+
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
439 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
440 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
441 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
442 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
443 |
+
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
444 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
445 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
446 |
+
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
447 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
448 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
449 |
+
/*
|
450 |
+
* jQuery UI Slider 1.8.16
|
451 |
+
*
|
452 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
453 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
454 |
+
* http://jquery.org/license
|
455 |
+
*
|
456 |
+
* http://docs.jquery.com/UI/Slider#theming
|
457 |
+
*/
|
458 |
+
.ui-slider { position: relative; text-align: left; }
|
459 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
460 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
461 |
+
|
462 |
+
.ui-slider-horizontal { height: .8em; }
|
463 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
464 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
465 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
466 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
467 |
+
|
468 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
469 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
470 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
471 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
472 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
473 |
+
* jQuery UI Tabs 1.8.16
|
474 |
+
*
|
475 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
476 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
477 |
+
* http://jquery.org/license
|
478 |
+
*
|
479 |
+
* http://docs.jquery.com/UI/Tabs#theming
|
480 |
+
*/
|
481 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
482 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
483 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
484 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
485 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
486 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
487 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
488 |
+
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
489 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
490 |
+
/*
|
491 |
+
* jQuery UI Datepicker 1.8.16
|
492 |
+
*
|
493 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
494 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
495 |
+
* http://jquery.org/license
|
496 |
+
*
|
497 |
+
* http://docs.jquery.com/UI/Datepicker#theming
|
498 |
+
*/
|
499 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
500 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
501 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
502 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
503 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
504 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
505 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
506 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
507 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
508 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
509 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
510 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
511 |
+
.ui-datepicker select.ui-datepicker-month,
|
512 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
513 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
514 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
515 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
516 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
517 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
518 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
519 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
520 |
+
|
521 |
+
/* with multiple calendars */
|
522 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
523 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
524 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
525 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
526 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
527 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
528 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
529 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
530 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
531 |
+
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
532 |
+
|
533 |
+
/* RTL support */
|
534 |
+
.ui-datepicker-rtl { direction: rtl; }
|
535 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
536 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
537 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
538 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
539 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
540 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
541 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
542 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
543 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
544 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
545 |
+
|
546 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
547 |
+
.ui-datepicker-cover {
|
548 |
+
display: none; /*sorry for IE5*/
|
549 |
+
display/**/: block; /*sorry for IE5*/
|
550 |
+
position: absolute; /*must have*/
|
551 |
+
z-index: -1; /*must have*/
|
552 |
+
filter: mask(); /*must have*/
|
553 |
+
top: -4px; /*must have*/
|
554 |
+
left: -4px; /*must have*/
|
555 |
+
width: 200px; /*must have*/
|
556 |
+
height: 200px; /*must have*/
|
557 |
+
}/*
|
558 |
+
* jQuery UI Progressbar 1.8.16
|
559 |
+
*
|
560 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
561 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
562 |
+
* http://jquery.org/license
|
563 |
+
*
|
564 |
+
* http://docs.jquery.com/UI/Progressbar#theming
|
565 |
+
*/
|
566 |
+
.ui-progressbar { height:2em; text-align: left; }
|
567 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
568 |
+
.ui-progressbar .ui-widget-header {
|
569 |
+
background-color: #83B4D8;
|
570 |
+
background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
571 |
+
background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
572 |
+
background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
573 |
+
background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
574 |
+
background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
575 |
+
}
|
psp-include/settings/css/jquery-ui-demo.css
ADDED
@@ -0,0 +1,5 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
|
2 |
+
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
|
3 |
+
ul#icons {margin: 0; padding: 0;}
|
4 |
+
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
|
5 |
+
ul#icons span.ui-icon {float: left; margin: 0 4px;}
|
psp-include/settings/css/jquery-ui-fresh.css
ADDED
@@ -0,0 +1,575 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.16
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming/API
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Layout helpers
|
12 |
+
----------------------------------*/
|
13 |
+
.ui-helper-hidden { display: none; }
|
14 |
+
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
17 |
+
.ui-helper-clearfix { display: inline-block; }
|
18 |
+
/* required comment for clearfix to work in Opera \*/
|
19 |
+
* html .ui-helper-clearfix { height:1%; }
|
20 |
+
.ui-helper-clearfix { display:block; }
|
21 |
+
/* end clearfix */
|
22 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
23 |
+
|
24 |
+
|
25 |
+
/* Interaction Cues
|
26 |
+
----------------------------------*/
|
27 |
+
.ui-state-disabled { cursor: default !important; }
|
28 |
+
|
29 |
+
|
30 |
+
/* Icons
|
31 |
+
----------------------------------*/
|
32 |
+
|
33 |
+
/* states and images */
|
34 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
35 |
+
|
36 |
+
|
37 |
+
/* Misc visuals
|
38 |
+
----------------------------------*/
|
39 |
+
|
40 |
+
/* Overlays */
|
41 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
42 |
+
|
43 |
+
|
44 |
+
/*
|
45 |
+
* jQuery UI CSS Framework 1.8.16
|
46 |
+
*
|
47 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
48 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
49 |
+
* http://jquery.org/license
|
50 |
+
*
|
51 |
+
* http://docs.jquery.com/UI/Theming/API
|
52 |
+
*
|
53 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=sans-serif&fwDefault=normal&fsDefault=12px&cornerRadius=4px&bgColorHeader=ececec&bgTextureHeader=04_highlight_hard.png&bgImgOpacityHeader=75&borderColorHeader=dfdfdf&fcHeader=333333&iconColorHeader=999999&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=dfdfdf&fcContent=333333&iconColorContent=333333&bgColorDefault=ececec&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=75&borderColorDefault=dfdfdf&fcDefault=333333&iconColorDefault=333333&bgColorHover=ececec&bgTextureHover=06_inset_hard.png&bgImgOpacityHover=75&borderColorHover=ccc&fcHover=000000&iconColorHover=333333&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=dfdfdf&fcActive=333333&iconColorActive=333333&bgColorHighlight=ffffe0&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=e6db55&fcHighlight=333333&iconColorHighlight=21759b&bgColorError=ffebe8&bgTextureError=01_flat.png&bgImgOpacityError=95&borderColorError=cc0000&fcError=cc0000&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=3px
|
54 |
+
*/
|
55 |
+
|
56 |
+
|
57 |
+
/* Component containers
|
58 |
+
----------------------------------*/
|
59 |
+
.ui-widget { font-family: sans-serif; font-size: 12px; }
|
60 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
61 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: sans-serif; font-size: 1em; }
|
62 |
+
.ui-widget-content { border: 1px solid #dfdfdf; background: #ffffff; color: #333333; }
|
63 |
+
.ui-widget-header { border: 1px solid #dfdfdf; color: #333333; font-weight: bold; background-color: #f1f1f1; background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); background-image: -o-linear-gradient(top, #f9f9f9, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); background-image: linear-gradient(top, #f9f9f9, #ececec); }
|
64 |
+
.ui-widget-header a { color: #333333; }
|
65 |
+
|
66 |
+
/* Interaction states
|
67 |
+
----------------------------------*/
|
68 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #dfdfdf; background-color: #f1f1f1; background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); background-image: -o-linear-gradient(top, #f9f9f9, #ececec); background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec); background-image: linear-gradient(top, #f9f9f9, #ececec); font-weight: normal; color: #333333; }
|
69 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #333333; text-decoration: none; }
|
70 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #ccc; background-color: #ececec; background-image: -ms-linear-gradient(top, #ececec, #f9f9f9); background-image: -moz-linear-gradient(top, #ececec, #f9f9f9); background-image: -o-linear-gradient(top, #ececec, #f9f9f9); background-image: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#f9f9f9)); background-image: -webkit-linear-gradient(top, #ececec, #f9f9f9); background-image: linear-gradient(top, #ececec, #f9f9f9); font-weight: normal; color: #000000; }
|
71 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #000000; text-decoration: none; }
|
72 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dfdfdf; background: #ffffff; font-weight: normal; color: #333333; }
|
73 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #333333; text-decoration: none; }
|
74 |
+
.ui-widget :active { outline: none; }
|
75 |
+
|
76 |
+
/* Interaction Cues
|
77 |
+
----------------------------------*/
|
78 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #e6db55; background: #ffffe0; color: #333333; }
|
79 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #333333; }
|
80 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cc0000; background: #ffebe8; color: #cc0000; }
|
81 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cc0000; }
|
82 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cc0000; }
|
83 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
84 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
85 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
86 |
+
|
87 |
+
/* Icons
|
88 |
+
----------------------------------*/
|
89 |
+
|
90 |
+
/* states and images */
|
91 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_333333_256x240.png); }
|
92 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
93 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_999999_256x240.png); }
|
94 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_333333_256x240.png); }
|
95 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
96 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); }
|
97 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_21759b_256x240.png); }
|
98 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); }
|
99 |
+
|
100 |
+
/* positioning */
|
101 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
102 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
103 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
104 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
105 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
106 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
107 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
108 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
109 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
110 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
111 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
112 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
113 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
114 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
115 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
116 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
117 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
118 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
119 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
120 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
121 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
122 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
123 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
124 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
125 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
126 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
127 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
128 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
129 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
130 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
131 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
132 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
133 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
134 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
135 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
136 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
137 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
138 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
139 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
140 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
141 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
142 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
143 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
144 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
145 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
146 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
147 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
148 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
149 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
150 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
151 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
152 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
153 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
154 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
155 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
156 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
157 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
158 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
159 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
160 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
161 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
162 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
163 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
164 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
165 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
166 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
167 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
168 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
169 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
170 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
171 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
172 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
173 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
174 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
175 |
+
.ui-icon-document { background-position: -32px -96px; }
|
176 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
177 |
+
.ui-icon-note { background-position: -64px -96px; }
|
178 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
179 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
180 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
181 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
182 |
+
.ui-icon-person { background-position: -144px -96px; }
|
183 |
+
.ui-icon-print { background-position: -160px -96px; }
|
184 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
185 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
186 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
187 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
188 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
189 |
+
.ui-icon-home { background-position: 0 -112px; }
|
190 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
191 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
192 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
193 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
194 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
195 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
196 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
197 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
198 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
199 |
+
.ui-icon-search { background-position: -160px -112px; }
|
200 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
201 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
202 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
203 |
+
.ui-icon-star { background-position: -224px -112px; }
|
204 |
+
.ui-icon-link { background-position: -240px -112px; }
|
205 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
206 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
207 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
208 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
209 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
210 |
+
.ui-icon-close { background-position: -80px -128px; }
|
211 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
212 |
+
.ui-icon-key { background-position: -112px -128px; }
|
213 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
214 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
215 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
216 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
217 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
218 |
+
.ui-icon-image { background-position: -208px -128px; }
|
219 |
+
.ui-icon-video { background-position: -224px -128px; }
|
220 |
+
.ui-icon-script { background-position: -240px -128px; }
|
221 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
222 |
+
.ui-icon-info { background-position: -16px -144px; }
|
223 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
224 |
+
.ui-icon-help { background-position: -48px -144px; }
|
225 |
+
.ui-icon-check { background-position: -64px -144px; }
|
226 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
227 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
228 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
229 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
230 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
231 |
+
.ui-icon-play { background-position: 0 -160px; }
|
232 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
233 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
234 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
235 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
236 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
237 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
238 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
239 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
240 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
241 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
242 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
243 |
+
.ui-icon-power { background-position: 0 -176px; }
|
244 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
245 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
246 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
247 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
248 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
249 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
250 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
251 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
252 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
253 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
254 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
255 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
256 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
257 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
258 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
259 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
260 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
261 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
262 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
263 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
264 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
265 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
266 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
267 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
268 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
269 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
270 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
271 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
272 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
273 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
274 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
275 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
276 |
+
|
277 |
+
|
278 |
+
/* Misc visuals
|
279 |
+
----------------------------------*/
|
280 |
+
|
281 |
+
/* Corner radius */
|
282 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
283 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
|
284 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
|
285 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
|
286 |
+
|
287 |
+
/* Overlays */
|
288 |
+
.ui-widget-overlay { background: #000000; opacity: .6;filter:Alpha(Opacity=60); }
|
289 |
+
.ui-widget-shadow { box-shadow: 0 0 16px rgba(0, 0, 0, 0.3); }/*
|
290 |
+
* jQuery UI Resizable 1.8.16
|
291 |
+
*
|
292 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
293 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
294 |
+
* http://jquery.org/license
|
295 |
+
*
|
296 |
+
* http://docs.jquery.com/UI/Resizable#theming
|
297 |
+
*/
|
298 |
+
.ui-resizable { position: relative;}
|
299 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
|
300 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
301 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
302 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
303 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
304 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
305 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
306 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
307 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
308 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
309 |
+
* jQuery UI Selectable 1.8.16
|
310 |
+
*
|
311 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
312 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
313 |
+
* http://jquery.org/license
|
314 |
+
*
|
315 |
+
* http://docs.jquery.com/UI/Selectable#theming
|
316 |
+
*/
|
317 |
+
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
318 |
+
/*
|
319 |
+
* jQuery UI Accordion 1.8.16
|
320 |
+
*
|
321 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
322 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
323 |
+
* http://jquery.org/license
|
324 |
+
*
|
325 |
+
* http://docs.jquery.com/UI/Accordion#theming
|
326 |
+
*/
|
327 |
+
/* IE/Win - Fix animation bug - #4615 */
|
328 |
+
.ui-accordion { width: 100%; }
|
329 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
330 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
331 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
332 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
333 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
334 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
335 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
336 |
+
.ui-accordion .ui-accordion-content-active { display: block; }
|
337 |
+
/*
|
338 |
+
* jQuery UI Autocomplete 1.8.16
|
339 |
+
*
|
340 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
341 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
342 |
+
* http://jquery.org/license
|
343 |
+
*
|
344 |
+
* http://docs.jquery.com/UI/Autocomplete#theming
|
345 |
+
*/
|
346 |
+
.ui-autocomplete { position: absolute; cursor: default; }
|
347 |
+
|
348 |
+
/* workarounds */
|
349 |
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
350 |
+
|
351 |
+
/*
|
352 |
+
* jQuery UI Menu 1.8.16
|
353 |
+
*
|
354 |
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
355 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
356 |
+
* http://jquery.org/license
|
357 |
+
*
|
358 |
+
* http://docs.jquery.com/UI/Menu#theming
|
359 |
+
*/
|
360 |
+
.ui-menu {
|
361 |
+
list-style:none;
|
362 |
+
padding: 2px;
|
363 |
+
margin: 0;
|
364 |
+
display:block;
|
365 |
+
float: left;
|
366 |
+
}
|
367 |
+
.ui-menu .ui-menu {
|
368 |
+
margin-top: -3px;
|
369 |
+
}
|
370 |
+
.ui-menu .ui-menu-item {
|
371 |
+
margin:0;
|
372 |
+
padding: 0;
|
373 |
+
zoom: 1;
|
374 |
+
float: left;
|
375 |
+
clear: left;
|
376 |
+
width: 100%;
|
377 |
+
}
|
378 |
+
.ui-menu .ui-menu-item a {
|
379 |
+
text-decoration:none;
|
380 |
+
display:block;
|
381 |
+
padding:.2em .4em;
|
382 |
+
line-height:1.5;
|
383 |
+
zoom:1;
|
384 |
+
}
|
385 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
386 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
387 |
+
font-weight: normal;
|
388 |
+
margin: -1px;
|
389 |
+
}
|
390 |
+
/*
|
391 |
+
* jQuery UI Button 1.8.16
|
392 |
+
*
|
393 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
394 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
395 |
+
* http://jquery.org/license
|
396 |
+
*
|
397 |
+
* http://docs.jquery.com/UI/Button#theming
|
398 |
+
*/
|
399 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
400 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
401 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
402 |
+
.ui-button-icons-only { width: 3.4em; }
|
403 |
+
button.ui-button-icons-only { width: 3.7em; }
|
404 |
+
|
405 |
+
/*button text element */
|
406 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
407 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
408 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
409 |
+
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
410 |
+
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
411 |
+
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
412 |
+
/* no icon support for input elements, provide padding by default */
|
413 |
+
input.ui-button { padding: .4em 1em; }
|
414 |
+
|
415 |
+
/*button icon element(s) */
|
416 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
417 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
418 |
+
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
419 |
+
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
420 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
421 |
+
|
422 |
+
/*button sets*/
|
423 |
+
.ui-buttonset { margin-right: 7px; }
|
424 |
+
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
425 |
+
|
426 |
+
/* workarounds */
|
427 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
428 |
+
/*
|
429 |
+
* jQuery UI Dialog 1.8.16
|
430 |
+
*
|
431 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
432 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
433 |
+
* http://jquery.org/license
|
434 |
+
*
|
435 |
+
* http://docs.jquery.com/UI/Dialog#theming
|
436 |
+
*/
|
437 |
+
.ui-dialog { position: fixed; padding: .2em; width: 300px; overflow: hidden; }
|
438 |
+
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
439 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
440 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
441 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
442 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
443 |
+
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
444 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
445 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
446 |
+
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
447 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
448 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
449 |
+
/*
|
450 |
+
* jQuery UI Slider 1.8.16
|
451 |
+
*
|
452 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
453 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
454 |
+
* http://jquery.org/license
|
455 |
+
*
|
456 |
+
* http://docs.jquery.com/UI/Slider#theming
|
457 |
+
*/
|
458 |
+
.ui-slider { position: relative; text-align: left; }
|
459 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
460 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
461 |
+
|
462 |
+
.ui-slider-horizontal { height: .8em; }
|
463 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
464 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
465 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
466 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
467 |
+
|
468 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
469 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
470 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
471 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
472 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
473 |
+
* jQuery UI Tabs 1.8.16
|
474 |
+
*
|
475 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
476 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
477 |
+
* http://jquery.org/license
|
478 |
+
*
|
479 |
+
* http://docs.jquery.com/UI/Tabs#theming
|
480 |
+
*/
|
481 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
482 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
483 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
484 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
485 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
486 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
487 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
488 |
+
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
489 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
490 |
+
/*
|
491 |
+
* jQuery UI Datepicker 1.8.16
|
492 |
+
*
|
493 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
494 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
495 |
+
* http://jquery.org/license
|
496 |
+
*
|
497 |
+
* http://docs.jquery.com/UI/Datepicker#theming
|
498 |
+
*/
|
499 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
500 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
501 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
502 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
503 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
504 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
505 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
506 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
507 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
508 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
509 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
510 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
511 |
+
.ui-datepicker select.ui-datepicker-month,
|
512 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
513 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
514 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
515 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
516 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
517 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
518 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
519 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
520 |
+
|
521 |
+
/* with multiple calendars */
|
522 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
523 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
524 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
525 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
526 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
527 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
528 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
529 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
530 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
531 |
+
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
532 |
+
|
533 |
+
/* RTL support */
|
534 |
+
.ui-datepicker-rtl { direction: rtl; }
|
535 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
536 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
537 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
538 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
539 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
540 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
541 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
542 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
543 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
544 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
545 |
+
|
546 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
547 |
+
.ui-datepicker-cover {
|
548 |
+
display: none; /*sorry for IE5*/
|
549 |
+
display/**/: block; /*sorry for IE5*/
|
550 |
+
position: absolute; /*must have*/
|
551 |
+
z-index: -1; /*must have*/
|
552 |
+
filter: mask(); /*must have*/
|
553 |
+
top: -4px; /*must have*/
|
554 |
+
left: -4px; /*must have*/
|
555 |
+
width: 200px; /*must have*/
|
556 |
+
height: 200px; /*must have*/
|
557 |
+
}/*
|
558 |
+
* jQuery UI Progressbar 1.8.16
|
559 |
+
*
|
560 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
561 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
562 |
+
* http://jquery.org/license
|
563 |
+
*
|
564 |
+
* http://docs.jquery.com/UI/Progressbar#theming
|
565 |
+
*/
|
566 |
+
.ui-progressbar { height:2em; text-align: left; }
|
567 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
568 |
+
.ui-progressbar .ui-widget-header {
|
569 |
+
background-color: #83B4D8;
|
570 |
+
background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
571 |
+
background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
572 |
+
background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
573 |
+
background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
574 |
+
background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(144,197,238) 100%);
|
575 |
+
}
|
psp-include/settings/css/jquery-ui-techblissonline.css
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}/*\*/* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}/**/.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-widget{font-family:sans-serif;font-size:12px}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:sans-serif;font-size:1em}.ui-widget-content{border:1px solid #dfdfdf;background:#fff;color:#333}.ui-widget-header{border:1px solid #dfdfdf;color:#333;font-weight:bold;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #dfdfdf;background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);font-weight:normal;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background-color:#ececec;background-image:-ms-linear-gradient(top,#ececec,#f9f9f9);background-image:-moz-linear-gradient(top,#ececec,#f9f9f9);background-image:-o-linear-gradient(top,#ececec,#f9f9f9);background-image:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#ececec,#f9f9f9);background-image:linear-gradient(top,#ececec,#f9f9f9);font-weight:normal;color:#000}.ui-state-hover a,.ui-state-hover a:hover{color:#000;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #dfdfdf;background:#fff;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #e6db55;background:#ffffe0;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #c00;background:#ffebe8;color:#c00}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#c00}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#c00}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-content .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-widget-header .ui-icon{background-image:url(../images/ui-icons_999999_256x240.png)}.ui-state-default .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-active .ui-icon{background-image:url(../images/ui-icons_333333_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(../images/ui-icons_21759b_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/ui-icons_cc0000_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.ui-widget-overlay{background:#000;opacity:.6;filter:Alpha(Opacity=60)}.ui-widget-shadow{box-shadow:0 0 16px rgba(0,0,0,0.3)}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:fixed;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:left}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-widget-header{background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%)}
|
psp-include/settings/css/psp-html-settings.css
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
input[type=checkbox], input[type=radio] {
|
2 |
+
height: 1.5625rem;
|
3 |
+
width: 1.5625rem;
|
4 |
+
}
|
5 |
+
|
6 |
+
input[type=checkbox i] {
|
7 |
+
background-color: initial;
|
8 |
+
cursor: default;
|
9 |
+
-webkit-appearance: checkbox;
|
10 |
+
box-sizing: border-box;
|
11 |
+
margin: 3px 3px 3px 4px;
|
12 |
+
padding: initial;
|
13 |
+
border: initial;
|
14 |
+
}
|
15 |
+
|
16 |
+
input[type=radio i] {
|
17 |
+
background-color: initial;
|
18 |
+
cursor: default;
|
19 |
+
-webkit-appearance: radio;
|
20 |
+
box-sizing: border-box;
|
21 |
+
margin: 3px 3px 3px 4px;
|
22 |
+
padding: initial;
|
23 |
+
border: initial;
|
24 |
+
}
|
psp-include/settings/css/psp-settings-bs.css
ADDED
@@ -0,0 +1,6 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
3 |
+
* Copyright 2011-2016 Twitter, Inc.
|
4 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5 |
+
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
|
6 |
+
/*# sourceMappingURL=bootstrap.min.css.map */
|
psp-include/settings/css/psp-settings.css
ADDED
@@ -0,0 +1,114 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.psp-separator{
|
2 |
+
width: 100%;
|
3 |
+
}
|
4 |
+
|
5 |
+
.psp-separator input{
|
6 |
+
margin:0;padding:0;
|
7 |
+
display:none;
|
8 |
+
-webkit-appearance:none;
|
9 |
+
-moz-appearance:none;
|
10 |
+
appearance:none;
|
11 |
+
}
|
12 |
+
|
13 |
+
.psp-radio-separator{
|
14 |
+
cursor:pointer;
|
15 |
+
background-size:contain;
|
16 |
+
background-repeat:no-repeat;
|
17 |
+
/*background-color:#fff;
|
18 |
+
color: #609; */
|
19 |
+
xtext-decoration: underline; text-decoration: none; xcolor: #2518b5; color: #1e0fbe;
|
20 |
+
font-family: arial, sans-serif;
|
21 |
+
xfont-size: medium;
|
22 |
+
font-size: 18px !important;
|
23 |
+
xline-height: 1.2;
|
24 |
+
line-height: 22px !important;
|
25 |
+
overflow:hidden;
|
26 |
+
border:1px solid #ccc;
|
27 |
+
display:inline-block;
|
28 |
+
width:10%;height:10%;
|
29 |
+
text-align:center;
|
30 |
+
-webkit-transition: all 100ms ease-in;
|
31 |
+
-moz-transition: all 100ms ease-in;
|
32 |
+
transition: all 100ms ease-in;
|
33 |
+
/*-webkit-filter: brightness(1.8) grayscale(1) opacity(.7);
|
34 |
+
-moz-filter: brightness(1.8) grayscale(1) opacity(.7);
|
35 |
+
filter: brightness(1.8) grayscale(1) opacity(.7);*/
|
36 |
+
}
|
37 |
+
.psp-radio-separator:hover{
|
38 |
+
/*-webkit-filter: brightness(1.2) grayscale(.5) opacity(.9);
|
39 |
+
-moz-filter: brightness(1.2) grayscale(.5) opacity(.9);
|
40 |
+
filter: brightness(1.2) grayscale(.5) opacity(.9);*/
|
41 |
+
}
|
42 |
+
|
43 |
+
.psp-separator input{
|
44 |
+
margin:0;padding:0;
|
45 |
+
-webkit-appearance:none;
|
46 |
+
-moz-appearance:none;
|
47 |
+
appearance:none;
|
48 |
+
}
|
49 |
+
|
50 |
+
.psp-separator input:active +.psp-radio-separator{opacity: 40;}
|
51 |
+
.psp-separator input:checked +.psp-radio-separator{
|
52 |
+
|
53 |
+
border:2px solid orange;
|
54 |
+
background-color:#fff;
|
55 |
+
box-shadow:2px 2px 2px blue;
|
56 |
+
-webkit-filter: none;
|
57 |
+
-moz-filter: none;
|
58 |
+
filter: none;
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
form[name="platinum-seo-form"] {
|
63 |
+
width: 75%;
|
64 |
+
float: left;
|
65 |
+
margin-top: 10px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.sidebar-cta {
|
69 |
+
width:25%;
|
70 |
+
float:right;
|
71 |
+
margin-top: 10px;
|
72 |
+
}
|
73 |
+
|
74 |
+
/* Eye Ball , view obfuscated text */
|
75 |
+
.view-obfuscated-text {
|
76 |
+
font-size: 14px;
|
77 |
+
margin-top: 6px;
|
78 |
+
color: rgba(155, 155, 155, 0.79);
|
79 |
+
transition: color 0.3s ease 0s;
|
80 |
+
-moz-transition: color 0.3s ease 0s;
|
81 |
+
-webkit-transition: color 0.3s ease 0s;
|
82 |
+
margin-left: 3px;
|
83 |
+
}
|
84 |
+
.view-obfuscated-text:hover {
|
85 |
+
cursor: pointer;
|
86 |
+
color: #333;
|
87 |
+
}
|
88 |
+
|
89 |
+
@media only screen and (max-width: 991px) {
|
90 |
+
|
91 |
+
form[name="platinum-seo-form"] {
|
92 |
+
width: 98%;
|
93 |
+
float: left;
|
94 |
+
margin-left: 2%;
|
95 |
+
}
|
96 |
+
|
97 |
+
.sidebar-cta {
|
98 |
+
width: 98%;
|
99 |
+
margin-left: 2%;
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
.dashicons-psp:before {
|
105 |
+
display: inline-block;
|
106 |
+
color: #1EC9B3;
|
107 |
+
-webkit-font-smoothing: antialiased;
|
108 |
+
font: normal 100px/1 'dashicons';
|
109 |
+
}
|
110 |
+
|
111 |
+
.psp {
|
112 |
+
float: left;
|
113 |
+
margin-right: 5px;
|
114 |
+
}
|
psp-include/settings/js/atags.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}jQuery(document).ready(function(e){e("button.pspbutton").each(function(a,s){var t="#"+e(this).data("id"),i="%"+e(this).data("added")+"%";t=escapeRegExp(t);var p=e(t).val();"%sep%"===i&&e(this).attr("id","pspsep"),-1!=p.indexOf(i)&&e(this).toggleClass("active")}),e("button.pspbutton").click(function(){var a="%"+e(this).data("added")+"%",s="#"+e(this).data("id");s=escapeRegExp(s);var t=a,i=e(s).val();i&&"%sep%"!==a&&(a=i.trim().endsWith("%sep%")?" "+a:" %sep% "+a),-1!=i.indexOf(a)?(i=i.replace(a,""),e(this).removeClass("active")):-1!=i.indexOf(t)?(i=(i=i.replace(t+" %sep% ","")).replace(t,""),e(this).removeClass("active")):("%sep%"!==a&&(i+=a),"%sep%"==a&&(i=i+" "+a),e(this).addClass("active")),-1!=i.indexOf("%sep%")?e("#pspsep").addClass("active"):e("#pspsep").removeClass("active"),e(s).val(i.trim()).trigger("change")})});
|
psp-include/settings/js/cm-home.js
ADDED
@@ -0,0 +1,37 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
if( $('#psp_home_additional_headers').length ) {
|
3 |
+
if (typeof psp_cm_home_html_settings != "undefined") {
|
4 |
+
//var cm_html_editor = wp.codeEditor.initialize( $('#psp_home_additional_headers'), psp_cm_home_html_settings );
|
5 |
+
var editorHeaderSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
6 |
+
editorHeaderSettings.codemirror = _.extend(
|
7 |
+
{},
|
8 |
+
editorHeaderSettings.codemirror,
|
9 |
+
{
|
10 |
+
autorefresh: true,
|
11 |
+
mode: 'text/html',
|
12 |
+
}
|
13 |
+
);
|
14 |
+
var cm_html_editor = wp.codeEditor.initialize( $('#psp_home_additional_headers'), editorHeaderSettings );
|
15 |
+
|
16 |
+
}
|
17 |
+
}
|
18 |
+
if( $('#psp_home_schemas').length ) {
|
19 |
+
if (typeof psp_cm_home_json_settings != "undefined") {
|
20 |
+
//var cm_json_editor = wp.codeEditor.initialize( $('#psp_home_schemas'), psp_cm_home_json_settings );
|
21 |
+
var editorSchemaSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
22 |
+
editorSchemaSettings.codemirror = _.extend(
|
23 |
+
{},
|
24 |
+
editorSchemaSettings.codemirror,
|
25 |
+
{
|
26 |
+
autorefresh: true,
|
27 |
+
matchBrackets: true,
|
28 |
+
autoCloseBrackets: true,
|
29 |
+
mode: "application/ld+json",
|
30 |
+
lineWrapping: true
|
31 |
+
}
|
32 |
+
);
|
33 |
+
var cm_json_editor = wp.codeEditor.initialize( $('#psp_home_schemas'), editorSchemaSettings );
|
34 |
+
|
35 |
+
}
|
36 |
+
}
|
37 |
+
});
|
psp-include/settings/js/cm-hta.js
ADDED
@@ -0,0 +1,15 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
//if (typeof cm_json_settings != "undefined") wp.codeEditor.initialize($('#psp_htaccess_content'), cm_json_settings);
|
3 |
+
if( $('#psp_htaccess_content').length ) {
|
4 |
+
var editorHtaccessSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
5 |
+
editorHtaccessSettings.codemirror = _.extend(
|
6 |
+
{},
|
7 |
+
editorHtaccessSettings.codemirror,
|
8 |
+
{
|
9 |
+
autorefresh: true,
|
10 |
+
mode: 'text/nginx',
|
11 |
+
}
|
12 |
+
);
|
13 |
+
var editor = wp.codeEditor.initialize( $('#psp_htaccess_content'), editorHtaccessSettings );
|
14 |
+
}
|
15 |
+
});
|
psp-include/settings/js/cm.js
ADDED
@@ -0,0 +1,16 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
// if (typeof cm_text_settings != "undefined") wp.codeEditor.initialize($('#psp_robotstxt_content'), cm_text_settings);
|
3 |
+
// if (typeof cm_htaccess_settings != "undefined") wp.codeEditor.initialize($('#psp_htaccess_content'), cm_htaccess_settings);
|
4 |
+
if( $('#psp_robotstxt_content').length ) {
|
5 |
+
var editorRobotSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
6 |
+
editorRobotSettings.codemirror = _.extend(
|
7 |
+
{},
|
8 |
+
editorRobotSettings.codemirror,
|
9 |
+
{
|
10 |
+
autorefresh: true,
|
11 |
+
mode: 'text',
|
12 |
+
}
|
13 |
+
);
|
14 |
+
var editor = wp.codeEditor.initialize( $('#psp_robotstxt_content'), editorRobotSettings );
|
15 |
+
}
|
16 |
+
});
|
psp-include/settings/js/cmjs.js
ADDED
@@ -0,0 +1,15 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
//if (typeof cm_json_settings != "undefined") wp.codeEditor.initialize($('#psp_ga_tracking_code_id'), cm_json_settings);
|
3 |
+
if( $('#psp_ga_tracking_code_id').length ) {
|
4 |
+
var editorGaSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
5 |
+
editorGaSettings.codemirror = _.extend(
|
6 |
+
{},
|
7 |
+
editorGaSettings.codemirror,
|
8 |
+
{
|
9 |
+
autorefresh: true,
|
10 |
+
mode: 'text',
|
11 |
+
}
|
12 |
+
);
|
13 |
+
var editor = wp.codeEditor.initialize( $('#psp_ga_tracking_code_id'), editorGaSettings );
|
14 |
+
}
|
15 |
+
});
|
psp-include/settings/js/cmpt.js
ADDED
@@ -0,0 +1,19 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
|
3 |
+
//if (typeof psp_cm_ptype_html_settings != "undefined") {
|
4 |
+
//var cm_pt_html_editor = wp.codeEditor.initialize( $('.pspcodeeditor'), psp_cm_ptype_html_settings );
|
5 |
+
var editorHeaderSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
6 |
+
editorHeaderSettings.codemirror = _.extend(
|
7 |
+
{},
|
8 |
+
editorHeaderSettings.codemirror,
|
9 |
+
{
|
10 |
+
autorefresh: true,
|
11 |
+
mode: 'text/html',
|
12 |
+
}
|
13 |
+
);
|
14 |
+
$(".pspcodeeditor").each(function() {
|
15 |
+
var cm_pt_html_editor = wp.codeEditor.initialize( $(this), editorHeaderSettings );
|
16 |
+
});
|
17 |
+
//}
|
18 |
+
|
19 |
+
});
|
psp-include/settings/js/pspinputtypetoggler.js
ADDED
@@ -0,0 +1,20 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
/* Toggle Visibility of OAUTH2 ID/Client Secret and API Keys (for viewing/troubleshooting) */
|
3 |
+
//jQuery( 'body' ).on( 'click' , '.view-obfuscated-text' , function() {
|
4 |
+
jQuery('.view-obfuscated-text').live('click', function(event){
|
5 |
+
event.preventDefault();
|
6 |
+
//alert "Type ".Query(this).prev().attr("type");
|
7 |
+
if( jQuery( this ).prev().attr( 'type' ) == 'password' ) {
|
8 |
+
jQuery( this ).prev().removeAttr( 'type' );
|
9 |
+
jQuery( this ).prev().attr( 'type' , 'text' );
|
10 |
+
jQuery( this ).removeClass('dashicons-hidden');
|
11 |
+
jQuery( this ).addClass('dashicons-visibility');
|
12 |
+
|
13 |
+
} else {
|
14 |
+
jQuery( this ).prev().removeAttr( 'type' );
|
15 |
+
jQuery( this ).prev().attr( 'type' , 'password' );
|
16 |
+
jQuery( this ).removeClass('dashicons-visibility');
|
17 |
+
jQuery( this ).addClass('dashicons-hidden');
|
18 |
+
}
|
19 |
+
});
|
20 |
+
});
|
psp-include/settings/js/pspmediauploader.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
jQuery(document).ready(function(e){var t;jQuery(".upload_image_button").live("click",function(a){a.preventDefault(),imagetextID=jQuery(this).prev().attr("id"),t?t.open():((t=wp.media.frames.file_frame=wp.media({title:"Techblissonline Platinum SEO and Social Pack Media Uploader:",button:{text:"Select Image"},multiple:!1})).on("select",function(){attachment=t.state().get("selection").first().toJSON(),0>e.trim(attachment.url.length)||(imagedetail=attachment.url,jQuery("#"+imagetextID).val(imagedetail))}),t.open())})});
|
psp-include/settings/js/pspmetabox.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
jQuery(document).ready(function(e){e("#psp-meta-box .hidden").removeClass("hidden"),e("#psp-meta-box").tabs();var t,o,i,d=!1;if("undefined"!=typeof psp_cm_json_settings){var r=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};r.codemirror=_.extend({},r.codemirror,{autorefresh:!0,matchBrackets:!0,autoCloseBrackets:!0,mode:"application/ld+json",lineWrapping:!0}),e(".pspjsoneditor").length&&(t=wp.codeEditor.initialize(e(".pspjsoneditor"),r))}if("undefined"!=typeof psp_cm_html_settings){var n=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};n.codemirror=_.extend({},n.codemirror,{autorefresh:!0,mode:"text/html"}),e("#fb_ogtype_media").length&&(o=wp.codeEditor.initialize(e("#fb_ogtype_media"),n)),e("#fb_ogtype_props").length&&(i=wp.codeEditor.initialize(e("#fb_ogtype_props"),n))}if(window.wpEditorL10n&&wpEditorL10n.tinymce&&wpEditorL10n.tinymce.settings&&(d=wpEditorL10n.tinymce.settings),d&&wp.data&&wp.data.select){var p=wp.data.select("core/edit-post");wp.data.subscribe(function(){p.isSavingMetaBoxes(),t&&t.codemirror.save(),o&&o.codemirror.save(),i&&i.codemirror.save()})}});
|
psp-include/settings/js/pspsnippet.js
ADDED
@@ -0,0 +1,4 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
$("#psp-preview-box .hidden").removeClass('hidden');
|
3 |
+
$("#psp-preview-box").tabs();
|
4 |
+
});
|
psp-include/settings/js/pspsocialhandler.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
hideAllDivs=function(){jQuery(".psp-tw-player, .psp-tw-app, .psp-tw-gallery, .psp-tw-product, .psp-kg-organization").hide()},handleNewSelection=function(e){switch(hideAllDivs(),jQuery(this).val()){case"app":jQuery(".psp-tw-app").show();break;case"player":jQuery(".psp-tw-player").show();break;case"gallery":jQuery(".psp-tw-gallery").show();break;case"product":jQuery(".psp-tw-product").show();break;case"organization":jQuery(".psp-kg-organization").show()}},jQuery(document).ready(function(e){jQuery("#twitter_card_type_id, #psp_kg_profile_type").change(handleNewSelection),handleNewSelection.apply(jQuery("#twitter_card_type_id, #psp_kg_profile_type"))});
|
psp-include/settings/js/snippetpreview.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function wordCount(e){var t=e.match(/\S+/g);return t?t.length:0}function pspSortArray(e,t){var r=[],i=[];for(let n=0;n<e.length;n++)i=[],void 0!==(i=wp.data.select("core").getEntityRecord("taxonomy",t,e[n]))&&(r[n]=i.name);return r?(r.sort(),r[0]):"%"+t+"%"}function pspSortClassicArray(e,t){var r=[];return jQuery('input[name="'+e+'"]:checked').each(function(){r.push(jQuery(this).parent("label").text())}),r&&r.length?(r.sort(),r[0]):"%"+t+"%"}function boldWords(e){var t=e,r=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(r)for(i=0;i<r.length;i++)t=(t=t.replace(new RegExp("(^|[\\W])("+escapeRegExp(r[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3")).replace(new RegExp("(^|[\\W])("+escapeRegExp(r[i])+")([\\W]|$)","gi"),"$1<b>$2</b>$3");return t}function boldText(e){var t=e,r=jQuery("#psp_seo_meta\\[keywords\\]").val().match(/\S+/g);if(r)for(i=0;i<r.length;i++)t=t.replace(new RegExp("("+escapeRegExp(r[i])+")","gi"),"<b>$1</b>");return t}function htmlEncode(e){return jQuery("<div/>").text(e).html()}function setGtbUrlPreview(e){var t=htmlEncode(e);t=t.replace(/\/$/,"");var r=t=t.replace(/([^https?:\/\/])(\/)/g,"$1 > ");jQuery("#urlSizer").html(t),jQuery("#murlSizer").html(r);var i=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>566;){var n=t;n=(n=(n=(n=n.substring(0,n.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(n),t=n,trimmed=!0}trimmed&&(t+=" ...",jQuery("#urlSizer").html(t)),info=t.length+" characters, ",jQuery("#urlInfo").html(t.length+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(t),mtrimmed=!1;for(var l=r;r.length>42;)r=jQuery.trim(r.replace(" ...","")),(l=(l=(l=jQuery.trim(l.replace(i,""))).trim()).replace(/\>$/,"")).length>=42&&(l=(l=jQuery.trim(r.replace(" ...",""))).substring(0,l.length-1)),l=l.trim(),r=l+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(r),info=r.length+" characters, ",jQuery("#murlInfo").html(r.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(r)}function setUrlPreview(){var e="",t=!1;if(window.wpEditorL10n&&wpEditorL10n.tinymce&&wpEditorL10n.tinymce.settings&&(t=wpEditorL10n.tinymce.settings),jQuery("#editable-post-name").length){e=jQuery.trim(jQuery("#sample-permalink").text());var r=jQuery.trim(jQuery("#editable-post-name").text());e=(e=e.replace(r,"")).replace(/\/$/g,"")}else jQuery("#name").length?e=jQuery.trim(jQuery("#pspPostPermalink").text()):jQuery("#slug").length?e=jQuery.trim(jQuery("#pspPostPermalink").text()):t&&wp.data&&wp.data.select&&(e=wp.data.select("core/editor").getPermalink(),wp.data.subscribe(function(){setGtbUrlPreview(wp.data.select("core/editor").getPermalink())}));jQuery("#new-post-slug").length>0&&(e+=jQuery("#new-post-slug").val());jQuery("#editable-post-name").length&&(e+=jQuery("#editable-post-name").text());var i=htmlEncode(e);e=i=i.replace(/\/$/,"");var n=i=i.replace(/([^https?:\/\/])(\/)/g,"$1 > ");jQuery("#urlSizer").html(i),jQuery("#murlSizer").html(n);var l=new RegExp("W(.*)$");for(trimmed=!1;jQuery("#urlSizer").width()>584;){var s=i;s=(s=(s=(s=s.substring(0,s.length-1)).trim()).replace(/\>$/,"")).trim(),jQuery("#urlSizer").html(s),i=s,trimmed=!0}trimmed&&(i+=" ..."),info=i.length+" characters, ",jQuery("#urlInfo").html(i.length+" characters, "+jQuery("#urlSizer").width()+" pixels"),jQuery("#urlSizer").width()<=584?jQuery("#urlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"):jQuery("#urlInfo").html(info+'<span style="color:red;">'+jQuery("#urlSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetUrl").html(i),mtrimmed=!1;for(var o=n;o.length>42;)n=jQuery.trim(n.replace(" ...","")),(o=(o=(o=jQuery.trim(o.replace(l,""))).trim()).replace(/\>$/,"")).length>=42&&(o=(o=jQuery.trim(n.replace(" ...",""))).substring(0,o.length-1)),o=o.trim(),n=o+=" ...",mtrimmed=!0;mtrimmed&&jQuery("#murlSizer").html(n),info=n.length+" characters, ",jQuery("#murlInfo").html(n.length+" characters, "+jQuery("#murlSizer").width()+" pixels"),jQuery("#murlSizer").width()<=282?jQuery("#murlInfo").html(info+'<span style="color:green;">'+jQuery("#urlSizer").width()+" pixels</span>"):jQuery("#murlInfo").html(info+'<span style="color:red;">'+jQuery("#murlSizer").width()+" pixels</span>"),jQuery("#techblissonlineMSnippetUrl").html(n)}function stripTrailingSlash(e){return"/"==e.substr(-1)?e.substr(0,e.length-1):e}function setGtbTitlePreview(e,t){var r=jQuery("#pspPostTypeArrayFormat").text(),i=JSON.parse(r),n=jQuery("#psp_seo_meta\\[titleformat\\]").val(),l=jQuery("#psp_seo_meta\\[title\\]"),s=n.replace("%seo_title%",e);if(s=(s=(s=(s=(s=s.replace("%wp_title%",i.wp_title)).replace("%site_name%",i.site_name)).replace("%site_description%",i.site_description)).replace("%taxonomy%",t)).replace(/%sep%/g,i.sep),""!==(s=(s=jQuery.trim(s)).trim(i.sep))){placeholder_title=e,l.attr("placeholder",placeholder_title);var o=htmlEncode(s),a=o;jQuery("#titleSizer").html(o);var p=new RegExp("sw+(.*)$");trimmed=!1;for(var u=o;jQuery("#titleSizer").width()>584;)o=jQuery.trim(o.replace(" ...","")),(u=jQuery.trim(u.replace(p,""))).length>=o.length&&(u=u.substring(0,u.length-1)),o=u+" ...",jQuery("#titleSizer").html(o),trimmed=!0;trimmed,jQuery("#titleSizer").html(o),mtrimmed=!1;for(var c=a;c.length>78;)a=jQuery.trim(a.replace(" ...","")),(c=jQuery.trim(c.replace(p,""))).length>=78&&(c=(c=jQuery.trim(c.replace(" ...",""))).substring(0,c.length-1)),a=c+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").html(a),info=o.length+" characters, "+wordCount(o)+" words ",jQuery("#titleInfo").html(o.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(o)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),minfo=a.length+" characters/ 78 characters "+wordCount(a)+" words ",jQuery("#mtitleInfo").html(a.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(a)+" words"),a.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineSnippetTitle").html(o),jQuery("#techblissonlineMSnippetTitle").html(a)}}function setTitlePreview(){var e,t,r,i="",n="",l="",s=!1,o="";window.wpEditorL10n&&wpEditorL10n.tinymce&&wpEditorL10n.tinymce.settings&&(s=wpEditorL10n.tinymce.settings);var a=jQuery("#pspPostTypeArrayFormat").text(),p=JSON.parse(a),u=jQuery("#psp_seo_meta\\[titleformat\\]").val(),c=!1,m=!1,y=!1;jQuery("#psp_seo_meta\\[disable_title_format\\]:checked").length>0&&(c=!0),jQuery("#psp_seo_meta\\[disable_title\\]:checked").length>0&&(m=!0),jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(y=!0);o=p.category,u.toLowerCase().indexOf("%wp_title%");var h=jQuery("#title"),d=jQuery("#psp_seo_meta\\[title\\]"),j=jQuery("#psp_seo_meta\\[preferred_tax\\]"),Q="categories",g="post_category[]",w="category";if(j&&j.val()&&"category"!==(w=jQuery("#psp_seo_meta\\[preferred_tax\\] option:selected").text())&&(Q=w,g="tax_input["+w+"][]"),h&&(o=pspSortClassicArray(g,w)),!d.val()||m||y?(jQuery("#title").val()?n=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?n=jQuery.trim(jQuery("#name").val()):s&&wp.data&&wp.data.select&&(n=wp.data.select("core/editor").getEditedPostAttribute("title"),r=wp.data.select("core/editor").getEditedPostAttribute(Q),o="%"+w+"%",void 0!==r&&r.length>0&&(o=pspSortArray(r,w)),wp.data.subscribe(function(){n=wp.data.select("core/editor").getEditedPostAttribute("title"),r=wp.data.select("core/editor").getEditedPostAttribute(Q),o="%"+w+"%",void 0!==r&&r.length>0&&(o=pspSortArray(r,w)),n&&o&&setGtbTitlePreview(n,o)})),i=n,(c||y)&&(u="%wp_title%"),i=(i=(i=(i=(i=(i=u.replace("%seo_title%",n)).replace("%wp_title%",n)).replace("%site_name%",p.site_name)).replace("%site_description%",p.site_description)).replace("%taxonomy%",o)).replace(/%sep%/g,p.sep),i=(i=jQuery.trim(i)).trim(p.sep)):(i=d.val(),l=d.val(),jQuery("#title").val()?n=jQuery.trim(jQuery("#title").val()):jQuery("#name").val()?n=jQuery.trim(jQuery("#name").val()):s&&wp.data&&wp.data.select&&(n=wp.data.select("core/editor").getEditedPostAttribute("title"),t=wp.data.select("core/editor").getEditedPostAttribute(Q),o="%"+w+"%",void 0!==t&&t.length>0&&(o=pspSortArray(t,w)),wp.data.subscribe(function(){n=wp.data.select("core/editor").getEditedPostAttribute("title"),t=wp.data.select("core/editor").getEditedPostAttribute(Q),o="%"+w+"%",void 0!==t&&t.length>0&&(o=pspSortArray(t,w)),l&&o&&setGtbTitlePreview(l,o)})),c&&(u="%seo_title%"),i=(i=(i=(i=(i=(i=u.replace("%seo_title%",l)).replace("%wp_title%",n)).replace("%site_name%",p.site_name)).replace("%site_description%",p.site_description)).replace("%taxonomy%",o)).replace(/%sep%/g,p.sep),i=(i=jQuery.trim(i)).trim(p.sep)),""!==i){e=n,d.attr("placeholder",e);var f=htmlEncode(i),v=f;jQuery("#titleSizer").html(f);var _=new RegExp("sw+(.*)$"),S=f;for(trimmed=!1;jQuery("#titleSizer").width()>584;)f=jQuery.trim(f.replace(" ...","")),(S=jQuery.trim(S.replace(_,""))).length>=f.length&&(S=S.substring(0,S.length-1)),f=S+" ...",jQuery("#titleSizer").text(f),trimmed=!0;trimmed,jQuery("#titleSizer").text(f),jQuery("body").append(jQuery("#titleSizer")).width(),jQuery("body#titleSizer").remove(),info=f.length+" characters, "+wordCount(f)+" words ",jQuery("#titleInfo").html(f.length+" characters, "+jQuery("#titleSizer").width()+" pixels, "+wordCount(f)+" words"),jQuery("#titleSizer").width()<=584?jQuery("#titleInfo").html(info+'<span style="color:green;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"):jQuery("#titleInfo").html(info+'<span style="color:red;">'+jQuery("#titleSizer").width()+"/584 pixels</span>"),jQuery("#techblissonlineSnippetTitle").html(f);var b=v;for(mtrimmed=!1;b.length>78;)v=jQuery.trim(v.replace(" ...","")),(b=jQuery.trim(b.replace(_,""))).length>=78&&(b=(b=jQuery.trim(b.replace(" ...",""))).substring(0,b.length-1)),v=b+=" ...",mtrimmed=!0;mtrimmed,jQuery("#mtitleSizer").text(v),jQuery("body").append(jQuery("#mtitleSizer")).width(),jQuery("body#mtitleSizer").remove(),minfo=v.length+" characters/ 78 characters "+wordCount(v)+" words ",jQuery("#mtitleInfo").html(v.length+" characters, "+jQuery("#mtitleSizer").width()+" pixels, "+wordCount(v)+" words"),v.length<=78?jQuery("#mtitleInfo").html('<span style="color:green;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"):jQuery("#mtitleInfo").html('<span style="color:red;">'+minfo+"</span> "+jQuery("#mtitleSizer").width()+" pixels"),jQuery("#techblissonlineMSnippetTitle").html(v)}}function setDescriptionPreview(){var e=!1,t=jQuery("#psp_seo_meta\\[description\\]");window.wpEditorL10n&&wpEditorL10n.tinymce&&wpEditorL10n.tinymce.settings&&(e=wpEditorL10n.tinymce.settings);var r=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),i=r;jQuery.inArray(parseInt(r),[-1,0,1,2,3,4])>-1&&(r=230,i=285),""===r&&(r=230,i=285),r=parseInt(r),i=parseInt(i);var n="",l=!1,s=!1;if(jQuery("#psp_seo_meta\\[disable_psp\\]:checked").length>0&&(l=!0),jQuery("#psp_seo_meta\\[disable_description\\]:checked").length>0&&(s=!0),""!==n||l||s||(n=jQuery.trim(jQuery("#psp_seo_meta\\[description\\]").val())),""===n)if(""===n&&e&&wp.data&&wp.data.select){var o=wp.data.select("core/editor").getEditedPostContent();n=(n=o.replace(/(<([^>]+)>)/gi,"")).substring(0,i),t.attr("placeholder",n),wp.data.subscribe(function(){var e=wp.data.select("core/editor").getEditedPostContent();t.val()||(n=(n=e.replace(/(<([^>]+)>)/gi,"")).substring(0,i),t.attr("placeholder",n),setGTBDescPreview(n))})}else{var a=jQuery.trim(jQuery("#content").val());if(!t.val()||l||s)return n=(n=a.replace(/(<([^>]+)>)/gi,"")).substring(0,i),t.attr("placeholder",n),void setGTBDescPreview(n)}var p=htmlEncode(n),u=p+=" ...";jQuery("#descriptionSizer").html(p),jQuery("#mdescriptionSizer").html(u);for(var c=new RegExp("sw+(.*)$"),m=p;m.length>r;)p=jQuery.trim(p.replace(" ...","")),m=jQuery.trim(m.replace(c,"")),n=jQuery.trim(n.replace(c,"")),m.length>=r&&(m=(m=jQuery.trim(m.replace(" ...",""))).substring(0,m.length-1),n=n.substring(0,n.length-1)),m+=" ...";p=m,jQuery("#descriptionSizer").html(p);for(var y=u;y.length>i;)u=jQuery.trim(u.replace(" ...","")),(y=jQuery.trim(y.replace(c,""))).length>=i&&(y=(y=jQuery.trim(y.replace(" ...",""))).substring(0,y.length-1)),y+=" ...";u=y,jQuery("#mdescriptionSizer").html(u),jQuery("#descriptionInfo").html(p.length+" characters, "+jQuery("#descriptionSizer").width()+" pixels, "+wordCount(p)+" words"),info=jQuery("#descriptionSizer").width()+" pixels, "+wordCount(p)+" words ",jQuery("#mdescriptionInfo").html(u.length+" characters, "+jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(u)+" words"),minfo=jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(u)+" words ",p.length<=146?jQuery("#descriptionInfo").html(info+'<span style="color:green;">'+p.length+"/~170 characters"):p.length<=160?jQuery("#descriptionInfo").html(info+'<span style="color:orange;">'+p.length+"/~170 characters</span>"):p.length<=166?jQuery("#descriptionInfo").html(info+'<span style="color:purple;">'+p.length+"/~170 characters</span>"):jQuery("#descriptionInfo").html(info+'<span style="color:red;">'+p.length+"/~170 characters</span>"),u.length<=146?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:green;">'+u.length+"/~170 characters"):u.length<=160?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:orange;">'+u.length+"/~170 characters</span>"):u.length<=166?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:purple;">'+u.length+"/~170 characters</span>"):jQuery("#mdescriptionInfo").html(minfo+'<span style="color:red;">'+u.length+"/~170 characters</span>"),jQuery("#techblissonlineSnippetDescription").html(p),jQuery("#techblissonlineMSnippetDescription").html(u)}function setGTBDescPreview(e){var t=jQuery("#psp_seo_meta\\[description\\]"),r=e;placeholder_desc=e,t.attr("placeholder",placeholder_desc);var i=jQuery.trim(jQuery("#psp_seo_meta\\[maxsnippet\\]").val()),n=i;jQuery.inArray(parseInt(i),[-1,0,1,2,3,4])>-1&&(i=230,n=285),""===i&&(i=230,n=285),i=parseInt(i),n=parseInt(n);var l=htmlEncode(r),s=l+=" ...";jQuery("#descriptionSizer").html(l),jQuery("#mdescriptionSizer").html(s);for(var o=new RegExp("sw+(.*)$"),a=l;a.length>i;)l=jQuery.trim(l.replace(" ...","")),a=jQuery.trim(a.replace(o,"")),r=jQuery.trim(r.replace(o,"")),a.length>=i&&(a=(a=jQuery.trim(a.replace(" ...",""))).substring(0,a.length-1),r=r.substring(0,r.length-1)),a+=" ...";l=a,jQuery("#descriptionSizer").html(l);for(var p=s;p.length>n;)s=jQuery.trim(s.replace(" ...","")),(p=jQuery.trim(p.replace(o,""))).length>=n&&(p=(p=jQuery.trim(p.replace(" ...",""))).substring(0,p.length-1)),p+=" ...";s=p,jQuery("#descriptionSizer").html(s),jQuery("body").append(jQuery("#descriptionSizer")).width(),jQuery("body").append(jQuery("#mdescriptionSizer")).width(),jQuery("body").remove("#descriptionSizer"),jQuery("body").remove("#mdescriptionSizer"),jQuery("#descriptionInfo").html(l.length+" characters, "+jQuery("#descriptionSizer").width()+" pixels, "+wordCount(l)+" words"),info=jQuery("#descriptionSizer").width()+" pixels, "+wordCount(l)+" words ",jQuery("#mdescriptionInfo").html(s.length+" characters, "+jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(s)+" words"),minfo=jQuery("#mdescriptionSizer").width()+" pixels, "+wordCount(s)+" words ",l.length<=146?jQuery("#descriptionInfo").html(info+'<span style="color:green;">'+l.length+"/~170 characters"):l.length<=160?jQuery("#descriptionInfo").html(info+'<span style="color:orange;">'+l.length+"/~170 characters</span>"):l.length<=166?jQuery("#descriptionInfo").html(info+'<span style="color:purple;">'+l.length+"/~170 characters</span>"):jQuery("#descriptionInfo").html(info+'<span style="color:red;">'+l.length+"/~170 characters</span>"),s.length<=146?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:green;">'+s.length+"/~170 characters"):s.length<=160?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:orange;">'+s.length+"/~170 characters</span>"):s.length<=166?jQuery("#mdescriptionInfo").html(minfo+'<span style="color:purple;">'+s.length+"/~170 characters</span>"):jQuery("#mdescriptionInfo").html(minfo+'<span style="color:red;">'+s.length+"/~170 characters</span>"),jQuery("#techblissonlineSnippetDescription").html(l),jQuery("#techblissonlineMSnippetDescription").html(s)}function updateDateText(){var e=htmlEncode(jQuery.trim(jQuery("#DateText").val()));e.length>0?jQuery("#resultDateText").html(e+" - "):jQuery("#resultDateText").html("")}function updateAll(){setUrlPreview(),setTitlePreview(),setDescriptionPreview(),updateDateText()}String.prototype.trimEnd=function(e){e=e||" ";for(var t=this.length-1;t>=0&&this.charAt(t)==e;t--);return this.substring(0,t+1)},jQuery(document).ready(function(){jQuery("#URL").keyup(function(){setUrlPreview()}),jQuery(document).on("keyup","#new-post-slug",function(){setUrlPreview()}),jQuery(document).on("click",".cancel, .save",function(){setUrlPreview()}),jQuery('input[name="post_category[]"]').click(function(){setTitlePreview()}),jQuery("input[name^='tax_input[']").click(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[title\\]").keyup(function(){setTitlePreview()}),jQuery("#title").keyup(function(){setTitlePreview()}),jQuery("#name").keyup(function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").bind("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[titleformat\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[preferred_tax\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title_format\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_title\\]").on("change",function(){setTitlePreview()}),jQuery("#psp_seo_meta\\[disable_psp\\]").on("change",function(){setTitlePreview(),setDescriptionPreview()}),jQuery("#psp_seo_meta\\[disable_description\\]").on("change",function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[description\\]").keyup(function(){setDescriptionPreview()}),jQuery("#content").keyup(function(){setDescriptionPreview()}),jQuery("#psp_seo_meta\\[maxsnippet\\]").on("change",function(){setDescriptionPreview()}),jQuery("#DateText").keyup(function(){updateDateText()}),jQuery("#psp_seo_meta[keywords]").keyup(function(){updateAll()}),updateAll()});
|
psp-include/settings/psp_advanced_metabox_renderer.php
ADDED
@@ -0,0 +1,188 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Platinum SEO Pack
|
4 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
+
Author: Rajesh - Techblissonline
|
6 |
+
Author URI: https://techblissonline.com/
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<p class="description"><?php esc_html_e( 'These are some settings specific to this page (post). If these are not set, appropriate defaults would be used. For most pages, you might not find a need to set these settings.' , 'platinum-seo-pack'); ?> </p>
|
10 |
+
<table class="form-table">
|
11 |
+
<tr class="form-field">
|
12 |
+
<th scope="row" valign="top"><label for="psp_index"><?php esc_html_e('Add index/noindex:', 'platinum_seo_pack') ?> </label></th>
|
13 |
+
<td><div id='psp_index'>
|
14 |
+
<input id='psp_index-radio-item-1' <?php if (!empty($psp_seo_meta['noindex'])) echo esc_attr('checked="checked"')?> type='radio' name='psp_seo_meta[noindex]' value='on' /><span for='psp_index-radio-item-1'>noindex</span>
|
15 |
+
<input id='psp_index-radio-item-2' <?php if (empty($psp_seo_meta['noindex'])) echo esc_attr('checked="checked"');?> type='radio' name='psp_seo_meta[noindex]' value='0' /><span for='psp_index-radio-item-2'>index</span></div>
|
16 |
+
<br />
|
17 |
+
<?php esc_html_e('noindex - Tells search engines to not include this page in the index or to not have a copy of this page in their database. It thus tells search engines to not consider this page for showing to their users on their SERPS.', 'platinum-seo-pack'); ?>
|
18 |
+
</td>
|
19 |
+
</tr>
|
20 |
+
|
21 |
+
<tr class="form-field">
|
22 |
+
<th scope="row" valign="top"><label for="psp_follow"><?php esc_html_e('Add follow/nofollow:', 'platinum_seo_pack') ?></label></th>
|
23 |
+
<td><div id='psp_follow'>
|
24 |
+
<input id='psp_follow-radio-item-1' <?php if (!empty($psp_seo_meta['nofollow'])) echo esc_attr('checked="checked"'); ?> type='radio' name='psp_seo_meta[nofollow]' value='on' /><span for='psp_follow-radio-item-1'>nofollow</span>
|
25 |
+
<input id='psp_follow-radio-item-2' <?php if (empty($psp_seo_meta['nofollow'])) echo esc_attr('checked="checked"'); ?> type='radio' name='psp_seo_meta[nofollow]' value='0' /><span for='psp_follow-radio-item-2'>follow</span><br /></div>
|
26 |
+
<br />
|
27 |
+
<?php esc_html_e('nofollow - Tells search engines to not follow links on this page, meaning to not pass on link credits, if any, assigned by the search engines to the link assignee.', 'platinum-seo-pack'); ?>
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<tr class="form-field">
|
31 |
+
<th scope="row" valign="top"><label for="psp_seo_meta[noarchive]"><?php esc_html_e('Add noarchive: ', 'platinum-seo-pack'); ?></label></th>
|
32 |
+
<td>
|
33 |
+
<?php if ( isset($psp_seo_meta['noarchive']) && $psp_seo_meta['noarchive']) { $noarchive_checked = ' checked="checked" '; } else { $noarchive_checked = ""; }
|
34 |
+
echo "<input ".esc_attr($noarchive_checked)." id='psp_seo_meta[noarchive]' name='psp_seo_meta[noarchive]' type='checkbox' /><span> </span><label for='psp_seo_meta[noarchive]'>noarchive</label>"." ";
|
35 |
+
?>
|
36 |
+
<p class="description"><?php esc_html_e('noarchive - Tells search engines to not show Cached link in SERPS (Search Engine Result Pages) for this page. It thus tells search engines not to store a cached copy of the page.', 'platinum-seo-pack'); ?></p>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<tr class="form-field">
|
40 |
+
<th scope="row" valign="top"><label for="psp_seo_meta[nosnippet]"><?php esc_html_e('Add nosnippet: ', 'platinum-seo-pack'); ?></label></th>
|
41 |
+
<td>
|
42 |
+
<?php if ( isset($psp_seo_meta['nosnippet']) && $psp_seo_meta['nosnippet']) { $nosnippet_checked = ' checked="checked" '; } else { $nosnippet_checked = ""; }
|
43 |
+
echo "<input ".esc_attr($nosnippet_checked)." id='psp_seo_meta[nosnippet]' name='psp_seo_meta[nosnippet]' type='checkbox' /><span> </span><label for='psp_seo_meta[nosnippet]'>nosnippet</label>"." ";
|
44 |
+
?>
|
45 |
+
<p class="description"><?php esc_html_e('nosnippet - Tells search engines to not show snippet (description) in SERPS (Search Engine Result Pages) for this page. It also tells search engines not to show a cached link in SERPS for this page.', 'platinum-seo-pack'); ?></p>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
<tr class="form-field">
|
49 |
+
<th scope="row" valign="top"><label for="psp_seo_meta[noimageindex]"><?php esc_html_e('Add noimageindex: ', 'platinum-seo-pack'); ?></label></th>
|
50 |
+
<td>
|
51 |
+
<?php if ( isset($psp_seo_meta['noimageindex']) && $psp_seo_meta['noimageindex']) { $noimgidx_checked = ' checked="checked" '; } else { $noimgidx_checked = ""; }
|
52 |
+
echo "<input ".esc_attr($noimgidx_checked)." id='psp_seo_meta[noimageindex]' name='psp_seo_meta[noimageindex]' type='checkbox' /><span> </span><label for='psp_seo_meta[noimageindex]'>noimageindex</label>"." ";
|
53 |
+
?>
|
54 |
+
<p class="description"><?php esc_html_e('noimageindex - Tells search engines like google to not index any image on this page. It must however be remembered that if any of the image is linked to by some other page, it will get indexed.', 'platinum-seo-pack'); ?></p>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
<tr class="form-field">
|
58 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[maxvideo]"><?php esc_html_e('Max Video Preview: ', 'platinum-seo-pack'); ?></label></th>
|
59 |
+
<td><input style="width:15%;" type="number" min="-1" name="psp_seo_meta[maxvideo]" id="psp_seo_meta[maxvideo]" size="3" maxlength="3" value="<?php echo ( isset($psp_seo_meta['maxvideo']) ? ($psp_seo_meta['maxvideo'] == 'zero' ? 0 : esc_attr($psp_seo_meta['maxvideo'])) : ''); ?>" /><?php esc_html_e(' Seconds. [Optional]', 'platinum-seo-pack'); ?><br />
|
60 |
+
<p class="description"><?php echo esc_html__('Set max video preview length directive to Google for this post/page.', 'platinum-seo-pack').' <a href="https://techblissonline.com/" target="_blank">'.esc_html__('Read more', 'platinum-seo-pack').'...</a>'; ?></p>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr class="form-field">
|
64 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[maximage]"><?php esc_html_e('Max Image Preview [optional]: ', 'platinum-seo-pack'); ?></label></th>
|
65 |
+
<td><select id="psp_seo_meta[maximage]" name="psp_seo_meta[maximage]"><?php $dditems = array ('' => 'Select ', 'none' => 'None', 'standard' => 'Standard', 'large' => 'Large');
|
66 |
+
foreach($dditems as $key => $val) {
|
67 |
+
$selected = (isset($psp_seo_meta['maximage']) && $psp_seo_meta['maximage']==$key) ? esc_attr('selected="selected"') : '';
|
68 |
+
echo "<option value='".esc_attr($key)."'".esc_attr($selected).">".esc_html($val)."</option>";
|
69 |
+
} ?></select><p class="description"><?php esc_html_e(' Select the max image preview directive to Google for this post/page.', 'platinum-seo-pack'); ?></p>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
<tr class="form-field">
|
73 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[canonical_url]"><?php esc_html_e('Canonical URL: ', 'platinum-seo-pack'); ?></label></th>
|
74 |
+
<td><input type="text" name="psp_seo_meta[canonical_url]" id="psp_seo_meta[canonical_url]" value="<?php echo (isset($psp_seo_meta['canonical_url']) ? esc_url($psp_seo_meta['canonical_url']) : ''); ?>"><br />
|
75 |
+
<p class="description"><?php esc_html_e('Set the canonical URL to be used for this page. Leave this empty for canonical URL to default to permalink of this page. Cross domain canonical URL may also be set here to handle duplicates.', 'platinum-seo-pack'); ?></p>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
<tr class="form-field">
|
79 |
+
<th scope="row" valign="top"><label for="psp_seo_meta[nositemap]"><?php esc_html_e('Exclude from sitemap: ', 'platinum-seo-pack'); ?></label></th>
|
80 |
+
<td>
|
81 |
+
<?php if ( isset($psp_seo_meta['nositemap']) && $psp_seo_meta['nositemap']) { $nositemap_checked = ' checked="checked" '; } else { $nositemap_checked = ""; }
|
82 |
+
echo "<input ".esc_attr($nositemap_checked)." id='psp_seo_meta[nositemap]' name='psp_seo_meta[nositemap]' type='checkbox' />"." "."<label for='psp_seo_meta[nositemap]'>Exclude from Sitemap</label>";
|
83 |
+
?>
|
84 |
+
<p class="description"><?php esc_html_e('Tells sitemap generator to not include this page in the sitemap.', 'platinum-seo-pack'); ?></p>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
<tr class="form-field">
|
88 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[schema_string]"><?php esc_html_e('JSON_LD Schema String: ', 'platinum-seo-pack'); ?></label><br /><br /><i><a class="permalink" id="schemagenerator" href="https://techblissonline.com/tools/json-schema-generator/" target="_blank"><?php esc_html_e('Techblissonline Json Schema Generator Tool', 'platinum-seo-pack'); ?></a></i><br /><br /><i><a class="permalink" id="joinschemas" href="https://techblissonline.com/combine-json-schema/" target="_blank"><?php esc_html_e('How to combine several Json schema?', 'platinum-seo-pack'); ?></a></i></th>
|
89 |
+
<td><textarea name="psp_seo_meta[schema_string]" id="psp_seo_meta[schema_string]" class="pspjsoneditor"><?php echo ( isset($psp_seo_meta['schema_string']) ? (esc_textarea(stripcslashes($psp_seo_meta['schema_string']))) : ' '); ?></textarea><br />
|
90 |
+
<p class="description"><?php echo esc_html__('Set JSON_LD Schema String (without the script tag) for this post/page. Use', 'platinum-seo-pack').' <a href="https://techblissonline.com/tools/schema-markup-generator/" target="_blank">'.esc_html__('Techblissonline Schema Generator Tool', 'platinum-seo-pack').'</a>'; ?></p>
|
91 |
+
</td>
|
92 |
+
</tr>
|
93 |
+
|
94 |
+
<tr class="form-field">
|
95 |
+
<th scope="row" valign="top"><label for=""><?php esc_html_e('Redirect Settings ', 'platinum-seo-pack'); ?></label></th>
|
96 |
+
<td></td>
|
97 |
+
</tr>
|
98 |
+
<tr class="form-field">
|
99 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[redirect_to_url]"><?php esc_html_e('Redirect To: ', 'platinum-seo-pack'); ?></label></th>
|
100 |
+
<td><input type="text" name="psp_seo_meta[redirect_to_url]" id="psp_seo_meta[redirect_to_url]" value="<?php echo (isset($psp_seo_meta['redirect_to_url']) ? esc_url_raw($psp_seo_meta['redirect_to_url']) : ''); ?>"><br />
|
101 |
+
<p class="description"><?php esc_html_e('Set the URL to redirect users and crawlers landing on this page.', 'platinum-seo-pack'); ?></p>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
<tr class="form-field">
|
105 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[redirect_status_code]"><?php esc_html_e('Use: ', 'platinum-seo-pack'); ?></label></th>
|
106 |
+
<td><select id="psp_seo_meta[redirect_status_code]" name="psp_seo_meta[redirect_status_code]"><?php $dditems = array('' => 'Select a redirection method', '301' => '301 Moved Permanently', '302' => '302 Found', '303' => '303 See Other', '307' => '307 Temporary Redirect');
|
107 |
+
foreach($dditems as $key => $val) {
|
108 |
+
$selected = (isset($psp_seo_meta['redirect_status_code']) && $psp_seo_meta['redirect_status_code']==$key) ? 'selected="selected"' : '';
|
109 |
+
echo "<option value='".esc_attr($key)."' ".esc_attr($selected).">".esc_html($val)."</option>";
|
110 |
+
} ?></select><p class="description"><?php esc_html_e(' Set the HTTP status code to use for this redirection. It is highly recommended to use 301 redirects in most cases, except where the redirection is of temporary nature.', 'platinum-seo-pack'); ?></p>
|
111 |
+
</td>
|
112 |
+
</tr>
|
113 |
+
<?php if ($psp_type == "posttype") { ?>
|
114 |
+
<?php global $post_type; if ( 'page' != $post_type ) { ?>
|
115 |
+
<tr class="form-field">
|
116 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[preferred_tax]"><?php esc_html_e('Preferred Taxonomy for Breadcrumb Trail: ', 'platinum-seo-pack'); ?></label></th>
|
117 |
+
<td><select id="psp_seo_meta[preferred_tax]" name="psp_seo_meta[preferred_tax]"><?php
|
118 |
+
foreach($psp_bc_taxonomies as $key => $val) {
|
119 |
+
$selected = (isset($psp_seo_meta['preferred_tax']) && $psp_seo_meta['preferred_tax']==$key) ? 'selected="selected"' : '';
|
120 |
+
echo "<option value='".esc_attr($key)."' ".esc_attr($selected).">".esc_html($val)."</option>";
|
121 |
+
} ?></select><p class="description"><?php esc_html_e(' Select the preferred taxonomy whose terms you prefer to use in the breadcrumb trail for this page.', 'platinum-seo-pack'); ?></p>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<?php } ?>
|
125 |
+
<tr class="form-field">
|
126 |
+
<th style="width:20%;" scope="row" valign="top"><label for=""><?php esc_html_e('Disable Settings ', 'platinum-seo-pack'); ?></label></th>
|
127 |
+
<td></td>
|
128 |
+
</tr>
|
129 |
+
<tr class="form-field">
|
130 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_title]"><?php esc_html_e('Platinum SEO Title: ', 'platinum-seo-pack'); ?></label></th>
|
131 |
+
<td><?php if( isset($psp_seo_meta['disable_title']) && $psp_seo_meta['disable_title']) { $distit_checked = ' checked="checked" '; } else { $distit_checked = ""; }
|
132 |
+
echo "<input ".esc_attr($distit_checked)." id='psp_seo_meta[disable_title]' name='psp_seo_meta[disable_title]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_title]'>Disable</label><br />";
|
133 |
+
?>
|
134 |
+
<p class="description"><?php esc_html_e('Dsable Platinum SEO title for this page.', 'platinum-seo-pack'); ?></p>
|
135 |
+
</td>
|
136 |
+
</tr>
|
137 |
+
<tr class="form-field">
|
138 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_description]"><?php esc_html_e('Platinum SEO Meta Description: ', 'platinum-seo-pack'); ?></label></th>
|
139 |
+
<td><?php if( isset($psp_seo_meta['disable_description']) && $psp_seo_meta['disable_description']) { $disdes_checked = ' checked="checked" '; } else { $disdes_checked = ""; }
|
140 |
+
echo "<input ".esc_attr($disdes_checked)." id='psp_seo_meta[disable_description]' name='psp_seo_meta[disable_description]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_description]'>Disable</label><br />";
|
141 |
+
?>
|
142 |
+
<p class="description"><?php esc_html_e('Disable Platinum SEO meta description for this page.', 'platinum-seo-pack'); ?></p>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
<tr class="form-field">
|
146 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_keywords]"><?php esc_html_e('Platinum SEO Meta Keywords: ', 'platinum-seo-pack'); ?></label></th>
|
147 |
+
<td><?php if(isset($psp_seo_meta['disable_keywords']) && $psp_seo_meta['disable_keywords']) { $diskey_checked = ' checked="checked" '; } else { $diskey_checked =""; }
|
148 |
+
echo "<input ".esc_attr($diskey_checked)." id='psp_seo_meta[disable_keywords]' name='psp_seo_meta[disable_keywords]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_keywords]'>Disable</label><br />";
|
149 |
+
?>
|
150 |
+
<p class="description"><?php esc_html_e('Disable Platinum SEO meta keywords for this page.', 'platinum-seo-pack'); ?></p>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
<tr class="form-field">
|
154 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_canonical]"><?php esc_html_e('Platinum SEO Canonical URL: ', 'platinum-seo-pack'); ?></label></th>
|
155 |
+
<td><?php if( isset($psp_seo_meta['disable_canonical']) && $psp_seo_meta['disable_canonical']) { $discan_checked = ' checked="checked" '; } { $discan_checked = ""; }
|
156 |
+
echo "<input ".esc_attr($discan_checked)." id='psp_seo_meta[disable_canonical]' name='psp_seo_meta[disable_canonical]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_canonical]'>Disable</label><br />";
|
157 |
+
?>
|
158 |
+
<p class="description"><?php esc_html_e('Disable canonical URL generated by Platinum SEO for this page.', 'platinum-seo-pack'); ?></p>
|
159 |
+
</td>
|
160 |
+
</tr>
|
161 |
+
<tr class="form-field">
|
162 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_title_format]"><?php esc_html_e('Platinum SEO Title Format Settings: ', 'platinum-seo-pack'); ?></label></th>
|
163 |
+
<td><?php if ( isset($psp_seo_meta['disable_title_format']) && $psp_seo_meta['disable_title_format']) { $distif_checked = ' checked="checked" '; } else { $distif_checked =""; }
|
164 |
+
echo "<input ".esc_attr($distif_checked)." id='psp_seo_meta[disable_title_format]' name='psp_seo_meta[disable_title_format]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_title_format]'>Disable</label><br />";
|
165 |
+
?>
|
166 |
+
<p class="description"><?php esc_html_e('Disable Platinum SEO title format settings for this page.', 'platinum-seo-pack'); ?></p>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
<tr class="form-field">
|
170 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_desc_format]"><?php esc_html_e('Platinum SEO Description Format Settings: ', 'platinum-seo-pack'); ?></label></th>
|
171 |
+
<td><?php if ( isset($psp_seo_meta['disable_desc_format']) && $psp_seo_meta['disable_desc_format']) { $disdef_checked = ' checked="checked" '; } else { $disdef_checked = ""; }
|
172 |
+
echo "<input ".esc_attr($disdef_checked)." id='psp_seo_meta[disable_desc_format]' name='psp_seo_meta[disable_desc_format]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_desc_format]'>Disable</label><br />";
|
173 |
+
?>
|
174 |
+
<p class="description"><?php esc_html_e('Disable Platinum SEO meta description format settings for this page.', 'platinum-seo-pack'); ?></p>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
<tr class="form-field">
|
178 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[disable_psp]"><?php esc_html_e('Platinum SEO Settings: ', 'platinum-seo-pack'); ?></label></th>
|
179 |
+
<td><?php if ( isset($psp_seo_meta['disable_psp']) && $psp_seo_meta['disable_psp']) { $dispsp_checked = ' checked="checked" '; } else { $dispsp_checked = ""; }
|
180 |
+
echo "<input ".esc_attr($dispsp_checked)." id='psp_seo_meta[disable_psp]' name='psp_seo_meta[disable_psp]' type='checkbox' /><span> </span><label for='psp_seo_meta[disable_psp]'>Disable</label><br />";
|
181 |
+
?>
|
182 |
+
<p class="description"><?php esc_html_e('Disable ALL Platinum SEO settings for this page.', 'platinum-seo-pack'); ?></p>
|
183 |
+
</td>
|
184 |
+
</tr>
|
185 |
+
</table>
|
186 |
+
<?php } else { ?>
|
187 |
+
</table>
|
188 |
+
<?php } ?>
|
psp-include/settings/psp_basic_metabox_renderer.php
ADDED
@@ -0,0 +1,93 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Platinum SEO Pack
|
4 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
+
Author: Rajesh - Techblissonline
|
6 |
+
Author URI: http://techblissonline.com/
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<div id="psp-preview-box">
|
10 |
+
<ul class="psp-preview-tabs" id="psp-preview-tabs">
|
11 |
+
<li class="desktop"><a href="#desktop"><?php esc_html_e( 'Desktop', 'platinum-seo-pack' ); ?></a></li>
|
12 |
+
<li class="mobile"><a href="#mobile"><?php esc_html_e( 'Mobile', 'platinum-seo-pack' ); ?></a></li>
|
13 |
+
</ul>
|
14 |
+
<div id="desktop" class="psptab">
|
15 |
+
<div id="TechblissonlineGoogleSnippet"><div style="max-width:600px;font-family: arial, sans-serif;padding-left: 2px; padding-top:5px;padding-bottom:10px;text-overflow:ellipsis;">
|
16 |
+
<div style="xcolor:#093; color: #202124; padding-bottom: 2px; font-size: 14px !important;font-style: normal; xline-height: 1.2;line-height: 1.3;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;"><img style="margin: 0 0 0 0; padding: 0 0 0 0px; margin-right: 9px;height='16';width='16';" src="<?php $domainurl = home_url(); echo "https://www.google.com/s2/favicons?domain=".esc_url($domainurl); ?>" /></span><span id="techblissonlineSnippetUrl"></span><img style="margin: 0 0 -2px 0; padding: 0 0 0 4px;" src="<?php $imgurl = plugins_url('snippet-cache.png', __FILE__); echo esc_url($imgurl); ?>" /></div>
|
17 |
+
<div style="xtext-decoration: underline; text-decoration: none; xcolor: #1e0fbe; color: #1558d6; margin-bottom: 3px;padding-top: 2px; xfont-size: medium; font-size: 20px !important; xline-height: 1.3;line-height: 1.3 !important;"><span id="techblissonlineSnippetTitle"></span></div>
|
18 |
+
<div id="authorPhoto"></div>
|
19 |
+
<div style="xfont-size: small; font-size: 14px !important; xcolor: #545454;color: #3c4043; xline-height: 1.24;line-height: 1.57;"><span style="color: #808080;" id="techblissonlineSnippetDate"></span><span id="techblissonlineSnippetDescription"></span></div>
|
20 |
+
</div>
|
21 |
+
<div style="float:left;margin-top:5px;max-width:600px;"><div class="serpInfo" style="font-size: 13px !important; font-weight: bold;"><?php esc_html_e('Desktop Metrics: ', 'platinum-seo-pack'); ?></div><div class="serpInfo"><?php esc_html_e('Permalink Metrics: ', 'platinum-seo-pack'); ?> <span id="urlInfo"></span></div><div class="serpInfo"><?php esc_html_e('Title Metrics: ', 'platinum-seo-pack'); ?> <span id="titleInfo"></span></div><div class="serpInfo"><?php esc_html_e('Meta Description Metrics: ', 'platinum-seo-pack'); ?> <span id="descriptionInfo"></span></div><a class="permalink" id="tools" href="https://techblissonline.com/tools/" target="_blank">All SEO Tools</a> -
|
22 |
+
<a class="permalink" id="schemagenerator" href="https://techblissonline.com/tools/json-schema-generator/" target="_blank"><?php esc_html_e('Techblissonline Json Schema Editor', 'platinum-seo-pack'); ?></a>| <a class="permalink" id="seoanalysis" href="https://techblissonline.com/tools/seo-analysis/" target="_blank"><?php esc_html_e('Techblissonline Onpage SEO analysis Tool', 'platinum-seo-pack'); ?></a></div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div id="mobile" class="psptab">
|
26 |
+
<div id="TechblissonlinemGoogleSnippet"><div style="max-width:260px;font-family: Roboto,HelveticaNeue,Arial,sans-serif;padding-left: 2px; padding-top:5px;padding-bottom:15px;text-overflow:ellipsis;">
|
27 |
+
<div style="xcolor:#006621; color: #3C4043; font-size: 12px !important; xline-height: 1.2;line-height: 20px;;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;"><img style="margin: 0 0 -2px 0; padding: 1 0 0 0px; margin-right: 12px;height='16';width='16';" src="<?php $domainurl = home_url(); echo "https://www.google.com/s2/favicons?domain=".esc_url($domainurl); ?>" /></span><span id="techblissonlineMSnippetUrl"></span></div>
|
28 |
+
<div style="xtext-decoration: underline; text-decoration: none; xcolor: #1558d6; color: #1967D2; xfont-size: medium; font-size: 16px !important; xline-height: 1.3;line-height: 20px !important;padding-top: 1px; margin-bottom: -1px;"><span id="techblissonlineMSnippetTitle"></span></div>
|
29 |
+
<div id="MauthorPhoto"></div>
|
30 |
+
<div style="xfont-size: small; font-size: 14px !important; xcolor: #444;color: #545454; xline-height: 1.24;line-height: 20px !important;margin-bottom: -1px;padding-top: 1px;"><span style="color: #808080;" id="techblissonlineMSnippetDate"></span><span id="techblissonlineMSnippetDescription"></span></div>
|
31 |
+
</div>
|
32 |
+
<div style="float:left; margin-top:5px;max-width:600px;"><div class="serpInfo" style="font-size: 13px !important; font-weight: bold;"><?php esc_html_e('Mobile Netrics: ', 'platinum-seo-pack'); ?></div><div class="serpInfo"><?php esc_html_e('Permalink Metrics: ', 'platinum-seo-pack'); ?> <span id="murlInfo"></span></div><div class="serpInfo"><?php esc_html_e('Title Metrics: ', 'platinum-seo-pack'); ?> <span id="mtitleInfo"></span></div><div class="serpInfo"><?php esc_html_e('Meta Description Metrics: ', 'platinum-seo-pack'); ?> <span id="mdescriptionInfo"></span></div><a class="permalink" id="tools" href="https://techblissonline.com/tools/" target="_blank">All SEO Tools</a> -
|
33 |
+
<a class="permalink" id="mschemagenerator" href="https://techblissonline.com/tools/json-schema-generator/" target="_blank"><?php esc_html_e('Techblissonline Json Schema Editor', 'platinum-seo-pack'); ?></a>| <a class="permalink" id="mseoanalysis" href="https://techblissonline.com/tools/seo-analysis/" target="_blank"><?php esc_html_e('Techblissonline Onpage SEO analysis Tool', 'platinum-seo-pack'); ?></a></div>
|
34 |
+
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<span style="font-family: arial, sans-serif;xfont-size:medium;font-size: 20px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="titleSizer"></span><span style="font-family: arial, sans-serif;xfont-size:medium;font-size: 20px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="mtitleSizer"></span><span style="font-family: arial, sans-serif;xfont-size:small;font-size: 13px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="descriptionSizer"></span><span style="font-family: arial, sans-serif;xfont-size:small;font-size: 13px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="mdescriptionSizer"></span><span style="font-family: arial, sans-serif;xfont-size:small;font-size: 16px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="urlSizer"></span><span style="font-family: arial, sans-serif;xfont-size:small;font-size: 16px!important;position:absolute;visibility:hidden;white-space:nowrap;" id="murlSizer"></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspHomePermalink"><?php echo esc_url(home_url('/')); ?></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspPostPermalink"><?php echo esc_url(isset($_GET['post']) ? get_permalink( sanitize_key($_GET['post']) ) : (isset($_GET['tag_ID'], $_GET['taxonomy']) ? get_term_link(get_term_by('id', sanitize_key($_GET['tag_ID']), sanitize_key($_GET['taxonomy']))) : '')); ?></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspTaxPermalink"><?php echo esc_url(isset($_GET['tag_ID'], $_GET['taxonomy']) ? get_term_link(get_term_by('id', sanitize_key($_GET['tag_ID']), sanitize_key($_GET['taxonomy']))) : ''); ?></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspPostTypeFormat"><?php $psp_pt_instance = PspPtsSeoMetas::get_instance(); $psp_tax_instance = PspTaxSeoMetas::get_instance(); global $pagenow;$seo_title = (isset($pagenow) && $pagenow == 'post.php' ? $psp_pt_instance->get_pt_psp_title($post) : (isset($pagenow) && $pagenow == 'term.php' ? $psp_tax_instance->get_tax_psp_title() : $psp_pt_instance->get_pt_psp_title($post))); echo (isset($seo_title) ? esc_html($seo_title) : ''); ?></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspPostTypeArrayFormat"><?php $psp_pt_instance = PspPtsSeoMetas::get_instance(); $psp_tax_instance = PspTaxSeoMetas::get_instance(); $seo_title_arr = (isset($pagenow) && $pagenow == 'post.php' ? $psp_pt_instance->get_pt_psp_title($post, true) : (isset($pagenow) && $pagenow == 'term.php' ? $psp_tax_instance->get_tax_psp_title(true) : $psp_pt_instance->get_pt_psp_title($post, true))); echo (isset($seo_title_arr) ? json_encode($seo_title_arr) : ''); ?></span><span style="font-family: arial, sans-serif;font-size:small;position:absolute;visibility:hidden;white-space:nowrap;" id="pspPostPermalinkStruct"><?php
|
39 |
+
|
40 |
+
global $wp_rewrite;
|
41 |
+
$permalink_structure_for_posts = $wp_rewrite->permalink_structure;
|
42 |
+
echo esc_html($permalink_structure_for_posts);
|
43 |
+
wp_enqueue_script( 'psp-snippet', plugins_url( '/js/pspsnippet.js', __FILE__ ), array( 'jquery' ) );
|
44 |
+
?></span>
|
45 |
+
<table class="form-table">
|
46 |
+
<tr class="form-field">
|
47 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[title]"><?php esc_html_e('SEO Title: ', 'platinum-seo-pack'); ?></label></th>
|
48 |
+
<td><input type="text" name="psp_seo_meta[title]" id="psp_seo_meta[title]" value="<?php echo ( isset($psp_seo_meta['title']) ? html_entity_decode(stripcslashes(esc_attr($psp_seo_meta['title']))) : ''); ?>"><br />
|
49 |
+
<p class="description"><?php esc_html_e('Set SEO Title to be used on the archive page for this category term', 'platinum-seo-pack'); ?></p>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
<tr class="form-field">
|
53 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[titleformat]"><?php esc_html_e('SEO Title Format: ', 'platinum-seo-pack'); ?></label></th>
|
54 |
+
<td><input type="text" name="psp_seo_meta[titleformat]" id="psp_seo_meta[titleformat]" value="<?php echo ( isset($psp_seo_meta['titleformat']) ? esc_attr($psp_seo_meta['titleformat']) : ''); ?>" readonly><br />
|
55 |
+
<p class="description"><?php esc_html_e('Set SEO Title Format to be used for this post/page.Default is sitewide format set for this post type.', 'platinum-seo-pack'); ?></p>
|
56 |
+
<?php if ( ! empty( $pspavailableTags ) ) : ?>
|
57 |
+
<p><?php esc_html_e( 'Available tags:', 'platinum-seo-pack' ); ?></p>
|
58 |
+
<ul role="list">
|
59 |
+
<?php
|
60 |
+
foreach ( $pspavailableTags as $tag ) {
|
61 |
+
?>
|
62 |
+
<li class="psp">
|
63 |
+
<button type="button" data-added="<?php echo esc_attr( $tag ); ?>" data-id="<?php echo esc_attr( 'psp_seo_meta[titleformat]' ); ?>"
|
64 |
+
class="pspbutton button button-secondary">
|
65 |
+
<?php echo '%' . esc_html($tag) . '%'; ?>
|
66 |
+
</button>
|
67 |
+
</li>
|
68 |
+
<?php
|
69 |
+
}
|
70 |
+
?>
|
71 |
+
</ul>
|
72 |
+
<?php endif; ?>
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
<tr class="form-field">
|
76 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[description]"><?php esc_html_e('Meta Description: ', 'platinum-seo-pack'); ?></label></th>
|
77 |
+
<td><textarea name="psp_seo_meta[description]" rows="5" id="psp_seo_meta[description]"><?php echo ( isset($psp_seo_meta['description']) ? html_entity_decode(stripcslashes(esc_textarea($psp_seo_meta['description']))) : ''); ?></textarea><br />
|
78 |
+
<p class="description"><?php esc_html_e('Set meta desciption to be used for this post/page.', 'platinum-seo-pack'); ?></p>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<tr class="form-field">
|
82 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[maxsnippet]"><?php esc_html_e('Max Snippet: ', 'platinum-seo-pack'); ?></label></th>
|
83 |
+
<td><input style="width:15%;" type="number" min="-1" name="psp_seo_meta[maxsnippet]" id="psp_seo_meta[maxsnippet]" maxlength="3" value="<?php echo ( isset($psp_seo_meta['maxsnippet']) ? ($psp_seo_meta['maxsnippet'] == 'zero' ? 0: esc_attr($psp_seo_meta['maxsnippet'])) : ''); ?>" /><?php esc_html_e(' Characters. [Optional]', 'platinum-seo-pack'); ?><br />
|
84 |
+
<p class="description"><?php echo esc_html__('Set max snippet length directive to Google for this post/page.', 'platinum-seo-pack').' <a href="https://techblissonline.com/" target="_blank">'.esc_html__('Read more', 'platinum-seo-pack').'...</a>'; ?></p>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
<tr class="form-field">
|
88 |
+
<th style="width:20%;" scope="row" valign="top"><label for="psp_seo_meta[keywords]"><?php esc_html_e('Meta Keywords: ', 'platinum-seo-pack'); ?></label></th>
|
89 |
+
<td><input type="text" name="psp_seo_meta[keywords]" id="psp_seo_meta[keywords]" value="<?php echo ( isset($psp_seo_meta['keywords']) ? esc_attr($psp_seo_meta['keywords']) : ''); ?>"><br />
|
90 |
+
<p class="description"><?php esc_html_e('Set meta keywords to be used for this post/page.', 'platinum-seo-pack'); ?></p>
|
91 |
+
</td>
|
92 |
+
</tr>
|
93 |
+
</table>
|
psp-include/settings/psp_basic_social_metabox_renderer.php
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Platinum SEO Pack
|
4 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
5 |
+
Author: Rajesh - Techblissonline
|
6 |
+
Author URI: http://techblissonline.com/
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<tr class="form-field">
|
10 |
+
<th scope="row" valign="top"><h4><strong><?php esc_html_e('Meta Tags for Social Media - Facebook, Twitter, Pinterest and LinkedIn: ', 'platinum-seo-pack'); ?></strong></h4></th></tr>
|
11 |
+
<p class="description"><?php echo esc_html__('If the following title and description fields are not filled in, corresponding Techblissonline Platinum SEO meta data will be used to render social meta tags for social sites. For more advanced control on social meta tags i.e open graph, twitter cards and schema.org tags for individual social sites, use the advanced social tab.', 'platinum-seo-pack').'<a href="https://techblissonline.com/facebook-optimization/" target="_blank">'.esc_html__('Facebook Optimization Guide', 'platinum-seo-pack').'</a>'.' | '.' <a href="https://techblissonline.com/twitter-card-optimization/" target="_blank">'.esc_html__('Twitter Card Optimization Guide', 'platinum-seo-pack').'</a>'; ?></p>
|
12 |
+
<table class="form-table">
|
13 |
+
<tr class="form-field">
|
14 |
+
<th style="width:20%;" scope="row" valign="top"><label for="fb_title"><?php esc_html_e('Title for Social media (Facebook): ', 'platinum-seo-pack'); ?></label></th>
|
15 |
+
<td><input type="text" name="psp_social_meta[fb_title]" id="fb_title" value="<?php echo (isset($psp_social_meta['fb_title']) ? html_entity_decode(stripcslashes(esc_attr($psp_social_meta['fb_title']))) : ''); ?>"><br />
|
16 |
+
<p class="description"><?php esc_html_e('Set title to be used for sharing this post/page on faceook and other social media sites.', 'platinum-seo-pack'); ?></p>
|
17 |
+
</td>
|
18 |
+
</tr>
|
19 |
+
<tr class="form-field">
|
20 |
+
<th style="width:20%;" scope="row" valign="top"><label for="fb_description"><?php esc_html_e('Description for Social media( Facebook): ', 'platinum-seo-pack'); ?></label></th>
|
21 |
+
<td><textarea name="psp_social_meta[fb_description]" id="fb_description"><?php echo (isset($psp_social_meta['fb_description']) ? html_entity_decode(stripcslashes(esc_textarea($psp_social_meta['fb_description']))) : ''); ?></textarea><br />
|
22 |
+
<p class="description"><?php esc_html_e('Set description to be used for sharing this post/page on faceook and other social media sites.', 'platinum-seo-pack'); ?></p>
|
23 |
+
</td>
|
24 |
+
</tr>
|
25 |
+
<tr class="form-field">
|
26 |
+
<th style="width:20%;" scope="row" valign="top"><label for="fb_image"><?php esc_html_e('Images for Social media (Facebook): ', 'platinum-seo-pack'); ?></label></th>
|
27 |
+
<td><input style="width:75%;" type="text" name="psp_social_meta[fb_image]" id="fb_image" value="<?php echo (isset($psp_social_meta['fb_image']) ? esc_url($psp_social_meta['fb_image']) : ''); ?>"><input style="width:20%;" id="fb_image_btn" class="upload_image_button" type="button" value="Upload" /><br />
|
28 |
+
<p class="description"><?php echo esc_html__('Enter an URL to an image or upload an image to be used for sharing this post/page on faceook and other social media sites.', 'platinum-seo-pack').'<a href="https://techblissonline.com/facebook-optimization/#image" target="_blank">'.esc_html__('Image Guidelines','platinum-seo-pack').'</a>'; ?></p>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
</table>
|
psp-include/settings/psp_pre_settings.php
ADDED
@@ -0,0 +1,854 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Techblissonline Platinum SEO and Social Pack
|
5 |
+
Description: App ID and Secret Management class
|
6 |
+
Text Domain: platinum-seo-pack
|
7 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
8 |
+
Author: Rajesh - Techblissonline
|
9 |
+
Author URI: https://techblissonline.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
class PspPreSettings extends PspSettings {
|
13 |
+
|
14 |
+
private static $obj_handle = null;
|
15 |
+
|
16 |
+
// this is the URL our updater / license checker pings.
|
17 |
+
private static $PSPP_SITE_URL = 'https://techblissonline.com/tools/platinum-seo-wordpress-premium/';
|
18 |
+
|
19 |
+
// Product Name
|
20 |
+
private static $PSPP_ITEM_NAME = 'techblissonline_platinum_seo_premium';
|
21 |
+
|
22 |
+
// the name of the settings page for the license input field to be displayed
|
23 |
+
private static $PSPP_LICENSE_PAGE = 'pspp-license';
|
24 |
+
|
25 |
+
private $psp_helper;
|
26 |
+
private $psp_settings_instance;
|
27 |
+
private $sitename;
|
28 |
+
private $sitedescription;
|
29 |
+
|
30 |
+
private $plugin_settings_tabs = array();
|
31 |
+
|
32 |
+
private $psp_pre_security_settings_group = 'psp_pre_credentials';
|
33 |
+
|
34 |
+
protected $psp_plugin_options_key = 'psp-pre-by-techblissonline';
|
35 |
+
//private $psp_plugin_lic_key = 'psp-pre-by-techblissonline';
|
36 |
+
private $psp_settings_tabs = array();
|
37 |
+
|
38 |
+
private $psp_pre_settings = array();
|
39 |
+
private $psp_settings = array();
|
40 |
+
|
41 |
+
public static function get_instance() {
|
42 |
+
|
43 |
+
if ( null == self::$obj_handle ) {
|
44 |
+
self::$obj_handle = new self;
|
45 |
+
}
|
46 |
+
|
47 |
+
return self::$obj_handle;
|
48 |
+
|
49 |
+
} // end get_instance;
|
50 |
+
|
51 |
+
function __construct() {
|
52 |
+
|
53 |
+
$psp_helper_instance = PspHelper::get_instance();
|
54 |
+
$this->psp_helper = $psp_helper_instance;
|
55 |
+
|
56 |
+
//$psp_settings_instance = PspSettings::get_instance();
|
57 |
+
//$this->psp_settings_instance = $psp_settings_instance;
|
58 |
+
|
59 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
60 |
+
|
61 |
+
if (get_option("psp_tools_plugin_url")) {
|
62 |
+
self::$PSPP_SITE_URL = get_option("psp_tools_plugin_url");
|
63 |
+
}
|
64 |
+
|
65 |
+
$this->psp_settings_tabs[$this->psp_pre_security_settings_group] = 'Licenses';
|
66 |
+
//$this->psp_settings_tabs[$this->psp_home_settings_group] = 'Home';
|
67 |
+
$this->psp_settings = get_option("psp_sitewide_settings");
|
68 |
+
|
69 |
+
add_action( 'admin_init', array( &$this, 'psp_pre_settings_init' ) );
|
70 |
+
//add_action( 'admin_init', array( &$this, 'pspp_init_plugin_updater' ), 0 );
|
71 |
+
|
72 |
+
add_action('admin_init', array( &$this, 'pspp_activate_license') );
|
73 |
+
add_action('admin_init', array( &$this, 'pspp_deactivate_license') );
|
74 |
+
add_action('admin_init', array( &$this, 'pspp_check_license') );
|
75 |
+
//add_action( 'admin_notices', array( &$this, 'pspp_admin_notices') );
|
76 |
+
//add_action( 'admin_menu', array( &$this, 'add_admin_menus' ) );
|
77 |
+
/***
|
78 |
+
if( !class_exists( 'PSPP_SL_Plugin_Updater' ) ) {
|
79 |
+
// load our custom updater
|
80 |
+
include( dirname( __FILE__ ) . '/PSPP_SL_Plugin_Updater.php' );
|
81 |
+
}
|
82 |
+
***/
|
83 |
+
|
84 |
+
//add_filter('puc_request_info_query_args-'.$this->slug, 'psp_premium_auto_updater_query_args');
|
85 |
+
|
86 |
+
//Use version 2.0 of the automatic update checker.
|
87 |
+
/*require 'plugin-updates/plugin-update-checker.php';
|
88 |
+
$PspPremiumUpdateChecker = new PluginUpdateChecker_2_1 (
|
89 |
+
'http://techblissonline.com/path/to/metadata.json',
|
90 |
+
__FILE__,
|
91 |
+
'platinum-seo-pack-premium'
|
92 |
+
);
|
93 |
+
$PspPremiumUpdateChecker->addQueryArgFilter('psp_premium_auto_updater_query_args');*/
|
94 |
+
}
|
95 |
+
/***
|
96 |
+
function pspp_init_plugin_updater() {
|
97 |
+
|
98 |
+
// retrieve our license key from the DB
|
99 |
+
//$license_key = trim( get_option( 'pspp_license_key' ) );
|
100 |
+
$psp_pre_settings = $this->psp_pre_settings;
|
101 |
+
$psp_pre_setting = get_option('psp_pre_setting');
|
102 |
+
if ($psp_pre_settings) {
|
103 |
+
$license_key = isset($psp_pre_settings['psp_premium_license_key']) ? trim($psp_pre_settings['psp_premium_license_key']) : '';
|
104 |
+
$status = isset($psp_pre_setting['psp_premium_license_key_status']) ? trim ($psp_pre_setting['psp_premium_license_key_status']) : '';
|
105 |
+
|
106 |
+
// setup the updater
|
107 |
+
$pspp_updater = new PSPP_SL_Plugin_Updater( self::$PSPP_SITE_URL, __FILE__, array(
|
108 |
+
'version' => '1.0', // current version number
|
109 |
+
'license' => $license_key, // license key (used get_option above to retrieve from DB)
|
110 |
+
'item_name' => self::$PSPP_ITEM_NAME, // name of this plugin
|
111 |
+
'author' => 'Rajesh - Techblissonline.com', // author of this plugin
|
112 |
+
'url' => esc_url(home_url())
|
113 |
+
)
|
114 |
+
);
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
119 |
+
***/
|
120 |
+
function psp_pre_settings_init() {
|
121 |
+
|
122 |
+
$tab = isset( $_GET['psppretab'] ) ? Sanitize_key($_GET['psppretab']) : $this->psp_pre_security_settings_group;
|
123 |
+
|
124 |
+
wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
125 |
+
|
126 |
+
$this->register_pre_security_settings();
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
//filter query args for automatic upgrades
|
131 |
+
/***
|
132 |
+
function psp_premium_auto_updater_query_args($queryArgs = array()) {
|
133 |
+
|
134 |
+
$psp_pre_settings = get_option("psp_pre_settings");
|
135 |
+
|
136 |
+
if ($psp_pre_settings) {
|
137 |
+
|
138 |
+
$psp_client_id = isset($psp_pre_settings['psp_premium_client_id']) ? esc_attr($psp_pre_settings['psp_premium_client_id']) : '';
|
139 |
+
$psp_license_key = isset($psp_pre_settings['psp_premium_license_key']) ? esc_attr($psp_pre_settings['psp_premium_license_key']) : '';
|
140 |
+
$psp_secret_key = isset($psp_pre_settings['psp_premium_client_secret']) ? esc_attr($psp_pre_settings['psp_premium_client_secret']) : '';
|
141 |
+
|
142 |
+
$queryArgs['psp_client_id'] = $psp_client_id;
|
143 |
+
$queryArgs['psp_license_key'] = $psp_license_key;
|
144 |
+
$queryArgs['psp_secret_key'] = $psp_secret_key;
|
145 |
+
|
146 |
+
}
|
147 |
+
|
148 |
+
return $queryArgs;
|
149 |
+
|
150 |
+
}
|
151 |
+
***/
|
152 |
+
|
153 |
+
/*
|
154 |
+
* Registers the Home SEO settings and appends the
|
155 |
+
* key to the plugin settings tabs array.
|
156 |
+
*/
|
157 |
+
private function register_pre_security_settings() {
|
158 |
+
$this->psp_settings_tabs[$this->psp_pre_security_settings_group] = 'Licenses';
|
159 |
+
$psp_pre_settings_name = "psp_pre_settings";
|
160 |
+
|
161 |
+
$psp_pre_settings = get_option($psp_pre_settings_name);
|
162 |
+
if (!empty($psp_pre_settings)) $this->psp_pre_settings = $psp_pre_settings;
|
163 |
+
|
164 |
+
wp_enqueue_script( 'psp-input-toggler', plugins_url( '/js/pspinputtypetoggler.js', __FILE__ ), array( 'jquery' ) );
|
165 |
+
//register
|
166 |
+
register_setting( $this->psp_pre_security_settings_group, $psp_pre_settings_name, array( &$this, 'psp_sanitize_license' ) );
|
167 |
+
//add Section
|
168 |
+
add_settings_section( 'psp_section_pre_license', esc_html__('Platinum SEO and Social Premium Pack License', 'platinum-seo-pack' ), array( &$this, 'section_pre_license_desc' ), $this->psp_pre_security_settings_group );
|
169 |
+
//add fields
|
170 |
+
$psp_license_key_field = array (
|
171 |
+
'label_for' => 'psp_license_key_id',
|
172 |
+
'option_name' => $psp_pre_settings_name.'[psp_premium_license_key]',
|
173 |
+
'option_value' => isset($psp_pre_settings['psp_premium_license_key']) ? esc_attr($psp_pre_settings['psp_premium_license_key']) : '',
|
174 |
+
'option_description' => esc_html__( 'Enter your Platinum SEO and Social Premium Pack License Key. The license key is used for access to premium features and their upgrades.', 'platinum-seo-pack' ),
|
175 |
+
);
|
176 |
+
add_settings_field( 'psp_license_key_id', '<a href="'.self::$PSPP_SITE_URL.'" target="_blank">'.esc_html__('Techblissonline Platinum SEO Premium License Key ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_password' ), $this->psp_pre_security_settings_group, 'psp_section_pre_license', $psp_license_key_field);
|
177 |
+
|
178 |
+
$psp_license_client_field = array (
|
179 |
+
'label_for' => 'psp_license_client_id',
|
180 |
+
'option_name' => $psp_pre_settings_name.'[psp_premium_client_id]',
|
181 |
+
'option_value' => isset($psp_pre_settings['psp_premium_client_id']) ? esc_attr($psp_pre_settings['psp_premium_client_id']) : '',
|
182 |
+
'option_description' => esc_html__( 'Enter your Platinum SEO and Social Premium Pack Client ID.', 'platinum-seo-pack' ),
|
183 |
+
);
|
184 |
+
add_settings_field( 'psp_license_client_id', '<a href="'.self::$PSPP_SITE_URL.'" target="_blank">'.esc_html__('Techblissonline Platinum SEO Premium Client ID ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_password' ), $this->psp_pre_security_settings_group, 'psp_section_pre_license', $psp_license_client_field);
|
185 |
+
}
|
186 |
+
|
187 |
+
function section_pre_license_desc() {echo ''; }
|
188 |
+
function section_pre_credentials_desc() {echo ''; }
|
189 |
+
|
190 |
+
function psp_sanitize_license( $new_settings ) {
|
191 |
+
|
192 |
+
//$psp_pre_settings = $this->psp_pre_settings;
|
193 |
+
//$old = isset($psp_pre_settings['psp_premium_license_key']) ? $psp_pre_settings['psp_premium_license_key'] : '';
|
194 |
+
/******
|
195 |
+
if( $old && $old != $new_settings['psp_premium_license_key'] ) {
|
196 |
+
$psp_pre_settings['psp_premium_license_key'] = ""; // new license has been entered, so must reactivate
|
197 |
+
}
|
198 |
+
******/
|
199 |
+
if( empty( $new_settings['psp_premium_license_key'] ) ) {
|
200 |
+
add_settings_error('psp_pre_settings', esc_attr( 'empty_license_key' ), 'License Key cannot be empty', 'error');
|
201 |
+
return false;
|
202 |
+
}
|
203 |
+
|
204 |
+
if( empty( $new_settings['psp_premium_client_id'] ) ) {
|
205 |
+
add_settings_error('psp_pre_settings', esc_attr( 'empty_client_id' ), 'Client ID cannot be empty', 'error');
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
if( !empty( $new_settings['psp_premium_license_key'] ) ) $new_settings['psp_premium_license_key'] = sanitize_text_field( $new_settings['psp_premium_license_key'] );
|
210 |
+
if( !empty( $new_settings['psp_premium_client_id'] ) ) $new_settings['psp_premium_client_id'] = sanitize_text_field( $new_settings['psp_premium_client_id'] );
|
211 |
+
return $new_settings;
|
212 |
+
}
|
213 |
+
|
214 |
+
/*
|
215 |
+
* Callback for adding a textfield.
|
216 |
+
*/
|
217 |
+
function psp_add_field_password(array $args) {
|
218 |
+
|
219 |
+
$option_name = isset($args['option_name']) ? esc_attr($args['option_name']) : '';
|
220 |
+
$id = isset($args['label_for']) ? esc_attr($args['label_for']) : '';
|
221 |
+
$option_value = isset($args['option_value']) ? esc_attr( $args['option_value'] ) : '';
|
222 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
223 |
+
|
224 |
+
echo "<input id='".esc_attr($id)."' name='".esc_attr($option_name)."' class='regular-text' style='width:95%' type='password' autofill='off' value='".esc_attr($option_value)."' /><span class='dashicons dashicons-hidden view-obfuscated-text'></span><br/><p class='description'>".html_entity_decode($option_description)."</p>";
|
225 |
+
|
226 |
+
}
|
227 |
+
|
228 |
+
function pspp_activate_license() {
|
229 |
+
|
230 |
+
// listen for our activate button to be clicked
|
231 |
+
if( isset( $_POST['pspp_license_activate'] ) ) {
|
232 |
+
|
233 |
+
// run a quick security check
|
234 |
+
if( ! check_admin_referer( 'pspp_nonce', 'pspp_nonce' ) )
|
235 |
+
return; // get out if we didn't click the Activate button
|
236 |
+
|
237 |
+
// retrieve the license from the database
|
238 |
+
//$license = trim( get_option( 'pspp_license_key' ) );
|
239 |
+
$psp_pre_settings = $this->psp_pre_settings;
|
240 |
+
$psp_settings = $this->psp_settings;
|
241 |
+
$psp_pre_setting = get_option('psp_pre_setting');
|
242 |
+
$license = isset($psp_pre_settings['psp_premium_license_key']) ? trim(esc_attr($psp_pre_settings['psp_premium_license_key'])) : '';
|
243 |
+
$clientid = isset($psp_pre_settings['psp_premium_client_id']) ? trim (esc_attr($psp_pre_settings['psp_premium_client_id'])) : '';
|
244 |
+
$status = isset($psp_pre_setting['psp_premium_license_key_status']) ? trim (esc_attr($psp_pre_setting['psp_premium_license_key_status'])) : '';
|
245 |
+
$psp_license_status = "";
|
246 |
+
|
247 |
+
if( $status !== "" && $status == 'valid' ) {
|
248 |
+
return;
|
249 |
+
}
|
250 |
+
|
251 |
+
if(!$license || !$clientid) {
|
252 |
+
return;
|
253 |
+
}
|
254 |
+
|
255 |
+
$home_url = esc_url(home_url());
|
256 |
+
$urlparts = parse_url(esc_url(home_url()));
|
257 |
+
$domain = $urlparts['host'];
|
258 |
+
$installed_version = '2.0';
|
259 |
+
|
260 |
+
// data to send in our API request
|
261 |
+
$api_params = array(
|
262 |
+
'pspp-action'=> 'activate_license',
|
263 |
+
'license_key' => $license,
|
264 |
+
'clientid' => $clientid,
|
265 |
+
'domain' => $domain,
|
266 |
+
'installed_version' => $installed_version,
|
267 |
+
'item_name' => urlencode( self::$PSPP_ITEM_NAME ),
|
268 |
+
'url' => $home_url
|
269 |
+
);
|
270 |
+
|
271 |
+
// Call the custom API.
|
272 |
+
$response = wp_remote_post( self::$PSPP_SITE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
273 |
+
|
274 |
+
//error_log("Response ".print_r($response, true));
|
275 |
+
|
276 |
+
// make sure the response came back okay
|
277 |
+
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
278 |
+
|
279 |
+
if ( is_wp_error( $response ) ) {
|
280 |
+
$message = sanitize_text_field($response->get_error_message());
|
281 |
+
} else {
|
282 |
+
$message = esc_html__( 'An error occurred, please try again.', 'platinum-seo-pack' );
|
283 |
+
}
|
284 |
+
|
285 |
+
} else {
|
286 |
+
|
287 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
288 |
+
//error_log('license data '.print_r($license_data, true));
|
289 |
+
if ( $license_data && 'FAIL' === $license_data->success ) {
|
290 |
+
|
291 |
+
switch( $license_data->error ) {
|
292 |
+
|
293 |
+
case 'expired' :
|
294 |
+
|
295 |
+
$message = sprintf(
|
296 |
+
esc_html__( 'Your license key expired on %s.', 'platinum-seo-pack' ),
|
297 |
+
date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )
|
298 |
+
);
|
299 |
+
break;
|
300 |
+
|
301 |
+
case 'revoked' :
|
302 |
+
|
303 |
+
$message = esc_html__( 'Your license key has been disabled.' , 'platinum-seo-pack');
|
304 |
+
break;
|
305 |
+
|
306 |
+
case 'license_already_active' :
|
307 |
+
|
308 |
+
//$message = __( 'Your domain is already active using this license key.' );
|
309 |
+
$psp_license_status = "activated";
|
310 |
+
break;
|
311 |
+
|
312 |
+
case 'empty_license' :
|
313 |
+
|
314 |
+
$message = esc_html__( 'lience key is empty.' , 'platinum-seo-pack' );
|
315 |
+
break;
|
316 |
+
|
317 |
+
case 'invalid_client_id' :
|
318 |
+
|
319 |
+
$message = esc_html__( 'Client ID is Imvalid.' , 'platinum-seo-pack' );
|
320 |
+
break;
|
321 |
+
|
322 |
+
case 'missing' :
|
323 |
+
|
324 |
+
$message = esc_html__( 'Invalid license.' , 'platinum-seo-pack');
|
325 |
+
break;
|
326 |
+
|
327 |
+
case 'empty_request' :
|
328 |
+
|
329 |
+
$message = esc_html__( 'Request was empty. Try again.' , 'platinum-seo-pack');
|
330 |
+
break;
|
331 |
+
|
332 |
+
case 'invalid_request' :
|
333 |
+
|
334 |
+
$message = esc_html__( 'Request was invalid.', 'platinum-seo-pack' );
|
335 |
+
break;
|
336 |
+
|
337 |
+
case 'empty_clientid' :
|
338 |
+
|
339 |
+
$message = esc_html__( 'Client ID was empty. Try again.', 'platinum-seo-pack' );
|
340 |
+
break;
|
341 |
+
|
342 |
+
case 'empty_domain' :
|
343 |
+
|
344 |
+
$message = esc_html__( 'Domain name was empty.', 'platinum-seo-pack' );
|
345 |
+
break;
|
346 |
+
|
347 |
+
case 'invalid' :
|
348 |
+
case 'site_inactive' :
|
349 |
+
|
350 |
+
$message = esc_html__( 'Your license is not active for this URL.', 'platinum-seo-pack' );
|
351 |
+
break;
|
352 |
+
|
353 |
+
case 'item_name_mismatch' :
|
354 |
+
|
355 |
+
$message = sprintf( esc_html__( 'This appears to be an invalid license key for %s.' , 'platinum-seo-pack'), self::$PSPP_ITEM_NAME );
|
356 |
+
break;
|
357 |
+
|
358 |
+
case 'no_activations_left':
|
359 |
+
|
360 |
+
$message = esc_html__( 'Your license key has reached its activation limit.', 'platinum-seo-pack' );
|
361 |
+
break;
|
362 |
+
|
363 |
+
default :
|
364 |
+
|
365 |
+
$message = esc_html__( 'An error occurred, please try again.' , 'platinum-seo-pack');
|
366 |
+
break;
|
367 |
+
}
|
368 |
+
|
369 |
+
}
|
370 |
+
|
371 |
+
}
|
372 |
+
|
373 |
+
// decode the license data
|
374 |
+
//$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
375 |
+
|
376 |
+
// $license_data->license will be either "valid" or "invalid"
|
377 |
+
|
378 |
+
// Check if anything passed on a message constituting a failure
|
379 |
+
if ( ! empty( $message ) ) {
|
380 |
+
//$base_url = admin_url( 'plugins.php?page=' . self::$PSPP_LICENSE_PAGE );
|
381 |
+
//$redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
382 |
+
|
383 |
+
add_settings_error('psp_pre_settings', 'activation_error', esc_html($message), 'error');
|
384 |
+
return false;
|
385 |
+
|
386 |
+
//wp_redirect( $redirect );
|
387 |
+
//exit();
|
388 |
+
}
|
389 |
+
//if (!$license_data->license) return;
|
390 |
+
if( isset($license_data->license) && ($license_data->license == 'valid') || $psp_license_status == "activated" ) {
|
391 |
+
$psp_settings['psp_premium_license_key_status'] = "valid";
|
392 |
+
$psp_settings['premium'] = 1;
|
393 |
+
$psp_pre_setting['psp_premium_license_key_status'] = 1;
|
394 |
+
update_option( 'psp_sitewide_settings', $psp_settings );
|
395 |
+
update_option( 'psp_pre_setting', $psp_pre_setting );
|
396 |
+
update_option( 'pspp_license_status', 'valid' );
|
397 |
+
|
398 |
+
//$base_url = admin_url( 'plugins.php?page=' . self::$PSPP_LICENSE_PAGE );
|
399 |
+
$message = esc_html__( 'License key successfully activated for this domain!', 'platinum-seo-pack' );
|
400 |
+
//$redirect = add_query_arg( array( 'sl_activation' => 'success', 'message' => urlencode( $message ) ), $base_url );
|
401 |
+
//Rajesh - captures successful activation
|
402 |
+
add_settings_error('psp_pre_settings', esc_html( 'activation_success' ), $message, 'updated');
|
403 |
+
return false;
|
404 |
+
//wp_redirect( $redirect );
|
405 |
+
//Rajesh - old redirect without capturing success message
|
406 |
+
//wp_redirect( admin_url( 'admin.php?page=' . self::$PSPP_LICENSE_PAGE ) );
|
407 |
+
//exit();
|
408 |
+
}
|
409 |
+
|
410 |
+
//wp_redirect( admin_url( 'plugins.php?page=' . self::$PSPP_LICENSE_PAGE ) );
|
411 |
+
//exit();
|
412 |
+
$message = esc_html__( 'Some unknown error occured during activation, Pls. try Again!', 'platinum-seo-pack' );
|
413 |
+
add_settings_error('psp_pre_settings', esc_html( 'activation_error' ), $message, 'error');
|
414 |
+
//return false;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
//deactivate license
|
419 |
+
function pspp_deactivate_license() {
|
420 |
+
|
421 |
+
// listen for our de-activate button to be clicked
|
422 |
+
if( isset( $_POST['pspp_license_deactivate'] ) ) {
|
423 |
+
|
424 |
+
// run a quick security check
|
425 |
+
if( ! check_admin_referer( 'pspp_nonce', 'pspp_nonce' ) )
|
426 |
+
return; // get out if we didn't click the Activate button
|
427 |
+
|
428 |
+
// retrieve the license from the database
|
429 |
+
//$license = trim( get_option( 'pspp_license_key' ) );
|
430 |
+
$psp_settings = $this->psp_settings;
|
431 |
+
$psp_pre_settings = $this->psp_pre_settings;
|
432 |
+
$psp_pre_setting = get_option('psp_pre_setting');
|
433 |
+
$psp_license_status = "";
|
434 |
+
|
435 |
+
$license = isset($psp_pre_settings['psp_premium_license_key']) ? trim(esc_attr($psp_pre_settings['psp_premium_license_key'])) : '';
|
436 |
+
$clientid = isset($psp_pre_settings['psp_premium_client_id']) ? trim (esc_attr($psp_pre_settings['psp_premium_client_id'])) : '';
|
437 |
+
$status = isset($psp_pre_setting['psp_premium_license_key_status']) ? trim (esc_attr($psp_pre_setting['psp_premium_license_key_status'])) : '';
|
438 |
+
|
439 |
+
if(! $status ) {
|
440 |
+
return;
|
441 |
+
}
|
442 |
+
|
443 |
+
if(!$license || !$clientid) {
|
444 |
+
return;
|
445 |
+
}
|
446 |
+
|
447 |
+
$home_url = esc_url(home_url());
|
448 |
+
$urlparts = parse_url(esc_url(home_url()));
|
449 |
+
$domain = $urlparts['host'];
|
450 |
+
$installed_version = '2.0';
|
451 |
+
|
452 |
+
// data to send in our API request
|
453 |
+
$api_params = array(
|
454 |
+
'pspp-action'=> 'deactivate_license',
|
455 |
+
'license_key' => $license,
|
456 |
+
'clientid' => $clientid,
|
457 |
+
'domain' => $domain,
|
458 |
+
'installed_version' => $installed_version,
|
459 |
+
'item_name' => urlencode( self::$PSPP_ITEM_NAME ), // the name of our product in PSPP
|
460 |
+
'url' => $home_url
|
461 |
+
);
|
462 |
+
|
463 |
+
// Call the custom API.
|
464 |
+
//$response = wp_remote_post( self::$PSPP_SITE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
465 |
+
|
466 |
+
// Call the custom API.
|
467 |
+
$response = wp_remote_post( self::$PSPP_SITE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
468 |
+
|
469 |
+
//error_log(print_r($response,true));
|
470 |
+
|
471 |
+
// make sure the response came back okay
|
472 |
+
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
473 |
+
|
474 |
+
if ( is_wp_error( $response ) ) {
|
475 |
+
$message = sanitize_text_field($response->get_error_message());
|
476 |
+
} else {
|
477 |
+
$message = esc_html__( 'An error occurred while deactivating, please try again.' , 'platinum-seo-pack' );
|
478 |
+
}
|
479 |
+
|
480 |
+
//$base_url = admin_url( 'admin.php?page=' . self::$PSPP_LICENSE_PAGE );
|
481 |
+
//$redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
482 |
+
|
483 |
+
//wp_redirect( $redirect );
|
484 |
+
//exit();
|
485 |
+
} else {
|
486 |
+
|
487 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
488 |
+
//error_log('license data '.print_r($license_data, true));
|
489 |
+
if ( $license_data && 'FAIL' === $license_data->success ) {
|
490 |
+
|
491 |
+
switch( $license_data->error ) {
|
492 |
+
|
493 |
+
case 'expired' :
|
494 |
+
|
495 |
+
$psp_license_status = "deactivated";
|
496 |
+
break;
|
497 |
+
|
498 |
+
case 'revoked' :
|
499 |
+
|
500 |
+
$psp_license_status = "deactivated";
|
501 |
+
break;
|
502 |
+
|
503 |
+
case 'license_already_active' :
|
504 |
+
|
505 |
+
//$message = __( 'Your domain already uses this license key.' );
|
506 |
+
$psp_license_status = "deactivated";
|
507 |
+
break;
|
508 |
+
|
509 |
+
case 'empty_license' :
|
510 |
+
|
511 |
+
$message = esc_html__( 'lience key was empty.' , 'platinum-seo-pack');
|
512 |
+
break;
|
513 |
+
|
514 |
+
case 'invalid_client_id' :
|
515 |
+
|
516 |
+
$message = esc_html__( 'Client ID is Imvalid.', 'platinum-seo-pack' );
|
517 |
+
break;
|
518 |
+
|
519 |
+
case 'missing' :
|
520 |
+
|
521 |
+
$psp_license_status = "deactivated";
|
522 |
+
break;
|
523 |
+
|
524 |
+
case 'empty_request' :
|
525 |
+
|
526 |
+
$message = esc_html__( 'Request was empty. Try again.', 'platinum-seo-pack' );
|
527 |
+
break;
|
528 |
+
|
529 |
+
case 'invalid_request' :
|
530 |
+
|
531 |
+
$message = esc_html__( 'Request was invalid.' , 'platinum-seo-pack');
|
532 |
+
break;
|
533 |
+
|
534 |
+
case 'empty_clientid' :
|
535 |
+
|
536 |
+
$message = esc_html__( 'Client ID was empty. Try again.' , 'platinum-seo-pack');
|
537 |
+
break;
|
538 |
+
|
539 |
+
case 'empty_domain' :
|
540 |
+
|
541 |
+
$message = esc_html__( 'Domain name was empty.' , 'platinum-seo-pack');
|
542 |
+
break;
|
543 |
+
|
544 |
+
case 'invalid' :
|
545 |
+
case 'site_inactive' :
|
546 |
+
|
547 |
+
$message = esc_html__( 'Your license is not active for this URL.' , 'platinum-seo-pack');
|
548 |
+
break;
|
549 |
+
|
550 |
+
case 'item_name_mismatch' :
|
551 |
+
|
552 |
+
$message = sprintf( esc_html__( 'This appears to be an invalid license key for %s.' , 'platinum-seo-pack'), self::$PSPP_ITEM_NAME );
|
553 |
+
break;
|
554 |
+
|
555 |
+
case 'no_activations_left':
|
556 |
+
|
557 |
+
//$message = __( 'Your license key has reached its activation limit.' );
|
558 |
+
$psp_license_status = "deactivated";
|
559 |
+
break;
|
560 |
+
|
561 |
+
default :
|
562 |
+
|
563 |
+
$message = esc_html__( 'An error occurred, please try again.' , 'platinum-seo-pack');
|
564 |
+
break;
|
565 |
+
}
|
566 |
+
|
567 |
+
}
|
568 |
+
|
569 |
+
}
|
570 |
+
|
571 |
+
//Further processing for deactivation
|
572 |
+
|
573 |
+
|
574 |
+
// Check if anything passed on a message constituting a failure
|
575 |
+
if ( ! empty( $message ) ) {
|
576 |
+
//$base_url = admin_url( 'admin.php?page=' . self::$PSPP_LICENSE_PAGE );
|
577 |
+
//$redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );
|
578 |
+
|
579 |
+
//error_log('message '.print_r($message, true));
|
580 |
+
//wp_redirect( $redirect );
|
581 |
+
//exit();
|
582 |
+
add_settings_error('psp_pre_settings', 'deactivation_error', esc_html($message), 'error');
|
583 |
+
return false;
|
584 |
+
}
|
585 |
+
|
586 |
+
// decode the license data
|
587 |
+
//$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
588 |
+
// $license_data->license will be either "deactivated" or "failed"
|
589 |
+
|
590 |
+
//if deactivated successfully
|
591 |
+
if( (isset($license_data) && ($license_data->license == 'deactivated')) || $psp_license_status == "deactivated" ) {
|
592 |
+
|
593 |
+
$psp_pre_setting['psp_premium_license_key_status'] = "";
|
594 |
+
$psp_settings['psp_premium_license_key_status'] = "";
|
595 |
+
//unset($psp_settings['psp_premium_license_key_status']);
|
596 |
+
|
597 |
+
update_option( 'psp_sitewide_settings', $psp_settings );
|
598 |
+
update_option( 'psp_pre_setting', $psp_pre_setting );
|
599 |
+
delete_option( 'pspp_license_status' );
|
600 |
+
|
601 |
+
$message = esc_html__( 'License key successfully deactivated for this domain!','platinum-seo-pack' );
|
602 |
+
|
603 |
+
add_settings_error('psp_pre_settings', 'deactivation_success', esc_html($message), 'updated');
|
604 |
+
return false;
|
605 |
+
//$base_url = admin_url( 'admin.php?page=' . self::$PSPP_LICENSE_PAGE );
|
606 |
+
//$message = __( 'License key successfully deactivated!' );
|
607 |
+
//$redirect = add_query_arg( array( 'sl_activation' => 'success', 'message' => urlencode( $message ) ), $base_url );
|
608 |
+
//Rajesh - captures successful deactivation
|
609 |
+
//wp_redirect( $redirect );
|
610 |
+
//Rajesh - old redirect without capturing success message
|
611 |
+
//wp_redirect( admin_url( 'plugins.php?page=' . self::$PSPP_LICENSE_PAGE ) );
|
612 |
+
//exit();
|
613 |
+
|
614 |
+
}
|
615 |
+
|
616 |
+
$message = esc_html__( 'Some unknown error occured during deactivation, Pls. try Again!', 'platinum-seo-pack' );
|
617 |
+
add_settings_error('psp_pre_settings', 'deactivation_error', esc_html($message), 'error');
|
618 |
+
//return false;
|
619 |
+
|
620 |
+
//wp_redirect( admin_url( 'admin.php?page=' . self::$PSPP_LICENSE_PAGE ) );
|
621 |
+
//exit();
|
622 |
+
|
623 |
+
}
|
624 |
+
}
|
625 |
+
|
626 |
+
//check license status
|
627 |
+
function pspp_check_license() {
|
628 |
+
|
629 |
+
global $wp_version;
|
630 |
+
$psp_validity = "valid";
|
631 |
+
|
632 |
+
// listen for our de-activate button to be clicked
|
633 |
+
if( isset( $_POST['pspp_check_license'] ) && 'pspp_check' == sanitize_key($_POST['pspp_check_license'])) {
|
634 |
+
|
635 |
+
// retrieve the license from the database
|
636 |
+
//$license = trim( get_option( 'pspp_license_key' ) );
|
637 |
+
$psp_settings = $this->psp_settings;
|
638 |
+
$psp_pre_setting = get_option('psp_pre_setting');
|
639 |
+
$psp_pre_settings = $this->psp_pre_settings;
|
640 |
+
|
641 |
+
$license = isset($psp_pre_settings['psp_premium_license_key']) ? trim(esc_attr($psp_pre_settings['psp_premium_license_key'])) : '';
|
642 |
+
$clientid = isset($psp_pre_settings['psp_premium_client_id']) ? trim (esc_attr($psp_pre_settings['psp_premium_client_id'])) : '';
|
643 |
+
$status = isset($psp_pre_setting['psp_premium_license_key_status']) ? trim (esc_attr($psp_pre_setting['psp_premium_license_key_status'])) : '';
|
644 |
+
|
645 |
+
if( $status !== 'valid' ) {
|
646 |
+
return;
|
647 |
+
}
|
648 |
+
|
649 |
+
if(!$license || !$clientid) {
|
650 |
+
return;
|
651 |
+
}
|
652 |
+
|
653 |
+
$home_url = esc_url(home_url());
|
654 |
+
$urlparts = parse_url(esc_url(home_url()));
|
655 |
+
$domain = $urlparts['host'];
|
656 |
+
$installed_version = '2.0';
|
657 |
+
|
658 |
+
// data to send in our API request
|
659 |
+
$api_params = array(
|
660 |
+
'pspp_action'=> 'validate_license',
|
661 |
+
'license_key' => $license,
|
662 |
+
'clientid' => $clientid,
|
663 |
+
'domain' => $domain,
|
664 |
+
'installed_version' => $installed_version,
|
665 |
+
'item_name' => urlencode( self::$PSPP_ITEM_NAME ), // the name of our product in PSPP
|
666 |
+
'url' =>$home_url
|
667 |
+
);
|
668 |
+
|
669 |
+
// Call the custom API.
|
670 |
+
$response = wp_remote_post( self::$PSPP_SITE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
671 |
+
|
672 |
+
if ( is_wp_error( $response ) )
|
673 |
+
return false;
|
674 |
+
|
675 |
+
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
676 |
+
|
677 |
+
if ( 'FAIL' === $license_data->success ) {
|
678 |
+
|
679 |
+
switch( $license_data->error ) {
|
680 |
+
|
681 |
+
case 'expired' :
|
682 |
+
|
683 |
+
$psp_validity = "invalid";
|
684 |
+
break;
|
685 |
+
|
686 |
+
case 'revoked' :
|
687 |
+
|
688 |
+
$psp_validity = "invalid";
|
689 |
+
break;
|
690 |
+
|
691 |
+
case 'missing' :
|
692 |
+
|
693 |
+
$psp_validity = "invalid";
|
694 |
+
break;
|
695 |
+
|
696 |
+
case 'invalid_client_id' :
|
697 |
+
|
698 |
+
$psp_validity = "invalid";
|
699 |
+
break;
|
700 |
+
|
701 |
+
default :
|
702 |
+
|
703 |
+
$psp_validity = "recheck";
|
704 |
+
break;
|
705 |
+
}
|
706 |
+
|
707 |
+
}
|
708 |
+
|
709 |
+
if( (isset($license_data) && $license_data->license == 'valid') ) {
|
710 |
+
//echo 'valid';
|
711 |
+
exit;
|
712 |
+
// this license is still valid
|
713 |
+
} else if($psp_validity == "invalid" || (isset($license_data) && $license_data->license == 'invalid')) {
|
714 |
+
//echo 'invalid';
|
715 |
+
$psp_pre_setting['psp_premium_license_key_status'] = "";
|
716 |
+
//$psp_pre_settings['psp_premium_license_key'] = "";
|
717 |
+
$psp_settings['psp_premium_license_key_status'] = "";
|
718 |
+
update_option( 'psp_sitewide_settings', $psp_settings );
|
719 |
+
update_option( 'psp_pre_setting', $psp_pre_setting );
|
720 |
+
delete_option( 'pspp_license_status' );
|
721 |
+
exit;
|
722 |
+
// this license is no longer valid
|
723 |
+
}
|
724 |
+
}
|
725 |
+
}
|
726 |
+
|
727 |
+
/**
|
728 |
+
* This is a means of catching errors from the activation method above and displaying it to the customer
|
729 |
+
*/
|
730 |
+
/***
|
731 |
+
function pspp_admin_notices() {
|
732 |
+
if ( isset( $_GET['sl_activation'] ) && ! empty( $_GET['message'] ) ) {
|
733 |
+
|
734 |
+
switch( Sanitize_key($_GET['sl_activation']) ) {
|
735 |
+
|
736 |
+
case 'false':
|
737 |
+
$message = urldecode( Sanitize_key($_GET['message']) );
|
738 |
+
?>
|
739 |
+
<div class="notice notice-error">
|
740 |
+
<p><?php echo esc_html($message); ?></p>
|
741 |
+
</div>
|
742 |
+
<?php
|
743 |
+
break;
|
744 |
+
case 'success':
|
745 |
+
$message = urldecode( Sanitize_key($_GET['message']) );
|
746 |
+
?>
|
747 |
+
<div class="notice notice-success is-dismissible">
|
748 |
+
<p><?php echo esc_html($message); ?></p>
|
749 |
+
</div>
|
750 |
+
<?php
|
751 |
+
break;
|
752 |
+
|
753 |
+
case 'true':
|
754 |
+
default:
|
755 |
+
break;
|
756 |
+
|
757 |
+
}
|
758 |
+
}
|
759 |
+
}
|
760 |
+
***/
|
761 |
+
function psp_pre_options_page() { ?>
|
762 |
+
<?php wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
763 |
+
include_once( 'psp_tools_renderer.php' ); ?>
|
764 |
+
<?php }
|
765 |
+
|
766 |
+
/*
|
767 |
+
* renders Plugin settings page, checks
|
768 |
+
* for the active tab and replaces key with the related
|
769 |
+
* settings key. Uses the plugin_options_tabs method
|
770 |
+
* to render the tabs.
|
771 |
+
*/
|
772 |
+
function psp_premium_options_page() {
|
773 |
+
$tab = isset( $_GET['psppretab'] ) ? Sanitize_key($_GET['psppretab']) : $this->psp_pre_security_settings_group;
|
774 |
+
$psp_button = "submit";
|
775 |
+
?>
|
776 |
+
<div class="wrap">
|
777 |
+
<h1 style='line-height:30px;'><?php esc_html_e('Techblissonline Platinum SEO Premium Pack', 'platinum-seo-pack') ?></h1>
|
778 |
+
<p style="color: red"><?php esc_html_e('You need to click the "Save Settings" button to save the changes you made to each individual tab before moving on to the next tab.', 'platinum-seo-pack') ?></p>
|
779 |
+
<?php $this->psp_pre_options_tabs(); ?>
|
780 |
+
<form name="platinum-seo-form" method="post" action="options.php">
|
781 |
+
<?php wp_nonce_field( 'update-pre-options' ); ?>
|
782 |
+
<?php settings_fields( $tab ); ?>
|
783 |
+
<?php settings_errors(); ?>
|
784 |
+
<?php do_settings_sections( $tab ); ?>
|
785 |
+
<?php $psp_pre_settings = get_option('psp_pre_settings');
|
786 |
+
$psp_pre_setting = get_option('psp_pre_setting');
|
787 |
+
$license = isset($psp_pre_settings['psp_premium_license_key']) ? esc_attr($psp_pre_settings['psp_premium_license_key']) : false;
|
788 |
+
$status = isset($psp_pre_setting['psp_premium_license_key_status']) ? esc_attr($psp_pre_setting['psp_premium_license_key_status']) : false;
|
789 |
+
?>
|
790 |
+
<?php if( false !== $license && $status) { ?>
|
791 |
+
<tr valign="top">
|
792 |
+
<th scope="row" valign="top">
|
793 |
+
<?php esc_html_e(''); ?>
|
794 |
+
</th>
|
795 |
+
<td>
|
796 |
+
<?php if( $status !== false && $status == 1 ) { ?>
|
797 |
+
<span style="color:green;"><?php esc_html_e('active'); ?></span>
|
798 |
+
<?php wp_nonce_field( 'pspp_nonce', 'pspp_nonce' ); ?>
|
799 |
+
<input type="submit" class="button-secondary" name="pspp_license_deactivate" value="<?php esc_html_e('Deactivate License'); ?>"/>
|
800 |
+
<?php } else {
|
801 |
+
$psp_button = "pspp_license_activate";
|
802 |
+
wp_nonce_field( 'pspp_nonce', 'pspp_nonce' ); ?>
|
803 |
+
<input type="submit" class="button-secondary" name="pspp_license_activate" value="<?php esc_html_e('Activate License'); ?>"/>
|
804 |
+
<?php } ?>
|
805 |
+
</td>
|
806 |
+
</tr>
|
807 |
+
<?php } else if ( false !== $license && !$status) { ?>
|
808 |
+
<tr valign="top">
|
809 |
+
<th scope="row" valign="top">
|
810 |
+
<?php esc_html_e(''); ?>
|
811 |
+
</th>
|
812 |
+
<td>
|
813 |
+
<?php $psp_button = "pspp_license_activate"; ?>
|
814 |
+
<span style="color:red;"><?php esc_html_e('inactive'); ?></span>
|
815 |
+
<?php wp_nonce_field( 'pspp_nonce', 'pspp_nonce' ); ?>
|
816 |
+
<input type="submit" class="button-secondary" name="pspp_license_activate" value="<?php esc_html_e('Activate License'); ?>"/>
|
817 |
+
</td>
|
818 |
+
</tr>
|
819 |
+
<?php } ?>
|
820 |
+
<?php submit_button('Save Credentials', 'primary', $psp_button, true, 'id="submit"'); ?>
|
821 |
+
</form>
|
822 |
+
|
823 |
+
<div class="sidebar-cta">
|
824 |
+
<h2>
|
825 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a>
|
826 |
+
</h2>
|
827 |
+
<div class="container bg-info" id="tools" style="width:100%">
|
828 |
+
<div class="row"><div class="h3 col-sm-12"><a class="btn-primary col-sm-12" href="https://techblissonline.com/tools/platinum-seo-wordpress-premium/" target="_blank">Platinum SEO Premium for wordpress</a></div><div class="h3 col-sm-12"><a class="btn-success col-sm-12" href="https://techblissonline.com/tools/" target="_blank">Techblissonline Platinum SEO Audit and Analysis Tools</a></div></div>
|
829 |
+
</div>
|
830 |
+
<a href="https://techblissonline.com/tools/" target="_blank">Be our Patreon and enjoy these premium Wordpress SEO tools for just $9</a>
|
831 |
+
<div class="container" style="width:100%"><a href="https://techblissonline.com/tools/" target="_blank"><span class="col-sm-12 dashicons dashicons-thumbs-up dashicons-psp"></span></a></div>
|
832 |
+
</div>
|
833 |
+
</div>
|
834 |
+
<?php
|
835 |
+
}
|
836 |
+
|
837 |
+
/*
|
838 |
+
* Renders our tabs in the plugin options page,
|
839 |
+
* walks through the object's tabs array and prints
|
840 |
+
* them one by one. Provides the heading for the
|
841 |
+
* psp_options_page method.
|
842 |
+
*/
|
843 |
+
function psp_pre_options_tabs() {
|
844 |
+
$current_tab = isset( $_GET['psppretab'] ) ? Sanitize_key($_GET['psppretab']) : $this->psp_pre_security_settings_group;
|
845 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
846 |
+
//screen_icon();
|
847 |
+
echo '<h2 class="nav-tab-wrapper">';
|
848 |
+
foreach ( $this->psp_settings_tabs as $tab_key => $tab_caption ) {
|
849 |
+
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
850 |
+
echo '<a class="nav-tab ' . esc_attr($active) . '" href="?page=' . esc_attr($this->psp_plugin_options_key) . '&psppretab=' . esc_attr($tab_key) . '">' . esc_attr($tab_caption) . '</a>';
|
851 |
+
}
|
852 |
+
echo '</h2>';
|
853 |
+
}
|
854 |
+
}
|
psp-include/settings/psp_premiumad_metabox_renderer.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Techblissonline Platinum SEO and Social Pack
|
4 |
+
Description: Complete SEO and Social optimization solution for your Wordpress blog/site.
|
5 |
+
Text Domain: platinum-seo-pack
|
6 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
7 |
+
Author: Rajesh - Techblissonline
|
8 |
+
Author URI: https://techblissonline.com/
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<div class="col-sm-9">
|
12 |
+
<div class="pspad col-sm-6">
|
13 |
+
<h2>
|
14 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a>
|
15 |
+
</h2>
|
16 |
+
<div class="bg-info row">
|
17 |
+
<div class="h3 col-sm-10"><a class="btn-primary col-sm-12" href="https://techblissonline.com/tools/platinum-seo-wordpress-premium/">Platinum SEO Premium for wordpress</a></div><div class="h3 col-sm-10"><a class="btn-success col-sm-12" href="https://techblissonline.com/tools/">Techblissonline Platinum SEO Audit and Analysis Tools</a></div>
|
18 |
+
</div>
|
19 |
+
<div class="row">
|
20 |
+
<a href="https://techblissonline.com/tools/" target="_blank" class="col-sm-12">Be our Patreon and enjoy these premium Wordpress SEO tools for just $9</a>
|
21 |
+
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<div class="pspad col-sm-1"><a href="https://techblissonline.com/tools/" target="_blank" class="col-sm-2"><span class="dashicons dashicons-thumbs-up dashicons-psp"></span></a></div>
|
25 |
+
</div>
|
psp-include/settings/psp_settings.php
ADDED
@@ -0,0 +1,4716 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Techblissonline Platinum SEO and Social Pack
|
5 |
+
Description: Complete SEO and Social optimization solution for your Wordpress blog/site.
|
6 |
+
Text Domain: platinum-seo-pack
|
7 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
8 |
+
Author: Rajesh - Techblissonline
|
9 |
+
Author URI: https://techblissonline.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
class PspSettings {
|
13 |
+
|
14 |
+
private static $obj_handle = null;
|
15 |
+
|
16 |
+
public $custom_taxonomies = array();
|
17 |
+
public $custom_post_types = array();
|
18 |
+
public $psp_wmt_instance;
|
19 |
+
public $psp_tools_instance;
|
20 |
+
public $psp_pre_instance;
|
21 |
+
public $psp_ga_instance;
|
22 |
+
public $psp_social_instance;
|
23 |
+
|
24 |
+
private $psp_helper;
|
25 |
+
private $sitename;
|
26 |
+
private $sitedescription;
|
27 |
+
|
28 |
+
private $psp_general_settings_group = 'psp_general';
|
29 |
+
private $psp_home_settings_group = 'psp_home';
|
30 |
+
private $psp_taxonomy_settings_group = 'psp_taxonomy';
|
31 |
+
private $psp_posttype_settings_group = 'psp_pt';
|
32 |
+
private $psp_archives_settings_group = 'psp_archive';
|
33 |
+
private $psp_permalink_settings_group = 'psp_permalink';
|
34 |
+
private $psp_social_settings_group = 'psp_social';
|
35 |
+
private $psp_other_settings_group = 'psp_others';
|
36 |
+
private $psp_breadcrumb_settings_group = 'psp_breadcrumb';
|
37 |
+
|
38 |
+
protected $psp_plugin_options_key = 'platinum-seo-social-pack-by-techblissonline';
|
39 |
+
private $psp_settings_tabs = array();
|
40 |
+
|
41 |
+
private $psp_post_meta_original = array();
|
42 |
+
private $psp_post_social_meta_original = array();
|
43 |
+
|
44 |
+
private $psp_taxonomy_meta_original = array();
|
45 |
+
private $psp_taxonomy_social_meta_original = array();
|
46 |
+
|
47 |
+
public static function get_instance() {
|
48 |
+
|
49 |
+
if ( null == self::$obj_handle ) {
|
50 |
+
self::$obj_handle = new self;
|
51 |
+
}
|
52 |
+
|
53 |
+
return self::$obj_handle;
|
54 |
+
|
55 |
+
} // end get_instance;
|
56 |
+
|
57 |
+
|
58 |
+
function __construct() {
|
59 |
+
//add_action( 'init', array( &$this, 'load_settings' ) );
|
60 |
+
//$psp_taxonomy_class = PSP_Tax_Seo_Metas::get_handle();
|
61 |
+
//$this->custom_taxonomies = $psp_taxonomy_class->get_cust_taxonomies();
|
62 |
+
|
63 |
+
// Add a query variable for redirecting categories with "category" base.
|
64 |
+
//add_filter('query_vars', array( &$this, 'psp_set_category_base_redir_var'));
|
65 |
+
// Redirect if 'techblissonline_psp_category_redirect' is set
|
66 |
+
//add_filter('request', array( &$this, 'psp_redirect_category_base_request'));
|
67 |
+
//
|
68 |
+
//add_action('init', array( &$this, 'psp_set_no_base_extra_permastruct'));
|
69 |
+
|
70 |
+
$psp_helper_instance = PspHelper::get_instance();
|
71 |
+
$this->psp_helper = $psp_helper_instance;
|
72 |
+
|
73 |
+
//$psp_wmt_instance = PspWebMasterToolSettings::get_instance();
|
74 |
+
//$this->psp_wmt_instance = $psp_wmt_instance;
|
75 |
+
|
76 |
+
$psp_pre_instance = PspPreSettings::get_instance();
|
77 |
+
$this->psp_pre_instance = $psp_pre_instance;
|
78 |
+
|
79 |
+
$psp_tools_instance = PspToolSettings::get_instance();
|
80 |
+
$this->psp_tools_instance = $psp_tools_instance;
|
81 |
+
|
82 |
+
$psp_social_instance = PspSocialSettings::get_instance();
|
83 |
+
$this->psp_social_instance = $psp_social_instance;
|
84 |
+
|
85 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
86 |
+
|
87 |
+
$psp_do_rewrite_rules = false;
|
88 |
+
|
89 |
+
$cust_taxonomies = array();
|
90 |
+
|
91 |
+
if ( null == $this->custom_taxonomies ) {
|
92 |
+
$args = array(
|
93 |
+
'public' => true,
|
94 |
+
'_builtin' => false
|
95 |
+
);
|
96 |
+
$output = 'names'; // or objects
|
97 |
+
$operator = 'and'; // 'and' or 'or'
|
98 |
+
$cust_taxonomies = get_taxonomies( $args, $output, $operator );
|
99 |
+
$this->custom_taxonomies = $cust_taxonomies;
|
100 |
+
}
|
101 |
+
/**
|
102 |
+
$psp_permalink_settings = get_option('psp_permalink_settings');
|
103 |
+
|
104 |
+
if (isset($psp_permalink_settings['category']) && $psp_permalink_settings['category']) {
|
105 |
+
$psp_do_rewrite_rules = true;
|
106 |
+
add_filter( 'category_rewrite_rules', array( &$this, 'psp_category_rewrite_rules' )); //add rewrite rules
|
107 |
+
}
|
108 |
+
|
109 |
+
foreach($cust_taxonomies as $cust_taxonomy) {
|
110 |
+
|
111 |
+
if (isset($psp_permalink_settings[$cust_taxonomy]) && $psp_permalink_settings[$cust_taxonomy]) {
|
112 |
+
$psp_filter = $cust_taxonomy."_rewrite_rules";
|
113 |
+
|
114 |
+
add_filter( $psp_filter, array( &$this, 'psp_category_rewrite_rules' )); //add rewrite rules
|
115 |
+
$psp_do_rewrite_rules = true;
|
116 |
+
}
|
117 |
+
}**/
|
118 |
+
|
119 |
+
//if ($psp_do_rewrite_rules) {
|
120 |
+
|
121 |
+
// Add a query variable for redirecting categories with "category" base.
|
122 |
+
add_filter('query_vars', array( &$this, 'psp_set_category_base_redir_var'));
|
123 |
+
//Redirect if 'techblissonline_psp_category_redirect' is set
|
124 |
+
add_filter('request', array( &$this, 'psp_redirect_category_base_request'));
|
125 |
+
//
|
126 |
+
add_action('created_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
127 |
+
add_action('edited_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
128 |
+
add_action('delete_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
129 |
+
//
|
130 |
+
add_action('init', array( &$this, 'psp_set_no_base_extra_permastruct'));
|
131 |
+
//}
|
132 |
+
|
133 |
+
//$this->rewrite_rules_hooks_init();
|
134 |
+
|
135 |
+
//$this->custom_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
136 |
+
|
137 |
+
add_action( 'admin_init', array( &$this, 'psp_admin_settings_init' ) );
|
138 |
+
add_action( 'admin_menu', array( &$this, 'add_admin_menus' ) );
|
139 |
+
|
140 |
+
//Rajesh - 22/06/2017
|
141 |
+
$psp_settings = get_option('psp_pre_setting');
|
142 |
+
$psp_premium_valid = isset($psp_settings['premium']) ? $psp_settings['premium'] : '';
|
143 |
+
$psp_premium_status = isset($psp_settings['psp_premium_license_key_status']) ? $psp_settings['psp_premium_license_key_status'] : '';
|
144 |
+
|
145 |
+
$this->psp_settings_tabs[$this->psp_general_settings_group] = 'General';
|
146 |
+
$this->psp_settings_tabs[$this->psp_home_settings_group] = 'Home';
|
147 |
+
$this->psp_settings_tabs[$this->psp_taxonomy_settings_group] = 'Taxonomies';
|
148 |
+
$this->psp_settings_tabs[$this->psp_posttype_settings_group] = 'Post Types';
|
149 |
+
//$this->psp_settings_tabs[$this->psp_home_settings_group] = 'Home';
|
150 |
+
$this->psp_settings_tabs[$this->psp_archives_settings_group] = 'Archives';
|
151 |
+
$this->psp_settings_tabs[$this->psp_permalink_settings_group] = 'Permalinks';
|
152 |
+
//if (!$psp_premium_status) $this->psp_settings_tabs[$this->psp_social_settings_group] = 'Social';
|
153 |
+
$this->psp_settings_tabs[$this->psp_other_settings_group] = 'Others';
|
154 |
+
$this->psp_settings_tabs[$this->psp_breadcrumb_settings_group] = 'Breadcrumbs';
|
155 |
+
|
156 |
+
|
157 |
+
//add extra fields to category edit form hook
|
158 |
+
//add_action ( 'edit_category_form_fields', array( &$this, 'psp_extra_category_fields' ));
|
159 |
+
|
160 |
+
// save extra category extra fields hook
|
161 |
+
//add_action ( 'edited_category', array( &$this, 'psp_save_extra_category_fields' ));
|
162 |
+
|
163 |
+
}
|
164 |
+
|
165 |
+
/*
|
166 |
+
* Registers settings
|
167 |
+
*/
|
168 |
+
function psp_admin_settings_init() {
|
169 |
+
|
170 |
+
if ( null == $this->custom_taxonomies ) {
|
171 |
+
$args = array(
|
172 |
+
'public' => true,
|
173 |
+
'_builtin' => false
|
174 |
+
);
|
175 |
+
$output = 'names'; // or objects
|
176 |
+
$operator = 'and'; // 'and' or 'or'
|
177 |
+
$cust_taxonomies = get_taxonomies( $args, $output, $operator );
|
178 |
+
$this->custom_taxonomies = $cust_taxonomies;
|
179 |
+
}
|
180 |
+
//add filter to modify post meta values
|
181 |
+
add_filter( 'wp_insert_post_data', array( &$this, 'psp_slash' ), -99, 2 );
|
182 |
+
|
183 |
+
//add psp seo metabox to post types
|
184 |
+
add_action( 'add_meta_boxes', array( &$this, 'do_psp_meta_boxes' ), -99, 2 );
|
185 |
+
//save psp seo metabox data
|
186 |
+
add_action( 'save_post', array( &$this, 'psp_save_seo_meta_box_data' ) );
|
187 |
+
//add_action( 'edit_post', array( &$this, 'psp_save_seo_meta_box_data' ) );
|
188 |
+
//add_action( 'publish_post', array( &$this, 'psp_save_seo_meta_box_data' ) );
|
189 |
+
//add_action( 'edit_page_form', array( &$this, 'psp_save_seo_meta_box_data' ) );
|
190 |
+
|
191 |
+
//initilize rewrite rules filters
|
192 |
+
$this->rewrite_rules_hooks_init();
|
193 |
+
|
194 |
+
$tab = isset( $_GET['psptab'] ) ? sanitize_key($_GET['psptab']) : $this->psp_general_settings_group;
|
195 |
+
|
196 |
+
wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
197 |
+
|
198 |
+
//$this->register_general_settings();
|
199 |
+
$this->register_general_settings('sitewide');
|
200 |
+
$this->register_home_settings();
|
201 |
+
$this->register_breadcrumb_settings();
|
202 |
+
|
203 |
+
$this->register_taxonomy_settings('category');
|
204 |
+
|
205 |
+
//add extra fields to category edit form hook
|
206 |
+
add_action ( 'category_edit_form_fields', array( &$this, 'psp_extra_category_fields' ));
|
207 |
+
|
208 |
+
// save extra category extra fields hook
|
209 |
+
add_action ( 'edited_category', array( &$this, 'psp_save_extra_category_fields' ));
|
210 |
+
|
211 |
+
$this->register_taxonomy_settings('tag');
|
212 |
+
//$this->register_taxonomy_settings('post_format');
|
213 |
+
|
214 |
+
//add extra fields to tag edit form hook
|
215 |
+
$tag_action_name = 'edit_tag_form_fields';
|
216 |
+
add_action ( 'edit_tag_form_fields', array( &$this, 'psp_extra_taxonomy_fields' ));
|
217 |
+
|
218 |
+
//add_action ( 'edited_category', 'psp_save_extra_category_fields');
|
219 |
+
$tag_action_name = 'edited_tag';
|
220 |
+
add_action ( $tag_action_name, array( &$this, 'psp_save_extra_taxonomy_fields' ));
|
221 |
+
|
222 |
+
$cust_taxonomies = $this->custom_taxonomies;
|
223 |
+
|
224 |
+
foreach($cust_taxonomies as $cust_taxonomy) {
|
225 |
+
//register taxonomies
|
226 |
+
$this->register_taxonomy_settings($cust_taxonomy);
|
227 |
+
/***this part looks to be tiggered elsewhere****
|
228 |
+
//add extra fields to taxonomy edit form hook
|
229 |
+
//$taxonomy_action_name = $cust_taxonomy.'_edit_form_fields';
|
230 |
+
//add_action ( $taxonomy_action_name, array( &$this, 'psp_extra_taxonomy_fields' ));
|
231 |
+
|
232 |
+
// save extra taxonomy extra fields hook
|
233 |
+
//add_action ( 'edited_category', 'psp_save_extra_category_fields');
|
234 |
+
//$taxonomy_action_name = 'edited_'.$cust_taxonomy;
|
235 |
+
//add_action ( $taxonomy_action_name, array( &$this, 'psp_save_extra_taxonomy_fields' ));
|
236 |
+
/***looks to be tiggered elsewhere****/
|
237 |
+
$taxonomy_action_name = $cust_taxonomy.'_edit_form_fields';
|
238 |
+
//add_action ( $taxonomy_action_name, array( &$this, 'psp_extra_taxonomy_fields' ));
|
239 |
+
$taxonomy_action_name = 'edited_'.$cust_taxonomy;
|
240 |
+
add_action ( $taxonomy_action_name, array( &$this, 'psp_save_extra_taxonomy_fields' ));
|
241 |
+
}
|
242 |
+
|
243 |
+
$this->register_posttype_settings('post');
|
244 |
+
$this->register_posttype_settings('page');
|
245 |
+
$this->register_posttype_settings('attachment');
|
246 |
+
|
247 |
+
//$this->custom_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
248 |
+
//$cust_post_types = $this->custom_post_types;
|
249 |
+
|
250 |
+
$cust_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
251 |
+
$this->custom_post_types = $cust_post_types;
|
252 |
+
|
253 |
+
foreach($cust_post_types as $cust_post_type) {
|
254 |
+
$this->register_posttype_settings($cust_post_type);
|
255 |
+
}
|
256 |
+
|
257 |
+
//if ($tab == $this->psp_archives_settings_group) {
|
258 |
+
$this->register_archive_settings('date_archive');
|
259 |
+
$this->register_archive_settings('author_archive');
|
260 |
+
$this->register_archive_settings('posttype_archive');
|
261 |
+
|
262 |
+
$this->register_other_settings('search_result');
|
263 |
+
$this->register_other_settings('404_page');
|
264 |
+
//}
|
265 |
+
|
266 |
+
//if ($tab == $this->psp_permalink_settings_group) {
|
267 |
+
$this->register_permalink_settings();
|
268 |
+
//}
|
269 |
+
//Rajesh - 22/06/2017
|
270 |
+
$psp_settings = get_option('psp_pre_setting');
|
271 |
+
$psp_premium_valid = isset($psp_settings['premium']) ? $psp_settings['premium'] : '';
|
272 |
+
$psp_premium_status = isset($psp_settings['psp_premium_license_key_status']) ? $psp_settings['psp_premium_license_key_status'] : '';
|
273 |
+
|
274 |
+
|
275 |
+
//$psp_premium_valid = 1;
|
276 |
+
//$psp_premium_status = 1;
|
277 |
+
//if ($tab == $this->psp_social_settings_group) {
|
278 |
+
//if(!$psp_premium_status) $this->register_social_settings();
|
279 |
+
//}
|
280 |
+
|
281 |
+
$this->register_kg_settings();
|
282 |
+
|
283 |
+
}
|
284 |
+
/*
|
285 |
+
* Initialize all hooks for rewrite rules
|
286 |
+
*/
|
287 |
+
function rewrite_rules_hooks_init() {
|
288 |
+
|
289 |
+
$psp_do_rewrite_rules = false;
|
290 |
+
|
291 |
+
$psp_permalink_settings = get_option('psp_permalink_settings');
|
292 |
+
|
293 |
+
if (isset($psp_permalink_settings['category']) && $psp_permalink_settings['category']) {
|
294 |
+
$psp_do_rewrite_rules = true;
|
295 |
+
add_filter( 'category_rewrite_rules', array( &$this, 'psp_category_rewrite_rules' )); //add rewrite rules
|
296 |
+
}
|
297 |
+
|
298 |
+
$cust_taxonomies = $this->custom_taxonomies;
|
299 |
+
|
300 |
+
|
301 |
+
foreach($cust_taxonomies as $cust_taxonomy) {
|
302 |
+
|
303 |
+
//$psp_settings_name = "psp_".$cust_taxonomy."_settings";
|
304 |
+
//$psp_tax_settings = get_option($psp_settings_name);
|
305 |
+
|
306 |
+
if (isset($psp_permalink_settings[$cust_taxonomy]) && $psp_permalink_settings[$cust_taxonomy]) {
|
307 |
+
$psp_filter = $cust_taxonomy."_rewrite_rules";
|
308 |
+
add_filter( $psp_filter, array( &$this, 'psp_category_rewrite_rules' )); //add rewrite rules
|
309 |
+
$psp_do_rewrite_rules = true;
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
if ($psp_do_rewrite_rules) {
|
314 |
+
|
315 |
+
// Add a query variable for redirecting categories with "category" base.
|
316 |
+
//add_filter('query_vars', array( &$this, 'psp_set_category_base_redir_var'));
|
317 |
+
// Redirect if 'techblissonline_psp_category_redirect' is set
|
318 |
+
//add_filter('request', array( &$this, 'psp_redirect_category_base_request'));
|
319 |
+
//
|
320 |
+
add_action('created_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
321 |
+
add_action('edited_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
322 |
+
add_action('delete_category', array( &$this, 'psp_refresh_rewrite_rules'));
|
323 |
+
//
|
324 |
+
//add_action('init', array( &$this, 'psp_set_no_base_extra_permastruct'));
|
325 |
+
}
|
326 |
+
|
327 |
+
}
|
328 |
+
|
329 |
+
/*
|
330 |
+
* Registers the Home SEO settings and appends the
|
331 |
+
* key to the plugin settings tabs array.
|
332 |
+
*/
|
333 |
+
private function register_home_settings() {
|
334 |
+
$this->psp_settings_tabs[$this->psp_home_settings_group] = 'Home';
|
335 |
+
$psp_home_settings_name = "psp_home_settings";
|
336 |
+
|
337 |
+
$psp_home_settings = get_option($psp_home_settings_name);
|
338 |
+
|
339 |
+
|
340 |
+
//$this->psp_home_settings = $psp_home_settings;
|
341 |
+
//register
|
342 |
+
register_setting( $this->psp_home_settings_group, $psp_home_settings_name, array( &$this, 'sanitize_home_settings' ) );
|
343 |
+
//add Section
|
344 |
+
add_settings_section( 'psp_section_home', esc_html__('Home Page SEO Settings', 'platinum-seo-pack' ), array( &$this, 'section_home_desc' ), $this->psp_home_settings_group );
|
345 |
+
//add fields
|
346 |
+
$title_field = array (
|
347 |
+
'label_for' => 'psp_home_title',
|
348 |
+
'option_name' => $psp_home_settings_name.'[title]',
|
349 |
+
'option_value' => isset($psp_home_settings['title']) ? stripcslashes(esc_attr($psp_home_settings['title'])) : '',
|
350 |
+
);
|
351 |
+
|
352 |
+
$desc_field = array (
|
353 |
+
'label_for' => 'psp_home_description',
|
354 |
+
'option_name' => $psp_home_settings_name.'[description]',
|
355 |
+
'option_value' => isset($psp_home_settings['description']) ? stripcslashes(esc_attr($psp_home_settings['description'])) : '',
|
356 |
+
);
|
357 |
+
|
358 |
+
$keywords_field = array (
|
359 |
+
'label_for' => 'psp_home_keywords',
|
360 |
+
'option_name' => $psp_home_settings_name.'[keywords]',
|
361 |
+
'option_value' => isset($psp_home_settings['keywords']) ? stripcslashes(esc_attr($psp_home_settings['keywords'])) : '',
|
362 |
+
);
|
363 |
+
|
364 |
+
$home_header_metas = isset($psp_home_settings['headers']) ? html_entity_decode(stripcslashes(esc_attr($psp_home_settings['headers']))) : '';
|
365 |
+
//validate headers
|
366 |
+
if( !empty( $home_header_metas ) ) {
|
367 |
+
|
368 |
+
$allowed_html = array(
|
369 |
+
'meta' => array(
|
370 |
+
'name' => array(),
|
371 |
+
'property' => array(),
|
372 |
+
'itemprop' => array(),
|
373 |
+
'content' => array(),
|
374 |
+
),
|
375 |
+
);
|
376 |
+
|
377 |
+
$home_header_metas = wp_kses($home_header_metas, $allowed_html);
|
378 |
+
}
|
379 |
+
|
380 |
+
$additional_headers_field = array (
|
381 |
+
'label_for' => 'psp_home_additional_headers',
|
382 |
+
'option_name' => $psp_home_settings_name.'[headers]',
|
383 |
+
'option_value' => $home_header_metas,
|
384 |
+
'option_description' => esc_html__( 'Here you may add all the webmaster tools verification meta tag codes for google, bing, yandex, alexa and for any other search engine.If you had already verified with the webmaster tools, you might choose to ignore adding them here. Check ', 'platinum-seo-pack' ).' <br> <a href="https://www.google.com/webmasters/verification/verification?hl=en&siteUrl='.trailingslashit(get_home_url()).'" target="_blank">Google Webmaster Tools</a><br> <a href="http://www.bing.com/webmaster/?rfp=1#/Dashboard/?url='.substr(get_home_url(), 8).'" target="_blank">Bing Webmaster Tools</a>;',
|
385 |
+
);
|
386 |
+
|
387 |
+
$json_schema_string = isset($psp_home_settings['schema']) ? html_entity_decode(stripcslashes(esc_attr($psp_home_settings['schema']))) : '';
|
388 |
+
//validate it is a json object
|
389 |
+
$schema_obj = json_decode($json_schema_string);
|
390 |
+
if($schema_obj === null) {
|
391 |
+
$json_schema_string = 'Invalid JSON Schema';
|
392 |
+
}
|
393 |
+
|
394 |
+
$schema_field = array (
|
395 |
+
'label_for' => 'psp_home_schemas',
|
396 |
+
'option_name' => $psp_home_settings_name.'[schema]',
|
397 |
+
'option_value' => $json_schema_string,
|
398 |
+
'option_description' => esc_html__( 'Here you may add all the JSON Schemas for the Home page', 'platinum-seo-pack' ),
|
399 |
+
);
|
400 |
+
|
401 |
+
//add_settings_field( 'psp_home_title', '<a href="'.home_url().'" target="_blank">'.__('Home Page Title: ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_text' ), $this->psp_home_settings_group, 'psp_section_home', $title_field);
|
402 |
+
//add_settings_field( 'psp_home_description', '<a href="'.home_url().'" target="_blank">'.__('Home Page Meta Description: ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_textarea' ), $this->psp_home_settings_group, 'psp_section_home', $desc_field );
|
403 |
+
//add_settings_field( 'psp_home_keywords', '<a href="'.home_url().'" target="_blank">'.__('Home Page Meta Keywords: ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_text' ), $this->psp_home_settings_group, 'psp_section_home', $keywords_field );
|
404 |
+
//add_settings_field( 'psp_home_additional_headers', '<a href="'.home_url().'" target="_blank">'.__('Additional Home Page Headers: ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_textarea' ), $this->psp_home_settings_group, 'psp_section_home', $additional_headers_field );
|
405 |
+
|
406 |
+
add_settings_field( 'psp_home_title', esc_html__('Home Page Title: ', 'platinum-seo-pack'), array( &$this, 'psp_add_field_text' ), $this->psp_home_settings_group, 'psp_section_home', $title_field);
|
407 |
+
add_settings_field( 'psp_home_description', esc_html__('Home Page Meta Description: ', 'platinum-seo-pack'), array( &$this, 'psp_add_field_textarea' ), $this->psp_home_settings_group, 'psp_section_home', $desc_field );
|
408 |
+
add_settings_field( 'psp_home_keywords', esc_html__('Home Page Meta Keywords: ', 'platinum-seo-pack'), array( &$this, 'psp_add_field_text' ), $this->psp_home_settings_group, 'psp_section_home', $keywords_field );
|
409 |
+
add_settings_field( 'psp_home_additional_headers', esc_html__('Additional Home Page Headers: ', 'platinum-seo-pack'), array( &$this, 'psp_add_field_textarea' ), $this->psp_home_settings_group, 'psp_section_home', $additional_headers_field );
|
410 |
+
add_settings_field( 'psp_home_schemas', esc_html__('Schemas >> ', 'platinum-seo-pack').'<a href="https://techblissonline.com/tools/schema-markup-generator/" target="_blank">'.esc_html__('Generate here', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_textarea' ), $this->psp_home_settings_group, 'psp_section_home', $schema_field );
|
411 |
+
}
|
412 |
+
|
413 |
+
function sanitize_home_settings($settings) {
|
414 |
+
|
415 |
+
if( isset( $settings['title'] ) ) $settings['title'] = sanitize_text_field( $settings['title'] );
|
416 |
+
if( isset( $settings['description'] ) ) $settings['description'] = sanitize_textarea_field( $settings['description'] );
|
417 |
+
if( isset( $settings['keywords'] ) ) $settings['keywords'] = sanitize_text_field( $settings['keywords'] );
|
418 |
+
//validate headers
|
419 |
+
if( isset( $settings['headers'] ) ) {
|
420 |
+
|
421 |
+
$allowed_html = array(
|
422 |
+
'meta' => array(
|
423 |
+
'name' => array(),
|
424 |
+
'property' => array(),
|
425 |
+
'itemprop' => array(),
|
426 |
+
'content' => array(),
|
427 |
+
),
|
428 |
+
);
|
429 |
+
|
430 |
+
$settings['headers'] = wp_kses($settings['headers'], $allowed_html);
|
431 |
+
$settings['headers'] = sanitize_textarea_field( htmlentities($settings['headers']) );
|
432 |
+
};
|
433 |
+
|
434 |
+
if ( isset( $settings['schema'] ) ) {
|
435 |
+
|
436 |
+
$json_schema_str = ( $settings['schema'] );
|
437 |
+
$schema_obj = json_decode(stripcslashes($json_schema_str));
|
438 |
+
//validate it is a json object
|
439 |
+
if($schema_obj === null) {
|
440 |
+
// $schema_obj is null because the json cannot be decoded
|
441 |
+
$settings['schema'] = '';
|
442 |
+
} else {
|
443 |
+
$settings['schema'] = sanitize_textarea_field( htmlentities($settings['schema']) );
|
444 |
+
|
445 |
+
}
|
446 |
+
}
|
447 |
+
|
448 |
+
return $settings;
|
449 |
+
}
|
450 |
+
|
451 |
+
/*
|
452 |
+
* Registers the general settings and appends the
|
453 |
+
* key to the plugin settings tabs array. -$others_name = sitewide_meta
|
454 |
+
*/
|
455 |
+
private function register_general_settings($setting_name) {
|
456 |
+
$this->psp_settings_tabs[$this->psp_general_settings_group] = 'General';
|
457 |
+
$psp_settings_name = "psp_".$setting_name."_settings";
|
458 |
+
$setting_name_text = str_replace( "_", " ", $setting_name );
|
459 |
+
$setting_name_text = ucwords($setting_name_text);
|
460 |
+
|
461 |
+
$psp_settings = get_option($psp_settings_name);
|
462 |
+
//$this->psp_settings_name = $psp_settings;
|
463 |
+
|
464 |
+
//wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
465 |
+
|
466 |
+
register_setting( $this->psp_general_settings_group, $psp_settings_name, array( &$this, 'sanitize_general_settings' ) );
|
467 |
+
|
468 |
+
//Section
|
469 |
+
$section_id = 'psp_separator_section';
|
470 |
+
$section_title = esc_html__( 'Sitewide Title Settings', 'platinum_seo_pack' );
|
471 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_separator_desc' ), $this->psp_general_settings_group );
|
472 |
+
|
473 |
+
//field
|
474 |
+
|
475 |
+
//Separator (Can be used in title and Description formats by specifying %sep%)
|
476 |
+
//$psp_separators = array ('‐', '–', '—', '·', '•', '*', '⋆', '|', '~', '«', '»', '<', '>'); ⋆ ‐ ‐
|
477 |
+
$psp_separators = array ('' => 'None', '-' => '-', '–' => '–', '—' => '—', '·' => '·', '•' => '•', '*' => '*', '|' => '|', '~' => '~', '«' => '«', '»' => '»', '<' => '<', '>' => '>', '˜' => '˜', '♥' => '♥', '♣' => '♣');
|
478 |
+
|
479 |
+
$psp_separator_field = array (
|
480 |
+
'label_for' => 'psp_'.$setting_name.'_separator',
|
481 |
+
'option_name' => $psp_settings_name.'[separator]',
|
482 |
+
'option_value' => isset($psp_settings['separator']) ? $psp_settings['separator'] : '',
|
483 |
+
'radioitems' => $psp_separators,
|
484 |
+
'option_description' => esc_html__( ' Can be used in title and description formats by specifying ', 'platinum-seo-pack' ). '<code>%sep%</code>.',
|
485 |
+
);
|
486 |
+
|
487 |
+
$psp_separator_field_id = 'psp_'.$setting_name.'_separator';
|
488 |
+
$psp_separator_field_title = 'Title Separator: ';
|
489 |
+
|
490 |
+
add_settings_field( $psp_separator_field_id, $psp_separator_field_title, array( &$this, 'psp_add_field_radiobuttons' ), $this->psp_general_settings_group, $section_id, $psp_separator_field );
|
491 |
+
|
492 |
+
//rewrite titles
|
493 |
+
$rewrite_titles_field = array (
|
494 |
+
'label_for' => 'psp_'.$setting_name.'_rewrite_titles',
|
495 |
+
'option_name' => $psp_settings_name.'[rewrite_titles]',
|
496 |
+
'option_value' => isset($psp_settings['rewrite_titles']) ? $psp_settings['rewrite_titles'] : '',
|
497 |
+
'checkbox_label' => esc_html__( 'Yes, rewrite titles using Platinum SEO', 'platinum-seo-pack' ),
|
498 |
+
'option_description' => esc_html__( 'This should always remain checked if you want to rewrite titles using Platinum SEO', 'platinum-seo-pack' ),
|
499 |
+
);
|
500 |
+
|
501 |
+
$rewrite_titles_field_id = 'psp_'.$setting_name.'_rewrite_titles';
|
502 |
+
$rewrite_titles_field_title = esc_html__( 'Use title rewriter: ', 'platinum-seo-pack' );
|
503 |
+
|
504 |
+
add_settings_field( $rewrite_titles_field_id, $rewrite_titles_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $rewrite_titles_field );
|
505 |
+
|
506 |
+
//force rewrite titles
|
507 |
+
$f_rewrite_titles_field = array (
|
508 |
+
'label_for' => 'psp_'.$setting_name.'_force_psp_titles',
|
509 |
+
'option_name' => $psp_settings_name.'[force_psp_titles]',
|
510 |
+
'option_value' => isset($psp_settings['force_psp_titles']) ? $psp_settings['force_psp_titles'] : '',
|
511 |
+
'checkbox_label' => esc_html__( 'Yes, force rewrite titles using Platinum SEO', 'platinum-seo-pack' ),
|
512 |
+
'option_description' => esc_html__( 'This should remain unchecked by default and should only be checked if you have issues with Platinum SEO plugin Title rewriting, despite the above option "Use title rewriter" remaining checked.', 'platinum-seo-pack' ),
|
513 |
+
);
|
514 |
+
|
515 |
+
$f_rewrite_titles_field_id = 'psp_'.$setting_name.'_force_psp_titles';
|
516 |
+
$f_rewrite_titles_field_title = esc_html__( 'Force Rewrite Title: ', 'platinum-seo-pack' );
|
517 |
+
|
518 |
+
add_settings_field( $f_rewrite_titles_field_id, $f_rewrite_titles_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $f_rewrite_titles_field );
|
519 |
+
|
520 |
+
//paged title format
|
521 |
+
$psp_paged_title_field = array (
|
522 |
+
'label_for' => 'psp_'.$setting_name.'_paged_title_format',
|
523 |
+
'option_name' => $psp_settings_name.'[paged_title_format]',
|
524 |
+
'option_value' => isset($psp_settings['paged_title_format']) ? esc_attr($psp_settings['paged_title_format']) : '',
|
525 |
+
'option_description' => '<code>%page%</code>'.esc_html__( ' - Page number. "Page" is the pagination base and it can be changed to anything you want.', 'platinum-seo-pack' ),
|
526 |
+
);
|
527 |
+
|
528 |
+
$paged_title_field_id = 'psp_'.$setting_name.'_paged_title_format';
|
529 |
+
$paged_title_field_title = esc_html__( 'Paged title Format: ', 'platinum-seo-pack' );
|
530 |
+
|
531 |
+
add_settings_field( $paged_title_field_id, $paged_title_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_general_settings_group, $section_id, $psp_paged_title_field);
|
532 |
+
|
533 |
+
//Section
|
534 |
+
$section_id = 'psp_'.$setting_name.'_section';
|
535 |
+
//$section_title = $setting_name_text.' Settings';
|
536 |
+
$section_title = sprintf( esc_html__( 'Other %s Settings', 'platinum_seo_pack' ), $setting_name_text );
|
537 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_sitewidemeta_desc' ), $this->psp_general_settings_group );
|
538 |
+
|
539 |
+
//Fields
|
540 |
+
|
541 |
+
//Noindex subpages
|
542 |
+
$noindex_subpages_field = array (
|
543 |
+
'label_for' => 'psp_'.$setting_name.'_noindex_subpages',
|
544 |
+
'option_name' => $psp_settings_name.'[noindex_subpages]',
|
545 |
+
'option_value' => isset($psp_settings['noindex_subpages']) ? $psp_settings['noindex_subpages'] : '',
|
546 |
+
'checkbox_label' => '<code>Noindex</code>',
|
547 |
+
);
|
548 |
+
|
549 |
+
$noindex_subpages_field_id = 'psp_'.$setting_name.'_noindex_subpages';
|
550 |
+
$noindex_subpages_field_title = esc_html__( 'Subpages of Home, taxonomies and all archves: ', 'platinum-seo-pack' );
|
551 |
+
|
552 |
+
add_settings_field( $noindex_subpages_field_id, $noindex_subpages_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $noindex_subpages_field );
|
553 |
+
|
554 |
+
//Noindex RSS feeds
|
555 |
+
$noindex_rss_feeds_field = array (
|
556 |
+
'label_for' => 'psp_'.$setting_name.'_noindex_rss_feeds',
|
557 |
+
'option_name' => $psp_settings_name.'[noindex_rss_feeds]',
|
558 |
+
'option_value' => isset($psp_settings['noindex_rss_feeds']) ? $psp_settings['noindex_rss_feeds'] : '',
|
559 |
+
'checkbox_label' => '<code>Noindex</code>',
|
560 |
+
);
|
561 |
+
|
562 |
+
$noindex_rss_feeds_field_id = 'psp_'.$setting_name.'_noindex_rss_feeds';
|
563 |
+
$noindex_rss_feeds_field_title = esc_html__( 'All RSS Feeds: ', 'platinum-seo-pack' );
|
564 |
+
|
565 |
+
add_settings_field( $noindex_rss_feeds_field_id, $noindex_rss_feeds_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $noindex_rss_feeds_field );
|
566 |
+
|
567 |
+
//Noindex comment pages
|
568 |
+
$noindex_comment_pages_field = array (
|
569 |
+
'label_for' => 'psp_'.$setting_name.'_noindex_pt_comment_pages',
|
570 |
+
'option_name' => $psp_settings_name.'[noindex_pt_comment_pages]',
|
571 |
+
'option_value' => isset($psp_settings['noindex_pt_comment_pages']) ? $psp_settings['noindex_pt_comment_pages'] : '',
|
572 |
+
'checkbox_label' => '<code>Noindex</code>',
|
573 |
+
);
|
574 |
+
|
575 |
+
$noindex_comment_pages_field_id = 'psp_'.$setting_name.'_noindex_pt_comment_pages';
|
576 |
+
$noindex_comment_pages_field_title = esc_html__( 'Comment pages of all post types: ', 'platinum-seo-pack' );
|
577 |
+
|
578 |
+
add_settings_field( $noindex_comment_pages_field_id, $noindex_comment_pages_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $noindex_comment_pages_field );
|
579 |
+
|
580 |
+
//Noindex post type sub pages created using next page quicktag
|
581 |
+
$noindex_pt_paginations_field = array (
|
582 |
+
'label_for' => 'psp_'.$setting_name.'_noindex_pt_paginations',
|
583 |
+
'option_name' => $psp_settings_name.'[noindex_pt_paginations]',
|
584 |
+
'option_value' => isset($psp_settings['noindex_pt_paginations']) ? $psp_settings['noindex_pt_paginations'] : '',
|
585 |
+
'checkbox_label' => '<code>Noindex</code>',
|
586 |
+
);
|
587 |
+
|
588 |
+
$noindex_pt_paginations_field_id = 'psp_'.$setting_name.'_noindex_pt_paginations';
|
589 |
+
$noindex_pt_paginations_field_title = esc_html__( 'Subpages of all post types created using Next Page quicktag: ', 'platinum-seo-pack' );
|
590 |
+
|
591 |
+
add_settings_field( $noindex_pt_paginations_field_id, $noindex_pt_paginations_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $noindex_pt_paginations_field );
|
592 |
+
|
593 |
+
//noodp
|
594 |
+
$use_meta_noodp_field = array (
|
595 |
+
'label_for' => 'psp_'.$setting_name.'_use_meta_noodp',
|
596 |
+
'option_name' => $psp_settings_name.'[use_meta_noodp]',
|
597 |
+
'option_value' => isset($psp_settings['use_meta_noodp']) ? $psp_settings['use_meta_noodp'] : '',
|
598 |
+
'checkbox_label' => esc_html__( 'Yes, use meta robots tag ', 'platinum-seo-pack' ).'<code> noodp</code>',
|
599 |
+
);
|
600 |
+
|
601 |
+
$use_meta_noodp_field_id = 'psp_'.$setting_name.'_use_meta_noodp';
|
602 |
+
$use_meta_noodp_field_title = esc_html__( 'Use noodp: ', 'platinum-seo-pack' );
|
603 |
+
|
604 |
+
add_settings_field( $use_meta_noodp_field_id, $use_meta_noodp_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $use_meta_noodp_field );
|
605 |
+
|
606 |
+
//noydir
|
607 |
+
$use_meta_noydir_field = array (
|
608 |
+
'label_for' => 'psp_'.$setting_name.'_use_meta_noydir',
|
609 |
+
'option_name' => $psp_settings_name.'[use_meta_noydir]',
|
610 |
+
'option_value' => isset($psp_settings['use_meta_noydir']) ? $psp_settings['use_meta_noydir'] : '',
|
611 |
+
'checkbox_label' => esc_html__( 'Yes, use meta robots tag ', 'platinum-seo-pack' ).'<code> noydir</code>',
|
612 |
+
);
|
613 |
+
|
614 |
+
$use_meta_noydir_field_id = 'psp_'.$setting_name.'_use_meta_noydir';
|
615 |
+
$use_meta_noydir_field_title = esc_html__( 'Use noydir: ', 'platinum-seo-pack' );;
|
616 |
+
|
617 |
+
add_settings_field( $use_meta_noydir_field_id, $use_meta_noydir_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $use_meta_noydir_field );
|
618 |
+
|
619 |
+
//autogenerate description
|
620 |
+
$autogenerate_desc_field = array (
|
621 |
+
'label_for' => 'psp_'.$setting_name.'_autogenerate_description',
|
622 |
+
'option_name' => $psp_settings_name.'[autogenerate_description]',
|
623 |
+
'option_value' => isset($psp_settings['autogenerate_description']) ? $psp_settings['autogenerate_description'] : '',
|
624 |
+
'checkbox_label' => esc_html__( 'Yes, autogenerate description for all post types, if no SEO description is set for any post.', 'platinum-seo-pack' )
|
625 |
+
);
|
626 |
+
|
627 |
+
$autogenerate_desc_field_id = 'psp_'.$setting_name.'_autogenerate_description';
|
628 |
+
$autogenerate_desc_field_title = esc_html__( 'Use description autogenerator: ', 'platinum-seo-pack' );
|
629 |
+
|
630 |
+
add_settings_field( $autogenerate_desc_field_id, $autogenerate_desc_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $autogenerate_desc_field );
|
631 |
+
|
632 |
+
//canonical
|
633 |
+
$use_meta_canonical_field = array (
|
634 |
+
'label_for' => 'psp_'.$setting_name.'_use_canonical',
|
635 |
+
'option_name' => $psp_settings_name.'[use_canonical]',
|
636 |
+
'option_value' => isset($psp_settings['use_canonical']) ? $psp_settings['use_canonical'] : '',
|
637 |
+
'checkbox_label' => esc_html__( 'Yes, Use canonical tags generated by Platinum SEO', 'platinum-seo-pack' )
|
638 |
+
);
|
639 |
+
|
640 |
+
$use_meta_canonical_field_id = 'psp_'.$setting_name.'_use_canonical';
|
641 |
+
$use_meta_canonical_field_title = esc_html__( 'Use canonical tags: ', 'platinum-seo-pack' );
|
642 |
+
|
643 |
+
add_settings_field( $use_meta_canonical_field_id, $use_meta_canonical_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $use_meta_canonical_field );
|
644 |
+
|
645 |
+
//meta keywords
|
646 |
+
$use_meta_keywords_field = array (
|
647 |
+
'label_for' => 'psp_'.$setting_name.'_use_meta_keywords',
|
648 |
+
'option_name' => $psp_settings_name.'[use_meta_keywords]',
|
649 |
+
'option_value' => isset($psp_settings['use_meta_keywords']) ? $psp_settings['use_meta_keywords'] : '',
|
650 |
+
'checkbox_label' => esc_html__( 'Yes, use meta keywords tag.', 'platinum-seo-pack' )
|
651 |
+
);
|
652 |
+
|
653 |
+
$use_meta_keywords_field_id = 'psp_'.$setting_name.'_use_meta_keywords';
|
654 |
+
$use_meta_keywords_field_title = esc_html__( 'Use meta keywords tag: ', 'platinum-seo-pack' );
|
655 |
+
|
656 |
+
add_settings_field( $use_meta_keywords_field_id, $use_meta_keywords_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $use_meta_keywords_field );
|
657 |
+
|
658 |
+
//use PSP template placeholder script for platinum seo meta tags
|
659 |
+
$use_psp_template_tags_field = array (
|
660 |
+
'label_for' => 'psp_'.$setting_name.'_use_psp_template_script',
|
661 |
+
'option_name' => $psp_settings_name.'[use_psp_template_script]',
|
662 |
+
'option_value' => isset($psp_settings['use_psp_template_script']) ? $psp_settings['use_psp_template_script'] : '',
|
663 |
+
'checkbox_label' => esc_html__( 'Yes, use Platinum SEO template placeholder script for meta tags', 'platinum-seo-pack' ),
|
664 |
+
'option_description' => esc_html__( 'Place the template acript in the theme <code>header.php</code> file where you want the Platinum SEO plugin meta tags to appear.', 'platinum-seo-pack' )
|
665 |
+
);
|
666 |
+
|
667 |
+
$use_psp_template_tags_field_id = 'psp_'.$setting_name.'_use_psp_template_script';
|
668 |
+
$use_psp_template_tags_field_title = esc_html__( 'Use Template Script: ', 'platinum-seo-pack' );
|
669 |
+
|
670 |
+
add_settings_field( $use_psp_template_tags_field_id, $use_psp_template_tags_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $use_psp_template_tags_field );
|
671 |
+
|
672 |
+
//Hide Advanced tab of platinum seo metabox on post type editor.
|
673 |
+
$psp_hide_advanced_tab_field = array (
|
674 |
+
'label_for' => 'psp_'.$setting_name.'_hide_metabox_advanced',
|
675 |
+
'option_name' => $psp_settings_name.'[hide_metabox_advanced]',
|
676 |
+
'option_value' => isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '',
|
677 |
+
'checkbox_label' => esc_html__( 'Disable advanced tab of Techblissonline Platinum SEO and Social Meta Box', 'platinum-seo-pack' ),
|
678 |
+
'option_description' => esc_html__( 'Checking this will disable it for all users other than the users with administrative privileges .', 'platinum-seo-pack' )
|
679 |
+
);
|
680 |
+
|
681 |
+
$psp_hide_advanced_tab_id = 'psp_'.$setting_name.'_hide_metabox_advanced';
|
682 |
+
$psp_hide_advanced_tab_title = esc_html__( 'Platinum Seo and Social Meta Box Advanced Tab: ', 'platinum-seo-pack' );
|
683 |
+
|
684 |
+
add_settings_field( $psp_hide_advanced_tab_id, $psp_hide_advanced_tab_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $psp_hide_advanced_tab_field );
|
685 |
+
|
686 |
+
//Section: Nofollow Settings
|
687 |
+
$section_id = 'psp_'.'nofollow'.'_section';
|
688 |
+
//$section_title = 'Nofollow Settings';
|
689 |
+
$section_title = '<code>Nofollow</code>' .esc_html__( ' Settings', 'platinum-seo-pack' );
|
690 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_nofollow_desc' ), $this->psp_general_settings_group );
|
691 |
+
|
692 |
+
//nofollow external links on front page
|
693 |
+
/*$nofollow_ext_links_field = array (
|
694 |
+
'label_for' => 'psp_'.$setting_name.'_nofollow_external_links_frontpage',
|
695 |
+
'option_name' => $psp_settings_name.'[nofollow_external_links_frontpage]',
|
696 |
+
'option_value' => $psp_settings['nofollow_external_links_frontpage'],
|
697 |
+
'checkbox_label' => __( 'Nofollow External links on Home (Front) page', 'platinum-seo-pack' )
|
698 |
+
);
|
699 |
+
|
700 |
+
$nofollow_ext_links_id = 'psp_'.$setting_name.'_nofollow_external_links_frontpage';
|
701 |
+
$nofollow_ext_links_title = '';
|
702 |
+
|
703 |
+
add_settings_field( $nofollow_ext_links_id, $nofollow_ext_links_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $nofollow_ext_links_field );*/
|
704 |
+
|
705 |
+
//nofollow links to tag pages
|
706 |
+
$nofollow_tag_links_field = array (
|
707 |
+
'label_for' => 'psp_'.$setting_name.'_nofollow_tag_links',
|
708 |
+
'option_name' => $psp_settings_name.'[nofollow_tag_links]',
|
709 |
+
'option_value' => isset($psp_settings['nofollow_tag_links']) ? $psp_settings['nofollow_tag_links'] : '',
|
710 |
+
'checkbox_label' => '<code>Nofollow</code>',
|
711 |
+
);
|
712 |
+
|
713 |
+
$nofollow_tag_links_id = 'psp_'.$setting_name.'_nofollow_tag_links';
|
714 |
+
$nofollow_tag_links_title = esc_html__( 'Links to tag pages: ', 'platinum-seo-pack' );
|
715 |
+
|
716 |
+
add_settings_field( $nofollow_tag_links_id, $nofollow_tag_links_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $nofollow_tag_links_field );
|
717 |
+
|
718 |
+
//nofollow links to archive pages
|
719 |
+
/*$nofollow_archive_links_field = array (
|
720 |
+
'label_for' => 'psp_'.$setting_name.'_nofollow_archive_links',
|
721 |
+
'option_name' => $psp_settings_name.'[nofollow_archive_links]',
|
722 |
+
'option_value' => $psp_settings['nofollow_archive_links'],
|
723 |
+
'checkbox_label' => __( 'Nofollow Archive links on all Post types', 'platinum-seo-pack' )
|
724 |
+
);
|
725 |
+
|
726 |
+
$nofollow_archive_links_id = 'psp_'.$setting_name.'_nofollow_archive_links';
|
727 |
+
$nofollow_archive_links_title = '';
|
728 |
+
|
729 |
+
add_settings_field( $nofollow_archive_links_id, $nofollow_archive_links_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $nofollow_archive_links_field );*/
|
730 |
+
|
731 |
+
//nofollow login and registration links
|
732 |
+
$nofollow_logreg_links_field = array (
|
733 |
+
'label_for' => 'psp_'.$setting_name.'_nofollow_loginregn_links',
|
734 |
+
'option_name' => $psp_settings_name.'[nofollow_loginregn_links]',
|
735 |
+
'option_value' => isset($psp_settings['nofollow_loginregn_links']) ? $psp_settings['nofollow_loginregn_links'] : '',
|
736 |
+
'checkbox_label' => '<code>Nofollow</code>',
|
737 |
+
);
|
738 |
+
|
739 |
+
$nofollow_logreg_links_id = 'psp_'.$setting_name.'_nofollow_loginregn_links';
|
740 |
+
$nofollow_logreg_links_title = esc_html__( 'Login and registration links: ', 'platinum-seo-pack' );
|
741 |
+
|
742 |
+
add_settings_field( $nofollow_logreg_links_id, $nofollow_logreg_links_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $nofollow_logreg_links_field );
|
743 |
+
|
744 |
+
$this->psp_head_cleaner_settings($setting_name, $psp_settings);
|
745 |
+
$this->psp_comment_cleaner_settings($setting_name, $psp_settings);
|
746 |
+
$this->psp_sitelinks_search_box_settings($setting_name, $psp_settings);
|
747 |
+
}
|
748 |
+
|
749 |
+
/*
|
750 |
+
* Wordpress sitelinks search box settings
|
751 |
+
*/
|
752 |
+
function psp_sitelinks_search_box_settings($setting_name, $psp_settings) {
|
753 |
+
|
754 |
+
$psp_settings_name = "psp_".$setting_name."_settings";
|
755 |
+
/************
|
756 |
+
//sitelinks searchbox Section
|
757 |
+
$section_id = 'psp_sitelinks_search_section';
|
758 |
+
$section_title = __( 'Sitelinks Search Box in Google:', 'platinum_seo_pack' );
|
759 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_sitelinks_searchbox_desc' ), $this->psp_general_settings_group );
|
760 |
+
|
761 |
+
//Enable sitelinks searchbox
|
762 |
+
$sitelinks_search_field = array (
|
763 |
+
'label_for' => 'psp_'.$setting_name.'_sitelinks_search',
|
764 |
+
'option_name' => $psp_settings_name.'[sitelinks_search_box]',
|
765 |
+
'option_value' => $psp_settings['sitelinks_search_box'],
|
766 |
+
'checkbox_label' => __( 'Enable', 'platinum-seo-pack' ),
|
767 |
+
);
|
768 |
+
|
769 |
+
$sitelinks_search_id = 'psp_'.$setting_name.'_sitelinks_search';
|
770 |
+
$sitelinks_search_title = __( 'Sitelinks Searchbox: ', 'platinum-seo-pack' );
|
771 |
+
|
772 |
+
add_settings_field( $sitelinks_search_id, $sitelinks_search_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $sitelinks_search_field );
|
773 |
+
|
774 |
+
//Sitelinks search box URL parameter
|
775 |
+
$psp_sitelinks_target_field = array (
|
776 |
+
'label_for' => 'psp_'.$setting_name.'_sitelinks_searchbox_target',
|
777 |
+
'option_name' => $psp_settings_name.'[sitelinks_searchbox_target]',
|
778 |
+
'option_value' => $psp_settings['sitelinks_searchbox_target'],
|
779 |
+
'option_description' => __( 'Here you can specify a search URL pattern for sending queries to your site search engine. You need to chane this only if the URL is different from what is defined above. Formost wordpress sites, leaving this unchanged would work.', 'platinum-seo-pack' ),
|
780 |
+
);
|
781 |
+
|
782 |
+
$psp_sitelinks_target_field_id = 'psp_'.$setting_name.'_sitelinks_searchbox_target';
|
783 |
+
$psp_sitelinks_target_field_title = __( 'Sitelinks Search box Target URL: ', 'platinum-seo-pack' );
|
784 |
+
|
785 |
+
add_settings_field( $psp_sitelinks_target_field_id, $psp_sitelinks_target_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_general_settings_group, $section_id, $psp_sitelinks_target_field);
|
786 |
+
*******************/
|
787 |
+
//Credits Section
|
788 |
+
$section_id = 'psp_credit_section';
|
789 |
+
$section_title = esc_html__( 'Credits:', 'platinum_seo_pack' );
|
790 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_empty_desc' ), $this->psp_general_settings_group );
|
791 |
+
|
792 |
+
//Enable credits
|
793 |
+
$credits_field = array (
|
794 |
+
'label_for' => 'psp_'.$setting_name.'_credits',
|
795 |
+
'option_name' => $psp_settings_name.'[credits]',
|
796 |
+
'option_value' => isset($psp_settings['credits']) ? $psp_settings['credits'] : '',
|
797 |
+
'checkbox_label' => esc_html__( 'Link To Platinum SEO', 'platinum-seo-pack' ),
|
798 |
+
);
|
799 |
+
|
800 |
+
$credits_id = 'psp_'.$setting_name.'_credits';
|
801 |
+
$credits_title = esc_html__( 'Credits: ', 'platinum-seo-pack' );
|
802 |
+
|
803 |
+
add_settings_field( $credits_id, $credits_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $credits_field );
|
804 |
+
|
805 |
+
}
|
806 |
+
|
807 |
+
/*
|
808 |
+
* Wordpress Head cleaner settings
|
809 |
+
*/
|
810 |
+
function psp_head_cleaner_settings($setting_name, $psp_settings) {
|
811 |
+
|
812 |
+
$psp_settings_name = "psp_".$setting_name."_settings";
|
813 |
+
|
814 |
+
//Section
|
815 |
+
$section_id = 'psp_cleanup_head_section';
|
816 |
+
$section_title = esc_html__( 'Clean Up HTML Head Section', 'platinum_seo_pack' );
|
817 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_cleanup_head_desc' ), $this->psp_general_settings_group );
|
818 |
+
|
819 |
+
//field
|
820 |
+
|
821 |
+
//Hide Extra Feed Links
|
822 |
+
$hide_feed_links_field = array (
|
823 |
+
'label_for' => 'psp_'.$setting_name.'_hide_feed_links',
|
824 |
+
'option_name' => $psp_settings_name.'[hide_feed_links]',
|
825 |
+
'option_value' => isset($psp_settings['hide_feed_links']) ? $psp_settings['hide_feed_links'] : '',
|
826 |
+
'checkbox_label' => esc_html__( 'Yes, remove extra feed links from head section', 'platinum-seo-pack' ),
|
827 |
+
);
|
828 |
+
|
829 |
+
$hide_feed_links_field_id = 'psp_'.$setting_name.'_hide_feed_links';
|
830 |
+
$hide_feed_links_field_title = esc_html__( 'Extra Feed Links: ', 'platinum-seo-pack' );
|
831 |
+
|
832 |
+
add_settings_field( $hide_feed_links_field_id, $hide_feed_links_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_feed_links_field );
|
833 |
+
|
834 |
+
//Hide RSD link
|
835 |
+
$hide_rsd_link_field = array (
|
836 |
+
'label_for' => 'psp_'.$setting_name.'_hide_rsd_link',
|
837 |
+
'option_name' => $psp_settings_name.'[hide_rsd_link]',
|
838 |
+
'option_value' => isset($psp_settings['hide_rsd_link']) ? $psp_settings['hide_rsd_link'] : '',
|
839 |
+
'checkbox_label' => esc_html__( 'Yes, remove RSD link from head section', 'platinum-seo-pack' ),
|
840 |
+
);
|
841 |
+
|
842 |
+
$hide_rsd_link_id = 'psp_'.$setting_name.'_hide_rsd_link';
|
843 |
+
$hide_rsd_link_title = esc_html__( 'RSD Link: ', 'platinum-seo-pack' );
|
844 |
+
|
845 |
+
add_settings_field( $hide_rsd_link_id, $hide_rsd_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_rsd_link_field );
|
846 |
+
|
847 |
+
//Hide wp shortlink
|
848 |
+
$hide_wp_shortlink_field = array (
|
849 |
+
'label_for' => 'psp_'.$setting_name.'_hide_wp_shortlink',
|
850 |
+
'option_name' => $psp_settings_name.'[hide_wp_shortlink_wp_head]',
|
851 |
+
'option_value' => isset($psp_settings['hide_wp_shortlink_wp_head']) ? $psp_settings['hide_wp_shortlink_wp_head'] : '',
|
852 |
+
'checkbox_label' => esc_html__( 'Yes, remove wordpress shortlink from head section', 'platinum-seo-pack' ),
|
853 |
+
);
|
854 |
+
|
855 |
+
$hide_wp_shortlink_link_id = 'psp_'.$setting_name.'_hide_wp_shortlink';
|
856 |
+
$hide_wp_shortlink_link_title = esc_html__( 'WP shortlink: ', 'platinum-seo-pack' );
|
857 |
+
|
858 |
+
add_settings_field( $hide_wp_shortlink_link_id, $hide_wp_shortlink_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_wp_shortlink_field );
|
859 |
+
|
860 |
+
//Hide wlw manifest link (Windows live writer link)
|
861 |
+
$hide_wlw_manifest_link_field = array (
|
862 |
+
'label_for' => 'psp_'.$setting_name.'_hide_wlw_manifest_link',
|
863 |
+
'option_name' => $psp_settings_name.'[hide_wlw_manifest_link]',
|
864 |
+
'option_value' => isset($psp_settings['hide_wlw_manifest_link']) ? $psp_settings['hide_wlw_manifest_link'] : '',
|
865 |
+
'checkbox_label' => esc_html__( 'Yes, remove wlwmanifest link from head section', 'platinum-seo-pack' ),
|
866 |
+
);
|
867 |
+
|
868 |
+
$hide_wlw_manifest_link_id = 'psp_'.$setting_name.'_hide_wlw_manifest_link';
|
869 |
+
$hide_wlw_manifest_link_title = esc_html__( 'WLWmanifest link: ', 'platinum-seo-pack' );
|
870 |
+
|
871 |
+
add_settings_field( $hide_wlw_manifest_link_id, $hide_wlw_manifest_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_wlw_manifest_link_field );
|
872 |
+
|
873 |
+
//Hide index rel link
|
874 |
+
$hide_index_rel_link_field = array (
|
875 |
+
'label_for' => 'psp_'.$setting_name.'_hide_index_rel_link',
|
876 |
+
'option_name' => $psp_settings_name.'[hide_index_rel_link]',
|
877 |
+
'option_value' => isset($psp_settings['hide_index_rel_link']) ? $psp_settings['hide_index_rel_link'] : '',
|
878 |
+
'checkbox_label' => esc_html__( 'Yes, remove index rel link from head section', 'platinum-seo-pack' ),
|
879 |
+
);
|
880 |
+
|
881 |
+
$hide_index_rel_link_id = 'psp_'.$setting_name.'_hide_index_rel_link';
|
882 |
+
$hide_index_rel_link_title = esc_html__( 'Index rel Link: ', 'platinum-seo-pack' );
|
883 |
+
|
884 |
+
add_settings_field( $hide_index_rel_link_id, $hide_index_rel_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_index_rel_link_field );
|
885 |
+
|
886 |
+
//Hide adjacent posts link
|
887 |
+
$hide_adjacent_posts_rel_link_field = array (
|
888 |
+
'label_for' => 'psp_'.$setting_name.'_hide_adjacent_posts_rel_link',
|
889 |
+
'option_name' => $psp_settings_name.'[hide_adjacent_posts_rel_link_wp_head]',
|
890 |
+
'option_value' => isset($psp_settings['hide_adjacent_posts_rel_link_wp_head']) ? $psp_settings['hide_adjacent_posts_rel_link_wp_head'] : '',
|
891 |
+
'checkbox_label' => esc_html__( 'Yes, remove adjacent posts rel link from head section', 'platinum-seo-pack' ),
|
892 |
+
);
|
893 |
+
|
894 |
+
$hide_adjacent_posts_rel_link_id = 'psp_'.$setting_name.'_hide_adjacent_posts_rel_link';
|
895 |
+
$hide_adjacent_posts_rel_link_title = esc_html__( 'Adjacent posts rel Link: ', 'platinum-seo-pack' );
|
896 |
+
|
897 |
+
add_settings_field( $hide_adjacent_posts_rel_link_id, $hide_adjacent_posts_rel_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_adjacent_posts_rel_link_field );
|
898 |
+
|
899 |
+
//Hide parent post rel link
|
900 |
+
$hide_parent_rel_link_field = array (
|
901 |
+
'label_for' => 'psp_'.$setting_name.'_hide_parent_post_rel_link',
|
902 |
+
'option_name' => $psp_settings_name.'[hide_parent_post_rel_link]',
|
903 |
+
'option_value' => isset($psp_settings['hide_parent_post_rel_link']) ? $psp_settings['hide_parent_post_rel_link'] : '',
|
904 |
+
'checkbox_label' => esc_html__( 'Yes, remove parent post rel link from head section', 'platinum-seo-pack' ),
|
905 |
+
);
|
906 |
+
|
907 |
+
$hide_parent_rel_link_id = 'psp_'.$setting_name.'_hide_parent_post_rel_link';
|
908 |
+
$hide_parent_rel_link_title = esc_html__( 'Parent post rel Link: ', 'platinum-seo-pack' );
|
909 |
+
|
910 |
+
add_settings_field( $hide_parent_rel_link_id, $hide_parent_rel_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_parent_rel_link_field );
|
911 |
+
|
912 |
+
//Hide start post rel link
|
913 |
+
$hide_start_post_rel_link_field = array (
|
914 |
+
'label_for' => 'psp_'.$setting_name.'_hide_start_post_rel_link',
|
915 |
+
'option_name' => $psp_settings_name.'[hide_start_post_rel_link]',
|
916 |
+
'option_value' => isset($psp_settings['hide_start_post_rel_link']) ? $psp_settings['hide_start_post_rel_link'] : '',
|
917 |
+
'checkbox_label' => esc_html__( 'Yes, remove start post rel link from head section', 'platinum-seo-pack' ),
|
918 |
+
);
|
919 |
+
|
920 |
+
$hide_start_post_rel_link_id = 'psp_'.$setting_name.'_hide_start_post_rel_link';
|
921 |
+
$hide_start_post_rel_link_title = esc_html__( 'Start post rel Link: ', 'platinum-seo-pack' );
|
922 |
+
|
923 |
+
add_settings_field( $hide_start_post_rel_link_id, $hide_start_post_rel_link_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_start_post_rel_link_field );
|
924 |
+
|
925 |
+
//Hide wp generator
|
926 |
+
$hide_wp_generator_field = array (
|
927 |
+
'label_for' => 'psp_'.$setting_name.'_hide_wp_generator',
|
928 |
+
'option_name' => $psp_settings_name.'[hide_wp_generator]',
|
929 |
+
'option_value' => isset($psp_settings['hide_wp_generator']) ? $psp_settings['hide_wp_generator'] : '',
|
930 |
+
'checkbox_label' => esc_html__( 'Yes, remove wordpress version information from head section', 'platinum-seo-pack' ),
|
931 |
+
);
|
932 |
+
|
933 |
+
$hide_wp_generator_id = 'psp_'.$setting_name.'_hide_wp_generator';
|
934 |
+
$hide_wp_generator_title = esc_html__( 'WP generator: ', 'platinum-seo-pack' );
|
935 |
+
|
936 |
+
add_settings_field( $hide_wp_generator_id, $hide_wp_generator_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $hide_wp_generator_field );
|
937 |
+
|
938 |
+
}
|
939 |
+
|
940 |
+
/*
|
941 |
+
*/
|
942 |
+
function psp_comment_cleaner_settings($setting_name, $psp_settings) {
|
943 |
+
|
944 |
+
$psp_settings_name = "psp_".$setting_name."_settings";
|
945 |
+
//Section
|
946 |
+
$section_id = 'psp_cleanup_comment_section';
|
947 |
+
$section_title = esc_html__( 'Clean Up Comments Section', 'platinum_seo_pack' );
|
948 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_cleanup_comment_desc' ), $this->psp_general_settings_group );
|
949 |
+
|
950 |
+
//fields
|
951 |
+
|
952 |
+
//Strip HTML in comment text
|
953 |
+
$comment_text_nohtml_kses_field = array (
|
954 |
+
'label_for' => 'psp_'.$setting_name.'_comment_text_nohtml_kses',
|
955 |
+
'option_name' => $psp_settings_name.'[comment_text_nohtml_kses]',
|
956 |
+
'option_value' => isset($psp_settings['comment_text_nohtml_kses']) ? $psp_settings['comment_text_nohtml_kses'] : '',
|
957 |
+
'checkbox_label' => esc_html__( 'Yes, strip HTML from comment text', 'platinum-seo-pack' ),
|
958 |
+
);
|
959 |
+
|
960 |
+
$comment_text_nohtml_kses_id = 'psp_'.$setting_name.'_comment_text_nohtml_kses';
|
961 |
+
$comment_text_nohtml_kses_title = esc_html__( 'HTNL in comment text: ', 'platinum-seo-pack' );
|
962 |
+
|
963 |
+
add_settings_field( $comment_text_nohtml_kses_id, $comment_text_nohtml_kses_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $comment_text_nohtml_kses_field );
|
964 |
+
|
965 |
+
//Strip HTML in comment text RSS
|
966 |
+
$comment_text_rss_nohtml_kses_field = array (
|
967 |
+
'label_for' => 'psp_'.$setting_name.'_comment_text_rss_nohtml_kses',
|
968 |
+
'option_name' => $psp_settings_name.'[comment_text_rss_nohtml_kses]',
|
969 |
+
'option_value' => isset($psp_settings['comment_text_rss_nohtml_kses']) ? $psp_settings['comment_text_rss_nohtml_kses'] : '',
|
970 |
+
'checkbox_label' => esc_html__( 'Yes, strip HTML from comment text RSS', 'platinum-seo-pack' ),
|
971 |
+
);
|
972 |
+
|
973 |
+
$comment_text_rss_nohtml_kses_id = 'psp_'.$setting_name.'_comment_text_rss_nohtml_kses';
|
974 |
+
$comment_text_rss_nohtml_kses_title = esc_html__( 'HTNL in comment text RSS: ', 'platinum-seo-pack' );
|
975 |
+
|
976 |
+
add_settings_field( $comment_text_rss_nohtml_kses_id, $comment_text_rss_nohtml_kses_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $comment_text_rss_nohtml_kses_field );
|
977 |
+
|
978 |
+
//Strip HTML in comment excerpt
|
979 |
+
$comment_excerpt_nohtml_kses_field = array (
|
980 |
+
'label_for' => 'psp_'.$setting_name.'_comment_excerpt_nohtml_kses',
|
981 |
+
'option_name' => $psp_settings_name.'[comment_excerpt_nohtml_kses]',
|
982 |
+
'option_value' => isset($psp_settings['comment_excerpt_nohtml_kses']) ? $psp_settings['comment_excerpt_nohtml_kses'] : '',
|
983 |
+
'checkbox_label' => esc_html__( 'Yes, strip HTML from comment Excerpt', 'platinum-seo-pack' ),
|
984 |
+
);
|
985 |
+
|
986 |
+
$comment_excerpt_nohtml_kses_id = 'psp_'.$setting_name.'_comment_excerpt_nohtml_kses';
|
987 |
+
$comment_excerpt_nohtml_kses_title = esc_html__( 'HTNL in comment Excerpt: ', 'platinum-seo-pack' );
|
988 |
+
|
989 |
+
add_settings_field( $comment_excerpt_nohtml_kses_id, $comment_excerpt_nohtml_kses_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $comment_excerpt_nohtml_kses_field );
|
990 |
+
|
991 |
+
//Make links in comments not clickable
|
992 |
+
$comment_text_no_make_clickable_field = array (
|
993 |
+
'label_for' => 'psp_'.$setting_name.'_comment_text_no_make_clickable',
|
994 |
+
'option_name' => $psp_settings_name.'[comment_text_no_make_clickable]',
|
995 |
+
'option_value' => isset($psp_settings['comment_text_no_make_clickable']) ? $psp_settings['comment_text_no_make_clickable'] : '',
|
996 |
+
'checkbox_label' => esc_html__( 'Yes, make links in comments not clickable i.e remove links', 'platinum-seo-pack' ),
|
997 |
+
);
|
998 |
+
|
999 |
+
$comment_text_no_make_clickable_id = 'psp_'.$setting_name.'_comment_text_no_make_clickable';
|
1000 |
+
$comment_text_no_make_clickable_title = esc_html__( 'Anchor tags in comments ', 'platinum-seo-pack' );
|
1001 |
+
|
1002 |
+
add_settings_field( $comment_text_no_make_clickable_id, $comment_text_no_make_clickable_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_general_settings_group, $section_id, $comment_text_no_make_clickable_field );
|
1003 |
+
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
function sanitize_general_settings($settings) {
|
1007 |
+
|
1008 |
+
if( isset( $settings['separator'] ) ) {
|
1009 |
+
|
1010 |
+
$settings['separator'] = sanitize_text_field( htmlentities($settings['separator']) );
|
1011 |
+
|
1012 |
+
$psp_separators = array ( '-', '–', '—', '·', '•', '*', '|', '~', '«', '»', '<', '>', '˜', '♥', '♣');
|
1013 |
+
|
1014 |
+
if (!in_array($settings['separator'], $psp_separators)) {
|
1015 |
+
$settings['separator'] = '';
|
1016 |
+
}
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
if( isset( $settings['paged_title_format'] ) ) {
|
1020 |
+
$settings['paged_title_format'] = sanitize_text_field( $settings['paged_title_format'] );
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
if( isset( $settings['rewrite_titles'] ) ) {
|
1024 |
+
$settings['rewrite_titles'] = !is_null(filter_var($settings['rewrite_titles'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['rewrite_titles'] : '';
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
if( isset( $settings['force_psp_titles'] ) ) {
|
1028 |
+
$settings['force_psp_titles'] = !is_null(filter_var($settings['force_psp_titles'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['force_psp_titles'] : '';
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
if( isset( $settings['noindex_subpages'] ) ) {
|
1032 |
+
$settings['noindex_subpages'] = !is_null(filter_var($settings['noindex_subpages'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['noindex_subpages'] : '';
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
if( isset( $settings['noindex_rss_feeds'] ) ) {
|
1036 |
+
$settings['noindex_rss_feeds'] = !is_null(filter_var($settings['noindex_rss_feeds'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['noindex_rss_feeds'] : '';
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
if( isset( $settings['noindex_pt_comment_pages'] ) ) {
|
1040 |
+
$settings['noindex_pt_comment_pages'] = !is_null(filter_var($settings['noindex_pt_comment_pages'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['noindex_pt_comment_pages'] : '';
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
if( isset( $settings['noindex_pt_paginations'] ) ) {
|
1044 |
+
$settings['noindex_pt_paginations'] = !is_null(filter_var($settings['noindex_pt_paginations'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['noindex_pt_paginations'] : '';
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
if( isset( $settings['_use_meta_noodp'] ) ) {
|
1048 |
+
$settings['_use_meta_noodp'] = !is_null(filter_var($settings['_use_meta_noodp'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['_use_meta_noodp'] : '';
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
if( isset( $settings['use_meta_noydir'] ) ) {
|
1052 |
+
$settings['use_meta_noydir'] = !is_null(filter_var($settings['use_meta_noydir'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_meta_noydir'] : '';
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
if( isset( $settings['autogenerate_description'] ) ) {
|
1056 |
+
$settings['autogenerate_description'] = !is_null(filter_var($settings['autogenerate_description'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['autogenerate_description'] : '';
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
if( isset( $settings['use_canonical'] ) ) {
|
1060 |
+
$settings['use_canonical'] = !is_null(filter_var($settings['use_canonical'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_canonical'] : '';
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
if( isset( $settings['use_meta_keywords'] ) ) {
|
1064 |
+
$settings['use_meta_keywords'] = !is_null(filter_var($settings['use_meta_keywords'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_meta_keywords'] : '';
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
if( isset( $settings['use_psp_template_script'] ) ) {
|
1068 |
+
$settings['use_psp_template_script'] = !is_null(filter_var($settings['use_psp_template_script'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_psp_template_script'] : '';
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
if( isset( $settings['hide_metabox_advanced'] ) ) {
|
1072 |
+
$settings['hide_metabox_advanced'] = !is_null(filter_var($settings['hide_metabox_advanced'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_metabox_advanced'] : '';
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
if( isset( $settings['nofollow_tag_links'] ) ) {
|
1076 |
+
$settings['nofollow_tag_links'] = !is_null(filter_var($settings['nofollow_tag_links'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['nofollow_tag_links'] : '';
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
if( isset( $settings['nofollow_loginregn_links'] ) ) {
|
1080 |
+
$settings['nofollow_loginregn_links'] = !is_null(filter_var($settings['nofollow_loginregn_links'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['nofollow_loginregn_links'] : '';
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
if( isset( $settings['credits'] ) ) {
|
1084 |
+
$settings['credits'] = !is_null(filter_var($settings['credits'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['credits'] : '';
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
if( isset( $settings['hide_feed_links'] ) ) {
|
1088 |
+
$settings['hide_feed_links'] = !is_null(filter_var($settings['hide_feed_links'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_feed_links'] : '';
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
if( isset( $settings['hide_rsd_link'] ) ) {
|
1092 |
+
$settings['hide_rsd_link'] = !is_null(filter_var($settings['hide_rsd_link'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_rsd_link'] : '';
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
if( isset( $settings['hide_wp_shortlink_wp_head'] ) ) {
|
1096 |
+
$settings['hide_wp_shortlink_wp_head'] = !is_null(filter_var($settings['hide_wp_shortlink_wp_head'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_wp_shortlink_wp_head'] : '';
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
if( isset( $settings['hide_wlw_manifest_link'] ) ) {
|
1100 |
+
$settings['hide_wlw_manifest_link'] = !is_null(filter_var($settings['hide_wlw_manifest_link'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_wlw_manifest_link'] : '';
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
if( isset( $settings['hide_index_rel_link'] ) ) {
|
1104 |
+
$settings['hide_index_rel_link'] = !is_null(filter_var($settings['hide_index_rel_link'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_index_rel_link'] : '';
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
if( isset( $settings['hide_adjacent_posts_rel_link_wp_head'] ) ) {
|
1108 |
+
$settings['hide_adjacent_posts_rel_link_wp_head'] = !is_null(filter_var($settings['hide_adjacent_posts_rel_link_wp_head'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_adjacent_posts_rel_link_wp_head'] : '';
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
if( isset( $settings['hide_parent_post_rel_link'] ) ) {
|
1112 |
+
$settings['hide_parent_post_rel_link'] = !is_null(filter_var($settings['hide_parent_post_rel_link'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_parent_post_rel_link'] : '';
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
if( isset( $settings['hide_start_post_rel_link'] ) ) {
|
1116 |
+
$settings['hide_start_post_rel_link'] = !is_null(filter_var($settings['hide_start_post_rel_link'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_start_post_rel_link'] : '';
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
if( isset( $settings['hide_wp_generator'] ) ) {
|
1120 |
+
$settings['hide_wp_generator'] = !is_null(filter_var($settings['hide_wp_generator'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_wp_generator'] : '';
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
if( isset( $settings['comment_text_nohtml_kses'] ) ) {
|
1124 |
+
$settings['comment_text_nohtml_kses'] = !is_null(filter_var($settings['comment_text_nohtml_kses'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['comment_text_nohtml_kses'] : '';
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
if( isset( $settings['_comment_text_rss_nohtml_kses'] ) ) {
|
1128 |
+
$settings['_comment_text_rss_nohtml_kses'] = !is_null(filter_var($settings['_comment_text_rss_nohtml_kses'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['_comment_text_rss_nohtml_kses'] : '';
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
if( isset( $settings['comment_excerpt_nohtml_kses'] ) ) {
|
1132 |
+
$settings['comment_excerpt_nohtml_kses'] = !is_null(filter_var($settings['comment_excerpt_nohtml_kses'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['comment_excerpt_nohtml_kses'] : '';
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
if( isset( $settings['comment_text_no_make_clickable'] ) ) {
|
1136 |
+
$settings['comment_text_no_make_clickable'] = !is_null(filter_var($settings['comment_text_no_make_clickable'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['comment_text_no_make_clickable'] : '';
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
return $settings;
|
1140 |
+
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
/*
|
1144 |
+
* Registers the breadcrumb settings and appends the
|
1145 |
+
* key to the plugin settings tabs array. - breadcrumbs
|
1146 |
+
*/
|
1147 |
+
private function register_breadcrumb_settings() {
|
1148 |
+
|
1149 |
+
$setting_name = "breadcrumb";
|
1150 |
+
$this->psp_settings_tabs[$this->psp_breadcrumb_settings_group] = 'Breadcrumbs';
|
1151 |
+
$psp_settings_name = "psp_breadcrumb_settings";
|
1152 |
+
//$setting_name_text = str_replace( "_", " ", $psp_settings_name );
|
1153 |
+
//$setting_name_text = ucwords($setting_name_text);
|
1154 |
+
|
1155 |
+
$psp_settings = get_option($psp_settings_name);
|
1156 |
+
//$this->psp_settings_name = $psp_settings;
|
1157 |
+
|
1158 |
+
register_setting( $this->psp_breadcrumb_settings_group, $psp_settings_name, array( &$this, 'sanitize_breadcrumb_settings' ) );
|
1159 |
+
|
1160 |
+
//Section
|
1161 |
+
$section_id = 'psp_breadcrumb_section';
|
1162 |
+
$section_title = esc_html__( 'Breadcrumb Settings', 'platinum_seo_pack' );
|
1163 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_breadcrumb_desc' ), $this->psp_breadcrumb_settings_group );
|
1164 |
+
|
1165 |
+
//yse default settings
|
1166 |
+
$psp_bc_use_defaults_field = array (
|
1167 |
+
'label_for' => 'psp_'.$setting_name.'_use_defaults',
|
1168 |
+
'option_name' => $psp_settings_name.'[use_defaults]',
|
1169 |
+
'option_value' => isset($psp_settings['use_defaults']) ? $psp_settings['use_defaults'] : '',
|
1170 |
+
'checkbox_label' => esc_html__( 'Yes, use default settings', 'platinum-seo-pack' ),
|
1171 |
+
'option_description' => esc_html__( 'If this is checked, all the user defined settings on this page will be ignored and default settings will be used.', 'platinum-seo-pack' ),
|
1172 |
+
);
|
1173 |
+
|
1174 |
+
$psp_bc_use_defaults_field_id = 'psp_'.$setting_name.'_use_defaults';
|
1175 |
+
$psp_bc_use_defaults_field_title = esc_html__( 'Use Default Settings: ', 'platinum-seo-pack' );
|
1176 |
+
|
1177 |
+
add_settings_field( $psp_bc_use_defaults_field_id, $psp_bc_use_defaults_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_use_defaults_field );
|
1178 |
+
|
1179 |
+
//field
|
1180 |
+
|
1181 |
+
//$psp_separators = array ('‐', '–', '—', '·', '•', '*', '⋆', '|', '~', '«', '»', '<', '>'); ⋆ ‐ ‐
|
1182 |
+
$psp_separators = array ('' => 'None', '-' => '-', '–' => '–', '—' => '—', '·' => '·', '•' => '•', '*' => '*', '|' => '|', '~' => '~', '«' => '«', '»' => '»', '<' => '<', '>' => '>', '˜' => '˜', '♥' => '♥', '♣' => '♣');
|
1183 |
+
|
1184 |
+
$psp_separator_field = array (
|
1185 |
+
'label_for' => 'psp_'.$setting_name.'_separator',
|
1186 |
+
'option_name' => $psp_settings_name.'[separator]',
|
1187 |
+
'option_value' => isset($psp_settings['separator']) ? $psp_settings['separator'] : '',
|
1188 |
+
'radioitems' => $psp_separators,
|
1189 |
+
'option_description' => esc_html__( ' Used to specify the separator between breadcrumbs.', 'platinum-seo-pack' )
|
1190 |
+
);
|
1191 |
+
|
1192 |
+
$psp_separator_field_id = 'psp_'.$setting_name.'_separator';
|
1193 |
+
$psp_separator_field_title = 'Breadcrumb Separator: ';
|
1194 |
+
|
1195 |
+
add_settings_field( $psp_separator_field_id, $psp_separator_field_title, array( &$this, 'psp_add_field_radiobuttons' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_separator_field );
|
1196 |
+
|
1197 |
+
//Parent item container tag
|
1198 |
+
$psp_bc_container_field = array (
|
1199 |
+
'label_for' => 'psp_'.$setting_name.'_container',
|
1200 |
+
'option_name' => $psp_settings_name.'[container]',
|
1201 |
+
'option_value' => isset($psp_settings['container']) ? esc_attr($psp_settings['container']) : '',
|
1202 |
+
'option_description' => esc_html__( 'The default tag used for the breadcrumb trail container is <code>div</code>. You might also use <code>span</code> or <code>li</code> as per your stying needs.', 'platinum-seo-pack' ),
|
1203 |
+
);
|
1204 |
+
|
1205 |
+
$psp_bc_container_field_id = 'psp_'.$setting_name.'_container';
|
1206 |
+
$psp_bc_container_field_title = esc_html__( 'Breadcrumb Trail Container Tag: ', 'platinum-seo-pack' );
|
1207 |
+
|
1208 |
+
add_settings_field( $psp_bc_container_field_id, $psp_bc_container_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_container_field );
|
1209 |
+
|
1210 |
+
//show_browse
|
1211 |
+
$psp_bc_show_browse_field = array (
|
1212 |
+
'label_for' => 'psp_'.$setting_name.'_show_browse',
|
1213 |
+
'option_name' => $psp_settings_name.'[show_browse]',
|
1214 |
+
'option_value' => isset($psp_settings['show_browse']) ? esc_attr($psp_settings['show_browse']) : '',
|
1215 |
+
'checkbox_label' => esc_html__( 'Yes, show <code>Browse</code> or any other user defined text in front of the breadcrumb trail', 'platinum-seo-pack' ),
|
1216 |
+
'option_description' => esc_html__( 'This should be checked if you want to show <code>Browse</code> or any other user defined text in front of the breadcrumb trail.', 'platinum-seo-pack' ),
|
1217 |
+
);
|
1218 |
+
|
1219 |
+
$psp_bc_show_browse_field_id = 'psp_'.$setting_name.'_show_browse';
|
1220 |
+
$psp_bc_show_browse_field_title = esc_html__( 'Show Browse: ', 'platinum-seo-pack' );
|
1221 |
+
|
1222 |
+
add_settings_field( $psp_bc_show_browse_field_id, $psp_bc_show_browse_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_show_browse_field );
|
1223 |
+
|
1224 |
+
//show_on_front
|
1225 |
+
$show_on_front_field = array (
|
1226 |
+
'label_for' => 'psp_'.$setting_name.'_show_on_front',
|
1227 |
+
'option_name' => $psp_settings_name.'[show_on_front]',
|
1228 |
+
'option_value' => isset($psp_settings['show_on_front']) ? $psp_settings['show_on_front'] : '',
|
1229 |
+
'checkbox_label' => esc_html__( 'Yes, Show on front', 'platinum-seo-pack' ),
|
1230 |
+
'option_description' => esc_html__( 'This should always remain checked if you want to show the front items like network home link, site home link or home title in the breadcrumb trail of the site front page using Platinum SEO', 'platinum-seo-pack' ),
|
1231 |
+
);
|
1232 |
+
|
1233 |
+
$show_on_front_field_id = 'psp_'.$setting_name.'_show_on_front';
|
1234 |
+
$show_on_front_field_title = esc_html__( 'Show on Front: ', 'platinum-seo-pack' );
|
1235 |
+
|
1236 |
+
add_settings_field( $show_on_front_field_id, $show_on_front_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $show_on_front_field );
|
1237 |
+
|
1238 |
+
//network
|
1239 |
+
$psp_bc_network_field = array (
|
1240 |
+
'label_for' => 'psp_'.$setting_name.'_network',
|
1241 |
+
'option_name' => $psp_settings_name.'[network]',
|
1242 |
+
'option_value' => isset($psp_settings['network']) ? $psp_settings['network'] : '',
|
1243 |
+
'checkbox_label' => esc_html__( 'Yes, trail back to main site in the case of a multisite.', 'platinum-seo-pack' ),
|
1244 |
+
'option_description' => esc_html__( 'This should be checked if you want to create trail back to the main site if this site is part of a multisite.', 'platinum-seo-pack' ),
|
1245 |
+
);
|
1246 |
+
|
1247 |
+
$psp_bc_network_field_id = 'psp_'.$setting_name.'_network';
|
1248 |
+
$psp_bc_network_field_title = esc_html__( 'Create trail back to Main Site: ', 'platinum-seo-pack' );
|
1249 |
+
|
1250 |
+
add_settings_field( $psp_bc_network_field_id, $psp_bc_network_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_network_field );
|
1251 |
+
|
1252 |
+
//show_title
|
1253 |
+
$psp_bc_show_title_field = array (
|
1254 |
+
'label_for' => 'psp_'.$setting_name.'_show_title',
|
1255 |
+
'option_name' => $psp_settings_name.'[show_title]',
|
1256 |
+
'option_value' => isset($psp_settings['show_title']) ? $psp_settings['show_title'] : '',
|
1257 |
+
'checkbox_label' => esc_html__( 'Yes, show title as part of the breadcrumb trail', 'platinum-seo-pack' ),
|
1258 |
+
'option_description' => esc_html__( 'This should be checked if you want to show the title of the page in the breadcrumb trail.Title will be in plain text and not have an anchor tag', 'platinum-seo-pack' ),
|
1259 |
+
);
|
1260 |
+
|
1261 |
+
$psp_bc_show_title_field_id = 'psp_'.$setting_name.'_show_title';
|
1262 |
+
$psp_bc_show_title_field_title = esc_html__( 'Show Title: ', 'platinum-seo-pack' );
|
1263 |
+
|
1264 |
+
add_settings_field( $psp_bc_show_title_field_id, $psp_bc_show_title_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_show_title_field );
|
1265 |
+
|
1266 |
+
//echo
|
1267 |
+
$psp_bc_echo_field = array (
|
1268 |
+
'label_for' => 'psp_'.$setting_name.'_echo',
|
1269 |
+
'option_name' => $psp_settings_name.'[echo]',
|
1270 |
+
'option_value' => isset($psp_settings['echo']) ? $psp_settings['echo'] : '',
|
1271 |
+
'checkbox_label' => esc_html__( 'Yes, <code>echo</code> the breadcrumbs', 'platinum-seo-pack' ),
|
1272 |
+
'option_description' => esc_html__( 'This should be checked if you want to echo the breadcrumb trail.', 'platinum-seo-pack' ),
|
1273 |
+
);
|
1274 |
+
|
1275 |
+
$psp_bc_echo_field_id = 'psp_'.$setting_name.'_echo';
|
1276 |
+
$psp_bc_echo_field_title = '<code>echo</code>'.esc_html__( ' the breadcrumb trail: ', 'platinum-seo-pack' );
|
1277 |
+
|
1278 |
+
add_settings_field( $psp_bc_echo_field_id, $psp_bc_echo_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_echo_field );
|
1279 |
+
|
1280 |
+
//Browse label
|
1281 |
+
$psp_bc_label_browse_field = array (
|
1282 |
+
'label_for' => 'psp_'.$setting_name.'_browse',
|
1283 |
+
'option_name' => $psp_settings_name.'[labels][browse]',
|
1284 |
+
'option_value' => isset($psp_settings['labels']['browse']) ? esc_attr($psp_settings['labels']['browse']) : '',
|
1285 |
+
'option_description' => esc_html__( 'The default label used if <code>Show Browse</code> is checked is <code>Browse</code>. This text is used at the start of the breadcrumb trail if <code>Show Browse</code> is checked.', 'platinum-seo-pack' ),
|
1286 |
+
);
|
1287 |
+
|
1288 |
+
$psp_bc_label_browse_field_id = 'psp_'.$setting_name.'_browse';
|
1289 |
+
$psp_bc_label_browse_field_title = esc_html__( 'Text label to use in place of the default', 'platinum-seo-pack' ).'<code>Browse</code>:';
|
1290 |
+
|
1291 |
+
add_settings_field( $psp_bc_label_browse_field_id, $psp_bc_label_browse_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_label_browse_field);
|
1292 |
+
|
1293 |
+
|
1294 |
+
//Home label
|
1295 |
+
$psp_bc_label_home_field = array (
|
1296 |
+
'label_for' => 'psp_'.$setting_name.'_home',
|
1297 |
+
'option_name' => $psp_settings_name.'[labels][home]',
|
1298 |
+
'option_value' => isset($psp_settings['labels']['home']) ? esc_attr($psp_settings['labels']['home']) : '',
|
1299 |
+
'option_description' => esc_html__( 'The default label used to represent home page is <code>Home</code>.', 'platinum-seo-pack' ),
|
1300 |
+
);
|
1301 |
+
|
1302 |
+
$psp_bc_label_home_field_id = 'psp_'.$setting_name.'_home';
|
1303 |
+
$psp_bc_label_home_field_title = esc_html__( 'Label for Home: ', 'platinum-seo-pack' );
|
1304 |
+
|
1305 |
+
add_settings_field( $psp_bc_label_home_field_id, $psp_bc_label_home_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_label_home_field);
|
1306 |
+
|
1307 |
+
//404 Error label
|
1308 |
+
$psp_bc_label_error_field = array (
|
1309 |
+
'label_for' => 'psp_'.$setting_name.'_error_404',
|
1310 |
+
'option_name' => $psp_settings_name.'[labels][error_404]',
|
1311 |
+
'option_value' => isset($psp_settings['labels']['error_404']) ? esc_attr($psp_settings['labels']['error_404']) : '',
|
1312 |
+
'option_description' => esc_html__( 'The default label used is <code>404 Not Found</code>. This is the label to use as page title in breadcrumb trail on 404 Error page if <code>Show Title</code> is checked.', 'platinum-seo-pack' ),
|
1313 |
+
);
|
1314 |
+
|
1315 |
+
$psp_bc_label_error_field_id = 'psp_'.$setting_name.'_error_404';
|
1316 |
+
$psp_bc_label_error_field_title = esc_html__( 'Label to use as Title in breadcrumb trail on 404 Error page: ', 'platinum-seo-pack' );
|
1317 |
+
|
1318 |
+
add_settings_field( $psp_bc_label_error_field_id, $psp_bc_label_error_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_breadcrumb_settings_group, $section_id, $psp_bc_label_error_field);
|
1319 |
+
|
1320 |
+
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
function sanitize_breadcrumb_settings($settings) {
|
1324 |
+
|
1325 |
+
if ( isset( $settings['use_defaults'] ) ) {
|
1326 |
+
$settings['use_defaults'] = !is_null(filter_var($settings['use_defaults'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_defaults'] : '';
|
1327 |
+
}
|
1328 |
+
|
1329 |
+
if( isset( $settings['separator'] ) ) {
|
1330 |
+
|
1331 |
+
$settings['separator'] = sanitize_text_field( htmlentities($settings['separator']) );
|
1332 |
+
|
1333 |
+
$psp_separators = array ( '-', '–', '—', '·', '•', '*', '|', '~', '«', '»', '<', '>', '˜', '♥', '♣');
|
1334 |
+
|
1335 |
+
if (!in_array($settings['separator'], $psp_separators)) {
|
1336 |
+
$settings['separator'] = '';
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
if ( isset( $settings['container'] ) ) {
|
1341 |
+
$settings['container'] = sanitize_text_field( $settings['container'] );
|
1342 |
+
$containers = array('div', 'li', 'span');
|
1343 |
+
if (!in_array($settings['container'], $containers)) {
|
1344 |
+
$settings['container'] = '';
|
1345 |
+
}
|
1346 |
+
}
|
1347 |
+
|
1348 |
+
if ( isset( $settings['show_browse'] ) ) {
|
1349 |
+
$settings['show_browse'] = !is_null(filter_var($settings['show_browse'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['show_browse'] : '';
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
if ( isset( $settings['show_on_front'] ) ) {
|
1353 |
+
$settings['show_on_front'] = !is_null(filter_var($settings['show_on_front'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['show_on_front'] : '';
|
1354 |
+
}
|
1355 |
+
|
1356 |
+
if ( isset( $settings['network'] ) ) {
|
1357 |
+
$settings['network'] = !is_null(filter_var($settings['network'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['network'] : '';
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
if ( isset( $settings['show_title'] ) ) {
|
1361 |
+
$settings['show_title'] = !is_null(filter_var($settings['show_title'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['show_title'] : '';
|
1362 |
+
}
|
1363 |
+
|
1364 |
+
if ( isset( $settings['echo'] ) ) {
|
1365 |
+
$settings['echo'] = !is_null(filter_var($settings['echo'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['echo'] : '';
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
if( isset( $settings['labels']['browse'] ) ) $settings['labels']['browse'] = sanitize_text_field( $settings['labels']['browse'] );
|
1369 |
+
|
1370 |
+
if( isset( $settings['labels']['home'] ) ) $settings['labels']['home'] = sanitize_text_field( $settings['labels']['home'] );
|
1371 |
+
|
1372 |
+
if( isset( $settings['labels']['error_404'] ) ) $settings['labels']['error_404'] = sanitize_text_field( $settings['labels']['error_404'] );
|
1373 |
+
|
1374 |
+
return $settings;
|
1375 |
+
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
/*
|
1379 |
+
* Registers the search and 404 title settings and appends the
|
1380 |
+
* key to the plugin settings tabs array.
|
1381 |
+
*/
|
1382 |
+
private function register_other_settings($others_name) {
|
1383 |
+
$this->psp_settings_tabs[$this->psp_archives_settings_group] = 'Archives';
|
1384 |
+
$psp_settings_name = "psp_".$others_name."_settings";
|
1385 |
+
$arc_name_text = str_replace( "_", " ", $others_name );
|
1386 |
+
$arc_name_text = ucwords($arc_name_text);
|
1387 |
+
|
1388 |
+
$psp_settings = get_option($psp_settings_name);
|
1389 |
+
//$this->psp_settings_name = $psp_settings;
|
1390 |
+
|
1391 |
+
wp_register_script( 'psp-atags-js', plugins_url( '/js/atags.js', __FILE__ ), array( 'jquery' ), false, true );
|
1392 |
+
wp_enqueue_script('psp-atags-js');
|
1393 |
+
|
1394 |
+
register_setting( $this->psp_archives_settings_group, $psp_settings_name, array( &$this, 'sanitize_other_archive_settings' ));
|
1395 |
+
|
1396 |
+
//Section
|
1397 |
+
$section_id = 'psp_'.$others_name.'_section';
|
1398 |
+
//$section_title = $arc_name_text.' Settings';
|
1399 |
+
$section_title = sprintf( esc_html__( '%s Settings', 'platinum_seo_pack' ), $arc_name_text );
|
1400 |
+
|
1401 |
+
if ($others_name == "search_result") {
|
1402 |
+
|
1403 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_others_desc' ), $this->psp_archives_settings_group );
|
1404 |
+
} else if ($others_name == "404_page") {
|
1405 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_404_desc' ), $this->psp_archives_settings_group );
|
1406 |
+
} else {
|
1407 |
+
//do nothing;
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
if ($others_name == "search_result") {
|
1411 |
+
$option_title_formats = '<code>%search%</code> - '.esc_html__('search keyword/keyphrase', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1412 |
+
|
1413 |
+
//available tags array
|
1414 |
+
$availableTags = ['sep', 'search', 'site_name', 'site_description'];
|
1415 |
+
|
1416 |
+
} else if ($others_name == "404_page") {
|
1417 |
+
$option_title_formats = '<code>%title_404%</code> - '.esc_html__('"404 Not Found"', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1418 |
+
|
1419 |
+
//available tags array
|
1420 |
+
$availableTags = ['sep', 'title_404', 'site_name'];
|
1421 |
+
} else {
|
1422 |
+
//do nothing;
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
//Fields
|
1426 |
+
$title_field = array (
|
1427 |
+
'label_for' => 'psp_'.$others_name.'_title',
|
1428 |
+
'option_name' => $psp_settings_name.'[title]',
|
1429 |
+
'option_value' => isset($psp_settings['title']) ? esc_attr($psp_settings['title']) : '',
|
1430 |
+
'option_description' => $option_title_formats,
|
1431 |
+
'class_name' => 'titletags',
|
1432 |
+
'psp_tags' => $availableTags,
|
1433 |
+
);
|
1434 |
+
|
1435 |
+
$title_field_id = 'psp_'.$others_name.'_title';
|
1436 |
+
$title_field_title = esc_html__('Title Format: ', 'platinum-seo-pack');
|
1437 |
+
|
1438 |
+
$robots_field = array (
|
1439 |
+
'label_for' => 'psp_'.$others_name.'_robots',
|
1440 |
+
'option_name' => $psp_settings_name.'[robots]',
|
1441 |
+
'option_value' => isset($psp_settings['robots']) ? $psp_settings['robots'] : '',
|
1442 |
+
'checkbox_label' => '<code>noindex, follow</code>',
|
1443 |
+
'option_description' => esc_html__(' Do not index and show this page in SERPS (Search Engine Result Pages).', 'platinum-seo-pack')
|
1444 |
+
);
|
1445 |
+
|
1446 |
+
$robots_field_id = 'psp_'.$others_name.'robots';
|
1447 |
+
$robots_field_title = esc_html__('Meta Robots: ', 'platinum-seo-pack');
|
1448 |
+
|
1449 |
+
$noarchive_field = array (
|
1450 |
+
'label_for' => 'psp_'.$others_name.'_noarchive',
|
1451 |
+
'option_name' => $psp_settings_name.'[noarchive]',
|
1452 |
+
'option_value' => isset($psp_settings['noarchive']) ? $psp_settings['noarchive'] : '',
|
1453 |
+
'checkbox_label' => '<code>noarchive</code>',
|
1454 |
+
'option_description' => esc_html__(' Do not show Cached link in SERPS (Search Engine Result Pages) for this page. It thus tells search engines not to store a cached copy of the page.', 'platinum-seo-pack')
|
1455 |
+
);
|
1456 |
+
|
1457 |
+
$noarchive_field_id = 'psp_'.$others_name.'noarchive';
|
1458 |
+
$noarchive_field_title = "";//esc_html__('Do not show Cached link in SERPS: ', 'platinum-seo-pack');
|
1459 |
+
|
1460 |
+
$nosnippet_field = array (
|
1461 |
+
'label_for' => 'psp_'.$others_name.'_nosnippet',
|
1462 |
+
'option_name' => $psp_settings_name.'[nosnippet]',
|
1463 |
+
'option_value' => isset($psp_settings['nosnippet']) ? $psp_settings['nosnippet'] : '',
|
1464 |
+
'checkbox_label' => '<code>nosnippet</code>',
|
1465 |
+
'option_description' => esc_html__(' Do not show snippet (description) in SERPS (Search Engine Result Pages) for this page. It also tells search engines not to show a cached link in SERPS for this page.', 'platinum-seo-pack')
|
1466 |
+
);
|
1467 |
+
|
1468 |
+
$nosnippet_field_id = 'psp_'.$others_name.'nosnippet';
|
1469 |
+
$nosnippet_field_title = "";//__('Do not show snippet in SERPS: ', 'platinum-seo-pack');
|
1470 |
+
|
1471 |
+
add_settings_field( $title_field_id, $title_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_archives_settings_group, $section_id, $title_field);
|
1472 |
+
add_settings_field( $robots_field_id, $robots_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $robots_field );
|
1473 |
+
if ($others_name == "search_result") {
|
1474 |
+
add_settings_field( $noarchive_field_id, $noarchive_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $noarchive_field );
|
1475 |
+
add_settings_field( $nosnippet_field_id, $nosnippet_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $nosnippet_field );
|
1476 |
+
}
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
/*
|
1480 |
+
* Registers the Archive SEO settings and appends the
|
1481 |
+
* key to the plugin settings tabs array.
|
1482 |
+
*/
|
1483 |
+
private function register_archive_settings($archive_name) {
|
1484 |
+
$this->psp_settings_tabs[$this->psp_archives_settings_group] = 'Archives';
|
1485 |
+
$psp_settings_name = "psp_".$archive_name."_settings";
|
1486 |
+
$arc_name_text = str_replace( "_", " ", $archive_name );
|
1487 |
+
$arc_name_text = ucwords($arc_name_text);
|
1488 |
+
|
1489 |
+
$psp_settings = get_option($psp_settings_name);
|
1490 |
+
//$this->psp_settings_name = $psp_settings;
|
1491 |
+
|
1492 |
+
wp_register_script( 'psp-atags-js', plugins_url( '/js/atags.js', __FILE__ ), array( 'jquery' ), false, true );
|
1493 |
+
wp_enqueue_script('psp-atags-js');
|
1494 |
+
|
1495 |
+
//register_setting( $this->psp_archives_settings_group, $psp_settings_name );
|
1496 |
+
register_setting( $this->psp_archives_settings_group, $psp_settings_name, array( &$this, 'sanitize_other_archive_settings' ));
|
1497 |
+
//Section
|
1498 |
+
$section_id = 'psp_'.$archive_name.'section';
|
1499 |
+
//$section_title = $arc_name_text.' Settings';
|
1500 |
+
$section_title = sprintf( esc_html__( '%s Settings', 'platinum_seo_pack' ), $arc_name_text );
|
1501 |
+
|
1502 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_archives_desc' ), $this->psp_archives_settings_group );
|
1503 |
+
|
1504 |
+
if ($archive_name == "date_archive") {
|
1505 |
+
$option_title_formats = '<code>%title_date%</code> - '.esc_html__('Date', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1506 |
+
//available tags array
|
1507 |
+
$availableTags = ['sep', 'title_date', 'site_name', 'site_description'];
|
1508 |
+
} else if ($archive_name == "author_archive") {
|
1509 |
+
$option_title_formats = '<code>%title_author%</code> - '.esc_html__('Author Name', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1510 |
+
//available tags array
|
1511 |
+
$availableTags = ['sep', 'title_author', 'site_name', 'site_description'];
|
1512 |
+
} else {
|
1513 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Post type archive Title', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1514 |
+
//available tags array
|
1515 |
+
$availableTags = ['sep', 'seo_title', 'site_name', 'site_description'];
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
$title_field = array (
|
1519 |
+
'label_for' => 'psp_'.$archive_name.'_title',
|
1520 |
+
'option_name' => $psp_settings_name.'[title]',
|
1521 |
+
'option_value' => isset($psp_settings['title']) ? $psp_settings['title'] : '',
|
1522 |
+
'option_description' => $option_title_formats,
|
1523 |
+
'class_name' => 'titletags',
|
1524 |
+
'psp_tags' => $availableTags,
|
1525 |
+
);
|
1526 |
+
|
1527 |
+
$robots_field = array (
|
1528 |
+
'label_for' => 'psp_'.$archive_name.'_robots',
|
1529 |
+
'option_name' => $psp_settings_name.'[robots]',
|
1530 |
+
'option_value' => isset($psp_settings['robots']) ? $psp_settings['robots'] : '',
|
1531 |
+
'checkbox_label' => '<code>noindex, follow</code>',
|
1532 |
+
'option_description' => esc_html__(' Do not index and show this page in SERPS (Search Engine Result Pages).', 'platinum-seo-pack')
|
1533 |
+
);
|
1534 |
+
|
1535 |
+
$noarchive_field = array (
|
1536 |
+
'label_for' => 'psp_'.$archive_name.'_noarchive',
|
1537 |
+
'option_name' => $psp_settings_name.'[noarchive]',
|
1538 |
+
'option_value' => isset($psp_settings['noarchive']) ? $psp_settings['noarchive'] : '',
|
1539 |
+
'checkbox_label' => '<code>noarchive</code>',
|
1540 |
+
'option_description' => esc_html__(' Do not show Cached link in SERPS (Search Engine Result Pages) for this page. It thus tells search engines not to store a cached copy of the page.', 'platinum-seo-pack')
|
1541 |
+
);
|
1542 |
+
|
1543 |
+
$nosnippet_field = array (
|
1544 |
+
'label_for' => 'psp_'.$archive_name.'_nosnippet',
|
1545 |
+
'option_name' => $psp_settings_name.'[nosnippet]',
|
1546 |
+
'option_value' => isset($psp_settings['nosnippet']) ? $psp_settings['nosnippet'] : '',
|
1547 |
+
'checkbox_label' => '<code>nosnippet</code>',
|
1548 |
+
'option_description' => esc_html__(' Do not show snippet (description) in SERPS (Search Engine Result Pages) for this page. It also tells search engines not to show a cached link in SERPS for this page.', 'platinum-seo-pack')
|
1549 |
+
);
|
1550 |
+
|
1551 |
+
/*$disable_field = array (
|
1552 |
+
'label_for' => 'psp_'.$archive_name.'_disable',
|
1553 |
+
'option_name' => $psp_settings_name.'[disable]',
|
1554 |
+
'option_value' => $psp_settings['disable'],
|
1555 |
+
'checkbox_label' => 'Disable the '.$arc_name_text
|
1556 |
+
);*/
|
1557 |
+
|
1558 |
+
$redirect_field = array (
|
1559 |
+
'label_for' => 'psp_'.$archive_name.'_redirect_url',
|
1560 |
+
'option_name' => $psp_settings_name.'[redirect_url]',
|
1561 |
+
'option_value' => isset($psp_settings['redirect_url']) ? esc_url($psp_settings['redirect_url']) : '',
|
1562 |
+
'option_description' => esc_html__(' Set the URL to which users landing on this page should be redirected to. This is equivalent to disabling this archive page. You may redirect this page to the most appropriate page on your site, which might be the Front page or Home page of this site.', 'platinum-seo-pack')
|
1563 |
+
);
|
1564 |
+
|
1565 |
+
$dditems = array('' => 'Select a redirection method', '301' => '301 Moved Permanently', '302' => '302 Found', '303' => '303 See Other', '307' => '307 Temporary Redirect');
|
1566 |
+
$redirectcode_field = array (
|
1567 |
+
'label_for' => 'psp_'.$archive_name.'_redirect_code',
|
1568 |
+
'option_name' => $psp_settings_name.'[redirect_code]',
|
1569 |
+
'option_value' => isset($psp_settings['redirect_code']) ? $psp_settings['redirect_code'] : '',
|
1570 |
+
'dditems' => $dditems,
|
1571 |
+
'option_description' => esc_html__(' Set the HTTP status code to use for this redirection. It is highly recommended to use 301 redirects in most cases, except where the redirection is of temporary nature.', 'platinum-seo-pack')
|
1572 |
+
);
|
1573 |
+
|
1574 |
+
$title_field_id = 'psp_'.$archive_name.'_title';
|
1575 |
+
//$desc_field_id = 'psp_'.$archive_name.'_desc';
|
1576 |
+
$robots_field_id = 'psp_'.$archive_name.'_robots';
|
1577 |
+
$noarchive_field_id = 'psp_'.$archive_name.'_noarchive';
|
1578 |
+
$nosnippet_field_id = 'psp_'.$archive_name.'_nosnippet';
|
1579 |
+
//$disable_field_id = 'psp_'.$archive_name.'_disable';
|
1580 |
+
$redirect_field_id = 'psp_'.$archive_name.'_redirect';
|
1581 |
+
$redirectcode_field_id = 'psp_'.$archive_name.'_redirect_code';
|
1582 |
+
|
1583 |
+
$title_field_title = esc_html__('Title Format: ', 'platinum-seo-pack');
|
1584 |
+
//$desc_field_title = esc_html__('Meta Description Format: ','platinum-seo-pack');
|
1585 |
+
$robots_field_title = esc_html__('Meta Robots: ', 'platinum-seo-pack');
|
1586 |
+
$noarchive_field_title = "";//esc_html__('Do not show cached link in SERPS: ', 'platinum-seo-pack');
|
1587 |
+
$nosnippet_field_title = "";//esc_html__('Do not show snippet in SERPS: ', 'platinum-seo-pack');
|
1588 |
+
//$disable_field_title = 'Disable '.$arc_name_text. ' : ';
|
1589 |
+
//$disable_field_title = sprintf( esc_html__( 'Disable %s :', 'platinum_seo_pack' ), $arc_name_text );
|
1590 |
+
$redirect_field_title = esc_html__('Redirect To: ', 'platinum-seo-pack');
|
1591 |
+
$redirectcode_field_title ="";// esc_html__('Use: ', 'platinum-seo-pack');
|
1592 |
+
|
1593 |
+
//Fields
|
1594 |
+
add_settings_field( $title_field_id, $title_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_archives_settings_group, $section_id, $title_field);
|
1595 |
+
//add_settings_field( $desc_field_id, $desc_field_title, array( &$this, 'psp_add_field_textarea' ), $this->psp_archives_settings_group, $section_id, $desc_field );
|
1596 |
+
add_settings_field( $robots_field_id, $robots_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $robots_field );
|
1597 |
+
add_settings_field( $noarchive_field_id, $noarchive_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $noarchive_field );
|
1598 |
+
add_settings_field( $nosnippet_field_id, $nosnippet_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $nosnippet_field );
|
1599 |
+
//add_settings_field( $disable_field_id, $disable_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_archives_settings_group, $section_id, $disable_field );
|
1600 |
+
add_settings_field( $redirect_field_id, $redirect_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_archives_settings_group, $section_id, $redirect_field);
|
1601 |
+
add_settings_field( $redirectcode_field_id, $redirectcode_field_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_archives_settings_group, $section_id, $redirectcode_field);
|
1602 |
+
}
|
1603 |
+
|
1604 |
+
function sanitize_other_archive_settings($settings) {
|
1605 |
+
|
1606 |
+
if ( isset( $settings['title'] ) ) {
|
1607 |
+
$settings['title'] = sanitize_text_field( $settings['title'] );
|
1608 |
+
|
1609 |
+
$psp_title_format = explode(" ", $settings['title']);
|
1610 |
+
$titleformats = array('%title_date%', '%title_author%', '%seo_title%', '%search%', '%title_404%', '%sep%', '%site_name%', '%site_description%');
|
1611 |
+
if(!empty($psp_title_format)) {
|
1612 |
+
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
1613 |
+
$settings['title'] = '';
|
1614 |
+
}
|
1615 |
+
}
|
1616 |
+
}
|
1617 |
+
|
1618 |
+
if ( isset( $settings['robots'] ) ) {
|
1619 |
+
$settings['robots'] = !is_null(filter_var($settings['robots'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['robots'] : '';
|
1620 |
+
}
|
1621 |
+
|
1622 |
+
if ( isset( $settings['noarchive'] ) ) {
|
1623 |
+
$settings['noarchive'] = !is_null(filter_var($settings['noarchive'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['noarchive'] : '';
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
if ( isset( $settings['nosnippet'] ) ) {
|
1627 |
+
$settings['nosnippet'] = !is_null(filter_var($settings['nosnippet'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['nosnippet'] : '';
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
$psp_allowed_protocols = array('http','https');
|
1631 |
+
if ( isset( $settings['redirect_url'] ) ) {
|
1632 |
+
$settings['redirect_url'] = esc_url_raw( $settings['redirect_url'], $psp_allowed_protocols );
|
1633 |
+
}
|
1634 |
+
|
1635 |
+
if ( isset( $settings['redirect_code'] ) ) {
|
1636 |
+
$settings['redirect_code'] = sanitize_text_field( $settings['redirect_code'] );
|
1637 |
+
$scodes = array('301', '302', '303', '307');
|
1638 |
+
if (!in_array($settings['redirect_code'], $scodes)) {
|
1639 |
+
$settings['redirect_code'] = '';
|
1640 |
+
}
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
return $settings;
|
1644 |
+
}
|
1645 |
+
|
1646 |
+
/*
|
1647 |
+
* Registers the permalinks settings for taxonomies and appends the
|
1648 |
+
* key to the plugin settings tabs array.
|
1649 |
+
*/
|
1650 |
+
private function register_permalink_settings() {
|
1651 |
+
$this->psp_settings_tabs[$this->psp_permalink_settings_group] = 'Permalinks';
|
1652 |
+
$psp_settings_name = "psp_permalink_settings";
|
1653 |
+
|
1654 |
+
$psp_settings = get_option($psp_settings_name);
|
1655 |
+
//$this->psp_settings_name = $psp_settings;
|
1656 |
+
|
1657 |
+
//register_setting( $this->psp_permalink_settings_group, $psp_settings_name );
|
1658 |
+
register_setting( $this->psp_permalink_settings_group, $psp_settings_name, array( &$this, 'sanitize_permalink_settings' ));
|
1659 |
+
|
1660 |
+
//Section
|
1661 |
+
$section_id = 'psp_permalink_section';
|
1662 |
+
$section_title = esc_html__('Permalink Structure for Taxonomies', 'platinum-seo-pack');
|
1663 |
+
|
1664 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_permalinks_desc' ), $this->psp_permalink_settings_group );
|
1665 |
+
|
1666 |
+
//Fields
|
1667 |
+
|
1668 |
+
$category_nobase_field = array (
|
1669 |
+
'label_for' => 'psp_category_nobase',
|
1670 |
+
'option_name' => $psp_settings_name.'[category]',
|
1671 |
+
'option_value' => isset($psp_settings['category']) ? $psp_settings['category'] : '',
|
1672 |
+
'checkbox_label' => esc_html__('Remove Base', 'platinum-seo-pack')
|
1673 |
+
);
|
1674 |
+
|
1675 |
+
$category_nobase_field_id = 'psp_category_nobase';
|
1676 |
+
$category_nobase_field_title = esc_html__('Category: ', 'platinum-seo-pack');
|
1677 |
+
|
1678 |
+
add_settings_field( $category_nobase_field_id, $category_nobase_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_permalink_settings_group, $section_id, $category_nobase_field );
|
1679 |
+
|
1680 |
+
$cust_taxonomies = $this->custom_taxonomies;
|
1681 |
+
|
1682 |
+
foreach($cust_taxonomies as $cust_taxonomy) {
|
1683 |
+
|
1684 |
+
$tax_nobase_field = array (
|
1685 |
+
'label_for' => 'psp_'.$cust_taxonomy.'_nobase',
|
1686 |
+
'option_name' => $psp_settings_name.'['.$cust_taxonomy.']',
|
1687 |
+
'option_value' => isset($psp_settings[$cust_taxonomy]) ? $psp_settings[$cust_taxonomy] : '',
|
1688 |
+
'checkbox_label' => esc_html__('Remove Base', 'platinum-seo-pack')
|
1689 |
+
);
|
1690 |
+
|
1691 |
+
$tax_nobase_field_id = 'psp_'.$cust_taxonomy.'_nobase';
|
1692 |
+
$tax_nobase_field_title = $cust_taxonomy.' :';
|
1693 |
+
|
1694 |
+
add_settings_field( $tax_nobase_field_id, $tax_nobase_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_permalink_settings_group, $section_id, $tax_nobase_field );
|
1695 |
+
|
1696 |
+
}
|
1697 |
+
}
|
1698 |
+
|
1699 |
+
function sanitize_permalink_settings($settings) {
|
1700 |
+
|
1701 |
+
if ( isset( $settings['category'] ) ) {
|
1702 |
+
$settings['category'] = !is_null(filter_var($settings['category'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['category'] : '';
|
1703 |
+
} else {
|
1704 |
+
$settings['category'] = "";
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
$custom_tax = array();
|
1708 |
+
if (!empty($this->custom_taxonomies)) {
|
1709 |
+
$custom_tax = $this->custom_taxonomies;
|
1710 |
+
}
|
1711 |
+
|
1712 |
+
if (!empty($custom_tax)) {
|
1713 |
+
|
1714 |
+
foreach($custom_tax as $custom_taxonomy) {
|
1715 |
+
|
1716 |
+
if ( isset( $settings[$custom_taxonomy] ) ) {
|
1717 |
+
$settings[$custom_taxonomy] = !is_null(filter_var($settings[$custom_taxonomy],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings[$custom_taxonomy] : '';
|
1718 |
+
}
|
1719 |
+
|
1720 |
+
}
|
1721 |
+
}
|
1722 |
+
|
1723 |
+
return $settings;
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
/*
|
1727 |
+
* Registers the knowledge graph settings
|
1728 |
+
*/
|
1729 |
+
private function register_kg_settings() {
|
1730 |
+
$this->psp_settings_tabs[$this->psp_other_settings_group] = 'Others';
|
1731 |
+
$psp_settings_name = "psp_other_settings";
|
1732 |
+
|
1733 |
+
$psp_settings = get_option($psp_settings_name);
|
1734 |
+
|
1735 |
+
//enqueue javascript
|
1736 |
+
wp_enqueue_media();
|
1737 |
+
wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
1738 |
+
wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
1739 |
+
|
1740 |
+
register_setting( $this->psp_other_settings_group, $psp_settings_name, array( &$this, 'sanitize_kg_settings' ) );
|
1741 |
+
|
1742 |
+
//Schema settings Section
|
1743 |
+
$section_id = 'psp_schema_section';
|
1744 |
+
$section_title = esc_html__('Settings for generating Json-LD Schemas', 'platinum-seo-pack');
|
1745 |
+
|
1746 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_schema_desc' ), $this->psp_other_settings_group );
|
1747 |
+
|
1748 |
+
//Website name Section
|
1749 |
+
$section_id = 'psp_sitename_section';
|
1750 |
+
$section_title = esc_html__('Site name for Google', 'platinum-seo-pack');
|
1751 |
+
|
1752 |
+
//add_settings_section( $section_id, $section_title, array( &$this, 'section_empty_desc' ), $this->psp_other_settings_group );
|
1753 |
+
|
1754 |
+
//Fields
|
1755 |
+
|
1756 |
+
//sitelinks searchbox Section
|
1757 |
+
$section_id = 'psp_sitelinks_search_section';
|
1758 |
+
$section_title = esc_html__( 'Sitelinks Search Box in Google', 'platinum_seo_pack' );
|
1759 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_sitelinks_searchbox_desc' ), $this->psp_other_settings_group );
|
1760 |
+
|
1761 |
+
//Enable sitelinks searchbox
|
1762 |
+
$sitelinks_search_field = array (
|
1763 |
+
'label_for' => 'psp_sitelinks_search_enabler',
|
1764 |
+
'option_name' => $psp_settings_name.'[sitelinks_search_box]',
|
1765 |
+
'option_value' => isset($psp_settings['sitelinks_search_box']) ? $psp_settings['sitelinks_search_box'] : '',
|
1766 |
+
'checkbox_label' => esc_html__( 'Enable', 'platinum-seo-pack' ),
|
1767 |
+
);
|
1768 |
+
|
1769 |
+
$sitelinks_search_id = 'psp_sitelinks_search_enabler';
|
1770 |
+
$sitelinks_search_title = esc_html__( 'Sitelinks Searchbox: ', 'platinum-seo-pack' );
|
1771 |
+
|
1772 |
+
add_settings_field( $sitelinks_search_id, $sitelinks_search_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_other_settings_group, $section_id, $sitelinks_search_field );
|
1773 |
+
|
1774 |
+
//Sitelinks search box URL parameter
|
1775 |
+
$psp_sitelinks_target_field = array (
|
1776 |
+
'label_for' => 'psp_sitelinks_searchbox_target',
|
1777 |
+
'option_name' => $psp_settings_name.'[sitelinks_searchbox_target]',
|
1778 |
+
'option_value' => isset($psp_settings['sitelinks_searchbox_target']) ? esc_url($psp_settings['sitelinks_searchbox_target']) : '',
|
1779 |
+
'option_description' => esc_html__( 'Here you can specify a search URL pattern for sending queries to your site search engine. You need to change this only if the URL is different from what is defined above. For most wordpress sites, leaving this unchanged would work.', 'platinum-seo-pack' ),
|
1780 |
+
);
|
1781 |
+
|
1782 |
+
$psp_sitelinks_target_field_id = 'psp_sitelinks_searchbox_target';
|
1783 |
+
$psp_sitelinks_target_field_title = esc_html__( 'Sitelinks Search box Target URL: ', 'platinum-seo-pack' );
|
1784 |
+
|
1785 |
+
add_settings_field( $psp_sitelinks_target_field_id, $psp_sitelinks_target_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_sitelinks_target_field);
|
1786 |
+
|
1787 |
+
//Knowledge Graph Section
|
1788 |
+
$section_id = 'psp_kg_section';
|
1789 |
+
$section_title = esc_html__('Knowledge Graph Settings for Google Search', 'platinum-seo-pack');
|
1790 |
+
|
1791 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_kg_desc' ), $this->psp_other_settings_group );
|
1792 |
+
|
1793 |
+
//Fields
|
1794 |
+
|
1795 |
+
$kg_tags_field = array (
|
1796 |
+
'label_for' => 'psp_kg_tags_enabled',
|
1797 |
+
'option_name' => $psp_settings_name.'[psp_kg_tags_enabled]',
|
1798 |
+
'option_value' => isset($psp_settings['psp_kg_tags_enabled']) ? $psp_settings['psp_kg_tags_enabled'] : '',
|
1799 |
+
'checkbox_label' => esc_html__('Enable Knowledge Graph Tags for Google', 'platinum-seo-pack')
|
1800 |
+
);
|
1801 |
+
|
1802 |
+
$kg_tags_field_id = 'psp_kg_tags_enabled';
|
1803 |
+
$kg_tags_field_title = esc_html__('Knowledge Graph Tags: ', 'platinum-seo-pack');
|
1804 |
+
|
1805 |
+
add_settings_field( $kg_tags_field_id, $kg_tags_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_other_settings_group, $section_id, $kg_tags_field );
|
1806 |
+
|
1807 |
+
//Google Knowledge Graph type
|
1808 |
+
$psp_kg_profile_types = array ('' => 'Select a Profile', 'person' => 'Person', 'organization' => 'organization');
|
1809 |
+
|
1810 |
+
$psp_kg_profile_type_field = array (
|
1811 |
+
'label_for' => 'psp_kg_profile_type',
|
1812 |
+
'option_name' => $psp_settings_name.'[kg_profile_type]',
|
1813 |
+
'option_value' => isset($psp_settings['kg_profile_type']) ? $psp_settings['kg_profile_type'] : '',
|
1814 |
+
'dditems' => $psp_kg_profile_types,
|
1815 |
+
'option_description' => esc_html__( 'Select a profile type to be used for Knowledge Graph. For complete reference of knowledge graph profile types refer ', 'platinum-seo-pack' ).'<a href="https://developers.google.com/structured-data/customize/social-profiles" target="_blank">Google</a>',
|
1816 |
+
);
|
1817 |
+
|
1818 |
+
$psp_kg_profile_type_field_id = 'psp_kg_profile_type';
|
1819 |
+
$psp_kg_profile_type_field_title = esc_html__( 'Profile Type for Knowledge Graph: ', 'platinum-seo-pack' );
|
1820 |
+
|
1821 |
+
add_settings_field( $psp_kg_profile_type_field_id, $psp_kg_profile_type_field_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_other_settings_group, $section_id, $psp_kg_profile_type_field);
|
1822 |
+
|
1823 |
+
//KG profile name
|
1824 |
+
$psp_kg_profile_name_field = array (
|
1825 |
+
'label_for' => 'psp_social_kg_profile_name',
|
1826 |
+
'option_name' => $psp_settings_name.'[kg_profile_name]',
|
1827 |
+
'option_value' => isset($psp_settings['kg_profile_name']) ? esc_attr($psp_settings['kg_profile_name']) : '',
|
1828 |
+
'option_description' => esc_html__( 'Enter the name of the organization/person to be used on knowledge graph for this domain. For eg: "Tehblissonline" is the organization name used for the site http://techblissonline.com/.', 'platinum-seo-pack' ),
|
1829 |
+
);
|
1830 |
+
|
1831 |
+
$psp_kg_profile_name_field_id = 'psp_social_kg_profile_name';
|
1832 |
+
$psp_kg_profile_name_field_title = esc_html__( 'Name: ', 'platinum-seo-pack' );
|
1833 |
+
|
1834 |
+
add_settings_field( $psp_kg_profile_name_field_id, $psp_kg_profile_name_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_other_settings_group, $section_id, $psp_kg_profile_name_field);
|
1835 |
+
|
1836 |
+
//Logo
|
1837 |
+
$psp_kg_logo_field = array (
|
1838 |
+
'label_for' => 'psp_kg_logo',
|
1839 |
+
'class_for_row' => 'psp-kg-organization',
|
1840 |
+
'option_name' => $psp_settings_name.'[kg_logo]',
|
1841 |
+
'option_value' => isset($psp_settings['kg_logo']) ? esc_url($psp_settings['kg_logo']) : '',
|
1842 |
+
'option_description' => esc_html__( 'Enter the URL to the company/organization logo or upload a logo to use on Knowledge Graph', 'platinum-seo-pack' ),
|
1843 |
+
'button' => 1,
|
1844 |
+
);
|
1845 |
+
|
1846 |
+
$psp_kg_logo_field_id = 'psp_kg_logo';
|
1847 |
+
$psp_kg_logo_field_title = esc_html__( 'Company/Organization logo to use on knowledge graph: ', 'platinum-seo-pack' );
|
1848 |
+
|
1849 |
+
add_settings_field( $psp_kg_logo_field_id, $psp_kg_logo_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_logo_field);
|
1850 |
+
|
1851 |
+
//Knowledge Graph social Profiles Section
|
1852 |
+
$section_id = 'psp_kg_social_section';
|
1853 |
+
$section_title = esc_html__('Social Profiles', 'platinum-seo-pack');
|
1854 |
+
|
1855 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_kg_sp_desc' ), $this->psp_other_settings_group );
|
1856 |
+
|
1857 |
+
//Facebook profile
|
1858 |
+
$psp_kg_fb_profile_field = array (
|
1859 |
+
'label_for' => 'psp_social_kg_facebook',
|
1860 |
+
'option_name' => $psp_settings_name.'[kg_fb_profile]',
|
1861 |
+
'option_value' => isset($psp_settings['kg_fb_profile']) ? esc_url($psp_settings['kg_fb_profile']) : '',
|
1862 |
+
'option_description' => esc_html__( 'Enter the facebook profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1863 |
+
);
|
1864 |
+
|
1865 |
+
$psp_kg_fb_profile_field_id = 'psp_social_kg_facebook';
|
1866 |
+
$psp_kg_fb_profile_field_title = esc_html__( 'Facebook profile URL: ', 'platinum-seo-pack' );
|
1867 |
+
|
1868 |
+
add_settings_field( $psp_kg_fb_profile_field_id, $psp_kg_fb_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_fb_profile_field);
|
1869 |
+
|
1870 |
+
//Twitter profile
|
1871 |
+
$psp_kg_tw_profile_field = array (
|
1872 |
+
'label_for' => 'psp_social_kg_twitter',
|
1873 |
+
'option_name' => $psp_settings_name.'[kg_tw_profile]',
|
1874 |
+
'option_value' => isset($psp_settings['kg_tw_profile']) ? esc_url($psp_settings['kg_tw_profile']) : '',
|
1875 |
+
'option_description' => esc_html__( 'Enter the twitter profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1876 |
+
);
|
1877 |
+
|
1878 |
+
$psp_kg_tw_profile_field_id = 'psp_social_kg_twitter';
|
1879 |
+
$psp_kg_tw_profile_field_title = esc_html__( 'Twitter profile URL: ', 'platinum-seo-pack' );
|
1880 |
+
|
1881 |
+
add_settings_field( $psp_kg_tw_profile_field_id, $psp_kg_tw_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_tw_profile_field);
|
1882 |
+
|
1883 |
+
//Google+ profile
|
1884 |
+
$psp_kg_go_profile_field = array (
|
1885 |
+
'label_for' => 'psp_social_kg_google',
|
1886 |
+
'option_name' => $psp_settings_name.'[kg_go_profile]',
|
1887 |
+
'option_value' => isset($psp_settings['kg_go_profile']) ? esc_url($psp_settings['kg_go_profile']) : '',
|
1888 |
+
'option_description' => esc_html__( 'Enter the google+ profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1889 |
+
);
|
1890 |
+
|
1891 |
+
$psp_kg_go_profile_field_id = 'psp_social_kg_google';
|
1892 |
+
$psp_kg_go_profile_field_title = esc_html__( 'Google+ profile URL: ', 'platinum-seo-pack' );
|
1893 |
+
|
1894 |
+
add_settings_field( $psp_kg_go_profile_field_id, $psp_kg_go_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_go_profile_field);
|
1895 |
+
|
1896 |
+
//Instagram profile
|
1897 |
+
$psp_kg_ig_profile_field = array (
|
1898 |
+
'label_for' => 'psp_social_kg_instagram',
|
1899 |
+
'option_name' => $psp_settings_name.'[kg_ig_profile]',
|
1900 |
+
'option_value' => isset($psp_settings['kg_ig_profile']) ? esc_url($psp_settings['kg_ig_profile']) : '',
|
1901 |
+
'option_description' => esc_html__( 'Enter the instagram profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1902 |
+
);
|
1903 |
+
|
1904 |
+
$psp_kg_ig_profile_field_id = 'psp_social_kg_instagram';
|
1905 |
+
$psp_kg_ig_profile_field_title = esc_html__( 'Instagram profile URL: ', 'platinum-seo-pack' );
|
1906 |
+
|
1907 |
+
add_settings_field( $psp_kg_ig_profile_field_id, $psp_kg_ig_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_ig_profile_field);
|
1908 |
+
|
1909 |
+
//LinkedIn profile
|
1910 |
+
$psp_kg_li_profile_field = array (
|
1911 |
+
'label_for' => 'psp_social_kg_linkedin',
|
1912 |
+
'option_name' => $psp_settings_name.'[kg_li_profile]',
|
1913 |
+
'option_value' => isset($psp_settings['kg_li_profile']) ? esc_url($psp_settings['kg_li_profile']) : '',
|
1914 |
+
'option_description' => esc_html__( 'Enter the linkedin profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1915 |
+
);
|
1916 |
+
|
1917 |
+
$psp_kg_li_profile_field_id = 'psp_social_kg_linkedin';
|
1918 |
+
$psp_kg_li_profile_field_title = esc_html__( 'LinkedIn profile URL: ', 'platinum-seo-pack' );
|
1919 |
+
|
1920 |
+
add_settings_field( $psp_kg_li_profile_field_id, $psp_kg_li_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_li_profile_field);
|
1921 |
+
|
1922 |
+
//Youtube profile
|
1923 |
+
$psp_kg_yt_profile_field = array (
|
1924 |
+
'label_for' => 'psp_social_kg_youtube',
|
1925 |
+
'option_name' => $psp_settings_name.'[kg_yt_profile]',
|
1926 |
+
'option_value' => isset($psp_settings['kg_yt_profile']) ? esc_url($psp_settings['kg_yt_profile']) : '',
|
1927 |
+
'option_description' => esc_html__( 'Enter the youtube profile URL to be associated with this domain/site.', 'platinum-seo-pack' ),
|
1928 |
+
);
|
1929 |
+
|
1930 |
+
$psp_kg_yt_profile_field_id = 'psp_social_kg_youtube';
|
1931 |
+
$psp_kg_yt_profile_field_title = esc_html__( 'Youtube profile URL: ', 'platinum-seo-pack' );
|
1932 |
+
|
1933 |
+
add_settings_field( $psp_kg_yt_profile_field_id, $psp_kg_yt_profile_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_other_settings_group, $section_id, $psp_kg_yt_profile_field);
|
1934 |
+
|
1935 |
+
//Knowledge Graph social Profiles Section
|
1936 |
+
//$section_id = 'psp_kg_logo_section';
|
1937 |
+
//$section_title = __('Logo (required only for KG profile type organization)', 'platinum-seo-pack');
|
1938 |
+
|
1939 |
+
//add_settings_section( $section_id, $section_title, array( &$this, 'section_kg_logo_desc' ), $this->psp_other_settings_group );
|
1940 |
+
|
1941 |
+
}
|
1942 |
+
|
1943 |
+
/*
|
1944 |
+
* Sanitize KG Settings
|
1945 |
+
*/
|
1946 |
+
function sanitize_kg_settings($settings) {
|
1947 |
+
|
1948 |
+
if ( isset( $settings['sitelinks_search_box'] ) ) {
|
1949 |
+
$settings['sitelinks_search_box'] = !is_null(filter_var($settings['sitelinks_search_box'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['sitelinks_search_box'] : '';
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
if( isset( $settings['sitelinks_searchbox_target'] ) ) $settings['sitelinks_searchbox_target'] = esc_url_raw( $settings['sitelinks_searchbox_target'] );
|
1953 |
+
|
1954 |
+
if ( isset( $settings['psp_kg_tags_enabled'] ) ) {
|
1955 |
+
$settings['psp_kg_tags_enabled'] = !is_null(filter_var($settings['psp_kg_tags_enabled'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['psp_kg_tags_enabled'] : '';
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
if ( isset( $settings['kg_profile_type'] ) ) {
|
1959 |
+
$settings['kg_profile_type'] = sanitize_text_field( $settings['kg_profile_type'] );
|
1960 |
+
|
1961 |
+
$kg_profiles = array("person", "organization");
|
1962 |
+
|
1963 |
+
if (!in_array($settings['kg_profile_type'], $kg_profiles)) {
|
1964 |
+
$settings['kg_profile_type'] = '';
|
1965 |
+
}
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
if( isset( $settings['kg_profile_name'] ) ) $settings['kg_profile_name'] = sanitize_text_field( $settings['kg_profile_name'] );
|
1969 |
+
|
1970 |
+
$psp_allowed_protocols = array('http','https');
|
1971 |
+
|
1972 |
+
if( isset( $settings['kg_fb_profile'] ) ) $settings['kg_fb_profile'] = esc_url_raw( $settings['kg_fb_profile'], $psp_allowed_protocols );
|
1973 |
+
if( isset( $settings['kg_tw_profile'] ) ) $settings['kg_tw_profile'] = esc_url_raw( $settings['kg_tw_profile'], $psp_allowed_protocols );
|
1974 |
+
if( isset( $settings['kg_go_profile'] ) ) $settings['kg_go_profile'] = esc_url_raw( $settings['kg_go_profile'], $psp_allowed_protocols );
|
1975 |
+
if( isset( $settings['kg_li_profile'] ) ) $settings['kg_li_profile'] = esc_url_raw( $settings['kg_li_profile'], $psp_allowed_protocols );
|
1976 |
+
if( isset( $settings['kg_yt_profile'] ) ) $settings['kg_yt_profile'] = esc_url_raw( $settings['kg_yt_profile'], $psp_allowed_protocols );
|
1977 |
+
if( isset( $settings['kg_logo'] ) ) $settings['kg_logo'] = esc_url_raw( $settings['kg_logo'], $psp_allowed_protocols );
|
1978 |
+
|
1979 |
+
return $settings;
|
1980 |
+
|
1981 |
+
}
|
1982 |
+
|
1983 |
+
/*
|
1984 |
+
* Registers the Taxonomy SEO settings and appends the
|
1985 |
+
* key to the plugin settings tabs array.
|
1986 |
+
*/
|
1987 |
+
private function register_taxonomy_settings($tax_name) {
|
1988 |
+
$this->psp_settings_tabs[$this->psp_taxonomy_settings_group] = 'Taxonomies';
|
1989 |
+
$psp_settings_name = "psp_".$tax_name."_settings";
|
1990 |
+
$tax_name_text = str_replace( "_", " ", $tax_name );
|
1991 |
+
$tax_name_text = ucwords($tax_name_text);
|
1992 |
+
|
1993 |
+
$psp_settings = get_option($psp_settings_name);
|
1994 |
+
//$this->psp_settings_name = $psp_settings;
|
1995 |
+
|
1996 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Term name', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
1997 |
+
|
1998 |
+
|
1999 |
+
$option_desc_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Term name', 'platinum-seo-pack').', '. '<code>%description%</code> - '.esc_html__('Term description', 'platinum-seo-pack').', '. '<code>%seo_description%</code> - '.esc_html__('Platinum SEO Description', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2000 |
+
|
2001 |
+
|
2002 |
+
//available tags array
|
2003 |
+
$availableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
2004 |
+
$availableDescTags = ['sep', 'seo_title', 'wp_title', 'description', 'seo_description', 'site_name', 'site_description'];
|
2005 |
+
|
2006 |
+
if ($tax_name == "category") {
|
2007 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Category name', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2008 |
+
|
2009 |
+
$option_desc_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Category name', 'platinum-seo-pack').', '. '<code>%description%</code> - '.esc_html__('Category description', 'platinum-seo-pack').', '. '<code>%seo_description%</code> - '.esc_html__('Platinum SEO Description', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2010 |
+
|
2011 |
+
//available tags array
|
2012 |
+
//$availableTags = ['sep', 'seo_title', 'title', 'category_description', 'site_name', 'seo_description', 'site_description'];
|
2013 |
+
}
|
2014 |
+
|
2015 |
+
if ($tax_name == "tag" || $tax_name == "title_tag") {
|
2016 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Tag name', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2017 |
+
|
2018 |
+
$option_desc_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Tag name', 'platinum-seo-pack').', '. '<code>%description%</code> - '.esc_html__('Tag description', 'platinum-seo-pack').', '. '<code>%seo_description%</code> - '.esc_html__('Platinum SEO Description', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2019 |
+
|
2020 |
+
//available tags array
|
2021 |
+
// $availableTags = ['sep', 'seo_title', 'title', 'tag_description', 'site_name', 'seo_description', 'site_description'];
|
2022 |
+
}
|
2023 |
+
|
2024 |
+
if ($tax_name == "post_format") {
|
2025 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Post Format name', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2026 |
+
|
2027 |
+
$option_desc_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Post Format name', 'platinum-seo-pack').', '. '<code>%description%</code> - '.esc_html__('Post Format description', 'platinum-seo-pack').', '. '<code>%seo_description%</code> - '.esc_html__('Platinum SEO Description', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2028 |
+
}
|
2029 |
+
|
2030 |
+
$title_field = array (
|
2031 |
+
'label_for' => 'psp_'.$tax_name.'_title',
|
2032 |
+
'option_name' => $psp_settings_name.'[title]',
|
2033 |
+
'option_value' => isset($psp_settings['title']) ? esc_attr($psp_settings['title']) : '',
|
2034 |
+
'option_description' => $option_title_formats,
|
2035 |
+
'class_name' => 'titletags',
|
2036 |
+
'psp_tags' => $availableTags,
|
2037 |
+
);
|
2038 |
+
|
2039 |
+
$desc_field = array (
|
2040 |
+
'label_for' => 'psp_'.$tax_name.'_description',
|
2041 |
+
'option_name' => $psp_settings_name.'[description]',
|
2042 |
+
'option_value' => isset($psp_settings['description']) ? esc_attr($psp_settings['description']) : '',
|
2043 |
+
'option_description' => $option_desc_formats,
|
2044 |
+
'class_name' => 'titletags',
|
2045 |
+
'psp_tags' => $availableDescTags,
|
2046 |
+
);
|
2047 |
+
|
2048 |
+
$robots_field = array (
|
2049 |
+
'label_for' => 'psp_'.$tax_name.'_robots',
|
2050 |
+
'option_name' => $psp_settings_name.'[robots]',
|
2051 |
+
'option_value' => isset($psp_settings['robots']) ? $psp_settings['robots'] : '',
|
2052 |
+
'checkbox_label' => '<code>noindex, follow</code>'
|
2053 |
+
);
|
2054 |
+
|
2055 |
+
$metabox_field = array (
|
2056 |
+
'label_for' => 'psp_'.$tax_name.'_metabox',
|
2057 |
+
'option_name' => $psp_settings_name.'[hide_metabox]',
|
2058 |
+
'option_value' => isset($psp_settings['hide_metabox']) ? $psp_settings['hide_metabox'] : '',
|
2059 |
+
'checkbox_label' => esc_html__('Yes, hide for all users other than Admin', 'platinum-seo-pack')
|
2060 |
+
);
|
2061 |
+
|
2062 |
+
$section_id = 'psp_'.$tax_name.'_section';
|
2063 |
+
//$section_title = $tax_name_text.' Settings';
|
2064 |
+
$section_title = sprintf( esc_html__( '%s Settings', 'platinum_seo_pack' ), $tax_name_text );
|
2065 |
+
|
2066 |
+
$title_field_id = 'psp_'.$tax_name.'_title';
|
2067 |
+
$desc_field_id = 'psp_'.$tax_name.'_desc';
|
2068 |
+
$robots_field_id = 'psp_'.$tax_name.'_robots';
|
2069 |
+
$metabox_field_id = 'psp_'.$tax_name.'_metabox';
|
2070 |
+
|
2071 |
+
//$title_field_title = 'Title Format: ';
|
2072 |
+
//$desc_field_title = 'Meta Description Format: ';
|
2073 |
+
//$robots_field_title = 'Meta Robots: ';
|
2074 |
+
//$metabox_field_title = 'Hide '.$tax_name_text. ' Meta box: ';
|
2075 |
+
|
2076 |
+
$title_field_title = esc_html__('Title Format: ', 'platinum-seo-pack');
|
2077 |
+
$desc_field_title = esc_html__('Meta Description Format: ','platinum-seo-pack');
|
2078 |
+
$robots_field_title = esc_html__('Meta Robots: ', 'platinum-seo-pack');
|
2079 |
+
$metabox_field_title = sprintf( esc_html__( 'Hide %s Metabox:', 'platinum_seo_pack' ), $tax_name_text );
|
2080 |
+
|
2081 |
+
//wp_register_script( 'psp-taxtags-js', plugins_url( '/js/psp_post_tags.js', __FILE__ ), array( 'jquery-ui-autocomplete', 'jquery' ) );
|
2082 |
+
//wp_enqueue_script('psp-taxtags-js');
|
2083 |
+
|
2084 |
+
wp_register_script( 'psp-atags-js', plugins_url( '/js/atags.js', __FILE__ ), array( 'jquery' ), false, true );
|
2085 |
+
wp_enqueue_script('psp-atags-js');
|
2086 |
+
|
2087 |
+
register_setting( $this->psp_taxonomy_settings_group, $psp_settings_name, array( &$this, 'sanitize_taxonomy_settings' ) );
|
2088 |
+
//Section
|
2089 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_taxonomy_desc' ), $this->psp_taxonomy_settings_group );
|
2090 |
+
//Fields
|
2091 |
+
add_settings_field( $title_field_id, $title_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_taxonomy_settings_group, $section_id, $title_field);
|
2092 |
+
add_settings_field( $desc_field_id, $desc_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_taxonomy_settings_group, $section_id, $desc_field );
|
2093 |
+
add_settings_field( $robots_field_id, $robots_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_taxonomy_settings_group, $section_id, $robots_field );
|
2094 |
+
add_settings_field( $metabox_field_id, $metabox_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_taxonomy_settings_group, $section_id, $metabox_field );
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
function sanitize_taxonomy_settings($settings) {
|
2098 |
+
|
2099 |
+
//if( isset( $settings['title'] ) ) $settings['title'] = sanitize_text_field( $settings['title'] );
|
2100 |
+
//if( isset( $settings['description'] ) ) $settings['description'] = sanitize_text_field( $settings['description'] );
|
2101 |
+
|
2102 |
+
if ( isset( $settings['title'] ) ) {
|
2103 |
+
$settings['title'] = sanitize_text_field( $settings['title'] );
|
2104 |
+
|
2105 |
+
$psp_title_format = explode(" ", $settings['title']);
|
2106 |
+
$titleformats = array('%seo_title%', '%wp_title%', '%sep%', '%site_name%', '%site_description%');
|
2107 |
+
if(!empty($psp_title_format)) {
|
2108 |
+
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
2109 |
+
$settings['title'] = '';
|
2110 |
+
}
|
2111 |
+
}
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
if ( isset( $settings['description'] ) ) {
|
2115 |
+
$settings['description'] = sanitize_text_field( $settings['description'] );
|
2116 |
+
|
2117 |
+
$psp_desc_format = explode(" ", $settings['description']);
|
2118 |
+
$descformats = array('%seo_title%', '%wp_title%', '%sep%', '%description%', '%seo_description%', '%site_name%', '%site_description%');
|
2119 |
+
if(!empty($psp_desc_format)) {
|
2120 |
+
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
2121 |
+
$settings['description'] = '';
|
2122 |
+
}
|
2123 |
+
}
|
2124 |
+
}
|
2125 |
+
|
2126 |
+
if ( isset( $settings['robots'] ) ) {
|
2127 |
+
$settings['robots'] = !is_null(filter_var($settings['robots'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['robots'] : '';
|
2128 |
+
}
|
2129 |
+
|
2130 |
+
if ( isset( $settings['hide_metabox'] ) ) {
|
2131 |
+
$settings['hide_metabox'] = !is_null(filter_var($settings['hide_metabox'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_metabox'] : '';
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
return $settings;
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
/*
|
2138 |
+
* Registers the Taxonomy SEO settings and appends the
|
2139 |
+
* key to the plugin settings tabs array.
|
2140 |
+
*/
|
2141 |
+
private function register_posttype_settings($posttype_name) {
|
2142 |
+
$this->psp_settings_tabs[$this->psp_posttype_settings_group] = 'Post Types';
|
2143 |
+
$psp_settings_name = "psp_".$posttype_name."_settings";
|
2144 |
+
$posttype_name_text = str_replace( "_", " ", $posttype_name );
|
2145 |
+
$posttype_name_text = ucwords($posttype_name_text);
|
2146 |
+
|
2147 |
+
$psp_settings = get_option($psp_settings_name);
|
2148 |
+
//$this->psp_settings_name = $psp_settings;
|
2149 |
+
|
2150 |
+
//Taxonomies for breadcrumb tags
|
2151 |
+
//$builtin_taxonomies = array("category", "tag", "post_format");
|
2152 |
+
$builtin_taxonomies = array("category", "post_tag");
|
2153 |
+
$custom_taxonomies = $this->custom_taxonomies;
|
2154 |
+
$psp_all_taxonomies = array_merge((array)$builtin_taxonomies, (array)$custom_taxonomies);
|
2155 |
+
$psp_taxonomies = array_combine($psp_all_taxonomies, $psp_all_taxonomies);
|
2156 |
+
$default = array( "" => "Select a Taxonomy" );
|
2157 |
+
//$psp_taxonomies = array_merge($builtin_taxonomies, $psp_taxonomies);
|
2158 |
+
$psp_bc_taxonomies = array_merge((array)$default, (array)$psp_taxonomies);
|
2159 |
+
|
2160 |
+
$option_title_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Wordpress Title', 'platinum-seo-pack').', '.'<code>%taxonomy%</code> - '.esc_html__('Taxonomy', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2161 |
+
|
2162 |
+
$option_desc_formats = '<code>%seo_title%</code> - '.esc_html__('Platinum SEO title', 'platinum-seo-pack').', '.'<code>%wp_title%</code> - '.esc_html__('Wordpress Title', 'platinum-seo-pack').', '.'<code>%seo_description%</code> - '.esc_html__('Platinum SEO Description', 'platinum-seo-pack').', '.'<code>%site_name%</code> - '.esc_html__('site name', 'platinum-seo-pack').', '. '<code>%site_description%</code> - '.esc_html__('site description', 'platinum-seo-pack').', '.'<code>%sep%</code> - '. esc_html__('Separator chosen in General Settings', 'platinum-seo-pack');
|
2163 |
+
|
2164 |
+
//available tags array
|
2165 |
+
//$availableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
2166 |
+
$availableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description'];
|
2167 |
+
|
2168 |
+
if ($posttype_name == 'page') {
|
2169 |
+
$availableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
2170 |
+
}
|
2171 |
+
|
2172 |
+
$title_field = array (
|
2173 |
+
'label_for' => 'psp_'.$posttype_name.'_title',
|
2174 |
+
'option_name' => $psp_settings_name.'[title]',
|
2175 |
+
'option_value' => isset($psp_settings['title']) ? esc_attr($psp_settings['title']) : '',
|
2176 |
+
'option_description' => $option_title_formats,
|
2177 |
+
'class_name' => 'titletags',
|
2178 |
+
'psp_tags' => $availableTags,
|
2179 |
+
);
|
2180 |
+
|
2181 |
+
//available tags array
|
2182 |
+
//$availableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
2183 |
+
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
2184 |
+
if ($posttype_name == 'page') {
|
2185 |
+
$availableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
2186 |
+
}
|
2187 |
+
|
2188 |
+
$desc_field = array (
|
2189 |
+
'label_for' => 'psp_'.$posttype_name.'_description',
|
2190 |
+
'option_name' => $psp_settings_name.'[description]',
|
2191 |
+
'option_value' => isset($psp_settings['description']) ? esc_attr($psp_settings['description']) : '',
|
2192 |
+
'option_description' => $option_desc_formats,
|
2193 |
+
'class_name' => 'titletags',
|
2194 |
+
'psp_tags' => $availableTagsDesc,
|
2195 |
+
);
|
2196 |
+
|
2197 |
+
$psp_header_metas = isset($psp_settings['headers']) ? html_entity_decode(stripcslashes(esc_attr($psp_settings['headers']))) : '';
|
2198 |
+
|
2199 |
+
//validate headers
|
2200 |
+
if( !empty( $psp_header_metas ) ) {
|
2201 |
+
|
2202 |
+
$allowed_html = array(
|
2203 |
+
'meta' => array(
|
2204 |
+
'name' => array(),
|
2205 |
+
'property' => array(),
|
2206 |
+
'itemprop' => array(),
|
2207 |
+
'content' => array(),
|
2208 |
+
),
|
2209 |
+
);
|
2210 |
+
|
2211 |
+
$psp_header_metas = wp_kses($psp_header_metas, $allowed_html);
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
$additional_headers_field = array (
|
2215 |
+
'label_for' => 'psp_'.$posttype_name.'_additional_headers',
|
2216 |
+
'option_name' => $psp_settings_name.'[headers]',
|
2217 |
+
'option_value' => $psp_header_metas,
|
2218 |
+
'class_name' => 'pspcodeeditor',
|
2219 |
+
);
|
2220 |
+
|
2221 |
+
|
2222 |
+
$robots_field = array (
|
2223 |
+
'label_for' => 'psp_'.$posttype_name.'_robots',
|
2224 |
+
'option_name' => $psp_settings_name.'[robots]',
|
2225 |
+
'option_value' => isset($psp_settings['robots']) ? $psp_settings['robots'] : '',
|
2226 |
+
'checkbox_label' => '<code>noindex, follow</code>'
|
2227 |
+
);
|
2228 |
+
|
2229 |
+
$metabox_field = array (
|
2230 |
+
'label_for' => 'psp_'.$posttype_name.'_metabox',
|
2231 |
+
'option_name' => $psp_settings_name.'[hide_metabox]',
|
2232 |
+
'option_value' => isset($psp_settings['hide_metabox']) ? $psp_settings['hide_metabox'] : '',
|
2233 |
+
'checkbox_label' => esc_html__('Yes, hide for all users other than Admin', 'platinum-seo-pack')
|
2234 |
+
);
|
2235 |
+
|
2236 |
+
$breadcrumb_tax_field = array (
|
2237 |
+
'label_for' => 'psp_'.$posttype_name.'_taxonomy',
|
2238 |
+
'option_name' => $psp_settings_name.'[default_tax]',
|
2239 |
+
'option_value' => isset($psp_settings['default_tax']) ? $psp_settings['default_tax'] : '',
|
2240 |
+
'dditems' => $psp_bc_taxonomies,
|
2241 |
+
'option_description' => esc_html__( 'Select a default taxonomy to be used for this post type in breadcrumb trail. Make sure that all posts of this post type are tagged with terms falling under this taxonomy,', 'platinum-seo-pack' ),
|
2242 |
+
);
|
2243 |
+
|
2244 |
+
$section_id = 'psp_'.$posttype_name.'_section';
|
2245 |
+
//$section_title = $posttype_name_text.' Settings';
|
2246 |
+
$section_title = sprintf( esc_html__( '%s Settings', 'platinum_seo_pack' ), $posttype_name_text );
|
2247 |
+
if ($posttype_name == "attachment") $section_title = sprintf( esc_html__( '%s (Media) Settings', 'platinum_seo_pack' ), $posttype_name_text );
|
2248 |
+
|
2249 |
+
$title_field_id = 'psp_'.$posttype_name.'_title';
|
2250 |
+
$desc_field_id = 'psp_'.$posttype_name.'_desc';
|
2251 |
+
$header_field_id = 'psp_'.$posttype_name.'_header';
|
2252 |
+
$robots_field_id = 'psp_'.$posttype_name.'_robots';
|
2253 |
+
$metabox_field_id = 'psp_'.$posttype_name.'_metabox';
|
2254 |
+
$breadcrumb_tax_field_id = 'psp_'.$posttype_name.'_taxonomy';
|
2255 |
+
|
2256 |
+
//$title_field_title = 'Title Format: ';
|
2257 |
+
//$desc_field_title = 'Meta Description Format: ';
|
2258 |
+
//$header_field_title = 'Additional '.$posttype_name_text. ' Headers: ';
|
2259 |
+
//$robots_field_title = 'Meta Robots: ';
|
2260 |
+
//$metabox_field_title = 'Hide '.$posttype_name_text. ' Meta box: ';
|
2261 |
+
|
2262 |
+
$title_field_title = esc_html__('Title Format: ', 'platinum-seo-pack');
|
2263 |
+
$desc_field_title = esc_html__('Meta Description Format: ','platinum-seo-pack');
|
2264 |
+
$header_field_title = 'Additional '.$posttype_name_text. ' Headers: ';
|
2265 |
+
$robots_field_title = esc_html__('Meta Robots: ', 'platinum-seo-pack');
|
2266 |
+
$metabox_field_title = sprintf( esc_html__( 'Hide %s Metabox:', 'platinum_seo_pack' ), $posttype_name_text );
|
2267 |
+
$breadcrumb_tax_field_title = esc_html__('Taxonomy for breadcrumb trail: ', 'platinum-seo-pack');
|
2268 |
+
|
2269 |
+
//wp_register_script( 'psp-posttags-js', plugins_url( '/js/psp_post_tags.js', __FILE__ ), array('psp-tagit-js') );
|
2270 |
+
//wp_register_script( 'psp-posttags-js', plugins_url( '/js/psp_post_tags.js', __FILE__ ), array( 'jquery-ui-autocomplete', 'jquery' ) );
|
2271 |
+
//wp_enqueue_script('psp-posttags-js');
|
2272 |
+
|
2273 |
+
wp_register_script( 'psp-atags-js', plugins_url( '/js/atags.js', __FILE__ ), array( 'jquery' ), false, true );
|
2274 |
+
wp_enqueue_script('psp-atags-js');
|
2275 |
+
|
2276 |
+
register_setting( $this->psp_posttype_settings_group, $psp_settings_name, array( &$this, 'sanitize_posttype_settings' ) );
|
2277 |
+
//Section
|
2278 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_posttype_desc' ), $this->psp_posttype_settings_group );
|
2279 |
+
//Fields
|
2280 |
+
add_settings_field( $title_field_id, $title_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_posttype_settings_group, $section_id, $title_field);
|
2281 |
+
add_settings_field( $desc_field_id, $desc_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_posttype_settings_group, $section_id, $desc_field );
|
2282 |
+
add_settings_field( $header_field_id, $header_field_title, array( &$this, 'psp_add_field_textarea' ), $this->psp_posttype_settings_group, $section_id, $additional_headers_field );
|
2283 |
+
add_settings_field( $robots_field_id, $robots_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_posttype_settings_group, $section_id, $robots_field );
|
2284 |
+
add_settings_field( $metabox_field_id, $metabox_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_posttype_settings_group, $section_id, $metabox_field );
|
2285 |
+
add_settings_field( $breadcrumb_tax_field_id, $breadcrumb_tax_field_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_posttype_settings_group, $section_id, $breadcrumb_tax_field );
|
2286 |
+
}
|
2287 |
+
|
2288 |
+
function sanitize_posttype_settings($settings) {
|
2289 |
+
|
2290 |
+
//if( isset( $settings['title'] ) ) $settings['title'] = sanitize_text_field( $settings['title'] );
|
2291 |
+
//if( isset( $settings['description'] ) ) $settings['description'] = sanitize_text_field( $settings['description'] );
|
2292 |
+
|
2293 |
+
if ( isset( $settings['title'] ) ) {
|
2294 |
+
$settings['title'] = sanitize_text_field( $settings['title'] );
|
2295 |
+
|
2296 |
+
$psp_title_format = explode(" ", $settings['title']);
|
2297 |
+
$titleformats = array('%seo_title%', '%wp_title%', '%sep%', '%site_name%', '%site_description%');
|
2298 |
+
if(!empty($psp_title_format)) {
|
2299 |
+
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
2300 |
+
$settings['title'] = '';
|
2301 |
+
}
|
2302 |
+
}
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
if ( isset( $settings['description'] ) ) {
|
2306 |
+
$settings['description'] = sanitize_text_field( $settings['description'] );
|
2307 |
+
|
2308 |
+
$psp_desc_format = explode(" ", $settings['description']);
|
2309 |
+
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%');
|
2310 |
+
if(!empty($psp_desc_format)) {
|
2311 |
+
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
2312 |
+
$settings['description'] = '';
|
2313 |
+
}
|
2314 |
+
}
|
2315 |
+
}
|
2316 |
+
//validate headers
|
2317 |
+
if( isset( $settings['headers'] ) ) {
|
2318 |
+
|
2319 |
+
$allowed_html = array(
|
2320 |
+
'meta' => array(
|
2321 |
+
'name' => array(),
|
2322 |
+
'property' => array(),
|
2323 |
+
'itemprop' => array(),
|
2324 |
+
'content' => array(),
|
2325 |
+
),
|
2326 |
+
);
|
2327 |
+
|
2328 |
+
$settings['headers'] = wp_kses($settings['headers'], $allowed_html);
|
2329 |
+
$settings['headers'] = sanitize_textarea_field( htmlentities($settings['headers']) );
|
2330 |
+
};
|
2331 |
+
|
2332 |
+
if ( isset( $settings['robots'] ) ) {
|
2333 |
+
$settings['robots'] = !is_null(filter_var($settings['robots'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['robots'] : '';
|
2334 |
+
}
|
2335 |
+
|
2336 |
+
if ( isset( $settings['hide_metabox'] ) ) {
|
2337 |
+
$settings['hide_metabox'] = !is_null(filter_var($settings['hide_metabox'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['hide_metabox'] : '';
|
2338 |
+
}
|
2339 |
+
|
2340 |
+
if ( isset( $settings['default_tax'] ) ) {
|
2341 |
+
$settings['default_tax'] = sanitize_text_field( $settings['default_tax'] );
|
2342 |
+
|
2343 |
+
$builtin_tax = array("category", "post_tag");
|
2344 |
+
$custom_tax = array();
|
2345 |
+
$psp_all_tax = array();
|
2346 |
+
$custom_tax = $this->custom_taxonomies;
|
2347 |
+
$psp_all_tax = array_merge((array)$builtin_tax, (array)$custom_tax);
|
2348 |
+
if (!in_array($settings['default_tax'], $psp_all_tax)) {
|
2349 |
+
$settings['default_tax'] = '';
|
2350 |
+
}
|
2351 |
+
}
|
2352 |
+
|
2353 |
+
return $settings;
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
/*
|
2357 |
+
* The following methods provide descriptions
|
2358 |
+
* for their respective sections, used as callbacks
|
2359 |
+
* with add_settings_section
|
2360 |
+
*/
|
2361 |
+
|
2362 |
+
function section_sitewidemeta_desc() { esc_html_e('These settings are applied throughout the site wherever appropriate.', 'platinum-seo-pack'); }
|
2363 |
+
function section_separator_desc() { echo esc_html__('The Title separator can be used in all Title formats and Description formats by specifying the tag - ', 'platinum-seo-pack').' %sep%'; }
|
2364 |
+
function section_home_desc() { echo '<a href="'.home_url().'" target=_blank">'. esc_html__('Home page SEO settings', 'platinum-seo-pack').'</a> - '.esc_html__('Set the title and meta description tags used on home page of your site here.', 'platinum-seo-pack');}
|
2365 |
+
function section_taxonomy_desc() { esc_html_e('Set the title and description formats for some default and all custom taxonomies.', 'platinum-seo-pack'); }
|
2366 |
+
function section_posttype_desc() { esc_html_e('Set the title and description formats for some default and all custom post types.', 'platinum-seo-pack'); }
|
2367 |
+
function section_others_desc() { esc_html_e('Set the title format for search result pages.', 'platinum-seo-pack'); }
|
2368 |
+
function section_404_desc() { esc_html_e('Set the title format for 404 page.', 'platinum-seo-pack'); }
|
2369 |
+
function section_nofollow_desc() { esc_html_e('These Nofollow settings are applied throughout the site wherever appropriate.', 'platinum-seo-pack'); }
|
2370 |
+
function section_permalinks_desc() { echo esc_html__('These settings, if checked, will remove the base from taxonomies like Category and other custom taxonomies, if any. If "Remove base" is chosen for Category then the corresponding base will be removed from the permalink structure for categories.', 'platinum-seo-pack'). ' i.e. <code>Category</code>'; }
|
2371 |
+
function section_cleanup_head_desc() { echo esc_html__('Remove unwanted links from HTML', 'platinum-seo-pack'). ' <code><head></head></code>'.
|
2372 |
+
esc_html__('Many of these links might not be needed in the head section for most sites and removing these might help reduce page size and also improve crawlability of more imortant links. So you may choose to remove those that are not needed for you site.', 'platinum-seo-pack'); }
|
2373 |
+
function section_cleanup_comment_desc() { esc_html_e('Strip HTML and anchor tags embedded in comments. Note that these remove the HTML and links embedded in the comments and not the comment author links.', 'platinum-seo-pack'); }
|
2374 |
+
function section_sitelinks_searchbox_desc() { echo esc_html__('Here you can enable the markup for "Google Sitelinks Search Box" on your site frontpage. For more information on this refer', 'platinum-seo-pack').' <a href="https://developers.google.com/structured-data/slsb-overview" target="_blank">Enable Sitelinks Search Box - Structured Data — Google Developers</a>. '.esc_html__('However, you must remember that though you might chose to implement this markup by enabling this, google algorithms determine whether or not to show a sitelink search box in Google SERPS for any given domain.', 'platinum-seo-pack'); }
|
2375 |
+
function section_fb_desc() {echo '';}
|
2376 |
+
function section_twitter_desc() {echo ''; }
|
2377 |
+
function section_schema_org_desc() {echo ''; }
|
2378 |
+
function section_kg_desc() {echo ''; }
|
2379 |
+
function section_kg_sp_desc() {echo ''; }
|
2380 |
+
function section_kg_logo_desc() {echo ''; }
|
2381 |
+
function section_kg_contacts_desc() {echo ''; }
|
2382 |
+
function section_empty_desc() {echo ''; }
|
2383 |
+
function section_archives_desc() {echo ''; }
|
2384 |
+
function section_breadcrumb_desc() { echo esc_html__('These breadcrumb settings are for displaying breadcrumbs on the Post. It is built on top of Justin Tadlock\'s @BreadcrumbTrail package. Place the code', 'platinum-seo-pack').' <code><?php if ( function_exists( \'psp_breadcrumb_trail\' ) ) { psp_breadcrumb_trail(); } ?></code> '.esc_html__(' in your theme\'s single.php, at an apppropriate location, to display the generated breadcrumb trail. You may add the breadcrumb Json-LD schema (along with other schemas) in the Techblissonline Platinum SEO metabox for the Post.', 'platinum-seo-pack'); }
|
2385 |
+
function section_schema_desc() {echo esc_html__('The following settings are not necessary if you had added these schemas in the Home page JSOM Schema Editor settings of this plugin.', 'platinum-seo-pack'). ' i.e. <br /> 1. '.esc_html__('Schema for enabling Sitelink Search Box in Google and', 'platinum-seo-pack').' <br /> 2. '. esc_html__('Schema for Knowledge Graph', 'platinum-seo-pack'); }
|
2386 |
+
|
2387 |
+
/*
|
2388 |
+
* Callback for adding a textfield.
|
2389 |
+
*/
|
2390 |
+
function psp_add_field_text(array $args) {
|
2391 |
+
|
2392 |
+
$option_name = isset($args['option_name']) ? $args['option_name'] : '';
|
2393 |
+
$id = isset($args['label_for']) ? $args['label_for'] : '';
|
2394 |
+
$option_value = isset($args['option_value']) ? $args['option_value'] : '';
|
2395 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
2396 |
+
$option_button = isset($args['button']) ? esc_attr($args['button']) : '';
|
2397 |
+
$class_name = isset($args['class_name']) ? $args['class_name'] : '';
|
2398 |
+
$psp_tags = isset($args['psp_tags']) ? ( $args['psp_tags'] ) : '';
|
2399 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2400 |
+
|
2401 |
+
if (!$option_button) {
|
2402 |
+
//printf( '<input id="%1$s" name="%2$s" style="width:99%%" type="text" value="%3$s" /><br /><p class="description">%4$s</p>', $id, $option_name, $option_value,$option_description );
|
2403 |
+
if ($class_name) {
|
2404 |
+
echo "<input id='".esc_attr($id)."' name='".esc_attr($option_name)."' class='".esc_attr($class_name)."' style='width:99%' type='text' value='".esc_attr($option_value)."' readonly/><br/><p class='description'>".wp_kses(html_entity_decode($option_description),$desc_allowed_html)."</p>";//<br /><span class='describe'>Describe title</span>";
|
2405 |
+
if ( ! empty( $psp_tags ) ) : ?>
|
2406 |
+
<p><?php esc_html_e( 'Available tags:' , 'platinum-seo-pack'); ?></p>
|
2407 |
+
<ul role="list">
|
2408 |
+
<?php
|
2409 |
+
foreach ( $psp_tags as $tag ) {
|
2410 |
+
?>
|
2411 |
+
<li class="psp">
|
2412 |
+
<button type="button" data-added="<?php echo esc_attr( $tag ); ?>" data-id="<?php echo esc_attr( $id ); ?>"
|
2413 |
+
class="pspbutton button button-secondary">
|
2414 |
+
<?php echo '%' . esc_attr( $tag ) . '%'; ?>
|
2415 |
+
</button>
|
2416 |
+
</li>
|
2417 |
+
<?php
|
2418 |
+
}
|
2419 |
+
?>
|
2420 |
+
</ul>
|
2421 |
+
<?php endif;
|
2422 |
+
} else {
|
2423 |
+
echo "<input id='".esc_attr($id)."' name='".esc_attr($option_name)."' style='width:99%' type='text' value='".esc_attr($option_value)."' /><br/><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";//<br /><span class='describe'>Describe title</span>";
|
2424 |
+
}
|
2425 |
+
|
2426 |
+
} else {
|
2427 |
+
echo "<input style='width:87%;' type='text' name='".esc_attr($option_name)."' id='".esc_attr($id)."' value='".esc_attr($option_value)."'><input style='font-size:small' class='upload_image_button' type='button' value='Upload' /><br/><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2428 |
+
}
|
2429 |
+
//echo "<input id='".$this->psp_home_settings_key['title']."' name='".$this->psp_home_settings_key['title']."' type='text' value='".esc_attr( $this->psp_home_settings['title'] )."' />";
|
2430 |
+
}
|
2431 |
+
|
2432 |
+
/*
|
2433 |
+
* Callback for adding a textfield for adding URLs.
|
2434 |
+
*/
|
2435 |
+
function psp_add_field_text_url(array $args) {
|
2436 |
+
|
2437 |
+
$option_name = isset($args['option_name']) ? $args['option_name'] : '';
|
2438 |
+
$id = isset($args['label_for']) ? $args['label_for'] : '';
|
2439 |
+
$option_value = isset($args['option_value']) ? $args['option_value'] : '';
|
2440 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
2441 |
+
$option_button = isset($args['button']) ? esc_attr($args['button']) : '';
|
2442 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2443 |
+
|
2444 |
+
if (!$option_button) {
|
2445 |
+
//printf( '<input id="%1$s" name="%2$s" style="width:99%%" type="text" value="%3$s" /><br /><p class="description">%4$s</p>', $id, $option_name, $option_value,$option_description );
|
2446 |
+
echo "<input id='".esc_attr($id)."' name='".esc_attr($option_name)."' style='width:99%' type='text' value='".esc_url($option_value)."' /><br/><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";//<br /><span class='describe'>Describe title</span>";
|
2447 |
+
} else {
|
2448 |
+
echo "<input style='width:87%;' type='text' name='".esc_attr($option_name)."' id='".esc_attr($id)."' value='".esc_url($option_value)."'><input style='font-size:small' class='upload_image_button' type='button' value='Upload' /><br/><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
}
|
2452 |
+
|
2453 |
+
/*
|
2454 |
+
* Callback for adding a textarea.
|
2455 |
+
*/
|
2456 |
+
function psp_add_field_textarea(array $args) {
|
2457 |
+
|
2458 |
+
$option_name = isset($args['option_name']) ? $args['option_name'] : '';
|
2459 |
+
$id = isset($args['label_for']) ? $args['label_for'] : '';
|
2460 |
+
$option_value = isset($args['option_value']) ? html_entity_decode(esc_textarea( $args['option_value'] )) : '';
|
2461 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
2462 |
+
$class_name = isset($args['class_name']) ? $args['class_name'] : '';
|
2463 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2464 |
+
|
2465 |
+
if(!empty($class_name)) {
|
2466 |
+
echo "<textarea id='".esc_attr($id)."' name='".esc_attr($option_name)."' class='".esc_attr($class_name)."' rows='3' style='width:99%' type='textarea'>{$option_value}</textarea><br><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2467 |
+
} else {
|
2468 |
+
echo "<textarea id='".esc_attr($id)."' name='".esc_attr($option_name)."' rows='3' style='width:99%' type='textarea'>{$option_value}</textarea><br><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2469 |
+
}
|
2470 |
+
//echo "<textarea rows='4' id='".$this->psp_home_settings_key['description']."' name='".$this->psp_home_settings_key['description']."'>".stripcslashes($this->psp_home_settings['description'])."</textarea>";
|
2471 |
+
}
|
2472 |
+
|
2473 |
+
/*
|
2474 |
+
* Callback for adding a checkbox.
|
2475 |
+
*/
|
2476 |
+
function psp_add_field_checkbox(array $args) {
|
2477 |
+
|
2478 |
+
$option_name = isset($args['option_name']) ? esc_attr($args['option_name']) : '';
|
2479 |
+
$id = isset($args['label_for']) ? esc_attr($args['label_for']) : '';
|
2480 |
+
$option_value = isset($args['option_value']) ? esc_attr( $args['option_value'] ) : '';
|
2481 |
+
//$option_value = esc_attr( $args['option_value'] );
|
2482 |
+
$checkbox_label = isset($args['checkbox_label']) ? esc_html($args['checkbox_label']) : '';
|
2483 |
+
$option_description = isset($args['option_description']) ? esc_html($args['option_description']) : '';
|
2484 |
+
$checked = '';
|
2485 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2486 |
+
if($option_value) { $checked = ' checked="checked" '; }
|
2487 |
+
echo "<input ".esc_attr($checked)." id='".esc_attr($id)."' name='".esc_attr($option_name)."' type='checkbox'/><span> </span><span for='".esc_attr($id)."'>".wp_kses(html_entity_decode($checkbox_label), $desc_allowed_html)."</span><br /><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2488 |
+
|
2489 |
+
}
|
2490 |
+
|
2491 |
+
/*
|
2492 |
+
* Callback for adding a dropdown.
|
2493 |
+
*/
|
2494 |
+
function psp_add_field_dropdown(array $args) {
|
2495 |
+
|
2496 |
+
$option_name = isset($args['option_name']) ? esc_attr($args['option_name']) : '';
|
2497 |
+
$id = isset($args['label_for']) ? esc_attr($args['label_for']) : '';
|
2498 |
+
$option_value = isset($args['option_value']) ? htmlentities( $args['option_value'], ENT_COMPAT, 'UTF-8', false ) : '';
|
2499 |
+
$dditems = isset($args['dditems']) ? $args['dditems'] : array();
|
2500 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
2501 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2502 |
+
|
2503 |
+
|
2504 |
+
//if($option_value) { $checked = ' checked="checked" '; }
|
2505 |
+
//echo "<input ".$checked." id='$id' name='$option_name' type='checkbox' /><label for='$id'>$checkbox_label</label><br /><p class='description'>$option_description</p>";
|
2506 |
+
|
2507 |
+
echo "<select id='".esc_attr($id)."' name='".esc_attr($option_name)."'>";
|
2508 |
+
/*foreach($dditems as $item) {
|
2509 |
+
$selected = ($option_value==$item) ? 'selected="selected"' : '';
|
2510 |
+
echo "<option value='$item' $selected>$item</option>";
|
2511 |
+
}*/
|
2512 |
+
//echo "<option value disabled selected>Select an option</option>";
|
2513 |
+
//echo "<option value=""></option>";
|
2514 |
+
//while (list($key, $val) = each($dditems)) {
|
2515 |
+
foreach($dditems as $key => $val) {
|
2516 |
+
$selected = ($option_value==$key) ? 'selected="selected"' : '';
|
2517 |
+
echo "<option value='".esc_attr($key)."' ".esc_attr($selected).">".esc_attr($val)."</option>";
|
2518 |
+
//$selected = ($option_value==$val) ? 'selected="selected"' : '';
|
2519 |
+
//echo "<option value='$val' $selected>$key</option>";
|
2520 |
+
}
|
2521 |
+
echo "</select><p for='".esc_attr($id)."'> ".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2522 |
+
|
2523 |
+
}
|
2524 |
+
|
2525 |
+
/*
|
2526 |
+
* Callback for adding radio buttons.
|
2527 |
+
*/
|
2528 |
+
function psp_add_field_radiobuttons(array $args) {
|
2529 |
+
|
2530 |
+
$option_name = isset($args['option_name']) ? esc_attr($args['option_name']) : '';
|
2531 |
+
$id = isset($args['label_for']) ? esc_attr($args['label_for']) : '';
|
2532 |
+
$option_value = isset($args['option_value']) ? htmlentities( $args['option_value'], ENT_COMPAT, 'UTF-8', false ) : '';
|
2533 |
+
$radioitems = isset($args['radioitems']) ? $args['radioitems'] : array();//array ('-', '֧, 'ק, 'ק, 'է, '*', '?', '|', '~', '˧, 'ۧ, '<', '>');
|
2534 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
2535 |
+
$desc_allowed_html = array('br' => array(), 'code' => array(), 'strong' => array(), 'em' => array(), 'i' => array(), 'bold' => array(), 'a' => array('href' => array(), 'target' => array()));
|
2536 |
+
|
2537 |
+
$counter = 1;
|
2538 |
+
|
2539 |
+
echo "<div id='$id' class='psp-separator'>";
|
2540 |
+
|
2541 |
+
//while (list($key, $val) = each($radioitems)) {
|
2542 |
+
foreach($radioitems as $key => $val) {
|
2543 |
+
|
2544 |
+
$radio_id = $id."-radio-item-".$counter;
|
2545 |
+
$selected = ($option_value==$key) ? 'checked="checked"' : '';
|
2546 |
+
echo "<input id='".esc_attr($radio_id)."' ".esc_attr($selected)." type='radio' name='".esc_attr($option_name)."' value='".esc_attr($key)."' /><label class='psp-radio-separator' for='".esc_attr($radio_id)."'>".esc_attr($val)."</label>";
|
2547 |
+
|
2548 |
+
$counter = $counter + 1;
|
2549 |
+
|
2550 |
+
}
|
2551 |
+
|
2552 |
+
/*foreach ( $radioitems as $radioitem ) {
|
2553 |
+
|
2554 |
+
$radio_id = $id."-radio-item-".$counter;
|
2555 |
+
$selected = ($option_value==$radioitem) ? 'checked="checked"' : '';
|
2556 |
+
echo "<input id='$radio_id' $selected type='radio' name='$option_name' value='$radioitem' /><label class='psp-radio-separator' for='$radio_id'>$radioitem</label>";
|
2557 |
+
|
2558 |
+
$counter = $counter + 1;
|
2559 |
+
|
2560 |
+
}*/
|
2561 |
+
|
2562 |
+
echo "</div><br /><p class='description'>".wp_kses(html_entity_decode($option_description), $desc_allowed_html)."</p>";
|
2563 |
+
|
2564 |
+
}
|
2565 |
+
|
2566 |
+
/*
|
2567 |
+
* Called during admin_menu, adds an options
|
2568 |
+
* page under Settings called My Settings, rendered
|
2569 |
+
* using the plugin_options_page method.
|
2570 |
+
*/
|
2571 |
+
function add_admin_menus() {
|
2572 |
+
//add_options_page( 'Platinum SEO New Settings', 'My Settings', 'manage_options', $this->psp_plugin_options_key, array( &$this, 'psp_options_page' ) );
|
2573 |
+
add_menu_page(esc_html__('Techblissonline Platinum SEO and social Pack', 'platinum-seo-pack'), esc_html__('Platinum SEO and Social Pack', 'platinum-seo-pack'), 'manage_options', $this->psp_plugin_options_key, array($this, 'psp_options_page'), plugins_url( 'images/techblissonline-platinum-seo-pack.ico', dirname(dirname(__FILE__) )));
|
2574 |
+
add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO and social Pack', 'platinum_seo_pack'), esc_html__('SEO', 'platinum_seo_pack'), 'manage_options', $this->psp_plugin_options_key);
|
2575 |
+
$psp_settings = get_option('psp_pre_setting');
|
2576 |
+
$psp_premium_valid = isset($psp_settings['premium']) ? $psp_settings['premium'] : '';
|
2577 |
+
$psp_premium_status = isset($psp_settings['psp_premium_license_key_status']) ? $psp_settings['psp_premium_license_key_status'] : '';
|
2578 |
+
|
2579 |
+
|
2580 |
+
//$psp_premium_valid = 1;
|
2581 |
+
//$psp_premium_status = 1;
|
2582 |
+
//if ($psp_premium_valid && $psp_premium_status)
|
2583 |
+
add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO Social', 'platinum_seo_pack'), esc_html__('Social', 'platinum_seo_pack'), 'manage_options', 'psp-social-by-techblissonline', array($this->psp_social_instance, 'psp_social_options_page'));
|
2584 |
+
//add_submenu_page($this->psp_plugin_options_key, __('Techblissonline Platinum SEO Premium Pack', 'platinum_seo_pack'), __('SEO - Advanced', 'platinum_seo_pack'), 'manage_options', 'webmastertools', array($this->psp_wmt_instance, 'psp_wmt_options_page'));
|
2585 |
+
//add_submenu_page($this->psp_plugin_options_key, __('Techblissonline Platinum SEO Analytics', 'platinum_seo_pack'), __('SEO - Analytics', 'platinum_seo_pack'), 'manage_options', 'psp-gatracking-by-techblissonline', array($this->psp_ga_instance, 'psp_ga_options_page'));
|
2586 |
+
add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO Tools', 'platinum_seo_pack'), esc_html__('SEO - Editors', 'platinum_seo_pack'), 'manage_options', 'psp-tools-by-techblissonline', array($this->psp_tools_instance, 'psp_tools_options_page'));
|
2587 |
+
add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO Premium Pack', 'platinum_seo_pack'), esc_html__('Techblissonline - SEO Tools', 'platinum_seo_pack'), 'manage_options', 'psp-seo-tools-by-techblissonline', array( &$this, 'psp_pre_tools_display_page'));
|
2588 |
+
//add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO Premium Pack', 'platinum_seo_pack'), __('Techblissonline - SEO Tools', 'platinum_seo_pack'), 'manage_options', 'psp-seo-tools-by-techblissonline', array($this->psp_pre_instance, 'psp_pre_options_page'));
|
2589 |
+
if ($psp_premium_valid) add_submenu_page($this->psp_plugin_options_key, esc_html__('Techblissonline Platinum SEO Premium Pack', 'platinum_seo_pack'), esc_html__('Premium - Licenses', 'platinum_seo_pack'), 'manage_options', 'pspp-licenses', array($this->psp_pre_instance, 'psp_premium_options_page'));
|
2590 |
+
}
|
2591 |
+
|
2592 |
+
function psp_pre_tools_display_page() {
|
2593 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
2594 |
+
include_once( 'psp_tools_renderer.php' );
|
2595 |
+
}
|
2596 |
+
|
2597 |
+
//add extra fields to category edit form callback function
|
2598 |
+
function psp_extra_category_fields( $cat_object ) {
|
2599 |
+
|
2600 |
+
//global $wp_scripts;
|
2601 |
+
//wp_enqueue_style("jquery-ui-css", "http://ajax.googleapis.com/ajax/libs/jqueryui/{$wp_scripts->registered['jquery-ui-core']->ver}/themes/smoothness/jquery-ui.min.css");
|
2602 |
+
|
2603 |
+
wp_enqueue_style("jquery-ui-css", plugins_url( '/css/jquery-ui-techblissonline.css', __FILE__ ));
|
2604 |
+
|
2605 |
+
//wp_enqueue_media();
|
2606 |
+
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs' ) );
|
2607 |
+
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
2608 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ));
|
2609 |
+
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
2610 |
+
//wp_enqueue_script( 'psp-cm', plugins_url( '/js/cm.js', __FILE__ ), array(), false, true);
|
2611 |
+
|
2612 |
+
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
2613 |
+
wp_localize_script('psp-meta-box', 'psp_cm_json_settings', $psp_cm_json_settings);
|
2614 |
+
|
2615 |
+
$psp_cm_html_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'html', 'codemirror'=> array('autoRefresh' => true)));
|
2616 |
+
wp_localize_script('psp-meta-box', 'psp_cm_html_settings', $psp_cm_html_settings);
|
2617 |
+
|
2618 |
+
$psp_taxonomy_metabox_hidden = false;
|
2619 |
+
$psp_taxonomy_option_value = array();
|
2620 |
+
|
2621 |
+
$category_id = $cat_object->term_id;
|
2622 |
+
$taxonomy_name = $cat_object->taxonomy;
|
2623 |
+
$psp_taxonomy_option_name = "psp_".$taxonomy_name."_settings";
|
2624 |
+
$psp_taxonomy_option_value = get_option($psp_taxonomy_option_name);
|
2625 |
+
//if (isset($psp_taxonomy_option_value['hide_metabox']))
|
2626 |
+
$psp_taxonomy_metabox_hidden = isset($psp_taxonomy_option_value['hide_metabox']) ? $psp_taxonomy_option_value['hide_metabox'] : '';
|
2627 |
+
$psp_taxonomy_metabox_title = isset($psp_taxonomy_option_value['title']) ? $psp_taxonomy_option_value['title'] : '';
|
2628 |
+
$psp_taxonomy_metabox_description = isset($psp_taxonomy_option_value['description']) ? $psp_taxonomy_option_value['description'] : '';
|
2629 |
+
|
2630 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
2631 |
+
$psp_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
2632 |
+
|
2633 |
+
$psp_pre_settings = get_option('psp_pre_setting');
|
2634 |
+
$psp_premium_valid = isset($psp_pre_settings['premium']) && !empty($psp_pre_settings['premium']) ? $psp_pre_settings['premium'] : '';
|
2635 |
+
$psp_premium_status = isset($psp_pre_settings['psp_premium_license_key_status']) ? $psp_pre_settings['psp_premium_license_key_status'] : '';
|
2636 |
+
//$psp_premium_valid = 1;
|
2637 |
+
//$psp_premium_status = 1;
|
2638 |
+
|
2639 |
+
if (is_super_admin()) $psp_taxonomy_metabox_hidden = false;
|
2640 |
+
|
2641 |
+
if (!$psp_taxonomy_metabox_hidden) {
|
2642 |
+
//wp_nonce_field( 'do_psp_extra_category_fields', 'psp_extra_category_fields_nonce' );
|
2643 |
+
//$cat_meta = get_option( "psp_category_metas_$category_id");
|
2644 |
+
?>
|
2645 |
+
</table>
|
2646 |
+
<?php wp_nonce_field( 'do_psp_extra_category_fields', 'psp_extra_category_fields_nonce' );
|
2647 |
+
$psp_type = "taxonomy";
|
2648 |
+
//available tags array
|
2649 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
2650 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'description', 'seo_description', 'site_name', 'site_description'];
|
2651 |
+
$psp_seo_meta = get_option( "psp_category_seo_metas_$category_id");
|
2652 |
+
$psp_seo_meta['titleformat'] = isset($psp_seo_meta['titleformat']) ? esc_attr($psp_seo_meta['titleformat']) : esc_attr($psp_taxonomy_metabox_title);
|
2653 |
+
$psp_seo_meta['descformat'] = isset($psp_seo_meta['descformat']) ? esc_attr($psp_seo_meta['descformat']) :'';
|
2654 |
+
|
2655 |
+
//$psp_seo_meta['schema_string'] = isset($psp_seo_meta['schema_string']) ? html_entity_decode(stripcslashes($psp_seo_meta['schema_string'])) :'';
|
2656 |
+
$json_schema_string = isset($psp_seo_meta['schema_string']) ? html_entity_decode(stripcslashes(esc_attr($psp_seo_meta['schema_string']))) : '';
|
2657 |
+
//validate it is a json object
|
2658 |
+
$schema_obj = json_decode($json_schema_string);
|
2659 |
+
if($schema_obj === null) {
|
2660 |
+
$json_schema_string = 'Invalid JSON Schema';
|
2661 |
+
}
|
2662 |
+
$psp_seo_meta['schema_string'] = $json_schema_string;
|
2663 |
+
|
2664 |
+
//$psp_seo_meta = array_map( 'esc_attr', $psp_seo_meta );
|
2665 |
+
$this->psp_taxonomy_meta_original = $psp_seo_meta;
|
2666 |
+
$psp_social_meta = get_option( "psp_category_social_metas_$category_id");
|
2667 |
+
//$psp_social_meta = array_map( 'esc_attr', $psp_social_meta );
|
2668 |
+
$this->psp_taxonomy_social_meta_original = $psp_social_meta; ?>
|
2669 |
+
|
2670 |
+
<h2><?php esc_html_e('Techblissonline Platinum SEO and Social Meta Box ', 'platinum-seo-pack'); ?></h2>
|
2671 |
+
<div id="psp-meta-box">
|
2672 |
+
<ul class="psp-metabox-tabs" id="psp-metabox-tabs">
|
2673 |
+
<li class="basic"><a href="#basic"><?php esc_html_e( 'Basic SEO', 'platinum-seo-pack' ); ?></a></li>
|
2674 |
+
<?php if (!$psp_metabox_advanced_hidden || is_super_admin()) { ?>
|
2675 |
+
<li class="advanced"><a href="#advanced"><?php esc_html_e( 'Advanced SEO', 'platinum-seo-pack' ); ?></a></li>
|
2676 |
+
<li class="social"><a href="#bsocial"><?php esc_html_e( 'Basic Social', 'platinum-seo-pack' ); ?></a></li>
|
2677 |
+
<li class="social"><a href="#asocial"><?php esc_html_e( 'Advanced Social', 'platinum-seo-pack' ); ?></a></li>
|
2678 |
+
<?php } ?>
|
2679 |
+
</ul>
|
2680 |
+
<br class="clear" />
|
2681 |
+
<div id="basic" class="psptab">
|
2682 |
+
<?php include_once( 'psp_basic_metabox_renderer.php' ); ?>
|
2683 |
+
</div>
|
2684 |
+
<?php if (!$psp_metabox_advanced_hidden || is_super_admin()) { ?>
|
2685 |
+
<div id="advanced" class="hidden psptab wrap">
|
2686 |
+
<?php include_once( 'psp_advanced_metabox_renderer.php' ); ?>
|
2687 |
+
</div>
|
2688 |
+
<div id="bsocial" class="psptab">
|
2689 |
+
<?php include_once( 'psp_basic_social_metabox_renderer.php' ); ?>
|
2690 |
+
</div>
|
2691 |
+
<div id="asocial" class="psptab container">
|
2692 |
+
<?php if ($psp_premium_valid && $psp_premium_status) {
|
2693 |
+
$metabox_template = apply_filters('psp_metabox_template', 'psp_premiumad_metabox_renderer.php');
|
2694 |
+
if (empty($metabox_template)) $metabox_template = 'psp_premiumad_metabox_renderer.php';
|
2695 |
+
include_once( $metabox_template );
|
2696 |
+
//include_once( 'psp_advanced_social_metabox_renderer.php' );
|
2697 |
+
} else {
|
2698 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
2699 |
+
wp_enqueue_style("psp-htmlsettings-css", plugins_url( '/css/psp-html-settings.css', __FILE__ ));
|
2700 |
+
include_once( 'psp_premiumad_metabox_renderer.php' );
|
2701 |
+
}
|
2702 |
+
?>
|
2703 |
+
</div>
|
2704 |
+
<?php } ?>
|
2705 |
+
</div>
|
2706 |
+
<?php
|
2707 |
+
}
|
2708 |
+
}
|
2709 |
+
|
2710 |
+
// save extra category extra fields callback function
|
2711 |
+
function psp_save_extra_category_fields( $term_id ) {
|
2712 |
+
|
2713 |
+
// Check if our nonce is set and is valid.
|
2714 |
+
if ( ! isset( $_POST['psp_extra_category_fields_nonce'] ) || ! wp_verify_nonce( sanitize_key($_POST['psp_extra_category_fields_nonce']), 'do_psp_extra_category_fields' )) {
|
2715 |
+
return;
|
2716 |
+
}
|
2717 |
+
|
2718 |
+
$t_id = $term_id;
|
2719 |
+
|
2720 |
+
// Make sure that it is set.
|
2721 |
+
if ( ! isset( $_POST['psp_seo_meta'] ) && ! isset( $_POST['psp_social_meta'] ) ) {
|
2722 |
+
return;
|
2723 |
+
} else {
|
2724 |
+
|
2725 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
2726 |
+
$psp_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
2727 |
+
|
2728 |
+
if (is_super_admin()) $psp_metabox_advanced_hidden = false;
|
2729 |
+
|
2730 |
+
if (!empty($this->psp_taxonomy_meta_original)) {
|
2731 |
+
$psp_seo_data_original = $this->psp_taxonomy_meta_original;
|
2732 |
+
} else {
|
2733 |
+
$psp_seo_data_original = get_option( "psp_category_seo_metas_$t_id");
|
2734 |
+
}
|
2735 |
+
|
2736 |
+
if(!empty($this->psp_taxonomy_social_meta_original)) {
|
2737 |
+
$psp_social_data_original = $this->psp_taxonomy_social_meta_original;
|
2738 |
+
} else {
|
2739 |
+
//$psp_social_data_original = get_option( "psp_category_social_metas_$t_id");
|
2740 |
+
}
|
2741 |
+
|
2742 |
+
$psp_seo_data_current = isset($_POST['psp_seo_meta']) ? $this->psp_sanitze_seo_data($_POST['psp_seo_meta']) : array();
|
2743 |
+
|
2744 |
+
if (isset($psp_seo_data_original) && !empty($psp_seo_data_original)) {
|
2745 |
+
$psp_category_seo_data = array_merge((array)$psp_seo_data_original, (array)$psp_seo_data_current);
|
2746 |
+
} else {
|
2747 |
+
$psp_category_seo_data = $psp_seo_data_current;
|
2748 |
+
}
|
2749 |
+
|
2750 |
+
$psp_social_data_current = isset($_POST['psp_social_meta']) ? $this->psp_sanitze_social_data($_POST['psp_social_meta']) : array();
|
2751 |
+
|
2752 |
+
if (isset($psp_social_data_original) && !empty($psp_social_data_original)) {
|
2753 |
+
$psp_category_social_data = array_merge((array)$psp_social_data_original, (array)$psp_social_data_current);
|
2754 |
+
} else {
|
2755 |
+
$psp_category_social_data = $psp_social_data_current;
|
2756 |
+
}
|
2757 |
+
|
2758 |
+
if (isset($psp_category_seo_data) && !empty($psp_category_seo_data)) {
|
2759 |
+
|
2760 |
+
// Sanitize SEO data.
|
2761 |
+
//$psp_category_seo_data = $this->psp_sanitze_seo_data( $psp_category_seo_data );
|
2762 |
+
//save the option array
|
2763 |
+
update_option( "psp_category_seo_metas_$t_id", $psp_category_seo_data );
|
2764 |
+
|
2765 |
+
//do not proceed further if only basic seo meta data had to be saved/
|
2766 |
+
if ($psp_metabox_advanced_hidden) {
|
2767 |
+
return;
|
2768 |
+
}
|
2769 |
+
|
2770 |
+
//update google sitemap generator
|
2771 |
+
if (!empty($psp_category_seo_data['nositemap'])) {
|
2772 |
+
$this->psp_update_gsg("sm_b_exclude_cats", $t_id, true );
|
2773 |
+
$psp_exclude = true;
|
2774 |
+
} else {
|
2775 |
+
$this->psp_update_gsg("sm_b_exclude_cats", $t_id, false );
|
2776 |
+
$psp_exclude = false;
|
2777 |
+
}
|
2778 |
+
$psp_id = !empty($t_id) ? $t_id : '';
|
2779 |
+
//techblissonline_psp_update_sitemap - action hook to attach your function
|
2780 |
+
//$psp_id - Post ID or Term ID
|
2781 |
+
//$psp_exclude - Boolean indicating whether to exclude (true) or include (false) this post in the sitemap
|
2782 |
+
do_action( 'techblissonline_psp_update_sitemap', $psp_id, $psp_exclude );
|
2783 |
+
|
2784 |
+
}
|
2785 |
+
|
2786 |
+
if (isset($psp_category_social_data) && !empty($psp_category_social_data)) {
|
2787 |
+
|
2788 |
+
// Sanitize Social data.
|
2789 |
+
//$psp_category_social_data = $this->psp_sanitze_social_data( $psp_category_social_data );
|
2790 |
+
//save the option array
|
2791 |
+
update_option( "psp_category_social_metas_$t_id", $psp_category_social_data );
|
2792 |
+
|
2793 |
+
}
|
2794 |
+
|
2795 |
+
}
|
2796 |
+
}
|
2797 |
+
|
2798 |
+
//add extra fields to category edit form callback function
|
2799 |
+
function psp_extra_taxonomy_fields( $term_object ) {
|
2800 |
+
|
2801 |
+
//global $wp_scripts;
|
2802 |
+
//wp_enqueue_style("jquery-ui-css", "http://ajax.googleapis.com/ajax/libs/jqueryui/{$wp_scripts->registered['jquery-ui-core']->ver}/themes/smoothness/jquery-ui.min.css");
|
2803 |
+
|
2804 |
+
wp_enqueue_style("jquery-ui-css", plugins_url( '/css/jquery-ui-techblissonline.css', __FILE__ ));
|
2805 |
+
|
2806 |
+
//wp_enqueue_media();
|
2807 |
+
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array( 'jquery-ui-tabs' ) );
|
2808 |
+
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
2809 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ));
|
2810 |
+
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
2811 |
+
|
2812 |
+
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
2813 |
+
wp_localize_script('psp-meta-box', 'psp_cm_json_settings', $psp_cm_json_settings);
|
2814 |
+
|
2815 |
+
$psp_cm_html_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'html', 'codemirror'=> array('autoRefresh' => true)));
|
2816 |
+
wp_localize_script('psp-meta-box', 'psp_cm_html_settings', $psp_cm_html_settings);
|
2817 |
+
|
2818 |
+
$psp_taxonomy_metabox_hidden = false;
|
2819 |
+
$psp_taxonomy_option_value = array();
|
2820 |
+
|
2821 |
+
$t_id = $term_object->term_id;
|
2822 |
+
//$term_id = $term_object->term_id;
|
2823 |
+
$taxonomy_name = $term_object->taxonomy;
|
2824 |
+
|
2825 |
+
$psp_taxonomy_option_name = "psp_".$taxonomy_name."_settings";
|
2826 |
+
$psp_taxonomy_option_value = get_option($psp_taxonomy_option_name);
|
2827 |
+
//if (isset($psp_taxonomy_option_value['hide_metabox']))
|
2828 |
+
$psp_taxonomy_metabox_hidden = isset($psp_taxonomy_option_value['hide_metabox']) ? $psp_taxonomy_option_value['hide_metabox'] : '';
|
2829 |
+
$psp_taxonomy_metabox_title = isset($psp_taxonomy_option_value['title']) ? $psp_taxonomy_option_value['title'] : '';
|
2830 |
+
$psp_taxonomy_metabox_description = isset($psp_taxonomy_option_value['description']) ? $psp_taxonomy_option_value['description'] : '';
|
2831 |
+
|
2832 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
2833 |
+
$psp_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
2834 |
+
|
2835 |
+
$psp_pre_settings = get_option('psp_pre_setting');
|
2836 |
+
$psp_premium_valid = isset($psp_pre_settings['premium']) && !empty($psp_pre_settings['premium']) ? $psp_pre_settings['premium'] : '';
|
2837 |
+
$psp_premium_status = isset($psp_pre_settings['psp_premium_license_key_status']) ? $psp_pre_settings['psp_premium_license_key_status'] : '';
|
2838 |
+
|
2839 |
+
//$psp_premium_valid = 1;
|
2840 |
+
//$psp_premium_status = 0;
|
2841 |
+
|
2842 |
+
if (is_super_admin()) $psp_taxonomy_metabox_hidden = false;
|
2843 |
+
|
2844 |
+
if (!$psp_taxonomy_metabox_hidden) {
|
2845 |
+
//wp_nonce_field( 'do_psp_extra_taxonomy_fields', 'psp_extra_taxonomy_fields_nonce' );
|
2846 |
+
//$tax_meta = get_option( "psp_taxonomy_metas_$t_id");
|
2847 |
+
?>
|
2848 |
+
</table>
|
2849 |
+
<?php
|
2850 |
+
wp_nonce_field( 'do_psp_extra_taxonomy_fields', 'psp_extra_taxonomy_fields_nonce' );
|
2851 |
+
$psp_type = "taxonomy";
|
2852 |
+
//available tags array
|
2853 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
2854 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'description', 'seo_description', 'site_name', 'site_description'];
|
2855 |
+
$psp_seo_meta = get_option( "psp_taxonomy_seo_metas_$t_id");
|
2856 |
+
$psp_seo_meta['titleformat'] = isset($psp_seo_meta['titleformat']) ? esc_attr($psp_seo_meta['titleformat']) : esc_attr($psp_taxonomy_metabox_title);
|
2857 |
+
$psp_seo_meta['descformat'] = isset($psp_seo_meta['descformat']) ? esc_attr($psp_seo_meta['descformat']) : '';
|
2858 |
+
|
2859 |
+
//$psp_seo_meta['schema_string'] = isset($psp_seo_meta['schema_string']) ? html_entity_decode(stripcslashes(($psp_seo_meta['schema_string']))) :'';
|
2860 |
+
$json_schema_string = isset($psp_seo_meta['schema_string']) ? html_entity_decode(stripcslashes(esc_attr($psp_seo_meta['schema_string']))) : '';
|
2861 |
+
//validate it is a json object
|
2862 |
+
$schema_obj = json_decode($json_schema_string);
|
2863 |
+
if($schema_obj === null) {
|
2864 |
+
$json_schema_string = 'Invalid JSON Schema';
|
2865 |
+
}
|
2866 |
+
$psp_seo_meta['schema_string'] = $json_schema_string;
|
2867 |
+
|
2868 |
+
//$psp_seo_meta = array_map( 'esc_attr', $psp_seo_meta );
|
2869 |
+
$this->psp_taxonomy_meta_original = $psp_seo_meta;
|
2870 |
+
$psp_social_meta = get_option( "psp_taxonomy_social_metas_$t_id");
|
2871 |
+
//$psp_social_meta = array_map( 'esc_attr', $psp_social_meta );
|
2872 |
+
$this->psp_taxonomy_social_meta_original = $psp_social_meta; ?>
|
2873 |
+
<h2><?php esc_html_e('Techblissonline Platinum SEO and Social Meta Box ', 'platinum-seo-pack'); ?></h2>
|
2874 |
+
<div id="psp-meta-box">
|
2875 |
+
<ul class="psp-metabox-tabs" id="psp-metabox-tabs">
|
2876 |
+
<li class="basic"><a href="#basic"><?php esc_html_e( 'Basic SEO', 'platinum-seo-pack' ); ?></a></li>
|
2877 |
+
<?php if (!$psp_metabox_advanced_hidden || is_super_admin()) { ?>
|
2878 |
+
<li class="advanced"><a href="#advanced"><?php esc_html_e( 'Advanced SEO', 'platinum-seo-pack' ); ?></a></li>
|
2879 |
+
<li class="social"><a href="#bsocial"><?php esc_html_e( 'Basic Social', 'platinum-seo-pack' ); ?></a></li>
|
2880 |
+
<li class="social"><a href="#asocial"><?php esc_html_e( 'Advanced Social', 'platinum-seo-pack' ); ?></a></li>
|
2881 |
+
<?php } ?>
|
2882 |
+
</ul>
|
2883 |
+
<br class="clear" />
|
2884 |
+
<div id="basic" class="psptab">
|
2885 |
+
<?php include_once( 'psp_basic_metabox_renderer.php' ); ?>
|
2886 |
+
</div>
|
2887 |
+
<?php if (!$psp_metabox_advanced_hidden || is_super_admin()) { ?>
|
2888 |
+
<div id="advanced" class="hidden psptab wrap">
|
2889 |
+
<?php include_once( 'psp_advanced_metabox_renderer.php' ); ?>
|
2890 |
+
</div>
|
2891 |
+
<div id="bsocial" class="psptab">
|
2892 |
+
<?php include_once( 'psp_basic_social_metabox_renderer.php' ); ?>
|
2893 |
+
</div>
|
2894 |
+
<div id="asocial" class="psptab container">
|
2895 |
+
<?php if ($psp_premium_valid && $psp_premium_status) {
|
2896 |
+
$metabox_template = apply_filters('psp_metabox_template', 'psp_premiumad_metabox_renderer.php');
|
2897 |
+
if (empty($metabox_template)) $metabox_template = 'psp_premiumad_metabox_renderer.php';
|
2898 |
+
include_once( $metabox_template );
|
2899 |
+
//include_once( 'psp_advanced_social_metabox_renderer.php' );
|
2900 |
+
} else {
|
2901 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
2902 |
+
wp_enqueue_style("psp-htmlsettings-css", plugins_url( '/css/psp-html-settings.css', __FILE__ ));
|
2903 |
+
include_once( 'psp_premiumad_metabox_renderer.php' );
|
2904 |
+
}
|
2905 |
+
?>
|
2906 |
+
</div>
|
2907 |
+
<?php } ?>
|
2908 |
+
</div>
|
2909 |
+
<?php
|
2910 |
+
}
|
2911 |
+
}
|
2912 |
+
|
2913 |
+
// save extra category extra fields callback function
|
2914 |
+
function psp_save_extra_taxonomy_fields( $term_id ) {
|
2915 |
+
|
2916 |
+
// Check if our nonce is set and is valid.
|
2917 |
+
if ( ! isset( $_POST['psp_extra_taxonomy_fields_nonce'] ) || ! wp_verify_nonce( sanitize_key($_POST['psp_extra_taxonomy_fields_nonce']), 'do_psp_extra_taxonomy_fields' )) {
|
2918 |
+
return;
|
2919 |
+
}
|
2920 |
+
|
2921 |
+
$t_id = $term_id;
|
2922 |
+
|
2923 |
+
// Make sure that it is set.
|
2924 |
+
if ( ! isset( $_POST['psp_seo_meta'] ) && ! isset( $_POST['psp_social_meta'] ) ) {
|
2925 |
+
return;
|
2926 |
+
} else {
|
2927 |
+
|
2928 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
2929 |
+
$psp_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
2930 |
+
|
2931 |
+
if (is_super_admin()) $psp_metabox_advanced_hidden = false;
|
2932 |
+
|
2933 |
+
if (!empty($this->psp_taxonomy_meta_original)) {
|
2934 |
+
$psp_seo_data_original = $this->psp_taxonomy_meta_original;
|
2935 |
+
} else {
|
2936 |
+
$psp_seo_data_original = get_option( "psp_taxonomy_seo_metas_$t_id");
|
2937 |
+
}
|
2938 |
+
|
2939 |
+
if(!empty($this->psp_taxonomy_social_meta_original)) {
|
2940 |
+
$psp_social_data_original = $this->psp_taxonomy_social_meta_original;
|
2941 |
+
} else {
|
2942 |
+
//$psp_social_data_original = get_option( "psp_taxonomy_social_metas_$t_id");
|
2943 |
+
}
|
2944 |
+
|
2945 |
+
$psp_seo_data_current = isset($_POST['psp_seo_meta']) ? $this->psp_sanitze_seo_data($_POST['psp_seo_meta']) : array();
|
2946 |
+
|
2947 |
+
if(isset($psp_seo_data_original) && !empty($psp_seo_data_original)) {
|
2948 |
+
$psp_taxonomy_seo_data = array_merge((array)$psp_seo_data_original, (array)$psp_seo_data_current);
|
2949 |
+
} else {
|
2950 |
+
$psp_taxonomy_seo_data = $psp_seo_data_current;
|
2951 |
+
}
|
2952 |
+
|
2953 |
+
$psp_social_data_current = isset($_POST['psp_social_meta']) ? $this->psp_sanitze_social_data($_POST['psp_social_meta']) : array();
|
2954 |
+
|
2955 |
+
if(isset($psp_social_data_original) && !empty($psp_social_data_original)) {
|
2956 |
+
$psp_taxonomy_social_data = array_merge((array)$psp_social_data_original, (array)$psp_social_data_current);
|
2957 |
+
} else {
|
2958 |
+
$psp_taxonomy_social_data = $psp_social_data_current;
|
2959 |
+
}
|
2960 |
+
|
2961 |
+
if (isset($psp_taxonomy_seo_data) && !empty($psp_taxonomy_seo_data)) {
|
2962 |
+
|
2963 |
+
// Sanitize SEO data.
|
2964 |
+
//$psp_taxonomy_seo_data = $this->psp_sanitze_seo_data( $psp_taxonomy_seo_data );
|
2965 |
+
//save the option array
|
2966 |
+
update_option( "psp_taxonomy_seo_metas_$t_id", $psp_taxonomy_seo_data );
|
2967 |
+
|
2968 |
+
//do not proceed further if only basic seo meta data had to be saved/
|
2969 |
+
if ($psp_metabox_advanced_hidden) {
|
2970 |
+
return;
|
2971 |
+
}
|
2972 |
+
//update google sitemap generator
|
2973 |
+
if (!empty($psp_taxonomy_seo_data['nositemap'])) {
|
2974 |
+
$this->psp_update_gsg("sm_b_exclude_cats", $t_id, true );
|
2975 |
+
$psp_exclude = true;
|
2976 |
+
} else {
|
2977 |
+
$this->psp_update_gsg("sm_b_exclude_cats", $t_id, false );
|
2978 |
+
$psp_exclude = false;
|
2979 |
+
}
|
2980 |
+
$psp_id = !empty($t_id) ? $t_id : '';
|
2981 |
+
//techblissonline_psp_update_sitemap - action hook to attach your function
|
2982 |
+
//$psp_id - Post ID or Term ID
|
2983 |
+
//$psp_exclude - Boolean indicating whether to exclude (true) or include (false) this post in the sitemap
|
2984 |
+
do_action( 'techblissonline_psp_update_sitemap', $psp_id, $psp_exclude );
|
2985 |
+
|
2986 |
+
|
2987 |
+
}
|
2988 |
+
|
2989 |
+
if (isset($psp_taxonomy_social_data) && !empty($psp_taxonomy_social_data)) {
|
2990 |
+
|
2991 |
+
// Sanitize Social data.
|
2992 |
+
//$psp_taxonomy_social_data = $this->psp_sanitze_social_data( $psp_taxonomy_social_data );
|
2993 |
+
//save the option array
|
2994 |
+
update_option( "psp_taxonomy_social_metas_$t_id", $psp_taxonomy_social_data );
|
2995 |
+
|
2996 |
+
}
|
2997 |
+
|
2998 |
+
}
|
2999 |
+
|
3000 |
+
}
|
3001 |
+
|
3002 |
+
function do_psp_meta_boxes() {
|
3003 |
+
|
3004 |
+
//wp_enqueue_media();
|
3005 |
+
wp_enqueue_script( 'psp-meta-box', plugins_url( '/js/pspmetabox.js', __FILE__ ), array('jquery', 'jquery-ui-tabs' ) );
|
3006 |
+
//wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
3007 |
+
wp_enqueue_script( 'psp-meta-box-snippet', plugins_url( '/js/snippetpreview.js', __FILE__ ));
|
3008 |
+
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
3009 |
+
|
3010 |
+
$psp_cm_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
3011 |
+
wp_localize_script('psp-meta-box', 'psp_cm_json_settings', $psp_cm_json_settings);
|
3012 |
+
|
3013 |
+
$psp_cm_html_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'html', 'codemirror'=> array('autoRefresh' => true)));
|
3014 |
+
wp_localize_script('psp-meta-box', 'psp_cm_html_settings', $psp_cm_html_settings);
|
3015 |
+
|
3016 |
+
//global $wp_scripts;
|
3017 |
+
//wp_enqueue_style("jquery-ui-css", "http://ajax.googleapis.com/ajax/libs/jqueryui/{$wp_scripts->registered['jquery-ui-core']->ver}/themes/smoothness/jquery-ui.min.css");
|
3018 |
+
|
3019 |
+
wp_enqueue_style("jquery-ui-css", plugins_url( '/css/jquery-ui-techblissonline.css', __FILE__ ));
|
3020 |
+
|
3021 |
+
$psp_post_settings = get_option("psp_post_settings");
|
3022 |
+
$psp_post_metabox_hidden = isset($psp_post_settings['hide_metabox']) ? $psp_post_settings['hide_metabox'] : '';
|
3023 |
+
if (!$psp_post_metabox_hidden || is_super_admin()) {
|
3024 |
+
add_meta_box( 'postpsp', esc_html__( 'Techblissonline Platinum SEO and Social Meta Box', 'platinum-seo-pack' ), array( &$this, 'psp_do_seo_metabox' ), 'post', 'normal', 'high' );
|
3025 |
+
}
|
3026 |
+
|
3027 |
+
$psp_page_settings = get_option("psp_page_settings");
|
3028 |
+
$psp_page_metabox_hidden = isset($psp_page_settings['hide_metabox']) ? $psp_page_settings['hide_metabox'] : '';
|
3029 |
+
if (!$psp_page_metabox_hidden || is_super_admin()) {
|
3030 |
+
add_meta_box( 'postpsp', esc_html__( 'Techblissonline Platinum SEO and Social Meta Box', 'platinum-seo-pack' ), array( &$this, 'psp_do_seo_metabox' ), 'page', 'normal', 'high' );
|
3031 |
+
}
|
3032 |
+
|
3033 |
+
$cust_post_types = array();
|
3034 |
+
|
3035 |
+
$cust_post_types = $this->custom_post_types;
|
3036 |
+
if(empty($cust_post_types)) $cust_post_types = get_post_types( array ( '_builtin' => FALSE ) );
|
3037 |
+
|
3038 |
+
foreach($cust_post_types as $cust_post_type) {
|
3039 |
+
$psp_posttype_option_name = "psp_".$cust_post_type."_settings";
|
3040 |
+
$psp_posttype_option_value = get_option($psp_posttype_option_name);
|
3041 |
+
$psp_posttype_metabox_hidden = isset($psp_posttype_option_value['hide_metabox']) ? $psp_posttype_option_value['hide_metabox'] : '';
|
3042 |
+
if (!$psp_posttype_metabox_hidden || is_super_admin()) {
|
3043 |
+
add_meta_box( 'postpsp', esc_html__( 'Techblissonline Platinum SEO and Social Meta Box', 'platinum-seo-pack' ), array( &$this, 'psp_do_seo_metabox' ), $cust_post_type, 'normal', 'high' );
|
3044 |
+
}
|
3045 |
+
}
|
3046 |
+
|
3047 |
+
}
|
3048 |
+
|
3049 |
+
//add extra slash
|
3050 |
+
public function psp_slash( $data, $postarr ) {
|
3051 |
+
wp_slash($postarr);
|
3052 |
+
return $data;
|
3053 |
+
}
|
3054 |
+
|
3055 |
+
//add metabox to post types
|
3056 |
+
function psp_do_seo_metabox() { //check for existing featured ID
|
3057 |
+
|
3058 |
+
global $post;
|
3059 |
+
//$psp_posttype_metabox_hidden = false;
|
3060 |
+
$psp_settings_name = "psp_".$post->post_type."_settings";
|
3061 |
+
$psp_p_settings = get_option($psp_settings_name);
|
3062 |
+
|
3063 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
3064 |
+
$psp_posttype_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
3065 |
+
|
3066 |
+
$psp_pre_settings = get_option('psp_pre_setting');
|
3067 |
+
$psp_premium_valid = isset($psp_pre_settings['premium']) && !empty($psp_pre_settings['premium']) ? $psp_pre_settings['premium'] : '';
|
3068 |
+
$psp_premium_status = isset($psp_pre_settings['psp_premium_license_key_status']) ? $psp_pre_settings['psp_premium_license_key_status'] : '';
|
3069 |
+
|
3070 |
+
//$psp_premium_valid = 1;
|
3071 |
+
//$psp_premium_status = 0;
|
3072 |
+
wp_nonce_field( 'do_psp_seo_meta_box', 'psp_seo_meta_box_nonce' );
|
3073 |
+
//$psp_post_meta = get_post_meta($post->ID, '_psp_post_seo_meta', true);
|
3074 |
+
|
3075 |
+
$psp_post_meta = array();
|
3076 |
+
$psp_social_meta = array();
|
3077 |
+
$wp_post_meta_data_arr = get_post_meta($post->ID);
|
3078 |
+
/**********
|
3079 |
+
foreach ($wp_post_meta_data_arr as $key => $value) {
|
3080 |
+
|
3081 |
+
$wp_post_meta_data[$key] = $value[0];
|
3082 |
+
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
$psp_post_meta['title'] = $wp_post_meta_data['_techblissonline_psp_title'];
|
3086 |
+
$psp_post_meta['description'] = $wp_post_meta_data['_techblissonline_psp_description'];
|
3087 |
+
$psp_post_meta['keywords'] = $wp_post_meta_data['_techblissonline_psp_keywords'];
|
3088 |
+
$psp_post_meta['robots'] = $wp_post_meta_data['_techblissonline_psp_robots_meta'];
|
3089 |
+
$psp_post_meta['canonical_url'] = $wp_post_meta_data['_techblissonline_psp_canonical_url'];
|
3090 |
+
$psp_post_meta['noarchive'] = $wp_post_meta_data['_techblissonline_psp_noarchive'];
|
3091 |
+
$psp_post_meta['nosnippet'] = $wp_post_meta_data['_techblissonline_psp_nosnippet'];
|
3092 |
+
$psp_post_meta['noimageindex'] = $wp_post_meta_data['_techblissonline_psp_noimageidx'];
|
3093 |
+
$psp_post_meta['redirect_to_url'] = $wp_post_meta_data['_techblissonline_psp_redirect_to_url'];
|
3094 |
+
$psp_post_meta['redirect_status_code'] = $wp_post_meta_data['_techblissonline_psp_redirect_status_code'];
|
3095 |
+
|
3096 |
+
$psp_post_disablers = unserialize($wp_post_meta_data['_techblissonline_psp_disable_flags']);
|
3097 |
+
*************/
|
3098 |
+
$psp_post_meta['title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_title'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_title'][0]) : '';
|
3099 |
+
if (empty($psp_post_meta['title'])) {
|
3100 |
+
$psp_old_title = !empty($wp_post_meta_data_arr['title'][0]) ? esc_attr($wp_post_meta_data_arr['title'][0]) : '';
|
3101 |
+
$psp_post_meta['title'] = $psp_old_title;
|
3102 |
+
}
|
3103 |
+
if (empty($psp_post_meta['title'])) {
|
3104 |
+
$yoast_title = !empty($wp_post_meta_data_arr['_yoast_wpseo_title'][0]) ? esc_attr($wp_post_meta_data_arr['_yoast_wpseo_title'][0]) : '';
|
3105 |
+
if (!empty($yoast_title)) {
|
3106 |
+
$yoast_title = preg_replace('/%%[^%]+%%/', '', $yoast_title);
|
3107 |
+
$psp_post_meta['title'] = !empty($yoast_title) ? esc_attr($yoast_title) : '';
|
3108 |
+
}
|
3109 |
+
}
|
3110 |
+
|
3111 |
+
$psp_post_meta['titleformat'] = isset($wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_titleformat'][0]) : $psp_p_settings['title'];
|
3112 |
+
|
3113 |
+
$psp_post_meta['description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_description'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_description'][0]) : '';
|
3114 |
+
if (empty($psp_post_meta['description'])) {
|
3115 |
+
$psp_old_desc = !empty($wp_post_meta_data_arr['description'][0]) ? esc_attr($wp_post_meta_data_arr['description'][0]) : '';
|
3116 |
+
$psp_post_meta['description'] = $psp_old_desc;
|
3117 |
+
}
|
3118 |
+
if (empty($psp_post_meta['description'])) {
|
3119 |
+
$yoast_desc = !empty($wp_post_meta_data_arr['_yoast_wpseo_metadesc'][0]) ? esc_attr($wp_post_meta_data_arr['_yoast_wpseo_metadesc'][0]) : '';
|
3120 |
+
//$psp_post_meta['description'] = $yoast_desc;
|
3121 |
+
if (!empty($yoast_desc)) {
|
3122 |
+
$yoast_desc = preg_replace('/%%[^%]+%%/', '', $yoast_desc);
|
3123 |
+
$psp_post_meta['description'] = !empty($yoast_desc) ? esc_attr($yoast_desc) : '';
|
3124 |
+
}
|
3125 |
+
}
|
3126 |
+
|
3127 |
+
$psp_post_meta['descformat'] = isset($wp_post_meta_data_arr['_techblissonline_psp_descformat'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_descformat'][0]) : '';
|
3128 |
+
$psp_post_meta['maxsnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_maxsnippet'][0]) : '';
|
3129 |
+
$psp_post_meta['keywords'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_keywords'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_keywords'][0]) : '';
|
3130 |
+
if (!empty($psp_p_settings['robots'])) {
|
3131 |
+
$psp_posttype_noindex = 'on';
|
3132 |
+
$psp_posttype_nofollow = '';
|
3133 |
+
} else {
|
3134 |
+
//$psp_posttype_noindex = '';
|
3135 |
+
//$psp_posttype_nofollow = '';
|
3136 |
+
|
3137 |
+
if (isset($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0])) {
|
3138 |
+
$psp_posttype_noindex = !empty($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) : '';
|
3139 |
+
$psp_posttype_nofollow = !empty($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) : '';
|
3140 |
+
} else {
|
3141 |
+
$psp_old_robots_meta = !empty($wp_post_meta_data_arr['robotsmeta'][0]) ? esc_attr($wp_post_meta_data_arr['robotsmeta'][0]) : '';
|
3142 |
+
|
3143 |
+
if (!empty($psp_old_robots_meta)) {
|
3144 |
+
if ($psp_old_robots_meta == "index,follow") {
|
3145 |
+
$psp_posttype_noindex = '';
|
3146 |
+
$psp_posttype_nofollow = '';
|
3147 |
+
}
|
3148 |
+
if ($psp_old_robots_meta == "index,nofollow") {
|
3149 |
+
$psp_posttype_noindex = '';
|
3150 |
+
$psp_posttype_nofollow = 'on';
|
3151 |
+
}
|
3152 |
+
if ($psp_old_robots_meta == "noindex,follow") {
|
3153 |
+
$psp_posttype_noindex = 'on';
|
3154 |
+
$psp_posttype_nofollow = '';
|
3155 |
+
}
|
3156 |
+
if ($psp_old_robots_meta == "noindex,nofollow") {
|
3157 |
+
$psp_posttype_noindex = 'on';
|
3158 |
+
$psp_posttype_nofollow = 'on';
|
3159 |
+
}
|
3160 |
+
} else {
|
3161 |
+
//$psp_posttype_noindex = '';
|
3162 |
+
//$psp_posttype_nofollow = '';
|
3163 |
+
$yoast_noindex_meta = !empty($wp_post_meta_data_arr['_yoast_wpseo_meta-robots-noindex'][0]) ? esc_attr($wp_post_meta_data_arr['_yoast_wpseo_meta-robots-noindex'][0]) : '';
|
3164 |
+
|
3165 |
+
if (!empty($yoast_noindex_meta)) {
|
3166 |
+
if ($yoast_noindex_meta == 1) {
|
3167 |
+
$psp_posttype_noindex = 'on';
|
3168 |
+
} else {
|
3169 |
+
$psp_posttype_noindex = '';
|
3170 |
+
}
|
3171 |
+
} else {
|
3172 |
+
$psp_posttype_noindex = '';
|
3173 |
+
}
|
3174 |
+
|
3175 |
+
$yoast_nofollow_meta = !empty($wp_post_meta_data_arr['_yoast_wpseo_meta-robots-nofollow'][0]) ? esc_attr($wp_post_meta_data_arr['_yoast_wpseo_meta-robots-nofollow'][0]) : '';
|
3176 |
+
|
3177 |
+
if (!empty($yoast_nofollow_meta)) {
|
3178 |
+
$psp_posttype_nofollow = 'on';
|
3179 |
+
} else {
|
3180 |
+
$psp_posttype_nofollow = '';
|
3181 |
+
}
|
3182 |
+
}
|
3183 |
+
}
|
3184 |
+
}
|
3185 |
+
$psp_post_meta['robots'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_robots_meta'][0]) : '';
|
3186 |
+
//$psp_post_meta['noindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) : esc_attr($psp_posttype_noindex);
|
3187 |
+
//$psp_post_meta['nofollow'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) : esc_attr($psp_posttype_nofollow);
|
3188 |
+
|
3189 |
+
$psp_post_meta['noindex'] = isset($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? (!empty($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_noindex'][0]) : '') : esc_attr($psp_posttype_noindex);
|
3190 |
+
$psp_post_meta['nofollow'] = isset($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? (!empty($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_nofollow'][0]) : '') : esc_attr($psp_posttype_nofollow);
|
3191 |
+
|
3192 |
+
$psp_post_meta['nositemap'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_nositemap'][0]) : '';
|
3193 |
+
$psp_post_meta['canonical_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_canonical_url'][0]) : '';
|
3194 |
+
//$psp_post_meta['schema_string'] = isset($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) : '';
|
3195 |
+
//$psp_post_meta['schema_string'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) ? html_entity_decode(stripcslashes(esc_attr($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]))) : '';
|
3196 |
+
$json_schema_string = !empty($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]) ? html_entity_decode(stripcslashes(esc_attr($wp_post_meta_data_arr['_techblissonline_psp_schema_string'][0]))) : '';
|
3197 |
+
//validate it is a json object
|
3198 |
+
$schema_obj = json_decode($json_schema_string);
|
3199 |
+
if($schema_obj === null) {
|
3200 |
+
$json_schema_string = 'Invalid JSON Schema';
|
3201 |
+
}
|
3202 |
+
$psp_post_meta['schema_string'] = $json_schema_string;
|
3203 |
+
|
3204 |
+
$psp_post_meta['noarchive'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_noarchive'][0]) : '';
|
3205 |
+
$psp_post_meta['nosnippet'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_nosnippet'][0]) : '';
|
3206 |
+
$psp_post_meta['noimageindex'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_noimageidx'][0]) : '';
|
3207 |
+
$psp_post_meta['maxvideo'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_maxvideo'][0]) : '';
|
3208 |
+
$psp_post_meta['maximage'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_maximage'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_maximage'][0]) : '';
|
3209 |
+
$psp_post_meta['redirect_to_url'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_redirect_to_url'][0]) : '';
|
3210 |
+
$psp_post_meta['redirect_status_code'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_redirect_status_code'][0]) : '';
|
3211 |
+
$psp_post_meta['preferred_tax'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_preferred_taxonomy'][0]) : '';
|
3212 |
+
|
3213 |
+
$psp_post_disablers = !empty($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_disable_flags'][0]) : array();
|
3214 |
+
//$psp_social_meta = unserialize($wp_post_meta_data_arr['_techblissonline_psp_social_data'][0]);
|
3215 |
+
|
3216 |
+
//$psp_post_social_enablers = unserialize($wp_post_meta_data_arr['_techblissonline_psp_social_enabled'][0]);
|
3217 |
+
|
3218 |
+
$psp_social_meta['fb_og_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_fb_og_type'][0]) : '';
|
3219 |
+
$psp_social_meta['fb_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_fb_title'][0]) : '';
|
3220 |
+
$psp_social_meta['fb_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_fb_description'][0]) : '';
|
3221 |
+
$psp_social_meta['fb_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_fb_image'][0]) : '';
|
3222 |
+
//$psp_social_meta['fb_ogtype_properties'] = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) : '';
|
3223 |
+
$psp_post_fb_ogtype_properties = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_fb_ogtype_properties'][0]) : array();
|
3224 |
+
$psp_post_fb_ogtype_properties = array_map( 'esc_attr', $psp_post_fb_ogtype_properties );
|
3225 |
+
$psp_social_meta['fb_ogtype_properties'] = urldecode(http_build_query($psp_post_fb_ogtype_properties, '', "\r\n"));
|
3226 |
+
|
3227 |
+
//$psp_social_meta['fb_media_properties'] = isset($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) : '';
|
3228 |
+
$psp_post_fb_media_properties = !empty($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_fb_media_properties'][0]) : array();
|
3229 |
+
$psp_post_fb_media_properties = array_map( 'esc_attr', $psp_post_fb_media_properties );
|
3230 |
+
$psp_social_meta['fb_media_properties'] = urldecode(http_build_query($psp_post_fb_media_properties, '', "\r\n"));
|
3231 |
+
|
3232 |
+
$psp_social_meta['tw_card_type'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_card_type'][0]) : '';
|
3233 |
+
$psp_social_meta['tw_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_title'][0]) : '';
|
3234 |
+
$psp_social_meta['tw_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_description'][0]) : '';
|
3235 |
+
/**********
|
3236 |
+
$psp_social_meta['tw_image'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_image'][0];
|
3237 |
+
$psp_social_meta['tw_image_1'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_image_1'][0];
|
3238 |
+
$psp_social_meta['tw_image_2'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_image_2'][0];
|
3239 |
+
$psp_social_meta['tw_image_3'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_image_3'][0];
|
3240 |
+
*********/
|
3241 |
+
$psp_post_tw_data_images = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_images'][0]) : array();
|
3242 |
+
|
3243 |
+
$psp_social_meta['tw_creator'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0]) ? '@'.esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_creator'][0]) : '';
|
3244 |
+
$psp_social_meta['tw_imagealt'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_tw_imagealt'][0]) : '';
|
3245 |
+
$psp_social_meta['tw_player'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_tw_player'][0]) : '';
|
3246 |
+
$psp_social_meta['tw_player_stream'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_tw_player_stream'][0]) : '';
|
3247 |
+
$psp_social_meta['tw_player_width'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_player_width'][0]) : '';
|
3248 |
+
$psp_social_meta['tw_player_height'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_player_height'][0]) : '';
|
3249 |
+
|
3250 |
+
$psp_social_meta['tw_app_country'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_country'][0]) : '';
|
3251 |
+
$psp_social_meta['tw_app_name_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_iphone'][0]) : '';
|
3252 |
+
$psp_social_meta['tw_app_id_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_iphone'][0]) : '';
|
3253 |
+
$psp_social_meta['tw_app_url_iphone'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_iphone'][0]) : '';
|
3254 |
+
$psp_social_meta['tw_app_name_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_ipad'][0]) : '';
|
3255 |
+
$psp_social_meta['tw_app_id_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_ipad'][0]) : '';
|
3256 |
+
$psp_social_meta['tw_app_url_ipad'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_ipad'][0]) : '';
|
3257 |
+
$psp_social_meta['tw_app_name_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_name_googleplay'][0]) : '';
|
3258 |
+
$psp_social_meta['tw_app_id_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_tw_app_id_googleplay'][0]) : '';
|
3259 |
+
$psp_social_meta['tw_app_url_googleplay'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0]) ? esc_url($wp_post_meta_data_arr['_techblissonline_psp_tw_app_url_googleplay'][0]) : '';
|
3260 |
+
/*************
|
3261 |
+
$psp_social_meta['tw_label_1'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_label_1'][0];
|
3262 |
+
$psp_social_meta['tw_data_1'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_data_1'][0];
|
3263 |
+
$psp_social_meta['tw_label_2'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_label_2'][0];
|
3264 |
+
$psp_social_meta['tw_data_2'] = $wp_post_meta_data_arr['_techblissonline_psp_tw_data_2'][0];
|
3265 |
+
*********/
|
3266 |
+
$psp_post_social_tw_label_data = !empty($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) ? unserialize($wp_post_meta_data_arr['_techblissonline_psp_tw_label_data'][0]) : array();
|
3267 |
+
|
3268 |
+
$psp_social_meta['sc_title'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_sc_title'][0]) : '';
|
3269 |
+
$psp_social_meta['sc_description'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0]) ? esc_attr($wp_post_meta_data_arr['_techblissonline_psp_sc_description'][0]) : '';
|
3270 |
+
$psp_social_meta['sc_image'] = !empty($wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0]) ? esc_url_raw($wp_post_meta_data_arr['_techblissonline_psp_sc_image'][0]) : '';
|
3271 |
+
/******
|
3272 |
+
$psp_post_meta['disable_title'] = $psp_post_disablers['disable_title'];
|
3273 |
+
$psp_post_meta['disable_description'] = $psp_post_disablers['disable_description'];;
|
3274 |
+
$psp_post_meta['disable_keywords'] = $psp_post_disablers['disable_keywords'];;
|
3275 |
+
$psp_post_meta['disable_canonical'] = $psp_post_disablers['disable_canonical'];;
|
3276 |
+
$psp_post_meta['disable_title_format'] = $psp_post_disablers['disable_title_format'];;
|
3277 |
+
$psp_post_meta['disable_desc_format'] = $psp_post_disablers['disable_desc_format'];;
|
3278 |
+
$psp_post_meta['disable_psp'] = $psp_post_disablers['disable_psp'];
|
3279 |
+
********/
|
3280 |
+
//$psp_post_meta = array_merge($psp_post_meta, $psp_post_disablers, $psp_social_meta);
|
3281 |
+
$psp_seo_meta = array_merge((array)$psp_post_meta, (array)$psp_post_disablers);
|
3282 |
+
$this->psp_post_meta_original = $psp_seo_meta;
|
3283 |
+
$psp_social_meta = array_merge((array)$psp_social_meta, (array)$psp_post_tw_data_images, (array)$psp_post_social_tw_label_data);
|
3284 |
+
//$psp_social_meta = array_merge($psp_social_meta, $psp_post_tw_data_images, $psp_post_social_tw_label_data, $psp_post_social_enablers);
|
3285 |
+
$this->psp_post_social_meta_original = $psp_social_meta;
|
3286 |
+
$psp_type = "posttype";
|
3287 |
+
|
3288 |
+
//Taxonomies for breadcrumb tags
|
3289 |
+
//$builtin_taxonomies = array("category", "tag", "post_format");
|
3290 |
+
$builtin_taxonomies = array("category", "post_tag");
|
3291 |
+
$custom_taxonomies = $this->custom_taxonomies;
|
3292 |
+
$psp_all_taxonomies = array_merge((array)$builtin_taxonomies, (array)$custom_taxonomies);
|
3293 |
+
$psp_taxonomies = array_combine($psp_all_taxonomies, $psp_all_taxonomies);
|
3294 |
+
$default = array( "" => "Select a Taxonomy" );
|
3295 |
+
$psp_bc_taxonomies = array_merge((array)$default, (array)$psp_taxonomies);
|
3296 |
+
//available tags array
|
3297 |
+
//$pspavailableTags = ['seo_title', 'wp_title', 'category', 'site_name', 'site_description'];
|
3298 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'site_description'];
|
3299 |
+
//available tags array
|
3300 |
+
//$pspavailableTagsDesc = ['seo_title', 'wp_title', 'category', 'site_name', 'seo_description', 'site_description'];
|
3301 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'taxonomy', 'site_name', 'seo_description', 'site_description'];
|
3302 |
+
|
3303 |
+
if ($post->post_type == 'page') {
|
3304 |
+
$pspavailableTags = ['sep', 'seo_title', 'wp_title', 'site_name', 'site_description'];
|
3305 |
+
//available tags array
|
3306 |
+
$pspavailableTagsDesc = ['sep', 'seo_title', 'wp_title', 'site_name', 'seo_description', 'site_description'];
|
3307 |
+
}
|
3308 |
+
|
3309 |
+
?>
|
3310 |
+
|
3311 |
+
<div id="psp-meta-box">
|
3312 |
+
<ul class="psp-metabox-tabs" id="psp-metabox-tabs">
|
3313 |
+
<li class="basic"><a href="#basic"><?php esc_html_e( 'Basic SEO', 'platinum-seo-pack' ); ?></a></li>
|
3314 |
+
<?php if (!$psp_posttype_metabox_advanced_hidden || is_super_admin()) { ?>
|
3315 |
+
<li class="advanced"><a href="#advanced"><?php esc_html_e( 'Advanced SEO', 'platinum-seo-pack' ); ?></a></li>
|
3316 |
+
<li class="social"><a href="#bsocial"><?php esc_html_e( 'Basic Social', 'platinum-seo-pack' ); ?></a></li>
|
3317 |
+
<li class="social"><a href="#asocial"><?php esc_html_e( 'Advanced Social', 'platinum-seo-pack' ); ?></a></li>
|
3318 |
+
<?php } ?>
|
3319 |
+
</ul>
|
3320 |
+
<br class="clear" />
|
3321 |
+
<div id="basic" class="psptab">
|
3322 |
+
<?php include_once( 'psp_basic_metabox_renderer.php' ); ?>
|
3323 |
+
</div>
|
3324 |
+
<?php
|
3325 |
+
if (!$psp_posttype_metabox_advanced_hidden || is_super_admin()) {
|
3326 |
+
// if ($psp_posttype_metabox_advanced_hidden ) {
|
3327 |
+
?>
|
3328 |
+
<div id="advanced" class="hidden psptab wrap">
|
3329 |
+
<?php include_once( 'psp_advanced_metabox_renderer.php' ); ?>
|
3330 |
+
</div>
|
3331 |
+
<div id="bsocial" class="psptab">
|
3332 |
+
<?php include_once( 'psp_basic_social_metabox_renderer.php' ); ?>
|
3333 |
+
</div>
|
3334 |
+
<div id="asocial" class="psptab container">
|
3335 |
+
<?php if ($psp_premium_valid && $psp_premium_status) {
|
3336 |
+
$metabox_template = apply_filters('psp_metabox_template', 'psp_premiumad_metabox_renderer.php');
|
3337 |
+
if (empty($metabox_template)) $metabox_template = 'psp_premiumad_metabox_renderer.php';
|
3338 |
+
include_once( $metabox_template );
|
3339 |
+
//include_once( 'psp_advanced_social_metabox_renderer.php' );
|
3340 |
+
} else {
|
3341 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
3342 |
+
wp_enqueue_style("psp-htmlsettings-css", plugins_url( '/css/psp-html-settings.css', __FILE__ ));
|
3343 |
+
include_once( 'psp_premiumad_metabox_renderer.php' );
|
3344 |
+
}
|
3345 |
+
?>
|
3346 |
+
</div>
|
3347 |
+
<?php
|
3348 |
+
}
|
3349 |
+
?>
|
3350 |
+
</div>
|
3351 |
+
<?php
|
3352 |
+
}
|
3353 |
+
|
3354 |
+
//Credits
|
3355 |
+
public static function add_credits()
|
3356 |
+
{
|
3357 |
+
if (is_home() || is_front_page()) {
|
3358 |
+
?>
|
3359 |
+
<small><a href="https://techblissonline.com/platinum-wordpress-seo-plugin/" target="_blank" rel="nofollow">Platinum WP SEO</a> by <a href="https://techblissonline.com/" target="_blank">Techblissonline.com</a></small>
|
3360 |
+
<?php
|
3361 |
+
}
|
3362 |
+
}
|
3363 |
+
|
3364 |
+
/**
|
3365 |
+
* When the post is saved, saves Techblissonline psp seo data and social data.
|
3366 |
+
*
|
3367 |
+
* @param int $post_id The ID of the post being saved.
|
3368 |
+
*/
|
3369 |
+
function psp_save_seo_meta_box_data( $post_id ) {
|
3370 |
+
|
3371 |
+
$psp_post_seo_data_original = array();
|
3372 |
+
$psp_post_social_data_original = array();
|
3373 |
+
$psp_schema = array();
|
3374 |
+
$psp_allowed_protocols = array('http','https', 'feed');
|
3375 |
+
|
3376 |
+
/*
|
3377 |
+
* We need to verify this came from our screen and with proper authorization,
|
3378 |
+
* because the save_post action can be triggered at other times.
|
3379 |
+
*/
|
3380 |
+
|
3381 |
+
// Check if our nonce is set and is valid.
|
3382 |
+
if ( ! isset( $_POST['psp_seo_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key($_POST['psp_seo_meta_box_nonce']), 'do_psp_seo_meta_box' )) {
|
3383 |
+
return;
|
3384 |
+
}
|
3385 |
+
|
3386 |
+
// If this is an autosave, our form has not been submitted, so we don't want to do anything.
|
3387 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
3388 |
+
return;
|
3389 |
+
}
|
3390 |
+
|
3391 |
+
// Check the user's permissions.
|
3392 |
+
if ( isset( $_POST['post_type'] ) && 'page' == sanitize_key($_POST['post_type'])) {
|
3393 |
+
|
3394 |
+
if ( ! current_user_can( 'edit_page', $post_id ) ) {
|
3395 |
+
return;
|
3396 |
+
}
|
3397 |
+
|
3398 |
+
} else {
|
3399 |
+
|
3400 |
+
if ( ! current_user_can( 'edit_post', $post_id ) ) {
|
3401 |
+
return;
|
3402 |
+
}
|
3403 |
+
}
|
3404 |
+
|
3405 |
+
/* OK, it's safe for us to save the data now. */
|
3406 |
+
|
3407 |
+
// Make sure that it is set.
|
3408 |
+
if ( ! isset( $_POST['psp_seo_meta'] ) && ! isset( $_POST['psp_social_meta'] ) ) {
|
3409 |
+
return;
|
3410 |
+
} else {
|
3411 |
+
|
3412 |
+
$psp_settings = get_option('psp_sitewide_settings');
|
3413 |
+
$psp_metabox_advanced_hidden = isset($psp_settings['hide_metabox_advanced']) ? $psp_settings['hide_metabox_advanced'] : '';
|
3414 |
+
|
3415 |
+
if (is_super_admin()) $psp_metabox_advanced_hidden = false;
|
3416 |
+
|
3417 |
+
if (!empty($this->psp_post_meta_original)) {
|
3418 |
+
$psp_post_seo_data_original = $this->psp_post_meta_original;
|
3419 |
+
}
|
3420 |
+
|
3421 |
+
if(!empty($this->psp_post_social_meta_original)) {
|
3422 |
+
$psp_post_social_data_original = $this->psp_post_social_meta_original;
|
3423 |
+
}
|
3424 |
+
|
3425 |
+
$psp_post_seo_data_current = !empty($_POST['psp_seo_meta']) ? $this->psp_sanitze_seo_data($_POST['psp_seo_meta']) : array();
|
3426 |
+
|
3427 |
+
if(isset($psp_post_seo_data_original) && !empty($psp_post_seo_data_original)) {
|
3428 |
+
$psp_post_seo_data = array_merge((array)$psp_post_seo_data_original, (array)$psp_post_seo_data_current);
|
3429 |
+
} else {
|
3430 |
+
$psp_post_seo_data = $psp_post_seo_data_current;
|
3431 |
+
}
|
3432 |
+
|
3433 |
+
$psp_post_social_data_current = !empty($_POST['psp_social_meta']) ? $this->psp_sanitze_social_data($_POST['psp_social_meta']) : array();
|
3434 |
+
|
3435 |
+
if(isset($psp_post_social_data_original) && !empty($psp_post_social_data_original)) {
|
3436 |
+
$psp_post_social_data = array_merge((array)$psp_post_social_data_original, (array)$psp_post_social_data_current);
|
3437 |
+
} else {
|
3438 |
+
$psp_post_social_data = $psp_post_social_data_current;
|
3439 |
+
}
|
3440 |
+
}
|
3441 |
+
|
3442 |
+
if (isset($psp_post_seo_data) && !empty($psp_post_seo_data)) {
|
3443 |
+
// Sanitize SEO data.
|
3444 |
+
//$psp_post_seo_data = $this->psp_sanitze_seo_data( $psp_post_seo_data );
|
3445 |
+
}
|
3446 |
+
|
3447 |
+
//if advance metaboxes are hidden update only the basic
|
3448 |
+
//Update the meta fields as separate records in the database.
|
3449 |
+
if ($psp_metabox_advanced_hidden) {
|
3450 |
+
if (!empty($psp_post_seo_data['title'])) {
|
3451 |
+
update_post_meta( $post_id, '_techblissonline_psp_title', $psp_post_seo_data['title'] );
|
3452 |
+
} else {
|
3453 |
+
delete_post_meta( $post_id, '_techblissonline_psp_title');
|
3454 |
+
}
|
3455 |
+
|
3456 |
+
if (!empty($psp_post_seo_data['titleformat'])) {
|
3457 |
+
update_post_meta( $post_id, '_techblissonline_psp_titleformat', $psp_post_seo_data['titleformat'] );
|
3458 |
+
} else {
|
3459 |
+
//update_post_meta( $post_id, '_techblissonline_psp_titleformat', "");
|
3460 |
+
delete_post_meta( $post_id, '_techblissonline_psp_titleformat');
|
3461 |
+
}
|
3462 |
+
|
3463 |
+
if (!empty($psp_post_seo_data['description'])) {
|
3464 |
+
update_post_meta( $post_id, '_techblissonline_psp_description', $psp_post_seo_data['description'] );
|
3465 |
+
} else {
|
3466 |
+
delete_post_meta( $post_id, '_techblissonline_psp_description');
|
3467 |
+
}
|
3468 |
+
|
3469 |
+
if (!empty($psp_post_seo_data['descformat'])) {
|
3470 |
+
update_post_meta( $post_id, '_techblissonline_psp_descformat', $psp_post_seo_data['descformat'] );
|
3471 |
+
} else {
|
3472 |
+
//update_post_meta( $post_id, '_techblissonline_psp_descformat', "");
|
3473 |
+
delete_post_meta( $post_id, '_techblissonline_psp_descformat');
|
3474 |
+
}
|
3475 |
+
|
3476 |
+
if (!empty($psp_post_seo_data['maxsnippet'])) {
|
3477 |
+
update_post_meta( $post_id, '_techblissonline_psp_maxsnippet', $psp_post_seo_data['maxsnippet'] );
|
3478 |
+
} else {
|
3479 |
+
delete_post_meta( $post_id, '_techblissonline_psp_maxsnippet');
|
3480 |
+
}
|
3481 |
+
|
3482 |
+
if (!empty($psp_post_seo_data['keywords'])) {
|
3483 |
+
update_post_meta( $post_id, '_techblissonline_psp_keywords', $psp_post_seo_data['keywords'] );
|
3484 |
+
} else {
|
3485 |
+
delete_post_meta( $post_id, '_techblissonline_psp_keywords');
|
3486 |
+
}
|
3487 |
+
return;
|
3488 |
+
}
|
3489 |
+
//updation of basic meta complete
|
3490 |
+
// Sanitize social data.
|
3491 |
+
//$psp_post_social_meta_data = array();
|
3492 |
+
|
3493 |
+
/**********
|
3494 |
+
$psp_post_social_enablers = array();
|
3495 |
+
|
3496 |
+
if ( isset( $psp_post_social_data['psp_og_tags_enabled'] ) ) {
|
3497 |
+
$psp_post_social_enablers['psp_og_tags_enabled'] = $psp_post_social_data['psp_og_tags_enabled'] ;
|
3498 |
+
}
|
3499 |
+
|
3500 |
+
if ( isset( $psp_post_social_data['psp_twitter_card_enabled'] ) ) {
|
3501 |
+
$psp_post_social_enablers['psp_twitter_card_enabled'] = $psp_post_social_data['psp_twitter_card_enabled'] ;
|
3502 |
+
}
|
3503 |
+
|
3504 |
+
if ( isset( $psp_post_social_data['psp_schemaorg_markup_enabled'] ) ) {
|
3505 |
+
$psp_post_social_enablers['psp_schemaorg_markup_enabled'] = $psp_post_social_data['psp_schemaorg_markup_enabled'] ;
|
3506 |
+
}
|
3507 |
+
|
3508 |
+
|
3509 |
+
if (isset($psp_post_social_data) && !empty($psp_post_social_data)) {
|
3510 |
+
$psp_post_social_data = $this->psp_sanitze_social_data( $psp_post_social_data );
|
3511 |
+
}
|
3512 |
+
**********/
|
3513 |
+
|
3514 |
+
$psp_post_fb_ogtype_properties_temp_arr = array();
|
3515 |
+
$psp_post_fb_ogtype_properties = array();
|
3516 |
+
if ( !empty( $psp_post_social_data['fb_ogtype_properties'] ) ) {
|
3517 |
+
$psp_post_fb_ogtype_properties_temp_arr = explode("\r\n", $psp_post_social_data['fb_ogtype_properties']);
|
3518 |
+
foreach ($psp_post_fb_ogtype_properties_temp_arr as $psp_post_fb_ogtype_property) {
|
3519 |
+
|
3520 |
+
list($k, $v) = explode("=", $psp_post_fb_ogtype_property);
|
3521 |
+
|
3522 |
+
if( !empty($k) && !empty($v)) {
|
3523 |
+
$psp_post_fb_ogtype_properties[esc_attr($k)] = esc_attr(htmlentities($v));
|
3524 |
+
}
|
3525 |
+
|
3526 |
+
}
|
3527 |
+
}
|
3528 |
+
|
3529 |
+
//FB media properties - 6/8/2019
|
3530 |
+
$psp_post_fb_media_properties_temp_arr = array();
|
3531 |
+
$psp_post_fb_media_properties = array();
|
3532 |
+
if ( !empty( $psp_post_social_data['fb_media_properties'] ) ) {
|
3533 |
+
$psp_post_fb_media_properties_temp_arr = explode("\r\n", $psp_post_social_data['fb_media_properties']);
|
3534 |
+
foreach ($psp_post_fb_media_properties_temp_arr as $psp_post_fb_media_property) {
|
3535 |
+
|
3536 |
+
list($a, $b) = explode("=", $psp_post_fb_media_property);
|
3537 |
+
if( !empty($a) && !empty($b)) {
|
3538 |
+
$psp_post_fb_media_properties[esc_attr($a)] = esc_attr(htmlentities($b));
|
3539 |
+
}
|
3540 |
+
|
3541 |
+
}
|
3542 |
+
}
|
3543 |
+
|
3544 |
+
$psp_post_tw_data_images = array();
|
3545 |
+
|
3546 |
+
if ( !empty( $psp_post_social_data['tw_image'] ) ) {
|
3547 |
+
$psp_post_tw_data_images['tw_image'] = esc_url_raw($psp_post_social_data['tw_image']);
|
3548 |
+
}
|
3549 |
+
if ( !empty( $psp_post_social_data['tw_image_1'] ) ) {
|
3550 |
+
$psp_post_tw_data_images['tw_image_1'] = esc_url_raw($psp_post_social_data['tw_image_1']);
|
3551 |
+
}
|
3552 |
+
if ( !empty( $psp_post_social_data['tw_image_2'] ) ) {
|
3553 |
+
$psp_post_tw_data_images['tw_image_2'] = esc_url_raw($psp_post_social_data['tw_image_2']);
|
3554 |
+
}
|
3555 |
+
if ( !empty( $psp_post_social_data['tw_image_3'] ) ) {
|
3556 |
+
$psp_post_tw_data_images['tw_image_3'] = esc_url_raw($psp_post_social_data['tw_image_3']);
|
3557 |
+
}
|
3558 |
+
|
3559 |
+
$psp_post_social_tw_label_data = array();
|
3560 |
+
|
3561 |
+
if ( !empty( $psp_post_social_data['tw_label_1'] ) && !empty( $psp_post_social_data['tw_data_1'] )) {
|
3562 |
+
$psp_post_social_tw_label_data['tw_label_1'] = esc_attr($psp_post_social_data['tw_label_1']);
|
3563 |
+
$psp_post_social_tw_label_data['tw_data_1'] = esc_attr($psp_post_social_data['tw_data_1']);
|
3564 |
+
}
|
3565 |
+
if ( !empty( $psp_post_social_data['tw_label_2'] ) && !empty( $psp_post_social_data['tw_data_2'] )) {
|
3566 |
+
$psp_post_social_tw_label_data['tw_label_2'] = esc_attr($psp_post_social_data['tw_label_2']);
|
3567 |
+
$psp_post_social_tw_label_data['tw_data_2'] = esc_attr($psp_post_social_data['tw_data_2']);
|
3568 |
+
}
|
3569 |
+
|
3570 |
+
//Sanitize social data
|
3571 |
+
if (isset($psp_post_social_data) && !empty($psp_post_social_data)) {
|
3572 |
+
//$psp_post_social_data = $this->psp_sanitze_social_data( $psp_post_social_data );
|
3573 |
+
}
|
3574 |
+
|
3575 |
+
// Update the meta field in the database.
|
3576 |
+
//update_post_meta( $post_id, '_psp_post_seo_meta', $psp_post_seo_data );
|
3577 |
+
|
3578 |
+
//Update the meta fields as separate records in the database.
|
3579 |
+
if (!empty($psp_post_seo_data['title'])) {
|
3580 |
+
update_post_meta( $post_id, '_techblissonline_psp_title', $psp_post_seo_data['title'] );
|
3581 |
+
} else {
|
3582 |
+
delete_post_meta( $post_id, '_techblissonline_psp_title');
|
3583 |
+
}
|
3584 |
+
|
3585 |
+
if (!empty($psp_post_seo_data['titleformat'])) {
|
3586 |
+
update_post_meta( $post_id, '_techblissonline_psp_titleformat', $psp_post_seo_data['titleformat'] );
|
3587 |
+
} else {
|
3588 |
+
//update_post_meta( $post_id, '_techblissonline_psp_titleformat', "");
|
3589 |
+
delete_post_meta( $post_id, '_techblissonline_psp_titleformat');
|
3590 |
+
}
|
3591 |
+
|
3592 |
+
if (!empty($psp_post_seo_data['description'])) {
|
3593 |
+
update_post_meta( $post_id, '_techblissonline_psp_description', $psp_post_seo_data['description'] );
|
3594 |
+
} else {
|
3595 |
+
delete_post_meta( $post_id, '_techblissonline_psp_description');
|
3596 |
+
}
|
3597 |
+
|
3598 |
+
if (!empty($psp_post_seo_data['descformat'])) {
|
3599 |
+
update_post_meta( $post_id, '_techblissonline_psp_descformat', $psp_post_seo_data['descformat'] );
|
3600 |
+
} else {
|
3601 |
+
//update_post_meta( $post_id, '_techblissonline_psp_descformat', "");
|
3602 |
+
delete_post_meta( $post_id, '_techblissonline_psp_descformat');
|
3603 |
+
}
|
3604 |
+
|
3605 |
+
if (!empty($psp_post_seo_data['maxsnippet'])) {
|
3606 |
+
update_post_meta( $post_id, '_techblissonline_psp_maxsnippet', $psp_post_seo_data['maxsnippet'] );
|
3607 |
+
} else {
|
3608 |
+
delete_post_meta( $post_id, '_techblissonline_psp_maxsnippet');
|
3609 |
+
}
|
3610 |
+
|
3611 |
+
if (!empty($psp_post_seo_data['keywords'])) {
|
3612 |
+
update_post_meta( $post_id, '_techblissonline_psp_keywords', $psp_post_seo_data['keywords'] );
|
3613 |
+
} else {
|
3614 |
+
delete_post_meta( $post_id, '_techblissonline_psp_keywords');
|
3615 |
+
}
|
3616 |
+
|
3617 |
+
if (!empty($psp_post_seo_data['maxvideo'])) {
|
3618 |
+
update_post_meta( $post_id, '_techblissonline_psp_maxvideo', $psp_post_seo_data['maxvideo'] );
|
3619 |
+
} else {
|
3620 |
+
delete_post_meta( $post_id, '_techblissonline_psp_maxvideo');
|
3621 |
+
}
|
3622 |
+
|
3623 |
+
if (!empty($psp_post_seo_data['maximage'])) {
|
3624 |
+
update_post_meta( $post_id, '_techblissonline_psp_maximage', $psp_post_seo_data['maximage'] );
|
3625 |
+
} else {
|
3626 |
+
delete_post_meta( $post_id, '_techblissonline_psp_maximage');
|
3627 |
+
}
|
3628 |
+
|
3629 |
+
if (!empty($psp_post_seo_data['canonical_url'])) {
|
3630 |
+
update_post_meta( $post_id, '_techblissonline_psp_canonical_url', $psp_post_seo_data['canonical_url'] );
|
3631 |
+
} else {
|
3632 |
+
delete_post_meta( $post_id, '_techblissonline_psp_canonical_url');
|
3633 |
+
}
|
3634 |
+
|
3635 |
+
if (!empty($psp_post_seo_data['schema_string'])) {
|
3636 |
+
update_post_meta( $post_id, '_techblissonline_psp_schema_string', $psp_post_seo_data['schema_string'] );
|
3637 |
+
} else {
|
3638 |
+
delete_post_meta( $post_id, '_techblissonline_psp_schema_string');
|
3639 |
+
}
|
3640 |
+
|
3641 |
+
if (!empty($psp_post_seo_data['robots'])) {
|
3642 |
+
update_post_meta( $post_id, '_techblissonline_psp_robots_meta', $psp_post_seo_data['robots'] );
|
3643 |
+
} else {
|
3644 |
+
delete_post_meta( $post_id, '_techblissonline_psp_robots_meta');
|
3645 |
+
}
|
3646 |
+
|
3647 |
+
if (!empty($psp_post_seo_data['noindex'])) {
|
3648 |
+
update_post_meta( $post_id, '_techblissonline_psp_noindex', $psp_post_seo_data['noindex'] );
|
3649 |
+
} else {
|
3650 |
+
//delete_post_meta( $post_id, '_techblissonline_psp_noindex');
|
3651 |
+
update_post_meta( $post_id, '_techblissonline_psp_noindex', 0 );
|
3652 |
+
}
|
3653 |
+
if (!empty($psp_post_seo_data['nofollow'])) {
|
3654 |
+
update_post_meta( $post_id, '_techblissonline_psp_nofollow', $psp_post_seo_data['nofollow'] );
|
3655 |
+
} else {
|
3656 |
+
//delete_post_meta( $post_id, '_techblissonline_psp_nofollow');
|
3657 |
+
update_post_meta( $post_id, '_techblissonline_psp_nofollow', 0 );
|
3658 |
+
}
|
3659 |
+
|
3660 |
+
if (!empty($psp_post_seo_data['nositemap'])) {
|
3661 |
+
update_post_meta( $post_id, '_techblissonline_psp_nositemap', $psp_post_seo_data['nositemap'] );
|
3662 |
+
} else {
|
3663 |
+
delete_post_meta( $post_id, '_techblissonline_psp_nositemap');
|
3664 |
+
}
|
3665 |
+
|
3666 |
+
if (!empty($psp_post_seo_data['noarchive'])) {
|
3667 |
+
update_post_meta( $post_id, '_techblissonline_psp_noarchive', $psp_post_seo_data['noarchive'] );
|
3668 |
+
} else {
|
3669 |
+
delete_post_meta( $post_id, '_techblissonline_psp_noarchive');
|
3670 |
+
}
|
3671 |
+
|
3672 |
+
if (!empty($psp_post_seo_data['nosnippet'])) {
|
3673 |
+
update_post_meta( $post_id, '_techblissonline_psp_nosnippet', $psp_post_seo_data['nosnippet'] );
|
3674 |
+
} else {
|
3675 |
+
delete_post_meta( $post_id, '_techblissonline_psp_nosnippet');
|
3676 |
+
}
|
3677 |
+
|
3678 |
+
if (!empty($psp_post_seo_data['noimageindex'])) {
|
3679 |
+
update_post_meta( $post_id, '_techblissonline_psp_noimageidx', $psp_post_seo_data['noimageindex'] );
|
3680 |
+
} else {
|
3681 |
+
delete_post_meta( $post_id, '_techblissonline_psp_noimageidx');
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
if (!empty($psp_post_seo_data['redirect_to_url'])) {
|
3685 |
+
update_post_meta( $post_id, '_techblissonline_psp_redirect_to_url', $psp_post_seo_data['redirect_to_url'] );
|
3686 |
+
} else {
|
3687 |
+
delete_post_meta( $post_id, '_techblissonline_psp_redirect_to_url');
|
3688 |
+
}
|
3689 |
+
|
3690 |
+
if (!empty($psp_post_seo_data['redirect_status_code'])) {
|
3691 |
+
update_post_meta( $post_id, '_techblissonline_psp_redirect_status_code', $psp_post_seo_data['redirect_status_code'] );
|
3692 |
+
} else {
|
3693 |
+
delete_post_meta( $post_id, '_techblissonline_psp_redirect_status_code');
|
3694 |
+
}
|
3695 |
+
|
3696 |
+
if (!empty($psp_post_seo_data['preferred_tax'])) {
|
3697 |
+
update_post_meta( $post_id, '_techblissonline_psp_preferred_taxonomy', $psp_post_seo_data['preferred_tax'] );
|
3698 |
+
} else {
|
3699 |
+
delete_post_meta( $post_id, '_techblissonline_psp_preferred_taxonomy');
|
3700 |
+
}
|
3701 |
+
|
3702 |
+
//update disable flags
|
3703 |
+
$psp_post_seo_data_disablers = array();
|
3704 |
+
|
3705 |
+
if (!empty($psp_post_seo_data['disable_title'])) $psp_post_seo_data_disablers['disable_title'] = $psp_post_seo_data['disable_title'];
|
3706 |
+
if (!empty($psp_post_seo_data['disable_description'])) $psp_post_seo_data_disablers['disable_description'] = $psp_post_seo_data['disable_description'];
|
3707 |
+
if (!empty($psp_post_seo_data['disable_keywords'])) $psp_post_seo_data_disablers['disable_keywords'] = $psp_post_seo_data['disable_keywords'];
|
3708 |
+
if (!empty($psp_post_seo_data['disable_canonical'])) $psp_post_seo_data_disablers['disable_canonical'] = $psp_post_seo_data['disable_canonical'];
|
3709 |
+
if (!empty($psp_post_seo_data['disable_title_format'])) $psp_post_seo_data_disablers['disable_title_format'] = $psp_post_seo_data['disable_title_format'];
|
3710 |
+
if (!empty($psp_post_seo_data['disable_desc_format'])) $psp_post_seo_data_disablers['disable_desc_format'] = $psp_post_seo_data['disable_desc_format'];
|
3711 |
+
if (!empty($psp_post_seo_data['disable_psp'])) $psp_post_seo_data_disablers['disable_psp'] = $psp_post_seo_data['disable_psp'];
|
3712 |
+
|
3713 |
+
if (isset($psp_post_seo_data_disablers) && !empty($psp_post_seo_data_disablers)) {
|
3714 |
+
update_post_meta( $post_id, '_techblissonline_psp_disable_flags', $psp_post_seo_data_disablers);
|
3715 |
+
} else {
|
3716 |
+
delete_post_meta( $post_id, '_techblissonline_psp_disable_flags');
|
3717 |
+
}
|
3718 |
+
//update social meta data
|
3719 |
+
|
3720 |
+
/*******
|
3721 |
+
$psp_post_social_data['fb_title'] = $psp_post_seo_data['fb_title'];
|
3722 |
+
$psp_post_social_data['fb_description'] = $psp_post_seo_data['fb_description'];;
|
3723 |
+
$psp_post_social_data['fb_image'] = $psp_post_seo_data['fb_image'];
|
3724 |
+
$psp_post_social_data['tw_title'] = $psp_post_seo_data['tw_title'];
|
3725 |
+
$psp_post_social_data['tw_description'] = $psp_post_seo_data['tw_description'];;
|
3726 |
+
$psp_post_social_data['tw_image'] = $psp_post_seo_data['tw_image'];
|
3727 |
+
$psp_post_social_data['sc_title'] = $psp_post_seo_data['sc_title'];
|
3728 |
+
$psp_post_social_data['sc_description'] = $psp_post_seo_data['sc_description'];;
|
3729 |
+
$psp_post_social_data['sc_image'] = $psp_post_seo_data['sc_image'];
|
3730 |
+
************/
|
3731 |
+
/*******
|
3732 |
+
if (!empty($psp_post_social_data)) {
|
3733 |
+
update_post_meta( $post_id, '_techblissonline_psp_social_data', $psp_post_social_data);
|
3734 |
+
}
|
3735 |
+
************/
|
3736 |
+
//update_post_meta( $post_id, '_techblissonline_psp_social_enabled', $psp_post_social_enablers);
|
3737 |
+
|
3738 |
+
if (!empty($psp_post_social_data['sc_title'])) {
|
3739 |
+
update_post_meta( $post_id, '_techblissonline_psp_sc_title', $psp_post_social_data['sc_title'] );
|
3740 |
+
} else {
|
3741 |
+
delete_post_meta( $post_id, '_techblissonline_psp_sc_title');
|
3742 |
+
}
|
3743 |
+
|
3744 |
+
if (!empty($psp_post_social_data['sc_description'])) {
|
3745 |
+
update_post_meta( $post_id, '_techblissonline_psp_sc_description', $psp_post_social_data['sc_description'] );
|
3746 |
+
} else {
|
3747 |
+
delete_post_meta( $post_id, '_techblissonline_psp_sc_description');
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
if (!empty($psp_post_social_data['sc_image'])) {
|
3751 |
+
update_post_meta( $post_id, '_techblissonline_psp_sc_image', $psp_post_social_data['sc_image'] );
|
3752 |
+
} else {
|
3753 |
+
delete_post_meta( $post_id, '_techblissonline_psp_sc_image');
|
3754 |
+
}
|
3755 |
+
|
3756 |
+
if (!empty($psp_post_social_data['tw_card_type'])) {
|
3757 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_card_type', $psp_post_social_data['tw_card_type'] );
|
3758 |
+
} else {
|
3759 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_card_type');
|
3760 |
+
}
|
3761 |
+
|
3762 |
+
if (!empty($psp_post_social_data['tw_title'])) {
|
3763 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_title', $psp_post_social_data['tw_title'] );
|
3764 |
+
} else {
|
3765 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_title');
|
3766 |
+
}
|
3767 |
+
|
3768 |
+
if (!empty($psp_post_social_data['tw_description'])) {
|
3769 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_description', $psp_post_social_data['tw_description'] );
|
3770 |
+
} else {
|
3771 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_description');
|
3772 |
+
}
|
3773 |
+
|
3774 |
+
/***********
|
3775 |
+
if (!empty($psp_post_social_data['tw_image'])) update_post_meta( $post_id, '_techblissonline_psp_tw_image', $psp_post_social_data['tw_image'] );
|
3776 |
+
if (!empty($psp_post_social_data['tw_image_1'])) update_post_meta( $post_id, '_techblissonline_psp_tw_image_1', $psp_post_social_data['tw_image_1'] );
|
3777 |
+
if (!empty($psp_post_social_data['tw_image_2'])) update_post_meta( $post_id, '_techblissonline_psp_tw_image_2', $psp_post_social_data['tw_image_2'] );
|
3778 |
+
if (!empty($psp_post_social_data['tw_image_3'])) update_post_meta( $post_id, '_techblissonline_psp_tw_image_3', $psp_post_social_data['tw_image_3'] );
|
3779 |
+
************/
|
3780 |
+
|
3781 |
+
if (!empty($psp_post_tw_data_images)) {
|
3782 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_images', $psp_post_tw_data_images);
|
3783 |
+
} else {
|
3784 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_images');
|
3785 |
+
}
|
3786 |
+
/************
|
3787 |
+
if (!empty($psp_post_social_data['tw_label_1'])) update_post_meta( $post_id, '_techblissonline_psp_tw_label_1', $psp_post_social_data['tw_label_1'] );
|
3788 |
+
if (!empty($psp_post_social_data['tw_data_1'])) update_post_meta( $post_id, '_techblissonline_psp_tw_data_1', $psp_post_social_data['tw_data_1'] );
|
3789 |
+
if (!empty($psp_post_social_data['tw_label_2'])) update_post_meta( $post_id, '_techblissonline_psp_tw_label_2', $psp_post_social_data['tw_label_2'] );
|
3790 |
+
if (!empty($psp_post_social_data['tw_data_2'])) update_post_meta( $post_id, '_techblissonline_psp_tw_data_2', $psp_post_social_data['tw_data_2'] );
|
3791 |
+
**********/
|
3792 |
+
|
3793 |
+
if (!empty($psp_post_social_tw_label_data)) {
|
3794 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_label_data', $psp_post_social_tw_label_data);
|
3795 |
+
} else {
|
3796 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_label_data');
|
3797 |
+
}
|
3798 |
+
|
3799 |
+
if (!empty($psp_post_social_data['tw_creator'])) {
|
3800 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_creator', $psp_post_social_data['tw_creator'] );
|
3801 |
+
} else {
|
3802 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_creator');
|
3803 |
+
}
|
3804 |
+
|
3805 |
+
if (!empty($psp_post_social_data['tw_imagealt'])) {
|
3806 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_imagealt', $psp_post_social_data['tw_imagealt'] );
|
3807 |
+
} else {
|
3808 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_imagealt');
|
3809 |
+
}
|
3810 |
+
|
3811 |
+
if (!empty($psp_post_social_data['tw_player'])) {
|
3812 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_player', $psp_post_social_data['tw_player'] );
|
3813 |
+
} else {
|
3814 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_player');
|
3815 |
+
}
|
3816 |
+
|
3817 |
+
if (!empty($psp_post_social_data['tw_player_stream'])) {
|
3818 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_player_stream', $psp_post_social_data['tw_player_stream'] );
|
3819 |
+
} else {
|
3820 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_player_stream');
|
3821 |
+
}
|
3822 |
+
|
3823 |
+
if (!empty($psp_post_social_data['tw_player_width'])) {
|
3824 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_player_width', $psp_post_social_data['tw_player_width']);
|
3825 |
+
} else {
|
3826 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_player_width');
|
3827 |
+
}
|
3828 |
+
|
3829 |
+
if (!empty($psp_post_social_data['tw_player_height'])) {
|
3830 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_player_height', $psp_post_social_data['tw_player_height']);
|
3831 |
+
} else {
|
3832 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_player_height');
|
3833 |
+
}
|
3834 |
+
|
3835 |
+
if (!empty($psp_post_social_data['tw_app_country'])) {
|
3836 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_country', $psp_post_social_data['tw_app_country']);
|
3837 |
+
} else {
|
3838 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_country');
|
3839 |
+
}
|
3840 |
+
|
3841 |
+
if (!empty($psp_post_social_data['tw_app_name_iphone'])) {
|
3842 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_name_iphone', $psp_post_social_data['tw_app_name_iphone']);
|
3843 |
+
} else {
|
3844 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_name_iphone');
|
3845 |
+
}
|
3846 |
+
|
3847 |
+
if (!empty($psp_post_social_data['tw_app_id_iphone'])) {
|
3848 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_id_iphone', $psp_post_social_data['tw_app_id_iphone']);
|
3849 |
+
} else {
|
3850 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_id_iphone');
|
3851 |
+
}
|
3852 |
+
|
3853 |
+
if (!empty($psp_post_social_data['tw_app_url_iphone'])) {
|
3854 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_url_iphone', $psp_post_social_data['tw_app_url_iphone']);
|
3855 |
+
} else {
|
3856 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_url_iphone');
|
3857 |
+
}
|
3858 |
+
|
3859 |
+
if (!empty($psp_post_social_data['tw_app_name_ipad'])) {
|
3860 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_name_ipad', $psp_post_social_data['tw_app_name_ipad']);
|
3861 |
+
} else {
|
3862 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_name_ipad');
|
3863 |
+
}
|
3864 |
+
if (!empty($psp_post_social_data['tw_app_id_ipad'])) {
|
3865 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_id_ipad', $psp_post_social_data['tw_app_id_ipad']);
|
3866 |
+
} else {
|
3867 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_id_ipad');
|
3868 |
+
}
|
3869 |
+
if (!empty($psp_post_social_data['tw_app_url_ipad'])) {
|
3870 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_url_ipad', $psp_post_social_data['tw_app_url_ipad']);
|
3871 |
+
} else {
|
3872 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_url_ipad');
|
3873 |
+
}
|
3874 |
+
|
3875 |
+
if (!empty($psp_post_social_data['tw_app_name_googleplay'])) {
|
3876 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_name_googleplay', $psp_post_social_data['tw_app_name_googleplay']);
|
3877 |
+
} else {
|
3878 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_name_googleplay');
|
3879 |
+
}
|
3880 |
+
if (!empty($psp_post_social_data['tw_app_id_googleplay'])) {
|
3881 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_id_googleplay', $psp_post_social_data['tw_app_id_googleplay']);
|
3882 |
+
} else {
|
3883 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_id_googleplay');
|
3884 |
+
}
|
3885 |
+
if (!empty($psp_post_social_data['tw_app_url_googleplay'])) {
|
3886 |
+
update_post_meta( $post_id, '_techblissonline_psp_tw_app_url_googleplay', $psp_post_social_data['tw_app_url_googleplay']);
|
3887 |
+
} else {
|
3888 |
+
delete_post_meta( $post_id, '_techblissonline_psp_tw_app_url_googleplay');
|
3889 |
+
}
|
3890 |
+
|
3891 |
+
if (!empty($psp_post_social_data['fb_og_type'])){
|
3892 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_og_type', $psp_post_social_data['fb_og_type'] );
|
3893 |
+
} else {
|
3894 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_og_type');
|
3895 |
+
}
|
3896 |
+
|
3897 |
+
if (!empty($psp_post_social_data['fb_title'])) {
|
3898 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_title', $psp_post_social_data['fb_title'] );
|
3899 |
+
} else {
|
3900 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_title');
|
3901 |
+
}
|
3902 |
+
|
3903 |
+
if (!empty($psp_post_social_data['fb_description'])) {
|
3904 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_description', $psp_post_social_data['fb_description'] );
|
3905 |
+
} else {
|
3906 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_description');
|
3907 |
+
}
|
3908 |
+
if (!empty($psp_post_social_data['fb_image'])) {
|
3909 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_image', $psp_post_social_data['fb_image'] );
|
3910 |
+
} else {
|
3911 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_image');
|
3912 |
+
}
|
3913 |
+
//if (isset($psp_post_social_data['fb_ogtype_properties'])) update_post_meta( $post_id, '_techblissonline_psp_fb_ogtype_properties', $psp_post_social_data['fb_ogtype_properties'] );
|
3914 |
+
if (!empty($psp_post_fb_ogtype_properties)) {
|
3915 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_ogtype_properties', $psp_post_fb_ogtype_properties );
|
3916 |
+
} else {
|
3917 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_ogtype_properties');
|
3918 |
+
}
|
3919 |
+
//if (isset($psp_post_social_data['fb_media_properties'])) update_post_meta( $post_id, '_techblissonline_psp_fb_media_properties', $psp_post_social_data['fb_media_properties'] );
|
3920 |
+
if (!empty($psp_post_fb_media_properties)) {
|
3921 |
+
update_post_meta( $post_id, '_techblissonline_psp_fb_media_properties', $psp_post_fb_media_properties );
|
3922 |
+
} else {
|
3923 |
+
delete_post_meta( $post_id, '_techblissonline_psp_fb_media_properties');
|
3924 |
+
}
|
3925 |
+
|
3926 |
+
//update google sitemap generator
|
3927 |
+
if (!empty($psp_post_seo_data['nositemap'])) {
|
3928 |
+
$this->psp_update_gsg("sm_b_exclude", $post_id, true );
|
3929 |
+
$psp_exclude = true;
|
3930 |
+
} else {
|
3931 |
+
$this->psp_update_gsg("sm_b_exclude", $post_id, false );
|
3932 |
+
$psp_exclude = false;
|
3933 |
+
}
|
3934 |
+
$psp_id = !empty($post_id) ? $post_id : '';
|
3935 |
+
//techblissonline_psp_update_sitemap - action hook to attach your function
|
3936 |
+
//$psp_id - Post ID or Term ID
|
3937 |
+
//$psp_exclude - Boolean indicating whether to exclude (true) or include (false) this post in the sitemap
|
3938 |
+
do_action( 'techblissonline_psp_update_sitemap', $psp_id, $psp_exclude );
|
3939 |
+
}
|
3940 |
+
|
3941 |
+
//update GoogleSitemapGenerator
|
3942 |
+
private function psp_update_gsg( $gsckey, $post_id, $exclude = false ) {
|
3943 |
+
$className = 'GoogleSitemapGenerator';
|
3944 |
+
if( is_plugin_active( 'google-sitemap-generator/sitemap.php' ) ) {
|
3945 |
+
|
3946 |
+
//if(class_exists($className)) {
|
3947 |
+
|
3948 |
+
if (empty($post_id) || empty($gsckey) ) {
|
3949 |
+
return;
|
3950 |
+
}
|
3951 |
+
$sm_options = get_option("sm_options");
|
3952 |
+
$sm_excludes = array();
|
3953 |
+
$excluded_post_ids = array();
|
3954 |
+
|
3955 |
+
//$gsckey = "b_exclude";
|
3956 |
+
if(!empty($sm_options) && array_key_exists($gsckey, $sm_options)) {
|
3957 |
+
$sm_excludes = (array) $sm_options[$gsckey];
|
3958 |
+
}
|
3959 |
+
|
3960 |
+
if (!empty($sm_excludes)) $excluded_post_ids = array_map('intval',$sm_excludes);
|
3961 |
+
|
3962 |
+
if($exclude) {
|
3963 |
+
if(empty($excluded_post_ids) || !in_array($post_id, $excluded_post_ids)) {
|
3964 |
+
//$excluded = array_push($excluded_post_ids, $post_id);
|
3965 |
+
$excluded_post_ids[] = $post_id;
|
3966 |
+
$sm_options[$gsckey] = $excluded_post_ids;
|
3967 |
+
update_option("sm_options", $sm_options);
|
3968 |
+
}
|
3969 |
+
} else {
|
3970 |
+
if(!empty($excluded_post_ids) && in_array($post_id, $excluded_post_ids)) {
|
3971 |
+
if (($id = array_search($post_id, $excluded_post_ids)) !== false) {
|
3972 |
+
unset($excluded_post_ids[$id]);
|
3973 |
+
}
|
3974 |
+
if(!empty($excluded_post_ids)) {
|
3975 |
+
$sm_options[$gsckey] = $excluded_post_ids;
|
3976 |
+
} else {
|
3977 |
+
//unset($sm_options[$gsckey]);
|
3978 |
+
$sm_options[$gsckey] = array();
|
3979 |
+
}
|
3980 |
+
update_option("sm_options", $sm_options);
|
3981 |
+
}
|
3982 |
+
}
|
3983 |
+
}
|
3984 |
+
}
|
3985 |
+
|
3986 |
+
//sanitize seo data
|
3987 |
+
protected function psp_sanitze_seo_data($psp_seo_data) {
|
3988 |
+
|
3989 |
+
$psp_allowed_protocols = array('http','https', 'feed');
|
3990 |
+
$psp_sanitized_seo_data = array();
|
3991 |
+
|
3992 |
+
// Sanitize SEO data.
|
3993 |
+
$psp_sanitized_seo_data['title'] = '';
|
3994 |
+
if ( isset( $psp_seo_data['title'] ) ) {
|
3995 |
+
$psp_sanitized_seo_data['title'] = sanitize_text_field( $psp_seo_data['title'] );
|
3996 |
+
}
|
3997 |
+
|
3998 |
+
$psp_sanitized_seo_data['titleformat'] = '';
|
3999 |
+
if ( isset( $psp_seo_data['titleformat'] ) ) {
|
4000 |
+
$psp_sanitized_seo_data['titleformat'] = sanitize_text_field( $psp_seo_data['titleformat'] );
|
4001 |
+
|
4002 |
+
$psp_title_format = explode(" ", $psp_sanitized_seo_data['titleformat']);
|
4003 |
+
$titleformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%site_name%','%site_description%');
|
4004 |
+
if(!empty($psp_title_format)) {
|
4005 |
+
if (count($psp_title_format) != count(array_intersect($psp_title_format, $titleformats))) {
|
4006 |
+
$psp_sanitized_seo_data['titleformat'] = '';
|
4007 |
+
}
|
4008 |
+
}
|
4009 |
+
}
|
4010 |
+
|
4011 |
+
$psp_sanitized_seo_data['description'] = '';
|
4012 |
+
if ( isset( $psp_seo_data['description'] ) ) {
|
4013 |
+
$psp_sanitized_seo_data['description'] = sanitize_textarea_field( $psp_seo_data['description'] );
|
4014 |
+
}
|
4015 |
+
|
4016 |
+
$psp_sanitized_seo_data['descformat'] = '';
|
4017 |
+
if ( isset( $psp_seo_data['descformat'] ) ) {
|
4018 |
+
$psp_sanitized_seo_data['descformat'] = sanitize_text_field( $psp_seo_data['descformat'] );
|
4019 |
+
|
4020 |
+
$psp_desc_format = explode(" ", $psp_sanitized_seo_data['descformat']);
|
4021 |
+
$descformats = array('%seo_title%', '%wp_title%', '%sep%','%taxonomy%', '%seo_description%', '%site_name%', '%site_description%');
|
4022 |
+
if(!empty($psp_desc_format)) {
|
4023 |
+
if (count($psp_desc_format) != count(array_intersect($psp_desc_format, $descformats))) {
|
4024 |
+
$psp_sanitized_seo_data['descformat'] = '';
|
4025 |
+
}
|
4026 |
+
}
|
4027 |
+
}
|
4028 |
+
|
4029 |
+
$psp_sanitized_seo_data['maxsnippet'] = '';
|
4030 |
+
if ( isset( $psp_seo_data['maxsnippet'] ) ) {
|
4031 |
+
$psp_sanitized_seo_data['maxsnippet'] = sanitize_text_field( $psp_seo_data['maxsnippet'] );
|
4032 |
+
if (!filter_var($psp_sanitized_seo_data['maxsnippet'], FILTER_VALIDATE_INT) && $psp_sanitized_seo_data['maxsnippet'] != 0 ) {
|
4033 |
+
$psp_sanitized_seo_data['maxsnippet'] = '';
|
4034 |
+
}
|
4035 |
+
if($psp_seo_data['maxsnippet'] == '0') $psp_sanitized_seo_data['maxsnippet'] = 'zero';
|
4036 |
+
}
|
4037 |
+
|
4038 |
+
$psp_sanitized_seo_data['keywords'] = '';
|
4039 |
+
if ( isset( $psp_seo_data['keywords'] ) ) {
|
4040 |
+
$psp_sanitized_seo_data['keywords'] = sanitize_text_field( $psp_seo_data['keywords'] );
|
4041 |
+
}
|
4042 |
+
|
4043 |
+
$psp_sanitized_seo_data['noindex'] = '';
|
4044 |
+
if ( isset( $psp_seo_data['noindex'] ) ) {
|
4045 |
+
$psp_sanitized_seo_data['noindex'] = !is_null(filter_var($psp_seo_data['noindex'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['noindex'] : '';
|
4046 |
+
}
|
4047 |
+
|
4048 |
+
$psp_sanitized_seo_data['nofollow'] = '';
|
4049 |
+
if ( isset( $psp_seo_data['nofollow'] ) ) {
|
4050 |
+
$psp_sanitized_seo_data['nofollow'] = !is_null(filter_var($psp_seo_data['nofollow'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['nofollow'] : '';
|
4051 |
+
}
|
4052 |
+
|
4053 |
+
$psp_sanitized_seo_data['noarchive'] = '';
|
4054 |
+
if ( isset( $psp_seo_data['noarchive'] ) ) {
|
4055 |
+
$psp_sanitized_seo_data['noarchive'] = !is_null(filter_var($psp_seo_data['noarchive'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['noarchive'] : '';
|
4056 |
+
}
|
4057 |
+
|
4058 |
+
$psp_sanitized_seo_data['nosnippet'] = '';
|
4059 |
+
if ( isset( $psp_seo_data['nosnippet'] ) ) {
|
4060 |
+
$psp_sanitized_seo_data['nosnippet'] = !is_null(filter_var($psp_seo_data['nosnippet'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['nosnippet'] : '';
|
4061 |
+
}
|
4062 |
+
|
4063 |
+
$psp_sanitized_seo_data['noimageindex'] = '';
|
4064 |
+
if ( isset( $psp_seo_data['noimageindex'] ) ) {
|
4065 |
+
$psp_sanitized_seo_data['noimageindex'] = !is_null(filter_var($psp_seo_data['noimageindex'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['noimageindex'] : '';
|
4066 |
+
}
|
4067 |
+
|
4068 |
+
$psp_sanitized_seo_data['maxvideo'] = '';
|
4069 |
+
if ( isset( $psp_seo_data['maxvideo'] ) ) {
|
4070 |
+
$psp_sanitized_seo_data['maxvideo'] = sanitize_text_field( $psp_seo_data['maxvideo'] );
|
4071 |
+
if (!filter_var($psp_sanitized_seo_data['maxvideo'], FILTER_VALIDATE_INT) && $psp_sanitized_seo_data['maxvideo'] != 0 ) {
|
4072 |
+
$psp_sanitized_seo_data['maxvideo'] = '';
|
4073 |
+
}
|
4074 |
+
if($psp_seo_data['maxvideo'] == '0') $psp_sanitized_seo_data['maxvideo'] = 'zero';
|
4075 |
+
}
|
4076 |
+
|
4077 |
+
$psp_sanitized_seo_data['maximage'] = '';
|
4078 |
+
if ( isset( $psp_seo_data['maximage'] ) ) {
|
4079 |
+
$psp_sanitized_seo_data['maximage'] = sanitize_text_field( $psp_seo_data['maximage'] );
|
4080 |
+
$maximgtypes = array('none', 'large', 'standard');
|
4081 |
+
if (!in_array($psp_sanitized_seo_data['maximage'], $maximgtypes)) {
|
4082 |
+
$psp_sanitized_seo_data['maximage'] = '';
|
4083 |
+
}
|
4084 |
+
}
|
4085 |
+
|
4086 |
+
$psp_sanitized_seo_data['canonical_url'] = '';
|
4087 |
+
if ( isset( $psp_seo_data['canonical_url'] ) ) {
|
4088 |
+
$psp_sanitized_seo_data['canonical_url'] = esc_url_raw( $psp_seo_data['canonical_url'], $psp_allowed_protocols );
|
4089 |
+
}
|
4090 |
+
|
4091 |
+
$psp_sanitized_seo_data['nositemap'] = '';
|
4092 |
+
if ( isset( $psp_seo_data['nositemap'] ) ) {
|
4093 |
+
$psp_sanitized_seo_data['nositemap'] = !is_null(filter_var($psp_seo_data['nositemap'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['nositemap'] : '';
|
4094 |
+
}
|
4095 |
+
|
4096 |
+
$psp_sanitized_seo_data['schema_string'] = '';
|
4097 |
+
if ( isset( $psp_seo_data['schema_string'] ) ) {
|
4098 |
+
//$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
|
4099 |
+
$json_schema_str = ($psp_seo_data['schema_string']);
|
4100 |
+
//error_log("Invalid JSON ".$json_schema_str);
|
4101 |
+
//validate it is a json object
|
4102 |
+
$schema_obj = json_decode(stripcslashes($json_schema_str));
|
4103 |
+
if($schema_obj === null) {
|
4104 |
+
// $schema_obj is null because the json cannot be decoded
|
4105 |
+
$psp_sanitized_seo_data['schema_string'] = 'Invalid JSON Schema';
|
4106 |
+
//$psp_seo_data['schema_string'] = sanitize_textarea_field( $psp_seo_data['schema_string'] );
|
4107 |
+
} else {
|
4108 |
+
$psp_sanitized_seo_data['schema_string'] = sanitize_textarea_field( htmlentities($psp_seo_data['schema_string']) );
|
4109 |
+
//$psp_seo_data['schema_string'] = 'acde';
|
4110 |
+
//$psp_seo_data['schema_string'] = json_encode($psp_seo_data['schema_string']);
|
4111 |
+
}
|
4112 |
+
}
|
4113 |
+
|
4114 |
+
$psp_sanitized_seo_data['redirect_to_url'] = '';
|
4115 |
+
if ( isset( $psp_seo_data['redirect_to_url'] ) ) {
|
4116 |
+
$psp_sanitized_seo_data['redirect_to_url'] = esc_url_raw( $psp_seo_data['redirect_to_url'], $psp_allowed_protocols );
|
4117 |
+
}
|
4118 |
+
|
4119 |
+
$psp_sanitized_seo_data['redirect_status_code'] = '';
|
4120 |
+
if ( isset( $psp_seo_data['redirect_status_code'] ) ) {
|
4121 |
+
$psp_sanitized_seo_data['redirect_status_code'] = sanitize_text_field( $psp_seo_data['redirect_status_code'] );
|
4122 |
+
$scodes = array('301', '302', '303', '307');
|
4123 |
+
if (!in_array($psp_sanitized_seo_data['redirect_status_code'], $scodes)) {
|
4124 |
+
$psp_sanitized_seo_data['redirect_status_code'] = '';
|
4125 |
+
}
|
4126 |
+
}
|
4127 |
+
|
4128 |
+
$psp_sanitized_seo_data['preferred_tax'] = '';
|
4129 |
+
if ( isset( $psp_seo_data['preferred_tax'] ) ) {
|
4130 |
+
$psp_sanitized_seo_data['preferred_tax'] = sanitize_text_field( $psp_seo_data['preferred_tax'] );
|
4131 |
+
|
4132 |
+
$builtin_tax = array("category", "post_tag");
|
4133 |
+
$custom_tax = array();
|
4134 |
+
$psp_all_tax = array();
|
4135 |
+
$custom_tax = $this->custom_taxonomies;
|
4136 |
+
$psp_all_tax = array_merge((array)$builtin_tax, (array)$custom_tax);
|
4137 |
+
if (!in_array($psp_sanitized_seo_data['preferred_tax'], $psp_all_tax)) {
|
4138 |
+
$psp_sanitized_seo_data['preferred_tax'] = '';
|
4139 |
+
}
|
4140 |
+
}
|
4141 |
+
|
4142 |
+
$psp_sanitized_seo_data['disable_title'] = '';
|
4143 |
+
if ( isset( $psp_seo_data['disable_title'] ) ) {
|
4144 |
+
$psp_sanitized_seo_data['disable_title'] = !is_null(filter_var($psp_seo_data['disable_title'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_title'] : '';
|
4145 |
+
}
|
4146 |
+
|
4147 |
+
$psp_sanitized_seo_data['disable_description'] = '';
|
4148 |
+
if ( isset( $psp_seo_data['disable_description'] ) ) {
|
4149 |
+
$psp_sanitized_seo_data['disable_description'] = !is_null(filter_var($psp_seo_data['disable_description'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_description'] : '';
|
4150 |
+
}
|
4151 |
+
|
4152 |
+
$psp_sanitized_seo_data['disable_keywords'] = '';
|
4153 |
+
if ( isset( $psp_seo_data['disable_keywords'] ) ) {
|
4154 |
+
$psp_sanitized_seo_data['disable_keywords'] = !is_null(filter_var($psp_seo_data['disable_keywords'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_keywords'] : '';
|
4155 |
+
}
|
4156 |
+
|
4157 |
+
$psp_sanitized_seo_data['disable_canonical'] = '';
|
4158 |
+
if ( isset( $psp_seo_data['disable_canonical'] ) ) {
|
4159 |
+
$psp_sanitized_seo_data['disable_canonical'] = !is_null(filter_var($psp_seo_data['disable_canonical'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_canonical'] : '';
|
4160 |
+
}
|
4161 |
+
|
4162 |
+
$psp_sanitized_seo_data['disable_title_format'] = '';
|
4163 |
+
if ( isset( $psp_seo_data['disable_title_format'] ) ) {
|
4164 |
+
$psp_sanitized_seo_data['disable_title_format'] = !is_null(filter_var($psp_seo_data['disable_title_format'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_title_format'] : '';
|
4165 |
+
}
|
4166 |
+
|
4167 |
+
$psp_sanitized_seo_data['disable_desc_format'] = '';
|
4168 |
+
if ( isset( $psp_seo_data['disable_desc_format'] ) ) {
|
4169 |
+
$psp_sanitized_seo_data['disable_desc_format'] = !is_null(filter_var($psp_seo_data['disable_desc_format'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_desc_format'] : '';
|
4170 |
+
}
|
4171 |
+
|
4172 |
+
$psp_sanitized_seo_data['disable_psp'] = '';
|
4173 |
+
if ( isset( $psp_seo_data['disable_psp'] ) ) {
|
4174 |
+
$psp_sanitized_seo_data['disable_psp'] = !is_null(filter_var($psp_seo_data['disable_psp'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $psp_seo_data['disable_psp'] : '';
|
4175 |
+
}
|
4176 |
+
|
4177 |
+
return $psp_sanitized_seo_data;
|
4178 |
+
|
4179 |
+
}
|
4180 |
+
|
4181 |
+
//sanitize social data
|
4182 |
+
protected function psp_sanitze_social_data($psp_social_data) {
|
4183 |
+
|
4184 |
+
$psp_allowed_protocols = array('http','https');
|
4185 |
+
$psp_sanitized_social_data = array();
|
4186 |
+
|
4187 |
+
$psp_sanitized_social_data['fb_title'] = '';
|
4188 |
+
if ( isset( $psp_social_data['fb_title'] ) ) {
|
4189 |
+
$psp_sanitized_social_data['fb_title'] = sanitize_text_field( $psp_social_data['fb_title'] );
|
4190 |
+
}
|
4191 |
+
|
4192 |
+
$psp_sanitized_social_data['fb_description'] = '';
|
4193 |
+
if ( isset( $psp_social_data['fb_description'] ) ) {
|
4194 |
+
$psp_sanitized_social_data['fb_description'] = sanitize_textarea_field( $psp_social_data['fb_description'] );
|
4195 |
+
}
|
4196 |
+
|
4197 |
+
$psp_sanitized_social_data['fb_image'] = '';
|
4198 |
+
if ( isset( $psp_social_data['fb_image'] ) ) {
|
4199 |
+
$psp_sanitized_social_data['fb_image'] = esc_url_raw( $psp_social_data['fb_image'], $psp_allowed_protocols );
|
4200 |
+
}
|
4201 |
+
|
4202 |
+
$psp_sanitized_social_data['fb_og_type'] = '';
|
4203 |
+
if ( isset( $psp_social_data['fb_og_type'] ) ) {
|
4204 |
+
$psp_sanitized_social_data['fb_og_type'] = sanitize_text_field($psp_social_data['fb_og_type']) ;
|
4205 |
+
|
4206 |
+
$fb_og_types = array ('website', 'article', 'books.author', 'books.book', 'books.genre', 'business.business', 'fitness.course', 'game.achievement', 'music.album', 'music.playlist', 'music.radio_station', 'music.song', 'place', 'product', 'product.group', 'product.item', 'profile', 'restaurant.menu', 'restaurant.menu_item', 'restaurant.menu_section', 'restaurant.restaurant', 'video.episode', 'video.movie', 'video.other', 'video.tv_show');
|
4207 |
+
|
4208 |
+
if (!in_array($psp_sanitized_social_data['fb_og_type'], $fb_og_types)) {
|
4209 |
+
$psp_sanitized_social_data['fb_og_type'] = '';
|
4210 |
+
}
|
4211 |
+
}
|
4212 |
+
|
4213 |
+
$psp_sanitized_social_data['fb_ogtype_properties'] = '';
|
4214 |
+
if ( isset( $psp_social_data['fb_ogtype_properties'] ) ) {
|
4215 |
+
$psp_sanitized_social_data['fb_ogtype_properties'] = sanitize_textarea_field( $psp_social_data['fb_ogtype_properties'] );
|
4216 |
+
}
|
4217 |
+
|
4218 |
+
$psp_sanitized_social_data['fb_media_properties'] = '';
|
4219 |
+
if ( isset( $psp_social_data['fb_media_properties'] ) ) {
|
4220 |
+
$psp_sanitized_social_data['fb_media_properties'] = sanitize_textarea_field( $psp_social_data['fb_media_properties'] );
|
4221 |
+
}
|
4222 |
+
|
4223 |
+
$psp_sanitized_social_data['tw_card_type'] = '';
|
4224 |
+
if ( isset( $psp_social_data['tw_card_type'] ) ) {
|
4225 |
+
$psp_sanitized_social_data['tw_card_type'] = sanitize_text_field($psp_social_data['tw_card_type']);
|
4226 |
+
|
4227 |
+
$tw_card_types = array ('summary', 'summary_large_image', 'player', 'app');
|
4228 |
+
|
4229 |
+
if (!in_array($psp_sanitized_social_data['tw_card_type'], $tw_card_types)) {
|
4230 |
+
$psp_sanitized_social_data['tw_card_type'] = '';
|
4231 |
+
}
|
4232 |
+
}
|
4233 |
+
|
4234 |
+
$psp_sanitized_social_data['tw_creator'] = '';
|
4235 |
+
if ( isset( $psp_social_data['tw_creator'] ) ) {
|
4236 |
+
$psp_sanitized_social_data['tw_creator'] = sanitize_text_field( $psp_social_data['tw_creator'] );
|
4237 |
+
$psp_sanitized_social_data['tw_creator'] = str_replace("@", "", $psp_sanitized_social_data['tw_creator']);
|
4238 |
+
}
|
4239 |
+
|
4240 |
+
$psp_sanitized_social_data['tw_title'] = '';
|
4241 |
+
if ( isset( $psp_social_data['tw_title'] ) ) {
|
4242 |
+
$psp_sanitized_social_data['tw_title'] = sanitize_text_field( $psp_social_data['tw_title'] );
|
4243 |
+
}
|
4244 |
+
|
4245 |
+
$psp_sanitized_social_data['tw_description'] = '';
|
4246 |
+
if ( isset( $psp_social_data['tw_description'] ) ) {
|
4247 |
+
$psp_sanitized_social_data['tw_description'] = sanitize_textarea_field( $psp_social_data['tw_description'] );
|
4248 |
+
}
|
4249 |
+
|
4250 |
+
$psp_sanitized_social_data['tw_image'] = '';
|
4251 |
+
if ( isset( $psp_social_data['tw_image'] ) ) {
|
4252 |
+
$psp_sanitized_social_data['tw_image'] = esc_url_raw( $psp_social_data['tw_image'], $psp_allowed_protocols );
|
4253 |
+
}
|
4254 |
+
|
4255 |
+
$psp_sanitized_social_data['tw_imagealt'] = '';
|
4256 |
+
if ( isset( $psp_social_data['tw_imagealt'] ) ) {
|
4257 |
+
$psp_sanitized_social_data['tw_imagealt'] = sanitize_textarea_field( $psp_social_data['tw_imagealt'] );
|
4258 |
+
}
|
4259 |
+
|
4260 |
+
$psp_sanitized_social_data['tw_image_1'] = '';
|
4261 |
+
if ( isset( $psp_social_data['tw_image_1'] ) ) {
|
4262 |
+
$psp_sanitized_social_data['tw_image_1'] = esc_url_raw( $psp_social_data['tw_image_1'], $psp_allowed_protocols );
|
4263 |
+
}
|
4264 |
+
|
4265 |
+
$psp_sanitized_social_data['tw_image_2'] = '';
|
4266 |
+
if ( isset( $psp_social_data['tw_image_2'] ) ) {
|
4267 |
+
$psp_sanitized_social_data['tw_image_2'] = esc_url_raw( $psp_social_data['tw_image_2'],$psp_allowed_protocols );
|
4268 |
+
}
|
4269 |
+
|
4270 |
+
$psp_sanitized_social_data['tw_image_3'] = '';
|
4271 |
+
if ( isset( $psp_social_data['tw_image_3'] ) ) {
|
4272 |
+
$psp_sanitized_social_data['tw_image_3'] = esc_url_raw( $psp_social_data['tw_image_3'], $psp_allowed_protocols );
|
4273 |
+
}
|
4274 |
+
|
4275 |
+
if ( isset( $psp_social_data['tw_label_1'] ) ) {
|
4276 |
+
$psp_sanitized_social_data['tw_label_1'] = sanitize_text_field( $psp_social_data['tw_label_1'] );
|
4277 |
+
}
|
4278 |
+
|
4279 |
+
if ( isset( $psp_social_data['tw_data_1'] ) ) {
|
4280 |
+
$psp_sanitized_social_data['tw_data_1'] = sanitize_text_field( $psp_social_data['tw_data_1'] );
|
4281 |
+
}
|
4282 |
+
|
4283 |
+
if ( isset( $psp_social_data['tw_label_2'] ) ) {
|
4284 |
+
$psp_sanitized_social_data['tw_label_2'] = sanitize_text_field( $psp_social_data['tw_label_2'] );
|
4285 |
+
}
|
4286 |
+
|
4287 |
+
if ( isset( $psp_social_data['tw_data_2'] ) ) {
|
4288 |
+
$psp_sanitized_social_data['tw_data_2'] = sanitize_text_field( $psp_social_data['tw_data_2'] );
|
4289 |
+
}
|
4290 |
+
|
4291 |
+
$psp_sanitized_social_data['tw_player'] = '';
|
4292 |
+
if ( isset( $psp_social_data['tw_player'] ) ) {
|
4293 |
+
$psp_sanitized_social_data['tw_player'] = esc_url_raw( $psp_social_data['tw_player'], $psp_allowed_protocols );
|
4294 |
+
}
|
4295 |
+
|
4296 |
+
$psp_sanitized_social_data['tw_player_width'] = '';
|
4297 |
+
if ( isset( $psp_social_data['tw_player_width'] ) ) {
|
4298 |
+
$psp_sanitized_social_data['tw_player_width'] = sanitize_text_field( $psp_social_data['tw_player_width'] );
|
4299 |
+
|
4300 |
+
if (!filter_var($psp_sanitized_social_data['tw_player_width'], FILTER_VALIDATE_INT)) {
|
4301 |
+
$psp_sanitized_social_data['tw_player_width'] = '';
|
4302 |
+
}
|
4303 |
+
}
|
4304 |
+
|
4305 |
+
$psp_sanitized_social_data['tw_player_height'] = '';
|
4306 |
+
if ( isset( $psp_social_data['tw_player_height'] ) ) {
|
4307 |
+
$psp_sanitized_social_data['tw_player_height'] = sanitize_text_field( $psp_social_data['tw_player_height'] );
|
4308 |
+
|
4309 |
+
if (!filter_var($psp_sanitized_social_data['tw_player_height'], FILTER_VALIDATE_INT)) {
|
4310 |
+
$psp_sanitized_social_data['tw_player_height'] = '';
|
4311 |
+
}
|
4312 |
+
}
|
4313 |
+
|
4314 |
+
$psp_sanitized_social_data['tw_player_stream'] = '';
|
4315 |
+
if ( isset( $psp_social_data['tw_player_stream'] ) ) {
|
4316 |
+
$psp_sanitized_social_data['tw_player_stream'] = esc_url_raw( $psp_social_data['tw_player_stream'], $psp_allowed_protocols );
|
4317 |
+
}
|
4318 |
+
|
4319 |
+
$psp_sanitized_social_data['tw_app_country'] = '';
|
4320 |
+
if ( isset( $psp_social_data['tw_app_country'] ) ) {
|
4321 |
+
$psp_sanitized_social_data['tw_app_country'] = sanitize_text_field( $psp_social_data['tw_app_country'] );
|
4322 |
+
}
|
4323 |
+
|
4324 |
+
$psp_sanitized_social_data['tw_app_name_iphone'] = '';
|
4325 |
+
if ( isset( $psp_social_data['tw_app_name_iphone'] ) ) {
|
4326 |
+
$psp_sanitized_social_data['tw_app_name_iphone'] = sanitize_text_field( $psp_social_data['tw_app_name_iphone'] );
|
4327 |
+
}
|
4328 |
+
|
4329 |
+
$psp_sanitized_social_data['tw_app_id_iphone'] = '';
|
4330 |
+
if ( isset( $psp_social_data['tw_app_id_iphone'] ) ) {
|
4331 |
+
$psp_sanitized_social_data['tw_app_id_iphone'] = sanitize_text_field( $psp_social_data['tw_app_id_iphone'] );
|
4332 |
+
}
|
4333 |
+
|
4334 |
+
$psp_sanitized_social_data['tw_app_url_iphone'] = '';
|
4335 |
+
if ( isset( $psp_social_data['tw_app_url_iphone'] ) ) {
|
4336 |
+
$psp_sanitized_social_data['tw_app_url_iphone'] = sanitize_text_field($psp_social_data['tw_app_url_iphone']) ;
|
4337 |
+
}
|
4338 |
+
|
4339 |
+
$psp_sanitized_social_data['tw_app_name_ipad'] = '';
|
4340 |
+
if ( isset( $psp_social_data['tw_app_name_ipad'] ) ) {
|
4341 |
+
$psp_sanitized_social_data['tw_app_name_ipad'] = sanitize_text_field( $psp_social_data['tw_app_name_ipad'] );
|
4342 |
+
}
|
4343 |
+
|
4344 |
+
$psp_sanitized_social_data['tw_app_id_ipad'] = '';
|
4345 |
+
if ( isset( $psp_social_data['tw_app_id_ipad'] ) ) {
|
4346 |
+
$psp_sanitized_social_data['tw_app_id_ipad'] = sanitize_text_field( $psp_social_data['tw_app_id_ipad'] );
|
4347 |
+
}
|
4348 |
+
|
4349 |
+
$psp_sanitized_social_data['tw_app_url_ipad'] = '';
|
4350 |
+
if ( isset( $psp_social_data['tw_app_url_ipad'] ) ) {
|
4351 |
+
$psp_sanitized_social_data['tw_app_url_ipad'] = sanitize_text_field($psp_social_data['tw_app_url_ipad']) ;
|
4352 |
+
}
|
4353 |
+
|
4354 |
+
$psp_sanitized_social_data['tw_app_name_googleplay'] = '';
|
4355 |
+
if ( isset( $psp_social_data['tw_app_name_googleplay'] ) ) {
|
4356 |
+
$psp_sanitized_social_data['tw_app_name_googleplay'] = sanitize_text_field( $psp_social_data['tw_app_name_googleplay'] );
|
4357 |
+
}
|
4358 |
+
|
4359 |
+
$psp_sanitized_social_data['tw_app_id_googleplay'] = '';
|
4360 |
+
if ( isset( $psp_social_data['tw_app_id_googleplay'] ) ) {
|
4361 |
+
$psp_sanitized_social_data['tw_app_id_googleplay'] = sanitize_text_field( $psp_social_data['tw_app_id_googleplay'] );
|
4362 |
+
}
|
4363 |
+
|
4364 |
+
$psp_sanitized_social_data['tw_app_url_googleplay'] = '';
|
4365 |
+
if ( isset( $psp_social_data['tw_app_url_googleplay'] ) ) {
|
4366 |
+
$psp_sanitized_social_data['tw_app_url_googleplay'] = esc_url_raw($psp_social_data['tw_app_url_googleplay']);
|
4367 |
+
}
|
4368 |
+
|
4369 |
+
$psp_sanitized_social_data['sc_title'] = '';
|
4370 |
+
if ( isset( $psp_social_data['sc_title'] ) ) {
|
4371 |
+
$psp_sanitized_social_data['sc_title'] = sanitize_text_field( $psp_social_data['sc_title'] );
|
4372 |
+
}
|
4373 |
+
|
4374 |
+
$psp_sanitized_social_data['sc_description'] = '';
|
4375 |
+
if ( isset( $psp_social_data['sc_description'] ) ) {
|
4376 |
+
$psp_sanitized_social_data['sc_description'] = sanitize_textarea_field( $psp_social_data['sc_description'] );
|
4377 |
+
}
|
4378 |
+
|
4379 |
+
$psp_sanitized_social_data['sc_image'] = '';
|
4380 |
+
if ( isset( $psp_social_data['sc_image'] ) ) {
|
4381 |
+
$psp_sanitized_social_data['sc_image'] = esc_url_raw( $psp_social_data['sc_image'], $psp_allowed_protocols );
|
4382 |
+
}
|
4383 |
+
|
4384 |
+
return $psp_sanitized_social_data;
|
4385 |
+
}
|
4386 |
+
|
4387 |
+
/*
|
4388 |
+
* renders Plugin settings page, checks
|
4389 |
+
* for the active tab and replaces key with the related
|
4390 |
+
* settings key. Uses the plugin_options_tabs method
|
4391 |
+
* to render the tabs.
|
4392 |
+
*/
|
4393 |
+
function psp_options_page() {
|
4394 |
+
$tab = isset( $_GET['psptab'] ) ? sanitize_key($_GET['psptab']) : $this->psp_general_settings_group;
|
4395 |
+
$psp_button = "submit";
|
4396 |
+
if ($tab == $this->psp_permalink_settings_group) {
|
4397 |
+
$psp_button = "submit1";
|
4398 |
+
}
|
4399 |
+
?>
|
4400 |
+
<div class="wrap">
|
4401 |
+
<h1 style='line-height:30px;'><?php esc_html_e('Techblissonline Platinum SEO and Social Settings', 'platinum-seo-pack') ?></h1>
|
4402 |
+
<p style="color: red"><?php esc_html_e('You need to click the "Save Settings" button to save the changes you made to each individual tab before moving on to the next tab.', 'platinum-seo-pack') ?></p>
|
4403 |
+
<?php $this->psp_options_tabs(); ?>
|
4404 |
+
<form name="platinum-seo-form" method="post" action="options.php">
|
4405 |
+
<?php wp_nonce_field( 'update-options' ); ?>
|
4406 |
+
<?php settings_fields( $tab ); ?>
|
4407 |
+
<?php settings_errors(); ?>
|
4408 |
+
<?php //do_settings_sections( $tab );
|
4409 |
+
if ($tab == $this->psp_other_settings_group) {
|
4410 |
+
$this->psp_helper->do_psp_settings_sections( $tab );
|
4411 |
+
//do_settings_sections( $tab );
|
4412 |
+
//include_once( 'psp_contact_metabox_renderer-rows.php' );
|
4413 |
+
} else {do_settings_sections( $tab );} ?>
|
4414 |
+
<?php submit_button('Save Settings', 'primary', $psp_button); ?>
|
4415 |
+
</form>
|
4416 |
+
|
4417 |
+
<div class="sidebar-cta">
|
4418 |
+
<h2>
|
4419 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a>
|
4420 |
+
</h2>
|
4421 |
+
<div class="container bg-info" id="tools" style="width:100%">
|
4422 |
+
<div class="row"><div class="h3 col-sm-12"><a class="btn-primary col-sm-12" href="https://techblissonline.com/tools/platinum-seo-wordpress-premium/" target="_blank">Platinum SEO Premium for wordpress</a></div><div class="h3 col-sm-12"><a class="btn-success col-sm-12" href="https://techblissonline.com/tools/" target="_blank">Techblissonline Platinum SEO Audit and Analysis Tools</a></div></div>
|
4423 |
+
</div>
|
4424 |
+
<a href="https://techblissonline.com/tools/" target="_blank">Be our Patreon and enjoy these premium Wordpress SEO tools for just $9</a>
|
4425 |
+
<div class="container" style="width:100%"><a href="https://techblissonline.com/tools/" target="_blank"><span class="col-sm-12 dashicons dashicons-thumbs-up dashicons-psp"></span></a></div>
|
4426 |
+
</div>
|
4427 |
+
</div>
|
4428 |
+
<?php
|
4429 |
+
}
|
4430 |
+
|
4431 |
+
/*
|
4432 |
+
* Renders our tabs in the plugin options page,
|
4433 |
+
* walks through the object's tabs array and prints
|
4434 |
+
* them one by one. Provides the heading for the
|
4435 |
+
* psp_options_page method.
|
4436 |
+
*/
|
4437 |
+
function psp_options_tabs() {
|
4438 |
+
$current_tab = isset( $_GET['psptab'] ) ? sanitize_key($_GET['psptab']) : $this->psp_general_settings_group;
|
4439 |
+
//if(isset($_POST['submit1']) && ($current_tab == $this->psp_permalink_settings_group )){
|
4440 |
+
if((isset($_GET['settings-updated']) && sanitize_key($_GET['settings-updated']) == true) && ($current_tab == $this->psp_permalink_settings_group )){
|
4441 |
+
//refresh rewrite rules
|
4442 |
+
$this->psp_refresh_rewrite_rules();
|
4443 |
+
}
|
4444 |
+
if ($current_tab == $this->psp_home_settings_group) {
|
4445 |
+
$psp_cm_home_html_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/html', 'codemirror'=> array('autoRefresh' => true)));
|
4446 |
+
$psp_cm_home_json_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'json', 'codemirror'=> array('autoRefresh' => true)));
|
4447 |
+
wp_enqueue_script( 'psp-home-cm-editors', plugins_url( '/js/cm-home.js', __FILE__ ),array( 'jquery' ), false, true);
|
4448 |
+
wp_localize_script('psp-home-cm-editors', 'psp_cm_home_html_settings', $psp_cm_home_html_settings);
|
4449 |
+
wp_localize_script('psp-home-cm-editors', 'psp_cm_home_json_settings', $psp_cm_home_json_settings);
|
4450 |
+
|
4451 |
+
}
|
4452 |
+
if ($current_tab == $this->psp_posttype_settings_group) {
|
4453 |
+
$psp_cm_ptype_html_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/html', 'codemirror'=> array('autoRefresh' => true)));
|
4454 |
+
wp_enqueue_script( 'psp-pt-cm-editors', plugins_url( '/js/cmpt.js', __FILE__ ),array( 'jquery' ), false, true);
|
4455 |
+
wp_localize_script('psp-pt-cm-editors', 'psp_cm_ptype_html_settings', $psp_cm_ptype_html_settings);
|
4456 |
+
|
4457 |
+
|
4458 |
+
}
|
4459 |
+
//wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
4460 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
4461 |
+
wp_enqueue_style("psp-htmlsettings-css", plugins_url( '/css/psp-html-settings.css', __FILE__ ));
|
4462 |
+
//screen_icon();
|
4463 |
+
echo '<h2 class="nav-tab-wrapper">';
|
4464 |
+
foreach ( $this->psp_settings_tabs as $tab_key => $tab_caption ) {
|
4465 |
+
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
4466 |
+
echo '<a class="nav-tab ' . esc_attr($active) . '" href="?page=' . esc_attr($this->psp_plugin_options_key) . '&psptab=' . esc_attr($tab_key) . '">' . esc_attr($tab_caption) . '</a>';
|
4467 |
+
}
|
4468 |
+
echo '</h2>';
|
4469 |
+
}
|
4470 |
+
|
4471 |
+
//add sitelinks search schema.org JSON-LD code to frontpage
|
4472 |
+
function psp_jsonld_for_google (){
|
4473 |
+
|
4474 |
+
$jsonld_script_tags = "";
|
4475 |
+
if ( is_front_page() ) {
|
4476 |
+
|
4477 |
+
$psp_other_settings = get_option('psp_other_settings');
|
4478 |
+
|
4479 |
+
$google_site_name = isset($psp_other_settings["google_site_name"]) ? $psp_other_settings["google_site_name"] : '';
|
4480 |
+
$google_alt_site_name = isset($psp_other_settings["google_alt_site_name"]) ? $psp_other_settings["google_alt_site_name"] : '';
|
4481 |
+
if (empty($google_alt_site_name)) $google_alt_site_name = $google_site_name;
|
4482 |
+
|
4483 |
+
$logo_url = isset($psp_other_settings["kg_logo"]) ? esc_url($psp_other_settings["kg_logo"]) : '';
|
4484 |
+
$kg_profile_type = isset($psp_other_settings["kg_profile_type"]) ? $psp_other_settings["kg_profile_type"] : '';
|
4485 |
+
$kg_profile_name = isset($psp_other_settings["kg_profile_name"]) ? $psp_other_settings["kg_profile_name"] : '';
|
4486 |
+
//$kg_contacts = $psp_other_settings["kg_contacts"];
|
4487 |
+
$kg_contactpoint = isset($psp_other_settings["kg_contactpoint"]) ? $psp_other_settings["kg_contactpoint"] : '';
|
4488 |
+
if (empty($kg_profile_name)) $kg_profile_name = $this->sitename;
|
4489 |
+
$social_profile_urls = "";
|
4490 |
+
|
4491 |
+
|
4492 |
+
$target_url = "";
|
4493 |
+
|
4494 |
+
$target_url = isset($psp_other_settings["sitelinks_searchbox_target"]) ? esc_url($psp_other_settings["sitelinks_searchbox_target"]) : '';
|
4495 |
+
if (!empty($target_url)) {
|
4496 |
+
//$target_url = preg_replace( '/{.*?}/i', '{techblissonline_platinum_seo_for_wp}', $target_url );
|
4497 |
+
$target_url = preg_replace( '/\?q=.*/i', '?s={techblissonline_platinum_wordpress_seo}', $target_url );
|
4498 |
+
$target_url = preg_replace( '/\?s=.*/i', '?s={techblissonline_platinum_wordpress_seo}', $target_url );
|
4499 |
+
}
|
4500 |
+
|
4501 |
+
if ( isset($psp_other_settings['sitelinks_search_box']) && $psp_other_settings['sitelinks_search_box'] && !empty($target_url) ) {
|
4502 |
+
$jsonld_script_tags .= '<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "url": "'.trailingslashit(get_site_url()).'", "potentialAction": { "@type": "SearchAction", "target": "'.$target_url.'", "query-input": "required name=techblissonline_platinum_wordpress_seo" } } </script>';
|
4503 |
+
}
|
4504 |
+
if (!empty($google_site_name) && !empty($google_alt_site_name)) {
|
4505 |
+
if (!empty($jsonld_script_tags)) $jsonld_script_tags .= "\r\n";
|
4506 |
+
|
4507 |
+
$jsonld_script_tags .= '<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "name": "'.$google_site_name.'", "alternateName": "'.esc_attr($google_alt_site_name).'", "url": "'.trailingslashit(get_site_url()).'" } </script>';
|
4508 |
+
|
4509 |
+
}
|
4510 |
+
if (isset($psp_other_settings["psp_kg_tags_enabled"]) && $psp_other_settings["psp_kg_tags_enabled"]) {
|
4511 |
+
if ( !empty($logo_url) && $kg_profile_type == "organization") {
|
4512 |
+
if (!empty($jsonld_script_tags)) $jsonld_script_tags .= "\r\n";
|
4513 |
+
|
4514 |
+
$jsonld_script_tags .= '<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "url": "'.trailingslashit(get_site_url()).'", "logo": "'.esc_url($logo_url).'" } </script>';
|
4515 |
+
|
4516 |
+
}
|
4517 |
+
if ( isset($psp_other_settings["kg_fb_profile"]) && !empty($psp_other_settings["kg_fb_profile"])) {
|
4518 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_fb_profile"]).'"';
|
4519 |
+
}
|
4520 |
+
if ( isset($psp_other_settings["kg_tw_profile"]) && !empty($psp_other_settings["kg_tw_profile"]) ) {
|
4521 |
+
if (!empty($social_profile_urls)) {
|
4522 |
+
$social_profile_urls .= ", ";
|
4523 |
+
}
|
4524 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_tw_profile"]).'"';
|
4525 |
+
}
|
4526 |
+
if ( isset($psp_other_settings["kg_go_profile"]) && !empty($psp_other_settings["kg_go_profile"]) ) {
|
4527 |
+
if (!empty($social_profile_urls)) {
|
4528 |
+
$social_profile_urls .= ", ";
|
4529 |
+
}
|
4530 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_go_profile"]).'"';
|
4531 |
+
}
|
4532 |
+
if ( isset($psp_other_settings["kg_ig_profile"]) && !empty($psp_other_settings["kg_ig_profile"]) ) {
|
4533 |
+
if (!empty($social_profile_urls)) {
|
4534 |
+
$social_profile_urls .= ", ";
|
4535 |
+
}
|
4536 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_ig_profile"]).'"';
|
4537 |
+
}
|
4538 |
+
if ( isset($psp_other_settings["kg_li_profile"]) && !empty($psp_other_settings["kg_li_profile"]) ) {
|
4539 |
+
if (!empty($social_profile_urls)) {
|
4540 |
+
$social_profile_urls .= ", ";
|
4541 |
+
}
|
4542 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_li_profile"]).'"';
|
4543 |
+
}
|
4544 |
+
if ( isset($psp_other_settings["kg_yt_profile"]) && !empty($psp_other_settings["kg_yt_profile"]) ) {
|
4545 |
+
if (!empty($social_profile_urls)) {
|
4546 |
+
$social_profile_urls .= ", ";
|
4547 |
+
}
|
4548 |
+
$social_profile_urls .= '"'.esc_url($psp_other_settings["kg_yt_profile"]).'"';
|
4549 |
+
}
|
4550 |
+
if ( !empty($social_profile_urls) ) {
|
4551 |
+
if (!empty($jsonld_script_tags)) $jsonld_script_tags .= "\r\n";
|
4552 |
+
|
4553 |
+
$jsonld_script_tags .= '<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "'.esc_attr(ucwords($kg_profile_type)).'", "name": "'.esc_attr($kg_profile_name).'", "url": "'.trailingslashit(get_site_url()).'", "sameAs": [ '.$social_profile_urls.'] } </script>';
|
4554 |
+
|
4555 |
+
}
|
4556 |
+
|
4557 |
+
if ( !empty($kg_contactpoint) ) {
|
4558 |
+
if (!empty($jsonld_script_tags)) $jsonld_script_tags .= "\r\n";
|
4559 |
+
|
4560 |
+
$jsonld_script_tags .= '<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "url": "'.trailingslashit(get_site_url()).'", "contactPoint": '.esc_attr($kg_contactpoint).' } </script>';
|
4561 |
+
//$jsonld_script_tags .= $kg_contactpoint;
|
4562 |
+
|
4563 |
+
}
|
4564 |
+
}
|
4565 |
+
|
4566 |
+
}
|
4567 |
+
return $jsonld_script_tags;
|
4568 |
+
}
|
4569 |
+
|
4570 |
+
/**
|
4571 |
+
* Add the necessary rewrite rules for removing "category" base
|
4572 |
+
*/
|
4573 |
+
|
4574 |
+
function psp_category_rewrite_rules( $rules ) {
|
4575 |
+
|
4576 |
+
global $wp_rewrite;
|
4577 |
+
$categories = array();
|
4578 |
+
|
4579 |
+
//$categories = get_categories( array( 'hide_empty' => false ) );
|
4580 |
+
|
4581 |
+
$filter_name = explode("_", current_filter());
|
4582 |
+
$tax_name = $filter_name[0];
|
4583 |
+
//error_log(print_r($tax_name));
|
4584 |
+
//$categories = get_categories(array('hide_empty' => false, 'taxonomy' => $tax_name));
|
4585 |
+
$categories = get_terms(array('hide_empty' => false, 'taxonomy' => $tax_name));
|
4586 |
+
|
4587 |
+
$psp_category_rewrite_rules = $rules;
|
4588 |
+
|
4589 |
+
if ( ! empty( $categories ) ) {
|
4590 |
+
$psp_category_slugs = array();
|
4591 |
+
|
4592 |
+
foreach ( $categories as $category ) {
|
4593 |
+
//if ( is_object( $category ) && ! is_wp_error( $category ) ) {
|
4594 |
+
//if ( 0 == $category->category_parent ) {
|
4595 |
+
if ( 0 == $category->parent ) {
|
4596 |
+
$psp_category_slugs[] = $category->slug;
|
4597 |
+
} else {
|
4598 |
+
//$psp_category_slugs[] = trim( get_category_parents( $category->cat_ID, false, '/', true ), '/' );
|
4599 |
+
$psp_category_slugs[] = trim( get_term_parents_list( $category->term_id, $tax_name, array('separator' => '/', 'link' => false, 'format' => 'slug')) );
|
4600 |
+
}
|
4601 |
+
//}
|
4602 |
+
}
|
4603 |
+
|
4604 |
+
if ( ! empty( $psp_category_slugs ) ) {
|
4605 |
+
|
4606 |
+
$psp_category_rewrite_rules = array();
|
4607 |
+
|
4608 |
+
foreach ( $psp_category_slugs as $psp_category_slug ) {
|
4609 |
+
//$psp_category_rewrite_rules[ '(' . $psp_category_slug . ')/feed/(feed|rdf|rss|rss2|atom)?/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
|
4610 |
+
//$psp_category_rewrite_rules[ '(' . $psp_category_slug . ')/(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
|
4611 |
+
//$psp_category_rewrite_rules[ '(' . $psp_category_slug . ')(/page/(\d)+/?)?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[3]';
|
4612 |
+
if ($tax_name == "category") {
|
4613 |
+
$psp_category_rewrite_rules['(' . esc_attr($psp_category_slug) . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&feed=$matches[2]';
|
4614 |
+
$psp_category_rewrite_rules[ '(' . esc_attr($psp_category_slug) . ')/'.esc_attr($wp_rewrite->pagination_base).'/(\d)+/?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[2]';
|
4615 |
+
$psp_category_rewrite_rules['(' . esc_attr($psp_category_slug) . ')/?$'] = 'index.php?category_name=$matches[1]';
|
4616 |
+
} else {
|
4617 |
+
$psp_category_rewrite_rules['(' . esc_attr($psp_category_slug) . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?'.esc_attr($tax_name).'=$matches[1]&feed=$matches[2]';
|
4618 |
+
$psp_category_rewrite_rules[ '(' . esc_attr($psp_category_slug) . ')/'.esc_attr($wp_rewrite->pagination_base).'/(\d)+/?$' ] = 'index.php?'.esc_attr($tax_name).'=$matches[1]&paged=$matches[2]';
|
4619 |
+
$psp_category_rewrite_rules['(' . esc_attr($psp_category_slug) . ')/?$'] = 'index.php?'.esc_attr($tax_name).'=$matches[1]';
|
4620 |
+
}
|
4621 |
+
}
|
4622 |
+
}
|
4623 |
+
|
4624 |
+
// Redirect from Old Category Base
|
4625 |
+
if ($tax_name == "category") {
|
4626 |
+
$wp_category_base = get_option('category_base') ? get_option('category_base') : 'category';
|
4627 |
+
} else {
|
4628 |
+
$wp_category_base = $tax_name;
|
4629 |
+
}
|
4630 |
+
$wp_category_base = esc_attr(trim($wp_category_base, '/'));
|
4631 |
+
$psp_category_rewrite_rules[$wp_category_base . '/(.*)$'] = 'index.php?techblissonline_psp_category_redirect=$matches[1]';
|
4632 |
+
|
4633 |
+
}
|
4634 |
+
return $psp_category_rewrite_rules;
|
4635 |
+
}
|
4636 |
+
|
4637 |
+
// Add a query variable for redirecting categories with "category" base.
|
4638 |
+
//add_filter('query_vars', 'psp_set_category_base_redir_var');
|
4639 |
+
function psp_set_category_base_redir_var($public_query_vars) {
|
4640 |
+
//$public_query_vars[] = 'techblissonline_psp_category_redirect';
|
4641 |
+
array_push($public_query_vars, 'techblissonline_psp_category_redirect');
|
4642 |
+
return $public_query_vars;
|
4643 |
+
}
|
4644 |
+
|
4645 |
+
// Redirect if 'techblissonline_psp_category_redirect' is set
|
4646 |
+
//add_filter('request', 'psp_redirect_category_base_request');
|
4647 |
+
function psp_redirect_category_base_request($query_vars) {
|
4648 |
+
//print_r($query_vars); // For Debugging
|
4649 |
+
if (isset($query_vars['techblissonline_psp_category_redirect'])) {
|
4650 |
+
$catlink = esc_url_raw(trailingslashit(get_option('home')) . user_trailingslashit($query_vars['techblissonline_psp_category_redirect'], 'category'));
|
4651 |
+
wp_safe_redirect( $catlink, 301 );
|
4652 |
+
exit();
|
4653 |
+
}
|
4654 |
+
return $query_vars;
|
4655 |
+
}
|
4656 |
+
|
4657 |
+
|
4658 |
+
// Remove category base from permalink structures
|
4659 |
+
//add_action('init', 'psp_set_no_base_extra_permastruct');
|
4660 |
+
function psp_set_no_base_extra_permastruct() {
|
4661 |
+
global $wp_rewrite, $wp_version;
|
4662 |
+
|
4663 |
+
$cust_taxonomies = array();
|
4664 |
+
|
4665 |
+
if ( empty($wp_rewrite->permalink_structure) ) return;
|
4666 |
+
|
4667 |
+
$psp_permalink_settings = get_option('psp_permalink_settings');
|
4668 |
+
|
4669 |
+
if (isset($psp_permalink_settings['category']) && $psp_permalink_settings['category']) {
|
4670 |
+
|
4671 |
+
if (version_compare($wp_version, '3.4', '<')) {
|
4672 |
+
// For pre-3.4 support
|
4673 |
+
$wp_rewrite -> extra_permastructs['category'][0] = '%category%';
|
4674 |
+
} else {
|
4675 |
+
$wp_rewrite -> extra_permastructs['category']['struct'] = '%category%';
|
4676 |
+
}
|
4677 |
+
|
4678 |
+
}
|
4679 |
+
|
4680 |
+
if ( null == $this->custom_taxonomies ) {
|
4681 |
+
$args = array(
|
4682 |
+
'public' => true,
|
4683 |
+
'_builtin' => false
|
4684 |
+
);
|
4685 |
+
$output = 'names'; // or objects
|
4686 |
+
$operator = 'and'; // 'and' or 'or'
|
4687 |
+
$cust_taxonomies = get_taxonomies( $args, $output, $operator );
|
4688 |
+
$this->custom_taxonomies = $cust_taxonomies;
|
4689 |
+
}
|
4690 |
+
|
4691 |
+
//$psp_taxonomy_instance = PSP_Tax_Seo_Metas::get_handle();
|
4692 |
+
//$psp_taxonomies = $psp_taxonomy_instance->get_cust_taxonomies();
|
4693 |
+
//$cust_taxonomies = $this->custom_taxonomies;
|
4694 |
+
//print_r($cust_taxonomies);
|
4695 |
+
|
4696 |
+
foreach($cust_taxonomies as $cust_taxonomy) {
|
4697 |
+
|
4698 |
+
//$psp_settings_name = "psp_".$cust_taxonomy."_settings";
|
4699 |
+
//$psp_tax_settings = get_option($psp_settings_name);
|
4700 |
+
//error_log($cust_taxonomy);
|
4701 |
+
if (isset($psp_permalink_settings[$cust_taxonomy]) && $psp_permalink_settings[$cust_taxonomy]) {
|
4702 |
+
if (version_compare($wp_version, '3.4', '<')) {
|
4703 |
+
// For pre-3.4 support
|
4704 |
+
$wp_rewrite -> extra_permastructs[$cust_taxonomy][0] = "%".esc_attr($cust_taxonomy)."%";
|
4705 |
+
} else {
|
4706 |
+
$wp_rewrite -> extra_permastructs[$cust_taxonomy]['struct'] = "%".esc_attr($cust_taxonomy)."%";
|
4707 |
+
}
|
4708 |
+
}
|
4709 |
+
}
|
4710 |
+
}
|
4711 |
+
|
4712 |
+
public function psp_refresh_rewrite_rules() {
|
4713 |
+
global $wp_rewrite;
|
4714 |
+
$wp_rewrite -> flush_rules();
|
4715 |
+
}
|
4716 |
+
};
|
psp-include/settings/psp_social_settings.php
ADDED
@@ -0,0 +1,481 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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|
6 |
+
Text Domain: platinum-seo-pack
|
7 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
8 |
+
Author: Rajesh - Techblissonline
|
9 |
+
Author URI: https://techblissonline.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
class PspSocialSettings extends PspSettings {
|
13 |
+
|
14 |
+
private static $obj_handle = null;
|
15 |
+
|
16 |
+
private $plugin_settings_tabs = array();
|
17 |
+
|
18 |
+
protected $psp_social_share_settings_group = 'psp_social_share';
|
19 |
+
private $psp_social_settings_group = 'psp_social';
|
20 |
+
|
21 |
+
protected $psp_plugin_options_key = 'psp-social-by-techblissonline';
|
22 |
+
protected $psp_settings_tabs = array();
|
23 |
+
|
24 |
+
public static function get_instance() {
|
25 |
+
|
26 |
+
if ( null == self::$obj_handle ) {
|
27 |
+
self::$obj_handle = new self;
|
28 |
+
}
|
29 |
+
|
30 |
+
return self::$obj_handle;
|
31 |
+
|
32 |
+
} // end get_instance;
|
33 |
+
|
34 |
+
function __construct() {
|
35 |
+
|
36 |
+
$this->psp_settings_tabs[$this->psp_social_settings_group] = 'Settings';
|
37 |
+
$this->psp_settings_tabs[$this->psp_social_share_settings_group] = 'Share Button Settings';
|
38 |
+
|
39 |
+
add_action( 'admin_init', array( &$this, 'psp_social_settings_init' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
function psp_social_settings_init() {
|
43 |
+
|
44 |
+
$tab = isset( $_GET['pspsocial'] ) ? Sanitize_key($_GET['pspsocial']) : $this->psp_social_settings_group;
|
45 |
+
|
46 |
+
wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
47 |
+
|
48 |
+
$this->register_social_settings();
|
49 |
+
//$this->register_social_share_settings();
|
50 |
+
}
|
51 |
+
|
52 |
+
/*
|
53 |
+
* Registers the social settings for the various social sites and appends the
|
54 |
+
* key to the plugin settings tabs array.
|
55 |
+
*/
|
56 |
+
private function register_social_settings() {
|
57 |
+
$this->psp_settings_tabs[$this->psp_social_settings_group] = 'Settings';
|
58 |
+
$psp_settings_name = "psp_social_settings";
|
59 |
+
|
60 |
+
$psp_settings = get_option($psp_settings_name);
|
61 |
+
//$this->psp_settings_name = $psp_settings;
|
62 |
+
|
63 |
+
//enqueue javascript
|
64 |
+
wp_enqueue_media();
|
65 |
+
wp_enqueue_script( 'psp-image-uploader', plugins_url( '/js/pspmediauploader.js', __FILE__ ), array( 'jquery' ) );
|
66 |
+
//wp_enqueue_script( 'psp-social', plugins_url( '/js/pspsocialhandler.js', __FILE__ ), array( 'jquery' ) );
|
67 |
+
|
68 |
+
register_setting( $this->psp_social_settings_group, $psp_settings_name,array( &$this, 'sanitize_social_settings' ) );
|
69 |
+
|
70 |
+
//Facebook Section
|
71 |
+
$section_id = 'psp_facebook_section';
|
72 |
+
$section_title = esc_html__('Techblissonline Platinum Social Facebook Open Graph Settings', 'platinum-seo-pack');
|
73 |
+
|
74 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_fb_desc' ), $this->psp_social_settings_group );
|
75 |
+
|
76 |
+
//Fields
|
77 |
+
|
78 |
+
$og_tags_field = array (
|
79 |
+
'label_for' => 'psp_og_tags_enabled',
|
80 |
+
'option_name' => $psp_settings_name.'[psp_og_tags_enabled]',
|
81 |
+
'option_value' => isset($psp_settings['psp_og_tags_enabled']) ? esc_attr($psp_settings['psp_og_tags_enabled']) : '',
|
82 |
+
'checkbox_label' => esc_html__('Enable Opengraph Tags for Facebook', 'platinum-seo-pack')
|
83 |
+
);
|
84 |
+
|
85 |
+
$og_tags_field_id = 'psp_og_tags_enabled';
|
86 |
+
$og_tags_field_title = esc_html__('Open Graph Tags: ', 'platinum-seo-pack');
|
87 |
+
|
88 |
+
add_settings_field( $og_tags_field_id, $og_tags_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_social_settings_group, $section_id, $og_tags_field );
|
89 |
+
|
90 |
+
//OG site name
|
91 |
+
$psp_fb_site_name_field = array (
|
92 |
+
'label_for' => 'psp_social_fb_site_name',
|
93 |
+
'option_name' => $psp_settings_name.'[fb_site_name]',
|
94 |
+
'option_value' => isset($psp_settings['fb_site_name']) ? esc_attr($psp_settings['fb_site_name']) : '',
|
95 |
+
'option_description' => esc_html__( 'Enter the site name to use while sharing pages from this domain/site. For eg: "Tehblissonline" is the sitename used for the site http://techblissonline.com/. If this is left blank, then the default wordpress site name will be used.', 'platinum-seo-pack' ),
|
96 |
+
);
|
97 |
+
|
98 |
+
$psp_fb_site_name_field_id = 'psp_social_fb_site_name';
|
99 |
+
$psp_fb_site_name_field_title = esc_html__( 'Site Name: ', 'platinum-seo-pack' );
|
100 |
+
|
101 |
+
add_settings_field( $psp_fb_site_name_field_id, $psp_fb_site_name_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_site_name_field);
|
102 |
+
|
103 |
+
//Facebook admins
|
104 |
+
$psp_fb_admins_field = array (
|
105 |
+
'label_for' => 'psp_social_fb_admins',
|
106 |
+
'option_name' => $psp_settings_name.'[fb_admins]',
|
107 |
+
'option_value' => isset($psp_settings['fb_admins']) ? esc_attr($psp_settings['fb_admins']) : '',
|
108 |
+
'option_description' => esc_html__( 'Enter the user ID of one or more admins for the FB app/page, if any, of your domain/website. You can enter Facebook username rather than the numeric ID, which is probably easier to debug and manage. You can find your user name on your profile page in the page URL. For eg., if you page is <code>facebook.com/johndoe</code> then your username is <code>johndoe</code>. If you want to get and use your numeric ID, you can find it by visiting <code>http://graph.facebook.com/johndoe</code>', 'platinum-seo-pack' ),
|
109 |
+
);
|
110 |
+
|
111 |
+
$psp_fb_admins_id = 'psp_social_fb_admins';
|
112 |
+
$psp_fb_admins_title = esc_html__( 'fb:admins (optional): ', 'platinum-seo-pack' );
|
113 |
+
|
114 |
+
add_settings_field( $psp_fb_admins_id, $psp_fb_admins_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_admins_field);
|
115 |
+
|
116 |
+
//Facebook page id - deprecated
|
117 |
+
/************
|
118 |
+
$psp_fb_page_field = array (
|
119 |
+
'label_for' => 'psp_social_fb_page',
|
120 |
+
'option_name' => $psp_settings_name.'[fb_page]',
|
121 |
+
'option_value' => $psp_settings['fb_page'],
|
122 |
+
'option_description' => __( 'Enter Facebook Page ID for the facebook page,if any, created for your domain.', 'platinum-seo-pack' ),
|
123 |
+
);
|
124 |
+
|
125 |
+
$psp_fb_page_field_id = 'psp_social_fb_page';
|
126 |
+
$psp_fb_page_field_title = __( 'Facebook Page: ', 'platinum-seo-pack' );
|
127 |
+
|
128 |
+
add_settings_field( $psp_fb_page_field_id, $psp_fb_page_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_page_field);
|
129 |
+
***********/
|
130 |
+
//Facebook app ID
|
131 |
+
$psp_fb_apps_field = array (
|
132 |
+
'label_for' => 'psp_social_fb_app',
|
133 |
+
'option_name' => $psp_settings_name.'[fb_app]',
|
134 |
+
'option_value' => isset($psp_settings['fb_app']) ? esc_attr($psp_settings['fb_app']) : '',
|
135 |
+
'option_description' => esc_html__( 'Enter the Facebook App ID for the FB app,if any, created for your domain. This would help to get facebook domain insights about the page(s) on which it is added by way of a open graph meta tag.', 'platinum-seo-pack' ),
|
136 |
+
);
|
137 |
+
|
138 |
+
$psp_fb_apps_field_id = 'psp_social_fb_app';
|
139 |
+
$psp_fb_apps_field_title = esc_html__( 'Facebook Application ID: ', 'platinum-seo-pack' );
|
140 |
+
|
141 |
+
add_settings_field( $psp_fb_apps_field_id, $psp_fb_apps_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_apps_field);
|
142 |
+
|
143 |
+
//Facebook Secret ID
|
144 |
+
$psp_fb_secrets_field = array (
|
145 |
+
'label_for' => 'psp_social_fb_secret',
|
146 |
+
'option_name' => $psp_settings_name.'[fb_secret]',
|
147 |
+
'option_value' => isset($psp_settings['fb_secret']) ? esc_attr($psp_settings['fb_secret']) : '',
|
148 |
+
'option_description' => esc_html__( 'Enter the Facebook App Secret ID for the FB app,if any, created for your domain. This would help to get facebook engagement metrics for the page(s) on which Facebook share buttons is/are added.', 'platinum-seo-pack' ),
|
149 |
+
);
|
150 |
+
|
151 |
+
$psp_fb_secret_field_id = 'psp_social_fb_secret';
|
152 |
+
$psp_fb_secret_field_title = esc_html__( 'Facebook Application Secret: ', 'platinum-seo-pack' );
|
153 |
+
|
154 |
+
add_settings_field( $psp_fb_secret_field_id, $psp_fb_secret_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_secrets_field);
|
155 |
+
|
156 |
+
//Facebook Profile ID
|
157 |
+
$psp_fb_profile_field = array (
|
158 |
+
'label_for' => 'psp_social_fb_profile',
|
159 |
+
'option_name' => $psp_settings_name.'[fb_profile]',
|
160 |
+
'option_value' => isset($psp_settings['fb_profile']) ? esc_attr($psp_settings['fb_profile']) : '',
|
161 |
+
'option_description' => esc_html__( 'Enter the Facebook profile ID of a user that can be followed. Here you may even enter the page id of a facebook page that is set up for this domain/site.', 'platinum-seo-pack' ),
|
162 |
+
);
|
163 |
+
|
164 |
+
$psp_fb_profile_field_id = 'psp_social_fb_profile';
|
165 |
+
$psp_fb_profile_field_title = esc_html__( 'Facebook Profile ID (Optional): ', 'platinum-seo-pack' );
|
166 |
+
|
167 |
+
add_settings_field( $psp_fb_profile_field_id, $psp_fb_profile_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_fb_profile_field);
|
168 |
+
|
169 |
+
//Article Publisher
|
170 |
+
$psp_fb_publisher_field = array (
|
171 |
+
'label_for' => 'psp_social_fb_publisher',
|
172 |
+
'option_name' => $psp_settings_name.'[fb_publisher]',
|
173 |
+
'option_value' => isset($psp_settings['fb_publisher']) ? esc_url($psp_settings['fb_publisher']) : '',
|
174 |
+
'option_description' => esc_html__( 'Enter the Facebook URL to the page set up for this site. For eg: https://www.facebook.com/Techblissonline', 'platinum-seo-pack' ),
|
175 |
+
);
|
176 |
+
|
177 |
+
$psp_fb_publisher_field_id = 'psp_social_fb_publisher';
|
178 |
+
$psp_fb_publisher_field_title = esc_html__( 'Facebook Publisher: ', 'platinum-seo-pack' );
|
179 |
+
|
180 |
+
add_settings_field( $psp_fb_publisher_field_id, $psp_fb_publisher_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_social_settings_group, $section_id, $psp_fb_publisher_field);
|
181 |
+
|
182 |
+
//Facebook og type
|
183 |
+
$psp_og_types = array ('' => 'Select an OG type', 'website' => 'website', 'article' => 'article', 'books.author' => 'books.author', 'books.book' => 'books.book', 'books.genre' => 'books.genre', 'business.business' => 'business.business', 'fitness.course' => 'fitness.course', 'game.achievement' => 'game.achievement', 'music.album' => 'music.album', 'music.playlist' => 'music.playlist', 'music.radio_station' => 'music.radio_station', 'music.song' => 'music.song', 'place' => 'place', 'product' => 'product', 'product.group' => 'product.group', 'product.item' => 'product.item', 'profile' => 'profile', 'restaurant.menu' => 'restaurant.menu', 'restaurant.menu_item' => 'restaurant.menu_item', 'restaurant.menu_section' => 'restaurant.menu_section', 'restaurant.restaurant' => 'restaurant.restaurant', 'video.episode' => 'video.episode', 'video.movie' => 'video.movie', 'video.other' => 'video.other', 'video.tv_show' => 'video.tv_show');
|
184 |
+
|
185 |
+
$psp_fb_og_type_field = array (
|
186 |
+
'label_for' => 'psp_social_fb_og_type',
|
187 |
+
'option_name' => $psp_settings_name.'[fb_og_type]',
|
188 |
+
'option_value' => isset($psp_settings['fb_og_type']) ? esc_attr($psp_settings['fb_og_type']) : '',
|
189 |
+
'dditems' => $psp_og_types,
|
190 |
+
'option_description' => esc_html__( 'Select an open graph type to be used by default for individual posts/pages of your site. For eg., if your site is a blog, you can enter <code>article</code> as the default open graph type. Note that this can be overridden through <code>Social</code> settings for your individual post in "Techblissonline Platinum SEO and Social Meta Box" on your post editor. For complete reference of open graph types refer <a href="https://ogp.me/#object-type" target="_blank">facebook developer docs reference.</a>', 'platinum-seo-pack' ),
|
191 |
+
);
|
192 |
+
|
193 |
+
$psp_fb_og_type_field_id = 'psp_social_fb_ogtype';
|
194 |
+
$psp_fb_og_type_field_title = esc_html__( 'Facebook Open Graph Type: ', 'platinum-seo-pack' );
|
195 |
+
|
196 |
+
add_settings_field( $psp_fb_og_type_field_id, $psp_fb_og_type_field_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_social_settings_group, $section_id, $psp_fb_og_type_field);
|
197 |
+
|
198 |
+
//OG: Locale
|
199 |
+
$psp_locale_items = array ('en_us' => 'en_us', 'ca_es' => 'ca_es', 'cs_cz' => 'cs_cz', 'cx_ph' => 'cx_ph', 'cy_gb' => 'cy_gb', 'da_dk' => 'da_dk', 'de_de' => 'de_de', 'eu_es' => 'eu_es', 'en_pi' => 'en_pi', 'en_ud' => 'en_ud', 'es_la' => 'es_la', 'es_co' => 'es_co', 'es_es' => 'es_es', 'gn_py' => 'gn_py', 'fi_fi' => 'fi_fi', 'fr_fr' => 'fr_fr', 'gl_es' => 'gl_es', 'hu_hu' => 'hu_hu', 'it_it' => 'it_it', 'ja_jp' => 'ja_jp', 'ko_kr' => 'ko_kr', 'nb_no' => 'nb_no', 'nn_no' => 'nn_no', 'nl_nl' => 'nl_nl', 'fy_nl' => 'fy_nl', 'pl_pl' => 'pl_pl', 'pt_br' => 'pt_br', 'pt_pt' => 'pt_pt', 'ro_ro' => 'ro_ro', 'ru_ru' => 'ru_ru', 'sk_sk' => 'sk_sk', 'sl_si' => 'sl_si', 'sv_se' => 'sv_se', 'th_th' => 'th_th', 'tr_tr' => 'tr_tr', 'ku_tr' => 'ku_tr', 'zh_cn' => 'zh_cn', 'zh_hk' => 'zh_hk', 'zh_tw' => 'zh_tw', 'fb_lt' => 'fb_lt', 'af_za' => 'af_za', 'sq_al' => 'sq_al', 'hy_am' => 'hy_am', 'az_az' => 'az_az', 'be_by' => 'be_by', 'bn_in' => 'bn_in', 'bs_ba' => 'bs_ba', 'bg_bg' => 'bg_bg', 'hr_hr' => 'hr_hr', 'nl_be' => 'nl_be', 'en_gb' => 'en_gb', 'eo_eo' => 'eo_eo', 'et_ee' => 'et_ee', 'fo_fo' => 'fo_fo', 'fr_ca' => 'fr_ca', 'ka_ge' => 'ka_ge', 'el_gr' => 'el_gr', 'gu_in' => 'gu_in', 'hi_in' => 'hi_in', 'is_is' => 'is_is', 'id_id' => 'id_id', 'ga_ie' => 'ga_ie', 'jv_id' => 'jv_id', 'kn_in' => 'kn_in', 'kk_kz' => 'kk_kz', 'la_va' => 'la_va', 'lv_lv' => 'lv_lv', 'lt_lt' => 'lt_lt', 'mk_mk' => 'mk_mk', 'ms_my' => 'ms_my', 'mr_in' => 'mr_in', 'mn_mn' => 'mn_mn', 'ne_np' => 'ne_np', 'pa_in' => 'pa_in', 'sr_rs' => 'sr_rs', 'sw_ke' => 'sw_ke', 'tl_ph' => 'tl_ph', 'ta_in' => 'ta_in', 'te_in' => 'te_in', 'ml_in' => 'ml_in', 'uk_ua' => 'uk_ua', 'uz_uz' => 'uz_uz', 'vi_vn' => 'vi_vn', 'km_kh' => 'km_kh', 'tg_tj' => 'tg_tj', 'ar_ar' => 'ar_ar', 'he_il' => 'he_il', 'ur_pk' => 'ur_pk', 'fa_ir' => 'fa_ir', 'ps_af' => 'ps_af', 'si_lk' => 'si_lk', 'ja_ks' => 'ja_ks');
|
200 |
+
|
201 |
+
$psp_fb_og_locale_field = array (
|
202 |
+
'label_for' => 'psp_social_fb_locale',
|
203 |
+
'option_name' => $psp_settings_name.'[fb_locale]',
|
204 |
+
'option_value' => isset($psp_settings['fb_locale']) ? esc_attr($psp_settings['fb_locale']) : '',
|
205 |
+
'dditems' => $psp_locale_items,
|
206 |
+
'option_description' => esc_html__( 'Enter the locale that the facebook object tags are marked up in. Default is en_US. For valid values refer <a href="https://techblissonline.com/facebook-locales-and-languages/" target="_blank">Techblissonline</a>', 'platinum-seo-pack' ),
|
207 |
+
);
|
208 |
+
|
209 |
+
$psp_fb_og_locale_id = 'psp_social_fb_locale';
|
210 |
+
$psp_fb_og_locale_title = esc_html__( 'Open Graph Locale: ', 'platinum-seo-pack' );
|
211 |
+
|
212 |
+
add_settings_field( $psp_fb_og_locale_id, $psp_fb_og_locale_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_social_settings_group, $section_id, $psp_fb_og_locale_field);
|
213 |
+
|
214 |
+
//Facebook default image
|
215 |
+
$psp_fb_defailt_img_field = array (
|
216 |
+
'label_for' => 'psp_social_fb_default_img',
|
217 |
+
'option_name' => $psp_settings_name.'[fb_default_image]',
|
218 |
+
'option_value' => isset($psp_settings['fb_default_image']) ? esc_url($psp_settings['fb_default_image']) : '',
|
219 |
+
'option_description' => esc_html__( 'Enter the image URL or upload an image to be used as a default image while sharing any post/page on facebook. This will be used if a post/page does not have any image', 'platinum-seo-pack' ),
|
220 |
+
'button' => 1,
|
221 |
+
);
|
222 |
+
|
223 |
+
$psp_fb_defailt_img_field_id = 'psp_social_fb_default_img';
|
224 |
+
$psp_fb_defailt_img_field_title = esc_html__( 'Default image for sharing on facebook: ', 'platinum-seo-pack' );
|
225 |
+
|
226 |
+
add_settings_field( $psp_fb_defailt_img_field_id, $psp_fb_defailt_img_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_social_settings_group, $section_id, $psp_fb_defailt_img_field);
|
227 |
+
|
228 |
+
//Twitter Section
|
229 |
+
$section_id = 'psp_twitter_section';
|
230 |
+
$section_title = esc_html__('Techblissonline Platinum Social Twitter Card Settings', 'platinum-seo-pack');
|
231 |
+
|
232 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_twitter_desc' ), $this->psp_social_settings_group );
|
233 |
+
|
234 |
+
$twitter_card_field = array (
|
235 |
+
'label_for' => 'psp_twitter_card_enabled',
|
236 |
+
'option_name' => $psp_settings_name.'[psp_twitter_card_enabled]',
|
237 |
+
'option_value' => isset($psp_settings['psp_twitter_card_enabled']) ? esc_attr($psp_settings['psp_twitter_card_enabled']) : '',
|
238 |
+
'checkbox_label' => esc_html__('Enable Twitter Card', 'platinum-seo-pack')
|
239 |
+
);
|
240 |
+
|
241 |
+
$twitter_card_field_id = 'psp_twitter_card_enabled';
|
242 |
+
$twitter_card_field_title = esc_html__('Twitter Card: ', 'platinum-seo-pack');
|
243 |
+
|
244 |
+
add_settings_field( $twitter_card_field_id, $twitter_card_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_social_settings_group, $section_id, $twitter_card_field );
|
245 |
+
|
246 |
+
//Twitter Card type
|
247 |
+
$psp_tc_types = array ('' => 'Select a card type', 'summary' => 'summary', 'summary_large_image' => 'summary with large image');
|
248 |
+
|
249 |
+
$psp_tw_ct_type_field = array (
|
250 |
+
'label_for' => 'psp_social_tw_ctype',
|
251 |
+
'option_name' => $psp_settings_name.'[tw_ct_type]',
|
252 |
+
'option_value' => isset($psp_settings['tw_ct_type']) ? esc_attr($psp_settings['tw_ct_type']) : '',
|
253 |
+
'dditems' => $psp_tc_types,
|
254 |
+
'option_description' => esc_html__( 'Enter the twitter card type to be used by default for individual posts/pages of your site. For eg., if your site is a blog, you can enter <code>summary</code> as the default twitter card type. Note that this can be overridden through <code>Social</code> settings for your individual post in "Techblissonline Platinum SEO and Social Meta Box" on your post editor. For complete reference of twitter card types refer <a href="https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started" target="_blank">twitter development document reference.</a>', 'platinum-seo-pack' ),
|
255 |
+
);
|
256 |
+
|
257 |
+
$psp_tw_ct_type_field_id = 'psp_social_tw_ctype';
|
258 |
+
$psp_tw_ct_type_field_title = esc_html__( 'Twitter CardType: ', 'platinum-seo-pack' );
|
259 |
+
|
260 |
+
add_settings_field( $psp_tw_ct_type_field_id, $psp_tw_ct_type_field_title, array( &$this, 'psp_add_field_dropdown' ), $this->psp_social_settings_group, $section_id, $psp_tw_ct_type_field);
|
261 |
+
|
262 |
+
//Twitter user
|
263 |
+
$psp_tw_user_field = array (
|
264 |
+
'label_for' => 'psp_social_tw_user',
|
265 |
+
'option_name' => $psp_settings_name.'[tw_user]',
|
266 |
+
'option_value' => isset($psp_settings['tw_user']) ? esc_attr($psp_settings['tw_user']) : '',
|
267 |
+
'option_description' => esc_html__( 'The Twitter <code>@username</code> the card should be attributed to. This is usually the twitter handle created for your domain /website. However, You might even choose to use your personal twitter user id here. If you twitter user id is <code>@johndoe</code>, enter <code>johndoe</code> as the user id here. This user id is required for <a href="https://analytics.twitter.com/" target="_blank">Twitter Card analytics</a>', 'platinum-seo-pack' ),
|
268 |
+
);
|
269 |
+
|
270 |
+
$psp_tw_user_field_id = 'psp_social_tw_user';
|
271 |
+
$psp_tw_user_field_title = esc_html__( 'Twitter User: ', 'platinum-seo-pack' );
|
272 |
+
|
273 |
+
add_settings_field( $psp_tw_user_field_id, $psp_tw_user_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_tw_user_field);
|
274 |
+
|
275 |
+
//Twitter default image
|
276 |
+
$psp_tw_defailt_img_field = array (
|
277 |
+
'label_for' => 'psp_social_tw_default_img',
|
278 |
+
'option_name' => $psp_settings_name.'[tw_default_image]',
|
279 |
+
'option_value' => isset($psp_settings['tw_default_image']) ? esc_url($psp_settings['tw_default_image']) : '',
|
280 |
+
'option_description' => esc_html__( 'Enter the image URL or upload an image to be used as a default image while sharing any post/page on twitter. This will be used if a post/page does not have any image', 'platinum-seo-pack' ),
|
281 |
+
'button' => 1,
|
282 |
+
);
|
283 |
+
|
284 |
+
$psp_tw_defailt_img_field_id = 'psp_social_tw_default_img';
|
285 |
+
$psp_tw_defailt_img_field_title = esc_html__( 'Default image for sharing on twitter: ', 'platinum-seo-pack' );
|
286 |
+
|
287 |
+
add_settings_field( $psp_tw_defailt_img_field_id, $psp_tw_defailt_img_field_title, array( &$this, 'psp_add_field_text_url' ), $this->psp_social_settings_group, $section_id, $psp_tw_defailt_img_field);
|
288 |
+
|
289 |
+
//Schema.org Section
|
290 |
+
$section_id = 'psp_schema_org_section';
|
291 |
+
$section_title = esc_html__('Techblissonline Platinum Social Schema.org Settings', 'platinum-seo-pack');
|
292 |
+
|
293 |
+
add_settings_section( $section_id, $section_title, array( &$this, 'section_schema_org_desc' ), $this->psp_social_settings_group );
|
294 |
+
|
295 |
+
//Schema.org tags
|
296 |
+
$schema_org_field = array (
|
297 |
+
'label_for' => 'psp_schemaorg_markup_enabled',
|
298 |
+
'option_name' => $psp_settings_name.'[psp_schemaorg_markup_enabled]',
|
299 |
+
'option_value' => isset($psp_settings['psp_schemaorg_markup_enabled']) ? esc_attr($psp_settings['psp_schemaorg_markup_enabled']) : '',
|
300 |
+
'checkbox_label' => esc_html__('Enable Schema.org markup for Pinterest and Linkedin.', 'platinum-seo-pack')
|
301 |
+
);
|
302 |
+
|
303 |
+
$schema_org_field_id = 'psp_schemaorg_markup_enabled';
|
304 |
+
$schema_org_field_title = esc_html__('Schema.org Markup: ', 'platinum-seo-pack');
|
305 |
+
|
306 |
+
add_settings_field( $schema_org_field_id, $schema_org_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_social_settings_group, $section_id, $schema_org_field );
|
307 |
+
|
308 |
+
//Article Publisher
|
309 |
+
/********
|
310 |
+
$psp_sc_publisher_field = array (
|
311 |
+
'label_for' => 'psp_social_sc_publisher',
|
312 |
+
'option_name' => $psp_settings_name.'[sc_publisher]',
|
313 |
+
'option_value' => isset($psp_settings['sc_publisher']) ? $psp_settings['sc_publisher'] : '',
|
314 |
+
'option_description' => __( 'Enter the Google+ URL to the page set up for this site. For eg: https://plus.google.com/+Techblissonlinecom/about', 'platinum-seo-pack' ),
|
315 |
+
);
|
316 |
+
|
317 |
+
$psp_sc_publisher_field_id = 'psp_social_sc_publisher';
|
318 |
+
$psp_sc_publisher_field_title = __( 'Publisher for Google+ : ', 'platinum-seo-pack' );
|
319 |
+
|
320 |
+
add_settings_field( $psp_sc_publisher_field_id, $psp_sc_publisher_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_sc_publisher_field);
|
321 |
+
******/
|
322 |
+
//Article author
|
323 |
+
/********
|
324 |
+
$psp_sc_author_field = array (
|
325 |
+
'label_for' => 'psp_social_sc_author',
|
326 |
+
'option_name' => $psp_settings_name.'[sc_author]',
|
327 |
+
'option_value' => $psp_settings['sc_author'],
|
328 |
+
'option_description' => __( 'Enter the Google+ URL to the default author profile for the articles on your site. For eg: https://plus.google.com/+Techblissonlinecom/about', 'platinum-seo-pack' ),
|
329 |
+
);
|
330 |
+
|
331 |
+
$psp_sc_author_field_id = 'psp_social_sc_author';
|
332 |
+
$psp_sc_author_field_title = __( 'Author (Default) : ', 'platinum-seo-pack' );
|
333 |
+
|
334 |
+
add_settings_field( $psp_sc_author_field_id, $psp_sc_author_field_title, array( &$this, 'psp_add_field_text' ), $this->psp_social_settings_group, $section_id, $psp_sc_author_field);
|
335 |
+
************/
|
336 |
+
}
|
337 |
+
|
338 |
+
function sanitize_social_settings($settings) {
|
339 |
+
|
340 |
+
$psp_allowed_protocols = array('http','https');
|
341 |
+
|
342 |
+
if ( isset( $settings['psp_og_tags_enabled'] ) ) {
|
343 |
+
$settings['psp_og_tags_enabled'] = !is_null(filter_var($settings['psp_og_tags_enabled'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['psp_og_tags_enabled'] : '';
|
344 |
+
}
|
345 |
+
|
346 |
+
if( isset( $settings['fb_site_name'] ) ) $settings['fb_site_name'] = sanitize_text_field( $settings['fb_site_name'] );
|
347 |
+
if( isset( $settings['fb_admins'] ) ) $settings['fb_admins'] = sanitize_text_field( $settings['fb_admins'] );
|
348 |
+
if( isset( $settings['fb_app'] ) ) $settings['fb_app'] = sanitize_text_field( $settings['fb_app'] );
|
349 |
+
if( isset( $settings['fb_secret'] ) ) $settings['fb_secret'] = sanitize_text_field( $settings['fb_secret'] );
|
350 |
+
if( isset( $settings['fb_profile'] ) ) $settings['fb_profile'] = sanitize_text_field( $settings['fb_profile'] );
|
351 |
+
if ( isset( $settings['fb_publisher'] ) ) {
|
352 |
+
$settings['fb_publisher'] = esc_url_raw( $settings['fb_publisher'], $psp_allowed_protocols );
|
353 |
+
}
|
354 |
+
|
355 |
+
if ( isset( $settings['fb_og_type'] ) ) {
|
356 |
+
$settings['fb_og_type'] = sanitize_text_field($settings['fb_og_type']) ;
|
357 |
+
|
358 |
+
$fb_og_types = array ('website', 'article', 'books.author', 'books.book', 'books.genre', 'business.business', 'fitness.course', 'game.achievement', 'music.album', 'music.playlist', 'music.radio_station', 'music.song', 'place', 'product', 'product.group', 'product.item', 'profile', 'restaurant.menu', 'restaurant.menu_item', 'restaurant.menu_section', 'restaurant.restaurant', 'video.episode', 'video.movie', 'video.other', 'video.tv_show');
|
359 |
+
|
360 |
+
if (!in_array($settings['fb_og_type'], $fb_og_types)) {
|
361 |
+
$settings['fb_og_type'] = '';
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
if ( isset( $settings['fb_locale'] ) ) {
|
366 |
+
$settings['fb_locale'] = sanitize_text_field($settings['fb_locale']) ;
|
367 |
+
|
368 |
+
$fb_locales = array ('en_us', 'ca_es', 'cs_cz', 'cx_ph', 'cy_gb', 'da_dk', 'de_de', 'eu_es', 'en_pi', 'en_ud', 'es_la', 'es_co', 'es_es', 'gn_py', 'fi_fi', 'fr_fr', 'gl_es', 'hu_hu', 'it_it', 'ja_jp', 'ko_kr', 'nb_no', 'nn_no', 'nl_nl', 'fy_nl', 'pl_pl', 'pt_br', 'pt_pt', 'ro_ro', 'ru_ru', 'sk_sk', 'sl_si', 'sv_se', 'th_th', 'tr_tr', 'ku_tr', 'zh_cn', 'zh_hk', 'zh_tw', 'fb_lt', 'af_za', 'sq_al', 'hy_am', 'az_az', 'be_by', 'bn_in', 'bs_ba', 'bg_bg', 'hr_hr', 'nl_be', 'en_gb', 'eo_eo', 'et_ee', 'fo_fo', 'fr_ca', 'ka_ge', 'el_gr', 'gu_in', 'hi_in', 'is_is', 'id_id', 'ga_ie', 'jv_id', 'kn_in', 'kk_kz', 'la_va', 'lv_lv', 'lt_lt', 'mk_mk', 'ms_my', 'mr_in', 'mn_mn', 'ne_np', 'pa_in', 'sr_rs', 'sw_ke', 'tl_ph', 'ta_in', 'te_in', 'ml_in', 'uk_ua', 'uz_uz', 'vi_vn', 'km_kh', 'tg_tj', 'ar_ar', 'he_il', 'ur_pk', 'fa_ir', 'ps_af', 'si_lk', 'ja_ks');
|
369 |
+
|
370 |
+
if (!in_array($settings['fb_locale'], $fb_locales)) {
|
371 |
+
$settings['fb_locale'] = '';
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( isset( $settings['fb_default_image'] ) ) {
|
376 |
+
$settings['fb_default_image'] = esc_url_raw( $settings['fb_default_image'], $psp_allowed_protocols );
|
377 |
+
}
|
378 |
+
|
379 |
+
if ( isset( $settings['psp_twitter_card_enabled'] ) ) {
|
380 |
+
$settings['psp_twitter_card_enabled'] = !is_null(filter_var($settings['psp_twitter_card_enabled'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['psp_twitter_card_enabled'] : '';
|
381 |
+
}
|
382 |
+
|
383 |
+
if ( isset( $settings['tw_ct_type'] ) ) {
|
384 |
+
$settings['tw_ct_type'] = sanitize_text_field($settings['tw_ct_type']);
|
385 |
+
|
386 |
+
$tw_card_types = array ('summary', 'summary_large_image', 'player', 'app');
|
387 |
+
|
388 |
+
if (!in_array($settings['tw_ct_type'], $tw_card_types)) {
|
389 |
+
$settings['tw_ct_type'] = '';
|
390 |
+
}
|
391 |
+
}
|
392 |
+
|
393 |
+
if( isset( $settings['tw_user'] ) ) $settings['tw_user'] = sanitize_text_field( $settings['tw_user'] );
|
394 |
+
|
395 |
+
if ( isset( $settings['tw_default_image'] ) ) {
|
396 |
+
$settings['tw_default_image'] = esc_url_raw( $settings['tw_default_image'], $psp_allowed_protocols );
|
397 |
+
}
|
398 |
+
|
399 |
+
if ( isset( $settings['psp_schemaorg_markup_enabled'] ) ) {
|
400 |
+
$settings['psp_schemaorg_markup_enabled'] = !is_null(filter_var($settings['psp_schemaorg_markup_enabled'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['psp_schemaorg_markup_enabled'] : '';
|
401 |
+
}
|
402 |
+
|
403 |
+
return $settings;
|
404 |
+
|
405 |
+
}
|
406 |
+
|
407 |
+
function section_fb_desc() {echo '';}
|
408 |
+
function section_twitter_desc() {echo ''; }
|
409 |
+
function section_schema_org_desc() {echo ''; }
|
410 |
+
function section_social_share_desc() {echo ''; }
|
411 |
+
function section_media_share_desc() {echo ''; }
|
412 |
+
|
413 |
+
/*
|
414 |
+
* renders Plugin social settings page, checks
|
415 |
+
* for the active tab and replaces key with the related
|
416 |
+
* settings key. Uses the plugin_options_tabs method
|
417 |
+
* to render the tabs.
|
418 |
+
*/
|
419 |
+
function psp_social_options_page() {
|
420 |
+
$tab = isset( $_GET['pspsocial'] ) ? Sanitize_key($_GET['pspsocial']) : $this->psp_social_settings_group;
|
421 |
+
|
422 |
+
$psp_pre_settings = get_option('psp_pre_setting');
|
423 |
+
$psp_premium_valid = isset($psp_pre_settings['psp_premium_license_key_status']) ? $psp_pre_settings['psp_premium_license_key_status'] : '';
|
424 |
+
//$psp_premium_status = isset($psp_pre_settings['psp_premium_license_key_status']) ? $psp_pre_settings['psp_premium_license_key_status'] : '';
|
425 |
+
|
426 |
+
if ($tab == $this->psp_social_settings_group) {
|
427 |
+
$psp_button = "submitsocial";
|
428 |
+
$psp_nonce_field = "psp-social";
|
429 |
+
} elseif ($tab == $this->psp_social_share_settings_group) {
|
430 |
+
$psp_button = "submitsocialshare";
|
431 |
+
$psp_nonce_field = "psp-social-share";
|
432 |
+
}
|
433 |
+
?>
|
434 |
+
<div class="wrap">
|
435 |
+
<h1 style='line-height:30px;'><?php esc_html_e('Techblissonline Platinum SEO Pack -
|
436 |
+
Social', 'platinum-seo-pack') ?></h1>
|
437 |
+
<p style="color: red"><?php esc_html_e('You need to click the "Save Settings" button to save the changes you made to each individual tab before moving on to the next tab.', 'platinum-seo-pack') ?></p>
|
438 |
+
<?php $this->psp_social_tabs(); ?>
|
439 |
+
<?php if (($tab == $this->psp_social_share_settings_group && $psp_premium_valid) || $tab == $this->psp_social_settings_group) { ?>
|
440 |
+
<form name="platinum-seo-form" method="post" action="options.php">
|
441 |
+
<?php wp_nonce_field( $psp_nonce_field ); ?>
|
442 |
+
<?php settings_fields( $tab ); ?>
|
443 |
+
<?php settings_errors(); ?>
|
444 |
+
<?php do_settings_sections( $tab ); ?>
|
445 |
+
<?php submit_button('Save Settings', 'primary', $psp_button); ?>
|
446 |
+
</form>
|
447 |
+
<?php } else { include_once( 'psp_premiumad_metabox_renderer.php' ); } ?>
|
448 |
+
<div class="sidebar-cta">
|
449 |
+
<h2>
|
450 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a>
|
451 |
+
</h2>
|
452 |
+
<div class="container bg-info" id="tools" style="width:100%">
|
453 |
+
<div class="row"><div class="h3 col-sm-12"><a class="btn-primary col-sm-12" href="https://techblissonline.com/tools/platinum-seo-wordpress-premium/" target="_blank">Platinum SEO Premium for wordpress</a></div><div class="h3 col-sm-12"><a class="btn-success col-sm-12" href="https://techblissonline.com/tools/" target="_blank">Techblissonline Platinum SEO Audit and Analysis Tools</a></div></div>
|
454 |
+
</div>
|
455 |
+
<a href="https://techblissonline.com/tools/" target="_blank">Be our Patreon and enjoy these premium Wordpress SEO tools for just $9</a>
|
456 |
+
<div class="container" style="width:100%"><a href="https://techblissonline.com/tools/" target="_blank"><span class="col-sm-10 dashicons dashicons-thumbs-up dashicons-psp"></span></a></div>
|
457 |
+
</div>
|
458 |
+
</div>
|
459 |
+
<?php
|
460 |
+
}
|
461 |
+
|
462 |
+
/*
|
463 |
+
* Renders our tabs in the plugin options page,
|
464 |
+
* walks through the object's tabs array and prints
|
465 |
+
* them one by one. Provides the heading for the
|
466 |
+
* psp_options_page method.
|
467 |
+
*/
|
468 |
+
function psp_social_tabs() {
|
469 |
+
$current_tab = isset( $_GET['pspsocial'] ) ? Sanitize_key($_GET['pspsocial']) : $this->psp_social_settings_group;
|
470 |
+
//$current_tab = $active_tab;
|
471 |
+
wp_enqueue_style("psp-settings-bs-css", plugins_url( '/css/psp-settings-bs.css', __FILE__ ));
|
472 |
+
wp_enqueue_style("psp-htmlsettings-css", plugins_url( '/css/psp-html-settings.css', __FILE__ ));
|
473 |
+
//screen_icon();
|
474 |
+
echo '<h2 class="nav-tab-wrapper">';
|
475 |
+
foreach ( $this->psp_settings_tabs as $tab_key => $tab_caption ) {
|
476 |
+
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
477 |
+
echo '<a class="nav-tab ' . esc_attr($active) . '" href="?page=' . esc_attr($this->psp_plugin_options_key) . '&pspsocial=' . esc_attr($tab_key) . '">' . esc_attr($tab_caption) . '</a>';
|
478 |
+
}
|
479 |
+
echo '</h2>';
|
480 |
+
}
|
481 |
+
}
|
psp-include/settings/psp_tools_renderer.php
ADDED
@@ -0,0 +1,43 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Techblissonline Platinum SEO and Social Pack
|
4 |
+
Description: Complete SEO and Social optimization solution for your Wordpress blog/site.
|
5 |
+
Text Domain: platinum-seo-pack
|
6 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
7 |
+
Author: Rajesh - Techblissonline
|
8 |
+
Author URI: https://techblissonline.com/
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<div id="logo" class="container-fluid" style="width:90%">
|
12 |
+
<div class="row m-2 p-1"><div class="h3 col-sm-12">
|
13 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a></div></div>
|
14 |
+
</div><!-- end of #logo -->
|
15 |
+
<div class="clearfix"></div>
|
16 |
+
<div class="container bg-info" id="header" style="width:90%">
|
17 |
+
<h1 class="btn-success"> Tools </h1>
|
18 |
+
</div>
|
19 |
+
<div class="clearfix"></div>
|
20 |
+
<div class="container bg-success" id="header" style="width:90%">
|
21 |
+
<p> These are premium tools available as SaaS on Techblissonline.com. You can subscribe to them for just 9$ Google NLP Entity Analyser is available for subscribers who pay 14$. You also get to download Platinum SEO Premium for free, if you buy this subscription for one month. Subscribe <a href="https://techblissonline.com/tools/" target="_blank">here</a></p>
|
22 |
+
</div>
|
23 |
+
<div class="clearfix"></div>
|
24 |
+
<div class="container-fluid bg-info form-group" id="tools" style="width:90%">
|
25 |
+
<div class="row m-auto p-1"><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/tf-idf-analysis/" target="_blank">TF-IDF Analysis of Competition</a></div><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/seo-analysis/" target="_blank">On Page SEO Analysis Tool</a></div></div>
|
26 |
+
<div class="row m-auto p-1"><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/competition-analysis-report/" target="_blank">Competition Analysis Reporter Tool</a></div><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/keyword-density-analysis-tool/" target="_blank">Keyword Density Analysis Tool</a></div></div>
|
27 |
+
<div class="row m-auto p-1"><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/readability/" target="_blank">Readability Analyzer (From Text)</a></div><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/readability-from-url/" target="_blank">Readability Analyzer (From URL)</a></div></div>
|
28 |
+
<div class="row m-auto p-1"><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/ga-insights/" target="_blank">Google Analytics Insights Dashboard</a></div><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/query-explorer/" target="_blank">Google Analytics Chart Explorer</a></div></div>
|
29 |
+
<div class="row m-auto p-1"><div class="h3 col-sm-6"><a class="text-white bs-link" href="https://techblissonline.com/tools/check-grammar/" target="_blank">Check Grammar (From Text or URL)</a></div><div class="h3 col-sm-6"></div></div>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
<div class="clearfix"></div>
|
33 |
+
<div class="container-fluid bg-info form-group" id="main-tool" style="width:90%">
|
34 |
+
<div class="row m-2 p-1"><div class="h3 col-sm-12"><a class="text-white bs-link" href="https://techblissonline.com/tools/json-schema-generator/" target="_blank">JSON Schema Generator</a><span class="badge btn-success">Free</span><span class="badge btn-success">Sign in required</span></div></div>
|
35 |
+
<div class="row m-2 p-1"><div class="h3 col-sm-12"><a class="text-white bs-link" href="https://techblissonline.com/tools/rewrite-rules-generator/" target="_blank">Rewrite Rules Generator</a></div></div>
|
36 |
+
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<div class="clearfix"></div>
|
40 |
+
<div class="container-fluid bg-info form-group" id="entity-tool" style="width:90%">
|
41 |
+
<div class="row m-2 p-1"><div class="h3 col-sm-12"><a class="text-white bs-link" href="https://techblissonline.com/tools/entity-analysis/" target="_blank">Google NLP Entity and Sentiment Analysis</a></div></div>
|
42 |
+
|
43 |
+
</div>
|
psp-include/settings/psp_tools_settings.php
ADDED
@@ -0,0 +1,572 @@
|
|
Â
|
|
Â
|
|
Â
|
|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|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Techblissonline Platinum SEO and Social Pack
|
5 |
+
Description: Tools management class
|
6 |
+
Text Domain: platinum-seo-pack
|
7 |
+
Plugin URI: https://techblissonline.com/platinum-wordpress-seo-plugin/
|
8 |
+
Author: Rajesh - Techblissonline
|
9 |
+
Author URI: https://techblissonline.com/
|
10 |
+
*/
|
11 |
+
|
12 |
+
class PspToolSettings extends PspSettings {
|
13 |
+
|
14 |
+
private static $obj_handle = null;
|
15 |
+
|
16 |
+
private $psp_helper;
|
17 |
+
private $psp_settings_instance;
|
18 |
+
private $sitename;
|
19 |
+
private $sitedescription;
|
20 |
+
|
21 |
+
private $plugin_settings_tabs = array();
|
22 |
+
|
23 |
+
private $psp_robots_settings_group = 'psp_robotstxt';
|
24 |
+
private $psp_htaccess_settings_group = 'psp_htaccess';
|
25 |
+
private $psp_ga_settings_group = 'psp_analytics';
|
26 |
+
|
27 |
+
protected $psp_plugin_options_key = 'psp-tools-by-techblissonline';
|
28 |
+
private $psp_settings_tabs = array();
|
29 |
+
|
30 |
+
public $robotstxt_file = '';
|
31 |
+
public $htaccess_file = '';
|
32 |
+
public $sitemap_file = '';
|
33 |
+
|
34 |
+
public static function get_instance() {
|
35 |
+
|
36 |
+
if ( null == self::$obj_handle ) {
|
37 |
+
self::$obj_handle = new self;
|
38 |
+
}
|
39 |
+
|
40 |
+
return self::$obj_handle;
|
41 |
+
|
42 |
+
} // end get_instance;
|
43 |
+
|
44 |
+
function __construct() {
|
45 |
+
|
46 |
+
$psp_helper_instance = PspHelper::get_instance();
|
47 |
+
$this->psp_helper = $psp_helper_instance;
|
48 |
+
|
49 |
+
//$psp_settings_instance = PspSettings::get_instance();
|
50 |
+
//$this->psp_settings_instance = $psp_settings_instance;
|
51 |
+
|
52 |
+
$this->sitename = $psp_helper_instance->get_sitename();
|
53 |
+
|
54 |
+
$this->psp_settings_tabs[$this->psp_ga_settings_group] = 'GA Tracking Code Editor';
|
55 |
+
$this->psp_settings_tabs[$this->psp_robots_settings_group] = 'Robots.txt Editor';
|
56 |
+
$this->psp_settings_tabs[$this->psp_htaccess_settings_group] = '.htaccess Editor';
|
57 |
+
|
58 |
+
add_action( 'admin_init', array( &$this, 'psp_tools_settings_init' ) );
|
59 |
+
//add_action( 'admin_menu', array( &$this, 'add_admin_menus' ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
function psp_tools_settings_init() {
|
63 |
+
|
64 |
+
$tab = isset( $_GET['psptools'] ) ? sanitize_key($_GET['psptools']) : $this->psp_ga_settings_group;
|
65 |
+
|
66 |
+
wp_enqueue_style("psp-settings-css", plugins_url( '/css/psp-settings.css', __FILE__ ));
|
67 |
+
|
68 |
+
$this->robotstxt_file = get_home_path() . 'robots.txt';
|
69 |
+
$this->htaccess_file = get_home_path() . '.htaccess';
|
70 |
+
$this->sitemap_file = get_home_path() . 'sitemap.xml';
|
71 |
+
|
72 |
+
$this->register_ga_settings();
|
73 |
+
$this->register_robotstxt_settings();
|
74 |
+
$this->register_htaccess_settings();
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
/*
|
79 |
+
* Registers the google analytics tracking code and appends the
|
80 |
+
* key to the settings tabs array.
|
81 |
+
*/
|
82 |
+
private function register_ga_settings() {
|
83 |
+
$this->psp_settings_tabs[$this->psp_ga_settings_group] = 'GA Tracking Code Editor';
|
84 |
+
$psp_ga_settings_name = "psp_ga_settings";
|
85 |
+
|
86 |
+
$psp_ga_settings = get_option($psp_ga_settings_name);
|
87 |
+
|
88 |
+
//register
|
89 |
+
register_setting( $this->psp_ga_settings_group, $psp_ga_settings_name, array( &$this, 'sanitize_ga_settings' ) );
|
90 |
+
//add Section
|
91 |
+
add_settings_section( 'psp_section_ga', esc_html__('Google analytics Tracking', 'platinum-seo-pack' ), array( &$this, 'section_ga_desc' ), $this->psp_ga_settings_group );
|
92 |
+
|
93 |
+
//add fields
|
94 |
+
//Enable Google analytics tracking code addition by this plugin.
|
95 |
+
$psp_ga_enable_field = array (
|
96 |
+
'label_for' => 'psp_ga_enable',
|
97 |
+
'option_name' => $psp_ga_settings_name.'[ga_tc_enabled]',
|
98 |
+
'option_value' => isset($psp_ga_settings['ga_tc_enabled']) ? esc_attr($psp_ga_settings['ga_tc_enabled']) : '',
|
99 |
+
'checkbox_label' => esc_html__( 'Yes', 'platinum-seo-pack' ),
|
100 |
+
'option_description' => esc_html__( 'Check to add Google analytics Tracking Code with this plugin. If this is not checked, trscking code will not be added by this plugin.', 'platinum-seo-pack' ),
|
101 |
+
);
|
102 |
+
|
103 |
+
$psp_ga_enable_field_id = 'psp_ga_enable';
|
104 |
+
$psp_ga_enable_field_title = esc_html__('Add Tracking Code: ', 'platinum-seo-pack');
|
105 |
+
|
106 |
+
add_settings_field( $psp_ga_enable_field_id, $psp_ga_enable_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_ga_settings_group, 'psp_section_ga', $psp_ga_enable_field);
|
107 |
+
|
108 |
+
//tracking code entry textarea
|
109 |
+
$psp_ga_tracking_code_field = array (
|
110 |
+
'label_for' => 'psp_ga_tracking_code_id',
|
111 |
+
'option_name' => $psp_ga_settings_name.'[tracking_code]',
|
112 |
+
'option_value' => isset($psp_ga_settings['tracking_code']) ? html_entity_decode( $psp_ga_settings['tracking_code'], ENT_QUOTES) : '',
|
113 |
+
'option_description' => esc_html__( 'Here you may enter the google analytics tracking code for adding it across all pages of the site.', 'platinum-seo-pack' ),
|
114 |
+
);
|
115 |
+
|
116 |
+
add_settings_field( 'psp_ga_tracking_code_id', esc_html__( 'Tracking Code:', 'platinum-seo-pack' ), array( &$this, 'psp_add_field_textarea_js' ), $this->psp_ga_settings_group, 'psp_section_ga', $psp_ga_tracking_code_field );
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
function section_ga_desc() {echo '';}
|
121 |
+
|
122 |
+
function sanitize_ga_settings($settings) {
|
123 |
+
if ( isset( $settings['ga_tc_enabled'] ) ) {
|
124 |
+
$settings['ga_tc_enabled'] = !is_null(filter_var($settings['ga_tc_enabled'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['ga_tc_enabled'] : '';
|
125 |
+
} else {
|
126 |
+
$settings['ga_tc_enabled'] = '';
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( isset( $settings['tracking_code'] ) ) {
|
130 |
+
$allowed_html = array(
|
131 |
+
'script' => array(
|
132 |
+
'src' => array(),
|
133 |
+
'async' => array(),
|
134 |
+
),
|
135 |
+
);
|
136 |
+
|
137 |
+
$settings['tracking_code'] = wp_kses($settings['tracking_code'], $allowed_html);
|
138 |
+
$settings['tracking_code'] = sanitize_textarea_field(htmlentities ($settings['tracking_code']) );
|
139 |
+
//$settings['tracking_code'] = base64_encode( $settings['tracking_code'] );
|
140 |
+
}
|
141 |
+
|
142 |
+
return $settings;
|
143 |
+
}
|
144 |
+
|
145 |
+
/*
|
146 |
+
* Registers the Robots.txt editor settings and appends the
|
147 |
+
* key to the plugin settings tabs array.
|
148 |
+
*/
|
149 |
+
private function register_robotstxt_settings() {
|
150 |
+
$this->psp_settings_tabs[$this->psp_robots_settings_group] = 'Robots.txt Editor';
|
151 |
+
$psp_robotstxt_settings_name = "psp_robotstxt_settings";
|
152 |
+
$disabled = 0;
|
153 |
+
$option_description = "";
|
154 |
+
$psp_tab = isset( $_GET['psptools'] ) ? sanitize_key($_GET['psptools']) : '';
|
155 |
+
$psp_admin_page = isset( $_GET['page'] ) ? sanitize_key($_GET['page']) : '';
|
156 |
+
//$psp_settings_updated = isset( $_GET['settings-updated'] ) ? sanitize_key($_GET['settings-updated']) : '';
|
157 |
+
|
158 |
+
$psp_robotstxt_settings = get_option($psp_robotstxt_settings_name);
|
159 |
+
|
160 |
+
$robotstxt_content = "";
|
161 |
+
|
162 |
+
$robotstxt_content = $this->getDefaultRobots();
|
163 |
+
|
164 |
+
//register
|
165 |
+
register_setting( $this->psp_robots_settings_group, $psp_robotstxt_settings_name, array( &$this, 'sanitize_robotstxt_settings' ) );
|
166 |
+
//add Section
|
167 |
+
add_settings_section( 'psp_section_robotstxt', esc_html__('Robots.txt Editor', 'platinum-seo-pack' ), array( &$this, 'section_robotstxt_desc' ), $this->psp_robots_settings_group );
|
168 |
+
|
169 |
+
//add fields
|
170 |
+
|
171 |
+
$robotstxt_file = $this->robotstxt_file;
|
172 |
+
$use_virtual_robots_file = isset($psp_robotstxt_settings['use_virtual_robots_file']) ? esc_attr($psp_robotstxt_settings['use_virtual_robots_file']) : '';
|
173 |
+
|
174 |
+
if ( ! file_exists( $robotstxt_file )) {
|
175 |
+
if(( isset($_GET['settings-updated']) && true == sanitize_key($_GET['settings-updated'])) && ($psp_admin_page == 'psp-tools-by-techblissonline' ) && ($psp_tab == $this->psp_robots_settings_group ) && !$use_virtual_robots_file){
|
176 |
+
//echo "do nothing";
|
177 |
+
add_settings_error('psp_robotstxt_settings', 'use_virtual_robots_file', 'A physical robots.txt file has been created,', 'updated');
|
178 |
+
} else {
|
179 |
+
//virtual robots.txt file
|
180 |
+
$virtual_robots_field = array (
|
181 |
+
'label_for' => 'psp_virtual_robots_id',
|
182 |
+
'option_name' => $psp_robotstxt_settings_name.'[use_virtual_robots_file]',
|
183 |
+
'option_value' => $use_virtual_robots_file,
|
184 |
+
'checkbox_label' => esc_html__( 'Yes, use a virtual robots.txt file', 'platinum-seo-pack' ),
|
185 |
+
'option_description' => esc_html__( 'Checking this will not create a physical robots.txt file but your robots.txt content will be visible to all visitors including search engine bots when they try to access the robots.txt file in the root. Even if you keep this unchecked, a physical robots.txt file will be created by Techblissonline platinum seo when you hit the "Save Settings" button.However, This will happen only if the file is writeable to root. If the file is not writeable to root, the content that you see here will be presented as a virtual rotots.txt file & this is done by wordpress by default.', 'platinum-seo-pack' ),
|
186 |
+
);
|
187 |
+
|
188 |
+
//$virtual_robots_field_id = 'psp_'.$setting_name.'_use_virtual_robots_file';
|
189 |
+
$virtual_robots_field_title = esc_html__( 'Do you want to use the virtual robots.txt file created by wordpress? ', 'platinum-seo-pack' );
|
190 |
+
|
191 |
+
add_settings_field( 'psp_virtual_robots_id', $virtual_robots_field_title, array( &$this, 'psp_add_field_checkbox' ), $this->psp_robots_settings_group, 'psp_section_robotstxt', $virtual_robots_field );
|
192 |
+
}
|
193 |
+
} else {
|
194 |
+
|
195 |
+
//if(isset($_GET['settings-updated']) && $_GET['settings-updated'] == true){
|
196 |
+
//echo "do nothing";
|
197 |
+
//} else {
|
198 |
+
|
199 |
+
$robotstxt_file_handle = fopen( $robotstxt_file, 'r' );
|
200 |
+
|
201 |
+
$content = '';
|
202 |
+
if ( filesize( $robotstxt_file ) > 0 ) {
|
203 |
+
$content = fread( $robotstxt_file_handle, filesize( $robotstxt_file ) );
|
204 |
+
}
|
205 |
+
$robotstxt_content = esc_textarea( $content );
|
206 |
+
//$psp_robotstxt_settings['content'] = esc_textarea( $content );
|
207 |
+
fclose( $robotstxt_file_handle );
|
208 |
+
}
|
209 |
+
|
210 |
+
$option_description = "";
|
211 |
+
if ( ! is_writable( $robotstxt_file ) ) {
|
212 |
+
$disabled = 1;
|
213 |
+
$option_description = esc_html__( 'Robots.txt file exists in the root but it is not writeable. Make sure that it is writeable for you to write into it here.', 'platinum-seo-pack' );
|
214 |
+
}
|
215 |
+
|
216 |
+
//}
|
217 |
+
|
218 |
+
$content_field = array (
|
219 |
+
'label_for' => 'psp_robotstxt_content',
|
220 |
+
'option_name' => $psp_robotstxt_settings_name.'[content]',
|
221 |
+
'option_value' => $robotstxt_content,
|
222 |
+
'disabled' => $disabled,
|
223 |
+
'option_description' => $option_description,
|
224 |
+
);
|
225 |
+
|
226 |
+
add_settings_field( 'psp_robotstxt_content', '<a href="'.home_url().'/robots.txt">'.esc_html__('Robots.txt Content: ', 'platinum-seo-pack').'</a>', array( &$this, 'psp_add_field_textarea' ), $this->psp_robots_settings_group, 'psp_section_robotstxt', $content_field );
|
227 |
+
|
228 |
+
}
|
229 |
+
|
230 |
+
function sanitize_robotstxt_settings($settings) {
|
231 |
+
|
232 |
+
if ( isset( $settings['use_virtual_robots_file'] ) ) {
|
233 |
+
$settings['use_virtual_robots_file'] = !is_null(filter_var($settings['use_virtual_robots_file'],FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE)) ? $settings['use_virtual_robots_file'] : '';
|
234 |
+
}
|
235 |
+
|
236 |
+
if( isset( $settings['content'] ) ) $settings['content'] = sanitize_textarea_field( $settings['content'] );
|
237 |
+
|
238 |
+
return $settings;
|
239 |
+
}
|
240 |
+
|
241 |
+
function section_robotstxt_desc() {
|
242 |
+
$robotstxt_file = $this->robotstxt_file; //;
|
243 |
+
if ( ! file_exists( $robotstxt_file ) ) {
|
244 |
+
echo '<p style="color: orange">'.esc_html__('A physical robots.txt file does not exist in the root.', 'platinum-seo-pack') . '</p>';
|
245 |
+
} else {
|
246 |
+
if ( ! is_writable( $robotstxt_file ) ) {
|
247 |
+
echo '<p style="color: orange">'.esc_html__('A physical robots.txt file exists in the root but it is not writeable. Ensure that it is writeable for you to edit it here.', 'platinum-seo-pack') . '</p>';
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Get the default robots.txt content. This is copied as is from
|
254 |
+
* WP's `do_robots` function
|
255 |
+
*
|
256 |
+
* @since 1.0
|
257 |
+
* @access protected
|
258 |
+
* @uses get_option
|
259 |
+
* @return string The default robots.txt content
|
260 |
+
*/
|
261 |
+
protected function getDefaultRobots() {
|
262 |
+
|
263 |
+
$public = get_option('blog_public');
|
264 |
+
|
265 |
+
$output = "User-agent: *\n";
|
266 |
+
if ('0' == $public) {
|
267 |
+
$output .= "Disallow: /\n";
|
268 |
+
} else {
|
269 |
+
$home_url = site_url();
|
270 |
+
$site_url = parse_url( site_url() );
|
271 |
+
$path = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : '';
|
272 |
+
$output .= "Disallow: $path/wp-admin/\n";
|
273 |
+
$output .= "Allow: $path/wp-admin/admin-ajax.php\n";
|
274 |
+
//$output .= "\nSitemap: $home_url/sitemap.xml\n";
|
275 |
+
$sitemap_file = $this->sitemap_file;
|
276 |
+
if ( file_exists( $sitemap_file )) {
|
277 |
+
$output .= "\nSitemap: $home_url/sitemap.xml\n";
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
$psp_robotstxt_settings = get_option('psp_robotstxt_settings');
|
282 |
+
$psp_virtual_robots_content = isset($psp_robotstxt_settings['content']) ? stripcslashes(esc_textarea($psp_robotstxt_settings['content'])) : '';
|
283 |
+
$use_virtual_robots_file = isset($psp_robotstxt_settings['use_virtual_robots_file']) ? esc_attr($psp_robotstxt_settings['use_virtual_robots_file']) : '';
|
284 |
+
|
285 |
+
$robotstxt_file = $this->robotstxt_file;
|
286 |
+
|
287 |
+
if (file_exists($robotstxt_file)) $use_virtual_robots_file = '';
|
288 |
+
|
289 |
+
if (!empty($psp_virtual_robots_content) && $use_virtual_robots_file) {
|
290 |
+
$output = stripcslashes(esc_textarea(strip_tags($psp_virtual_robots_content)));
|
291 |
+
}
|
292 |
+
|
293 |
+
return $output;
|
294 |
+
}
|
295 |
+
|
296 |
+
public function psp_filter_virtual_robots($robots_content, $public)
|
297 |
+
{
|
298 |
+
if ('0' == $public) {
|
299 |
+
//$robots_content = getDefaultRobots();
|
300 |
+
} else {
|
301 |
+
$psp_robotstxt_settings = get_option('psp_robotstxt_settings');
|
302 |
+
$psp_virtual_robots_content = isset($psp_robotstxt_settings['content']) ? stripcslashes(esc_textarea($psp_robotstxt_settings['content'])) : '';
|
303 |
+
if ($psp_virtual_robots_content) {
|
304 |
+
$robots_content = stripcslashes(esc_textarea(strip_tags($psp_virtual_robots_content)));
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
return $robots_content;
|
309 |
+
}
|
310 |
+
|
311 |
+
/*
|
312 |
+
* Registers the .htaccess editor settings and appends the
|
313 |
+
* key to the plugin settings tabs array.
|
314 |
+
*/
|
315 |
+
private function register_htaccess_settings() {
|
316 |
+
$this->psp_settings_tabs[$this->psp_htaccess_settings_group] = '.htaccess Editor';
|
317 |
+
$psp_htaccess_settings_name = "psp_htaccess_settings";
|
318 |
+
|
319 |
+
$disabled = 0;
|
320 |
+
|
321 |
+
$psp_htaccess_settings = get_option($psp_htaccess_settings_name);
|
322 |
+
$htaccess_content = isset($psp_htaccess_settings['content']) ? stripcslashes(esc_textarea(html_entity_decode($psp_htaccess_settings['content']))) : '';
|
323 |
+
|
324 |
+
//wp_enqueue_script( 'psp-hta', plugins_url( '/js/cm-hta.js', __FILE__ ),array( 'jquery' ), false, true);
|
325 |
+
//$cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/nginx', 'codemirror'=> array('autoRefresh' => true)));
|
326 |
+
//wp_localize_script('psphta', 'cm_settings', $cm_settings);
|
327 |
+
|
328 |
+
//wp_enqueue_script( 'psp-input-toggler', plugins_url( '/js/pspinputtypetoggler.js', __FILE__ ), array( 'jquery' ) );
|
329 |
+
//register
|
330 |
+
register_setting( $this->psp_htaccess_settings_group, $psp_htaccess_settings_name, array( &$this, 'sanitize_htaccess_settings' ) );
|
331 |
+
//add Section
|
332 |
+
add_settings_section( 'psp_section_htaccess', esc_html__('.htaccess Editor', 'platinum-seo-pack' ), array( &$this, 'section_htaccess_desc' ), $this->psp_htaccess_settings_group );
|
333 |
+
|
334 |
+
//add fields
|
335 |
+
|
336 |
+
$htaccess_file = $this->htaccess_file;
|
337 |
+
|
338 |
+
if ( ! file_exists( $htaccess_file ) ) {
|
339 |
+
//echo "do nothing";
|
340 |
+
add_settings_error('psp_htaccess_settings', esc_html( 'psp_htaccess_content' ), '.htaccess file does not seem to exist in the root! Ensure that you have one to write into it here.', 'error');
|
341 |
+
} else {
|
342 |
+
|
343 |
+
if( isset($_GET['settings-updated']) && true == sanitize_key($_GET['settings-updated'])){
|
344 |
+
//echo "do nothing";
|
345 |
+
} else {
|
346 |
+
|
347 |
+
$htaccess_file_handle = fopen( $htaccess_file, 'r' );
|
348 |
+
|
349 |
+
$content = '';
|
350 |
+
if ( filesize( $htaccess_file ) > 0 ) {
|
351 |
+
$content = fread( $htaccess_file_handle, filesize( $htaccess_file ) );
|
352 |
+
}
|
353 |
+
$htaccess_content = esc_textarea( $content );
|
354 |
+
//$psp_robotstxt_settings['content'] = esc_textarea( $content );
|
355 |
+
fclose( $htaccess_file_handle );
|
356 |
+
|
357 |
+
}
|
358 |
+
$option_description = "";
|
359 |
+
if ( ! is_writable( $htaccess_file ) ) {
|
360 |
+
$disabled = 1;
|
361 |
+
$option_description = esc_html__( '.htaccess file exists in the root but it is not writeable. Make sure that it is writeable for you to write into it here.', 'platinum-seo-pack' );
|
362 |
+
}
|
363 |
+
|
364 |
+
$content_field = array (
|
365 |
+
'label_for' => 'psp_htaccess_content',
|
366 |
+
'option_name' => $psp_htaccess_settings_name.'[content]',
|
367 |
+
'option_value' => $htaccess_content,
|
368 |
+
'disabled' => $disabled,
|
369 |
+
'option_description' => $option_description,
|
370 |
+
);
|
371 |
+
|
372 |
+
add_settings_field( 'psp_htaccess_content', esc_html__('.htaccess Content: ', 'platinum-seo-pack'), array( &$this, 'psp_add_field_textarea' ), $this->psp_htaccess_settings_group, 'psp_section_htaccess', $content_field );
|
373 |
+
}
|
374 |
+
|
375 |
+
}
|
376 |
+
|
377 |
+
function sanitize_htaccess_settings($settings) {
|
378 |
+
|
379 |
+
if( isset( $settings['content'] ) ) $settings['content'] = sanitize_textarea_field( wp_slash(htmlentities($settings['content'])) );
|
380 |
+
|
381 |
+
return $settings;
|
382 |
+
}
|
383 |
+
|
384 |
+
//function section_htaccess_desc() {echo ''; }
|
385 |
+
function section_htaccess_desc() {
|
386 |
+
$htaccess_file = $this->htaccess_file; //;
|
387 |
+
if ( ! file_exists( $htaccess_file ) ) {
|
388 |
+
echo '<p style="color: orange">'.esc_html__('A .htaccess file does not exist in the root! Ensure that you have not accidentally deleted it!', 'platinum-seo-pack') . '</p>';
|
389 |
+
} else {
|
390 |
+
if ( ! is_writable( $htaccess_file ) ) {
|
391 |
+
echo '<p style="color: orange">'.esc_html__('A .htaccess file exists in the root but it is not writeable. Ensure that it is writeable for you to edit it here.', 'platinum-seo-pack') . '</p>';
|
392 |
+
}
|
393 |
+
}
|
394 |
+
}
|
395 |
+
|
396 |
+
/*
|
397 |
+
* Callback for adding a textarea.
|
398 |
+
*/
|
399 |
+
function psp_add_field_textarea(array $args) {
|
400 |
+
|
401 |
+
$option_name = isset($args['option_name']) ? $args['option_name'] : '';
|
402 |
+
$id = isset($args['label_for']) ? $args['label_for'] : '';
|
403 |
+
$option_value = isset($args['option_value']) ? esc_textarea( html_entity_decode(($args['option_value']) )) : '';
|
404 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
405 |
+
$option_disabled = "";
|
406 |
+
if (isset($args['disabled']) && $args['disabled']) $option_disabled = "disabled='disabled'";
|
407 |
+
|
408 |
+
echo "<textarea id='".esc_attr($id)."' name='".esc_attr($option_name)."' ".esc_html($option_disabled)." rows='50' style='width:99%' type='textarea'>{$option_value}</textarea><br /><p class='description'>".esc_html($option_description)."</p>";
|
409 |
+
|
410 |
+
//echo "<textarea rows='4' id='".$this->psp_home_settings_key['description']."' name='".$this->psp_home_settings_key['description']."'>".stripcslashes($this->psp_home_settings['description'])."</textarea>";
|
411 |
+
}
|
412 |
+
|
413 |
+
/*
|
414 |
+
* Callback for adding a textarea.
|
415 |
+
*/
|
416 |
+
function psp_add_field_textarea_js(array $args) {
|
417 |
+
|
418 |
+
$option_name = isset($args['option_name']) ? $args['option_name'] : '';
|
419 |
+
$id = isset($args['label_for']) ? $args['label_for'] : '';
|
420 |
+
|
421 |
+
//$option_value = isset($args['option_value']) ? esc_textarea(html_entity_decode(base64_decode( $args['option_value'] ), ENT_QUOTES)) : '';
|
422 |
+
//$option_value = isset($args['option_value']) ? esc_textarea(html_entity_decode( $args['option_value'], ENT_QUOTES)) : '';
|
423 |
+
$option_value = isset($args['option_value']) ? esc_textarea($args['option_value']) : '';
|
424 |
+
|
425 |
+
$option_description = isset($args['option_description']) ? esc_html( $args['option_description'] ) : '';
|
426 |
+
$option_disabled = "";
|
427 |
+
if (isset($args['disabled']) && $args['disabled']) $option_disabled = "disabled='disabled'";
|
428 |
+
|
429 |
+
echo "<textarea id='".esc_attr($id)."' name='".esc_attr($option_name)."' ".esc_html($option_disabled)." rows='50' style='width:99%' type='textarea'>{$option_value}</textarea><br /><p class='description'>".esc_html($option_description)."</p>";
|
430 |
+
|
431 |
+
//echo "<textarea rows='4' id='".$this->psp_home_settings_key['description']."' name='".$this->psp_home_settings_key['description']."'>".stripcslashes($this->psp_home_settings['description'])."</textarea>";
|
432 |
+
}
|
433 |
+
|
434 |
+
/*
|
435 |
+
* renders Plugin settings page, checks
|
436 |
+
* for the active tab and replaces key with the related
|
437 |
+
* settings key. Uses the plugin_options_tabs method
|
438 |
+
* to render the tabs.
|
439 |
+
*/
|
440 |
+
function psp_tools_options_page() {
|
441 |
+
$tab = isset( $_GET['psptools'] ) ? sanitize_key($_GET['psptools']) : $this->psp_ga_settings_group;
|
442 |
+
if ($tab == $this->psp_robots_settings_group) {
|
443 |
+
$psp_button = "submitrobotstxt";
|
444 |
+
$psp_nonce_field = "psp-robotstxt-nonce";
|
445 |
+
$psp_nonce_name = "psp-robotstxt";
|
446 |
+
$psp_cm_text_settings['codeEditor'] = wp_enqueue_code_editor(array('codemirror'=> array('autoRefresh' => true)));
|
447 |
+
wp_localize_script('psp-meta-box', 'psp_cm_text_settings', $psp_cm_text_settings);
|
448 |
+
wp_enqueue_script( 'psp-cm', plugins_url( '/js/cm.js', __FILE__ ),array( 'jquery' ), false, true);
|
449 |
+
} elseif ($tab == $this->psp_htaccess_settings_group) {
|
450 |
+
$psp_button = "submithtaccess";
|
451 |
+
$psp_nonce_field = "psp-htaccess-nonce";
|
452 |
+
$psp_nonce_name = "psp-htaccess";
|
453 |
+
$psp_cm_hta_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/nginx', 'codemirror'=> array('autoRefresh' => true)));
|
454 |
+
wp_localize_script('psp-meta-box', 'psp_cm_hta_settings', $psp_cm_hta_settings);
|
455 |
+
wp_enqueue_script( 'psp-hta', plugins_url( '/js/cm-hta.js', __FILE__ ),array( 'jquery' ), false, true);
|
456 |
+
} elseif ($tab == $this->psp_ga_settings_group) {
|
457 |
+
$psp_button = "submitanalyticscode";
|
458 |
+
$psp_nonce_field = "psp-ga-nonce";
|
459 |
+
$psp_nonce_name = "psp-ga";
|
460 |
+
$psp_cm_ga_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/javascript', 'codemirror'=> array('autoRefresh' => true)));
|
461 |
+
wp_localize_script('psp-meta-box', 'psp_cm_ga_settings', $psp_cm_ga_settings);
|
462 |
+
wp_enqueue_script( 'psp-cmjs', plugins_url( '/js/cmjs.js', __FILE__ ),array( 'jquery' ), false, true);
|
463 |
+
}
|
464 |
+
//if ( isset( $_POST['submitrobotstxt'] ) ) {
|
465 |
+
if((isset($_GET['settings-updated']) && true == sanitize_key($_GET['settings-updated'])) && ($tab == $this->psp_robots_settings_group )){
|
466 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
467 |
+
die( esc_html__( 'You cannot edit the robots.txt file.', 'platinum-seo-pack' ) );
|
468 |
+
}
|
469 |
+
|
470 |
+
//check_admin_referer( 'psp-robotstxt' );
|
471 |
+
$psp_settings = get_option("psp_robotstxt_settings");
|
472 |
+
$use_virtual_robots_file = isset($psp_settings['use_virtual_robots_file']) ? esc_attr($psp_settings['use_virtual_robots_file']) : '';
|
473 |
+
$robotscontent = isset($psp_settings['content']) ? stripcslashes( esc_textarea($psp_settings['content'] )) : '';
|
474 |
+
|
475 |
+
$robotstxt_file = $this->robotstxt_file; //;
|
476 |
+
|
477 |
+
if (!$use_virtual_robots_file) {
|
478 |
+
|
479 |
+
if (empty($robotscontent)) {
|
480 |
+
$robotscontent = $this->getDefaultRobots();
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( file_exists( $robotstxt_file )) {
|
484 |
+
|
485 |
+
if ( is_writable( $robotstxt_file ) ) {
|
486 |
+
$robotstxt_filehandle = fopen( $robotstxt_file, 'w+' );
|
487 |
+
fwrite( $robotstxt_filehandle, $robotscontent );
|
488 |
+
fclose( $robotstxt_filehandle );
|
489 |
+
$msg = esc_html__( 'Updated Robots.txt', 'platinum-seo-pack' );
|
490 |
+
}
|
491 |
+
} else {
|
492 |
+
if ( is_writable( get_home_path() ) ) {
|
493 |
+
$robotstxt_filehandle = fopen( $robotstxt_file, 'x' );
|
494 |
+
fwrite( $robotstxt_filehandle, $robotscontent );
|
495 |
+
fclose( $robotstxt_filehandle );
|
496 |
+
$msg = esc_html__( 'Created Robots.txt', 'platinum-seo-pack' );
|
497 |
+
}
|
498 |
+
}
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
+
//if ( isset( $_POST['submithtaccess'] ) ) {
|
503 |
+
if((isset($_GET['settings-updated']) && true == sanitize_key($_GET['settings-updated'])) && ($tab == $this->psp_htaccess_settings_group )){
|
504 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
505 |
+
die( esc_html__( 'You cannot edit the .htaccess file.', 'platinum-seo-pack' ) );
|
506 |
+
}
|
507 |
+
|
508 |
+
$psp_htaccess_settings = get_option("psp_htaccess_settings");
|
509 |
+
$htaccesscontent = isset($psp_htaccess_settings['content']) ? stripcslashes( html_entity_decode($psp_htaccess_settings['content']) ) : '';
|
510 |
+
|
511 |
+
$htaccess_file = $this->htaccess_file; //;
|
512 |
+
|
513 |
+
if ( file_exists( $htaccess_file )) {
|
514 |
+
|
515 |
+
if ( is_writable( $htaccess_file ) ) {
|
516 |
+
$htaccess_filehandle = fopen( $htaccess_file, 'w+' );
|
517 |
+
fwrite( $htaccess_filehandle, $htaccesscontent );
|
518 |
+
fclose( $htaccess_filehandle );
|
519 |
+
$msg = esc_html__( 'Updated .htaccess file', 'platinum-seo-pack' );
|
520 |
+
}
|
521 |
+
} else {
|
522 |
+
//do nothing.
|
523 |
+
}
|
524 |
+
|
525 |
+
}
|
526 |
+
?>
|
527 |
+
<div class="wrap">
|
528 |
+
<h1 style='line-height:30px;'><?php esc_html_e('Techblissonline Platinum SEO Pack Tools', 'platinum-seo-pack') ?></h1>
|
529 |
+
<p style="color: red"><?php esc_html_e('You need to click the "Save Settings" button to save the changes you made to each individual tab before moving on to the next tab.', 'platinum-seo-pack') ?></p>
|
530 |
+
<?php $this->psp_tools_tabs(); ?>
|
531 |
+
<form name="platinum-seo-form" method="post" action="options.php">
|
532 |
+
<?php wp_nonce_field( $psp_nonce_field, $psp_nonce_name );?>
|
533 |
+
<?php settings_fields( $tab ); ?>
|
534 |
+
<?php settings_errors(); ?>
|
535 |
+
<?php do_settings_sections( $tab ); ?>
|
536 |
+
<?php submit_button('Save Settings', 'primary', $psp_button); ?>
|
537 |
+
</form>
|
538 |
+
|
539 |
+
<div class="sidebar-cta">
|
540 |
+
<h2>
|
541 |
+
<a class="bookmarkme" href="<?php echo 'https://techblissonline.com/tools/'; ?>" target="_blank"><img src="<?php echo esc_url(PSP_PLUGIN_URL).'images/techblissonline-logo.png'; ?>" class="img-responsive" alt="Techblissonline Platinum SEO Wordpress Tools"/></a>
|
542 |
+
</h2>
|
543 |
+
<div class="container bg-info" id="tools" style="width:100%">
|
544 |
+
<div class="row"><div class="h3 col-sm-12"><a class="btn-primary col-sm-12" href="https://techblissonline.com/tools/platinum-seo-wordpress-premium/" target="_blank">Platinum SEO Premium for wordpress</a></div><div class="h3 col-sm-12"><a class="btn-success col-sm-12" href="https://techblissonline.com/tools/" target="_blank">Techblissonline Platinum SEO Audit and Analysis Tools</a></div></div>
|
545 |
+
|