Making WordPress.org


Ignore:
Timestamp:
02/28/2017 12:35:50 AM (8 years ago)
Author:
iandunn
Message:

WordPress.tv: Add extra stats and define bump_stats_extras() stub

The stub is cleaner than always adding function_exists() checks when calling the function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-anon-upload/anon-upload.php

    r1725 r5015  
    5656        // Normal users won't see the honeypot field, so if there's a value in it, then we can assume the submission is spam from a bot
    5757        if ( ! isset( $_POST['wptv_honey'] ) || ! empty( $_POST['wptv_honey'] ) ) {
    58             if ( function_exists( 'bump_stats_extras' ) ) {
    59                 bump_stats_extras( 'wptv-spam', 'honeypot_trapped_anon_upload' );
    60             }
     58            bump_stats_extras( 'wptv-spam', 'honeypot_trapped_anon_upload' );
    6159
    6260            return $this->error( 13 );
     
    160158
    161159    function error( $msg ) {
     160        bump_stats_extras( 'wptv-errors', 'video-upload-failed' );
    162161        $this->errors = $msg;
    163162
Note: See TracChangeset for help on using the changeset viewer.