Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-05T00:33:25-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=10399 2011-07-05T00:33:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10399&p=22373#p22373 <![CDATA[Re: Code To Remove For Post Restriction Box]]>
Code:
<?php

add_action 
("plugins_loaded", "my_function");
function my_function ()
{
    if (!is_admin())
        remove_action ("add_meta_boxes", "c_ws_plugin__s2member_meta_boxes::add_meta_boxes");
}

?>

Statistics: Posted by Cristián Lávaque — July 5th, 2011, 12:33 am


]]>
2011-07-04T21:23:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10399&p=22356#p22356 <![CDATA[Re: Code To Remove For Post Restriction Box]]>
viewtopic.php?f=4&t=2313&p=6855&hilit=remove+meta+box#p6855

its exactly what I am trying to do. I created and mu-plugins folder, created a s2-hacks.php file, and inserted the code


Code:
    <?php
    add_action ("plugins_loaded", "my_function");
    function my_function ()
        {
            if (current_user_can ("access_s2member_level2"))
                {
                    remove_action ("add_meta_boxes", "c_ws_plugin__s2member_meta_boxes::add_meta_boxes");
                }
        }
    ?>



hit update and the meta box is still there. Any ideas of what I might be doing wrong?

Statistics: Posted by Vinnyo — July 4th, 2011, 9:23 pm


]]>
2011-07-04T20:48:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10399&p=22354#p22354 <![CDATA[Code To Remove For Post Restriction Box]]>
Looking for the code I need to remove to get rid of the post restriction box that is located in the ADD NEW post area. The box is located on the right side at the top of the column

Post Level Restriction?
Add Level Restriction?
* see: General Options -> Post Level Access

Require Custom Capabilities?
Custom Capabilities?
* see: API Scripting -> Custom Capabilities

Sorry I am too lazy to take a picture of it but the above info is in the box with the fields left empty of adjusting.

Hope that makes sense. I just want to remove this box so my users don't see it.

All the best
Vince

Statistics: Posted by Vinnyo — July 4th, 2011, 8:48 pm


]]>