WordPress.org

Ready to get started?Download WordPress

Forums

Lots of questions about plugin development (4 posts)

  1. jcnetsys
    Member
    Posted 3 years ago #

    I am in the process of re-writing my plugins and creating a few new ones and I have a few questions.

    My new plugins will be based around a home made framework which simplifies the admin side of things. Obviously each plugin will be bundled with the framework but only one class can be declared. That is fine except if I update the framework and someone has an outdated plugin then upon a new install of another plugin the new plugin may try and use some methods that are new to the new version of the framework which would fail because they weren't declared as the framework class had already been declared with the outdated version. One way to get around this is to give each new version a unique class name like 'framework1' and 'framework2'. Does anybody know of a way to make sure that the most recent framework is declared?

    I have done little work with network sites but people are requesting network features. Is there a global options database? - I need to be able to set options which are accessible from within any of the individual site's sandboxes.

    My plugin is internationalised but has no .mo, .po files - can anyone suggest which windows software is best for making these (I have some translators ready)?

    Is there a way for a plugin to opt itself out of the automatic updates? My plugins are very extensible (usually slight changes can be done by adding an extensions.php file) however sometimes I cannot extend the functionality that someone has requested without modifying the plugin code. Despite my warnings some of these people update the plugin and lose the customisations. I know I can just change the name of the plugin but that isn't ideal. Is there any other way that I can opt out of the update notifications?

    I know this isn't wordpress related but I thought I might as well ask it here. Is there any way (doesn't need to support old browsers as isn't essential) without javascript to set a style to act on all elements with a certain class when any one of them is hovered. All the elements are siblings. Basically there is a list of logged visits with the ip(without dots) as a class so when they hover over one record I want all the others by that person to highlight.

  2. Helen Hou-Sandi
    WordPress Dev
    Posted 3 years ago #

    To answer some of this:

    For the framework version - perhaps a constant would work? E.g. something like MY_FRAMEWORK_VERSION, which you could then compare against.

    To exclude things from update checks: http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/

  3. jcnetsys
    Member
    Posted 3 years ago #

    Thanks Helen

  4. anmari
    Member
    Posted 3 years ago #

    Hi jcnetsys,

    Just a suggestion - rather than opt out of updates, you could do something like

    * store the special functions as a separate plugin
    * test for the existence of the special function in your main plugin before using them

    that way people do not lose the benefit of any upgrades or bug fixes to the main code.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.