Cornelia Villeneuve
Forum Replies Created
-
Forum: Plugins
In reply to: [Login Widget With Shortcode] login_redirect filterThank you.
The best solution turned out to be to add the following code into the wp_login add_action
// check Login Sidebar Widget plugin is active if (is_plugin_active('login-sidebar-widget/login.php')) { add_filter('lwws_login_redirect', array(&$this, "redirectLogin"), 10, 2); }
Where redirectLogin looks like:
public function redirectLogin($redirect_to, $userID) { $user_meta = get_userdata($userID); /* add code to determine where to redirect to */ return $newURL; }
I tried adding the filter on the plugins_loaded action, but it was too early
- This reply was modified 6 years, 10 months ago by Cornelia Villeneuve.
Forum: Themes and Templates
In reply to: [Twenty Fourteen] Widgets function not workingCheck out Fatal Error: Twenty_Fourteen_Ephemera_Widget redeclared
The above post is a complaint I made 2 years ago that has gone unresolved. It makes all new widgets based on this theme not compile.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Timezone changes to UTCJust when I thought I had it completely solved.
Do not make the change in class-gc-event.php function process_shortcode. By doing so, the time zone changes by -4 hours.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Timezone changes to UTCSorry, I do not have a GitHub account, you can do it on my behalf.
I modified the plug-in as I described and it is working consistently now. The 3 calls to get_option are in class-gce-event.php and class-gce-feed.php
Pretty sure by modifying the php.ini file you can reproduce the problem, but it appears to take up to 24 hours to reproduce.
The website I’m using the Google Calendar Events plug-in in is https://www.OrleansArmyCadets.ca. I wrote short code to display the contents of the event on a post by extracting it from the gce_feed transient.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Timezone changes to UTCFound it!
There are 3 calls to
$ctz = get_option( ‘timezone_string’ );However there are NO calls to: date_default_timezone_set($ctz)
In a plug-in I wrote last year, I ran into a similar problem because no matter what I did, timestamps always displayed in UTC. The conclusion I came to was that WordPress was NOT setting the time zone, so any call to mktime would result in a UTC time instead of America/Toronto. By adding the following code after each of the above 3 get_option calls, I managed to get it to display the timestamp using the proper time zone.
`if (!empty( $ctz ))
{
date_default_timezone_set($ctz);
}’phpinfo() shows Default timezone is set to UTC hence the reason it is showing times in UTC.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Timezone changes to UTCHappened again. Times were in UTC again. Google Calendar looked fine.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Timezone changes to UTCHad it happen again this morning, but a different flavour. Instead of UTC, my widget started displaying using the 12 hour clock instead of 24.
Reset the feed and all was well again.
Very odd.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] An error has occured. Not FoundThank you for being so responsive. Do you work for Google by any chance?
Actually, I’ve ran across this error again today. A post with GCE short code was bringing it up
“An error has occured. Not Found”
The Cause: The Google Calendar id associated with this feed had “.ics” appended to the end of it for some reason. None of the other feeds had this.
Solution: Remove the “.ics” from the Google Calendar id associated with the feed.
Recommendation: Aside from the misspelt word “occured”, it needs two Rs not one. I recommend changing the error message to be more informative. I needed to grep the entire website, to determine where the error was coming from.
class-gce-feed.php get_feed_data line 200
replace the above error with:$this->error = __( 'An unexpected error has occurred in Calendar feed: ', 'gce' ) . $this->id; $this->error .= '<pre>' . $raw_data['error']['message'] . '</pre>';
Forum: Fixing WordPress
In reply to: Override twentyfourteen functions.php using child themeActually the underlying problem lies in TwentyFourteen’s functions.php code. The registration for Twenty_Fourteen_Ephemera_Widget is done incorrectly in twentyfourteen_widget_init(). I ran across the same problem when I was adding widgets to my child theme.
To correct the problem remove the following line from twentyfourteen_widget_init()
register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
and move therequire .. widgets.php
above the function. Rename the function twentyfourteen_widget_init to twentyfourteen_sidebar_init. Do not forget to rename it in
add_action( ‘widgets_init’, ‘twentyfourteen_widget_init’ );In widgets.php paste the following at the bottom of the file:
function twentyfourteen_widgets_init() { register_widget( 'Twenty_Fourteen_Ephemera_Widget' ); do_action('widgets_init'); } // call widget initialization add_action('init', 'twentyfourteen_widgets_init');
To summarize, the function containing register_sidebar is queued using add_action (‘widgets_init’.
However the function containing register_widget must perform do_action(‘widget_init’) after all widgets have been registered. This function is then queued using add_action (‘init’
A quick look at WordPress’ default-widgets.php will show the correct way to initialize widgets.
Forum: Themes and Templates
In reply to: [GeneratePress] left/right_sidebar_width not functioningI had that and yet in did not work.
I only found references to these 2 filters in extras.php i.e. generate_left_sidebar_classes(), generate_content_classes(), and generate_right_sidebar_classes()
$right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '25' ); $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '25' );
There appear to be no references to left_sidebar_width and right_sidebar_width in spacing.php aside from the array declaration. It is likely, this value is not used.
Forum: Themes and Templates
In reply to: [GeneratePress] left/right_sidebar_width not functioningMuch better.
I guess left_sidebar_width and right_sidebar_width assigned in generate_spacing_get_defaults() in spacing.php are obsolete?
Thank you very much
Forum: Plugins
In reply to: [WP Photo Album Plus] wppa_get_permalink 404 errorVerified in WP Photo Album Plus version 5.4.14
Thank you, Jacob
Forum: Plugins
In reply to: [PlugIn: WP Photo Album Plus] wppa_get_permalink 404 errorFixed in WP Photo Album Plus version 5.4.14
Thank you, Jacob
Downloaded version 2.0.5 and the grouped-list of events is now proceeded by the date.
Thank you.