Plugin Directory

Changeset 2374700


Ignore:
Timestamp:
09/03/2020 06:18:19 PM (6 years ago)
Author:
Shmidtelson
Message:

1.1.0.3

Location:
wp-post-rating/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-post-rating/trunk/readme.txt

    r2369706 r2374700  
    66Tested up to: 5.5
    77Requires PHP: 7.2
    8 Stable tag: 1.1.0.2
     8Stable tag: 1.1.0.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727*You may customize color of stars and second color automatically generated*
    2828
     29* MultiLanguages
     30*English
     31*Russian
     32
    2933###Functional:
    3034* Widget for show latest (any sort) votes in sidebar (other place)
     
    4044
    4145== Changelog ==
     46= 1.1.0.3 =
     47* Fixed bug which blocked work with page builders, like as Divi, Beaver, Visual Composer, Themify, Elementor, Oxygen
    4248= 1.1.0.2 =
    4349* Fixed bug with ajax request
  • wp-post-rating/trunk/src/Service/ConfigService.php

    r2369706 r2374700  
    1111    const PLUGIN_NONCE_KEY = 'WPR_rating_key';
    1212
    13     const PLUGIN_VERSION = '1.1.0.2';
     13    const PLUGIN_VERSION = '1.1.0.3';
    1414
    1515    const PLUGIN_NAME = 'wp-post-rating';
  • wp-post-rating/trunk/src/Views/RatingView.php

    r2363367 r2374700  
    66
    77use WPR\Service\RatingService;
     8use WPR\Service\WordpressFunctionsService;
    89
    910class RatingView extends AbstractView
     
    1819     */
    1920    private $viewSchemaOrg;
     21    /**
     22     * @var WordpressFunctionsService
     23     */
     24    private $wordpressFunctionsService;
    2025
    21     public function __construct(RatingService $service, SchemaOrgView $viewSchemaOrg)
     26    public function __construct(
     27        RatingService $service,
     28        SchemaOrgView $viewSchemaOrg,
     29        WordpressFunctionsService $wordpressFunctionsService
     30    )
    2231    {
    2332        parent::__construct();
    2433        $this->service = $service;
    2534        $this->viewSchemaOrg = $viewSchemaOrg;
     35        $this->wordpressFunctionsService = $wordpressFunctionsService;
    2636    }
    2737
    2838    public function renderStars()
    2939    {
    30         $id = get_the_ID();
     40        $id = $this->wordpressFunctionsService->getCurrentPostID();
    3141
    3242        return $this->twig->render('star-rating.twig', [
    3343            'postId' => $id,
    34             'title' => get_the_title($id),
     44            'title' => \get_the_title($id),
    3545            'avgRating' => $this->service->getAvgRating($id),
    3646            'total' => $this->service->getTotalVotesByPostId($id),
     
    4454    public function getRatingAvg()
    4555    {
    46         return $this->service->getAvgRating(get_the_ID());
     56        return $this->service->getAvgRating($this->wordpressFunctionsService->getCurrentPostID());
    4757    }
    4858
     
    5262    public function getRatingTotal()
    5363    {
    54         return $this->service->getTotalVotesByPostId(get_the_ID());
     64        return $this->service->getTotalVotesByPostId($this->wordpressFunctionsService->getCurrentPostID());
    5565    }
    5666}
  • wp-post-rating/trunk/src/Views/SchemaOrgView.php

    r2369706 r2374700  
    77use WPR\Service\RatingService;
    88use WPR\Service\SettingService;
     9use WPR\Service\WordpressFunctionsService;
    910
    1011class SchemaOrgView extends AbstractView
     
    1920     */
    2021    private $serviceRating;
     22    /**
     23     * @var WordpressFunctionsService
     24     */
     25    private $wordpressFunctionsService;
    2126
    22     public function __construct(SettingService $settingService, RatingService $serviceRating)
    23     {
     27    public function __construct(
     28        SettingService $settingService,
     29        RatingService $serviceRating,
     30        WordpressFunctionsService $wordpressFunctionsService
     31    ) {
    2432        parent::__construct();
    2533        $this->settingService = $settingService;
    2634        $this->serviceRating = $serviceRating;
     35        $this->wordpressFunctionsService = $wordpressFunctionsService;
    2736    }
    2837
     
    3241
    3342        if ($settingsEntity->isSchemaEnable()) {
    34             $postId = get_the_ID();
     43            $postId = $this->wordpressFunctionsService->getCurrentPostID();
    3544
    3645            return $this->twig->render('star-rating-schema.twig', [
  • wp-post-rating/trunk/wp-post-rating.php

    r2369706 r2374700  
    44Plugin URI: http://romua1d.ru/wp_post_rating
    55Description: Powerful post rating wordpress plugin.
    6 Version: 1.1.0.2
     6Version: 1.1.0.3
    77Author: Romua1d
    88Author URI: https://romua1d.ru
     
    3232use WPR\Service\SettingFormService;
    3333use WPR\Service\Admin\AdminMenuService;
     34use WPR\Service\WordpressFunctionsService;
    3435
    3536#################################################
     
    4849    SettingService::class => create(SettingService::class),
    4950    SettingFormService::class => create(SettingFormService::class),
     51    WordpressFunctionsService::class => create(WordpressFunctionsService::class),
    5052
    5153    AdminMenuService::class => create(AdminMenuService::class),
Note: See TracChangeset for help on using the changeset viewer.