| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/twitter.tar |
site-presenter.php 0000666 00000003206 15112253460 0010232 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter site tag.
*/
class Site_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:site';
/**
* Run the Twitter site through the `wpseo_twitter_site` filter.
*
* @return string The filtered Twitter site.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_site' - Allow changing the Twitter site account as output in the Twitter card by Yoast SEO.
*
* @api string $twitter_site Twitter site account string.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
$twitter_site = \apply_filters( 'wpseo_twitter_site', $this->presentation->twitter_site, $this->presentation );
$twitter_site = $this->get_twitter_id( $twitter_site );
if ( ! \is_string( $twitter_site ) || $twitter_site === '' ) {
return '';
}
return '@' . $twitter_site;
}
/**
* Checks if the given id is actually an id or a url and if url, distills the id from it.
*
* Solves issues with filters returning urls and theme's/other plugins also adding a user meta
* twitter field which expects url rather than an id (which is what we expect).
*
* @param string $id Twitter ID or url.
*
* @return string|bool Twitter ID or false if it failed to get a valid Twitter ID.
*/
private function get_twitter_id( $id ) {
if ( \preg_match( '`([A-Za-z0-9_]{1,25})$`', $id, $match ) ) {
return $match[1];
}
return false;
}
}
image-presenter.php 0000666 00000001725 15112253460 0010354 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter image.
*/
class Image_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:image';
/**
* The method of escaping to use.
*
* @var string
*/
protected $escaping = 'url';
/**
* Run the Twitter image value through the `wpseo_twitter_image` filter.
*
* @return string The filtered Twitter image.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_image' - Allow changing the Twitter Card image.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*
* @api string $twitter_image Image URL string.
*/
return (string) \apply_filters( 'wpseo_twitter_image', $this->presentation->twitter_image, $this->presentation );
}
}
card-presenter.php 0000666 00000001551 15112253460 0010200 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter Card tag.
*/
class Card_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:card';
/**
* Runs the card type through the `wpseo_twitter_card_type` filter.
*
* @return string The filtered card type.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_card_type' - Allow changing the Twitter card type.
*
* @param string $card_type The card type.
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
return \trim( \apply_filters( 'wpseo_twitter_card_type', $this->presentation->twitter_card, $this->presentation ) );
}
}
title-presenter.php 0000666 00000001623 15112253460 0010410 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter title.
*/
class Title_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:title';
/**
* Run the Twitter title through replace vars and the `wpseo_twitter_title` filter.
*
* @return string The filtered Twitter title.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_title' - Allow changing the Twitter title.
*
* @api string $twitter_title The Twitter title.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
return \trim( \apply_filters( 'wpseo_twitter_title', $this->replace_vars( $this->presentation->twitter_title ), $this->presentation ) );
}
}
creator-presenter.php 0000666 00000000753 15112253460 0010731 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter creator.
*/
class Creator_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:creator';
/**
* Gets the raw value of a presentation.
*
* @return string The raw value.
*/
public function get() {
return $this->presentation->twitter_creator;
}
}
description-presenter.php 0000666 00000001774 15112253460 0011621 0 ustar 00 <?php
namespace Yoast\WP\SEO\Presenters\Twitter;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Presenters\Abstract_Indexable_Tag_Presenter;
/**
* Presenter class for the Twitter description.
*/
class Description_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag key name.
*
* @var string
*/
protected $key = 'twitter:description';
/**
* Run the Twitter description through replace vars and the `wpseo_twitter_description` filter.
*
* @return string The filtered Twitter description.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_description' - Allow changing the Twitter description as output in the Twitter card by Yoast SEO.
*
* @api string $twitter_description The description string.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
return \apply_filters( 'wpseo_twitter_description', $this->replace_vars( $this->presentation->twitter_description ), $this->presentation );
}
}
image-helper.php 0000666 00000002200 15112277634 0007622 0 ustar 00 <?php
namespace Yoast\WP\SEO\Helpers\Twitter;
use Yoast\WP\SEO\Helpers\Image_Helper as Base_Image_Helper;
/**
* A helper object for Twitter images.
*/
class Image_Helper {
/**
* The base image helper.
*
* @var Base_Image_Helper
*/
private $image;
/**
* Image_Helper constructor.
*
* @codeCoverageIgnore
*
* @param Base_Image_Helper $image The image helper.
*/
public function __construct( Base_Image_Helper $image ) {
$this->image = $image;
}
/**
* The image size to use for Twitter.
*
* @return string Image size string.
*/
public function get_image_size() {
/**
* Filter: 'wpseo_twitter_image_size' - Allow changing the Twitter Card image size.
*
* @api string $featured_img Image size string.
*/
return (string) \apply_filters( 'wpseo_twitter_image_size', 'full' );
}
/**
* Retrieves an image url by its id.
*
* @codeCoverageIgnore It is a wrapper method.
*
* @param int $image_id The image id.
*
* @return string The image url.
*/
public function get_by_id( $image_id ) {
return $this->image->get_attachment_image_source( $image_id, $this->get_image_size() );
}
}
.htaccess 0000666 00000000424 15114014004 0006334 0 ustar 00 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>