Plugin Directory

Changeset 2916731


Ignore:
Timestamp:
05/24/2023 09:47:30 AM (3 years ago)
Author:
mowomo
Message:

Update version to 2.0.6

Location:
mowomo-redes-sociales
Files:
4 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mowomo-redes-sociales/tags/2.0.6/README.md

    r2668006 r2916731  
    33Tags: buttons, icons, share, social media, social share, social buttons
    44Requires at least: 4.6
    5 Tested up to: 5.9
    6 Stable tag: 2.0.5
     5Tested up to: 6.2.0
     6Stable tag: 2.0.6
    77Requires PHP: 5.2.4
    88License: GPLv2 or later
     
    3636
    3737== Changelog ==
     38= 2.0.6 =
     39
     40-   Updated code review with WordPress version 6.2
     41
    3842= 2.0.5 =
    3943
  • mowomo-redes-sociales/tags/2.0.6/includes/frontend/class.mwm-rrss.php

    r2668006 r2916731  
    259259            if (is_object($post)) {
    260260                // Twitter specific
    261                 echo '<meta name="twitter:card"         content="summary_large_image" />';
     261                echo '<meta name="twitter:card" content="summary_large_image" />';
    262262
    263263                // Meta tags for Open Graph
    264                 echo '<meta property="og:description"   content="' . esc_attr( $this->get_descripcion_post() ) . '" />';
    265                 echo '<meta property="og:type"          content="article" />';
    266                 echo '<meta property="og:image"         content="' . esc_attr( $this->get_imagen_destacada_post() ) . '" />';
     264                echo '<meta property="og:title" content="' . esc_attr( $this->get_title_post() ) . '" />';
     265                echo '<meta property="og:url" content="' . esc_attr( $this->get_url_post() ) . '" />';
     266                echo '<meta property="og:description" content="' . esc_attr( $this->get_descripcion_post() ) . '" />';
     267                echo $this->get_imagen_destacada_post();
     268                echo '<meta property="og:type" content="article" />';
    267269
    268270                // Do stuff if need it
     
    271273        }
    272274
     275        /**
     276         * Returns the title of the current post.
     277         *
     278         * @since 1.0.0
     279         *
     280         * @return string
     281        */
     282        function get_title_post()
     283        {
     284            global $post;
     285
     286            if ( !empty( $post->post_title ) ) {
     287
     288                $post_title = $post->post_title;
     289
     290            } else {
     291
     292                $post_title = '';
     293
     294            }
     295
     296            return apply_filters( 'mwm_rrss_get_title_post', $post_title, $post->ID );
     297        }
     298
     299        /**
     300         * Returns the url of the current post.
     301         *
     302         * @since 1.0.0
     303         *
     304         * @return string
     305        */
     306        function get_url_post()
     307        {
     308            global $post;
     309
     310            $post_url = get_post_permalink( $post );
     311
     312            if ( empty( $post_url ) ) {
     313
     314                $post_url = '';
     315
     316            }
     317
     318            return apply_filters( 'mwm_rrss_get_url_post', $post_url, $post->ID );
     319        }
     320
    273321        /**
    274322         * Returns the description of the current post.
     
    308356            global $post;
    309357
     358            $html = '';
    310359            $post_thumbnail_id   = get_post_thumbnail_id( $post->ID );
    311 
    312             $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, 'large' );
     360            $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, 'thumbnail' );
    313361
    314362            if ( is_array( $post_thumbnail_data ) ) {
    315                 return apply_filters( 'mwm_rrss_get_imagen_destacada_post', $post_thumbnail_data[0], $post->ID );
    316             } else {
    317                 return '';
     363
     364                $post_thumbnail_data_src = $post_thumbnail_data[0];
     365                $post_thumbnail_data_width = $post_thumbnail_data[1];
     366                $post_thumbnail_data_height = $post_thumbnail_data[2];
     367                $post_thumbnail_data_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true );
     368                $post_thumbnail_data_type = get_post_mime_type( $post_thumbnail_id );
     369
     370                ob_start()?>
     371
     372                <meta property="og:image" content="<?php echo esc_attr( $post_thumbnail_data_src ); ?>" />
     373                <meta property="og:image_secure_url" content="<?php echo esc_attr( $post_thumbnail_data_src ); ?>" />
     374                <meta property="og:image:width" content="<?php echo esc_attr( $post_thumbnail_data_width ); ?>" />
     375                <meta property="og:image:height" content="<?php echo esc_attr( $post_thumbnail_data_height ); ?>" />
     376                <meta property="og:image:alt" content="<?php echo esc_attr( $post_thumbnail_data_alt ); ?>" />
     377                <meta property="og:image:type" content="<?php echo esc_attr( $post_thumbnail_data_type ); ?>" />
     378
     379                <?php $html = ob_get_clean();
     380
     381                apply_filters( 'mwm_rrss_get_imagen_destacada_post', $html, $post->ID );
     382
    318383            }
     384
     385            return $html;
    319386        }
    320387    }
  • mowomo-redes-sociales/tags/2.0.6/mowomo-redessociales.php

    r2668006 r2916731  
    55 * Description: Light and simple plugin for allowing the readers of your blog to share your entries on their social networks. If you only need to offer the possibility to your readers of sharing your blog entries... Why getting complicated?
    66 * Author: mowomo
    7  * Author URI: https://mowomo.com/sobre-mowomo
     7 * Author URI: https://mowomo.com/
    88 * Text Domain: mowomo-redes-sociales
    99 * Domain Path: /languages/
    10  * Version: 2.0.5
     10 * Version: 2.0.6
    1111 * License: GPLv2 or later.
    1212 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1313 * WC requires at least: 4.6
    14  * WC tested up to: 5.9
     14 * WC tested up to: 6.2.0
    1515 */
    1616
     
    3232    return;
    3333} else {
    34     define('MWM_RRSS_VERSION', '2.0.5');
     34    define('MWM_RRSS_VERSION', '2.0.6');
    3535}
    3636if (!defined('MWM_RRSS_SLUG')) {
  • mowomo-redes-sociales/trunk/README.md

    r2668006 r2916731  
    33Tags: buttons, icons, share, social media, social share, social buttons
    44Requires at least: 4.6
    5 Tested up to: 5.9
    6 Stable tag: 2.0.5
     5Tested up to: 6.2.0
     6Stable tag: 2.0.6
    77Requires PHP: 5.2.4
    88License: GPLv2 or later
     
    3636
    3737== Changelog ==
     38= 2.0.6 =
     39
     40-   Updated code review with WordPress version 6.2
     41
    3842= 2.0.5 =
    3943
  • mowomo-redes-sociales/trunk/includes/frontend/class.mwm-rrss.php

    r2668006 r2916731  
    259259            if (is_object($post)) {
    260260                // Twitter specific
    261                 echo '<meta name="twitter:card"         content="summary_large_image" />';
     261                echo '<meta name="twitter:card" content="summary_large_image" />';
    262262
    263263                // Meta tags for Open Graph
    264                 echo '<meta property="og:description"   content="' . esc_attr( $this->get_descripcion_post() ) . '" />';
    265                 echo '<meta property="og:type"          content="article" />';
    266                 echo '<meta property="og:image"         content="' . esc_attr( $this->get_imagen_destacada_post() ) . '" />';
     264                echo '<meta property="og:title" content="' . esc_attr( $this->get_title_post() ) . '" />';
     265                echo '<meta property="og:url" content="' . esc_attr( $this->get_url_post() ) . '" />';
     266                echo '<meta property="og:description" content="' . esc_attr( $this->get_descripcion_post() ) . '" />';
     267                echo $this->get_imagen_destacada_post();
     268                echo '<meta property="og:type" content="article" />';
    267269
    268270                // Do stuff if need it
     
    271273        }
    272274
     275        /**
     276         * Returns the title of the current post.
     277         *
     278         * @since 1.0.0
     279         *
     280         * @return string
     281        */
     282        function get_title_post()
     283        {
     284            global $post;
     285
     286            if ( !empty( $post->post_title ) ) {
     287
     288                $post_title = $post->post_title;
     289
     290            } else {
     291
     292                $post_title = '';
     293
     294            }
     295
     296            return apply_filters( 'mwm_rrss_get_title_post', $post_title, $post->ID );
     297        }
     298
     299        /**
     300         * Returns the url of the current post.
     301         *
     302         * @since 1.0.0
     303         *
     304         * @return string
     305        */
     306        function get_url_post()
     307        {
     308            global $post;
     309
     310            $post_url = get_post_permalink( $post );
     311
     312            if ( empty( $post_url ) ) {
     313
     314                $post_url = '';
     315
     316            }
     317
     318            return apply_filters( 'mwm_rrss_get_url_post', $post_url, $post->ID );
     319        }
     320
    273321        /**
    274322         * Returns the description of the current post.
     
    308356            global $post;
    309357
     358            $html = '';
    310359            $post_thumbnail_id   = get_post_thumbnail_id( $post->ID );
    311 
    312             $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, 'large' );
     360            $post_thumbnail_data = wp_get_attachment_image_src( $post_thumbnail_id, 'thumbnail' );
    313361
    314362            if ( is_array( $post_thumbnail_data ) ) {
    315                 return apply_filters( 'mwm_rrss_get_imagen_destacada_post', $post_thumbnail_data[0], $post->ID );
    316             } else {
    317                 return '';
     363
     364                $post_thumbnail_data_src = $post_thumbnail_data[0];
     365                $post_thumbnail_data_width = $post_thumbnail_data[1];
     366                $post_thumbnail_data_height = $post_thumbnail_data[2];
     367                $post_thumbnail_data_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true );
     368                $post_thumbnail_data_type = get_post_mime_type( $post_thumbnail_id );
     369
     370                ob_start()?>
     371
     372                <meta property="og:image" content="<?php echo esc_attr( $post_thumbnail_data_src ); ?>" />
     373                <meta property="og:image_secure_url" content="<?php echo esc_attr( $post_thumbnail_data_src ); ?>" />
     374                <meta property="og:image:width" content="<?php echo esc_attr( $post_thumbnail_data_width ); ?>" />
     375                <meta property="og:image:height" content="<?php echo esc_attr( $post_thumbnail_data_height ); ?>" />
     376                <meta property="og:image:alt" content="<?php echo esc_attr( $post_thumbnail_data_alt ); ?>" />
     377                <meta property="og:image:type" content="<?php echo esc_attr( $post_thumbnail_data_type ); ?>" />
     378
     379                <?php $html = ob_get_clean();
     380
     381                apply_filters( 'mwm_rrss_get_imagen_destacada_post', $html, $post->ID );
     382
    318383            }
     384
     385            return $html;
    319386        }
    320387    }
  • mowomo-redes-sociales/trunk/mowomo-redessociales.php

    r2668006 r2916731  
    55 * Description: Light and simple plugin for allowing the readers of your blog to share your entries on their social networks. If you only need to offer the possibility to your readers of sharing your blog entries... Why getting complicated?
    66 * Author: mowomo
    7  * Author URI: https://mowomo.com/sobre-mowomo
     7 * Author URI: https://mowomo.com/
    88 * Text Domain: mowomo-redes-sociales
    99 * Domain Path: /languages/
    10  * Version: 2.0.5
     10 * Version: 2.0.6
    1111 * License: GPLv2 or later.
    1212 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1313 * WC requires at least: 4.6
    14  * WC tested up to: 5.9
     14 * WC tested up to: 6.2.0
    1515 */
    1616
     
    3232    return;
    3333} else {
    34     define('MWM_RRSS_VERSION', '2.0.5');
     34    define('MWM_RRSS_VERSION', '2.0.6');
    3535}
    3636if (!defined('MWM_RRSS_SLUG')) {
Note: See TracChangeset for help on using the changeset viewer.