# learnpress/4.4.2/inc/ExternalPlugin/YoastSeo/LPYoastSeo.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.2. 30 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.2/code/inc/ExternalPlugin/YoastSeo/LPYoastSeo.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.2/raw/inc/ExternalPlugin/YoastSeo/LPYoastSeo.php
- Modified: 2026-07-11T02:31:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.2/code/inc/ExternalPlugin/YoastSeo/LPYoastSeo.php#L10-L20`.

```php
<?php
/**
 * Class LPYoastSeo
 *
 * Compatible with wordpress.org/plugins/wordpress-seo/
 * @since 4.2.6.4
 * @version 1.0.0
 */
namespace LearnPress\ExternalPlugin\YoastSeo;

use LearnPress\Helpers\Singleton;
use LP_Helper;
use LP_Page_Controller;

class LPYoastSeo {
	use Singleton;

	public function init() {
		add_filter( 'wpseo_opengraph_url', [ $this, 'opengraph_url' ] );
	}

	public function opengraph_url( $open_graph_url ) {
		if ( LP_Page_Controller::is_page_instructor() ) {
			$open_graph_url = LP_Helper::getUrlCurrent();
		}

		return $open_graph_url;
	}
}

```
