Plugin Directory

Changeset 2157622 for insert-php


Ignore:
Timestamp:
09/17/2019 06:11:13 AM (7 years ago)
Author:
alexkovalevv
Message:

Update plugin Woody ad snippets up to 2.2.9

Location:
insert-php/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • insert-php/trunk/admin/metaboxes/base-options.php

    r2156042 r2157622  
    413413                        $snippet_type = WINP_Helper::get_snippet_type();
    414414
    415                         $new_classes = "wbcr-inp-snippet-type-" . $snippet_type;
     415                        $new_classes = "wbcr-inp-snippet-type-" . esc_attr( $snippet_type );
    416416
    417417                        if ( $snippet_type !== WINP_SNIPPET_TYPE_TEXT ) {
  • insert-php/trunk/includes/class.execute.snippet.php

    r2156042 r2157622  
    290290         * Execute the snippets once the plugins are loaded
    291291         *
    292          * @since 2.2.8 Added compatibility with WPML
    293          *
    294292         * @param string $scope
    295293         * @param string $auto
    … …  
    302300                global $wpdb;
    303301
    304                 # Compatibility with WPML proposed in the support forum:
    305                 # https://wpml.org/forums/topic/header-and-foster-scripts-translation/
    306                 #------------------------------------------------------
    307                 $join  = '';
    308                 $where = '';
    309                 if ( apply_filters( 'wpml_setting', false, 'setup_complete' ) ) {
    310                         $type = 'post_' . WINP_SNIPPETS_POST_TYPE;
    311                         $join = " LEFT JOIN {$wpdb->prefix}icl_translations ON element_id = ID AND element_type = '$type'";
    312 
    313                         $language = apply_filters( 'wpml_current_language', false );
    314                         $where    = " language_code = '$language' AND ";
    315                 }
    316                 #------------------------------------------------------
    317 
    318302                $snippets = $wpdb->get_results( "SELECT {$wpdb->posts}.ID, {$wpdb->posts}.post_content
    319                     FROM {$wpdb->posts} $join
    320                     INNER JOIN {$wpdb->postmeta} ON ( {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id )
    321                     WHERE  $where  ( ( {$wpdb->postmeta}.meta_key = '" . WINP_Plugin::app()->getPrefix() . "snippet_scope'
    322                     AND {$wpdb->postmeta}.meta_value = '{$scope}' ) )
    323                     AND {$wpdb->posts}.post_type = '" . WINP_SNIPPETS_POST_TYPE . "'
    324                     AND ( ({$wpdb->posts}.post_status = 'publish') )" );
     303                                        FROM {$wpdb->posts}
     304                                        INNER JOIN {$wpdb->postmeta} ON ({$wpdb->posts}.ID = {$wpdb->postmeta}.post_id)
     305                                        WHERE (( {$wpdb->postmeta}.meta_key = '" . WINP_Plugin::app()->getPrefix() . "snippet_scope'
     306                                        AND {$wpdb->postmeta}.meta_value = '{$scope}'))
     307                                        AND {$wpdb->posts}.post_type = '" . WINP_SNIPPETS_POST_TYPE . "'
     308                                        AND (({$wpdb->posts}.post_status = 'publish'))" );
     309
    325310
    326311                if ( empty( $snippets ) ) {
  • insert-php/trunk/includes/class.helpers.php

    r2156042 r2157622  
    187187                $_post = $post;
    188188
    189                 $snippet_type = WINP_Plugin::app()->request->get( 'winp_item', WINP_SNIPPET_TYPE_PHP, true );
     189                $snippet_type = WINP_Plugin::app()->request->get( 'winp_item', WINP_SNIPPET_TYPE_PHP, 'sanitize_key' );
    190190                $get_post     = WINP_Plugin::app()->request->get( 'post', '' );
    191191
  • insert-php/trunk/insert_php.php

    r2156042 r2157622  
    55 * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service’s code. Ensures no content duplication.
    66 * Author: Will Bontrager Software, LLC <will@willmaster.com>, Webcraftic <wordpress.webraftic@gmail.com>
    7  * Version: 2.2.8
     7 * Version: 2.2.9
    88 * Text Domain: insert-php
    99 * Domain Path: /languages/
    … …  
    6868
    6969// @formatter:off
     70
     71
     72
    7073/**
    7174 * -----------------------------------------------------------------------------
  • insert-php/trunk/readme.txt

    r2156042 r2157622  
    213213
    214214== Changelog ==
     215= 2.2.9 (16.09.2019) =
     216* Fixed: Due to a problem with WPML, we were forced to cancel the added WPML compatibility in the previous version.
     217* Fixed: Security issue
     218
    215219= 2.2.8 (13.09.2019) =
    216220* Added: Compatibility with WPML proposed in the support [forum](https://wpml.org/forums/topic/header-and-foster-scripts-translation/)
Note: See TracChangeset for help on using the changeset viewer.