Plugin Directory

Changeset 1510051


Ignore:
Timestamp:
10/07/2016 02:35:46 PM (9 years ago)
Author:
123teru321
Message:

1.3.9

Location:
cfiltering
Files:
139 added
10 edited

Legend:

Unmodified
Added
Removed
  • cfiltering/trunk/apis/access.php

    r1506356 r1510051  
    4141    {
    4242        global $post;
    43         return $this->apply_filters( "access_api_filter", is_singular( $this->valid_post_types() ), $post );
     43        return $this->apply_filters( 'access_api_filter', in_array( $post->post_type, $this->valid_post_types() ) );
    4444    }
    4545
  • cfiltering/trunk/collaborative-filtering.php

    r1506571 r1510051  
    55  Description: Recommendation plugin using collaborative filtering
    66  Author: 123teru321
    7   Version: 1.3.7
     7  Version: 1.3.9
    88  Author URI: http://technote.space/
    99  Text Domain: CollaborativeFiltering
     
    2727
    2828//plugin version
    29 define( 'COLLABORATIVE_FILTERING_PLUGIN_VERSION', '1.3.7' );
     29define( 'COLLABORATIVE_FILTERING_PLUGIN_VERSION', '1.3.9' );
    3030
    3131//required php version
  • cfiltering/trunk/languages/CollaborativeFiltering-ja.po

    r1506356 r1510051  
    33"Project-Id-Version: collaborative-filtering0.0.0.0.1\n"
    44"POT-Creation-Date: 2016-07-19 20:40+0900\n"
    5 "PO-Revision-Date: 2016-10-01 12:25+0900\n"
     5"PO-Revision-Date: 2016-10-07 21:35+0900\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    150150msgstr "有効な投稿タイプ。複数ある場合はコンマで区切って入力します"
    151151
     152msgid "valid post statuses, which is separated by commas"
     153msgstr "有効な投稿ステータス。複数ある場合はコンマで区切って入力します"
     154
    152155msgid "Invalidate all user cookie if nonce check is valid."
    153156msgstr "全てのユーザーのクッキーを無効化(nonceチェックが有効な場合)"
     
    189192msgstr "nonceチェックをせずにAjaxアクセスする場合にリファラをチェックするかどうか"
    190193
    191 msgid "Please update your PHP. <strong>%s</strong> requires PHP version %s or above"
    192 msgstr "PHPをアップデートして下さい。 <strong>%s</strong>の動作にはPHP%s以上が必要です。"
     194msgid "Your PHP version is %s."
     195msgstr "あなたのPHPのバージョンは%sです。"
     196
     197msgid "Please update your PHP."
     198msgstr "PHPをアップデートして下さい。"
     199
     200msgid "<strong>%s</strong> requires PHP version %s or above."
     201msgstr "<strong>%s</strong>の動作にはPHP%s以上が必要です。"
    193202
    194203msgid "Changed [%s] to [%s]"
  • cfiltering/trunk/lib/common/030-base-class.php

    r1506356 r1510051  
    3131        "calculate_number" => array( "label" => "max number of calculations of per", "type" => "int", "default" => COLLABORATIVE_FILTERING_CALCULATE_NUMBER, "min" => 10 ),
    3232        "post_types" => array( "label" => "valid post types, which is separated by commas", "type" => "string", "default" => COLLABORATIVE_FILTERING_POST_TYPES ),
     33        "post_statuses" => array( "label" => "valid post statuses, which is separated by commas", "type" => "string", "default" => COLLABORATIVE_FILTERING_POST_STATUSES ),
    3334        "show_result" => array( "label" => "whether to set button to show result", "type" => "bool", "default" => COLLABORATIVE_FILTERING_SHOW_RESULT ),
    3435        "front_admin_ajax" => array( "label" => "whether to use admin-ajax.php on front page", "type" => "bool", "default" => COLLABORATIVE_FILTERING_FRONT_ADMIN_AJAX ),
     
    245246    }
    246247
     248    protected function valid_post_statuses()
     249    {
     250        return array_filter( array_map( 'trim', explode( ',', $this->apply_filters( 'post_statuses', COLLABORATIVE_FILTERING_POST_STATUSES ) ) ) );
     251    }
     252
    247253    protected function get_server_key()
    248254    {
  • cfiltering/trunk/readme.txt

    r1506571 r1510051  
    44Requires at least: 3.9.13
    55Tested up to: 4.6.1
    6 Stable tag: 1.3.7
     6Stable tag: 1.3.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3232
    3333== Changelog ==
     34
     35= 1.3.9 =
     36* 2016-10-07
     37* Add post filter by post_status
     38* Small bug fix
     39
     40= 1.3.8 =
     41* 2016-10-02  Show php version when PHP version < 5.4
    3442
    3543= 1.3.7 =
  • cfiltering/trunk/services/calculate.php

    r1506356 r1510051  
    304304        $ret = !is_array( $ret ) ? array() : $ret;
    305305        $post_types = $this->valid_post_types();
    306         $ret = array_map( function ( $d ) use ( $post_types ) {
     306        $post_statuses = $this->valid_post_statuses();
     307        $ret = array_map( function ( $d ) use ( $post_types, $post_statuses ) {
    307308            $post = get_post( $d['post_id'] );
    308309            if ( !$post ) {
     
    310311            }
    311312            if ( !empty( $post_types ) && !in_array( $post->post_type, $post_types ) ) {
     313                return false;
     314            }
     315            if ( !empty( $post_statuses ) && !in_array( $post->post_status, $post_statuses ) ) {
    312316                return false;
    313317            }
  • cfiltering/trunk/settings.php

    r1506356 r1510051  
    3535define( 'COLLABORATIVE_FILTERING_CALCULATE_NUMBER', 10000 );
    3636define( 'COLLABORATIVE_FILTERING_POST_TYPES', 'post' );
     37define( 'COLLABORATIVE_FILTERING_POST_STATUSES', 'publish' );
    3738define( 'COLLABORATIVE_FILTERING_SHOW_RESULT', true );
    3839define( 'COLLABORATIVE_FILTERING_FRONT_ADMIN_AJAX', false );
  • cfiltering/trunk/unsupported.php

    r1506356 r1510051  
    77function cf_old_php_message()
    88{
    9     return sprintf( __( 'Please update your PHP. <strong>%s</strong> requires PHP version %s or above', COLLABORATIVE_FILTERING_TEXT_DOMAIN ), COLLABORATIVE_FILTERING_PLUGIN_NAME, COLLABORATIVE_FILTERING_REQUIRED_PHP_VERSION );
     9    $ret = sprintf( __( 'Your PHP version is %s.', COLLABORATIVE_FILTERING_TEXT_DOMAIN ), phpversion() ) . '<br>';
     10    $ret .= __( 'Please update your PHP.', COLLABORATIVE_FILTERING_TEXT_DOMAIN ) . '<br>';
     11    $ret .= sprintf( __( '<strong>%s</strong> requires PHP version %s or above.', COLLABORATIVE_FILTERING_TEXT_DOMAIN ), COLLABORATIVE_FILTERING_PLUGIN_NAME, COLLABORATIVE_FILTERING_REQUIRED_PHP_VERSION );
     12    return $ret;
    1013}
    1114
  • cfiltering/trunk/update.json

    r1506571 r1510051  
    33  "slug": "cfiltering",
    44  "download_url": "https://github.com/123teru321/CFiltering/archive/master.zip",
    5   "version": "1.3.7",
     5  "version": "1.3.9",
    66  "tested": "4.6.1",
    77  "homepage": "https://technote.space/",
Note: See TracChangeset for help on using the changeset viewer.