a4jp
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Popular Posts] How to remove the prettify formatting with a shortcodeThanks for the help. I saw the example
<li>{thumb} {title} <div class="wpp-stats">Viewed {views} times, published on {date} under {category}</div></li>and link https://github.com/cabrerahector/wordpress-popular-posts/wiki/2.-Template-tags#parameters that explains everything but couldn’t find a simple example of what I’m trying to get from the older version of the plugin.
This code below is very close but how do I add the eye icon before the view count? Can you also add this to the shortcode sample to your page so it is easier to see how to migrate from the older version of the plugin.すべての閲覧数
[wpp post_type='post' limit=28 range='all' order_by='views' cat='-71,140' thumbnail_width=130 thumbnail_height=73 post_html='{thumb} {title} {views}']The code below was also great but what else can I add to turn off the view word sitewide? It might be quicker if I can just disable the word for now.
/**
* Disables WP Popular Posts’ “Pretty Numbers”.
*
* @param bool $pretty_numbers
* @return bool
*/
add_filter(‘wpp_prettify_numbers’, ‘__return_false’);Forum: Plugins
In reply to: [WP Popular Posts] How to remove the prettify formatting with a shortcodeAlso how do I change the “view/views” to “View/Views” or “回” per sidebar instance or remove the word form some pages. I have both English and Japanese versions in different sidebars.
Forum: Plugins
In reply to: [WP Popular Posts] How to remove the prettify formatting with a shortcodeCan you add the shortcode option to the next update please? Sometimes I need prettified number on some pages but not on others? I also need numbers with and without commas depending on designs.
Did you add an area to add meta data to just the pages your plugin makes yet?
I mean from the quiz with direct link. For example, on the study page https://agreatdream.com/quiz/eiken-grade-pre-2-plus-sample-test/. I’m using Yoast because you are missing the fields but this should be built in.
/*this functions.php code doesn't break Quiz and Survey Master (QSM) on iPhones*/
add_filter('the_content', function($content) {
if (is_admin() || empty($content)) return $content;
// Only modify <img> tags, leave everything else untouched
return preg_replace_callback(
'/<img[^>]+>/i',
function($match) {
$img = $match[0];
if (strpos($img, 'loading=') === false) {
$img = preg_replace('/<img/i', '<img loading="eager"', $img);
}
static $first = true;
if ($first) {
if (strpos($img, 'fetchpriority=') === false) {
$img = preg_replace('/<img/i', '<img fetchpriority="high"', $img);
}
$first = false;
}
return $img;
},
$content
);
}, 50);
/*this functions.php code breaks Quiz and Survey Master (QSM) on iPhones*/
/*
add_filter('the_content', function($content) {
libxml_use_internal_errors(true);
$dom = new DOMDocument;
$dom->loadHTML('<?xml encoding="utf-8" ?>' . $content);
$images = $dom->getElementsByTagName('img');
$first = true;
foreach ($images as $img) {
$img->setAttribute('loading', 'eager');
if ($first) {
$img->setAttribute('fetchpriority', 'high');
$first = false;
}
}
$body = $dom->getElementsByTagName('body')->item(0);
return $body ? $dom->saveHTML($body) : $content;
}, 9999);
*/- This reply was modified 4 months, 2 weeks ago by a4jp.
I disabled it and the quiz worked on my PC.
How do I go back a version? Anything before 10.3.4 please.
The button sometimes doesn’t work on the PC either. Is it a z-depth problem?
input.qsm-btn.qsm-submit-btn.qmn_btn{float:right!important;clear:both}Floating the button to the right breaks the button. What is the best way to left align the button?
Asta HTML Minifier breaks your plugin.
I think I’ll try something like this in the functions.php file for now:
//Something to reduce spam form email addresses with lots of dots
add_filter('registration_errors', function($errors, $sanitized_user_login, $user_email) {
// Count dots before @
$local_part = substr($user_email, 0, strpos($user_email, '@'));
if (substr_count($local_part, '.') > 5) {
$errors->add('invalid_email', __('<strong>ERROR</strong>: Email address looks suspicious. Please use a valid email.'));
}
return $errors;
}, 10, 3);
//Honeypot
add_action('register_form', function() {
echo '<p style="display:none;">
<label>Leave this empty <input type="text" name="hp_field" value=""></label>
</p>';
});
add_filter('registration_errors', function($errors, $sanitized_user_login, $user_email) {
if (!empty($_POST['hp_field'])) {
$errors->add('spam_detected', __('<strong>ERROR</strong>: Spam detected.'));
}
return $errors;
}, 10, 3);There is some sort of bug and I can’t figure out a way to fix it besides disable the plugin every time I wanna edit my site but that breaks my site as I’m using rows on the site :/
Forum: Plugins
In reply to: [Wicked Block Conditions] Store “core/interface” is already registered errorThank you so much for the quick update. I’m still getting the error so I’d like to figure out what is causing it and try and remove it if possible. It only shows up in the console when looking at wp-admin/widgets.php.
data.min.js?ver=fe6c4835cd00e12493c3:2 Store “core/interface” is already registered.
i @ data.min.js?ver=fe6c4835cd00e12493c3:2
register @ data.min.js?ver=fe6c4835cd00e12493c3:2
(anonymous) @ data.min.js?ver=fe6c4835cd00e12493c3:2
(anonymous) @ edit-widgets.min.js?ver=9a04bb29c0759b535e9e:2
(anonymous) @ edit-widgets.min.js?ver=9a04bb29c0759b535e9e:2I was using your plugin but it didn’t work so I switched to Animate it. I’m just here to tell you your plugin is broken.