@since 2.9.9

@param $slug

@return array|false
437312
private function get_upgrade_notice( $slug ) {
		$notice = $this->apply_filters( 'pre_get_update_notice', false, $slug );
		if ( is_array( $notice ) ) {
			return $notice;
		}

		foreach (
			[
				'get_config_readme_url',
				'get_readme_url_from_update_info_url',
				'get_trunk_readme_url',
			] as $method
		) {
			$response = wp_safe_remote_get( $this->$method( $slug ) );
			if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) ) {
				return $this->parse_update_notice( $response['body'] );
			}
		}

		return false;
	}
300096
function checkSlugInCategories($slug){
        $repet=true;
        $counter=1;
        $newSlug=$slug;

        while ($repet)
        {
            if(Categories::where('slug',$newSlug)->where('model_type',$this->type)->first())
            {
                $newSlug=$slug.'-'.$counter;
                $counter++;
            }
            else
                $repet=false;
        }

        return $newSlug;
    }
299582
public function show($slug)
    {
        return collect($this->metrics->snapshotsForJob($slug))->map(function ($record) {
            $record->runtime = round($record->runtime / 1000, 3);
            $record->throughput = (int) $record->throughput;

            return $record;
        });
    }
133523
public function doesSlugAlreadyExist($slug)
    {
        $rowCount = DB::table($this->model->table)
            ->where('slug',  $slug)
            ->count();

        if ($rowCount > 0) return $rowCount;
        return 0;
    }
234825
public function getValuelistBySlug($slug)
    {
        $valuelists = $this->repository->valuelists;
        foreach ($valuelists as $valuelist) {
            if ($valuelist->slug == $slug) {
                return $valuelist;
            }
        }

        return null;
    }
917243
public function checkIfSlugIsUnique($slug)
    {
        $i = 0;
        $this->base_slug = $slug;

        while ($this->post->whereSlug($slug)->get()->count() > 0) {
            $i++;
            $slug = "$this->base_slug-$i";
        }

        return $slug;
    }
208738
public static function getBySlug($slug)
    {
        $slug_parts = explode("-", $slug, 2);
        $class = get_called_class();
        $temp_this = new $class();
        $primary_key = $temp_this->getIDField();
        return self::search()->where($primary_key, $slug_parts[0])->execOne();
    }
695957
protected function get_plugin_info( $slug ) {

		$args = (object) [ 'slug' => $slug ];

		$request = [
			'action'  => 'plugin_information',
			'timeout' => 15,
			'request' => serialize( $args ),
		];

		$url = Plugin::WP_Plugin_Info()->getOption( 'url', 'wp-api' );

		$resp = wp_remote_post( $url, [ 'body' => $request ] );

		$resp = isset( $resp['body'] ) ? unserialize( $resp['body'] ) : [];

		unset( $resp->sections, $resp->versions, $resp->screenshots );

		return (array) $resp;
	}
795269
public function delete($slug)
    {
        if(is_object($slug) && $slug instanceof ModelObject)
            $slug = $slug->Slug;

        $this->Events->trigger(get_class($this).'.delete.pre', $this, $slug);
        $this->Events->trigger('AbstractSystemXMLDAO.delete.pre', $this, $slug);

        $this->loadSource();

        if(isset($this->objectsBySlug[$slug]))
        {
            $obj = $this->objectsBySlug[$slug];

            unset($this->objectsBySlug[$slug]);
            unset($this->slugsByID[$obj->AspectID]);

            $pKey = array_search($slug, $this->slugsByPluginID[$obj->PluginID]);
            unset($this->slugsByPluginID[$pKey]);

        }

        $this->persistSource();

        $this->Events->trigger(get_class($this).'.delete.post', $this, $slug);
        $this->Events->trigger('AbstractSystemXMLDAO.delete.post', $this, $slug);

        return true;
    }
176870
public function getUserBySlug($slug)
    {
        $return = array();

        $users = $this->repository->users;
        foreach ($users as $user) {
            if ($user->slug == $slug) {
                $return = $user;
                break;
            }
        }

        return $return;
    }
404565
public
    function index($slug)
    {

        $page = Model::getBySlug($slug);

        if (!$page)
            return response()->view("Jlib::errors.404")->setStatusCode(404);

        return response()->make($page);


    }
666720
public function getBySlug($slug)
    {
        if (empty($slug))
            throw new Exception("Cannot retrieve object [".get_class($this->getModel())."] without slug");

        $results = $this->multiGetBySlug((array)$slug);
        if (isset($results[$slug]))
            return $results[$slug];

        throw new Exception(get_class($this->getModel()).' not found for slug: '.$slug);

    }
819907
public function getLogCollection($slug)
    {
        foreach ($this->logCollections as $logCollection) {
            if ($logCollection->getSlug() == $slug) {
                return $logCollection;
            }
        }
    }
713847
public function getExistingSlugs($slug)
    {
        return self::select('slug')->where('slug', 'like', $slug.'%')
            ->when($this->id, function ($query) {
                return $query->where('id', '<>', $this->id);
            })
            ->get();
    }
898396
public static function load(string $slug)
    {
        $instance = new static();

        $instance->route = [];
        $instance->route['slug'] = $slug;
        $instance->route['groups'] = collect([]);

        return $instance;
    }
1079349
public static function decodeSlug($slug){
		$hashids = static::getHashids();

		$decoded = $hashids->decode($slug);

		if(! isset($decoded[0])){
			return null;
		}

		return (int) $decoded[0];
	}
545377
public function isRole($slug)
    {
        $slug = Str::lower($slug);

        foreach ($this->roles as $role) {
            if ($role->slug == $slug) {
                return true;
            }
        }

        return false;
    }