Changeset 2549572
- Timestamp:
- 06/17/2021 09:10:19 AM (5 years ago)
- Location:
- resoc/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
includes/class-resoc-compatibility.php (modified) (1 diff)
-
public/class-resoc-public.php (modified) (2 diffs)
-
resoc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
resoc/trunk/README.txt
r2549439 r2549572 5 5 Requires at least: 5.0 6 6 Tested up to: 5.7.2 7 Stable tag: 1.0. 67 Stable tag: 1.0.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 == Changelog == 82 82 83 = 1.0.7 = 84 * Compatibility with SEOPress 85 83 86 = 1.0.6 = 84 87 * More explicit message on settings change -
resoc/trunk/includes/class-resoc-compatibility.php
r2548886 r2549572 29 29 public static function is_aiosp_active() { 30 30 return is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ); 31 } 32 33 public static function is_seopress_active() { 34 return is_plugin_active( 'wp-seopress/seopress.php' ); 31 35 } 32 36 -
resoc/trunk/public/class-resoc-public.php
r2548884 r2549572 69 69 ); 70 70 } 71 else if ( Resoc_Compatibility::is_seopress_active() ) { 72 add_filter( 73 'seopress_social_og_thumb', 74 array( $this, 'override_seopress_image' ), 75 10, 1 76 ); 77 } 71 78 else { 72 79 $conflicting_plugin = Resoc_Compatibility::conflicting_plugin(); … … 114 121 115 122 return $facebookMeta; 123 } 124 125 public function override_seopress_image( $seopress_image ) { 126 $specific_image_id = get_post_meta( get_the_ID(), Resoc::POST_META_OG_IMAGE_ID, true ); 127 128 if ( $specific_image_id ) { 129 $image_data = wp_get_attachment_metadata( $specific_image_id ); 130 131 if ( is_array( $image_data ) ) { 132 $image_data['url'] = wp_get_attachment_image_url( $specific_image_id, 'full' ); 133 134 $resoc_image = '<meta property="og:image" value="' . esc_attr( $image_data['url'] ) . '" />' . "\n"; 135 136 if ( $image_data['width'] && $image_data['height'] ) { 137 $resoc_image .= '<meta property="og:image:width" value="' . esc_attr( $image_data['width'] ) . '" />' . "\n"; 138 $resoc_image .= '<meta property="og:image:height" value="' . esc_attr( $image_data['height'] ) . '" />' . "\n"; 139 } 140 141 return $resoc_image; 142 } 143 } 144 145 return $seopress_image; 116 146 } 117 147 -
resoc/trunk/resoc.php
r2549439 r2549572 17 17 * Plugin URI: https://resoc.io/resoc-uri/ 18 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 19 * Version: 1.0. 619 * Version: 1.0.7 20 20 * Author: Resoc 21 21 * Author URI: https://resoc.io/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'RESOC_VERSION', '1.0. 6' );38 define( 'RESOC_VERSION', '1.0.7' ); 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.