Tax-Meta-Class icon indicating copy to clipboard operation
Tax-Meta-Class copied to clipboard

Change addPosts to wor either as documented or change documentation

Open Seriousness opened this issue 3 years ago • 0 comments

Instead of $my_meta->addPosts('posts_field_id',array('post_type' => 'post'),array('name'=> 'My Posts ')); the necessary argument would be $my_meta->addPosts('catpage',array( 'args' => array('post_type' => 'page')),array('name'=> 'My Pages '));

https://github.com/bainternet/Tax-Meta-Class/blob/a8acfdb6b8fef22d1eefdbe75481e73d2c44d445/Tax-meta-class/Tax-meta-class.php#L1600 To change this I'd suggest:

$temp =  array('posts_per_page' => -1, 'post_type' =>'post') ;
$options = array('type'=>'select', 'args'=> array_merge($temp,$options));

Sorry I was too lazy to go through the whole clone - push - pull request routine

Seriousness avatar May 01 '21 14:05 Seriousness