celtic-project / wordpress-lti-platform

Plugin to enable WordPress to act as an LTI Platform
GNU General Public License v3.0
2 stars 1 forks source link

Add 'urlonly' Target Option for LTI Shortcode #8

Open abdolnabi opened 2 months ago

abdolnabi commented 2 months ago

Fixes #7 This pull request introduces a new 'urlonly' target option for LTI shortcodes within the wordpress-lti-platform. This option allows users to generate only the URL without embedding or linking directly, facilitating easier integration with custom UI components.

Changes:

  1. class-lti-platform-tool.php: Extended the shortcode handler to include 'urlonly' as a target option. This modification enables the shortcode to return just the URL when 'urlonly' is specified.
  2. lti-platform-admin-edit.php: Updated the LTI Platform Settings menu in the admin panel to include 'urlonly' in the dropdown for presentation targets. This update allows administrators to easily select this new option from the platform settings.
  3. class-lti-platform-admin.php: Updated the LTI Platform Settings menu in the admin panel to include 'urlonly' in the dropdown for presentation targets. This update allows administrators to easily select this new option from the platform settings.
  4. public/class-lti-platform-public.php: Updated the LTI Platform Settings menu in the admin panel to include 'urlonly' in the dropdown for presentation targets. This update allows administrators to easily select this new option from the platform settings.

Motivation: The addition of the 'urlonly' option enhances flexibility for developers and admins, allowing more streamlined integration of LTI tools within custom solutions not requiring embedded or directly linked content.

Testing:

Please review the changes and merge them if they meet the project standards.