When I create a new custom post type, it replaces the old post type

I have created a plugin that will create a custom post type. When I create a custom post type, it replace the old one.

*/ $ new_input = array();

class CustomPostComparison { /** * Holds the values to be used in the fields callbacks */ private $ options;

/**  * Start up  */ public function __construct() {     add_action( 'admin_menu', array( $  this, 'add_plugin_page' ) );     add_action( 'admin_init', array( $  this, 'page_init' ) );     add_action( 'init', array($  this, 'custom_post_type_register'));  } public function custom_post_type_register() {     $  cpts = get_option('my_option_name');     //print_r($  cpts);     //echo $  cpts['supports'];exit;     if( !empty( $  cpts ) ){                      $  labels = array(             'name'                  => _x( $  cpts['post_type'], 'Post Type General Name' ),             'singular_name'         => _x( $  cpts['singular_label'], 'Post Type Singular Name'),             'menu_name'             => $  cpts['menu_name'] ? $  cpts['menu_name'] : $  cpts['plural_label'],             'name_admin_bar'        => __( $  cpts['post_type'], 'text_domain' ),             'archives'              => __( $  cpts['archives'], 'text_domain' ),             'parent_item_colon'     => __( $  cpts['parent_item_colon'], 'text_domain' ),             'all_items'             => __( $  cpts['all_items'] ? $  cpts['all_items'] : "All ".$  cpts['plural_label'] ),             'add_new_item'          => __( $  cpts['add_new_item'], 'text_domain' ),             'add_new'               => _x( $  cpts['add_new'] ? $  cpts['add_new'] : 'Add New', strtolower( $  cpts['singular_label'] ) ),             'new_item'              => __( $  cpts['new_item'], 'text_domain' ),             'edit_item'             => __( $  cpts['edit_item'], 'text_domain' ),             'view_items'            => __( !empty( $  cpts['view_item'] ) ? $  cpts['view_item'] : "View ".$  cpts['singular_label'] ),             'search_items'          => __( $  cpts['search_items'], 'text_domain' ),             'not_found'             => __( $  cpts['not_found'], 'text_domain' ),             'not_found_in_trash'    => __( $  cpts['not_found_in_trash'], 'text_domain' ),             'featured_image'        => __( $  cpts['featured_image'], 'text_domain' ),             'set_featured_image'    => __( $  cpts['set_featured_image'], 'text_domain' ),             'remove_featured_image' => __( $  cpts['remove_featured_image'], 'text_domain' ),             'use_featured_image'    => __( $  cpts['use_featured_image'], 'text_domain' ),             'insert_into_item'      => __( $  cpts['insert_into_item'], 'text_domain' ),             'uploaded_to_this_item' => __( $  cpts['uploaded_to_this_item'], 'text_domain' ),             'items_list'            => __( $  cpts['items_list'], 'text_domain' ),             'items_list_navigation' => __( $  cpts['items_list_navigation'], 'text_domain' ),             'filter_items_list'     => __( $  cpts['filter_items_list'], 'text_domain' ),         );         $  args = array(             'label'                 => __( $  cpts['post_type'], 'text_domain' ),             'description'           => __( $  cpts['post_description'], 'text_domain' ),             'labels'                => $  labels,             'supports'              => array( 'title', 'editor' ),             'taxonomies'            => array( 'category', 'post_tag' ),             'hierarchical'          => $  cpts['hierarchical'] == 'false' ? false : true,             'public'                => $  cpts['public'] == 'false' ? false : true,             'show_ui'               => $  cpts['show_ui'] == 'false' ? false : true,             'show_in_menu'          => $  cpts['show_in_menu'] == 'false' ? false : true,             'menu_position'         => __( $  cpts['menu_position'], 'text_domain' ),             'has_archive'           => $  cpts['has_archive'] == 'false' ? false : true,             'capability_type'       => 'post',             'show_in_rest_api'      => !empty($  cpts['show_in_rest_api']) ? $  cpts['show_in_rest_api'] : false,         );         if ( post_type_exists( $  cpts['post_type'] ) ) {             echo 'The post type is already exist';         }         else{             register_post_type( $  cpts['post_type'],$  args);         }                  } }  /**  * Add options page  */ public function add_plugin_page() {     // This page will be under "Settings"     add_options_page(         'Settings Admin',          'Post Type Creater',          'manage_options',          'my-setting-admin',          array( $  this, 'create_admin_page' )     ); } /**  * Options page callback  */ public function create_admin_page() {     // Set class property     $  this->options = get_option( 'my_option_name' );     ?>     <div class="wrap">          <form method="post" action="options.php">             <?php settings_fields( 'my_option_group' ); ?>             <?php do_settings_sections( 'my_option_group' ); ?>             <table border="0" grid-column-gap: 100px>                 <tr>                     <th colspan="2">                         Custom Post Type Creater                     </th>                 </tr>                 <tr>                     <td>Post Type:</td>                     <td><input type="text" name="my_option_name[post_type]" id="custom_post_type" required="required"></td>                 </tr>                 <tr>                     <td>Description:</td>                     <td>                         <textarea name="my_option_name[post_description]" id="custom_post_desc"></textarea>                     </td>                 </tr>                 <tr>                     <td>Singular Label:</td>                     <td><input type="text" name="my_option_name[singular_label]" id="singular_label" required="required"></td>                 </tr>                 <tr>                     <td>Plural Label:</td>                     <td><input type="text" name="my_option_name[plural_label]" id="plural_label" required="required"></td>                 </tr>                 <tr>                     <td>Hierarchical:</td>                     <td>                         <select name="my_option_name[hierarchical]" id="hierarchical">                             <option value="false" selected="selected">false</option>                             <option value="true">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Has Archive:</td>                     <td>                         <select name="my_option_name[has_archive]" id="has_archive">                             <option value="false" >false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td valign="top">Supports:</td>                     <td>                         <input type="checkbox" name="my_option_name[supports]" id="supports_title" value="title" checked="checked">Title<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_editor" value="editor" checked="checked">Editor<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_author" value="author">Author<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_thumbnail" value="thumbnail">Thumbnail<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_excerpt" value="excerpt">Excerpt<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_trackbacks" value="trackbacks">Trackbacks<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_custom-fields" value="custom-fields">Custom-fields<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_comments" value="comments">Comments<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_revisions" value="revisions">Revisions<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_page-attributes" value="page-attributes">Page-attributes<br>                         <input type="checkbox" name="my_option_name[supports]" id="supports_post-formats" value="post-formats">Post-formats<br>                     </td>                 </tr>                 <tr>                     <td>Add New:</td>                     <td><input type="text" name="my_option_name[add_new]" id="add_new"></td>                 </tr>                 <tr>                     <td>Add New Item:</td>                     <td><input type="text" name="my_option_name[add_new_item]" id="add_new_item"></td>                 </tr>                 <tr>                     <td>Edit Item:</td>                     <td><input type="text" name="my_option_name[edit_item]" id="edit_item"></td>                 </tr>                            <tr>                     <td>New Item:</td>                     <td><input type="text" name="my_option_name[new_item]" id="new_item"></td>                 </tr>                 <tr>                     <td>All Items:</td>                     <td><input type="text" name="my_option_name[all_items]" id="all_items"></td>                 </tr>                 <tr>                     <td>View Items:</td>                     <td><input type="text" name="my_option_name[view_items]" id="view_items"></td>                 </tr>                 <tr>                     <td>Search Items:</td>                     <td><input type="text" name="my_option_name[search_items]" id="search_items"></td>                 </tr>                 <tr>                     <td>Not Found:</td>                     <td><input type="text" name="my_option_name[not_found]" id="not_found"></td>                 </tr>                 <tr>                     <td>Not Found In Trash:</td>                     <td><input type="text" name="my_option_name[not_found_in_trash]" id="not_found_in_trash"></td>                 </tr>                 <tr>                     <td>Parent Item Colon:</td>                     <td><input type="text" name="my_option_name[parent_item_colon]" id="parent_item_colon"></td>                 </tr>                 <tr>                     <td>Menu Name:</td>                     <td><input type="text" name="my_option_name[menu_name]" id="menu_name"></td>                 </tr>                 <tr>                     <td>Featured Image:</td>                     <td><input type="text" name="my_option_name[featured_image]" id="featured_image"></td>                 </tr>                 <tr>                     <td>Set Featured Image:</td>                     <td><input type="text" name="my_option_name[set_featured_image]" id="set_featured_image"></td>                 </tr>                 <tr>                     <td>Remove Featured Image:</td>                     <td><input type="text" name="my_option_name[remove_featured_image]" id="remove_featured_image"></td>                 </tr>                 <tr>                     <td>Use Featured Image:</td>                     <td><input type="text" name="my_option_name[use_featured_image]" id="use_featured_image"></td>                 </tr>                 <tr>                     <td>Archives:</td>                     <td><input type="text" name="my_option_name[archives]" id="archives"></td>                 </tr>                 <tr>                     <td>Insert Into Item:</td>                     <td><input type="text" name="my_option_name[insert_into_item]" id="insert_into_item"></td>                 </tr>                 <tr>                     <td>Uploaded to this Item:</td>                     <td><input type="text" name="my_option_name[uploaded_to_this_item]" id="uploaded_to_this_item"></td>                 </tr>                 <tr>                     <td>Filter Items List:</td>                     <td><input type="text" name="my_option_name[filter_items_list]" id="filter_items_list"></td>                 </tr>                 <tr>                     <td>Items List Navigation:</td>                     <td><input type="text" name="my_option_name[items_list_navigation]" id="items_list_navigation"></td>                 </tr>                 <tr>                     <td>Items List:</td>                     <td><input type="text" name="my_option_name[items_list]" id="items_list"></td>                 </tr>                 <tr>                     <td>Public:</td>                     <td>                         <select name="my_option_name[public]" id="public">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Show UI:</td>                     <td>                         <select name="my_option_name[show_ui]" id="show_ui">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Show In Nav Menus:</td>                     <td>                         <select name="my_option_name[show_in_nav_menus]" id="show_in_nav_menus">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Show In Menu:</td>                     <td>                         <select name="my_option_name[show_in_menu]" id="show_in_menu">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Menu Position:</td>                     <td><input type="text" name="my_option_name[menu_position]" id="menu_position"></td>                 </tr>                 <tr>                     <td>Menu Icon:</td>                     <td><input type="text" name="my_option_name[menu_icon]" id="menu_icon"></td>                 </tr>                 <tr>                     <td>Capability Type:</td>                     <td><input type="text" name="my_option_name[capability_type]" value="post" id="capability_type"></td>                 </tr>                 <tr>                     <td valign="top">Taxonomies:</td>                     <td>                         <input type="checkbox" name="my_option_name[taxonomies]" id="taxonomies_category" value="category">Category<br>                         <input type="checkbox" name="my_option_name[taxonomies]" id="taxonomies_post_tag" value="post_tag">Post_tag<br>                         <input type="checkbox" name="my_option_name[taxonomies]" id="taxonomies_product_cat" value="product_cat">Product_Cat<br>                         <input type="checkbox" name="my_option_name[taxonomies]" id="taxonomies_product_tag" value="product_tag">Product_tag<br>                         <input type="checkbox" name="my_option_name[taxonomies]" id="taxonomies_product_shipping_class" value="product_shipping_class">Product_Shipping_Class<br>                     </td>                 </tr>                 <tr>                     <td>Rewrite:</td>                     <td>                         <select name="my_option_name[rewrite]" id="rewrite">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>With Front:</td>                     <td>                         <select name="my_option_name[with_front]" id="with_front">                             <option value="false">false</option>                             <option value="true" selected="selected">true</option>                         </select>                     </td>                 </tr>                 <tr>                     <td>Rewrite Slug:</td>                     <td><input type="text" name="my_option_name[rewrite_slug]" id="rewrite_slug"></td>                 </tr>                 <tr>                     <td>Show In REST API:</td>                     <td>                         <select name="my_option_name[show_in_rest_api]" id="show_in_rest_api">                             <option value="false" selected="selected">false</option>                             <option value="true">true</option>                         </select>                     </td>                 </tr>                  <tr>                     <th colspan="2">                         <?php submit_button($  name = 'Submit'); ?>                     </th>                 </tr>             </table>         </form>     </div>     <?php } public function page_init() {             register_setting(         'my_option_group', // Option group         'my_option_name', // Option name         array( $  this, 'sanitize' ) // Sanitize     ); }  /**  * Sanitize each setting field as needed  *  * @param array $  input Contains all settings fields as array keys  */ public function sanitize( $  input ) {     $  new_input = array();     //echo $  input['post_type'];exit;     $  field = array('post_type', 'post_description','singular_label','plural_label','hierarchical','hierarchical','has_archive','supports','add_new','add_new_item','edit_item','new_item','all_items','view_items','search_items','not_found','not_found_in_trash','parent_item_colon','menu_name','featured_image','set_featured_image','remove_featured_image','use_featured_image','archives','insert_into_item','uploaded_to_this_item','filter_items_list','items_list_navigation','items_list','public','show_ui','show_in_nav_menus','show_in_menu','menu_position','menu_icon','capability_type','taxonomies','rewrite','with_front','rewrite_slug','show_in_rest_api');      foreach ($  field as $  value) {          if( isset( $  input[$  value] ) ){             $  new_input[$  value] = sanitize_text_field( $  input[$  value] );         }     }     return $  new_input;  } 

} $ my_settings_page = new CustomPostComparison();

Data Entry & Type Work for $10

We Provide Data Entry service and Content Writing service in reasonable Price and in time bound manner. We have a committed team of candidates to provide you complete service. We believe in client relations more than commercials. So a chance given to us will be first step to create long term relations

by: neerajvpuri
Created: —
Category: Data Entry
Viewed: 207

App is changing default application for specific file type

I’m trying to resolve a problem that, whenever I run Franz (https://meetfranz.com/), it changes the default application for .html files to Franz. I believe Franz is built based on electron.js so maybe it has something to do with that.

I’ve created a github issue (https://github.com/meetfranz/franz/issues/1447), however, the developers say they do not implement such a feature.

Is there anything else in the OS happening, that could lead to such a change?

I’m using Ubuntu 16.04 LTS.

Exception in thread “main” org.openqa.selenium.UnsupportedCommandException: User prompt of type promptUserAndPass is not supported

Exception in thread “main” org.openqa.selenium.UnsupportedCommandException: User prompt of type promptUserAndPass is not supported

driver.switchTo().alert().sendKeys(proxyLogin + Keys.TAB + proxyPass); driver.switchTo().alert().accept(); 

перестало работать в версии firefox 67,68 кто то может подсказать оптимальное решение? спасибо

“E: Malformed line 1 in source list /etc/apt/sources.list.d/lutris.list (type)” “E: The list of sources could not be read.” [duplicate]

This question already has an answer here:

  • How do I remove a malformed line from my sources.list? 9 answers

Today I tried to install Lutris by command(big mistake) and then it not worked,after this everytime I try to install someting or do a simple “sudo apt-get update” in terminal this message shows up to me, how can I solve this? Help me pls Im really really noob at this

What is different between obscure and password Field type in system.xml

is there any difference between a password and obscure field type in system.xml

<field id="secret" type="obscure" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">                     <label>Secret</label>                     <validate>required-entry</validate>                     <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>                 </field>                 <field id="passswordsecret" type="password" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">                     <label>Secret Password</label>                 </field> 

I can do any type of data entry for you. for $5

Hi, My expertice is for Formatting/Editing/Redesigning of Document resulting in professional nice, Error-free, Eye catching and Reader-friendly Document for you Following are included in my service. Convert Pdf to Word or Word to PdfRedesign your PdfEdit your PdfConvert image to Word TextCreate Ms Word Document or Edit or Format your DocumentCreate Non-Editable File’s My Skills Ms Word Ms Excel Pdf To Word Conversion Typing Document Recreating With Same Formatting why you offer me. I will offer you fast and accurate service.Unlimited revisionsFast response have a good day Manish

by: Manish24panchal
Created: —
Category: Data Entry
Viewed: 278

If you want any type of data entry then I am here ✓Data Entry Server✓ for $18

Data entry is that occupation that requires writing speed having presence of mind . My objective is accurate and fast keying skills and sound knowledge of computer applications. I have the strong desire to work with satisfaction in my service .Sound knowledge of data base managemenet tools and data entry technologies. I believe in both hard work and perform well .

by: madhe
Created: —
Category: Data Entry
Viewed: 336