Skip to content

Commit

Permalink
little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xxsimoxx committed Jan 27, 2020
1 parent 5e5d474 commit 72e4c59
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You have to open and close php tags in your string.
```php
function vars_output_exec_php( $string ) {
ob_start();
eval( "?>" . $string ."<?php" );
eval( "?>" . $string ." " );
$evalContent = ob_get_contents();
ob_end_clean();
return $evalContent;
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== vars ===
Plugin Name: vars
Description: Vars in shortcodes
Version: 2.0.0
Version: 2.0.1
Text Domain: vars
Domain Path: /languages
Requires PHP: 5.6
Expand All @@ -10,7 +10,7 @@ Tested: 4.9.99
Author: Gieffe edizioni
Author URI: https://www.gieffeedizioni.it
Plugin URI: https://software.gieffeedizioni.it
Download link: https://github.com/xxsimoxx/vars/releases/download/v2.0.0/vars.zip
Download link: https://github.com/xxsimoxx/vars/releases/download/v2.0.1/vars.zip
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -38,6 +38,9 @@ You can choose which users can manage vars.
3. TinyMCE button

== Changelog ==
= 2.0.1 =
* Removed debug code

= 2.0.0 =
* Removed deprecated functions
* Updated Update Manager client
Expand Down
6 changes: 3 additions & 3 deletions vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: vars
* Plugin URI: https://software.gieffeedizioni.it
* Description: Vars in shortcodes
* Version: 2.0.0
* Version: 2.0.1
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Author: Gieffe edizioni srl
Expand Down Expand Up @@ -147,7 +147,7 @@ function vars_create_menu() {
}

function vars_settings_page() {
if ( ! current_user_can( get_option( 'vars-whocanedit' ) ) || false ) {
if ( ! current_user_can( get_option( 'vars-whocanedit' ) ) ) {
exit;
}
if ( isset( $_POST["allvars"] ) || isset( $_POST["doeverywhere"] ) || isset( $_POST["cleanup"] ) || isset( $_POST["whocanedit"] )){
Expand Down Expand Up @@ -262,7 +262,7 @@ function cpv( $atts, $content = null ) {
parse_str( $coded_options, $testvars );
if ( isset( $testvars[$content] ) ){
$prefilter_retval = $testvars[$content];
$filtered_retval = apply_filters( 'vars_output', apply_filters( 'cpvars_output', $prefilter_retval ) );
$filtered_retval = apply_filters( 'vars_output', $prefilter_retval );
return $filtered_retval;
} elseif ( current_user_can( get_option( 'vars-whocanedit' ) ) ) {
$url = admin_url( 'tools.php?page=vars-options' );
Expand Down

0 comments on commit 72e4c59

Please sign in to comment.