Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Use whatever PHP/JS development environment you’re comfortable using. To start with, you don’t need anything more than a bog standard WP installation. You will benefit in having installed locally, but it’s not essential. You’ll want to implement the wp_config.php constants suggested in the link. I would add define( 'WP_ENVIRONMENT_TYPE', 'development' ); to what’s suggested. There are some suggested plugins in the link, but they are not essential. The linked page is oriented towards theme devs, but is largely applicable to plugin devs as well.

    The functionality you describe can be accomplished with PHP without any additional libraries, assuming the tools are not expected to handle huge amounts of text. For privacy reasons, you might consider developing the tools with JS or jQuery so it’s all done locally in the user’s browser.

    Thread Starter Trahald

    (@trahald)

    OK great thank you ??

    So if I understand correctly, you’re saying I should just hardcode a web tool script directly into a theme, or create a plugin?

    I had been thinking of something like making a single page application or inclue file, and then using an insert PHP/exec PHP plugin to include it, but I guess you’re saying I should just make a plugin? How would I connect the plugin to a single page, via a header/footer plugin?

    If the tool needs a Composer package, should the “require_once ‘vendor/autoload.php’;” be in the plugin?

    Thank you for the assistance!

    Moderator bcworkz

    (@bcworkz)

    The theme or plugin choice partly depends on what else you intend to do and how you’d like your tools to be used. With the theme approach, you can build functionality into a custom single page template. Name the file according to template hierarchy and you’re good to go.

    Such a template from a plugin is more involved. You have to force WP to use a plugin’s template file, WP cannot find it on its own. You can use the “template_redirect” action or “template_include” filter to do so.

    Sorry, I cannot answer your question about Composer. I’ve no experience with it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What approach (plugins/frameworks/libaries) would you use a site with web tools?’ is closed to new replies.