'', 'qrcode' => 'true', 'users' => '0', 'name' => ''), $atts)); $qrcode_text = ''; if ($qrcode == 'false'){ $qrcode_text = ''; }else{ $qrcode_text = 'data-qrcode="true"'; } $users_text = ''; if (intval($users) > 0){ $users_text = 'data-users="' . $users . '"'; } if ($name == ''){ $name = 'Android App ' . $pname . ' on AppAware'; }else{ $name .= ' on AppAware'; } if ($pname != ''){ return '
' . $name . '
'; }else{ return ""; } } static function appaware_options_box() { add_meta_box('appaware_options', 'AppAware Android App Widget', array(__CLASS__, 'appaware_options_display'), 'post', 'side', 'high'); } static function appaware_options_display() { $example = "[appaware-app pname='com.whatsapp' name='WhatsApp' qrcode='true' users='8']"; echo '

  1. Choose which app to display by changing the pname parameter (e.g. com.whatsapp)
  2. Adjust the name for the app you chose (e.g. WhatsApp, good for SEO)
  3. Choose whether to display the QRCode for this app (qrcode = true | false)
  4. Choose the number of users to show (e.g. users=8, omit for none)

More widgets: '; } static function register_script() { wp_register_script('aa-js','http://appaware.com/widgets/aa.js', null, null, false); } static function print_script() { if ( ! self::$add_script ) return; wp_print_scripts('aa-js'); } } AppAwareAppShortcode::init(); ?>