This is what I changed to make it work with 3.5.1
-
Replaced:
if ($editable_statuses_array=='') $editable_statuses_array=array();
By:
if ($editable_statuses_array=='' || !is_array($editable_statuses_array)) $editable_statuses_array=array();
Then, the block:
list($count_singular_val,$dummy) = split(' ',$label_count['singular'],2); list($count_plural_val,$dummy) = split(' ',$label_count['plural'],2); $public_val = $status->public; if (in_array($status->name,$editable_statuses)) { echo cs_print_custom_status($i, $opt_val, $slug_val, $count_singular_val, $count_plural_val, $public_val); $i++; } else { if (('inherit'!=$status->name) && ('auto-draft'!=$status->name)) $field .= '<p>' . $label_default . ' <input type="text" readonly="readonly" id="fixed_status_'.$slug_val .'" name="fixed_status_'.$slug_val . '" value="' . $status->label . '" size="20"></p>'; }
Needed to be wrapped with:
if (isset($label_count['singular']) && isset($label_count['plural'])) { // same code here }
Bonus: in case you are using it with “Events+” plugin (by WPMUdev)
This plugin manages recurrent events, thus creates an internal statuts “recurrent” that will also populate Custom Status’ dropdown.So I had to exclude this type from displaying in the list.
Replace line:
if ($status->name != "auto-draft" && $status->name != "inherit" ) {
By:
if ($status->name != "auto-draft" && $status->name != "inherit" && $status->name != "recurrent" ) {
That’s all for today.
Best,
Germain
- The topic ‘This is what I changed to make it work with 3.5.1’ is closed to new replies.