id ) ) { return; } if ( $screen->id !== 'plugins' ) { return; } $notice = '
'; $notice .= '

'; $notice .= sprintf( __( 'You need to have %1$s installed and activated to use %2$s.' ), '' . __( 'Neve Theme' ) . '', '' . __( 'Templates Patterns Collection' ) . '' ); $notice .= '

'; $notice .= '

'; $notice .= ''; $notice .= __( 'Install and Activate Neve' ); $notice .= ''; $notice .= '

'; $notice .= '
'; echo wp_kses_post( $notice ); } /** * Flush the permalinks after import * * @return bool */ function ti_tpc_flush_premalinks() { $flash_rules = get_transient( 'ti_tpc_should_flush_permalinks' ); if ( $flash_rules !== 'yes' ) { return false; } flush_rewrite_rules(); delete_transient( 'ti_tpc_should_flush_permalinks' ); return true; } /** * Load the localisation file. */ function ti_tpc_load_textdomain() { load_plugin_textdomain( 'templates-patterns-collection', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } add_action( 'init', 'ti_tpc_run', 999 ); function ti_tpc_run() { if ( ! defined( 'TI_ONBOARDING_DISABLED' ) ) { define( 'TI_ONBOARDING_DISABLED', false ); } define( 'TIOB_URL', plugin_dir_url( __FILE__ ) ); define( 'TIOB_PATH', dirname( __FILE__ ) . '/' ); $autoload_path = __DIR__ . '/vendor/autoload.php'; if ( is_file( $autoload_path ) ) { require_once $autoload_path; } if ( class_exists( 'WP_CLI' ) ) { require_once 'includes/WP_Cli.php'; } \TIOB\Main::instance(); }