Repository navigation
test
- Arlima_AbstractListRenderingManager (abstract)
- Arlima_AbstractRepositoryDB (abstract)
- Arlima_Article
- Arlima_ArticleFormat
- Arlima_CacheInterface (interface)
- Arlima_CacheManager
- Arlima_CMSFacade
- Arlima_CMSInterface (interface)
- Arlima_CMSLoop
- Arlima_ExportManager
- Arlima_FileInclude
- Arlima_ImportManager
- Arlima_List
- Arlima_ListBuilder
- Arlima_ListFactory
- Arlima_ListRepository
- Arlima_ListTemplateRenderer
- Arlima_ListVersionRepository
- Arlima_Plugin
- Arlima_PostSearchModifier
- Arlima_SimpleListRenderer
- Arlima_TemplateEngine
- Arlima_TemplateEngineInterface (interface)
- Arlima_TemplateObjectCreator
- Arlima_TemplatePathResolver
- Arlima_Utils
- Arlima_WP_AbstractAdminPage (abstract)
- Arlima_WP_Ajax
- Arlima_WP_Cache
- Arlima_WP_Facade
- Arlima_WP_ImageVersionManager
- Arlima_WP_Page_Edit
- Arlima_WP_Page_Main
- Arlima_WP_Page_Settings
- Arlima_WP_Plugin
- Arlima_WP_Widget
- Arlima_WPLoop
###
DEPRECATED Abstract class extended by classes responsible of rendering an Arlima article list
| Visibility | Function |
|---|---|
| public |
__construct(\Arlima_List/\stdClass $list) : void Class constructor |
| protected |
extractSectionArticles(\Arlima_Article[] $articles, string/int $section) : array Extract articles that's located in the section that's meant to be rendered |
| protected | abstract generateArticleHtml(\Arlima_Article $article, int $index, object $post) : mixed |
| protected |
abstract generateListHtml(bool $output=true) : string Render the list of articles |
| public | getArticlesToRender() : \Arlima_Article[] |
| public static | getCurrentSectionDivider() : bool/\Arlima_Article |
| protected | getFutureArticleContent(\Arlima_Article $article, mixed $index, mixed $post) : mixed |
| public | getLimit() : int |
| public | getList() : \Arlima_List |
| public | getOffset() : int |
| public | getSection() : bool/int/string |
| public |
havePosts() : bool Do we have a list? Does the list have articles? |
| protected | includeArticleFile(\Arlima_Article $article) : string |
| protected | renderArticle(\Arlima_Article $article, int $index) : array (index, html_content) |
| public | renderList(bool $output=true) : string |
| public |
setLimit(int $limit) : void Set to -1 to not limit the number of articles that will be rendered |
| public | setList(\Arlima_List $list) : void |
| public | setOffset(int $offset) : void |
| public |
setSection(int/bool/string $section) : void - Set to false if you want to render entire list (default) - Set to a string if you want to render the section with given name - Set to a number if you want to render the section at given index - Set to eg. >=2 if you want to render all articles, starting from the second section |
| protected | setup(\Arlima_Article $article) : mixed |
### Class: Arlima_AbstractRepositoryDB (abstract) | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $sys=null, mixed $cache=null) : void | | public | abstract createDatabaseTables() : void | | protected | dbTable(string $type=`''`) : string | | public | getCMSFacade() : [\Arlima_CMSInterface](#interface-arlima_cmsinterface) | | public | abstract getDatabaseTables() : array | | protected | removePrefix(array $array=array(), string $prefix, bool $preserve_std_objects=false) : array
Remove prefix from array keys, will also turn stdClass objects to arrays unless $preserve_std_objects is set to true | | public | setCacheManager([\Arlima_CacheManager](#class-arlima_cachemanager) $cache_instance) : void | | public | abstract updateDatabaseTables(\float $currently_installed_version) : void |
### Class: Arlima_Article
Object representing an (read-only) Arlima article
| Visibility | Function |
|---|---|
| public | __construct(array $data) : void |
| public | addChild(array $article_data) : void |
| public |
canBeRendered() : bool Whether or not the article should be rendered. It should not be rendered in case the article is missing both title and content or the article is scheduled to be displayed at another time or if it's not yet published |
| public | getChildArticles() : \Arlima_Article[] |
| public |
getContent() : string Get the body content of the article |
| public |
getCreationTime() : int Get an unix timestamp (in seconds) of when the article was created |
| public | getId() : int |
| public | getImageAlignment() : mixed |
| public |
getImageId() : int/string Get id of possibly connected image. Will return empty string if no images is attached to the article |
| public | getImageSize() : mixed |
| public | getImageURL() : mixed |
| public |
getParentIndex() : int Will return -1 if the article does'nt have a parent article (see ischild()) |
| public |
getPostId() : int Get id of possibly connected post |
| public |
getPublishTime() : int Get an unix timestamp (in seconds) of when the article is considered to be published |
| public |
getSize() : int Get "size" of the article. This is normally used as font-size of the article title when the article gets rendered |
| public |
getTitle(string $linebreak_replace=' ', bool $entity_encode=true) : stringGet title of the article. Set parameter $linebreak_replace to a br-tag if you want to convert a double-underscore to a linebreak |
| public |
getURL() : string Get the URL of the article which is either the URL of the post connected to the article or the value of the option "overridingURL". This function will return an empty string if the article does'nt have a URL |
| public |
hasChildren() : bool Tells whether or not the article is a parent of other articles (see getChildArticles()) |
| public | hasImage() : bool |
| public | hasPost() : bool |
| public | hasStreamer() : bool |
| public | isChild() : bool |
| public |
isEmpty() : bool The article is considered "empty" if it's missing title, content and image |
| protected |
isInScheduledInterval(string $schedule_interval) : bool Will try to parse a schedule-interval-formatted string and determine if we're currently in the time interval |
| public | isPublished() : bool |
| public | isScheduled() : bool |
| public |
opt(string $opt, bool/mixed $default=false) : string Get an article option, will return the value of $default if the option does'nt exist |
| public |
toArray() : array Get all data of the article as an array |
This class implements \ArrayAccess, \Countable
### Class: Arlima_ArticleFormat
Class that manages information about article formats
| Visibility | Function |
|---|---|
| public static |
add(string $class, string $label, array $templates=array(), string $ui_color='') : void
|
| public static | getAll() : array |
| public static | remove(string $class, array $templates=array()) : void |
### Interface: Arlima_CacheInterface
Interface for a class that can cache arbitrary data
| Visibility | Function |
|---|---|
| public | abstract delete(string $key) : bool |
| public | abstract get(string $key) : bool/mixed |
| public | abstract set(mixed $key, mixed $val, int $expires) : void |
### Class: Arlima_CacheManager
Wrapper for wp_cache functions.
| Visibility | Function |
|---|---|
| public static | loadInstance() : \Arlima_CacheInterface |
### Class: Arlima_CMSFacade
Facade in front of underlying system (WordPress)
| Visibility | Function |
|---|---|
| public static |
load(mixed $in=null, bool $class=false) : \Arlima_CMSInterface Load facade in front of underlying system |
### Interface: Arlima_CMSInterface
Facade in front of underlying system (WordPress)
| Visibility | Function |
|---|---|
| public | abstract applyFilters() : void |
| public | abstract currentVisitorCanEdit() : void |
| public | abstract dbDelta(mixed $sql) : void |
| public | abstract dbEscape(mixed $input) : string |
| public | abstract doAction() : void |
| public |
abstract flushCaches() : mixed Flush all caches affecting arlima |
| public | abstract generateImageVersion(mixed $url, mixed $dimension, mixed $img_id) : void |
| public | abstract getArlimaArticleImageFromPost(mixed $id) : mixed |
| public | abstract getBaseURL() : mixed |
| public | abstract getContentOfPostInGlobalScope() : mixed |
| public | abstract getDBPrefix() : mixed |
| public | abstract getDefaultListAttributes() : mixed |
| public |
abstract getExcerpt(mixed $post_id, mixed $excerpt_length=35, string $allowed_tags='') : mixed
|
| public | abstract getFileURL(mixed $file) : mixed |
| public | abstract getImageData(mixed $img_id) : mixed |
| public | abstract getImageURL(mixed $img_id) : mixed |
| public | abstract getImportedLists() : mixed |
| public | abstract getPageEditURL(mixed $page_id) : mixed |
| public | abstract getPageIdBySlug(mixed $slug) : mixed |
| public |
abstract getPostIDInLoop() : mixed Get ID of the current post in |
| public | abstract getPostInGlobalScope() : mixed |
| public | abstract getPostTimeStamp(mixed $p) : mixed |
| public | abstract getPostURL(mixed $post_id) : mixed |
| public | abstract getQueriedPageId() : mixed |
| public | abstract getRelationData(mixed $post_id) : mixed |
| public | abstract havePostsInLoop() : mixed |
| public | abstract humanTimeDiff(mixed $time) : void |
| public | abstract initLocalization() : void |
| public | abstract isPreloaded(mixed $id) : bool |
| public | abstract loadExternalURL(mixed $url) : mixed |
| public | abstract loadRelatedPages(mixed $list) : mixed |
| public | abstract loadRelatedWidgets(mixed $list) : mixed |
| public | abstract postToArlimaArticle(int/object $post, mixed/null/string $text=null) : \Arlima_Article |
| public | abstract preLoadPosts(mixed $post_ids) : void |
| public | abstract prepare(mixed $sql, mixed $params) : void |
| public |
abstract prepareForPostLoop(\Arlima_List $list) : mixed Do the preparations necessary before iterating over a set of posts. This function should be called when Arlima imitates an iteration over posts that the underlying system normally does. |
| public | abstract relate(mixed $list, mixed $post_id, mixed $attr) : void |
| public | abstract removeAllRelations(mixed $list) : void |
| public | abstract removeImportedList(mixed $url) : void |
| public | abstract removeRelation(mixed $post_id) : void |
| public |
abstract resetAfterPostLoop() : void Function that should be called after messing with the internal globals used by the system |
| public |
abstract runSQLQuery(string $sql) : mixed Calls a method on DB and throws Exception if db error occurs |
| public |
abstract sanitizeText(string $txt, string/mixed $allowed='') : stringSanitize text from CMS specific tags/code |
| public | abstract saveImportedLists(mixed $lists) : void |
| public | abstract scheduleEvent(mixed $schedule_time, mixed $event, mixed $args) : void |
| public | abstract setPostInGlobalScope(mixed $id) : mixed |
### Class: Arlima_CMSLoop
Class that makes it possible to use Arlima_ListTemplateRenderer on ordinary article list iterations done by the underlying CMS
| Visibility | Function |
|---|---|
| public | __construct(mixed/string $template_path=null) : void |
| public static | defaultHeaderCallback(int $article_counter, \Arlima_Article $article, \stdClass $post, \Arlima_List $list) : mixed |
| protected | extractTemplateData(mixed $post, int $article_counter) : array |
| public | generateListHtml(bool $output=true) : string |
| public | getExcludePosts() : array |
| public | havePosts() : bool |
| public | setDefaultArticleProperties(mixed $arr) : void |
| public | setExcludePosts(array $exclude_posts) : void |
| public | setHeaderCallback(\Closure $callback) : void |
This class extends \Arlima_ListTemplateRenderer
### Class: Arlima_ExportManager
Class that is responsible of exporting Arlima lists related to wordpress pages.
| Visibility | Function |
|---|---|
| public | __construct(array $avail_for_export=array()) : void |
| public | convertList(\Arlima_List $list, string $format) : string |
| public |
export(string $page_slug, string $format) : void This function provides a small read-only RESTful API. It sends out appropriate response headers depending on the request being made. It support two response content types, RSS and JSON. |
| public | getListsAvailableForExport() : array |
| public | isAvailableForExport(\Arlima_List/int $list) : bool |
### Class: Arlima_FileInclude
Class that can include php files in article lists
| Visibility | Function |
|---|---|
| public static | currentFileArgs() : array/bool |
| public | getFileArgs(string $file) : array |
| public | includeFile(string $file, array $args, \Arlima_AbstractListRenderingManager/null $renderer=null, \Arlima_Article/null $article=null) : string |
| public static | isCollectingArgs() : bool |
| public static | setCollectedArgs(array $args) : void |
### Class: Arlima_ImportManager
Class that can import lists in JSON or RSS format from a remote server, and turn them into Arlima_List objects.
| Visibility | Function |
|---|---|
| public | __construct() : void |
| public static |
displayImportedList(string $url, string $name) : void Helper function that displays info and remove button for an imported list |
| public | getImportedLists() : array |
| public |
importList(string $url, bool $refresh=true) : array containing 'title' and 'url' This function is used to register an external list as an imported list, if you only want to fetch content from an external list use Arlima_ImportManager::loadList() |
| public |
loadList(string $url) : \Arlima_List Load a Arlima list or RSS feed from a remote website and convert to Arlima list object |
| public | serverResponseToArlimaList(mixed $response, string $url) : \Arlima_List |
### Class: Arlima_List
Object representing an article list.
| Visibility | Function |
|---|---|
| public | __construct(bool $exists=false, int $id, bool $is_imported=false) : void |
| public |
addOptions(array $new_options) : array Merge in new options |
| public static | builder() : \Arlima_ListBuilder |
| public |
containsPost(int $post_id) : bool Tells whether or not this list contains one or more articles connected to the post with given id |
| public |
exists() : bool Tells whether or not this arlima list exists in the database |
| public | getArticles() : \Arlima_Article[] |
| public |
getContainingPosts() : array Returns a list with id numbers of the posts that has a connection to one or more articles in this list |
| public | getCreated() : int |
| public | getId() : int |
| public | getMaxlength() : int |
| public | getOption(mixed $name) : string/null |
| public | getOptions() : array |
| public | getPublishedVersions() : array |
| public | getScheduledVersions() : array |
| public | getSlug() : string |
| public | getStatus() : int |
| public | getTitle() : string |
| public |
getTitleElement() : string Will return the HTMl element used as header for articles in this list. If something other then a valid header element is used this function will return an empty string |
| public |
getVersion() : array Returns information about this version of the list |
| public | getVersionAttribute(string $name) : string |
| public |
getVersions() : array A list with the latest created versions of this list |
| public | hasOption(string $name) : bool |
| public | id() : int |
| public |
isImported() : bool Tells whether or not this arlima list is loaded from a remote host |
| public | isLatestPublishedVersion() : bool |
| public |
isPreview() : bool Tells whether or not the list contains a preview version |
| public | isPublished() : bool |
| public |
isScheduled() : bool Tells whether or not the list contains a scheduled version |
| public |
isSupportingEditorTemplateSwitch() : bool Whether or not editors is allowed to switch template on specific articles in the list |
| public |
isSupportingSections() : bool Whether or not admins can create "sections" in the list |
| public |
lastModified() : int Get the modification date (timestamp) when this version of the list was created |
| public | numArticles() : int |
| public | setArticles(array $articles) : void |
| public | setCreated(int $created) : void |
| public | setId(int $id) : void |
| public | setMaxlength(int $maxlength) : void |
| public | setOption(string $name, string $val) : void |
| public |
setOptions(array $options) : void Set options for the list |
| public | setPublishedVersions(array $versions) : void |
| public | setScheduledVersions(array $scheduled_versions) : void |
| public | setSlug(string $slug) : void |
| public | setTitle(string $title) : void |
| public | setVersion(array $version_data) : void |
| public | setVersions(array $versions) : void |
| public | toArray() : array |
### Class: Arlima_ListBuilder
Class that can put together list objects following a set of instructions. See https://github.com/victorjonsson/Arlima/wiki/Server-side,-in-depth
| Visibility | Function |
|---|---|
| public | __construct(mixed/null/\Arlima_ListRepository $list_repo=null, mixed/null/\Arlima_ListVersionRepository $version_repo=null) : void |
| protected | assembleExternalList() : \Arlima_List |
| protected | assembleList() : \Arlima_List |
| public |
build() : \Arlima_List This function will always return a List object even if it might not exists, thus you should call $list->exists() on returned list to verify that the list actually do exist |
| public | fromPage(int $page_id) : \Arlima_ListBuilder |
| public | id(int $in) : \Arlima_ListBuilder |
| public |
import(string/bool $in) : \Arlima_ListBuilder URL of external RSS-feed or Arlima list export (set to false to not import anything) |
| public | includeFutureArticles(bool $toggle=true) : \Arlima_ListBuilder |
| public | loadPreview(bool $toggle=true) : \Arlima_ListBuilder |
| public | saveImportedList(bool $toggle=true) : \Arlima_ListBuilder |
| public | slug(string $in) : \Arlima_ListBuilder |
| public |
version(int/bool $in) : \Arlima_ListBuilder Omit calling this function or set $in to false to load the latest published version of the list |
### Class: Arlima_ListFactory
Class with all the know-how about creation of article lists and how the data is stored in the database. All direct use of wpdb in the Arlima plugin should be placed in this class, at least as long as the database communication is about getting data related to article lists.
| Visibility | Function |
|---|---|
| public | __construct(\wpdb $db=null, mixed/null $cache=null) : void |
| public static |
createArticleDataArray(array $override=array()) : array/\Arlima_Article The article data is in fact created with javascript in front-end so you can't see this function as the sole creator of article objects. For that reason it might be good to take look at this function once in a while, making sure it generates a similar object as generated with javascript in front-end. |
| public |
createList(mixed $title, mixed $slug, array $options=array(), mixed/int $max_length=50) : \Arlima_List Creates a new article list |
| public static | databaseUpdates(mixed $version) : void |
| public | deleteList(\Arlima_List $list) : void |
| public | deleteListVersion(mixed $version_id) : void |
| public |
getLatestArticle(mixed $post_id) : array Get latest article teaser created that is related to given post |
| public | getListId(mixed $slug) : int/bool |
| public |
install() : void Database installer for this plugin. |
| public |
loadLatestPreview(int $id) : \Arlima_List Load latest preview version of article list with given id. |
| public |
loadList(int/string $id, bool/mixed $version=false, bool $include_future_posts=false) : \Arlima_List Future posts will always be included in the list if you're loading a specific version of the list. Otherwise you can use the argument $include_future_posts to control if the list should contain future posts as well. Setting $include_future_posts to true will how ever disable the caching of the article data |
| public |
loadListSlugs() : array will return an array looking like array( stdClass(id => ... title => ... slug => ...) ) |
| public |
loadListsByArticleId(mixed $post_id) : array Loads an array with objects containing list id and options that have teasers that are linked to the post with $post_id |
| public static |
postToArlimaArticle(mixed $post, mixed/string/null $text=null, array $override=array()) : array Takes a post and returns an Arlima article object |
| public | saveNewListVersion(\Arlima_List $list, mixed $articles, mixed $user_id, int $schedule_time, bool $preview=false) : int |
| public |
uninstall() : void Removes the database tables created when plugin was installed |
| public | updateArticle(int $id, array $data) : void |
| public |
updateArticlePublishDate(\stdClass/\WP_Post $post) : void Updates publish date for all arlima articles related to given post and clears the cache of the lists where they appear |
| public |
updateListProperties(\Arlima_List $list) : void Will update name, slug and options of given list in the database |
| public | updateListVersion(\Arlima_List $list, array $articles, int $version_id) : void |
### Class: Arlima_ListRepository
Repository that is used to perform CRUD-operation on list objects
| Visibility | Function |
|---|---|
| public |
create(mixed $title, mixed $slug, array $options=array(), mixed/int $max_length=50) : \Arlima_List Create a new list |
| public | createDatabaseTables() : void |
| public |
delete(\Arlima_List $list) : void Remove a list from the database |
| public | getDatabaseTables() : array |
| public | getListId(mixed $slug) : int/bool |
| public | load(int/string $id_or_slug) : \Arlima_List |
| public |
loadListSlugs() : array Will return an array with info (slug, id and title) about all the lists in the database array( stdClass(id => ... title => ... slug => ...), ... ) |
| public |
update(\Arlima_List $list) : void Update a list in the database |
| public | updateDatabaseTables(\float $currently_installed_version) : void |
This class extends \Arlima_AbstractRepositoryDB
### Class: Arlima_ListTemplateRenderer
Class that can render an Arlima article list using a template engine. The class uses templates available in the path given on construct, if template not found it falls back on templates available in this plugin directory (arlima/templates)
| Visibility | Function |
|---|---|
| public |
__construct(\Arlima_List/\stdClass $list, mixed/string $template_path=null) : void Class constructor |
| protected | generateArticleHtml(\Arlima_Article $article, int $index, mixed $post) : array |
| protected |
generateListHtml(bool $output=true) : string Will render all articles in the arlima list using templates. The template to be used is an option in the article list object (Arlima_List). If no template exists in declared template paths we will fall back on default templates (plugins/arlima/template/[name].tmpl) |
| protected | getTemplateToUse(\Arlima_Article $article) : null/string |
This class extends \Arlima_AbstractListRenderingManager
### Class: Arlima_ListVersionRepository
Repository that is used to perform CRUD-operation on list versions
| Visibility | Function |
|---|---|
| public |
addArticles(\Arlima_List $list, bool/int/bool $version=false, bool $include_future_articles=false) : array Add articles and current version to given list object |
| public |
addPreviewArticles(\Arlima_List $list) : void Add articles and version of latest preview version to given list object |
| public |
addVersionHistory(\Arlima_List $list) : array Add version history data to list and return an array with all published versions |
| public |
clear(int $version_id) : void Removes all articles in a version. |
| public | create(\Arlima_List $list, array $articles, mixed $user_id, bool $preview=false) : int |
| public static |
createArticle(array $override=array()) : \Arlima_Article The article data is in fact created with javascript in front-end so you can't see this function as the sole creator of article objects. For that reason it might be good to take look at this function once in a while, making sure it generates a similar object as generated with javascript in front-end. |
| public | createDatabaseTables() : void |
| public | createScheduledVersion(\Arlima_List $list, array $articles, int $user_id, int $schedule_time) : int |
| public |
delete(int $version_id) : void Calls clear() internally |
| public | deleteListVersions(\Arlima_List $list) : void |
| public |
findListsByPostId(int $post_id) : array Loads an array with objects containing list id and options that have teasers that are connected to the post with $post_id |
| public | getDatabaseTables() : array |
| public |
getLatestArticle(mixed $post_id) : array Get latest article teaser created that is related to given post |
| public |
loadListVersions(\Arlima_List/int $list) : array Get an array with all versions that a list has |
| protected |
toArray(array/\Arlima_Article[] $articles) : mixed Convert from articles from objects to arrays and update possibly changed published date of articles |
| public |
update(\Arlima_List $list, array $articles, int $version_id) : void Change the article collection belonging to a list version |
| public | updateArticle(int $id, array $data) : void |
| public |
updateArticlePublishDate(mixed $time, mixed $post_id) : void Updates publish date for all arlima articles related to given post and clears the cache of the lists where they appear |
| public | updateDatabaseTables(\float $currently_installed_version) : void |
| public | versionBelongsToList(\Arlima_List $list, int $version_id) : bool |
This class extends \Arlima_AbstractRepositoryDB
### Class: Arlima_Plugin
Utility class for the Arlima plugin.
| Visibility | Function |
|---|---|
| public | __construct() : void |
This class extends \Arlima_WP_Plugin
### Class: Arlima_PostSearchModifier
Class working as a container from where you can get or set rules that modifies a search form using WP_Query. (Maybe this class should reside within the WP namespace...)
| Visibility | Function |
|---|---|
| public static | filterWPQuery(mixed $args, mixed $post_data) : mixed |
| public static | invokeFormCallbacks() : array |
| public static | modifySearch(mixed $form_callback, mixed $query_callback) : void |
### Class: Arlima_SimpleListRenderer
The most simple type of list renderer
| Visibility | Function |
|---|---|
| public | __construct(\Arlima_List $list, bool $echo=true) : void |
| public static | defaultPostDisplayCallback(int $article_counter, \Arlima_Article $article, \WP_Post/bool $post, \Arlima_AbstractListRenderingManager $renderer, bool $echo) : string |
| protected | generateArticleHtml(\Arlima_Article $article, int $index, null/\stdClass/\WP_Post $post) : mixed |
| public | generateListHtml(bool $output=true) : string |
| public | setDisplayArticleCallback(\Closure $func) : void |
This class extends \Arlima_AbstractListRenderingManager
### Class: Arlima_TemplateEngine
Facade in front of the template engine (mustasche) used by Arlima.
| Visibility | Function |
|---|---|
| protected | __construct(\Arlima_TemplatePathResolver $tmpl_path_resolver, \Arlima_TemplateObjectCreator $obj_creator, \Mustache_Engine $mustache) : void |
| public static |
create(\Arlima_List $list, mixed/null/string $template_path=null) : \Arlima_TemplateEngineInterface Factory method for creating instances of the template engine |
| protected |
loadTemplateObject(string $template_name) : \Mustache_Template Load template that should be used for given article. |
| public |
renderArticle(string $template_name, int $article_counter, \Arlima_Article $article, object $post, string $child_articles='', bool $child_split_state=false) : string
|
| public |
setDefaultTemplate(mixed $tmpl_name) : bool Set which template that should be used as default. Will return false if given template can't be found |
This class implements \Arlima_TemplateEngineInterface
### Interface: Arlima_TemplateEngineInterface
Interface for classes that can render Arlima_Article objects
| Visibility | Function |
|---|---|
| public |
abstract renderArticle(string $template_name, int $article_counter, \Arlima_Article $article, object/mixed $post, string $child_articles='', bool $child_split_state=false) : string
|
| public |
abstract setDefaultTemplate(string $tmpl_name) : bool Set which template that should be used as default. Will return false if given template can't be found |
### Class: Arlima_TemplateObjectCreator
Class with all the knowledge about how to convert a typical arlima article array to an object used when the TemplateEngine constructs the articles view (template)
| Visibility | Function |
|---|---|
| public | __construct() : void |
| public static |
applyImageFilters(mixed $article, mixed $article_counter, mixed $post, mixed $list, bool $is_child_split=false) : string Deprecated since 3.0.beta.37 |
| public | create(\Arlima_Article $article, mixed $post, mixed $article_counter, mixed/null $template_name=null) : array |
| protected | generateImageData(\Arlima_Article $article, mixed $article_counter, mixed $data, mixed $img_opt_size, mixed $post) : void |
| protected | generateStreamerData(mixed $has_streamer, mixed $data, \Arlima_Article $article) : void |
| public | getChildSplitState() : null/array |
| public static | getFilterSuffix() : string |
| public | getIsChild() : bool/string |
| public | getList() : \Arlima_List |
| public | setAfterTitleHtml(string $after_title_html) : void |
| public static | setArticleWidth(int $width) : void |
| public | setBeforeTitleHtml(string $after_title_html) : void |
| public | setChildSplitState(null/array $split_state) : void |
| public static | setFilterSuffix(string $s) : void |
| public | setIsChild(bool/string $is_child) : void |
| public | setList(\Arlima_List $list) : void |
### Class: Arlima_TemplatePathResolver
Class with all the know how about template paths
| Visibility | Function |
|---|---|
| public | __construct(mixed/array $paths=null, bool $apply_path_filter=true) : void |
| public |
fileToUrl(string $template_file) : string Takes a file path to somewhere inside wp-content and turns it into an url. |
| public |
find(string $template_name) : bool/string Find the path of a template file with given name |
| public | getDefaultTemplate() : string |
| public |
getPaths() : array Returns all registered template paths |
| public |
getTemplateFiles() : array Returns all files having the extension .tmpl located in registered template paths |
| public static | isTemplateFile(string $path) : bool |
### Class: Arlima_Utils
General functions
| Visibility | Function |
|---|---|
| public static | getTitleHtml(\Arlima_Article $article, array $options, array $header_classes=array()) : string |
| public static |
linkWrap(\Arlima_Article $article, string $content, array $classes=array()) : string Wrap given content with an a-element linking to the URL of the article |
| public static |
resolveURL(\Arlima_Article $article) : null/string As of 3.1 the article is an object that has this method implemented |
| public static |
shorten(mixed $text, mixed/int $num_words=24, string $allowed_tags='') : stringShortens any text to number of words. |
| public static |
timeStamp() : int Get unix timestamp |
| public static | versionNumberToFloat(string $num) : \float |
| public static | warnAboutDeprecation(string $func, string $new) : void |
### Class: Arlima_WP_AbstractAdminPage (abstract)
Base class extended by classes representing admin pages in wordpress. Using this class reduces the amount of code that needs to be written when wanting to have several admin pages in a plugin. It also reduces code duplication that often appears when having several admin pages in one plugin.
| Visibility | Function |
|---|---|
| public | __construct(\Arlima_WP_Plugin $arlima_plugin) : void |
| public |
capability() : string User capability needed to visit this page |
| public |
enqueueScripts() : void Enqueue's the scripts returned by Arlima_AbstractAdminPage::scripts() |
| public |
enqueueStyles() : void Enqueue's the stylesheets returned by Arlima_AbstractAdminPage::styleSheets() |
| public |
abstract getMenuName() : mixed Menu name of this plugin |
| public |
abstract getName() : mixed Name of this page |
| public | getPlugin() : \Arlima_WP_Plugin |
| public |
icon() : string Only used when parentSlug() returns empty string |
| public |
loadPage() : mixed Loads the view of this page |
| public static | outputLessJS() : void |
| public |
abstract parentSlug() : string Menu slug of parent page. Return empty string to set as parent page |
| public |
registerPage() : void Registers the page and enqueue's the js and css in case this page is being visited. |
| protected | requestedAdminPage() : string/bool |
| public | scripts() : array |
| public | setPlugin(mixed $plugin) : void |
| public |
abstract slug() : string slug used for this admin page |
| public | styleSheets() : array |
### Class: Arlima_WP_Ajax
Class that has all wp ajax functions used by this plugin. Important that you don't use closures or any other php features that isn't available in php 5.2 in this file
| Visibility | Function |
|---|---|
| public | __construct(\Arlima_WP_Plugin $arlima_plugin) : void |
| public |
checkForLaterVersion() : void Checks if there is a later version of the list that's about to be saved |
| public |
connectAttachmentToPost() : void Connect wordpress attachment to post |
| public |
deleteListVersion() : void Deletes a list version |
| public |
duplicateImage() : void Make copy of an wordpress attachment |
| protected | getArticlesFromRequest() : array/mixed |
| public |
getAttachedImages() : mixed Get post attachments |
| public |
getListSetup() : mixed Get the list setup for currently logged in user |
| public |
getPost() : mixed Get wordpress posts in json format |
| public | getScissors() : mixed |
| public |
importList() : void Import an external arlima list or RSS feed |
| public |
initActions() : void Setup all ajax functions |
| protected | listToJSON(\Arlima_List $list, string $preview_url, int $preview_width) : mixed/string/void |
| public |
loadListData() : mixed Fetches an arlima list and outputs it in widget form |
| public |
prependArticle() : void Prepend an article to the top of a list |
| public |
printCustomTemplates() : void Get arlima templates |
| public |
queryPosts() : void Search for posts |
| public |
removeImageVersions() : void Removes all arlima image versions (nothing will happen if WP version < 3.5) |
| public |
saveExternalImage() : void Side load an external image and attach it to post |
| public | saveImage() : void |
| public | saveJsLog() : void |
| public |
saveList() : void Save a new version of a list |
| public |
saveListSetup() : void Saves the user setup (lists to load on startup and their position and size) |
| public | updateArticle() : void |
| public |
updateListVersion() : void Update a specific version of a list |
### Class: Arlima_WP_Cache
Wrapper for wp_cache functions.
| Visibility | Function |
|---|---|
| public | delete(string $key) : bool |
| public | get(string $key) : bool/mixed |
| public | set(mixed $key, mixed $val, int $expires) : void |
This class implements \Arlima_CacheInterface
### Class: Arlima_WP_Facade | Visibility | Function | |:-----------|:---------| | public | __construct(mixed/null $wpdb=null) : void | | public | applyFilters() : void | | public | currentVisitorCanEdit() : void | | public | dbDelta(mixed $sql) : void | | public | dbEscape(mixed $input) : void | | public | doAction() : void | | public | flushCaches() : void | | public | generateImageVersion(string $url, array $dimension, int $img_id) : string | | public | getArlimaArticleImageFromPost(mixed $id) : mixed | | public | getBaseURL() : mixed | | public | getContentOfPostInGlobalScope() : mixed | | public | getDBPrefix() : mixed | | public | getDefaultListAttributes() : array | | public | getExcerpt(mixed $post_id, mixed $excerpt_length=35, string $allowed_tags=`''`) : mixed | | public | getFileURL(mixed $file) : mixed | | public | getImageData(mixed $img_id) : mixed | | public | getImageURL(mixed $img_id) : mixed | | public | getImportedLists() : mixed | | public | getPageEditURL(mixed $page_id) : mixed | | public | getPageIdBySlug(mixed $slug) : mixed | | public | getPostIDInLoop() : mixed | | public | getPostInGlobalScope() : mixed | | public | getPostTimeStamp(mixed $p) : mixed | | public | getPostURL(mixed $id) : mixed | | public | getQueriedPageId() : mixed | | public | getRelationData(int $post_id) : array/bool
Returns false if not relation is made | | public | havePostsInLoop() : bool | | public | humanTimeDiff(mixed $time) : void | | public | initLocalization() : void | | public | isPreloaded(mixed $id) : bool | | public | loadExternalURL(mixed $url) : mixed | | public | loadRelatedPages([\Arlima_List](#class-arlima_list) $list) : \stdClass[] | | public | loadRelatedWidgets([\Arlima_List](#class-arlima_list) $list) : array
Returns an array with info about widgets that's related to the list | | public | postToArlimaArticle(int/object $post, array $override=array()) : [\Arlima_Article](#class-arlima_article) | | public | preLoadPosts(mixed $post_ids) : void | | public | prepare(mixed $sql, mixed $params) : void | | public | prepareForPostLoop(mixed $list) : void | | public | relate([\Arlima_List](#class-arlima_list) $list, mixed $post_id, mixed $attr) : void | | public | removeAllRelations(mixed $list) : void
Remove all relations for given list | | public | removeImportedList(mixed $url) : void | | public | removeRelation(int $post_id) : void | | public | resetAfterPostLoop() : void | | public | runSQLQuery(mixed $sql) : void | | public | sanitizeText(mixed $txt, string $allowed=`''`) : void | | public | saveImportedLists(mixed $lists) : void | | public | scheduleEvent(mixed $schedule_time, mixed $event, mixed $args) : void | | public | setPostInGlobalScope(mixed $post) : void |
This class implements \Arlima_CMSInterface
### Class: Arlima_WP_ImageVersionManager
Class that creates image versions (of any size) on the fly.
| Visibility | Function |
|---|---|
| public | __construct(int $id, mixed/\Arlima_WP_Plugin/int $plugin_or_img_quality=100) : void |
| public | getVersionFile(int $max_width) : array With relative file path and timestamp when first image version was created |
| public |
getVersionURL(int $max_width) : string Generates a new version |
| public |
getVersions(mixed/array/null $meta=null, bool $as_url=false) : array Get paths to all generated arlima version |
| public static |
registerFilters() : void Removes all generated versions when attachments gets deleted |
| public static |
removeVersions(mixed/int $attach_id=null) : void Removes all image versions created for given attachment |
### Class: Arlima_WP_Page_Edit | Visibility | Function | |:-----------|:---------| | public | addFormValidation() : void | | public | capability() : void | | public | enqueueScripts() : void | | public | getMenuName() : mixed | | public | getName() : mixed | | public | parentSlug() : void | | public | scripts() : void | | public | slug() : void | | public | styleSheets() : void |
This class extends \Arlima_WP_AbstractAdminPage
### Class: Arlima_WP_Page_Main | Visibility | Function | |:-----------|:---------| | public | addTemplateLoadingJS() : void
Will output javascript that loads all jQuery templates from backend | | public | echoFormatColorStyleTag() : void | | public | enqueueScripts() : void | | public | enqueueStyles() : void | | public | getMenuName() : mixed | | public | getName() : mixed | | public | icon() : void | | public | mceButtons1(mixed $buttons) : mixed | | public | mceButtons2(mixed $buttons) : mixed | | public | mcePlugin(mixed $plugin_array) : mixed | | public | parentSlug() : void | | public | scripts() : void | | public | slug() : void | | public | styleSheets() : void |
This class extends \Arlima_WP_AbstractAdminPage
### Class: Arlima_WP_Page_Settings | Visibility | Function | |:-----------|:---------| | public | capability() : void | | public | getMenuName() : mixed | | public | getName() : mixed | | public | parentSlug() : void | | public | scripts() : void | | public | slug() : void | | public | styleSheets() : void |
This class extends \Arlima_WP_AbstractAdminPage
### Class: Arlima_WP_Plugin
Utility class for the Arlima plugin.
| Visibility | Function |
|---|---|
| public | __construct(mixed $sys=null) : void |
| public | addAdminJavascriptVars(mixed $handle) : void |
| public |
addAttachmentMetaBox() : void Adds attachment meta box |
| public |
addExportFeeds() : void Adds arlima export feed to Wordpress |
| public |
addMetaBox() : void Adds meta box to post edit/create page |
| public |
addTemplateCSS() : void Will enqueue the css for the presentation of articles in an arlima list. There is two ways to add the template CSS. Old way: return URL to css file in filter arlima_template_css. The css file will be added to the header in arlima admin New way: return array with URL´s to stylesheets that will be added to iframe in arlima admin |
| public | adminBar() : void |
| public |
adminInitHook() : void Function called on init in wp-admin |
| public |
adminMenu() : void Creates the menu in wp-admin for this plugin |
| public |
arlimaListShortCode(array $attr) : string Short code for arlima |
| public |
attachmentMetaBox() : void Outputs HTML content of arlima versions meta box |
| public static |
classLoader(string $class) : void Class loader that either tries to load the class from arlima class directory or template engine directory |
| public |
commonInitHook() : void Init hook taking place in both wp-admin and theme |
| public static |
deactivate() : void Deactivation procedure for this plugin - Removes feed from wp_rewrite |
| public | displayArlimaList(mixed $content) : void |
| public | getSetting(string $name, bool $default=false) : mixed |
| public static |
getTemplateCSS() : string Get the path to the CSS file that controls the presentation of articles in an arlima list |
| public | getTemplateStylesheets() : array |
| public | init() : void |
| public |
initAdminActions() : void Actions added in wp-admin |
| public |
initThemeActions() : void Actions added in the theme |
| public static |
install() : void Install procedure for this plugin - Adds database tables - Adds version number in db - Adds arlima export feed and flushed wp_rewrite - Adds initial settings |
| public static |
isScissorsInstalled() : bool Tells whether or not the plugin ScissorsContinued is installed |
| public |
loadExportFeed() : mixed Will try to export arlima list from currently visited page |
| public static | loadRepos() : \Arlima_AbstractRepositoryDB[] |
| public |
loadSettings() : array Settings of any kind related to this plugin |
| public static |
loadStreamerColors() : mixed Will output a set of option elements containing streamer background colors. |
| public | pageMetaBox() : void |
| public |
postMetaBox() : void Content of meta box used to send a wordpress post immediately from post edit page in wp-admin to an arlima list |
| public static |
publishScheduledList(int $list_id, int $version_id) : void Publishes a scheduled arlima list |
| public static |
saveImageAsAttachment(string $base64_img, string $file_name, string $connected_post='') : int The attachment IDCreate a wordpress attachment out of a string with base64 encoded image binary |
| public static | saveImageFileAsAttachment(mixed $img_file, mixed $file_name, mixed $connected_post) : int |
| public | savePageMetaBox(mixed $post_id) : void |
| public | saveSettings(array $setting) : void |
| public |
settingsLinkOnPluginPage(array $links) : array Add a settings link to given links |
| public |
setupWidgets() : void Register our widgets and widget filters |
| public static | supportsImageEditor() : bool |
| public | templateStylesheetsInListManager(mixed $files) : array |
| public |
themeInitHook() : void function called on init in the theme |
| public static |
uninstall() : void Uninstall procedure for this plugin - Removes plugin settings - Removes database tables |
| public static |
update() : void Update procedure for this plugin. Since wordpress is lacking this feature we should call this function on a regular basis. |
### Class: Arlima_WP_Widget
Widget displaying an article list
| Visibility | Function |
|---|---|
| public |
__construct(mixed/string $id=null, string $name='Arlima Widget') : void
|
| public | form(array $instance) : string/void |
| public | update(array $new_instance, array $old_instance) : array |
| public | widget(array $args, array $instance) : void |
This class extends \WP_Widget
### Class: Arlima_WPLoop | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $in) : void |
This class extends \Arlima_CMSLoop