• Hi everybody,

    I have a plugin that I want to add a settings links to pointing to the settings page of the plugin.

    Do you know where can I see a object oriented example of where do I call the function add_filter?

    Right now I have the following but I think I placed this code in the wrong place;

    class wpy_meta
    {
      function __construct()
      {
        add_action('add_meta_boxes', array($this, 'add_meta_box'));
        add_action('save_post', array($this, 'save'));
    
        // This is my line of code. Might be in the wrong place. Is this in the right function?
        add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'mypluginnotrealname_action_links');
      }
    }
    
    $wpy_meta = new wpy_meta();

    Any links or help is appreciated.

    Thank you,

    V.

  • The topic ‘[Plugin] Where Can I Find An Example OOP PHP to add settings to plugin’ is closed to new replies.