Support » Plugin: WordPress Mobile Pack - Mobile Plugin for Progressive Web Apps & Hybrid Mobile Apps » [Plugin: WordPress Mobile Pack] How to recognize mobile state in the_content filter

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello pedjas, could you please post the link to your blog here? I can help you from there.

    Cheers.

    Thread Starter pedjas

    (@pedjas)

    Hello @pedjas, I am not quite sure I follow what you are looking for. Are you looking for a plugin so that you can view the given url on your handheld device?

    Cheers.

    Thread Starter pedjas

    (@pedjas)

    I use WordPress Mobile Pack, and I am trying to make other plugin that I wrote to insert additional contents on bottom of each post, to skip inserting when mobile version is displayed.

    Ok, so you are looking for another plugin to install so that you can avail the features you just mentioned, I hope I have got you right this time.

    Thread Starter pedjas

    (@pedjas)

    No, I already have all plugins I want. All I need is it to set my plugin to skip inserting contents when site is displayed in mobile mode.

    Alright, I understand. I am sorry, I cannot help you with this. I thought you were looking for another plugin. I hope you find a solution soon. Good luck.

    Cheers.

    add_action('init', 'gdd_update_content_for_mobile');
    function gdd_update_content_for_mobile()
    {
    	// WordPress Mobile Pack plugin is required to do this check.
    	if ( ! function_exists('wpmp_switcher_outcome'))
    		return;
    
    	// Are we using a mobile theme?
    	if (wpmp_switcher_outcome() === WPMP_SWITCHER_MOBILE_PAGE)
    	{
    		add_filter('the_content', '___');
    	}
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress Mobile Pack] How to recognize mobile state in the_content filter’ is closed to new replies.