SuperCPT plugin breaks when trying to upgrade WP version
-
We are unable to update a website because the SuperCPT plugin breaks whenever we do. It’s not actually the plugin itself, but code that uses the plugin.
You’ll see the issue on the site copy admin page (during the upgrade). We have left it broken here:
https://sitecopy.empirecenter.org/wp-admin/The error it throws is:
Fatal error: Class ‘Super_Custom_Post_Type’ not found in /home/empirecenter/www/sitecopy/wp-content/mu-plugins/Empire_Center/Init/Post_Types_Taxonomies.php on line 6It is caused by custom code written in a theme file. (This is not the actual site theme – but files just housed in a theme folder.) Below is the code in its entirety. Can you please let us know what we should do here so that we can successfully upgrade this website without this breaking? Thanks!
add_action(‘after_setup_theme’, ‘ec_setup_post_types_taxonomies’);
function ec_setup_post_types_taxonomies() {
$publications = new Super_Custom_Post_Type(ec_prefix(‘publication’),
‘Publication’,
‘Publications’,
array( ‘has_archive’=> true, ‘rewrite’ => array(‘slug’ => ‘publications’), ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘revisions’, ‘excerpt’, ‘page-attributes’, ‘author’)));
$publications->set_icon(‘book’);$ny_torch_posts = new Super_Custom_Post_Type(ec_prefix(‘ny-torch-post’), ‘NY Torch Post’, ‘NY Torch Posts’, array( ‘has_archive’=> true, ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘revisions’, ‘excerpt’, ‘page-attributes’, ‘author’ ) ) );
$ny_torch_posts->set_icon(‘fire’);$tax_tags = new Super_Custom_Taxonomy(ec_prefix(‘tag’), ‘Tag’, ‘Tags’);
$tax_torch_tags = new Super_Custom_Taxonomy(ec_prefix(‘torch_tag’), ‘NY Torch Tag’, ‘NY Torch Tags’);
$tax_cats = new Super_Custom_Taxonomy(ec_prefix(‘category’), ‘Category’, ‘Categories’, ‘category’);//$tax_pub_issue_areas = new Super_Custom_Taxonomy(ec_prefix(‘pub-issue-area’), ‘Issue Area’, ‘Issue Areas’);
$data = new Super_Custom_Post_Type(ec_prefix(‘data’), ‘Data’, ‘Data’, array( ‘has_archive’=> true, ‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’, ‘revisions’, ‘excerpt’, ‘page-attributes’, ‘author’ ) ) );
$data->set_icon(‘picture’);//connect_types_and_taxes($publications, array($tax_tags, $tax_cats, $tax_pub_issue_areas));
connect_types_and_taxes($publications, array($tax_tags, $tax_cats));connect_types_and_taxes($ny_torch_posts, array($tax_tags));
connect_types_and_taxes($data, array($tax_tags));
}
- The topic ‘SuperCPT plugin breaks when trying to upgrade WP version’ is closed to new replies.