Plugin Directory

Changeset 1502274


Ignore:
Timestamp:
09/25/2016 05:55:41 PM (10 years ago)
Author:
123teru321
Message:

1.0.2

Location:
ucb-recommend
Files:
258 added
9 edited

Legend:

Unmodified
Added
Removed
  • ucb-recommend/trunk/languages/UCBRecommend-ja.po

    r1499492 r1502274  
    33"Project-Id-Version: ucb-recommend0.0.0.0.1\n"
    44"POT-Creation-Date: 2016-07-19 20:40+0900\n"
    5 "PO-Revision-Date: 2016-09-21 12:58+0900\n"
     5"PO-Revision-Date: 2016-09-23 02:01+0900\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    422422msgid "Redirect URL"
    423423msgstr "リダイレクトURL"
     424
     425msgid "Constant of UCB Algorithm"
     426msgstr "UCBアルゴリズムの定数"
  • ucb-recommend/trunk/lib/common/030-base-class.php

    r1499492 r1502274  
    3030//      "show_result" => array( "label" => "Whether to set button to show result", "type" => "bool", "default" => UCB_RECOMMEND_SHOW_RESULT ),
    3131        //"check_update" => array( "label" => "Whether to check update", "type" => "bool", "default" => UCB_RECOMMEND_CHECK_UPDATE ),
     32        "ucb_const" => array( "label" => "Constant of UCB Algorithm", "type" => "int", "default" => UCB_RECOMMEND_UCB_CONST, "min" => 0 ),
    3233    );
    3334
  • ucb-recommend/trunk/readme.txt

    r1500299 r1502274  
    44Requires at least: 3.9.14
    55Tested up to: 4.6.1
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434
    3535== Changelog ==
     36
     37= 1.0.2 =
     38* 2016-09-26
     39* add ucb constant setting
     40* small bug fix
    3641
    3742= 1.0.1 =
  • ucb-recommend/trunk/services/calculate.php

    r1499492 r1502274  
    7474                global $ucbr_custom_post_type;
    7575                $post_type = $ucbr_custom_post_type->get_post_type();
    76                 $types = get_post_types( array('exclude_from_search' => false) );
     76                $types = get_post_types( array( 'exclude_from_search' => false ) );
    7777                $types[$post_type] = $post_type;
    7878                $posts = get_posts(
     
    121121        }
    122122
    123         $const = $this->apply_filters( 'bandit_const', UCB_RECOMMEND_BANDIT_CONST ) - 0;
     123        $const = $this->apply_filters( 'bandit_const', UCB_RECOMMEND_UCB_CONST ) - 0;
    124124
    125125        $total = array_sum( array_map( function ( $d ) use ( $ucbr_model_number ) {
     
    131131            $n_i = $ucbr_model_number->get_value( $d, 'number' ) - 0;
    132132            $c_i = $ucbr_model_number->get_value( $d, 'clicked' ) - 0;
    133             if ( $n_i <= 0 ) {
     133            if ( $const <= 0 ) {
     134                $bandit = 1.0 * $c_i / $n_i;
     135            } elseif ( $n_i <= 0 ) {
    134136                $bandit = PHP_INT_MAX;
    135137            } else {
  • ucb-recommend/trunk/settings.php

    r1499492 r1502274  
    4444define( 'UCB_RECOMMEND_GET_DATA_NUMBER', 10 );
    4545define( 'UCB_RECOMMEND_NO_CONTEXT_MODE', false );
    46 define( 'UCB_RECOMMEND_BANDIT_CONST', 1 );
     46define( 'UCB_RECOMMEND_UCB_CONST', 1 );
    4747define( 'UCB_RECOMMEND_PREVIEW_POST_NUMBER', 10 );
    4848define( 'UCB_RECOMMEND_WIDGET_SHORTCODE', 'ucbr_widget' );
  • ucb-recommend/trunk/ucb-recommend.php

    r1499883 r1502274  
    22/*
    33  Plugin Name: UCB Recommend
    4   Plugin URI:
    5   Description: Recommendation plugin using ucb algorithm
     4  Plugin URI: https://wordpress.org/plugins/ucb-recommend/
     5  Description: Recommendation and AB test plugin using ucb algorithm
    66  Author: 123teru321
    7   Version: 1.0.1
     7  Version: 1.0.2
    88  Author URI: http://technote.space/
    99  Text Domain: UCBRecommend
     
    2727
    2828//plugin version
    29 define( 'UCB_RECOMMEND_PLUGIN_VERSION', '1.0.1' );
     29define( 'UCB_RECOMMEND_PLUGIN_VERSION', '1.0.2' );
    3030
    3131//plugin file name
  • ucb-recommend/trunk/update.json

    r1499883 r1502274  
    33  "slug": "ucb-recommend",
    44  "download_url": "https://github.com/123teru321/UCB-Recommend/archive/master.zip",
    5   "version": "1.0.1",
     5  "version": "1.0.2",
    66  "tested": "4.6.1",
    77  "homepage": "https://technote.space/",
  • ucb-recommend/trunk/views/widget-settings-script.php

    r1499492 r1502274  
    391391                    save_design_template(get_widget_id(), name, value, function () {
    392392                        //set_design(tab_id);
    393                         update_design_template(tab_id, name);
     393                        update_design_template(tab_id, name, true);
    394394                        set_updated('<?php _e( "Saved.", UCB_RECOMMEND_TEXT_DOMAIN ); ?>');
    395395                    });
     
    506506                if (controles) {
    507507                    ucbr_obj.enable_controls();
     508                    $(elem).find('.ucbr-template-value').trigger('blur');
    508509                }
    509510            }, function (error) {
Note: See TracChangeset for help on using the changeset viewer.