Forums

[resolved] [Plugin: WP-o-Matic] How To: Global Regex Rules (2 posts)

  1. Mystech
    Member
    Posted 2 years ago #

    Is there an easy way to apply or copy a set of Regex rules created for one campaign to ALL campaigns?

    http://wordpress.org/extend/plugins/wp-o-matic/

  2. Mystech
    Member
    Posted 2 years ago #

    Well, after hoping there was a more elegant way to do this, I resorted to brute force. Here is what I did:

    1) Created a "master campaign" where I put all my various rewrite rules. Make a note of the ID number (1, in this case) of this campaign.

    2) Go to line ~878 of the wpomatic.php file and changed the $id to the campaign number of my "master campaign" above.

    BEFORE:
    $rewrites = $wpdb->get_results("SELECT * FROM {$this->db['campaign_word']} WHERE campaign_id = $id");

    AFTER:
    $rewrites = $wpdb->get_results("SELECT * FROM {$this->db['campaign_word']} WHERE campaign_id = '1'");

    This will override all other campaign rewrite rules; like I said, brute force, but works for my current needs. :-(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags