Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
home/monara/public_html/SMJ2/wp-content/plugins/mailpoet/lib/Form/Widget.php 0000644 00000022457 15073176574 0023015 0 ustar 00 __('Add a newsletter subscription form', 'mailpoet')]
);
$this->wp = new WPFunctions;
$this->renderer = (new RendererFactory())->getRenderer();
$this->assetsController = new AssetsController($this->wp, $this->renderer, SettingsController::getInstance());
$this->formRenderer = ContainerWrapper::getInstance()->get(FormRenderer::class);
$this->formsRepository = ContainerWrapper::getInstance()->get(FormsRepository::class);
$this->customFonts = ContainerWrapper::getInstance()->get(CustomFonts::class);
if (!is_admin()) {
$this->setupIframe();
} else {
WPFunctions::get()->addAction('widgets_admin_page', [
$this->assetsController,
'setupAdminWidgetPageDependencies',
]);
}
}
public function setupIframe() {
$formId = (isset($_GET['mailpoet_form_iframe']) ? (int)$_GET['mailpoet_form_iframe'] : 0);
if (!$formId || !$this->formsRepository->findOneById($formId)) return;
$formHtml = $this->widget(
[
'form' => $formId,
'form_type' => 'iframe',
]
);
$scripts = $this->assetsController->printScripts();
// language attributes
$languageAttributes = [];
$isRtl = (bool)(function_exists('is_rtl') && WPFunctions::get()->isRtl());
if ($isRtl) {
$languageAttributes[] = 'dir="rtl"';
}
if (get_option('html_type') === 'text/html') {
$languageAttributes[] = sprintf('lang="%s"', WPFunctions::get()->getBloginfo('language'));
}
$languageAttributes = WPFunctions::get()->applyFilters(
'language_attributes', implode(' ', $languageAttributes)
);
$data = [
'language_attributes' => $languageAttributes,
'scripts' => $scripts,
'form' => $formHtml,
'mailpoet_form' => [
'ajax_url' => WPFunctions::get()->adminUrl('admin-ajax.php', 'absolute'),
'is_rtl' => $isRtl,
],
'fonts_link' => $this->customFonts->generateHtmlCustomFontLink(),
'mailpoet_public_css_url' => Env::$assetsUrl . '/dist/css/' . $this->renderer->getCssAsset('mailpoet-public.css'),
];
try {
// We control the template and the data is sanitized
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPressDotOrg.sniffs.OutputEscaping.UnescapedOutputParameter
echo $this->renderer->render('form/iframe.html', $data);
} catch (\Exception $e) {
echo esc_html($e->getMessage());
}
exit();
}
/**
* Save the new widget's title.
*/
public function update($newInstance, $oldInstance) {
$instance = $oldInstance;
$instance['title'] = strip_tags($newInstance['title']);
$instance['form'] = (int)$newInstance['form'];
return $instance;
}
/**
* Output the widget's option form.
*/
public function form($instance) {
$instance = WPFunctions::get()->wpParseArgs(
(array)$instance,
[
'title' => __('Subscribe to Our Newsletter', 'mailpoet'),
]
);
$formEditUrl = WPFunctions::get()->adminUrl('admin.php?page=mailpoet-form-editor-template-selection');
// set title
$title = isset($instance['title']) ? strip_tags($instance['title']) : '';
// set form
$selectedForm = isset($instance['form']) ? (int)($instance['form']) : 0;
// get forms list
$forms = $this->formsRepository->findBy(['deletedAt' => null], ['name' => 'asc']);
?>