$var[0] == "de" ? "Mache Leser auf deine App aufmerksam." : "Draw the readers attention on your App.") // Args ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { global $appful_api; $apps = $appful_api->response->decode_json(get_option("appful_widget_apps")); if(!$instance["app_id"] && count($apps) > 0) { $instance["app_id"] = $apps[0]["id"]; } if(!($instance["app_id"] > 0)) return; $branding = $appful_api->response->decode_json(get_option("appful_widget_branding")); if(!$branding) $branding = array("title" => "App by appful", "url" => "https://appful.io"); foreach($apps as $entry) { if($entry["id"] == $instance["app_id"]) { $app = $entry; break; } } if(!$app) return; echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title']; } ?> " rel="stylesheet">
">
" alt="App Icon" />
">

" class="af-credit" target="_blank"> " target="_blank">" alt="App Store Button" width="" height="" /> " target="_blank">" alt="Play Store Button" width="" height="" />

0) { ?>

response->decode_json(get_option("appful_widget_apps")); if(count($apps) == 0) { ?> ">

">

0)) unset($instance["app_id"]); return $instance; } } // class Foo_Widget