Plugin Directory

Changeset 2128325


Ignore:
Timestamp:
07/25/2019 08:22:41 AM (7 years ago)
Author:
easycpmods
Message:

counter

Location:
block-user-ads/tags/1.3.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • block-user-ads/tags/1.3.0/ecpm-bua-functions.php

    r2128313 r2128325  
    288288}
    289289
     290function ecpm_bua_count_ads($user_id) {
     291    global $wpdb;
     292
     293    $result = $wpdb->get_row( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = '" . APP_POST_TYPE . "' AND post_author = $user_id", ARRAY_N );
     294    return $result[0];
     295}
     296 
     297
    290298?>
  • block-user-ads/tags/1.3.0/ecpm-bua-settings.php

    r2128313 r2128325  
    380380        <td align="center" width="150"><strong><?php echo _e('User ID', ECPM_BUA); ?></strong></td>
    381381        <td align="center" width="150"><strong><?php echo _e('Blocked since', ECPM_BUA); ?></strong></td>
     382        <td align="center" width="150"><strong><?php echo _e('No. of ads', ECPM_BUA); ?></strong></td>
    382383        <td align="center" width="100"><strong><?php echo _e('Action', ECPM_BUA); ?></strong></td>
    383384       
    384385      </tr>
    385       <tr><td colspan="4"><hr></td></tr>
     386      <tr><td colspan="5"><hr></td></tr>
    386387      <?php
    387388     
     
    412413          </td>
    413414       
     415        <td align="center"><?= ecpm_bua_count_ads($user->ID);?></td>
     416       
    414417        <td align="center">
    415418          <?php
     
    424427      ?>
    425428     
    426       <tr><td colspan="4"><hr></td></tr>
    427       <tr>
    428         <td colspan="2">
     429      <tr><td colspan="5"><hr></td></tr>
     430      <tr>
     431        <td colspan="3">
    429432          <?php
    430433            $user_list = ecpm_bua_get_avail_users();
Note: See TracChangeset for help on using the changeset viewer.