Changeset 2157622 for insert-php
- Timestamp:
- 09/17/2019 06:11:13 AM (7 years ago)
- Location:
- insert-php/trunk
- Files:
-
- 5 edited
-
admin/metaboxes/base-options.php (modified) (1 diff)
-
includes/class.execute.snippet.php (modified) (2 diffs)
-
includes/class.helpers.php (modified) (1 diff)
-
insert_php.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
insert-php/trunk/admin/metaboxes/base-options.php
r2156042 r2157622 413 413 $snippet_type = WINP_Helper::get_snippet_type(); 414 414 415 $new_classes = "wbcr-inp-snippet-type-" . $snippet_type;415 $new_classes = "wbcr-inp-snippet-type-" . esc_attr( $snippet_type ); 416 416 417 417 if ( $snippet_type !== WINP_SNIPPET_TYPE_TEXT ) { -
insert-php/trunk/includes/class.execute.snippet.php
r2156042 r2157622 290 290 * Execute the snippets once the plugins are loaded 291 291 * 292 * @since 2.2.8 Added compatibility with WPML293 *294 292 * @param string $scope 295 293 * @param string $auto … … 302 300 global $wpdb; 303 301 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 318 302 $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 325 310 326 311 if ( empty( $snippets ) ) { -
insert-php/trunk/includes/class.helpers.php
r2156042 r2157622 187 187 $_post = $post; 188 188 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' ); 190 190 $get_post = WINP_Plugin::app()->request->get( 'post', '' ); 191 191 -
insert-php/trunk/insert_php.php
r2156042 r2157622 5 5 * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service’s code. Ensures no content duplication. 6 6 * Author: Will Bontrager Software, LLC <will@willmaster.com>, Webcraftic <wordpress.webraftic@gmail.com> 7 * Version: 2.2. 87 * Version: 2.2.9 8 8 * Text Domain: insert-php 9 9 * Domain Path: /languages/ … … 68 68 69 69 // @formatter:off 70 71 72 70 73 /** 71 74 * ----------------------------------------------------------------------------- -
insert-php/trunk/readme.txt
r2156042 r2157622 213 213 214 214 == 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 215 219 = 2.2.8 (13.09.2019) = 216 220 * 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)