www.webdeveloper.com
Results 1 to 2 of 2

Thread: Editing wordpress plugin

  1. #1
    Join Date
    Aug 2013
    Posts
    2

    Editing wordpress plugin

    I am using classipress (a classified ads script for wordpress) with this theme I am using post filter plugin, but I am facing problem this plugin filtering posts but not filtering ads when I checked the difference between post and ads in my phpmyadmin (option in cpanel) there is a column named "post_type" in this column posts have name "post" pages have "page" and ads have "ad_listing". please tell me what thing I have to change in this function to make this plugin able to filter ads.
    function checkPost($post_id){
    global $wpdb;
    $bad_words = $this->options['keywords'];
    $check_in = array('post_content','post_title','post_

    $post = get_post($post_id);

    $this->options['count_filtered']++;

    foreach($check_in as $field_name){
    $content = mb_strtolower($post->{$field_name});
    foreach($bad_words as $word){
    if(stripos($content,$word)){
    $result = wp_delete_post($post_id,$this->options['
    $this->options['count_deleted']+
    break 2;
    }
    }

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,318
    It helps if you try the user forums for classipress on modding and if you have to post here, use the forum tags that are for PHP so that code gets wrapped and colour coded to make it readable.

    Your post also indicates that you have edited part of the script out which does not help people who may be inclined to help you.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles