Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
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?
Reply With Quote
  #3 (permalink)  
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!
Reply With Quote
The Following User Says Thank You to mrmarcus For This Useful Post:
mgyura (August 19th, 2011)
  #4 (permalink)  
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.