• Resolved giova_kde

    (@giova_kde)


    Today I updated to the new version of WordPress Popular Posts and I realized that no longer allows me to translate the text of the widget on the homepage. By changing the php file in plugin>edit I can replace “under” with “section” but I can not find the code useful to replace “1234 views” with “1234 read”. Can you give me a help to solve this problem? I also tried to load in the network folder of the old version but the situation does not change.

    https://wordpress.org/plugins/wordpress-popular-posts/

Viewing 1 replies (of 1 total)
  • Thread Starter giova_kde

    (@giova_kde)

    Ho risolto sostituendo il codice:

    // views
    			if ($instance['stats_tag']['views']) {
    				$pageviews = $this->_get_pageviews($p, $instance);
    
    				if ($instance['order_by'] == 'avg') {
    					$views_text = sprintf(
    					_n('1 views', '%s views', intval($pageviews), $this->plugin_slug),
    					number_format_i18n($pageviews, 2)
    					);
    				}
    				else {
    					$views_text = sprintf(
    					_n('1 views', '%s views', intval($pageviews), $this->plugin_slug),
    					number_format_i18n($pageviews)
    					);
    				}
    
    				$stats[] = '<span class="wpp-views">' . $views_text . "</span>";
    			}

    con il codice:

    // views
    			if ($instance['stats_tag']['views']) {
    				$pageviews = $this->_get_pageviews($p, $instance);
    
    				if ($instance['order_by'] == 'avg') {
    					$views_text = sprintf(
    					_n('1 letta', '%s lette', intval($pageviews), $this->plugin_slug),
    					number_format_i18n($pageviews, 2)
    					);
    				}
    				else {
    					$views_text = sprintf(
    					_n('1 letta', '%s lette', intval($pageviews), $this->plugin_slug),
    					number_format_i18n($pageviews)
    					);
    				}
    
    				$stats[] = '<span class="wpp-views">' . $views_text . "</span>";
    			}
Viewing 1 replies (of 1 total)
  • The topic ‘I cant translate the text of the widget in homepage.’ is closed to new replies.