Viewing 1 replies (of 1 total)
  • Here is a way you could get them:

    function get_all_ccaps_protecting_posts()
    {
    	global $wpdb;
    	$ccaps = array();
    	$results = $wpdb->get_results("SELECT <code>meta_value</code> FROM <code>&quot;.$wpdb->postmeta.&quot;</code> WHERE <code>meta_key</code> = 's2member_ccaps_req'");
    	if($results)
    	{
    		foreach($results as $_result)
    			if(is_array($_result_ccaps = maybe_unserialize($_result->meta_value)) && $_result_ccaps)
    				$ccaps = array_merge($ccaps, $_result_ccaps);
    		unset($_result, $_result_ccaps);
    	}
    	return array_unique($ccaps);
    }

    I hope that helps. 🙂

Viewing 1 replies (of 1 total)

The topic ‘List of Custom Capabilities’ is closed to new replies.