Internally call plugin

  • Author
    Posts
  • #3393123

    Hey gang,

    I’m developing a plugin to display a particular site feed to users. In the admin panel I’ve added an options page which will allow admin user to customize the look of the feed, so that it matches their site.

    To give them an idea of what the feed would look like, I’d like to display an iframe in the plugin options page, which would make a call to the plugin function that “renders” the front-end.

    So lets say my plugin is called “MyPlugin”, and in my plugins folder I have a MyPlugin folder, which has a file called MyPlugin.php. That file requires a class called MyPluginClass, which has a number of static methods, one of which displays the front-end feed. How do I call, from the admin side, that method to get what would be shown on the front?

    I figure there’s going to be 2 ways to do this: via a URL (but not the file URL directly), or by some magic WP method I do not know of ;)

    Any thoughts? Or does allowing them to customize the front-end just seem overkill?

    Thanks for any, ans all, help :)
    Paul

    #3393210

    kokkieh
    Staff

    Hi Paul,

    You’ve posted in the support forums for the hosting provider, WordPress.com.

    For help with plugin development, you want the forums for the open source WordPress software over on WordPress.org instead. I think the advanced forum would probably be the best place for your question:

    https://wordpress.org/support/forum/wp-advanced/

    You can also try the WordPress stackexchange:

    https://wordpress.org/support/forum/wp-advanced/

    #3396522

    Thank you for the links :)

    #3396528

    kokkieh
    Staff

    I see I somehow pasted the advanced forum link twice there.

    Here’s the link for the WordPress Stackexchange:

    https://wordpress.stackexchange.com/

You must be logged in to reply to this topic.