php #FV更改共享URL

Posted

tags:

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

<?php
// COPY AFTER THIS LINE >>>>>>>

add_action( 'fv_after_contest_list', 'enquene_load_fv_js_054621' );
add_action( 'fv_after_contest_item', 'enquene_load_fv_js_054621' );
function enquene_load_fv_js_054621() {
    add_action( 'wp_footer', 'load_fv_js_ss4365464', 99 );
}
function load_fv_js_ss4365464() {
    if ( ! get_current_user_id() ) {
      return;
    }
  
    $current_user = wp_get_current_user();
    ?>
    <script>      
      // var fv_url = FvLib.applyFilters('fv/share/page_url', FvLib.singlePhotoLink(current.id), service, current);
      jQuery( document ).ready(function() {
          if (FvLib == undefined) {
              return;
          }
          var username = "<?php echo $current_user->user_login; ?>";
          // How to add own action
          FvLib.addFilter('fv/share/page_url', function(url, service, competitor){
            // some actions  
            return FvLib.add_query_arg("ref", username, url);
          }, 10, 3);

          FvLib.addFilter("fv/public/single_photo/link", function(url, competitor_id){
            // some actions  
            return FvLib.add_query_arg("ref", username, url);
          }, 10, 2);

      });      
    </script>
    <?
}

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

php FV ::只生成2个拇指

php FV - 上次比赛的缩写

php FV ::改变一场比赛的文字

php FV :: default_contest_sorting

php 显示countest投票(短代码)。用法:[fv_contest_votes contest_id = 1]

bigquery url 解码