Matt Bagley
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form With Captcha] Where do I enter my email and keys?Go to (Admin area) > Settings > Contact Form With Captcha.
The address is https://www.example.com/wp-admin/options-general.php?page=contact-form-with-captcha
The first three boxes on that page are what you need. Just make sure you put the private/public keys in the right order.
Forum: Plugins
In reply to: [Contact Form With Captcha] PHP error: Illegal string offset 'text_string'Ya, and this isn’t good. It’s your credit line:
$cfwc_credit = $cfwc_credit['text_string'];
Forum: Plugins
In reply to: [WP FullCalendar] php errors from calling non-static functions statically.Possible patch (against 3.8.4) making functions static.
diff -ur wp-fullcalendar/wp-fullcalendar.php wp-fullcalendar-new/wp-fullcalendar.php --- wp-fullcalendar/wp-fullcalendar.php 2013-08-28 16:54:14.000000000 -0600 +++ wp-fullcalendar-new/wp-fullcalendar.php 2014-06-14 00:54:16.000000000 -0600 @@ -30,7 +30,7 @@ static $tip_styles_css3 = array('shadow','rounded'); static $tip_positions = array('top left', 'top right', 'top center', 'bottom left', 'bottom right', 'bottom center', 'right center', 'right top', 'right bottom', 'left center', 'left top', 'left bottom', 'center'); - function init() { + static function init() { //Scripts if( !is_admin() ){ //show only in public area add_action('wp_enqueue_scripts',array('WP_FullCalendar','enqueue_scripts')); @@ -54,7 +54,7 @@ //END Events Manager Integration } - function enqueue_scripts(){ + static function enqueue_scripts(){ global $wp_query; $obj_id = is_home() ? '-1':$wp_query->get_queried_object_id(); $wpfc_scripts_limit = get_option('wpfc_scripts_limit'); @@ -67,7 +67,7 @@ } } - function localize_script(){ + static function localize_script(){ $js_vars = array(); $js_vars['ajaxurl'] = admin_url('admin-ajax.php'); $js_vars['firstDay'] = get_option('start_of_week'); @@ -155,7 +155,7 @@ /** * Catches ajax requests by fullcalendar */ - function ajax(){ + static function ajax(){ global $post; //sort out args unset($_REQUEST['month']); //no need for these two @@ -243,7 +243,7 @@ * @param array $args * @return string */ - function calendar( $args = array() ){ + static function calendar( $args = array() ){ if (is_array($args) ) self::$args = array_merge(self::$args, $args); self::$args['month'] = (!empty($args['month'])) ? $args['month']-1:date('m', current_time('timestamp'))-1; self::$args['year'] = (!empty($args['year'])) ? $args['year']:date('Y', current_time('timestamp')); @@ -284,7 +284,7 @@ * Run at wp_footer if a calendar is output earlier on in the page. * @uses self::$args - which was modified during self::calendar() */ - function footer_js(){ + static function footer_js(){ $r = array(); ?> <script type='text/javascript'>
Forum: Plugins
In reply to: [Quotes Collection] Quotes Collection and W3 Total CacheYa, maybe you have page cache enabled. I do, and it always starts off with the same quote until the saved page is remade.
https://www.sailingonward.com/
I don’t have minify nor the database ones enabled. I have a different minify plugin which I like better than w3’s.
Like @argolyte said, each page still has a separate quote. But if you had to always have a different quote in the same page. See, the plugin is going to save the quote inside the page, which W3 is going to cache.
Two options:
1) Install a javascript loading widget. These widgets will load their widget data via a javascript (ajax) call, rather than being embedded in the page. So the quote will be loaded separately from the page, and will be unique on each load of any page. W3 gets pushed out of the picture.
2) Have javascript refresh the quote on page load. Note that the old quote will probably display for a second or two, or longer. Or sometimes may not change at all. Seriously, don’t use this method. I just tried it and found it to be unreliable. Try the widget idea above.
No. They don’t seem to.
I believe they are all strict errors (or notices?). I have a plugin that catches all the errors and shows them.
And then I have this little plugin that makes it show them. Without it, it only shows really bad errors.
<?php /* Plugin Name: Show Strict Errors Plugin URI: https://www.mydigitalwalk.com Description: Funny little plugin that will display all site errors. Careful... Version: 0.1 Author: Matt Bagley Author URI: https://www.mydigitalwalk.com License: GPLv2 or later */ error_reporting(E_ALL); //use with an error catcher, or just to display ini_set('display_errors', '1'); //otherwise keep a log. may get really long really fast... //ini_set('log_errors','true'); //ini_set('error_log','/path/to/error_log'); //ini_set('error_reporting','999999999'); ?>
Anyhow, some of the errors are simple. Like the non-static function in module.lightbox.php. It’s being called as $this->_add_script_data on one line and then as self::_add_script_data in another place.
The error is referencing the second call. Either call it as $this->_add_script_data or set the function to “public static” and call both as self::_add_script_data.
Don’t know about the “should be compatible with” errors. It’s complaining about the same call/function/method for each pair. Might be something in the extending the original class. I noticed lots of them don’t like or are clashing with C_Component::define.
Let me know if the above plugin helps. Oh, and you can’t just put it in wp-config.php. For some reason (atleast for me) WordPress messes with it later on and nothing shows.
Otherwise I’ll see how to get them to show on a default install.
Forum: Plugins
In reply to: [SEO Ultimate] php error (function called by reference)I’m thinking just remove the ‘&’ in front of the function on that line.
From
$parent = &get_post($parent);
to
$parent = get_post($parent);
Awesome! I went ahead and double checked it, and it blocks both existing and non-existing users.
Good job!
(Anyone who is browsing this, it means that if you changed “Max Login Attempts Per *User*” to 0, you can now safely set it back to 10, or whatever you want, and attackers won’t be able to guess your site’s usernames using the above problem.)
Oh, that’s where they’re at. Anyhow, I’m glad for the security improvement and I sent ya an email.
Ya, I have on a few of my sites. Though I disable login security on one or the other. It’s usually fine running two security engines at the same time, as long as they don’t overlap or simular actions are not duplicated. Otherwise you may end up with them messing each other up.
Like what some may have done back in school: you need to get past two people, who each won’t let you get through, so you get them mad at each other, and slip on by unnoticed while they argue.