url encode/decode @72a098575b06f561b22bdc79abc491e16c226f2d
This commit is contained in:
parent
e25e7b46b1
commit
79aa1eb411
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
function woocommerce_reports() {
|
function woocommerce_reports() {
|
||||||
|
|
||||||
$current_tab = (isset($_GET['tab'])) ? $_GET['tab'] : 'sales';
|
$current_tab = ( isset( $_GET['tab'] ) ) ? urldecode( $_GET['tab'] ) : 'sales';
|
||||||
$current_chart = (isset($_GET['chart'])) ? $_GET['chart'] : 0;
|
$current_chart = ( isset( $_GET['chart'] ) ) ? urldecode( $_GET['chart'] ) : 0;
|
||||||
|
|
||||||
$charts = apply_filters('woocommerce_reports_charts', array(
|
$charts = apply_filters('woocommerce_reports_charts', array(
|
||||||
'sales' => array(
|
'sales' => array(
|
||||||
|
@ -68,7 +68,7 @@ function woocommerce_reports() {
|
||||||
<div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
<div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
||||||
<?php
|
<?php
|
||||||
foreach ($charts as $name => $value) :
|
foreach ($charts as $name => $value) :
|
||||||
echo '<a href="'.admin_url('admin.php?page=woocommerce_reports&tab='.$name).'" class="nav-tab ';
|
echo '<a href="'.admin_url( 'admin.php?page=woocommerce_reports&tab=' . urlencode($name) ).'" class="nav-tab ';
|
||||||
if( $current_tab == $name ) echo 'nav-tab-active';
|
if( $current_tab == $name ) echo 'nav-tab-active';
|
||||||
echo '">'.ucfirst($name).'</a>';
|
echo '">'.ucfirst($name).'</a>';
|
||||||
endforeach;
|
endforeach;
|
||||||
|
@ -79,7 +79,7 @@ function woocommerce_reports() {
|
||||||
<?php if (sizeof($charts[$current_tab])>1) : ?><ul class="subsubsub"><li><?php
|
<?php if (sizeof($charts[$current_tab])>1) : ?><ul class="subsubsub"><li><?php
|
||||||
$links = array();
|
$links = array();
|
||||||
foreach ($charts[$current_tab] as $key => $chart) :
|
foreach ($charts[$current_tab] as $key => $chart) :
|
||||||
$link = '<a href="admin.php?page=woocommerce_reports&tab='.$current_tab.'&chart='.$key.'" class="';
|
$link = '<a href="admin.php?page=woocommerce_reports&tab=' . urlencode($current_tab) . '&chart=' . urlencode($key) . '" class="';
|
||||||
if ($key==$current_chart) $link .= 'current';
|
if ($key==$current_chart) $link .= 'current';
|
||||||
$link .= '">'.$chart['title'].'</a>';
|
$link .= '">'.$chart['title'].'</a>';
|
||||||
$links[] = $link;
|
$links[] = $link;
|
||||||
|
|
Loading…
Reference in New Issue