Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
someguy9 committed May 19, 2022
1 parent dc87fc6 commit 57b64ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions inc/admin/mightyshare-metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ function render_mightyshare_image_field( $param, $value = '', $prefix = '' ) {
}
if ( $value && $image_attributes ) {
$image_class = '';
$image_button_text = '<img src="' . $image_attributes[0] . '" style="max-width:200px;height:auto;display:block;" />';
$image_button_text = '<img src="' . $image_attributes[0] . '" style="max-width:200px;max-height:200pxheight:auto;display:block;" />';
$display = 'inline-block';
}

?>
<div>
<a href="javascript:void(0)" class="mightyshare-upload-img-button<?php echo esc_attr( $image_class ); ?>"><?php echo esc_attr( $image_button_text ); ?></a><br />
<a href="javascript:void(0)" class="mightyshare-upload-img-button<?php echo esc_attr( $image_class ); ?>"><?php echo wp_kses_post( $image_button_text ); ?></a><br />
<input type="hidden" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $prefix . $param['id'] ); ?>" value="<?php echo esc_attr( $value ); ?>" />
<a href="javascript:void(0)" class="mightyshare-remove-img-button" style="display:inline-block;display:<?php echo esc_attr( $display ); ?>"><?php echo esc_attr( __( 'Remove image', 'mightyshare' ) ); ?></a>
</div>
Expand Down
17 changes: 7 additions & 10 deletions mightyshare.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: MightyShare
* Plugin URI: https://mightyshare.io/wordpress/
* Description: Automatically generate social share preview images with MightyShare!
* Version: 1.0.3
* Version: 1.0.4
* Text Domain: mightyshare
* Author: MightyShare
* Author URI: https://mightyshare.io
Expand All @@ -13,11 +13,11 @@
exit; // Exit if accessed directly.
}

define( 'MIGHTYSHARE_VERSION', '1.0.3' );
define( 'MIGHTYSHARE_VERSION', '1.0.4' );
define( 'MIGHTYSHARE_DIR_URL', plugin_dir_url( __FILE__ ) );
define( 'MIGHTYSHARE_DIR_URI', plugin_dir_path( __FILE__ ) );

add_action( 'after_setup_theme', function() {
add_action( 'init', function() {
$mightyshare_metaboxes = apply_filters( 'mightyshare_register_metaboxes', array() );

if ( $mightyshare_metaboxes && is_array( $mightyshare_metaboxes ) ) {
Expand Down Expand Up @@ -76,17 +76,12 @@ function mightshare_metaboxes( $metaboxes ) {
$post_template_options[ $key ] = $value;
}

$post_types = get_post_types( array( 'public' => true ), 'objects', 'and' );
$metabox_post_types = array();

foreach ( $post_types as $key => $value ) {
$metabox_post_types[] = $key;
}
$post_types = get_post_types( array( 'public' => true ), 'names' );

$metaboxes[] = array(
'id' => 'mightyshare',
'name' => 'MightyShare Options',
'post_type' => $metabox_post_types,
'post_type' => $post_types,
'fields' => array(
array(
'id' => 'mightyshare_enabled',
Expand Down Expand Up @@ -751,9 +746,11 @@ public function mightyshare_templates() {
'standard-3' => 'standard-3',
'mighty-1' => 'mighty-1',
'mighty-2' => 'mighty-2',
'mighty-3' => 'mighty-3',
'basic-1' => 'basic-1',
'basic-2' => 'basic-2',
'clean-1' => 'clean-1',
'clean-2' => 'clean-2',
'business-1' => 'business-1',
'screenshot-self' => 'Use a screenshot of the current page',
);
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: Social Preview, Open Graph, Social Media, Twitter Card, Open Graph Images
Requires at least: 5.4
Tested up to: 6.0
Requires PHP: 7.0
Stable tag: 1.0.3
Stable tag: 1.0.4
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html

Expand Down Expand Up @@ -52,6 +52,11 @@ The MightyShare plugin places a signed MightShare image URL onto your meta tags.

== Changelog ==

= 1.0.4 =
* New template added (mighty-3).
* Bug fix MightyShare not working on custom post types.
* Bug fix for logo display in settings.

= 1.0.3 =
* Added compatibility with All in One SEO Pack and The SEO Framework.
* 2 new template added (standard-3 and clean-1).
Expand Down

0 comments on commit 57b64ec

Please sign in to comment.