Plugin Directory

Changeset 2957260


Ignore:
Timestamp:
08/23/2023 11:02:07 AM (3 years ago)
Author:
outshifter
Message:

small fix in custom shortcodes

Location:
outshifter-embed-commerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • outshifter-embed-commerce/trunk/README.md

    r2950363 r2957260  
    55Requires at least: 5.0
    66Tested up to: 6.2
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88Requires PHP: 7.0
    99License: GPL-2.0+
  • outshifter-embed-commerce/trunk/admin/partials/custom-shortcodes.php

    r2909461 r2957260  
    7373add_action('save_post', 'save_detail');
    7474
    75 function save_detail(){
    76     global $post;
     75function save_detail( $post_id ){
    7776    if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {
    78         return $post->ID;
     77        return $post_id;
    7978    }
    80     update_post_meta($post->ID, "product", sanitize_text_field($_POST["product"]));
     79    if ( ! current_user_can('edit_post', $post_id) ) {
     80        return $post_id;
     81    }
     82    if ( empty( $_POST["product"] ) ) {
     83        return $post_id;
     84    }
     85    update_post_meta($post_id, "product", sanitize_text_field($_POST["product"]));
     86   
     87    return $post_id;
    8188}
    8289
  • outshifter-embed-commerce/trunk/outshifter-blocks.php

    r2950363 r2957260  
    1616 * Plugin Name:       Reachu Embed Commerce
    1717 * Description:       Sell any product directly on your existing surface
    18  * Version:           1.1.1
     18 * Version:           1.1.2
    1919 * Author:            Reachu team
    2020 * Author URI:        www.reachu.io
     
    3131require_once "vars.php";
    3232
    33 define( 'OUTSHIFTER_WORDPRESS_VERSION', '1.1.1' );
     33define( 'OUTSHIFTER_WORDPRESS_VERSION', '1.1.2' );
    3434define( 'OUTSHIFTER_PLUGIN_FOLDER', plugin_dir_url(dirname(__FILE__)) );
    3535define( 'OUTSHIFTER_NAME_FOLDER', 'outshifter-embed-commerce');
Note: See TracChangeset for help on using the changeset viewer.