function minileven_theme_root_uri($theme_root_uri) { if (jetpack_check_mobile()) { return plugins_url('modules/minileven/theme', dirname(__FILE__)); } return $theme_root_uri; }
function akst_share_link($action = 'print', $id_ext = '') { global $akst_action, $post; if (in_array($akst_action, array('page'))) { return ''; } if (is_feed() || function_exists('jetpack_check_mobile') && jetpack_check_mobile()) { $onclick = ''; } else { $onclick = 'onclick="akst_share(\'' . $post->ID . '\', \'' . urlencode(get_permalink($post->ID)) . '\', \'' . urlencode(get_the_title()) . '\', \'' . $post->ID . $id_ext . '\', \'' . get_option('st_pubid') . '\'); return false;"'; } global $post; ob_start(); ?> <a href="<?php bloginfo('siteurl'); ?> /?p=<?php print $post->ID; ?> &akst_action=share-this" <?php print $onclick; ?> title="<?php _e('Email, post to del.icio.us, etc.', 'share-this'); ?> " id="akst_link_<?php print $post->ID . $id_ext; ?> " class="akst_share_link" rel="noindex nofollow"><?php _e(akst_linktext(), 'share-this'); ?> </a> <?php $link = ob_get_contents(); ob_end_clean(); switch ($action) { case 'print': print $link; break; case 'return': return $link; break; } }
function jetpack_mobile_theme_setup() { if (jetpack_check_mobile()) { // Redirect to download page if user clicked mobile app promo link in mobile footer if (isset($_GET['app-download'])) { do_action('mobile_app_promo_download', $_GET['app-download']); switch ($_GET['app-download']) { case 'android': header('Location: market://search?q=pname:org.wordpress.android'); exit; break; case 'ios': header('Location: http://itunes.apple.com/us/app/wordpress/id335703880?mt=8'); exit; break; case 'blackberry': header('Location: http://blackberry.wordpress.org/download/'); exit; break; } } add_action('stylesheet', 'jetpack_mobile_stylesheet'); add_action('template', 'jetpack_mobile_template'); add_action('option_template', 'jetpack_mobile_template'); add_action('option_stylesheet', 'jetpack_mobile_stylesheet'); if (class_exists('Jetpack_Custom_CSS') && method_exists('Jetpack_Custom_CSS', 'disable') && !get_option('wp_mobile_custom_css')) { add_action('init', array('Jetpack_Custom_CSS', 'disable'), 11); } do_action('mobile_setup'); } }
function jetpack_mobile_theme_setup() { if (jetpack_check_mobile()) { // Redirect to download page if user clicked mobile app promo link in mobile footer if (isset($_GET['app-download'])) { do_action('mobile_app_promo_download', $_GET['app-download']); switch ($_GET['app-download']) { case 'android': header('Location: market://search?q=pname:org.wordpress.android'); exit; break; case 'ios': header('Location: http://itunes.apple.com/us/app/wordpress/id335703880?mt=8'); exit; break; case 'blackberry': header('Location: http://blackberry.wordpress.org/download/'); exit; break; case 'nokia': header('Location: http://nokia.wordpress.org/download/'); exit; break; case 'windowsphone': header('Location: http://social.zune.net/redirect?type=phoneApp&id=5f64ad85-f801-e011-9264-00237de2db9e'); exit; break; } } add_action('stylesheet', 'jetpack_mobile_stylesheet'); add_action('template', 'jetpack_mobile_template'); add_action('option_template', 'jetpack_mobile_template'); add_action('option_stylesheet', 'jetpack_mobile_stylesheet'); if (function_exists('disable_safecss_style') && !get_option('wp_mobile_custom_css')) { add_action('init', 'disable_safecss_style', 11); } do_action('mobile_setup'); } }
<?php if (!defined('VIP_CUSTOM_MOBILE_TEMPLATE')) { define('VIP_CUSTOM_MOBILE_TEMPLATE', ''); } if (!defined('VIP_CUSTOM_MOBILE_STYLESHEET')) { define('VIP_CUSTOM_MOBILE_STYLESHEET', ''); } add_action('jetpack_modules_loaded', function () { if ('' == VIP_CUSTOM_MOBILE_TEMPLATE || '' == VIP_CUSTOM_MOBILE_STYLESHEET) { return; } if (!jetpack_check_mobile()) { return; } do_action('mobile_setup'); // Remove Minileven's path overrides remove_filter('theme_root', 'minileven_theme_root'); remove_filter('theme_root_uri', 'minileven_theme_root_uri'); add_filter('jetpack_mobile_stylesheet', function ($stylesheet, $theme) { return VIP_CUSTOM_MOBILE_STYLESHEET; }, 99, 2); add_filter('jetpack_mobile_template', function ($template, $theme) { return VIP_CUSTOM_MOBILE_TEMPLATE; }, 99, 2); }); add_action('mobile_setup', 'vip_maybe_include_functions_mobile_file'); function vip_maybe_include_functions_mobile_file() { // Find the file in the current VIP theme $stylesheet = get_stylesheet();