';
$html .= '';
$html .= ' ';
$html .= '';
$html .= '' . __( "Active", "advanced-woo-labels" ) . ' ';
$html .= '' . __( "Inactive", "advanced-woo-labels" ) . ' ';
$html .= ' ';
$html .= ' ';
$html .= '';
return $html;
}
/*
* Get content for label priority meta box
* @return string
*/
static public function get_priority_meta_box( $label ) {
$label_value = '0';
$label_priority = get_post_meta( $label, '_awl_label_priority', true );
if ( $label_priority ) {
$label_value = $label_priority;
}
$html = '';
$html .= '
';
$html .= ' ';
$html .= '
';
return $html;
}
/*
* Get content for label rules meta box
* @return string
*/
static public function get_rules_meta_box( $label ) {
$rules = AWL_Admin_Options::include_rules();
$default_rule = new AWL_Admin_Label_Rules( $rules['product'][0] );
$incorrect_rules = AWL_Admin_Helpers::check_for_incorrect_display_rules( $label );
$html = '';
$html .= '';
$html .= '';
if ( $incorrect_rules ) {
$html .= '
';
$html .= __( 'Warning: you set some label conditions incorrectly. You can\'t have several Product, Page or User conditions inside one AND condition group.', 'advanced-woo-labels' ) . ' ';
$html .= __( 'Incorrect rules:', 'advanced-woo-labels' ) . ' ';
$html .= '' . $incorrect_rules . '' . ' ';
$html .= __( 'Divide them into several OR condition groups or just delete some.', 'advanced-woo-labels' );
$html .= '
';
}
$html .= '
';
$html .= __( 'To display the label product must match all of the following conditions.', 'advanced-woo-labels' );
$html .= '
';
if ( $label && ! empty( $label ) && isset( $label['conditions'] ) ) {
foreach( $label['conditions'] as $group_id => $group_rules ) {
$group_id = is_string( $group_id ) ? str_replace( 'group_', '', $group_id ) : $group_id;
$html .= '
';
$html .= '';
foreach( $group_rules as $rule_id => $rule_values ) {
$rule_id = is_string( $rule_id ) ? str_replace( 'rule_', '', $rule_id ) : $rule_id;
if ( isset( $rule_values['param'] ) ) {
$current_rule = new AWL_Admin_Label_Rules( AWL_Admin_Options::include_rule_by_id( $rule_values['param'] ), $group_id, $rule_id, $rule_values );
$html .= $current_rule->get_rule();
}
}
$html .= ' ';
$html .= '
';
}
} else {
$html .= '
';
$html .= '';
$html .= $default_rule->get_rule();
$html .= ' ';
$html .= '
';
}
$html .= '
' . __( "Add 'or' group", "advanced-woo-labels" ) . ' ';
$html .= '
';
return $html;
}
/*
* Get content for label settings meta box
* @return string
*/
static public function get_settings_meta_box( $label ) {
$settings_array = AWL_Admin_Options::include_label_settings();
$settings_obg = new AWL_Admin_Label_Settings( $settings_array, $label );
$html = '';
// Navigation tabs
$html .= $settings_obg->generate_nav_tabs();
$html .= '';
$html .= '
';
$html .= $settings_obg->generate_fields();
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= '';
$html .= '';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
' . __( "Product name", "advanced-woo-labels" ) . ' ';
$html .= '
$100$90';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
/*
* Get content for premium plugin version promotion meta box
* @return string
*/
static public function get_premium_meta_box() {
$integrations = AWL_Admin_Helpers::get_advanced_integrations();
$html = '';
$html .= '';
$html .= '
';
$html .= '
' . __( 'Unlock all premium plugin features:', 'advanced-woo-labels' ) . '
';
$html .= '
';
$html .= '' . __( 'Image labels.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'More label display conditions.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'More text variables - attributes, taxonomies, custom fields.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'Styling: shadows, borders, additional shapes.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'Emojis support.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'Label custom links.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'Labels animations.', 'advanced-woo-labels' ) . ' ';
$html .= '' . __( 'Math calculations for text variables.', 'advanced-woo-labels' ) . ' ';
if ( ! empty( $integrations ) ) {
foreach ( $integrations as $integration ) {
$html .= '' . __( 'Advanced integration with', 'advanced-woo-labels' ) . ' ' . $integration['name'] . ' ';
}
}
$html .= ' ';
$html .= '
' . __( 'Learn More', 'advanced-woo-labels' ) . ' ';
$html .= '
' . __( 'Get PRO!', 'advanced-woo-labels' ) . ' ';
$html .= '
';
$html .= '
';
return $html;
}
/*
* Get content for the welcome notice
* @return string
*/
static public function get_welcome_notice() {
$html = '';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
' . sprintf( __( 'Welcome to %s', 'advanced-woo-labels' ), 'Advanced Woo Labels' ) . ' ';
$html .= '
' . __( 'Product labels plugin for WooCommerce.', 'advanced-woo-labels' ) . '
';
$html .= '
';
$html .= '
';
$html .= '
' . __( 'Get Started', 'advanced-woo-labels' ) . ' ';
$html .= '
' . __( 'If you\'ve just set up the plugin, the first thing you need to do is create a new Label.', 'advanced-woo-labels' ) . '
';
$html .= '
' . __( 'Add New Label', 'advanced-woo-labels' ) . ' ';
$html .= '
';
$html .= '
';
$html .= '
' . __( 'Documentation', 'advanced-woo-labels' ) . ' ';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
' . __( 'Help', 'advanced-woo-labels' ) . ' ';
$html .= '
';
$html .= ' ';
$html .= ' ';
$html .= ' ';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
}
endif;