_info_arr = explode(',', $post_info); $post_id = $post_info_arr[0]; $post_link = $post_info_arr[1]; $post_link = str_replace(array('http://','https://'), '', $post_link); $post_link = trim( $post_link, '/' ); $slug = ''; $slug = get_post_field( 'post_name', $post_id ); if( $condition_status == 'enable_on_selected' ){ if( $slug && in_array($slug, explode('/', $current_page_url)) || $post_link && $post_link == $current_page_url ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif( $slug && in_array($slug, explode('/', $current_page_url)) || $post_link && $post_link == $current_page_url ){ $remove_plugins[] = $plugin; } } } } if($uri_type == 'page_post_cpt'){ $post_types = !empty($individual_options['post_types']) ? $individual_options['post_types'] : []; $page_list_merged = array(); foreach( $post_types as $post_type ){ $post_type_key_plural = $post_type. 's'; $page_list_merged = isset($individual_options[$post_type_key_plural]) ? array_merge($page_list_merged, $individual_options[$post_type_key_plural] ) : $page_list_merged; } $current_page = get_page_by_path( basename($page_path),'OBJECT',get_option('htpm_available_post_types') ); if(in_array( "all_{$current_page->post_type}s,all_{$current_page->post_type}s", $page_list_merged) && in_array($current_page->post_type, $post_types)) { switch ($condition_status) { case 'enable_on_selected': $key = array_search ( $plugin, $remove_plugins ); if ($key) unset ($remove_plugins[$key]); break; default: $remove_plugins[] = $plugin; break; } } else { foreach($page_list_merged as $post_info){ $post_info_arr = explode(',', $post_info); $post_id = $post_info_arr[0]; $post_link = $post_info_arr[1]; $post_link = str_replace(array('http://','https://'), '', $post_link); $post_link = trim( $post_link, '/' ); $slug = ''; $slug = get_post_field( 'post_name', $post_id ); if( $condition_status == 'enable_on_selected' ){ if( $slug && in_array($slug, explode('/', $current_page_url)) || $post_link && $post_link == $current_page_url ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif( ( $slug && in_array($slug, explode('/', $current_page_url)) ) || ( $post_link && $post_link == $current_page_url ) ){ $remove_plugins[] = $plugin; } } } } if( $uri_type == 'custom' ){ $condition_list = array( 'name' => array(), 'value' => array() ); $condition_list = $individual_options['condition_list'] ? $individual_options['condition_list'] : array( 'name' => array(), 'value' => array() ); $individual_condition_list = array(); for( $i = 0; $i < count($condition_list['name']); $i++ ){ $individual_condition_list[] = $condition_list['name'][$i] . ',' . $condition_list['value'][$i]; } foreach($individual_condition_list as $item){ $item = explode(',', $item); $name = $item[0]; $value = trim($item[1], '/'); if($name == 'uri_equals'){ if( $condition_status == 'enable_on_selected' ){ if( $current_page_slug == $value ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif( $current_page_slug == $value ){ $remove_plugins[] = $plugin; } } if($name == 'uri_not_equals'){ if( $condition_status == 'enable_on_selected' ){ if( $value && $current_page_slug != $value ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif($value && $current_page_slug != $value){ $remove_plugins[] = $plugin; } } if($name == 'uri_contains'){ if( $condition_status == 'enable_on_selected' ){ if( $value && strpos( $current_page_url, $value ) !== false ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif($value && strpos( $current_page_url, $value ) !== false){ $remove_plugins[] = $plugin; } } if($name == 'uri_not_contains'){ if( $condition_status == 'enable_on_selected' ){ if( $value && strpos( $current_page_url, $value ) === false ){ $plkey = array_search( $plugin, $remove_plugins ); if( $plkey ){ unset( $remove_plugins[ $plkey ] ); } break; }else{ // Remove from elementor editor if( htpmpro_is_elementor_editor() ){ $remove_plugins[$plugin] = $plugin; } elseif( !isset( $_REQUEST['elementor-preview'] ) ){ $remove_plugins[$plugin] = $plugin; } } } elseif($value && strpos( $current_page_url, $value ) === false){ $remove_plugins[] = $plugin; } } } } } } } // Debug mode. if( !empty($_GET['htpm_debug']) ){ echo '
';
		var_dump(array(
			'plugin_settings' => $htpmpro_options,
			'removed_plugins' => $remove_plugins,
		));
		echo '
'; die(); } $plugins = array_diff( $plugins, $remove_plugins ); return $plugins; } /* * Detect Device */ function htpmpro_detect_device(){ $deviceName=""; $userAgent = $_SERVER["HTTP_USER_AGENT"]; $devicesTypes = array( "desktop" => array( "msie 10", "msie 9", "msie 8", "windows.*firefox", "windows.*chrome", "x11.*chrome", "x11.*firefox", "macintosh.*chrome", "macintosh.*firefox", "opera" ), "tablet" => array( "tablet", "android", "ipad", "tablet.*firefox" ), "mobile" => array( "mobile ", "android.*mobile", "iphone", "ipod", "opera mobi", "opera mini", "blackberry" ), "bot" => array( "googlebot", "mediapartners-google", "adsbot-google", "duckduckbot", "msnbot", "bingbot", "ask", "facebook", "yahoo", "addthis" ) ); foreach($devicesTypes as $deviceType => $devices) { foreach($devices as $device) { if( preg_match( "/" . $device . "/i", $userAgent ) ) { $deviceName = $deviceType; } } } return $deviceName; } function htpmpro_is_elementor_editor(){ $server = wp_unslash( $_SERVER ); $referer = !empty($server['HTTP_REFERER']) ? $server['HTTP_REFERER'] : ''; $request_uri = !empty($server['REQUEST_URI']) ? $server['REQUEST_URI'] : ''; parse_str($referer, $query_str_arr); parse_str($request_uri, $request_uri_arr); if( !empty($query_str_arr['action']) && $query_str_arr['action'] == 'elementor' || !empty($request_uri_arr['action']) && $request_uri_arr['action'] == 'elementor' ){ return true; } return false; } /** * Check if the current request is from an admin page or a WP JSON request. * * @return bool */ function htpmpro_is_admin(){ $htpmpro_request_uri = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); $is_wp_json_request = (bool) strpos( $_SERVER['REQUEST_URI'], 'wp-json/' ) >= 1; // Fix gutenberg editor issue. if( is_admin() || strpos( $htpmpro_request_uri, '/wp-admin/' ) || $is_wp_json_request ){ return true; } return false; } Genomics - News, Articles, Whitepapers - Page 12 of 61 - Drug Target Review

List view / Grid view

Genomics

 

Genomics is the branch of molecular biology concerned with the structure, function, evolution, and mapping of genomes.