Called automatically (after the end of the class) to register hooks and add the actions and filters.
void
bootstrap
()
Gets the Shashin Admin CSS file, for inclusion on the widget management page and the Shashin admin pages.
void
getAdminHeadTags
()
Performs the requested admin action, based on the value of $_REQUEST['shashin_action'] values.
void
getAdminMenu
()
Wrapper for ShashinAlbum->getAlbumMarkup()
string
getAlbum
(int $album_key, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null])
-
int
$album_key: (required): a Shashin album_key (not the Picasa album ID)
-
string
$location_yn: (optional): y or n to show the location of the image, with a link to Google Maps.
-
string
$pubdate_yn: (optional): y or n to show the pub date of the album
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
Wrapper for ShashinAlbum->getAlbumListMarkup()
string
getAlbumList
(string $album_key, [string $info_yn = null], [boolean $force_picasa = true])
-
string
$album_key: (required): Shashin album keys (not the Picasa album ID), or a column name to order by
-
string
$info_yn: (optional): y or n to show the album location, pub date, and number of pictures.
-
boolean
$force_picasa: (optional): force the album link to point to Picasa (default: true)
Wrapper for ShashinAlbum->getAlbumThumbsMarkup()
string
getAlbumThumbs
(string $album_key, int $max_cols, [string $location_yn = null], [string $pubdate_yn = null], [string $float = null], [string $clear = null], [boolean $force_picasa = true])
-
string
$album_key: (required): Shashin album keys (not the Picasa album ID), or a column name to order by
-
int
$max_cols: (required): how many columns the table will have
-
string
$location_yn: (optional): y or n to show the location of the image, with a link to Google Maps.
-
string
$pubdate_yn: (optional): y or n to show the pub date of the album
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
-
boolean
$force_picasa: (optional): force the album link to point to Picasa (default: true)
Gets the Shashin CSS file, and the optional Highslide CSS and JS, for inclusion in the document head. Will get a copy of shashin.css from your theme directory if you put a custom one there.
void
getHeadTags
()
Wrapper for ShashinPhoto::getNewestMarkup()
string
getNewest
(int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
-
int
$album_key: (required): a Shashin album_key (not the Picasa album ID)
-
int
$max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
-
int
$max_cols: (required): how many columns the table will have
-
int
$how_many: (required): how many random pictures to show
-
string
$caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
Generates and echoes the HTML for the Shashin settings menu and sets Shashin options in WordPress.
void
getOptionsMenu
()
Wrapper for ShashinPhoto::getRandomMarkup()
string
getRandom
(int $album_key, int $max_size, int $max_cols, int $how_many, [string $caption_yn = null], [string $float = null], [string $clear = null])
-
int
$album_key: (required): a Shashin album_key (not the Picasa album ID) or "any" for pictures from any album
-
int
$max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
-
int
$max_cols: (required): how many columns the table will have
-
int
$how_many: (required): how many random pictures to show
-
string
$caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
Wrapper for ShashinPhoto->getPhotoMarkup()
string
getSingle
(int $photo_key, int $max_size, [string $caption_yn = null], [string $float = null], [string $clear = null])
-
int
$photo_key: (required): the Shashin photo_key (not the Picasa image ID)
-
int
$max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
-
string
$caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
Wrapper for ShashinPhoto::getThumbsMarkup()
string
getThumbs
(string $photo_key, int $max_size, int $max_cols, [string $caption_yn = null], [string $float = null], [string $clear = null], int $how_many)
-
string
$photo_key: (required): Shashin photo keys, pipe delimited (not the Picasa image IDs)
-
int
$max_size: (required): the desired max dimension. Note Picasa allows only certain sizes.
-
int
$max_cols: (required): how many columns the table will have
-
int
$how_many: (required): how many columns the table will have
-
string
$caption_yn: (optional): y or n to show the image description as a caption (defaults to n)
-
string
$float: (optional): a css float value (left, right, or none) (no default)
-
string
$clear: (optional): a css clear value (left, right, or both) (no default)
Adds the Shashin management and option pages.
void
initAdminMenus
()
Updates Shashin options and creates the Shashin tables if they don't already exist.
void
install
()
Replaces Shashin tags in posts and pages with XHTML displaying the requested images.
Supported Shashin tags:
- [simage=photo_key,max_size,caption_yn,float,clear]
- [srandom=album_key1|album_key2|etc,max_size,max_cols,how_many,caption_yn,float,clear]
- DEPRECATED - [salbum=album_key,location_yn,pubdate_yn,float,clear]
- [sthumbs=photo_key1|photo_key2|etc,max_size,max_cols,caption_yn,float,clear]
- [snewest=album_key1|album_key2|etc,max_size,max_cols,how_many,caption_yn,float,clear]
- [salbumthumbs=album_key1|album_key2|etc,max_cols,location_yn,pubdate_yn,float,clear]
- [salbumphotos=album_key,max_size,max_cols,caption_yn,description_yn,order_by,float,clear]
- [salbumlist=album_key1|album_key2|etc,info_yn]
For srandom and snewest tags, you can use the word "any" instead of an album key to get photos from any album. For salbum, salbumthumbs, and salbumlist, note that the thumbnail size is fixed by Picasa at 160x160. For salbumthumbs and salbumlist, if you want to view all the albums, you can substitute a column name to order by for the keys.
void
parseContent
(string $content)
-
string
$content: The content of the page or post
Updates all albums once per day.
void
scheduledUpdate
()
Deletes the Shashin tables and Shashin option setttings. This is irrevocable!
boolean
uninstall
()
Removes the hook for scheduled album syncing.
void
unscheduleUpdate
()
array_walk callback method for htmlentities()
void
_htmlentities
( &$string, mixed $key, string $string)
-
string
$string: (required): the string to update
-
mixed
$key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
-
&$string
array_walk callback method for strtolower()
void
_strtolower
( &$string, mixed $key, string $string)
-
string
$string: (required): the string to update
-
mixed
$key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
-
&$string
array_walk callback method for trim()
void
_trim
( &$string, mixed $key, string $string)
-
string
$string: (required): the string to update
-
mixed
$key: (ignored): the array key of the string (not needed but passed automatically by array_walk)
-
&$string