Trying to convert Php library from github to plugin.

samuelade

Newbie
Joined
Jun 2, 2017
Messages
18
Reaction score
1
I just started learning php a few days ago and I'm trying to build a wordpress plugin from a library I found on github. Is there a way to automatically fetch content to be parsed by this php library using rss feeds?

This is the admin Page I created. If I wanted to add the ability to add RSS feed so they can be parsed by the library, what function would I need.

PHP:
<?php
/*
Plugin Name: Recipe Parser
Description: This plugin is used to parse recipe websites and produce structured data of ingredients, directions and other relevant information.
Author: Onetsp
*/

//Admin Menu
add_action( 'admin_menu', 'recipe_parser_menu' );

function recipe_parser_menu(){

  $page_title = 'Recipe Parser';
  $menu_title = 'Recipe Parser';
  $capability = 'manage_options';
  $menu_slug  = 'Recipe Parser';
  $function   = 'recipe_parser_page';
  $icon_url   = 'dashicons-media-code';
  $position   = 4;

//Admin Page
  add_menu_page( $page_title,
                 $menu_title,
                 $capability,
                 $menu_slug,
                 $function,
                 $icon_url,
                 $position );
}

if( !function_exists("recipe_parser_page") )
{
function recipe_parser_page(){
?>
  <h1>Recipe Parser</h1>
<?php


}
}
?>

I can't add the link to the github php library but it's github (dot) com / onetsp /RecipeParser
 
Last edited:
Back
Top