Remove square Open Graph image
This commit is contained in:
@@ -49,11 +49,6 @@ function asc_sp_event_open_graph_images( WP_Post $post ) {
|
||||
'width' => '1200',
|
||||
'height' => '628',
|
||||
),
|
||||
array(
|
||||
'url' => asc_sp_event_matchup_image_url( $post, 'square' ),
|
||||
'width' => '1200',
|
||||
'height' => '1200',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
{
|
||||
"name": "tonys-sportspress-enhancements",
|
||||
"version": "0.1.12",
|
||||
"version": "0.1.13",
|
||||
"main": "Gruntfile.js",
|
||||
"author": "YOUR NAME HERE",
|
||||
"scripts" : {
|
||||
|
||||
@@ -136,15 +136,12 @@ class Test_Open_Graph_Tags extends WP_UnitTestCase {
|
||||
$this->assertSame( 'article', $meta['type'] );
|
||||
$this->assertStringContainsString( 'Hawks vs Electrons', $meta['title'] );
|
||||
$this->assertStringContainsString( 'First pitch at one.', $meta['description'] );
|
||||
$this->assertCount( 2, $meta['images'] );
|
||||
$this->assertCount( 1, $meta['images'] );
|
||||
$this->assertSame( '1200', $meta['images'][0]['width'] );
|
||||
$this->assertSame( '628', $meta['images'][0]['height'] );
|
||||
$this->assertSame( '1200', $meta['images'][1]['width'] );
|
||||
$this->assertSame( '1200', $meta['images'][1]['height'] );
|
||||
$this->assertSame( '1200', $meta['image_width'] );
|
||||
$this->assertSame( '628', $meta['image_height'] );
|
||||
$this->assertStringContainsString( '/head-to-head?post=' . $event, $meta['image'] );
|
||||
$this->assertStringContainsString( 'variant=square', $meta['images'][1]['url'] );
|
||||
$this->assertNotEmpty( $meta['url'] );
|
||||
}
|
||||
|
||||
@@ -260,10 +257,9 @@ class Test_Open_Graph_Tags extends WP_UnitTestCase {
|
||||
$output = ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString( 'og:image:width', $output );
|
||||
$this->assertSame( 2, substr_count( $output, 'property="og:image" content=' ) );
|
||||
$this->assertSame( 1, substr_count( $output, 'property="og:image" content=' ) );
|
||||
$this->assertStringContainsString( 'content="628"', $output );
|
||||
$this->assertStringContainsString( 'content="1200"', $output );
|
||||
$this->assertStringContainsString( 'variant=square', $output );
|
||||
$this->assertStringContainsString( 'Hawks "A"', $output );
|
||||
$this->assertStringNotContainsString( '<B>', $output );
|
||||
$this->assertStringNotContainsString( '<script', $output );
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
* Text Domain: tonys-sportspress-enhancements
|
||||
* Domain Path: /languages
|
||||
* Update URI: https://github.com/anthonyscorrea/tonys-sportspress-enhancements
|
||||
* Version: 0.1.12
|
||||
* Version: 0.1.13
|
||||
*
|
||||
* @package Tonys_Sportspress_Enhancements
|
||||
*/
|
||||
|
||||
if ( ! defined( 'TONY_SPORTSPRESS_ENHANCEMENTS_VERSION' ) ) {
|
||||
define( 'TONY_SPORTSPRESS_ENHANCEMENTS_VERSION', '0.1.12' );
|
||||
define( 'TONY_SPORTSPRESS_ENHANCEMENTS_VERSION', '0.1.13' );
|
||||
}
|
||||
|
||||
if ( ! defined( 'TONY_SPORTSPRESS_ENHANCEMENTS_FILE' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user