Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eMember – not protecting Meta Box data for Custom Post Type

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember – not protecting Meta Box data for Custom Post Type

Tagged: custom meta box, custom post type

  • This topic has 9 replies, 3 voices, and was last updated 12 years, 6 months ago by nur.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • October 2, 2012 at 2:22 am #7531
    atticus51
    Member

    Hi guys, I am developing a site which uses custom post types, each with a number of meta boxes for product data. A sample can be seen at [http://110.232.141.30/~advantag/wordpress/carpets/revamp/cruzin/]

    The following sections are generated from custom meta boxes:

    – Available Colours

    – Specifications

    – Warranty and Installation

    The post has been set to Protected with only certain membership levels able to access it.

    The description underneath the page title (before the HR line) is protected as expected. Can you explain why the meta box data is viewable to the public?

    Thanks in advance for your assistance,

    Adam

    October 2, 2012 at 4:06 am #49925
    nur
    Member

    Hi,

    i am assuming you are using another plugin to generate metabox contents.

    Wordpress has a filter called “the_content” and expected behavior is that all post/page contents pass through it.

    eMember only takes care of contents that go through “the_content” filter.

    If the other plugin you are using, doesn’t invoke “the_content”, eMember cannot protect it.

    Thanks,

    October 2, 2012 at 6:24 am #49926
    atticus51
    Member

    Thanks for your reply,

    No plugins – the meta boxes were created using the native add_meta_box function.

    Is there a way to make eMember look after this? Custom meta boxes (basically specified custom fields) are a big advantage with WordPress; would be a shame if eMember doesn’t protect these by default.

    Thanks,

    Adam

    October 3, 2012 at 2:50 am #49927
    nur
    Member

    Lets try and change the filtering priority to see how that goes. Can you open the wp_eMember1.php file and go to line number 288 which looks like :

    Code:
    add_filter(‘the_content’,’secure_content’, 11);

    replace it with:

    Code:
    add_filter(‘the_content’,’secure_content’, 1000);

    let me know the result.

    October 3, 2012 at 12:28 pm #49928
    atticus51
    Member

    No change, sorry.

    I am working with add_filter to see if I can hook the meta box data into the_content, but it might take a big rewrite. Will see how I go.

    If any other ideas come to mind, please do share!

    Thanks,

    Adam

    October 3, 2012 at 7:50 pm #49929
    nur
    Member

    when you are outputting metabox content, Can you do someting like this:

    Code:
    apply_filters(‘the_content’, get_post_meta($post->ID, ‘meta_box_name’, true));

    replace ‘meta_box_name’ as u need. let me know the result.

    October 4, 2012 at 9:33 am #49930
    atticus51
    Member
    October 5, 2012 at 11:31 pm #49931
    atticus51
    Member

    Still no success, but the problem was how the filter was appending the meta boxes to the_content. Even though I used concatenation, the meta box data was overwriting the_content.

    I have given up on this and sought another way to satisfy the project requirements. Thanks for your help. Perhaps a future upgrade can address this problem?

    November 4, 2012 at 10:36 pm #49932
    vithefiddler
    Spectator

    I’m having this same issue, except I’m using the genesis theme framework, and using the genesis hook genesis_post_content.

    I tried to add a filter for genesis_post_content after the the_content line. (currently line 300 in the wp_Emember1.php file.

    Looking in your file, it looks like that secure content runs on a post is auth_check post. I’m thinking that I might be able manually return auth_check_post on my content function.

    Will this take care of it, or is there more that needs to be done to secure the content?

    Thanks!

    November 4, 2012 at 11:19 pm #49933
    nur
    Member

    if i understood your problem right then manually returning auth_check_post should work. let me know how you go.

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ