Skip to content

Ambiguity on legacyv5 support #1137

@Saggre

Description

@Saggre

Hello and thank you for your contribution to the WP ecosystem.

How long will "legacyv5" functionality (importing multiple feeds) be supported in the base version of the plugin? It's not clear from any documentation I've read. Is this something that will be supported for an extended period or is it just for a migration period?

function feedzy_is_legacyv5() {
$legacy = (int) get_option( 'feedzy_legacyv5', 0 );
return 1 === $legacy;
}

public function handle_legacy() {
// We can increment this when we reach a new legacy milestone.
$current_legacy_version = (int) get_option( 'feedzy_legacyv5', 0 );
if ( 0 === $current_legacy_version ) {
$current_legacy_version = self::get_no_of_imports() > 0 ? 1 : -1;
update_option( 'feedzy_legacyv5', $current_legacy_version );
}
if ( function_exists( 'get_current_screen' ) && 'feedzy_imports' === get_current_screen()->post_type && 'add' === get_current_screen()->action && ! feedzy_is_pro() && -1 === $current_legacy_version && self::get_no_of_imports() >= 1 ) {
wp_safe_redirect( 'edit.php?post_type=feedzy_imports' );
exit;
}
if ( -1 === $current_legacy_version && ! feedzy_is_pro() && self::get_no_of_imports() >= 1 ) {
add_action(
'admin_head',
function () {
?>
<script type="text/javascript">
jQuery(function () {
jQuery('a[href*="post-new.php?post_type=feedzy_imports"]').addClass('feedzy-import-limit').prepend('<span class="dashicons dashicons-lock"></span> ');
});
</script>
<?php
}
);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions