Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
injectDependency(); } $this->includeFiles(); if (function_exists('wpFluentForm')) { return $this->registerHooks(wpFluentForm()); } } protected function includeFiles() { require_once FLUENTFORM_PDF_PATH . 'Classes/Controller/AvailableOptions.php'; require_once FLUENTFORM_PDF_PATH . 'Classes/Controller/FontManager.php'; require_once FLUENTFORM_PDF_PATH . 'Classes/Controller/GlobalPdfManager.php'; require_once FLUENTFORM_PDF_PATH . 'Classes/Templates/TemplateManager.php'; require_once FLUENTFORM_PDF_PATH . 'Classes/Templates/GeneralTemplate.php'; require_once FLUENTFORM_PDF_PATH . 'Classes/Templates/InvoiceTemplate.php'; } protected function registerHooks($fluentForm) { new \FluentFormPdf\Classes\Controller\GlobalPdfManager($fluentForm); } /** * Notify the user about the FluentForm dependency and instructs to install it. */ protected function injectDependency() { add_action('admin_notices', function () { $pluginInfo = $this->getFluentFormInstallationDetails(); $class = 'notice notice-error'; $install_url_text = __('Click Here to Install the Plugin', 'fluentform-pdf'); if ($pluginInfo->action == 'activate') { $install_url_text = __('Click Here to Activate the Plugin', 'fluentform-pdf'); } $message = __('FluentForm pdf Add-On Requires Fluent Forms Plugin, ', 'fluentform-pdf'); $message .= '' . $install_url_text . ''; printf('

%2$s

', esc_attr($class), wp_kses_post($message)); }); } protected function getFluentFormInstallationDetails() { $activation = (object) [ 'action' => 'install', 'url' => '' ]; $allPlugins = get_plugins(); if (isset($allPlugins['fluentform/fluentform.php'])) { $url = wp_nonce_url( self_admin_url('plugins.php?action=activate&plugin=fluentform/fluentform.php'), 'activate-plugin_fluentform/fluentform.php' ); $activation->action = 'activate'; } else { $api = (object) ['slug' => 'fluentform']; $url = wp_nonce_url( self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug ); } $activation->url = $url; return $activation; } } add_action('plugins_loaded', function () { load_plugin_textdomain( 'fluentform-pdf', false, basename(dirname(__FILE__)) . 'assets/languages' ); (new FluentFormPdf())->boot(); }); register_activation_hook(__FILE__, function () { require_once FLUENTFORM_PDF_PATH . '/Classes/Controller/Activator.php'; \FluentFormPdf\Classes\Controller\Activator::activate(); }); register_deactivation_hook( __FILE__, function () { require_once FLUENTFORM_PDF_PATH . '/Classes/Controller/Activator.php'; \FluentFormPdf\Classes\Controller\Activator::deactivate(); });