Wrox Programmer Forums
|
BOOK: Professional WordPress Plugin Development
This is the forum to discuss the Wrox book Professional WordPress Plugin Development by Brad Williams, Ozh Richard, Justin Tadlock; ISBN: 978-0-470-91622-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WordPress Plugin Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2011, 09:37 AM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 9 Polling Alternative API issue

Brad, Ozh, and Justin,
Thank you for writing this book! It's already become a very valuable resource that I have no idea how I worked without it.

I'm having an issue with Polling an alternative API for my plugin. The code works and can tell when a new update is available, and it is able to grab and install the newer version just fine. My issue is WP keeps telling me that I have a new version available, even when I've already downloaded the recent one.

The version numbers match, the dates are in the past, and I've combed through the code; I just cant figure out whats not getting communicated to stop WordPress from telling me I have a new version available.

Thank you for your time.
 
Old August 3rd, 2011, 09:06 AM
Registered User
 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default same problem

I've gotten all the way up until mgyura

any additional info on this?
 
Old August 3rd, 2011, 09:17 AM
Registered User
 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

score! the issue lies when checking the transient and response. You shouldn't add to the transient array if the new_version matches the checked version, e.g.

if( false !== $response && $response->new_version > $transient->checked[EMP_SLUG] ) {

by the way, forgot to say how good this book is. Whilst I've had to learn most of this the hard way over the years there's still golden nuggets even in chapter 1!
The Following User Says Thank You to mrmarcus For This Useful Post:
mgyura (August 19th, 2011)
 
Old August 19th, 2011, 02:08 PM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Thank you!

Quote:
Originally Posted by mrmarcus View Post
score! the issue lies when checking the transient and response. You shouldn't add to the transient array if the new_version matches the checked version, e.g.

if( false !== $response && $response->new_version > $transient->checked[EMP_SLUG] ) {

by the way, forgot to say how good this book is. Whilst I've had to learn most of this the hard way over the years there's still golden nuggets even in chapter 1!
This is exactly what I was looking for. Works great! Thank you for posting this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Facebook api vs Twitter api aspless Classic ASP Basics 4 September 11th, 2017 08:51 AM
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM
SMTP event based polling Prathima SQL Server 2000 0 April 8th, 2004 02:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.