@ Eric
re: paths
The paths would be relative to Code Snippets, not Link. I suggest not putting the API files within a plugin folder. Any update will delete the files. Your best course of action is to write your own plugin rather than using Code Snippets that way the API files can reside in your custom plugin. Code Snippets is fantastic for prototyping, testing actions/filters and adding one-off actions/filters but there are limits.
Creating a plugin is easy. Just add the plugin header text to the top of a php file, paste in the snippets I gave you after the plugin header text, deactivate the snippets you added, create a new folder in the plugins folder, copy your php file to that new folder and activate your new plugin.
re: instruction action
The action will only work with the betas, not the version you have installed.
re: I only want the data to prepopulate when a new directory entry is being added
Right, you’ll have to add conditional code to make sure that happens only when adding a new entry.
re: default for new entries was to make them either Private or Unlisted. I’d like to set the default to be Public
As of Connections 0.8.6, the default is to be Public.
re: Also, I’d like to set this up for Individuals only, rather than providing the choice of Organization too
function cn_limit_entry_type_to_individual( $atts ){
$atts['entry_type'] = array(
__( 'Individual', 'connections' ) => 'individual'
);
$atts['default'] = array(
'type' => 'individual',
'visibility' => 'public'
);
return $atts;
}
// Filter to limit to the organization entry type.
add_filter( 'cn_metabox_publish_atts', 'cn_limit_entry_type_to_individual' );