Skip to content

Instantly share code, notes, and snippets.

@marcosfreitas
Last active October 19, 2015 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosfreitas/3615d527eeac6888c9f3 to your computer and use it in GitHub Desktop.
Save marcosfreitas/3615d527eeac6888c9f3 to your computer and use it in GitHub Desktop.
<?php
(..)
$attached_media = get_attached_media( $this->supported_types, $this->post_id );
foreach ($attached_media as $key => $value) {
$attachment_url = $attached_media[$key]->guid;
}
(...)
#solução: .htaccess dentro da pasta criada pelo plugin
# Se não foi requerido um arquivo vazio (-s)
RewriteCond %{REQUEST_FILENAME} !-s [OR]
# Se não foi requerido um link simbólico (-l)
RewriteCond %{REQUEST_FILENAME} !-l [OR]
# ou um diretório (-d)
RewriteCond %{REQUEST_FILENAME} !-d
Options -Indexes
#deny from all
<FilesMatch "[0-9a-f]{32}(\.xml)">
Allow from all
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment