-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ahmedkaludi/2.4.5
2.4.5
- Loading branch information
Showing
21 changed files
with
291 additions
and
54 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* Creates an Opengraph alternate locale meta tag to be consumed by Yoast SEO | ||
* Requires Yoast SEO 14.0 or newer. | ||
*/ | ||
namespace WPM\Includes\Integrations; | ||
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Presenter; | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
/** | ||
* @class WPM_Yoast_Seo_Presenters | ||
* @package WPM/Includes/Integrations | ||
* @category Integrations | ||
* @author Damir Calusic | ||
*/ | ||
class WPM_Yoast_Seo_Presenters extends Abstract_Indexable_Presenter { | ||
|
||
/** | ||
* Facebook locale | ||
* | ||
* @var string $locale | ||
*/ | ||
private $locale; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string $locale Facebook locale. | ||
* @since 2.4.5 | ||
*/ | ||
public function __construct( $locale ) { | ||
$this->locale = $locale; | ||
} | ||
|
||
/** | ||
* Returns the meta Opengraph alternate locale meta tag | ||
* | ||
* @return string | ||
* @since 2.4.5 | ||
*/ | ||
public function present() { | ||
return sprintf( '<meta property="og:locale:alternate" content="%s" />', esc_attr( $this->get() ) ); | ||
} | ||
|
||
/** | ||
* Returns the alternate locale | ||
* | ||
* @return string | ||
* @since 2.4.5 | ||
*/ | ||
public function get() { | ||
return $this->locale; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.