Sync plugins from current page
Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,67 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Ultimate Category Excluder v0.8\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2012-08-29 12:33:25+0000\n"
|
||||
"Last-Translator: support <mail@infoland.dk>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Poedit-Language: Danish\n"
|
||||
"X-Poedit-Country: DENMARK\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"X-Poedit-Bookmarks: \n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Textdomain-Support: yes"
|
||||
|
||||
#: ultimate-category-excluder.php:19
|
||||
#: ultimate-category-excluder.php:29
|
||||
#@ UCE
|
||||
msgid "Ultimate Category Excluder Options"
|
||||
msgstr "Ultimate Category Excluder Indstillinger"
|
||||
|
||||
#: ultimate-category-excluder.php:19
|
||||
#@ UCE
|
||||
msgid "Category Exclusion"
|
||||
msgstr "Kategori ekskludering"
|
||||
|
||||
#: ultimate-category-excluder.php:31
|
||||
#@ UCE
|
||||
msgid "Use this page to select the categories you wish to exclude and where you would like to exclude them from."
|
||||
msgstr "Her kan du vælge hvilke kategorier du ønsker skal være synlige i det forskellige områder."
|
||||
|
||||
#: ultimate-category-excluder.php:36
|
||||
#@ UCE
|
||||
msgid "Category"
|
||||
msgstr "Kategori"
|
||||
|
||||
#: ultimate-category-excluder.php:37
|
||||
#@ UCE
|
||||
msgid "Exclude from Main Page?"
|
||||
msgstr "Skjul fra forsiden?"
|
||||
|
||||
#: ultimate-category-excluder.php:38
|
||||
#@ UCE
|
||||
msgid "Exclude from Feeds?"
|
||||
msgstr "Skjul fra RSS feeds?"
|
||||
|
||||
#: ultimate-category-excluder.php:39
|
||||
#@ UCE
|
||||
msgid "Exclude from Archives?"
|
||||
msgstr "Skjul fra indlægs arkiver?"
|
||||
|
||||
#: ultimate-category-excluder.php:61
|
||||
#@ UCE
|
||||
msgid "Update"
|
||||
msgstr "Gem ændringer"
|
||||
|
||||
#: ultimate-category-excluder.php:83
|
||||
#@ UCE
|
||||
msgid "Excludes successfully updated"
|
||||
msgstr "Ændringerne er gemt!"
|
||||
|
||||
BIN
wp-content/plugins/ultimate-category-excluder/languages/UCE-de_DE.mo
Executable file
BIN
wp-content/plugins/ultimate-category-excluder/languages/UCE-de_DE.mo
Executable file
Binary file not shown.
55
wp-content/plugins/ultimate-category-excluder/languages/UCE-de_DE.po
Executable file
55
wp-content/plugins/ultimate-category-excluder/languages/UCE-de_DE.po
Executable file
@@ -0,0 +1,55 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Ultimate Category Excluder\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-04-18 23:19+0100\n"
|
||||
"PO-Revision-Date: 2011-04-18 23:55+0100\n"
|
||||
"Last-Translator: Patrick Skiebe <patrick@skiebe.eu>\n"
|
||||
"Language-Team: Patrick Skiebe <patrick@skiebe.eu>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _e;__\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-Language: German\n"
|
||||
"X-Poedit-Country: GERMANY\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
#: ../ultimate-category-excluder.php:29
|
||||
msgid "Ultimate Category Excluder Options"
|
||||
msgstr "Ultimate Category Excluder Einstellungen"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
msgid "Category Exclusion"
|
||||
msgstr "Kategorien ausschließen"
|
||||
|
||||
#: ../ultimate-category-excluder.php:31
|
||||
msgid "Use this page to select the categories you wish to exclude and where you would like to exclude them from."
|
||||
msgstr "Auf dieser Seite können Sie Kategorien auswählen, die an bestimmten Stellen Ihrer Seite nicht erscheinen sollen."
|
||||
|
||||
#: ../ultimate-category-excluder.php:36
|
||||
msgid "Category"
|
||||
msgstr "Kategorie"
|
||||
|
||||
#: ../ultimate-category-excluder.php:37
|
||||
msgid "Exclude from Main Page?"
|
||||
msgstr "Von der Hauptseite ausschließen?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:38
|
||||
msgid "Exclude from Feeds?"
|
||||
msgstr "Von Newsfeeds ausschließen?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:39
|
||||
msgid "Exclude from Archives?"
|
||||
msgstr "Von Archivseiten ausschließen?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:61
|
||||
msgid "Update"
|
||||
msgstr "Aktualisieren"
|
||||
|
||||
#: ../ultimate-category-excluder.php:83
|
||||
msgid "Excludes successfully updated"
|
||||
msgstr "Ausgeschlossene Kategorien erfolgreich aktualisiert"
|
||||
|
||||
BIN
wp-content/plugins/ultimate-category-excluder/languages/UCE-en_EN.mo
Executable file
BIN
wp-content/plugins/ultimate-category-excluder/languages/UCE-en_EN.mo
Executable file
Binary file not shown.
55
wp-content/plugins/ultimate-category-excluder/languages/UCE-en_EN.po
Executable file
55
wp-content/plugins/ultimate-category-excluder/languages/UCE-en_EN.po
Executable file
@@ -0,0 +1,55 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Ultimate Category Excluder\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-04-18 23:19+0100\n"
|
||||
"PO-Revision-Date: 2011-04-18 23:54+0100\n"
|
||||
"Last-Translator: Michael Clark\n"
|
||||
"Language-Team: Michael Clark\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _e;__\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-Language: English\n"
|
||||
"X-Poedit-Country: UNITED STATES\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
#: ../ultimate-category-excluder.php:29
|
||||
msgid "Ultimate Category Excluder Options"
|
||||
msgstr "Ultimate Category Excluder Options"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
msgid "Category Exclusion"
|
||||
msgstr "Category Exclusion"
|
||||
|
||||
#: ../ultimate-category-excluder.php:31
|
||||
msgid "Use this page to select the categories you wish to exclude and where you would like to exclude them from."
|
||||
msgstr "Use this page to select the categories you wish to exclude and where you would like to exclude them from."
|
||||
|
||||
#: ../ultimate-category-excluder.php:36
|
||||
msgid "Category"
|
||||
msgstr "Category"
|
||||
|
||||
#: ../ultimate-category-excluder.php:37
|
||||
msgid "Exclude from Main Page?"
|
||||
msgstr "Exclude from Main Page?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:38
|
||||
msgid "Exclude from Feeds?"
|
||||
msgstr "Exclude from Feeds?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:39
|
||||
msgid "Exclude from Archives?"
|
||||
msgstr "Exclude from Archives?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:61
|
||||
msgid "Update"
|
||||
msgstr "Update"
|
||||
|
||||
#: ../ultimate-category-excluder.php:83
|
||||
msgid "Excludes successfully updated"
|
||||
msgstr "Excludes successfully updated"
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Ultimate Category Excluder\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-10-12 23:33-0500\n"
|
||||
"PO-Revision-Date: 2012-10-12 23:33-0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Leandro Coelho - Logistica Descomplicada www."
|
||||
"logisticadescomplicada.com\n"
|
||||
"Language: pt-br\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _e;__\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19 ../ultimate-category-excluder.php:29
|
||||
msgid "Ultimate Category Excluder Options"
|
||||
msgstr "Opções do Ultimate Category Excluder"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
msgid "Category Exclusion"
|
||||
msgstr "Exclusão de categoria"
|
||||
|
||||
#: ../ultimate-category-excluder.php:31
|
||||
msgid ""
|
||||
"Use this page to select the categories you wish to exclude and where you "
|
||||
"would like to exclude them from."
|
||||
msgstr ""
|
||||
"Utilize esta página para selecionar as categorías que você deseja excluir e "
|
||||
"de onde gostaria de excluí-las."
|
||||
|
||||
#: ../ultimate-category-excluder.php:36
|
||||
msgid "Category"
|
||||
msgstr "Categoria"
|
||||
|
||||
#: ../ultimate-category-excluder.php:37
|
||||
msgid "Exclude from Main Page?"
|
||||
msgstr "Excluir da Página Principal (homepage)?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:38
|
||||
msgid "Exclude from Feeds?"
|
||||
msgstr "Excluir dos Feeds?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:39
|
||||
msgid "Exclude from Archives?"
|
||||
msgstr "Excluir dos Arquivos?"
|
||||
|
||||
#: ../ultimate-category-excluder.php:61
|
||||
msgid "Update"
|
||||
msgstr "Atualizar"
|
||||
|
||||
#: ../ultimate-category-excluder.php:83
|
||||
msgid "Excludes successfully updated"
|
||||
msgstr "Exclusões atualizadas com sucesso"
|
||||
52
wp-content/plugins/ultimate-category-excluder/languages/UCE.pot
Executable file
52
wp-content/plugins/ultimate-category-excluder/languages/UCE.pot
Executable file
@@ -0,0 +1,52 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Ultimate Category Excluder\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-04-18 23:19+0100\n"
|
||||
"PO-Revision-Date: 2011-04-18 23:19+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _e;__\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ..\n"
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
#: ../ultimate-category-excluder.php:29
|
||||
msgid "Ultimate Category Excluder Options"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:19
|
||||
msgid "Category Exclusion"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:31
|
||||
msgid "Use this page to select the categories you wish to exclude and where you would like to exclude them from."
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:36
|
||||
msgid "Category"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:37
|
||||
msgid "Exclude from Main Page?"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:38
|
||||
msgid "Exclude from Feeds?"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:39
|
||||
msgid "Exclude from Archives?"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:61
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
|
||||
#: ../ultimate-category-excluder.php:83
|
||||
msgid "Excludes successfully updated"
|
||||
msgstr ""
|
||||
|
||||
93
wp-content/plugins/ultimate-category-excluder/readme.txt
Normal file
93
wp-content/plugins/ultimate-category-excluder/readme.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
=== Ultimate Category Excluder ===
|
||||
Contributors: Marios Alexandrou
|
||||
Donate link: https://infolific.com/technology/software-worth-using/ultimate-category-excluder/
|
||||
Tags: category, categories, exclude, exclude category, exclude categories, visible, hidden, hide, invisible, remove
|
||||
Requires at least: 4.0
|
||||
Tested up to: 5.1.1
|
||||
License: GPLv2 or later
|
||||
|
||||
Ultimate Category Excluder allows you to quickly and easily exclude categories from your front page, archives, feeds, and search results.
|
||||
|
||||
== Description ==
|
||||
|
||||
Ultimate Category Excluder, abbreviated as UCE, is a WordPress plugin that allows you to quickly and easily exclude categories from your front page, archives, feeds, and searches. Just select which categories you want to be excluded, and UCE does all the work for you!
|
||||
|
||||
== Installation ==
|
||||
|
||||
1. Download Ultimate Category Excluder.
|
||||
2. Unzip the ultimate-category-excluder.zip file.
|
||||
3. Activate the plugin on your plugins page.
|
||||
4. You can edit the options by going under "Settings" and then "Category Exclusion."
|
||||
5. If you are upgrading from an older version, you need to go into your "Category Exclusion" settings, choose at least one option from the Searches column, save settings, then go back and clear that option and save again.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= When I go to my search results page for any search I do, I get this PHP error: Warning: Invalid argument supplied for foreach() in /wp-content/plugins/ultimate-category-excluder/ultimate-category-excluder.php on line =
|
||||
|
||||
Go into your "Category Exclusion" settings, choose at least one option from the Searches column, save settings, then go back and clear that option and save again.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Check the categories you want to exclude.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.1 =
|
||||
* Bug fix for compatibility with Yoast Video SEO plugin.
|
||||
|
||||
= 1.0 =
|
||||
* Bug fix thanks to Golemming (re. deprecated function mysql_get_server_info).
|
||||
* Compatibility with WordPress 4.4.2 confirmed.
|
||||
* Documentation updated. No functionality changed.
|
||||
* Plugin development and support transferred from Michael Clark to Marios Alexandrou.
|
||||
|
||||
= 0.96 =
|
||||
* September 11, 2013 - Went back to the last known (no complaints at least!) version, 0.84.
|
||||
|
||||
= 0.95 =
|
||||
* September 10, 2013 - Fixed some more bugs that I introduced while trying to fix other bugs. Cleaned up the code, tried to be more consistent with line spacing and indents so everything is easier to read. Released the Beta version.
|
||||
|
||||
= 0.94 =
|
||||
* September 9, 2013 - It turns out that some themes process their home pages in odd ways. This resulted in UCE no longer correctly filtering out the excluded categories. This was a hard bug to figure out, as I couldn't reproduce it on any of my sites. I think I've got it fixed now, but I do have a report that UCE is now causing a conflict with a separate page on the site. So I am working on that; but since this version should fix most people's home pages, I'm releasing it while continuing to bug hunt. Thank you for your patience. Many thanks to Michael Westergaard, Alyx Hydrick, Alain Saintpo, Seth Vore, and Michael Pollock for their help in figuring out what was happening.
|
||||
|
||||
I also fixed several very subtle bugs that were throwing error messages behind the scenes. And I tweaked the system information section at the bottom of the UCE settings page.
|
||||
|
||||
Added the Danish translation. I don't who to thank for providing this.
|
||||
Added Brazilian translation. Thank you to Leandro Callegari Coelho.
|
||||
Feel free to send me other languages if you like.
|
||||
|
||||
= 0.91 =
|
||||
* September 4, 2013 - You can now exclude categories from appearing in results from the built-in WordPress search engine. Other search engines (e.g. Bing, Google) may still be able to find and index your content. Also fixed a bug that excluded categories from appearing in the Post Editor. And fixed a bug in the system information section.
|
||||
|
||||
= 0.84 =
|
||||
* August 3, 2013 - Fixed empty category bug. Again.
|
||||
|
||||
= 0.83 =
|
||||
* August 2, 2013 - Added code to give version info for MySQL, PHP, WP and UCE. UCE also works with WP 3.6.
|
||||
|
||||
= 0.8 =
|
||||
* July 7, 2011 - Categories that do not have any posts in them will now appear on the list of categories.
|
||||
|
||||
= 0.7 =
|
||||
* May 6, 2011 - Added internationalization (i18n) based on Patrick Skiebe's suggestion and code. He has provided a German translation. Feel free to send me other languages if you like.
|
||||
|
||||
= 0.6 =
|
||||
* February 24, 2011 - Addressed a bug in UCE that didn’t handle multiple excluded categories correctly.
|
||||
|
||||
= 0.5 =
|
||||
* February 24, 2011 - Addressed a bug in WP 3.1.
|
||||
|
||||
= 0.4 =
|
||||
* October 10, 2009 - A user pointed out a bug when trying to filter down categories in the edit posts admin area. I believe I’ve fixed this, but let me know if you still have trouble.
|
||||
|
||||
= 0.3 =
|
||||
* June 20, 2009 - James Revillini pointed out a few fairly obvious bugs. I’ve incorporated his changes into the software.
|
||||
|
||||
= 0.21 Beta =
|
||||
* January 10, 2008 - Initial release, fixed file name bug, dashes vs. underscores
|
||||
|
||||
= 0.2 Beta =
|
||||
* December 13, 2007 - Initial release, tweaked to refer to PlanetMike.com, no functionality changed
|
||||
|
||||
= 0.1 Beta =
|
||||
* February 14, 2007 - Initial release
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Ultimate Category Excluder
|
||||
Version: 1.1
|
||||
Plugin URI: http://infolific.com/technology/software-worth-using/ultimate-category-excluder/
|
||||
Description: Easily exclude categories from your front page, feeds, archives, and search results.
|
||||
Author: Marios Alexandrou
|
||||
Author URI: http://infolific.com/technology/
|
||||
License: GPLv2 or later
|
||||
Text Domain: UCE
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2016 Marios Alexandrou
|
||||
|
||||
Copyright 2007 Michael Clark
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
add_action( 'admin_menu', 'ksuce_admin_menu' );
|
||||
add_filter( 'pre_get_posts','ksuce_exclude_categories' );
|
||||
|
||||
// Include Ultimate Category Excluder language files
|
||||
load_plugin_textdomain( 'UCE', false, dirname(plugin_basename(__FILE__)) . '/languages' );
|
||||
|
||||
function ksuce_admin_menu() {
|
||||
add_options_page( __( 'Ultimate Category Excluder Options', 'UCE'), __( 'Category Excluder', 'UCE' ), "manage_options", basename(__FILE__), 'ksuce_options_page' );
|
||||
}
|
||||
|
||||
function ksuce_options_page() {
|
||||
if( isset( $_POST[ 'ksuce' ] ) ) { $message = ksuce_process(); }
|
||||
$options = ksuce_get_options();
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h2><?php _e( 'Ultimate Category Excluder Options', 'UCE' ); ?></h2>
|
||||
<?php if ( isset( $message ) ) { echo $message; } ?>
|
||||
<p><?php _e( 'Use this page to select the categories you wish to exclude and where you would like to exclude them from.', 'UCE' ); ?></p>
|
||||
<form action="options-general.php?page=ultimate-category-excluder.php" method="post">
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Category', 'UCE' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Exclude from Front Page?', 'UCE' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Exclude from Feeds?', 'UCE' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Exclude from All Archives?', 'UCE' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Exclude from Search?', 'UCE' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="the-list">
|
||||
<?php
|
||||
$args=array(
|
||||
'hide_empty' => 0,
|
||||
'order' => 'ASC'
|
||||
);
|
||||
$cats = get_categories( $args );
|
||||
$alt = 0;
|
||||
foreach( $cats as $cat ) {
|
||||
?>
|
||||
<tr<?php if ( $alt == 1 ) { echo ' class="alternate"'; $alt = 0; } else { $alt = 1; } ?>>
|
||||
<th scope="row"><?php echo $cat->cat_name; //. ' (' . $cat->cat_ID . ')'; ?></th>
|
||||
<td><input type="checkbox" name="exclude_main[]" value="-<?php echo $cat->cat_ID ?>" <?php if ( in_array( '-' . $cat->cat_ID, $options['exclude_main'] ) ) { echo 'checked="true" '; } ?>/></td>
|
||||
<td><input type="checkbox" name="exclude_feed[]" value="-<?php echo $cat->cat_ID ?>" <?php if ( in_array( '-' . $cat->cat_ID, $options['exclude_feed'] ) ) { echo 'checked="true" '; } ?>/></td>
|
||||
<td><input type="checkbox" name="exclude_archives[]" value="-<?php echo $cat->cat_ID ?>" <?php if ( in_array( '-' . $cat->cat_ID, $options['exclude_archives'] ) ) { echo 'checked="true" '; } ?>/></td>
|
||||
<td><input type="checkbox" name="exclude_search[]" value="-<?php echo $cat->cat_ID ?>" <?php if ( in_array( '-' . $cat->cat_ID, $options['exclude_search'] ) ) { echo 'checked="true" '; } ?>/></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<p class="submit"><input type="submit" value="<?php _e('Update', 'UCE'); ?>" /></p>
|
||||
<input type="hidden" name="ksuce" value="true" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
global $wpdb, $wp_version;
|
||||
echo "<h3>Support</h3>\n";
|
||||
echo "<p>Please report this information when requesting support.</p>";
|
||||
echo '<ul>';
|
||||
echo '<li>UCE version: 1.1</li>';
|
||||
echo '<li>PHP version: ' . PHP_VERSION . '</li>';
|
||||
// echo '<li>MySQL version: ' . mysqli_get_server_info( $wpdb->dbh ) . '</li>';
|
||||
echo '<li>WordPress version: ' . $wp_version . '</li>';
|
||||
$mbctheme = wp_get_theme();
|
||||
echo "<li>Theme: " . $mbctheme->Name . " is version " . $mbctheme->Version."</li>";
|
||||
$category_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE taxonomy = 'category'" );
|
||||
echo '<li>Number of categories is: ' . $category_count . '</li>';
|
||||
if( !defined( 'AUTH_KEY' ) ) { echo "<li>AUTH_KEY is empty. Please check your settings in your wp-config.php file. This doesn't affect UCE, but it will help make your WordPress sytem more secure.</li>"; }
|
||||
echo "</ul>";
|
||||
}
|
||||
|
||||
function ksuce_process() {
|
||||
//echo '<pre>'; print_r( $_POST );
|
||||
if( !isset( $_POST[ 'exclude_main' ] ) ) { $_POST[ 'exclude_main' ] = array(); }
|
||||
if( !isset( $_POST[ 'exclude_feed' ] ) ) { $_POST[ 'exclude_feed' ] = array(); }
|
||||
if( !isset( $_POST[ 'exclude_archives' ] ) ) { $_POST[ 'exclude_archives' ] = array(); }
|
||||
if( !isset( $_POST[ 'exclude_search' ] ) ) { $_POST[ 'exclude_search' ] = array(); }
|
||||
$options['exclude_main'] = $_POST[ 'exclude_main' ];
|
||||
$options['exclude_feed'] = $_POST[ 'exclude_feed' ];
|
||||
$options['exclude_archives'] = $_POST[ 'exclude_archives' ];
|
||||
$options['exclude_search'] = $_POST[ 'exclude_search' ];
|
||||
update_option( 'ksuceExcludes', $options );
|
||||
$message = "<div class='updated'><p>" . ( __( 'Excludes successfully updated', 'UCE' ) ) . "</p></div>";
|
||||
return $message;
|
||||
}
|
||||
|
||||
function ksuce_get_options(){
|
||||
$defaults = array();
|
||||
$defaults['exclude_main'] = array();
|
||||
$defaults['exclude_feed'] = array();
|
||||
$defaults['exclude_archives'] = array();
|
||||
$defaults['exclude_search'] = array();
|
||||
$options = get_option( 'ksuceExcludes' );
|
||||
if ( !is_array( $options ) ){
|
||||
$options = $defaults;
|
||||
update_option( 'ksuceExcludes', $options );
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
function ksuce_exclude_categories( $query ) {
|
||||
$backtrace = debug_backtrace();
|
||||
$array2[0] = "";
|
||||
unset( $array2[0] );
|
||||
$options = ksuce_get_options();
|
||||
|
||||
//wp_reset_query();
|
||||
//error_log( print_r( debug_backtrace(), true ) );
|
||||
//error_log( 'search for match: ' . in_array_recursive( 'WPSEO_Video_Sitemap', $backtrace ) );
|
||||
|
||||
//Exclude calls from the Yoast SEO Video Sitemap plugin
|
||||
if ( $query->is_home && !in_array_recursive( 'WPSEO_Video_Sitemap', $backtrace ) ) {
|
||||
$mbccount = 0;
|
||||
foreach ( $options[ 'exclude_main' ] as $value ) {
|
||||
$array2[$mbccount] = $value;
|
||||
$mbccount++;
|
||||
}
|
||||
$query->set('category__not_in', $array2);
|
||||
}
|
||||
|
||||
if ( $query->is_feed ) {
|
||||
$mbccount = 0;
|
||||
foreach ( $options[ 'exclude_feed' ] as $value ) {
|
||||
$array2[$mbccount] = $value;
|
||||
$mbccount++;
|
||||
}
|
||||
$query->set( 'category__not_in', $array2 );
|
||||
}
|
||||
|
||||
if ( !is_admin() && $query->is_search ) {
|
||||
$mbccount = 0;
|
||||
foreach ( $options[ 'exclude_search' ] as $value ) {
|
||||
$array2[$mbccount] = $value;
|
||||
$mbccount++;
|
||||
}
|
||||
$query->set('category__not_in', $array2);
|
||||
}
|
||||
|
||||
if ( !is_admin() && $query->is_archive ) {
|
||||
$mbccount = 0;
|
||||
foreach ( $options[ 'exclude_archives' ] as $value ) {
|
||||
$array2[$mbccount] = $value;
|
||||
$mbccount++;
|
||||
}
|
||||
$query->set( 'category__not_in', $array2 );
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function in_array_recursive( $needle, $haystack ) {
|
||||
$found = false;
|
||||
|
||||
foreach( $haystack as $item ) {
|
||||
if ( $item === $needle ) {
|
||||
$found = true;
|
||||
break;
|
||||
} elseif ( is_array( $item ) ) {
|
||||
$found = in_array_recursive( $needle, $item );
|
||||
if( $found ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $found;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user