Giter VIP home page Giter VIP logo

Comments (3)

YahnisElsts avatar YahnisElsts commented on June 23, 2024

That part of the documentation is for the old, unmaintained theme update checker library. It sounds like you're using the more recent plugin-update-checker library instead. That's a good thing, but the new library requires slightly different initialisation code. Here's an example:

$MyThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
	'https://mysite.co.uk//wp-update-server/?action=get_metadata&slug=myBlog-1.0.8',
	__FILE__, //Full path to functions.php.
	'schoolsUOL'
);

By the way, I would recommend using all-lowercase slugs for your theme(s). A while ago there were reports about a WP bug that could interfere with AJAX update installation when the slug contained uppercase characters. I'm not sure if that has been fixed yet.

from wp-update-server.

unijez avatar unijez commented on June 23, 2024

That part of the documentation is for the old, unmaintained theme update checker library. It sounds like you're using the more recent plugin-update-checker library instead. That's a good thing, but the new library requires slightly different initialisation code. Here's an example:

$MyThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
	'https://mysite.co.uk//wp-update-server/?action=get_metadata&slug=myBlog-1.0.8',
	__FILE__, //Full path to functions.php.
	'schoolsUOL'
);

By the way, I would recommend using all-lowercase slugs for your theme(s). A while ago there were reports about a WP bug that could interfere with AJAX update installation when the slug contained uppercase characters. I'm not sure if that has been fixed yet.

Thank you.

Would it be okay to use &slug=myBlog rather than a version prefix, otherwise there would be no point in releasing an update because i would have to change that line of code in each functions file running the theme?

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on June 23, 2024

Would it be okay to use &slug=myBlog rather than a version prefix

Of course. The slug in the URL basically just determines which file in the packages directory the server will look at. So you could rename myBlog-1.0.8.zip to myBlog.zip and then use &slug=myBlog.

Just to clarify, when I was talking about lowercase slugs, I meant this part: schoolsUOL. The slug parameter in the metadata URL doesn't have to be lowercase.

from wp-update-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.