k-builder.php */ if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) { // Strip out the size part of an image URL. $url = \preg_replace( '/(.*)-\d+x\d+\.(jpeg|jpg|png|gif)$/', '$1.$2', $url ); $indexable = $this->indexable_repository->find_by_permalink( $url ); if ( $indexable && $indexable->object_type === 'post' && $indexable->object_sub_type === 'attachment' ) { return $indexable->object_id; } $post_id = WPSEO_Image_Utils::get_attachment_by_url( $url ); if ( $post_id !== 0 ) { // Find the indexable, this triggers creating it so it can be found next time. $this->indexable_repository->find_by_id_and_type( $post_id, 'post' ); } return $post_id; } if ( ! $use_link_table ) { return WPSEO_Image_Utils::get_attachment_by_url( $url ); } $cache_key = 'attachment_seo_link_object_' . \md5( $url ); $found = false; $link = \wp_cache_get( $cache_key, 'yoast-seo-attachment-link', false, $found ); if ( $found === false ) { $link = $this->seo_links_repository->find_one_by_url( $url ); \wp_cache_set( $cache_key, $link, 'yoast-seo-attachment-link', \MINUTE_IN_SECONDS ); } if ( ! \is_a( $link, SEO_Links::class ) ) { return WPSEO_Image_Utils::get_attachment_by_url( $url ); } return $link->target_post_id; } /** * Retrieves an attachment ID for an image uploaded in the settings. * * Due to self::get_attachment_by_url returning 0 instead of false. * 0 is also a possibility when no ID is available. * * @codeCoverageIgnore - We have to write test when this method contains own code. * * @param string $setting The setting the image is stored in. * * @return int|bool The attachment id, or false or 0 if no ID is available. */ public function get_attachment_id_from_settings( $setting ) { return WPSEO_Image_Utils::get_attachment_id_from_settings( $setting ); } /** * Based on and image ID return array with the best variation of that image. If it's not saved to the DB, save it * to an option. * * @param string $setting The setting name. Should be company or person. * * @return array|bool Array with image details when the image is found, boolean when it's not found. */ public function get_attachment_meta_from_settings( $setting ) { $image_meta = $this->options_helper->get( $setting . '_meta', false ); if ( ! $image_meta ) { $image_id = $this->options_helper->get( $setting . '_id', false ); if ( $image_id ) { // There is not an option to put a URL in an image field in the settings anymore, only to upload it through the media manager. // This means an attachment always exists, so doing this is only needed once. $image_meta = $this->get_best_attachment_variation( $image_id ); if ( $image_meta ) { $this->options_helper->set( $setting . '_meta', $image_meta ); } } } return $image_meta; } /** * Retrieves the first usable content image for a post. * * @codeCoverageIgnore - We have to write test when this method contains own code. * * @param int $post_id The post id to extract the images from. * * @return string|null */ protected function get_first_usable_content_image_for_post( $post_id ) { return WPSEO_Image_Utils::get_first_usable_content_image_for_post( $post_id ); } /** * Gets the term's first usable content image. Null if none is available. * * @codeCoverageIgnore - We have to write test when this method contains own code. * * @param int $term_id The term id. * * @return string|null The image URL. */ protected function get_first_content_image_for_term( $term_id ) { return WPSEO_Image_Utils::get_first_content_image_for_term( $term_id ); } } Governor Johnson Sakaja Archives - Kenya Newspost
  • Tue. Feb 11th, 2025

Governor Johnson Sakaja

  • Home
  • Sakaja Unveils Enhanced Clean-Up and Beautification Plans for Nairobi

Sakaja Unveils Enhanced Clean-Up and Beautification Plans for Nairobi

Governor Johnson Sakaja has intensified efforts to transform Nairobi through enhanced clean-up, beautification, and infrastructure improvement initiatives. In a meeting at Charter Hall, City Hall, with sub-county and ward administrators,…

Sakaja to Close Illegal Termini in Upper Savannah Ward

Nairobi Members of the County Assembly from the transport committee have begun an investigation into illegal public service vehicle termini in Upper Savannah Ward. The City legislators want Governor Johnson…

Speaker Ken Ng’ondi Under Scrutiny over Delayed Report on County Revenue Collection Inquiry

Nairobi lawyer is now demanding the Nairobi County Assembly ad-hoc to table the report on investigation of revenue collection by the Nairobi County Government. According to a letter addressed to…

Governor Sakaja Assures Developers Conducive Environment Real Estate Growth

By Reporter Nairobi Governor, Sakaja Johnson has committed to work closely with the Kenya Private Developers Association (KPDA) to ensure discipline and adherence to a more conducive environment for real estate development…

Focus on service delivery, Sakaja tells newly appointed Chief Officers

The Nairobi City County Governor H.E Johnson Sakaja emphasized on the importance to focus on service delivery as he ushered in six newly appointed County Chief Officers in Nairobi. Governor…

Nairobi MCAs Task Sakaja’s Administration to Settle Staffs’ Disputes

By City Hall Reporter Nairobi members of county assembly have called on Governor Johnson Sakaja to take charge of his administration and clean the misunderstandings among staffs disrupting delivery of…

Exposed: How Nairobi County Planning Officers Collect Bribes on Illegal Construction Sites

By Our Reporter Fresh details of how Nairobi City County officers from the lands and planning sector siphoning money from illegal construction sites have emerged exposing the rot in the…

Shock as Armed Police Officers are Supervising Construction of Illegal Building in Parklands

By Athman Ibrahim Residents and owners of residential houses along Taza Lane, off City Park Drive, Parklands, are shocked and dismayed with fully armed Administration Police officers who started supervising…

Eastleigh residents praise demolition as Governor Sakaja moves to repossess health center grabbed by Airbase MCA Fuad Hussein

Residents of Eastleigh in Nairobi have praised the demolition of a building that had been illegally erected at a grabbed hospital parcel of land as Nairobi Governor Johnson Sakaja’s government…

Nairobi County MCAs Pass Motion to Establish Broadcast Services

Nairobi City Members of County Assembly have today sailed through a motion which seeks to establish a county owned broadcast unit to disseminate information regarding the devolved government. Moving the…