Title: Marty Kokes's Replies | WordPress.org

---

# Marty Kokes

  [  ](https://wordpress.org/support/users/mkokes/)

 *   [Profile](https://wordpress.org/support/users/mkokes/)
 *   [Topics Started](https://wordpress.org/support/users/mkokes/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mkokes/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mkokes/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mkokes/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mkokes/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mkokes/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/mkokes/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/mkokes/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Ads in Trash still display](https://wordpress.org/support/topic/ads-in-trash-still-display/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years ago](https://wordpress.org/support/topic/ads-in-trash-still-display/#post-7598382)
 * I’m also seeing the same thing, ads in the trash are continuing to be displayed.
   I’ve cleared the cache on my site already and the problem persists.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gravity Forms + Stripe] Cannot add Stripe feeds](https://wordpress.org/support/topic/cannot-add-stripe-feeds/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/cannot-add-stripe-feeds/#post-6943316)
 * I have the same issue
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Example Content] Notice: Undefined index: add_bundle and remove_all](https://wordpress.org/support/topic/notice-undefined-index-add_bundle-and-remove_all-1/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/notice-undefined-index-add_bundle-and-remove_all-1/#post-6312766)
 * I think there needs to be some isset conditionals wrapping the conditionals that
   make use of $get[] variables. I went through and fixed them, replacing the contents
   of the magic.php file with this code will fix the errors.
 *     ```
       <?php /*
       Plugin Name: WP Example Content
       Plugin URI: http://hivemindlabs.com/projects/wp-example-content/
       Description: Provides multiple example posts & pages to assist with styling and developing new and current themes.
       Version: 1.3
       Author: Hivemind Labs, Inc.
       Author URI: http://hivemindlabs.com/
   
           Copyright 2011 Hivemind Labs, Inc.  (email : info@hivemindlabs.com)
   
           This program is free software; you can redistribute it and/or modify
           it under the terms of the GNU General Public License, version 2, as
           published by the Free Software Foundation.
   
           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 St, Fifth Floor, Boston, MA  02110-1301  USA
       */
   
       // Start up the engine
       add_action('admin_menu', 'example_posts_menu');
   
       // Define new menu page parameters
       function example_posts_menu() {
       	add_menu_page( 'WP Example Content', 'WP Example Content', 'activate_plugins', 'wp-example-content', 'example_posts_options', '');
       }
   
       // Define new menu page content
       function example_posts_options() {
   
       	if (!current_user_can('manage_options'))  {
       		wp_die( __('You do not have sufficient permissions to access this page.') );
       	} else {
   
       		?>
   
           <!-- Output for Plugin Options Page -->
       	<div class="wrap">
               <h2 id="">Example Post Generator</h2>
   
       				<?php if (isset($_GET["add_bundle"])) {
               	if ($_GET["add_bundle"] == true){ ?>
                   <div class="updated below-h2" id="message">
                       <p>Example Post Bundle Added!</p>
                   </div>
               <?php } } ?>
       				<?php if (isset($_GET["remove_all"])) {
       				 if ($_GET["remove_all"] == true){;?>
                   <div class="updated below-h2" id="message">
                       <p>All Example Posts Removed!</p>
                   </div>
               <?php } } // endif ?>
   
               <p>Welcome to the WP Example Content! With the options below, you can add and remove example post content to assist you in designing and developing new and current themes. Enjoy!</p><br>
   
               <h3 id="">Add A Bundle Of Example Posts</h3>
               <p>Here, you can add the complete bundle of example posts & pages. These posts are:</p>
               <ol>
                   <li>Multiple Paragraph Posts</li>
                   <li>Image Post</li>
                   <li>UL and OL Post</li>
                   <li>Blockquote Post</li>
                   <li>Post with links</li>
                   <li>Post with Header tags H1 through H5</li>
               </ol>
       		<p>In addition to the example posts, the bundle includes 5 pages, a child page, and a grandchild page, to assist with styling menus and navigation.</p>
               <a href="?page=wp-example-content&add_bundle=true" class="button">Add Bundle of Sample Posts</a>
               <br><br><br>
   
               <h3 id="">Remove All Posts</h3>
               <p>Here, you can remove all example posts that you've created with the plugin, in one fell swoop. That easy? Oh yeah.</p>
               <a href="?page=wp-example-content&remove_all=true" class="button">Remove All Sample Posts</a>
       	</div>
       	<!-- End Output for Plugin Options Page -->
   
       <?php
   
       	// Add Posts -------------------------
       	if (isset($_GET["add_bundle"])) {
       		if ($_GET["add_bundle"] == true){
       			global $wpdb;
       			// Get content for all posts and pages, then insert posts
       			include 'content.php';
       			foreach ($add_posts_array as $post){
       				wp_insert_post( $post );
       			};
   
       			// Add Child Page
       			$page_name = 'Image Page';
       			$page_name_id = $wpdb->get_results("SELECT ID FROM " . $wpdb->base_prefix . "posts WHERE post_title = '". $page_name ."'");
       			foreach($page_name_id as $page_name_id){
       				$imagepageid = $page_name_id->ID;
       				include 'content.php';
       				wp_insert_post( $childpage );
       			};
   
       			// Add Grandchild Page
       			$page_name = 'Child Page';
       			$page_name_id = $wpdb->get_results("SELECT ID FROM " . $wpdb->base_prefix . "posts WHERE post_title = '". $page_name ."'");
       			foreach($page_name_id as $page_name_id){
       				$childpageid = $page_name_id->ID;
       				include 'content.php';
       				wp_insert_post( $grandchildpage );
       			};
       		};
       	};
       	// ---------------------------------------
   
       	//  Remove Posts -------------------------
       	if (isset($_GET["remove_all"])) {
       		if ($_GET["remove_all"] == true){
       			// Get content for all posts and pages, then remove them
       			include 'content.php';
       			foreach($remove_posts_array as $array){
       				$page_name = $array["post_title"];
       				global $wpdb;
       				$page_name_id = $wpdb->get_results("SELECT ID FROM " . $wpdb->base_prefix . "posts WHERE post_title = '". $page_name ."'");
       				foreach($page_name_id as $page_name_id){
       					$page_name_id = $page_name_id->ID;
       					wp_delete_post( $page_name_id, true );
       				};
       			};
       		};
       	};
       	// ---------------------------------------
   
       }}; ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Searching Custom Post Types associated with a Custom Taxonomy](https://wordpress.org/support/topic/searching-custom-post-types-associated-with-a-custom-taxonomy/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/searching-custom-post-types-associated-with-a-custom-taxonomy/#post-6909095)
 * Closing issue
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Searching Custom Post Types associated with a Custom Taxonomy](https://wordpress.org/support/topic/searching-custom-post-types-associated-with-a-custom-taxonomy/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/searching-custom-post-types-associated-with-a-custom-taxonomy/#post-6909094)
 * Derp, that was it. I was staring right at it the whole time.
 * Thank you very much for your prompt response Mikko!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] Multisite – Only super admin can add events](https://wordpress.org/support/topic/multisite-only-super-admin-can-add-events/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/multisite-only-super-admin-can-add-events/#post-6641210)
 * I spoke too soon. Disabled all plugins and it started working, re-enabled all
   the same plugins, still works. Weirdness.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Attachment Importer] import_file_error: Remote server did not respond](https://wordpress.org/support/topic/import_file_error-remote-server-did-not-respond/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/import_file_error-remote-server-did-not-respond/#post-5374879)
 * I’m receiving this error as well. I’m moving files from a standalone install 
   running on apache to a multisite install running on nginx if that helps at all.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] How to clear cache when a post is published via XML-RPC?](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/#post-5479095)
 * Recent update still did not contain this patch, still wondering where the best
   place to submit this is.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] How to clear cache when a post is published via XML-RPC?](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/#post-5479090)
 * Caching still does not get flagged to be cleared with the most recent update 
   when scheduled posts or posts made with xml-rpc are published. Is there a proper
   place to submit this patch?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] How to clear cache when a post is published via XML-RPC?](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/how-to-clear-cache-when-a-post-is-published-via-xml-rpc/#post-5479028)
 * I believe I fixed the problem, but you guys will need to update your code or 
   my patch will just be overwritten anytime there’s a update.
 * in /lib/wfCache.php
 * It looks like you’re calling ‘action_publishPost’ with the publish_post hook 
   to schedule the cache to be cleared. This hook isn’t triggered when a post is
   published by xml-rpc or if it’s scheduled to be published in the future.
 * Since there will be no login cookie at the time of posting I inserted the code
   right after the if statement where the publish_post hook is being used. Roughly
   line 32.
 *     ```
       }
       		}
       		add_action('wordfence_cache_clear', 'wfCache::scheduledCacheClear');
       		add_action('wordfence_update_blocked_IPs', 'wfCache::scheduleUpdateBlockedIPs');
       ```
   
 * becomes…
 *     ```
       }
       		}
       		add_action('publish_future_post', 'wfCache::action_publishPost');
       		add_action('xmlrpc_publish_post', 'wfCache::action_publishPost');
       		add_action('wordfence_cache_clear', 'wfCache::scheduledCacheClear');
       		add_action('wordfence_update_blocked_IPs', 'wfCache::scheduleUpdateBlockedIPs');
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] Many attempted a failed login as "admin"](https://wordpress.org/support/topic/many-attempted-a-failed-login-as-admin/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/many-attempted-a-failed-login-as-admin/#post-5461966)
 * I receive the same attacks related to brute force logins using the ‘admin’ login.
 * However I don’t use an account named admin on any of my sites so I just set wordfence
   to immediately lock out users that attempt to log in using an account named ‘
   admin’.
 * You can do those on the line right after the last one you listed…
 * > Immediately block the IP of users who try to sign _____
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CircuPress] Any way to filter categories?](https://wordpress.org/support/topic/any-way-to-filter-categories/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/any-way-to-filter-categories/#post-5419699)
 * Just in case anyone else needs help with this. You can alter the content that’s
   being included in the emails, by modifying the wp_query arguments within the 
   mail template that you are using.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Infinite-Scroll] Center the loading image](https://wordpress.org/support/topic/center-the-loading-image/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/center-the-loading-image/#post-3715928)
 * Try this!
 *     ```
       #infscr-loading {
       	text-align: center;
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Offset and Pagination with a Custom Query](https://wordpress.org/support/topic/offset-and-pagination-with-a-custom-query/)
 *  [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/offset-and-pagination-with-a-custom-query/#post-3702086)
 * I’m running into this same problem, where you able to find a solution?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Twenty Twelve] Properly resizing videos, possible code addition?](https://wordpress.org/support/topic/properly-resizing-videos-possible-code-addition/)
 *  Thread Starter [Marty Kokes](https://wordpress.org/support/users/mkokes/)
 * (@mkokes)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/properly-resizing-videos-possible-code-addition/#post-3352486)
 * Thanks [@paulwp](https://wordpress.org/support/users/paulwp/)! I’ll check that
   out

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/mkokes/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/mkokes/replies/page/2/?output_format=md)