Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • 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.

    I have the same issue

    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: https://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: https://hivemindlabs.com/
    
        Copyright 2011 Hivemind Labs, Inc.  (email : [email protected])
    
        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 );
    				};
    			};
    		};
    	};
    	// ---------------------------------------
    
    }}; ?>
    Thread Starter Marty Kokes

    (@mkokes)

    Closing issue

    Thread Starter Marty Kokes

    (@mkokes)

    Derp, that was it. I was staring right at it the whole time.

    Thank you very much for your prompt response Mikko!

    Thread Starter Marty Kokes

    (@mkokes)

    I spoke too soon. Disabled all plugins and it started working, re-enabled all the same plugins, still works. Weirdness.

    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.

    Thread Starter Marty Kokes

    (@mkokes)

    Recent update still did not contain this patch, still wondering where the best place to submit this is.

    Thread Starter Marty Kokes

    (@mkokes)

    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?

    Thread Starter Marty Kokes

    (@mkokes)

    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');

    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 _____

    Thread Starter Marty Kokes

    (@mkokes)

    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.

    Try this!

    #infscr-loading {
    	text-align: center;
    }

    I’m running into this same problem, where you able to find a solution?

    Thread Starter Marty Kokes

    (@mkokes)

    Thanks @paulwp! I’ll check that out

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