php FV prize_pool

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php FV prize_pool相关的知识,希望对你有一定的参考价值。

<?php

// Copy after

add_shortcode('fv_prize_pool', function($atts){
  global $contest_id;
  if ( empty($contest_id)  ) {
    if ( !empty($atts['contest_id'])) {
      $contest_id = absint($atts['contest_id']);
    } else {
      return "No contest ID";
    }
  }
    $count = ModelCompetitors::query()
            ->where("contest_id", $contest_id)
            ->where("status", ST_PUBLISHED)
            ->find(true);
 
    return $count*2;
});

// Usage 
// Prize pool: [fv_prize_pool]$

以上是关于php FV prize_pool的主要内容,如果未能解决你的问题,请参考以下文章