shared->settings = get_option( 'age_okay_settings', array() ); $this->shared->settings = array_merge( $this->shared->settings, get_option( 'age_okay_settings_all', array() ) ); if ( empty( $this->shared->settings['enabled'] ) ) { $this->shared->settings['enabled'] = false; } // create empty arrays if empty to stop in_array errors if ( empty( $this->shared->settings['only_types'] ) ) { $this->shared->settings['only_types'] = array(); } if ( empty( $this->shared->settings['only_pid'] ) ) { $this->shared->settings['only_pid'] = array(); } if ( empty( $this->shared->settings['except_types'] ) ) { $this->shared->settings['except_types'] = array(); } if ( empty( $this->shared->settings['except_pid'] ) ) { $this->shared->settings['except_pid'] = array(); } // get all public post types foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $object ) { if ( $object->name != 'attachment' ) { $post_types[$object->name] = $object->label; } } ?>