← Back
Editing: tmomatic-main.php
<?php function tmomatic_admin_settings() { $language_names = array( esc_html__("Disabled", 'tmomatic-ticketmaster-post-generator'), esc_html__("Afrikaans (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Albanian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Arabic (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Amharic (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Armenian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Belarusian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Bulgarian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Catalan (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Chinese Simplified (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Croatian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Czech (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Danish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Dutch (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("English (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Estonian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Filipino (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Finnish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("French (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Galician (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("German (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Greek (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hebrew (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hindi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hungarian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Icelandic (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Indonesian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Irish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Italian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Japanese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Korean (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Latvian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Lithuanian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Norwegian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Macedonian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Malay (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Maltese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Persian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Polish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Portuguese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Romanian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Russian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Serbian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Slovak (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Slovenian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Spanish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Swahili (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Swedish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Thai (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Turkish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Ukrainian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Vietnamese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Welsh (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Yiddish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Tamil (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Azerbaijani (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kannada (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Basque (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Bengali (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Latin (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Chinese Traditional (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Esperanto (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Georgian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Telugu (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Gujarati (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Haitian Creole (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Urdu (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Burmese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Bosnian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Cebuano (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Chichewa (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Corsican (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Frisian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Scottish Gaelic (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hausa (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hawaian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Hmong (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Igbo (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Javanese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kazakh (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Khmer (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kurdish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kyrgyz (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Lao (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Luxembourgish (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Malagasy (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Malayalam (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Maori (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Marathi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Mongolian (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Nepali (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Pashto (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Punjabi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Samoan (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sesotho (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Shona (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sindhi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sinhala (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Somali (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sundanese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Swahili (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Tajik (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Uzbek (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Xhosa (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Yoruba (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Zulu (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Assammese (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Aymara (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Bambara (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Bhojpuri (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Dhivehi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Dogri (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Ewe (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Guarani (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Ilocano (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kinyarwanda (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Konkani (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Krio (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Kurdish - Sorani (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Lingala (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Luganda (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Maithili (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Meiteilon (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Mizo (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Odia (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Oromo (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Quechua (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sanskrit (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Sepedi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Tatar (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Tigrinya (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Tsonga (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Turkmen (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Twi (Google Translate)", 'tmomatic-ticketmaster-post-generator'), esc_html__("Uyghur (Google Translate)", 'tmomatic-ticketmaster-post-generator') ); $language_codes = array( "disabled", "af", "sq", "ar", "am", "hy", "be", "bg", "ca", "zh-CN", "hr", "cs", "da", "nl", "en", "et", "tl", "fi", "fr", "gl", "de", "el", "iw", "hi", "hu", "is", "id", "ga", "it", "ja", "ko", "lv", "lt", "no", "mk", "ms", "mt", "fa", "pl", "pt", "ro", "ru", "sr", "sk", "sl", "es", "sw", "sv", "th", "tr", "uk", "vi", "cy", "yi", "ta", "az", "kn", "eu", "bn", "la", "zh-TW", "eo", "ka", "te", "gu", "ht", "ur", "my", "bs", "ceb", "ny", "co", "fy", "gd", "ha", "haw", "hmn", "ig", "jw", "kk", "km", "ku", "ky", "lo", "lb", "mg", "ml", "mi", "mr", "mn", "ne", "ps", "pa", "sm", "st", "sn", "sd", "si", "so", "su", "sw", "tg", "uz", "xh", "yo", "zu", "as", "ay", "bm", "bho", "dv", "doi", "ee", "gn", "ilo", "rw", "gom", "kri", "ckb", "ln", "lg", "mai", "mni-Mtei", "lus", "or", "om", "qu", "sa", "nso", "tt", "ti", "ts", "tk", "ak", "ug" ); ?> <div class="wp-header-end"></div> <div class="wrap gs_popuptype_holder seo_pops"> <div> <form id="myForm" method="post" action="<?php if(is_multisite() && is_network_admin()){echo '../options.php';}else{echo 'options.php';}?>"> <div class="cr_autocomplete"> <input type="password" id="PreventChromeAutocomplete" name="PreventChromeAutocomplete" autocomplete="address-level4" /> </div> <?php settings_fields('tmomatic_option_group'); do_settings_sections('tmomatic_option_group'); $tmomatic_Main_Settings = get_option('tmomatic_Main_Settings', false); if (isset($tmomatic_Main_Settings['tmomatic_enabled'])) { $tmomatic_enabled = $tmomatic_Main_Settings['tmomatic_enabled']; } else { $tmomatic_enabled = ''; } if (isset($tmomatic_Main_Settings['enable_metabox'])) { $enable_metabox = $tmomatic_Main_Settings['enable_metabox']; } else { $enable_metabox = ''; } if (isset($tmomatic_Main_Settings['sentence_list'])) { $sentence_list = $tmomatic_Main_Settings['sentence_list']; } else { $sentence_list = ''; } if (isset($tmomatic_Main_Settings['sentence_list2'])) { $sentence_list2 = $tmomatic_Main_Settings['sentence_list2']; } else { $sentence_list2 = ''; } if (isset($tmomatic_Main_Settings['variable_list'])) { $variable_list = $tmomatic_Main_Settings['variable_list']; } else { $variable_list = ''; } if (isset($tmomatic_Main_Settings['enable_detailed_logging'])) { $enable_detailed_logging = $tmomatic_Main_Settings['enable_detailed_logging']; } else { $enable_detailed_logging = ''; } if (isset($tmomatic_Main_Settings['enable_logging'])) { $enable_logging = $tmomatic_Main_Settings['enable_logging']; } else { $enable_logging = ''; } if (isset($tmomatic_Main_Settings['auto_clear_logs'])) { $auto_clear_logs = $tmomatic_Main_Settings['auto_clear_logs']; } else { $auto_clear_logs = ''; } if (isset($tmomatic_Main_Settings['rule_timeout'])) { $rule_timeout = $tmomatic_Main_Settings['rule_timeout']; } else { $rule_timeout = ''; } if (isset($tmomatic_Main_Settings['date_format'])) { $date_format = $tmomatic_Main_Settings['date_format']; } else { $date_format = ''; } if (isset($tmomatic_Main_Settings['strip_links'])) { $strip_links = $tmomatic_Main_Settings['strip_links']; } else { $strip_links = ''; } if (isset($tmomatic_Main_Settings['send_email'])) { $send_email = $tmomatic_Main_Settings['send_email']; } else { $send_email = ''; } if (isset($tmomatic_Main_Settings['email_address'])) { $email_address = $tmomatic_Main_Settings['email_address']; } else { $email_address = ''; } if (isset($tmomatic_Main_Settings['max_duration'])) { $max_duration = $tmomatic_Main_Settings['max_duration']; } else { $max_duration = ''; } if (isset($tmomatic_Main_Settings['translate'])) { $translate = $tmomatic_Main_Settings['translate']; } else { $translate = ''; } if (isset($tmomatic_Main_Settings['spin_text'])) { $spin_text = $tmomatic_Main_Settings['spin_text']; } else { $spin_text = ''; } if (isset($tmomatic_Main_Settings['google_trans_auth'])) { $google_trans_auth = $tmomatic_Main_Settings['google_trans_auth']; } else { $google_trans_auth = ''; } if (isset($tmomatic_Main_Settings['best_user'])) { $best_user = $tmomatic_Main_Settings['best_user']; } else { $best_user = ''; } if (isset($tmomatic_Main_Settings['best_password'])) { $best_password = $tmomatic_Main_Settings['best_password']; } else { $best_password = ''; } if (isset($tmomatic_Main_Settings['min_word_title'])) { $min_word_title = $tmomatic_Main_Settings['min_word_title']; } else { $min_word_title = ''; } if (isset($tmomatic_Main_Settings['max_word_title'])) { $max_word_title = $tmomatic_Main_Settings['max_word_title']; } else { $max_word_title = ''; } if (isset($tmomatic_Main_Settings['min_word_content'])) { $min_word_content = $tmomatic_Main_Settings['min_word_content']; } else { $min_word_content = ''; } if (isset($tmomatic_Main_Settings['max_word_content'])) { $max_word_content = $tmomatic_Main_Settings['max_word_content']; } else { $max_word_content = ''; } if (isset($tmomatic_Main_Settings['required_words'])) { $required_words = $tmomatic_Main_Settings['required_words']; } else { $required_words = ''; } if (isset($tmomatic_Main_Settings['banned_words'])) { $banned_words = $tmomatic_Main_Settings['banned_words']; } else { $banned_words = ''; } if (isset($tmomatic_Main_Settings['custom_html2'])) { $custom_html2 = $tmomatic_Main_Settings['custom_html2']; } else { $custom_html2 = ''; } if (isset($tmomatic_Main_Settings['custom_html'])) { $custom_html = $tmomatic_Main_Settings['custom_html']; } else { $custom_html = ''; } if (isset($tmomatic_Main_Settings['skip_no_img'])) { $skip_no_img = $tmomatic_Main_Settings['skip_no_img']; } else { $skip_no_img = ''; } if (isset($tmomatic_Main_Settings['strip_by_id'])) { $strip_by_id = $tmomatic_Main_Settings['strip_by_id']; } else { $strip_by_id = ''; } if (isset($tmomatic_Main_Settings['strip_by_class'])) { $strip_by_class = $tmomatic_Main_Settings['strip_by_class']; } else { $strip_by_class = ''; } if (isset($tmomatic_Main_Settings['app_id'])) { $app_id = $tmomatic_Main_Settings['app_id']; } else { $app_id = ''; } if (isset($tmomatic_Main_Settings['affiliate_link_mode'])) { $affiliate_link_mode = $tmomatic_Main_Settings['affiliate_link_mode']; } else { $affiliate_link_mode = 'wrap'; } if (isset($tmomatic_Main_Settings['impact_tracking_template'])) { $impact_tracking_template = $tmomatic_Main_Settings['impact_tracking_template']; } else { $impact_tracking_template = ''; } if (isset($tmomatic_Main_Settings['impact_subids'])) { $impact_subids = $tmomatic_Main_Settings['impact_subids']; } else { $impact_subids = ''; } if (isset($tmomatic_Main_Settings['skip_old'])) { $skip_old = $tmomatic_Main_Settings['skip_old']; } else { $skip_old = ''; } if (isset($tmomatic_Main_Settings['skip_day'])) { $skip_day = $tmomatic_Main_Settings['skip_day']; } else { $skip_day = ''; } if (isset($tmomatic_Main_Settings['skip_month'])) { $skip_month = $tmomatic_Main_Settings['skip_month']; } else { $skip_month = ''; } if (isset($tmomatic_Main_Settings['skip_year'])) { $skip_year = $tmomatic_Main_Settings['skip_year']; } else { $skip_year = ''; } if (isset($tmomatic_Main_Settings['resize_width'])) { $resize_width = $tmomatic_Main_Settings['resize_width']; } else { $resize_width = ''; } if (isset($tmomatic_Main_Settings['resize_height'])) { $resize_height = $tmomatic_Main_Settings['resize_height']; } else { $resize_height = ''; } if (isset($tmomatic_Main_Settings['do_not_check_duplicates'])) { $do_not_check_duplicates = $tmomatic_Main_Settings['do_not_check_duplicates']; } else { $do_not_check_duplicates = ''; } if (isset($tmomatic_Main_Settings['one_import'])) { $one_import = $tmomatic_Main_Settings['one_import']; } else { $one_import = ''; } if (isset($tmomatic_Main_Settings['allow_duplicate'])) { $allow_duplicate = $tmomatic_Main_Settings['allow_duplicate']; } else { $allow_duplicate = ''; } if (isset($tmomatic_Main_Settings['proxy_url'])) { $proxy_url = $tmomatic_Main_Settings['proxy_url']; } else { $proxy_url = ''; } if (isset($tmomatic_Main_Settings['proxy_auth'])) { $proxy_auth = $tmomatic_Main_Settings['proxy_auth']; } else { $proxy_auth = ''; } if (isset($_GET['settings-updated'])) { ?> <div id="message" class="updated"> <p class="cr_saved_notif"><strong> <?php echo esc_html__('Settings saved.', 'tmomatic-ticketmaster-post-generator');?></strong></p> </div> <?php $get = get_option('coderevolution_settings_changed', 0); if($get == 1) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_failed_notif"><strong> <?php echo esc_html__('Plugin registration failed!', 'tmomatic-ticketmaster-post-generator');?></strong></p> </div> <?php } elseif($get == 2) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_saved_notif"><strong> <?php echo esc_html__('Plugin registration successful!', 'tmomatic-ticketmaster-post-generator');?></strong></p> </div> <?php } elseif($get != 0) { delete_option('coderevolution_settings_changed'); ?> <div id="message" class="updated"> <p class="cr_failed_notif"><strong> <?php echo esc_html($get);?></strong></p> </div> <?php } } ?> <div> <div class="tmomatic_class"> <table class="widefat"> <tr> <td> <h1> <span class="gs-sub-heading"><b>Tmomatic Automatic Post Generator Plugin - <?php echo esc_html__('Main Switch:', 'tmomatic-ticketmaster-post-generator');?></b> </span> <span class="cr_07_font">v1.2 </span> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Enable or disable this plugin. This acts like a main switch.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </h1> </td> <td> <div class="slideThree"> <input class="input-checkbox" type="checkbox" id="tmomatic_enabled" name="tmomatic_Main_Settings[tmomatic_enabled]"<?php if ($tmomatic_enabled == 'on') echo ' checked '; ?>> <label for="tmomatic_enabled"></label> </div> </td> </tr> </table> </div> <div><?php if($tmomatic_enabled != 'on'){echo '<div class="crf_bord cr_color_red cr_auto_update">' . esc_html__('This feature of the plugin is disabled! Please enable it from the above switch.', 'tmomatic-ticketmaster-post-generator') . '</div>';}?> <table class="widefat"> <tr> <td colspan="2"> <?php $plugin = plugin_basename(__FILE__); $plugin_slug = explode('/', $plugin); $plugin_slug = $plugin_slug[0]; $uoptions = get_option($plugin_slug . '_registration', array()); if(isset($uoptions['item_id']) && isset($uoptions['item_name']) && isset($uoptions['created_at']) && isset($uoptions['buyer']) && isset($uoptions['licence']) && isset($uoptions['supported_until'])) { ?> <h3><b><?php echo esc_html__("Plugin Registration Info - Automatic Updates Enabled:", 'tmomatic-ticketmaster-post-generator');?></b> </h3> <ul> <li><b><?php echo esc_html__("Item Name:", 'tmomatic-ticketmaster-post-generator');?></b> <?php echo esc_html($uoptions['item_name']);?></li> <li> <b><?php echo esc_html__("Item ID:", 'tmomatic-ticketmaster-post-generator');?></b> <?php echo esc_html($uoptions['item_id']);?> </li> <li> <b><?php echo esc_html__("Created At:", 'tmomatic-ticketmaster-post-generator');?></b> <?php echo esc_html($uoptions['created_at']);?> </li> <li> <b><?php echo esc_html__("Buyer Name:", 'tmomatic-ticketmaster-post-generator');?></b> <?php echo esc_html($uoptions['buyer']);?> </li> <li> <input type="submit" onclick="unsaved = false;" class="button button-primary" name="<?php echo esc_html($plugin_slug);?>_revoke_license" value="<?php echo esc_html__("Revoke License", 'tmomatic-ticketmaster-post-generator');?>"> </li> </ul> <?php } else { ?> <div class="notice notice-error is-dismissible"><p><?php echo esc_html__("This is a trial version of the plugin. Automatic updates for this plugin are disabled. Please activate the plugin from below, so you can benefit of automatic updates for it!", 'tmomatic-ticketmaster-post-generator');?></p></div> </td> </tr> <tr> <td> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( 'Please input your Envato purchase code, to enable automatic updates in the plugin. To get your purchase code, please follow <a href="%s" target="_blank">this tutorial</a>. Info submitted to the registration server consists of: purchase code, site URL, site name, admin email. All these data will be used strictly for registration purposes.', 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( '//coderevolution.ro/knowledge-base/faq/how-do-i-find-my-items-purchase-code-for-plugin-license-activation/' ) ); ?> </div> </div> <b><?php echo esc_html__("Register Envato Purchase Code To Enable Automatic Updates:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td><input type="text" name="<?php echo esc_html($plugin_slug);?>_register_code" value="" placeholder="<?php echo esc_html__("Envato Purchase Code", 'tmomatic-ticketmaster-post-generator');?>"></td> </tr> <tr> <td></td> <td><input type="submit" name="<?php echo esc_html($plugin_slug);?>_register" id="<?php echo esc_html($plugin_slug);?>_register" class="button button-primary" onclick="unsaved = false;" value="<?php echo esc_html__("Register Purchase Code", 'tmomatic-ticketmaster-post-generator');?>"/> <?php } ?> </td> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr><td colspan="2"> <h3> <ul> <li><?php echo sprintf( wp_kses( __( 'Need help configuring this plugin? Please check out it\'s <a href="%s" target="_blank">video tutorial</a>.', 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://www.youtube.com/watch?v=sm5uvmwJaQ0' ) );?> </li> <li><?php echo sprintf( wp_kses( __( 'Having issues with the plugin? Please be sure to check out our <a href="%s" target="_blank">knowledge-base</a> before you contact <a href="%s" target="_blank">our support</a>!', 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( '//coderevolution.ro/knowledge-base' ), esc_url_raw('//coderevolution.ro/support' ) );?></li> <li><?php echo sprintf( wp_kses( __( 'Do you enjoy our plugin? Please give it a <a href="%s" target="_blank">rating</a> on CodeCanyon, or check <a href="%s" target="_blank">our website</a> for other cool plugins.', 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( '//codecanyon.net/downloads' ), esc_url_raw( 'https://coderevolution.ro' ) );?></a></li> <li><br/><br/><span class="cr_color_red"><?php echo esc_html__("Are you looking for a cool new theme that best fits this plugin?", 'tmomatic-ticketmaster-post-generator');?></span> <a onclick="revealRec()" class="cr_cursor_pointer"><?php echo esc_html__("Click here for our theme related recommendation", 'tmomatic-ticketmaster-post-generator');?></a>. <br/><span id="diviIdrec"></span> </li> </ul> </h3> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( "Insert your TicketMaster 'API Key'. Get one <a href='%s' target='_blank'>here</a> (register and log in and you will see the API key listed on the page (it will automatically appear in all example URLs from the page - example: %s;). If you wish to also benefit from the affiliate income this plugin can offer, when creating your account, please add your 'Impact Radius', 'Affiliate Window' or 'Zanox' affiliate ID to the 'Ticketmaster Affiliate IDs' input field.", 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/' ), esc_url_raw( 'https://app.ticketmaster.com/discovery/v2/events.json?apikey=<your_api_key>' ) ); ?> </div> </div> <b><a href="https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/" target="_blank"><?php echo esc_html__("TicketMaster API Key", 'tmomatic-ticketmaster-post-generator');?></a>:</b> </div> </td> <td> <div> <input type="password" autocomplete="off" id="app_id" name="tmomatic_Main_Settings[app_id]" value="<?php echo esc_html($app_id); ?>" placeholder="<?php echo esc_html__("Please insert your TicketMaster API Key", 'tmomatic-ticketmaster-post-generator');?>"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Ticketmaster consolidated its affiliate program onto a single Impact tracking domain at the end of 2025. 'Use Discovery API links as-is' is recommended: simply add your Impact Publisher ID inside your Ticketmaster Developer Portal account (Edit Profile) and the API will automatically return correctly tracked links. Choose 'Wrap links with my Impact tracking template' only if you append tracking manually - then paste your current Impact tracking link below.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Affiliate Link Mode:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <select id="affiliate_link_mode" name="tmomatic_Main_Settings[affiliate_link_mode]"> <option value="api"<?php selected($affiliate_link_mode, 'api');?>><?php echo esc_html__("Use Discovery API links as-is", 'tmomatic-ticketmaster-post-generator');?></option> <option value="wrap"<?php selected($affiliate_link_mode, 'wrap');?>><?php echo esc_html__("Wrap links with my Impact tracking template (recommended)", 'tmomatic-ticketmaster-post-generator');?></option> </select> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Your current Impact tracking link for Ticketmaster, in the form https://{trackingdomain}/c/{publisherId}/{adId}/{campaignId}. You can copy it from your Impact partner dashboard (Content -> Create a link). Used only when 'Wrap links with my Impact tracking template' is selected, and by the Affiliate Link Migration tool to repoint old links.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Impact Tracking Template:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="url" id="impact_tracking_template" name="tmomatic_Main_Settings[impact_tracking_template]" value="<?php echo esc_attr($impact_tracking_template);?>" class="cr_width_100" placeholder="https://imp.pxf.io/c/1234567/890123/4567"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Optional extra Impact parameters appended to wrapped links, for your own reporting (for example: subId1=tmomatic). Do not include a leading ? or &.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Impact Sub IDs (optional):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="text" id="impact_subids" name="tmomatic_Main_Settings[impact_subids]" value="<?php echo esc_attr($impact_subids);?>" class="cr_width_100" placeholder="subId1=tmomatic"> <br/><a href="admin.php?page=tmomatic_affiliate_migration"><?php echo esc_html__("Open the Affiliate Link Migration tool to update links in existing posts", 'tmomatic-ticketmaster-post-generator');?></a> </div> </td> </tr> <tr> <td></td> <td><br/><input type="submit" name="btnSubmitApp" id="btnSubmitApp" class="button button-primary" onclick="unsaved = false;" value="<?php echo esc_html__("Save Info", 'tmomatic-ticketmaster-post-generator');?>"/> </td> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr> <td> <h3><?php echo esc_html__("After you entered the API Key, you can start creating rules:", 'tmomatic-ticketmaster-post-generator');?></h3> </td> </tr> <tr> <td><a name="newest" href="admin.php?page=tmomatic_items_panel">- TicketMaster -> <?php echo esc_html__("Blog Posts", 'tmomatic-ticketmaster-post-generator');?> -</a></td> <td> (TicketMaster API) <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Posts will be generated from the latest entries in TicketMaster public feed.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </td> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr> <td> <h3><?php echo esc_html__("Plugin Options:", 'tmomatic-ticketmaster-post-generator');?></h3> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to skip checking for duplicate posts when publishing new posts (check this if you have 10000+ posts on your blog and you are experiencing slowdows when the plugin is running. If you check this, duplicate posts will be posted! So use it only when it is necesarry.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Do Not Check For Duplicate Posts:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="do_not_check_duplicates" name="tmomatic_Main_Settings[do_not_check_duplicates]"<?php if ($do_not_check_duplicates == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose this option to import posts only once to this blog (also if the post was deleted after importing).", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Import Posts Only Once:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="one_import" name="tmomatic_Main_Settings[one_import]"<?php if ($one_import == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to allow events to be imported multiple times (events might have slight differences in description, but same title).", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Allow Similar Events To Be Imported Multiple Times:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="allow_duplicate" name="tmomatic_Main_Settings[allow_duplicate]"<?php if ($allow_duplicate == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("If you want to use a proxy to access TicketMaster, input it's address here. Required format: IP Address/URL:port", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Web Proxy Address:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="text" id="proxy_url" placeholder="<?php echo esc_html__("Input web proxy url", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[proxy_url]" value="<?php echo esc_html($proxy_url);?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("If you want to use a proxy to crawl webpages, and it requires authentification, input it's authentification details here. Required format: username:password", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Web Proxy Authentification:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="text" id="proxy_auth" placeholder="<?php echo esc_html__("Input web proxy auth", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[proxy_auth]" value="<?php echo esc_html($proxy_auth);?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to strip links from the generated post content.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Strip Links From Generated Post Content:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="strip_links" name="tmomatic_Main_Settings[strip_links]"<?php if ($strip_links == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to show an extended information metabox under every plugin generated post.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Show Extended Item Information Metabox in Post:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="enable_metabox" name="tmomatic_Main_Settings[enable_metabox]"<?php if ($enable_metabox == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( "If you wish to use the official version of the Google Translator API for translation, you must enter first a Google API Key. Get one <a href='%s' target='_blank'>here</a>. Please enable the 'Cloud Translation API' in <a href='%s' target='_blank'>Google Cloud Console</a>. Translation will work even without even without entering an API key here, but in this case, an unofficial Google Translate API will be used.", 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'https://console.cloud.google.com/apis/credentials' ), esc_url_raw( 'https://console.cloud.google.com/marketplace/browse?q=translate' ) ); ?> </div> </div> <b><a href="https://console.cloud.google.com/apis/credentials" target="_blank"><?php echo esc_html__("Google Translator API Key (Optional)", 'tmomatic-ticketmaster-post-generator');?>:</a></b> </div> </td> <td> <div> <input type="password" autocomplete="off" id="google_trans_auth" placeholder="<?php echo esc_html__("API Key (optional)", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[google_trans_auth]" value="<?php echo esc_html($google_trans_auth); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to enable logging for rules?", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Enable Logging for Rules:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="enable_logging" name="tmomatic_Main_Settings[enable_logging]" onclick="mainChanged()"<?php if ($enable_logging == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div class="hideLog"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to enable detailed logging for rules? Note that this will dramatically increase the size of the log this plugin generates.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Enable Detailed Logging for Rules:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class="hideLog"> <input type="checkbox" id="enable_detailed_logging" name="tmomatic_Main_Settings[enable_detailed_logging]"<?php if ($enable_detailed_logging == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div class="hideLog"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to automatically clear logs after a period of time.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Automatically Clear Logs After:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class="hideLog"> <select id="auto_clear_logs" name="tmomatic_Main_Settings[auto_clear_logs]" > <option value="No"<?php if ($auto_clear_logs == "No") { echo " selected"; } ?>><?php echo esc_html__("Disabled", 'tmomatic-ticketmaster-post-generator');?></option> <option value="monthly"<?php if ($auto_clear_logs == "monthly") { echo " selected"; } ?>><?php echo esc_html__("Once a month", 'tmomatic-ticketmaster-post-generator');?></option> <option value="weekly"<?php if ($auto_clear_logs == "weekly") { echo " selected"; } ?>><?php echo esc_html__("Once a week", 'tmomatic-ticketmaster-post-generator');?></option> <option value="daily"<?php if ($auto_clear_logs == "daily") { echo " selected"; } ?>><?php echo esc_html__("Once a day", 'tmomatic-ticketmaster-post-generator');?></option> <option value="twicedaily"<?php if ($auto_clear_logs == "twicedaily") { echo " selected"; } ?>><?php echo esc_html__("Twice a day", 'tmomatic-ticketmaster-post-generator');?></option> <option value="hourly"<?php if ($auto_clear_logs == "hourly") { echo " selected"; } ?>><?php echo esc_html__("Once an hour", 'tmomatic-ticketmaster-post-generator');?></option> </select> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the timeout (in seconds) for every rule running. I recommend that you leave this field at it's default value (3600).", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Timeout for Rule Running (seconds):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="rule_timeout" step="1" min="0" placeholder="<?php echo esc_html__("Input rule timeout in seconds", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[rule_timeout]" value="<?php echo esc_html($rule_timeout); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo sprintf( wp_kses( __( "Please input the desired date format to be used for shortcodes that output a date (in 'Generated Post Content' rule settings). More info about this, <a href='%s' target='_blank'>here</a>. Example: Y-m-d H:i:s", 'tmomatic-ticketmaster-post-generator'), array( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url_raw( 'http://php.net/manual/en/function.date.php' ) ); ?> </div> </div> <b><?php echo esc_html__("Date Format For Shortcodes:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="text" id="date_format" placeholder="<?php echo esc_html__("Example: Y-m-d H:i:s", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[date_format]" value="<?php echo esc_html($date_format); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to receive a summary of the rule running in an email.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Send Rule Running Summary in Email:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="send_email" name="tmomatic_Main_Settings[send_email]" onchange="mainChanged()"<?php if ($send_email == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div class="hideMail"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Input the email adress where you want to send the report. You can input more email addresses, separated by commas.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Email Address:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class="hideMail"> <input type="text" id="email_address" placeholder="<?php echo esc_html__("Input a valid email adress", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[email_address]" value="<?php echo esc_html($email_address); ?>"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("In case you are using the event duration data, you can set the maximum duration for events (in hours).", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Set The Maximum Duration For Events (Hours):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="max_duration" step="1" placeholder="<?php echo esc_html__("Input the maximum event duration time (hours)", 'tmomatic-ticketmaster-post-generator');?>" min="0" name="tmomatic_Main_Settings[max_duration]" value="<?php echo esc_html($max_duration); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the minimum word count for post titles. Items that have less than this count will not be published. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Minimum Title Word Count (Skip Post Otherwise):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="min_word_title" step="1" placeholder="<?php echo esc_html__("Input the minimum word count for the title", 'tmomatic-ticketmaster-post-generator');?>" min="0" name="tmomatic_Main_Settings[min_word_title]" value="<?php echo esc_html($min_word_title); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the maximum word count for post titles. Items that have more than this count will not be published. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Maximum Title Word Count (Skip Post Otherwise):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="max_word_title" step="1" min="0" placeholder="<?php echo esc_html__("Input the maximum word count for the title", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[max_word_title]" value="<?php echo esc_html($max_word_title); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the minimum word count for post content. Items that have less than this count will not be published. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Minimum Content Word Count (Skip Post Otherwise):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="min_word_content" step="1" min="0" placeholder="<?php echo esc_html__("Input the minimum word count for the content", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[min_word_content]" value="<?php echo esc_html($min_word_content); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Set the maximum word count for post content. Items that have more than this count will not be published. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Maximum Content Word Count (Skip Post Otherwise):", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" id="max_word_content" step="1" min="0" placeholder="<?php echo esc_html__("Input the maximum word count for the content", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[max_word_content]" value="<?php echo esc_html($max_word_content); ?>"/> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do not include posts that's title or content contains at least one of these words. Separate words by comma. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Banned Words List:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="1" name="tmomatic_Main_Settings[banned_words]" placeholder="<?php echo esc_html__("Do not generate posts that contain at least one of these words", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($banned_words); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do not include posts that's title or content does not contain at least one of these words. Separate words by comma. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Required Words List:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="1" name="tmomatic_Main_Settings[required_words]" placeholder="<?php echo esc_html__("Do not generate posts unless they contain all of these words", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($required_words); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Resize the image that was assigned to be the featured image to the width specified in this text field (in pixels). If you want to disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Featured Image Resize Width:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" min="1" step="1" name="tmomatic_Main_Settings[resize_width]" value="<?php echo esc_html($resize_width);?>" placeholder="<?php echo esc_html__("Please insert the desired width for featured images", 'tmomatic-ticketmaster-post-generator');?>"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Resize the image that was assigned to be the featured image to the height specified in this text field (in pixels). If you want to disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Featured Image Resize Height:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div> <input type="number" min="1" step="1" name="tmomatic_Main_Settings[resize_height]" value="<?php echo esc_html($resize_height);?>" placeholder="<?php echo esc_html__("Please insert the desired height for featured images", 'tmomatic-ticketmaster-post-generator');?>"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Strip HTML elements from final content that have this IDs. You can insert more IDs, separeted by comma. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Strip HTML Elements from Final Content by ID:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="3" cols="70" name="tmomatic_Main_Settings[strip_by_id]" placeholder="<?php echo esc_html__("Ids list", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($strip_by_id); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Strip HTML elements from final content that have this class. You can insert more classes, separeted by comma. To disable this feature, leave this field blank.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Strip HTML Elements from Final Content by Class:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="3" cols="70" name="tmomatic_Main_Settings[strip_by_class]" placeholder="<?php echo esc_html__("Class list", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($strip_by_class); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to skip posts that do not have images.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Skip Posts That Do Not Have Images:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="skip_no_img" name="tmomatic_Main_Settings[skip_no_img]"<?php if ($skip_no_img == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Choose if you want to skip events that are older than a selected date.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Skip Events Older Than a Selected Date:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <input type="checkbox" id="skip_old" name="tmomatic_Main_Settings[skip_old]" onchange="mainChanged()"<?php if ($skip_old == 'on') echo ' checked '; ?>> </div> </td> </tr> <tr> <td> <div class='hideOld'> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Select the date prior which you want to skip posts.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Select the Date for Old Posts:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class='hideOld'> <?php echo esc_html__("Day:", 'tmomatic-ticketmaster-post-generator');?> <select class="cr_width_80" name="tmomatic_Main_Settings[skip_day]" > <option value='01'<?php if ($skip_day == '01') echo ' selected'; ?>>01</option> <option value='02'<?php if ($skip_day == '02') echo ' selected'; ?>>02</option> <option value='03'<?php if ($skip_day == '03') echo ' selected'; ?>>03</option> <option value='04'<?php if ($skip_day == '04') echo ' selected'; ?>>04</option> <option value='05'<?php if ($skip_day == '05') echo ' selected'; ?>>05</option> <option value='06'<?php if ($skip_day == '06') echo ' selected'; ?>>06</option> <option value='07'<?php if ($skip_day == '07') echo ' selected'; ?>>07</option> <option value='08'<?php if ($skip_day == '08') echo ' selected'; ?>>08</option> <option value='09'<?php if ($skip_day == '09') echo ' selected'; ?>>09</option> <option value='10'<?php if ($skip_day == '10') echo ' selected'; ?>>10</option> <option value='11'<?php if ($skip_day == '11') echo ' selected'; ?>>11</option> <option value='12'<?php if ($skip_day == '12') echo ' selected'; ?>>12</option> <option value='13'<?php if ($skip_day == '13') echo ' selected'; ?>>13</option> <option value='14'<?php if ($skip_day == '14') echo ' selected'; ?>>14</option> <option value='15'<?php if ($skip_day == '15') echo ' selected'; ?>>15</option> <option value='16'<?php if ($skip_day == '16') echo ' selected'; ?>>16</option> <option value='17'<?php if ($skip_day == '17') echo ' selected'; ?>>17</option> <option value='18'<?php if ($skip_day == '18') echo ' selected'; ?>>18</option> <option value='19'<?php if ($skip_day == '19') echo ' selected'; ?>>19</option> <option value='20'<?php if ($skip_day == '20') echo ' selected'; ?>>20</option> <option value='21'<?php if ($skip_day == '21') echo ' selected'; ?>>21</option> <option value='22'<?php if ($skip_day == '22') echo ' selected'; ?>>22</option> <option value='23'<?php if ($skip_day == '23') echo ' selected'; ?>>23</option> <option value='24'<?php if ($skip_day == '24') echo ' selected'; ?>>24</option> <option value='25'<?php if ($skip_day == '25') echo ' selected'; ?>>25</option> <option value='26'<?php if ($skip_day == '26') echo ' selected'; ?>>26</option> <option value='27'<?php if ($skip_day == '27') echo ' selected'; ?>>27</option> <option value='28'<?php if ($skip_day == '28') echo ' selected'; ?>>28</option> <option value='29'<?php if ($skip_day == '29') echo ' selected'; ?>>29</option> <option value='30'<?php if ($skip_day == '30') echo ' selected'; ?>>30</option> <option value='31'<?php if ($skip_day == '31') echo ' selected'; ?>>31</option> </select> <?php echo esc_html__("Month:", 'tmomatic-ticketmaster-post-generator');?> <select class="cr_width_80" name="tmomatic_Main_Settings[skip_month]" > <option value='01'<?php if ($skip_month == '01') echo ' selected'; ?>><?php echo esc_html__("January", 'tmomatic-ticketmaster-post-generator');?></option> <option value='02'<?php if ($skip_month == '02') echo ' selected'; ?>><?php echo esc_html__("February", 'tmomatic-ticketmaster-post-generator');?></option> <option value='03'<?php if ($skip_month == '03') echo ' selected'; ?>><?php echo esc_html__("March", 'tmomatic-ticketmaster-post-generator');?></option> <option value='04'<?php if ($skip_month == '04') echo ' selected'; ?>><?php echo esc_html__("April", 'tmomatic-ticketmaster-post-generator');?></option> <option value='05'<?php if ($skip_month == '05') echo ' selected'; ?>><?php echo esc_html__("May", 'tmomatic-ticketmaster-post-generator');?></option> <option value='06'<?php if ($skip_month == '06') echo ' selected'; ?>><?php echo esc_html__("June", 'tmomatic-ticketmaster-post-generator');?></option> <option value='07'<?php if ($skip_month == '07') echo ' selected'; ?>><?php echo esc_html__("July", 'tmomatic-ticketmaster-post-generator');?></option> <option value='08'<?php if ($skip_month == '08') echo ' selected'; ?>><?php echo esc_html__("August", 'tmomatic-ticketmaster-post-generator');?></option> <option value='09'<?php if ($skip_month == '09') echo ' selected'; ?>><?php echo esc_html__("September", 'tmomatic-ticketmaster-post-generator');?></option> <option value='10'<?php if ($skip_month == '10') echo ' selected'; ?>><?php echo esc_html__("October", 'tmomatic-ticketmaster-post-generator');?></option> <option value='11'<?php if ($skip_month == '11') echo ' selected'; ?>><?php echo esc_html__("November", 'tmomatic-ticketmaster-post-generator');?></option> <option value='12'<?php if ($skip_month == '12') echo ' selected'; ?>><?php echo esc_html__("December", 'tmomatic-ticketmaster-post-generator');?></option> </select> <?php echo esc_html__("Year:", 'tmomatic-ticketmaster-post-generator');?><input class="cr_width_70" value="<?php echo esc_html($skip_year); ?>" placeholder="<?php echo esc_html__("year", 'tmomatic-ticketmaster-post-generator');?>" name="tmomatic_Main_Settings[skip_year]" type="text" pattern="^\d{4}$"> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to automatically translate generated content using Google Translate?", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Automatically Translate Content To:", 'tmomatic-ticketmaster-post-generator');?></b><br/><b><?php echo esc_html__("Info:", 'tmomatic-ticketmaster-post-generator');?></b> <?php echo esc_html__("for translation, the plugin also supports WPML.", 'tmomatic-ticketmaster-post-generator');?> <b><a href="https://wpml.org/?aid=238195&affiliate_key=ix3LsFyq0xKz" target="_blank"><?php echo esc_html__("Get WPML now!", 'tmomatic-ticketmaster-post-generator');?></a></b> </div> </td> <td> <div> <select id="translate" name="tmomatic_Main_Settings[translate]" > <?php $i = 0; foreach ($language_names as $lang) { echo '<option value="' . esc_html($language_codes[$i]) . '"'; if ($translate == $language_codes[$i]) { echo ' selected'; } echo '>' . esc_html($language_names[$i]) . '</option>'; $i++; } ?> </select> </div> </td> </tr> <tr> <td> <div id="bestspin"> <p><?php echo esc_html__("Don't have an 'The Best Spinner' account yet? Click here to get one:", 'tmomatic-ticketmaster-post-generator');?> <b><a href="https://paykstrt.com/10313/38910" target="_blank"><?php echo esc_html__("get a new account now!", 'tmomatic-ticketmaster-post-generator');?></a></b></p> </div> <div id="wordai"> <p><?php echo esc_html__("Don't have an 'WordAI' account yet? Click here to get one:", 'tmomatic-ticketmaster-post-generator');?> <b><a href="https://wordai.com/?ref=h17f4" target="_blank"><?php echo esc_html__("get a new account now!", 'tmomatic-ticketmaster-post-generator');?></a></b></p> </div> <div id="spinrewriter"> <p><?php echo esc_html__("Don't have an 'SpinRewriter' account yet? Click here to get one:", 'tmomatic-ticketmaster-post-generator');?> <b><a href="https://www.spinrewriter.com/?ref=24b18" target="_blank"><?php echo esc_html__("get a new account now!", 'tmomatic-ticketmaster-post-generator');?></a></b></p> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to randomize text by changing words of a text with synonyms using one of the listed methods? Note that this is an experimental feature and can in some instances drastically increase the rule running time!", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Spin Text Using Word Synonyms (for automatically generated posts only):", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <select id="spin_text" name="tmomatic_Main_Settings[spin_text]" onchange="mainChanged()"> <option value="disabled" <?php if ($spin_text == 'disabled') { echo ' selected'; } ?> ><?php echo esc_html__("Disabled", 'tmomatic-ticketmaster-post-generator');?></option> <option value="wordai" <?php if($spin_text == 'wordai') { echo ' selected'; } ?> >Wordai - <?php echo esc_html__("High Quality - Paid", 'tmomatic-ticketmaster-post-generator');?></option> <option value="spinrewriter" <?php if($spin_text == 'spinrewriter') { echo ' selected'; } ?> >SpinRewriter - <?php echo esc_html__("High Quality - Paid", 'tmomatic-ticketmaster-post-generator');?></option> <option value="builtin" <?php if ($spin_text == 'builtin') { echo ' selected'; } ?> ><?php echo esc_html__("Built-in - Medium Quality - Free", 'tmomatic-ticketmaster-post-generator');?></option> </select> </div> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <div class="hideBest"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert your user name on premium spinner service.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Premium Spinner Service User Name/Email:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class="hideBest"> <input type="text" name="tmomatic_Main_Settings[best_user]" value="<?php echo esc_html($best_user); ?>" placeholder="<?php echo esc_html__("Please insert your premium text spinner service user name", 'tmomatic-ticketmaster-post-generator');?>"> </div> </td> </tr> <tr> <td> <div class="hideBest"> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert your password for the selected premium spinner service.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Premium Spinner Service Password/API Key:", 'tmomatic-ticketmaster-post-generator');?></b> </div> </td> <td> <div class="hideBest"> <input type="password" autocomplete="off" name="tmomatic_Main_Settings[best_password]" value="<?php echo esc_html($best_password); ?>" placeholder="<?php echo esc_html__("Please insert your premium text spinner service password", 'tmomatic-ticketmaster-post-generator');?>"> </div> </td> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr> <td> <h3><?php echo esc_html__("Random Sentence Generator Settings:", 'tmomatic-ticketmaster-post-generator');?></h3> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert some sentences from which you want to get one at random. You can also use variables defined below. %something ==> is a variable. Each sentence must be separated by a new line.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("First List of Possible Sentences (%%random_sentence%%):", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="8" cols="70" name="tmomatic_Main_Settings[sentence_list]" placeholder="<?php echo esc_html__("Please insert the first list of sentences", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($sentence_list); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert some sentences from which you want to get one at random. You can also use variables defined below. %something ==> is a variable. Each sentence must be separated by a new line.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Second List of Possible Sentences (%%random_sentence2%%):", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="8" cols="70" name="tmomatic_Main_Settings[sentence_list2]" placeholder="<?php echo esc_html__("Please insert the second list of sentences", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($sentence_list2); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert some variables you wish to be exchanged for different instances of one sentence. Please format this list as follows:<br/> Variablename => Variables (seperated by semicolon)<br/>Example:<br/>adjective => clever;interesting;smart;huge;astonishing;unbelievable;nice;adorable;beautiful;elegant;fancy;glamorous;magnificent;helpful;awesome<br/>", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("List of Possible Variables:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="8" cols="70" name="tmomatic_Main_Settings[variable_list]" placeholder="<?php echo esc_html__("Please insert the list of variables", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($variable_list); ?></textarea> </div></td> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr> <td> <h3><?php echo esc_html__("Custom HTML Code/ Ad Code:", 'tmomatic-ticketmaster-post-generator');?></h3> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert a custom HTML code that will replace the %%custom_html%% variable. This can be anything, even an Ad code.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Custom HTML Code #1:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="3" cols="70" name="tmomatic_Main_Settings[custom_html]" placeholder="<?php echo esc_html__("Custom HTML #1", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($custom_html); ?></textarea> </div> </td> </tr> <tr> <td> <div> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Insert a custom HTML code that will replace the %%custom_html2%% variable. This can be anything, even an Ad code.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> <b><?php echo esc_html__("Custom HTML Code #2:", 'tmomatic-ticketmaster-post-generator');?></b> </td> <td> <textarea rows="3" cols="70" name="tmomatic_Main_Settings[custom_html2]" placeholder="<?php echo esc_html__("Custom HTML #2", 'tmomatic-ticketmaster-post-generator');?>"><?php echo esc_textarea($custom_html2); ?></textarea> </div> </td> </tr> </table> <hr/> <h3><?php echo esc_html__("Affiliate Keyword Replacer Tool Settings:", 'tmomatic-ticketmaster-post-generator');?></h3> <div class="table-responsive"> <table class="responsive table cr_main_table"> <thead> <tr> <th> <?php echo esc_html__("ID", 'tmomatic-ticketmaster-post-generator');?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("This is the ID of the rule.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </th> <th class="cr_max_width_40"> <?php echo esc_html__("Del", 'tmomatic-ticketmaster-post-generator');?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Do you want to delete this rule?", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </th> <th> <?php echo esc_html__("Search Keyword", 'tmomatic-ticketmaster-post-generator');?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("This keyword will be replaced with a link you define.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </th> <th> <?php echo esc_html__("Replacement Keyword", 'tmomatic-ticketmaster-post-generator');?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("This keyword will replace the search keyword you define. Leave this field blank if you only want to add an URL to the specified keyword.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </th> <th> <?php echo esc_html__("Link to Add", 'tmomatic-ticketmaster-post-generator');?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help cr_align_middle"> <div class="bws_hidden_help_text cr_min_260px"> <?php echo esc_html__("Define the link you want to appear the defined keyword. Leave this field blank if you only want to replace the specified keyword without linking from it.", 'tmomatic-ticketmaster-post-generator'); ?> </div> </div> </th> </tr> <tr> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> </tr> </thead> <tbody> <?php echo tmomatic_expand_keyword_rules(); ?> <tr> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> <td> <hr/> </td> </tr> <tr> <td class="cr_short_td">-</td> <td class="cr_shrt_td2"><span class="cr_gray20">X</span></td> <td class="cr_rule_line"><input type="text" name="tmomatic_keyword_list[keyword][]" placeholder="<?php echo esc_html__("Please insert the keyword to be replaced", 'tmomatic-ticketmaster-post-generator');?>" value="" class="cr_width_100" /></td> <td class="cr_rule_line"><input type="text" name="tmomatic_keyword_list[replace][]" placeholder="<?php echo esc_html__("Please insert the keyword to replace the search keyword", 'tmomatic-ticketmaster-post-generator');?>" value="" class="cr_width_100" /></td> <td class="cr_rule_line"><input type="url" validator="url" name="tmomatic_keyword_list[link][]" placeholder="<?php echo esc_html__("Please insert the link to be added to the keyword", 'tmomatic-ticketmaster-post-generator');?>" value="" class="cr_width_100" /> </tr> </tbody> </table> </div> </td></tr> </table> </div> </div> </div> <hr/> <p> <?php echo esc_html__("Available shortcodes:", 'tmomatic-ticketmaster-post-generator');?> <strong>[tmomatic-list-posts]</strong> <?php echo esc_html__("to include a list that contains only posts imported by this plugin, and", 'tmomatic-ticketmaster-post-generator');?> <strong>[tmomatic-display-posts]</strong> <?php echo esc_html__("to include a WordPress like post listing. Usage:", 'tmomatic-ticketmaster-post-generator');?> [tmomatic-display-posts type='any/post/page/...' title_color='#ffffff' excerpt_color='#ffffff' read_more_text="Read More" link_to_source='yes' order='ASC/DESC' orderby='title/ID/author/name/date/rand/comment_count' title_font_size='19px', excerpt_font_size='19px' posts_per_page=number_of_posts_to_show category='posts_category' ruleid='ID_of_tmomatic_rule' ruletype='id_of_rule_type']. <br/><?php echo esc_html__("Example:", 'tmomatic-ticketmaster-post-generator');?> <b>[tmomatic-list-posts type='any' order='ASC' orderby='date' posts_per_page=50 category= '' ruleid='0' ruletype='0']</b> <br/><?php echo esc_html__("Example 2:", 'tmomatic-ticketmaster-post-generator');?> <b>[tmomatic-display-posts include_excerpt='true' image_size='thumbnail' wrapper='div']</b>. </p> <div><p class="crsubmit"><input type="submit" name="btnSubmit" id="btnSubmit" class="button button-primary" onclick="unsaved = false;" value="<?php echo esc_html__("Save Settings", 'tmomatic-ticketmaster-post-generator');?>"/></p></div> </form> </div> <?php } if (isset($_POST['tmomatic_keyword_list'])) { add_action('admin_init', 'tmomatic_save_keyword_rules'); } function tmomatic_save_keyword_rules($data2) { $data2 = $_POST['tmomatic_keyword_list']; $rules = array(); if (isset($data2['keyword'][0])) { for ($i = 0; $i < sizeof($data2['keyword']); ++$i) { if (isset($data2['keyword'][$i]) && $data2['keyword'][$i] != '') { $index = trim(sanitize_text_field($data2['keyword'][$i])); $rules[$index] = array( trim(sanitize_text_field($data2['link'][$i])), trim(sanitize_text_field($data2['replace'][$i])) ); } } } update_option('tmomatic_keyword_list', $rules); } function tmomatic_expand_keyword_rules() { $rules = get_option('tmomatic_keyword_list'); if(!is_array($rules)) { $rules = array(); } $output = ''; $cont = 0; if (!empty($rules)) { foreach ($rules as $request => $value) { $output .= '<tr> <td class="cr_short_td">' . esc_html($cont) . '</td> <td class="cr_shrt_td2"><span class="wptmomatic-delete">X</span></td> <td class="cr_rule_line"><input type="text" placeholder="' . esc_html__('Input the keyword to be replaced. This field is required', 'tmomatic-ticketmaster-post-generator') . '" name="tmomatic_keyword_list[keyword][]" value="' . esc_html(stripslashes($request)) . '" required class="cr_width_100"></td> <td class="cr_rule_line"><input type="text" placeholder="' . esc_html__('Input the replacement word', 'tmomatic-ticketmaster-post-generator') . '" name="tmomatic_keyword_list[replace][]" value="' . esc_html(stripslashes($value[1])) . '" class="cr_width_100"></td> <td class="cr_rule_line"><input type="url" validator="url" placeholder="' . esc_html__('Input the URL to be added', 'tmomatic-ticketmaster-post-generator') . '" name="tmomatic_keyword_list[link][]" value="' . esc_html(stripslashes($value[0])) . '" class="cr_width_100"></td> </tr>'; $cont++; } } return $output; } ?>
Save File
Cancel