and i have this : "function get_latest_theme_version($interval) {" in update_notifier.php if helps?
help with functions plz
update_option
and get_option
write to and read from the options table, and both pass $db_cache_field
which equates to 'contempo-notifier-cache', which leads me to believe that the value does exist somewhere in the options table. It should be listed on the options.php page, but it's possible something has changed since I last used WordPress - try looking in the database itself.
- Edited
maxxd
Further, there's also the contemp-notifier-last-updated
field. Finding at setting that to something WAY in the future (like December 2500) would prevent this function from thinking that the theme needed updating.
The code suggests that the date is being stored in there as a Unix timestamp (instead of as a date), Depending on the type used the latest date possible might be 4294967295 (February 2106) or 214748364 (January 2038).
The simple_xml_load_string
line will be needed, because a text string is being stored, and the caller of this function will be expecting is XML.
Weedpacket setting that to something WAY in the future (like December 2500) would prevent this function from thinking that the theme needed updating.
True - hadn't thought about that!
Weedpacket The simple_xml_load_string line will be needed, because a text string is being stored, and the caller of this function will be expecting is XML.
Also true. However, given that it's an XML string being returned and not just a date I wonder if there are any other functions that rely on that XML string - it's possible there's another value in there that's checked elsewhere.
maxxd Also true. However, given that it's an XML string being returned and not just a date I wonder if there are any other functions that rely on that XML string - it's possible there's another value in there that's checked elsewhere.
Agreed. This function does a lot of work to give the user something they already have, just in case something that is now impossible happens. As you suggest, it might as well just return the thing right from the start.
I have found in update_notifier.php this:
$db_cache_field = 'contempo-notifier-cache';
$db_cache_field_last_updated = 'contempo-notifier-last-updated';
in options.php no contempo
andreinnica I have found in update_notifier.php this:
$db_cache_field = 'contempo-notifier-cache';
$db_cache_field_last_updated = 'contempo-notifier-last-updated';in options.php no contempo
Sorry, but I'm not really sure what that means. We already knew what update-notifier.php
contained - are you saying that if you search for 'contempo' on the 'options.php' page there are no matches? Or there are matches but the value of the keys is unreadable? Either way, have you checked the database itself - it's possible to hide values from 'options.php' that are contained in the options table of the database.
Presumably, the relevant database table is named somewhere (the place to start looking is in the definition of the get_option()
function); it's in that table the contempo-notifier-cache
and contempo-notifier-last-updated
columns will be found. (I'm kinda worried the naming convention suggests the table is named contempo
or even contempo-notifier
.)
get_option()
simply grabs the record from table wp_options
where option_name
matches the supplied string - in this case, contempo-notifier-last-updated
and contemp-notifier-cache
. @andreinnica - in your database, run this:
SELECT *
FROM wp_options
WHERE option_name = 'contempo_notifier_cache';
Having said that. let me reiterate that at this point it's a better idea to simply find and implement a new theme - this one is no longer under active development and as such is a security risk. Depending on when it was written, it's possible that it's a massive security risk.
maxxd exactley they are no matches when i search for 'contempo' on the 'options.php' page
maxxd where in the database should i run that? Thanks
- Edited
It would run anywhere in the database, or (from your perspective) it would run in whatever it is you use to manage the database.
- Edited
Actually, it might be better to run
SELECT *
FROM wp_options
WHERE option_name LIKE '%contempo_notifier_cache%';
If my memory serves correctly, the way to hide an option from displaying to the system is to prepend the name with an underscore, though admittedly it's been a while since I've been in the WordPress ecosystem with any regularity.
i just don`t understand where should i write that?