Jamil Ahmed
Forum Replies Created
-
@tezalsec I think you have some type of caching enabled. Because disabling the option of “Disable WordPress application passwords” will remove/hide the WordFence message from the user profile page. I have tested this in 3 different sites on different servers.
Actually enabling this option in Wordfence do two things
1- Disable the “Application password” feature by WordPress
2- Display the message on the user profilePlease try clearing cache from any plugin installed & any caching in the server.
This is the code that is responsible for adding the message
https://plugins.trac.www.ads-software.com/browser/wordfence/trunk/lib/wordfenceClass.php#L1272if (wfConfig::get('loginSec_disableApplicationPasswords')) { add_filter('wp_is_application_passwords_available', '__return_false'); add_action('edit_user_profile', 'wordfence::showDisabledApplicationPasswordsMessage', -1); add_action('show_user_profile', 'wordfence::showDisabledApplicationPasswordsMessage', -1);
- This reply was modified 2 years, 5 months ago by Jamil Ahmed.
- This reply was modified 2 years, 5 months ago by Jamil Ahmed.
Simply disable the option in WordFence All Options Settings “Disable WordPress application passwords”. This will remove the message that is added by WordFence.
Now if you don’t want to use the WordPress feature “Application Passwords” just add this code in your child theme functions.php & it will disable it.
/** * * Disable Application password feature by WordPress * */ add_filter('wp_is_application_passwords_available', '__return_false');
Forum: Plugins
In reply to: [WP BrowserUpdate] Customize the text directly from the plugin interface@evanseabrook Yes you can add this code at the end of $buoop variable
<a{ignore_but}>ignore</a>
Complete snippet for your convenience
/** * * WP Browser update plugin overide * */ if ( function_exists( 'wpbu' ) ) { function wpbu2() { $wpbu_vars = explode(' ', get_option('wp_browserupdate_browsers')); $wpbu_js = explode(' ', get_option('wp_browserupdate_js')); $browser = 'e:'.$wpbu_vars[0].',f:'.$wpbu_vars[1].',o:'.$wpbu_vars[2].',s:'.$wpbu_vars[3].(!isset($wpbu_vars[4])?'':',c:'.$wpbu_vars[4]); echo '<script type="text/javascript"> var $buoop = {required:{'.$browser.'},reminder:'.(isset($wpbu_js[0]) ? $wpbu_js[0] : '').',test:'.(isset($wpbu_js[1]) ? $wpbu_js[1] : '').',newwindow:'.(isset($wpbu_js[2]) ? $wpbu_js[2] : '').',style:"'.(isset($wpbu_js[3]) ? $wpbu_js[3] : '').'",insecure:'.(isset($wpbu_js[4]) ? $wpbu_js[4] : '').',unsupported:'.(isset($wpbu_js[5]) ? $wpbu_js[5] : '').',mobile:'.(isset($wpbu_js[6]) ? $wpbu_js[6] : '').',shift_page_down:'.(isset($wpbu_js[7]) ? $wpbu_js[7] : '').',text:"Fairytalez.com would like to remind you: Your browser {brow_name} is out of date. Please <a{up_but}>update</a> for more security, comfort and the best experience on fairytalez.com. <a{ignore_but}>ignore</a>",api:2019.08}; function $buo_f(){ var e = document.createElement("script"); e.src = "//browser-update.org/update.min.js"; document.body.appendChild(e); }; try {document.addEventListener("DOMContentLoaded", $buo_f,false)} catch(e){window.attachEvent("onload", $buo_f)} </script>'; } remove_action( 'wp_footer', 'wpbu' ); add_action('wp_footer', 'wpbu2'); }
Forum: Plugins
In reply to: [WP BrowserUpdate] Customize the text directly from the plugin interface@teamvolta Sorry I forget to remove var_dump while I was testing the code. Just remove this line or comment out so it will not render anymore
Change this
var_dump($wpbu_js);
to
//var_dump($wpbu_js);
Corrected new code:
/** * * WP Browser update plugin overide * */ if ( function_exists( 'wpbu' ) ) { function wpbu2() { $wpbu_vars = explode(' ', get_option('wp_browserupdate_browsers')); $wpbu_js = explode(' ', get_option('wp_browserupdate_js')); $browser = 'e:'.$wpbu_vars[0].',f:'.$wpbu_vars[1].',o:'.$wpbu_vars[2].',s:'.$wpbu_vars[3].(!isset($wpbu_vars[4])?'':',c:'.$wpbu_vars[4]); echo '<script type="text/javascript"> var $buoop = {required:{'.$browser.'},test:'.(isset($wpbu_js[1]) ? $wpbu_js[1] : '').',newwindow:'.(isset($wpbu_js[2]) ? $wpbu_js[2] : '').',style:"'.(isset($wpbu_js[3]) ? $wpbu_js[3] : '').'",insecure:'.(isset($wpbu_js[4]) ? $wpbu_js[4] : '').',unsupported:'.(isset($wpbu_js[5]) ? $wpbu_js[5] : '').',mobile:'.(isset($wpbu_js[6]) ? $wpbu_js[6] : '').',shift_page_down:'.(isset($wpbu_js[7]) ? $wpbu_js[7] : '').',text:"Mysite.com would like to remind you: Your browser {brow_name} is out of date. Please <a{up_but}>update</a> for more security, comfort and the best experience on mysite.com",api:2019.08}; function $buo_f(){ var e = document.createElement("script"); e.src = "//browser-update.org/update.min.js"; document.body.appendChild(e); }; try {document.addEventListener("DOMContentLoaded", $buo_f,false)} catch(e){window.attachEvent("onload", $buo_f)} </script>'; } remove_action( 'wp_footer', 'wpbu' ); add_action('wp_footer', 'wpbu2'); }
- This reply was modified 4 years, 11 months ago by Jamil Ahmed.
Forum: Plugins
In reply to: [WP BrowserUpdate] Customize the text directly from the plugin interface@typopositive Until the dev add this feature, you can update the text with your custom text by dequeue the script and enqueue again in
functions.php
in child theme.,text:"Mysite.com would like to remind you: Your browser {brow_name} is out of date. Please <a{up_but}>update</a> for more security, comfort and the best experience on mysite.com",api:2019.08};
See the example below.
/** * * WP Browser update plugin overide * */ if ( function_exists( 'wpbu' ) ) { function wpbu2() { $wpbu_vars = explode(' ', get_option('wp_browserupdate_browsers')); $wpbu_js = explode(' ', get_option('wp_browserupdate_js')); var_dump($wpbu_js); $browser = 'e:'.$wpbu_vars[0].',f:'.$wpbu_vars[1].',o:'.$wpbu_vars[2].',s:'.$wpbu_vars[3].(!isset($wpbu_vars[4])?'':',c:'.$wpbu_vars[4]); echo '<script type="text/javascript"> var $buoop = {required:{'.$browser.'},test:'.(isset($wpbu_js[1]) ? $wpbu_js[1] : '').',newwindow:'.(isset($wpbu_js[2]) ? $wpbu_js[2] : '').',style:"'.(isset($wpbu_js[3]) ? $wpbu_js[3] : '').'",insecure:'.(isset($wpbu_js[4]) ? $wpbu_js[4] : '').',unsupported:'.(isset($wpbu_js[5]) ? $wpbu_js[5] : '').',mobile:'.(isset($wpbu_js[6]) ? $wpbu_js[6] : '').',shift_page_down:'.(isset($wpbu_js[7]) ? $wpbu_js[7] : '').',text:"Mysite.com would like to remind you: Your browser {brow_name} is out of date. Please <a{up_but}>update</a> for more security, comfort and the best experience on mysite.com",api:2019.08}; function $buo_f(){ var e = document.createElement("script"); e.src = "//browser-update.org/update.min.js"; document.body.appendChild(e); }; try {document.addEventListener("DOMContentLoaded", $buo_f,false)} catch(e){window.attachEvent("onload", $buo_f)} </script>'; } remove_action( 'wp_footer', 'wpbu' ); add_action('wp_footer', 'wpbu2'); }
Note: You need to update this code each time plugin updates this section of code
- This reply was modified 5 years, 2 months ago by Jamil Ahmed.
I am not in a namespace and simply extending my logger class in plugin using this tutorial https://simple-history.com/2015/create-logger/. I also tried to load my plugin on different hooks e.g plugins_loaded etc but no success.
Finally I have to include SimpleLogger.php in plugin to make it work.
Any idea
+1 It should be implemented
I confirm that above patch is working fine. Just thinking how to override this in child theme ?
Forum: Reviews
In reply to: [Add Smart App Banner] Great!@x06designs You can change the position of banner by appending it to any element in your page using jQuery append feature. e.g see below
just copy this script in your header.php and paste it before </head> and change the ID #sm-banner with your desired ID
jQuery( document ).ready(function() { jQuery('.smartbanner').appendTo('#sm-banner'); });
Forum: Plugins
In reply to: [WordPress PDF Templates] Warning: file_get_contentsDo we need VPS for file_get_contents functionwork properly or this can work on any shared hosting.
PHP Version 5.4.45
allow_url_fopen On OnI have tested at another host and latest version is working there
PHP Version 5.5.33After changing PHP version to 5.5 v 1.4.2 is working fine…. Thank you for your all time on this matter.
Forum: Plugins
In reply to: [WordPress PDF Templates] Warning: file_get_contentsAfter a lot of struggling and debugging I get the issue is with file_get_contents…. don’t know what is the perfect solution but I tried these
when I var_dump $html it has false value and no content. After that I have changed
$html = file_get_contents( $link, false, $context );
with
$html = wp_remote_fopen( $link );
and pdf-preview and pdf both works and showing the post content… Images and fonts are not working now.
Do you have any idea ?
Forum: Plugins
In reply to: [WordPress PDF Templates] PDF blank pageAfter checking it further
These endpoints did not display anything
/pdf/
/pdf-preview/Somehow this one working
/pdf-template/
Forum: Plugins
In reply to: [WordPress PDF Templates] PDF blank pageAlready tried this one but no success.
Forum: Plugins
In reply to: [WordPress PDF Templates] PDF blank pageAll errors gone for me except the blank PDF. Just letting you know here related to this thread.
Forum: Plugins
In reply to: [WordPress PDF Templates] Warning: file_get_contentsThanks for the update. Well errors are gone if I disable all debug as you suggested above. But PDF is still blank.