Plugin Directory

Changeset 1134464


Ignore:
Timestamp:
04/14/2015 12:08:01 PM (11 years ago)
Author:
kowack
Message:

мелкие правки

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vkontakte-api/trunk/vkapi.php

    r1130936 r1134464  
    4141 * _ категория записей на сайте из медиа юзверя ВК
    4242 */
     43
     44if ( ! defined( 'DB_NAME' ) ) {
     45    wp_redirect( 'http://darx.net' );
     46}
     47
    4348function vkapi_can_start() {
    4449    global $wp_version;
     
    6065
    6166        return false;
    62     }
    63 
    64     if ( ! defined( 'DB_NAME' ) ) {
    65         wp_redirect( 'http://darx.net' );
    6667    }
    6768
     
    142143        } else {
    143144            add_action( 'comments_template', array( &$this, 'add_tabs' ), 888 ); # add comments
    144             add_filter( 'get_comments_number', array( &$this, 'do_non_empty' ), 1 ); # recount
     145            add_filter( 'get_comments_number', array( &$this, 'do_non_empty' ), 1, 2 ); # recount
    145146        }
    146147        add_action( 'vkapi_cron', array( &$this, 'cron' ) );
     
    319320        width: auto !important;
    320321    }
     322
     323    .vkapi_vk_login table div {
     324        box-sizing: content-box !imporant;
     325    }
    321326</style>
    322327<script type=\"text/javascript\">
     
    601606            $text_len = mb_strlen( $text );
    602607            $text     = mb_substr( $text, 0, (int) $temp );
    603             $last_pos = strrpos( $text, ' ' );
     608            $last_pos = mb_strrpos( $text, ' ' );
    604609//            if ( ! $last_pos ) {
    605610//                $last_pos = strrpos( $text, "\r\n" );
     
    11301135    }
    11311136
    1132     function do_non_empty( $args ) {
    1133         global $post;
    1134         $vkapi_comm = get_post_meta( $post->ID, 'vkapi_comm', true );
    1135         $fbapi_comm = get_post_meta( $post->ID, 'fbapi_comm', true );
    1136 
    1137         return (int) ( $args + $vkapi_comm + $fbapi_comm );
     1137    function do_non_empty( $count, $post_id ) {
     1138        $vkapi_comm = get_post_meta( $post_id, 'vkapi_comm', true );
     1139        $fbapi_comm = get_post_meta( $post_id, 'fbapi_comm', true );
     1140
     1141        return (int) ( $count + $vkapi_comm + $fbapi_comm );
    11381142    }
    11391143
Note: See TracChangeset for help on using the changeset viewer.