Support » Plugin: Front End PM » changes in this plugin

  • this plugin is customize or not? changes autocomplete data is not changes from my side.
    by default data comes from wp_users table I want to get data from my custom table but it’s not working. and also insert in my table

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    How your are changing data so that it comes from custom table? Which code you are using?

    includes/class-fep-rest-api.php

    function users( $request ) {

    global $wpdb;
    $customers = $wpdb->get_results(“SELECT * FROM wp_project_db”);
    foreach($customers as $data){

    $response[] = array(
    ‘id’ => $user->ID,
    ‘nicename’ => $user->user_nicename,
    ‘name’ => fep_user_name( $user->ID ),
    );

    }
    $response = [];
    $for = $request->get_param( ‘for’ );
    $q = $request->get_param( ‘q’ );
    $x = $request->get_param( ‘x’ );
    $exclude = ! $x ? array() : explode( ‘,’, $x );
    // $exclude[] = get_current_user_id();
    $args = array(
    ‘search’ => “*{$q}*”,
    ‘search_columns’ => array( ‘user_login’, ‘display_name’ ),
    ‘exclude’ => $exclude,
    ‘number’ => 10,
    ‘orderby’ => ‘display_name’,
    ‘order’ => ‘ASC’,
    ‘role__in’ => fep_get_option( ‘userrole_access’, array() ),
    );

    if ( strlen( $q ) > 0 ) {
    if ( ‘autosuggestion’ === $for ) {
    if ( ! fep_get_option( ‘show_autosuggest’, 1 ) && ! fep_is_user_admin() ) {
    return rest_ensure_response( $response );
    }
    $args[‘exclude’][] = get_current_user_id();
    $args = apply_filters( ‘fep_autosuggestion_arguments’, $args );
    } elseif ( ‘multiple_recipients’ === $for ) {
    $args[‘exclude’][] = get_current_user_id();
    $args = apply_filters( ‘fep_users_ajax_arguments’, $args );
    } elseif ( ‘blocked’ === $for ) {
    $args[‘exclude’][] = get_current_user_id();
    $args = apply_filters( ‘fep_users_ajax_arguments’, $args );
    }

    $args = apply_filters( ‘fep_filter_rest_users_args’, $args, $for, $q, $x );

    if ( has_filter( “fep_filter_rest_users_response_{$for}” ) ) {
    $response = apply_filters( “fep_filter_rest_users_response_{$for}”, $response, $args, $q, $x );
    } elseif ( has_filter( ‘fep_filter_rest_users_response’ ) ) {
    $response = apply_filters( ‘fep_filter_rest_users_response’, $response, $args, $for, $q, $x );
    } else {
    // The Query
    $users = get_users( $args );
    foreach ( $users as $user ) {
    $response[] = array(
    ‘id’ => $user->ID,
    ‘nicename’ => $user->user_nicename,
    ‘name’ => fep_user_name( $user->ID ),
    );
    }
    }
    }

    return rest_ensure_response( $response );
    }

    custom table query doesnot execute all types of query apply but it’snot working I can’t get data in message form To field

    I want to in message form To field data comes from my custom table like firstname,but not any query applied I have already try my table name wp_ac_my_contacts I want to get firstname in To field in message form….

    also data insert in plugin table I want to also insert in my custom table….
    so please help me..

    Thanks
    Aarti kotak

    Plugin Author Shamim Hasan

    (@shamim51)

    Your code is not correct. Also there are lots of hook which you can use. Do not change core plugin code. You will not be able to update later without breaking.

    If you have knowledge in php and wordpress, please correct your code. If you need my assistance please let me know your custom table structure.

    alpswebsolutions

    (@alpswebsolutions)

    in in messages form editor in bydefault visual mode, I want to by deafult edipr in visual mode now tab wise clicking text and visual, display editor by default in visual mode, not after clicking
    https://staging.storcx.com/account/messages/?fepaction=newmessage

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.