plugin_url( 'inc/admin/meta-box/assets/email-content.js' ) );
wp_enqueue_style( 'learn-press-email-content-field', LearnPress::instance()->plugin_url( 'inc/admin/meta-box/assets/email-content.css' ) );
if ( ! isset( $value ) ) {
return;
}
$meta = wp_parse_args(
$value['value'],
array(
'format' => 'html',
'html' => '',
'plain' => '',
)
);
$field = wp_parse_args(
$value,
array(
'template_base' => '',
'template_path' => '',
'template_html' => '',
'template_plain' => '',
'template_html_local' => '',
'template_plain_local' => '',
'support_variables' => array(),
)
);
$email_format = $meta['format'];
?>
|
|
$value['id'] . '[format]',
'class' => 'lp-email-format',
'selected' => $email_format,
'option_none' => array( '' => esc_html__( 'General Settings', 'learnpress' ) ),
)
);*/
?>
$title ) :
$template = ! empty( $field[ "template_{$template_type}" ] ) ? $field[ "template_{$template_type}" ] : null;
if ( empty( $template ) ) {
continue;
}
$local_file = ! empty( $field[ "template_{$template_type}_local" ] ) ? $field[ "template_{$template_type}_local" ] : null;
$template_file = $field['template_base'] . $template;
$template_dir = $field['template_path'];
$classes = array( 'learn-press-email-template' );
if ( $template_type == 'html' ) {
$classes[] = $template_type . ' multipart';
} else {
$classes[] = 'plain_text';
}
if ( $template_type == $email_format || ( ( $email_format == 'plain_text' || ! $email_format ) && $template_type == 'plain' ) ) {
} else {
$classes[] = 'hide-if-js';
}
$content_html = $meta['html'] ? stripslashes( $meta['html'] ) : LP_WP_Filesystem::instance()->file_get_contents( $template_file );
$content_plain = $meta['plain'] ? stripslashes( $meta['plain'] ) : LP_WP_Filesystem::instance()->file_get_contents( $template_file );
$has_local_file = file_exists( $local_file );
$theme_dir = get_template_directory();
$stylesheet_dir = get_stylesheet_directory();
if ( $theme_dir != $stylesheet_dir ) {
$theme_dir = $stylesheet_dir;
}
$theme_folder = basename( $theme_dir );
?>
%s. Please open the file in an editor program to edit', 'learnpress' ), $theme_folder . '/' . $template_dir . '/' . $template ); ?>
20,
'wpautop' => false,
'textarea_name' => $field['id'] . '[html]',
)
);
?>
-
|