Title: [Plugin: CMS Press] Support Array Parameters
Last modified: August 19, 2016

---

# [Plugin: CMS Press] Support Array Parameters

 *  [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/)
 * Hello prettyboymp, I’m using CMSPress plugin, with a few additions to the supports
   array currently, and just wanted to say thanks for all the hard work you’ve done
   on the Custom Post Types, here and in core. I noticed you’re from WH. Wow. Me
   too. I live in San Diego now, but, well, I just find that interesesting 😉
 * I just downloaded the latest version and am checking through the code and noticed
   that you are still using the term post-thumbnails in the support array. I changed
   that previously to thumbnails, as I thought that was the final verdict in core,
   but, is there a reason you’re still using post-thumbnails, will that work?
 * And lastly, is there a reason that you have left the author term out of the support
   array parameters? It’d be great to have that in there too 😉
 * thanks again!!
 * [http://wordpress.org/extend/plugins/cms-press/](http://wordpress.org/extend/plugins/cms-press/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/page/2/?output_format=md)

 *  [prettyboymp](https://wordpress.org/support/users/prettyboymp/)
 * (@prettyboymp)
 * [16 years ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493242)
 * Those are both bugs. I haven’t had as much time to keep up with the changes going
   on with custom post types that last few weeks. I’ll get a new release out soon.
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493266)
 * Hi there. Me again. Well, with your last couple updates I was able to get rid
   of all of my hacks in your plugin, but, darnit, I have finally moved into using
   some page type custom post types and now I’m in a pickle again. There is no option
   to select hierarchical for page type custom post types and no page-attribute 
   in the support array. I’m wondering if you might have a chance to add those in
   when you get a chance pretty please? For now, I’ll just hack in there again to
   add them and wait … patiently … ahem … did you add it yet? heh. Seriously, I’m
   only kidding.
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493268)
 * Wanted to give you a head’s up as well that when I deleted a custom post type
   from the cms press admin, it deleted from the cms press page, but, remained in
   the database. I could swear there was talk about some sort of unregister_post_type,
   but, I either forgot what it was or can’t find it. Do you know the proper way
   to remove these from the database?
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493269)
 * Okay, never mind that last comment. It was due to a revision hanging on that 
   had the post type assigned. My apologies.
    I have run across a different problem
   though, and wanted to ask if you could possibly shed some light on it.
 * I am implementing some code which runs some javascript on a custom post type 
   to create a mouseover event. If I register the custom post type within the code
   for the mouseover, it works fine. If I register the custom post type from my 
   functions.php file, it works fine.
 * However, if I register it with CMS Press, it doesn’t not work at all.
    It’s a
   pretty serious bug for me, as I’m sure it would be for anyone trying to use this
   type of functionality, and it took two days to track down that it was something
   that was happening in the registration of the post type via CMS Press.
 * I can only imagine the troubleshooting nightmares some folks might come across
   if this isn’t figured out, so, I have left the different options active on my
   site right now in case you want to take a look and troubleshoot the bug easily
   while everything is there.
 * Please email me if you would be interested in doing this as I’m in development
   right now and can give you a login, but, I need to have the site completed in
   a matter of days, so, the opportunity won’t be available but for a day or so.
   In which case, I will just have to give up the consistency of the site and register
   this particular custom post type outside of CMS press.
 * I really don’t want to do that, so, hoping to hear from you 😉
 *  [prettyboymp](https://wordpress.org/support/users/prettyboymp/)
 * (@prettyboymp)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493270)
 * I’ll try to set aside some time to get the hierarchical post type features added
   this week. I’ve been holding off just because I haven’t tested it much and have
   yet to run across a need myself for a hierarchical post type.
 * As for the registration not working, its probably a timing issue. CMS-Press registers
   the post_types on the ‘init’ action. So if you’re trying to link to the post_type
   before then, it isn’t going to work.
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493271)
 * Well, turns out for now, I’m going to go ahead and use a post type post as well,
   so, my urgency dissipated, but, it still would be great to have it be fully compatible
   with what we can do on our own, instead of being limited in our options if we
   want to use the CMS Press interface.
 * I know there are a few things you’ve got hanging around back there that were 
   waiting for 3.0 completion in order to see if they were merged or not as well.
   I’m sure your eager to get all that settled finally too 😉 … I know I am.
 * I’ve had to do some hacky stuff with rewrites in another function file to interact
   with the rewrites in your code in order to get an archive page of custom type
   posts, and I can’t wait to clear out that mess and have it all handled neatly
   from one place.
 * On the bug I’ve come across, it’s not a registration problem. I can register 
   fine, and the registration that I’m speaking of is there on my site still at 
   the moment. Will be removing it tomorrow. This is the registration that I’ve 
   had to make manually in my functions file to replace ( tomorrow ) the one that
   I registered in CMS Press.
 *     ```
       // Register glossary terms custom post type
       	function create_post_types(){
       	$labels = array(
                   'name' => _x('Glossary Terms', 'post type general name'),
                   'singular_name' => _x('Glossary Term', 'post type singular name'),
                   'add_new' => _x('Add New', 'glossary term'),
                   'add_new_item' => __('Add New Glossary Term'),
                   'edit_item' => __('Edit Glossary Term'),
                   'new_item' => __('New Glossary Term'),
                   'view_item' => __('View Glossary Term'),
                   'search_items' => __('Search Glossary Terms'),
                   'not_found' =>  __('No glossary terms found'),
                   'not_found_in_trash' => __('No glossary terms found in Trash'),
                   'parent_item_colon' => ''
         );
   
       		$args = array(
       			'labels' => $labels,
       			'description' => 'Indexed definitions for commonly used glossary terms within the site',
       			'public' => true,
       			'publicly_queryable' => true,
       			'show_ui' => true,
       			'query_var' => true,
       			'rewrite' => array('slug' => 'glossary-term'),
       			'capability_type' => 'post',
       			'hierarchical' => false,
       			'menu_position' => null,
       			'supports' => array('title','editor','author','thumbnail','excerpt'));
       		register_post_type('glossary_term',$args);
       		flush_rewrite_rules();
       	}
       	add_action( 'init', 'create_post_types');
   
       ?>
       ```
   
 * As you can see, I’m registering on the init as well.
 * The problem arises when this code:
 *     ```
       function red_glossary_parse($content){
   
       	//Run the glossary parser
       	if (((!is_page() && get_option('red_glossaryOnlySingle') == 0) OR
       	(!is_page() && get_option('red_glossaryOnlySingle') == 1 && is_single()) OR
       	(is_page() && get_option('red_glossaryOnPages') == 1))){
       		$glossary_index = get_children(array(
       											'post_type'	=> 'glossary_term',
       											'post_status'	=> 'publish',
       											));
       		if ($glossary_index){
       			$timestamp = time();
       			foreach($glossary_index as $glossary_item){
       				$timestamp++;
       				$glossary_title = $glossary_item->post_title;
       				$glossary_search = '/\b'.$glossary_title.'[A-Za-z]*?\b(?=([^"]*"[^"]*")*[^"]*$)/i';
       				$glossary_replace = '<a'.$timestamp.'>$0</a'.$timestamp.'>';
       				$content_temp = preg_replace($glossary_search, $glossary_replace, $content);
       				$content_temp = rtrim($content_temp);
   
       					$link_search = '/<a'.$timestamp.'>('.$glossary_item->post_title.'[A-Za-z]*?)<\/a'.$timestamp.'>/i';
       					if (get_option('red_glossaryTooltip') == 1) {
       						$link_replace = '<a class="glossaryLink" href="' . get_permalink($glossary_item) . '" title="Glossary Term: '. $glossary_title . '" onmouseover="tooltip.show(\'' . addslashes($glossary_item->post_content) . '\');" onmouseout="tooltip.hide();">$1</a>';
       					}
       					else {
       						$link_replace = '<a class="glossaryLink" href="' . get_permalink($glossary_item) . '" title="Glossary Term: '. $glossary_title . '">$1</a>';
       					}
       					$content_temp = preg_replace($link_search, $link_replace, $content_temp);
       					$content = $content_temp;
       			}
       		}
       	}
       	return $content;
       }
   
       //Make sure parser runs before the post or page content is outputted
       add_filter('the_content', 'red_glossary_parse');
       ```
   
 * attempts to add the javascript to the links that it creates with the custom post
   type terms found.
 * It finds the glossary_term terms, and it assigns the css, and html
    to them, 
   but, it will not run the javascript on them. It’s really baffling to me why this
   is happening, but, alas, it is, and the only constant is CMS PRess.
 * If I register the post type in my functions file manually, the javascript works.
   If I register the post type within the plugin that the code above is taken from,
   it works. If I register it in CMS Press, the javascript hover function does not
   work.
 * I’m really stumped on this as it makes no sense to me whatsoever. I thought you
   might have some insight?
 * Like I said, if I have to, I’ll keep it manually coded, but, it just bums me 
   out because I wanted to have a clean interface. I did have all of post types 
   manually coded and was updating them daily as new things were coded in core, 
   but, at a certain point and when it looked like CMS Press was going to be THE
   one that would handle all of this the best … and because you were doing so much
   of the coding in core anyway … I removed everything that I had done and redid
   it all through CMS Press. Long story, but, I’m sure you know what I’m talking
   about 😉
 * Who knows, maybe you’ll take one look at this and immediately know what’s wrong…
   I can dream no?
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493273)
 * I’m getting too close to deadline, so, I have to go ahead and remove the test
   case scenarios, I’m sorry, and go forward with the manual registration of this
   custom post type. Please do still reply as soon as you get a chance though, as
   it would be really super helpful to try to get this sorted out sooner than later
   okay? pretty pretty please?
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493274)
 * Well, wouldn’t you know. Apparently there was still one stone left unturned and
   by chance I discovered that the issue in question above had to do with some cryptic,
   completely illogical combination of post registration, code activation etc… Voodoo
   or black magic or whatever. Bottom line is I’m not crazy and there is nothing
   weird happening with CMS Press. Whew. And I was able to get rid of my one random
   manually coded post type and get it with the rest of the pack in CMS PRess, and
   the javascript is working *for now – fingers crossed* and the world is a beautiful
   place again. 😉
 * Sorry for all the false alarm panic and babble above~
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493276)
 * Hi. I’m back again. This time to request support for link object types in the
   registration support for the taxonomies 😉 purdy please?
 *  [prettyboymp](https://wordpress.org/support/users/prettyboymp/)
 * (@prettyboymp)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493277)
 * I’m not sure I follow.
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493280)
 * My apologies. I should have been more clear.
 * When I create a custom taxonomy, I have the option to register that taxonomy 
   for the following content types:
 * post, page, attachment and/or link default content types,
    as well as for custom
   content/post types
 * Currently in the admin area of CMS Press for editing or adding taxonomies, you
   have the ability for me to select everything listed above for the content type
   that I would like to register my taxonomy for, _except_ link.
 * I really need to be able to apply my custom taxonomies to links as well.
 * It would be super appreciated ~
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493281)
 * Hey Michael, I’m hoping I explained that sufficiently enough. Please let me know
   if I didn’t, because I’m getting a little panicky right now.
 * Just in case:
 *     ```
       register_taxonomy(
       		'$name', // internal name = machine-readable taxonomy name
       		'$object',		// object type = post, page, link, or custom post-type
       ```
   
 * I’m referring to being able to use object types of post, page, link, or custom
   post-type.
    With CMS Press right now, link is not an option.
 * I’m at the tail end of a six month long project and the last thing I have to 
   do for completion is to assign the links on the site to the same taxonomies that
   my custom post types are assigned to … and EEgads there is no link object type
   checkbox in the form.
 * I’ve spent all day trying to work it out and haven’t been successful. In your
   old code I was able to add it in myself … when the supports array wasn’t up to
   date or what have you, but, you’ve coded the creation of the checkboxes on the
   form now to happen dynamically via a conditional, and no matter what I try, I
   can’t get that link checkbox to show up there.
 * I am able to hand code a taxonomy in functions.php to be registered for the “
   link” object type with no problem, so, I thought I might be able to just add 
   support for the link object type to my existing taxonomies created with CMS Press,
   but, that’s not happening either.
 * So, I’m kind of begging at this point because if I can’t work this out by tomorrow,
   I’m going to have to ditch all the work I’ve done with CMS Press and hand code
   it all … again. Help?
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493282)
 * Hi Michael, I understand if you’re too busy, or perhaps don’t care to add this
   functionality to the plugin, but, please if you get a chance, can you perhaps
   at least take a look at maybe altering the plugin code to allow me to still register
   this on my own in my function file? As is, I can’t do this …
 * `register_taxonomy_for_object_type('art', 'link');`
 * … while my art taxonomy is registered via CMS Press.
 * I will have to re-register all of my custom taxonomies and post types outside
   of CMS Press and re-enter thousands of terms if I can’t get at least this option.
 * Any response would really help at this point~
 *  Thread Starter [10sexyapples](https://wordpress.org/support/users/10sexyapples/)
 * (@10sexyapples)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493283)
 * Okay, I’m just going to go ahead and remove the code and roll my own again. Thanks
   anyway.
 *  [prettyboymp](https://wordpress.org/support/users/prettyboymp/)
 * (@prettyboymp)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/#post-1493284)
 * You can still register your own taxonomies via code. You just have to make sure
   you’re running it late enough. Instead of directly calling register_taxonomy_for_object_type(‘
   art’, ‘link’); in your functions file, include it within a function that runs
   on init. All of the cms-press post types and taxonomies are created on ‘init’
   with priority 1. So registering anytime after that should work.
 * `
    function register_my_taxonomies() { register_taxonomy_for_object_type(‘art’,‘
   link’); } add_action(‘init’, ‘register_my_taxonomies’);

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/page/2/?output_format=md)

The topic ‘[Plugin: CMS Press] Support Array Parameters’ is closed to new replies.

 * 18 replies
 * 3 participants
 * Last reply from: [FERIM1](https://wordpress.org/support/users/ferim1/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-cms-press-support-array-parameters/page/2/#post-1493287)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
