This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Plugin Name: AU VIZIO
Plugin URI: http://blog.urosevic.net/wordpress/au-vizio/
Description: Upravljanje reklamama za VIZIOshop.com majice u vidžetu
Author: Aleksandar Urošević
Version: 0.5.0.3
Author URI: http://urosevic.net
*/
$auvs_version = '0.5.0.3';
add_action( 'plugins_loaded', 'init_auvs' );
function init_auvs() {
register_sidebar_widget( 'VIZIOshop', 'auvs_widget' );
register_widget_control( 'VIZIOshop', 'auvs_widget_control' );
add_action( 'admin_menu', 'auvs_menu' );
}
if ( is_admin() ) {
$plugin = plugin_basename(__FILE__);
add_filter("plugin_action_links_$plugin", 'addAUVScfgLink' );
}
function addAUVScfgLink( $links ) {
$settings_link = ''.__('Settings').'';
array_unshift( $links, $settings_link );
return $links;
}
load_plugin_textdomain('auvs', PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/languages', dirname(plugin_basename(__FILE__)).'/languages');
function auvs_menu() {
add_options_page(__('VIZIOshop Options', 'auvs'), __('VIZIOshop', 'auvs'), 8, __FILE__, 'auvs_options');
}
function auvs_options()
{
global $auvs_version;
$hidden_field_name = 'auvs-submit';
// Čitam vrednosti promenljivih iz WP baze
$auvs_opt = get_option( 'auvs_opt' );
$auvs_title = get_option( 'auvs_title' );
$auvs_keyword = get_option( 'auvs_keyword' );
$auvs_postids = get_option( 'auvs_postids' );
$auvs_majice = get_option( 'auvs_majice' );
if ( $auvs_opt['br'] < 1 ) $auvs_opt['br'] = 1;
if ( $auvs_opt['afid'] < 1 ) $auvs_opt['afid'] = 230;
if ( $auvs_opt['dzid'] == '' ) $auvs_opt['dzid'] = 'urkekg';
if ( $auvs_opt['cena'] == '' ) $auvs_opt['cena'] = 859;
// Proveri da li je korisnik poslao neke vrednosti
// Ako jeste, skriveno polje će imati vrednost 'Y'
if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
// Čitaj poslate vrednosti
$auvs_opt = array(
'br' => $_POST[ 'auvs_br' ],
'afid' => $_POST[ 'auvs_afid' ],
'dzid' => $_POST[ 'auvs_dzid' ],
'cena' => $_POST[ 'auvs_cena' ],
'wtitle' => $auvs_opt[ 'wtitle' ],
'show_wtitle' => $auvs_opt[ 'show_wtitle' ]
);
// napravi nizove za sva polja
$auvs_title = serialize( $_POST[ 'auvs_title' ] );
$auvs_keyword = serialize( $_POST[ 'auvs_keyword' ] );
$auvs_postids = serialize( $_POST[ 'auvs_postids' ] );
$auvs_majice = serialize( $_POST[ 'auvs_majice' ] );
// Sacuvaj poslate vrednosti u bazu
if ( $_POST['submit'] == __('Add') ) { $auvs_opt['br'] += 1;}
if ( $_POST['submit'] == __('Remove') ) { $auvs_opt['br'] -= 1;}
update_option( 'auvs_opt', $auvs_opt );
update_option( 'auvs_title', $auvs_title );
update_option( 'auvs_keyword', $auvs_keyword );
update_option( 'auvs_postids', $auvs_postids );
update_option( 'auvs_majice', $auvs_majice );
// Put an options updated message on the screen
?>
.
AU VIZIO
:
:
:
: post or page from post/page permalink.', 'auvs'); ?>
:
2192|Vidimo se na Facebook|2192|Vidimo se na Facebook
rate it on official WordPress Plugin page. If you wish to support further development contact author or make some donation.', 'auvs'), "http://wordpress.org/extend/plugins/au-vizio/", "http://urosevic.net/kontakt/"); ?>