PHP Класс Discourse

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$options Options and defaults
$version Version

Защищенные свойства (Protected)

Свойство Тип Описание
$response_validator

Открытые методы

Метод Описание
__construct ( $response_validator ) Discourse constructor.
admin_styles ( )
avatar ( $template, $size )
comments_number ( $count )
comments_template ( $old )
convert_relative_img_src_to_absolute ( $url, $content )
discourse_comments_js ( )
get_allowed_post_types ( )
get_plugin_options ( )
homepage ( $url, $post )
init ( )
install ( )
is_valid_sync_post_type ( $postid = null )
publish_active ( )
publish_post_to_discourse ( $new_status, $old_status, $post )
save_postdata ( $postid )
set_login_url ( $login_url, $redirect ) the default WordPress login path.
sso_add_query_vars ( $vars )
sso_parse_request ( $wp ) SSO Request Processing from Adam Capirola : https://gist.github.com/adamcapriola/11300529
sync_comments ( $postid )
sync_to_discourse ( $postid, $title, $raw )
sync_to_discourse_work ( $postid, $title, $raw )
use_discourse_comments ( $postid )
xmlrpc_publish_post_to_discourse ( $postid ) When publishing by xmlrpc, ignore the publish_to_discourse option

Описание методов

__construct() публичный Метод

Takes a response_validator object as a parameter. The response_validator has a validate() method that validates the response from wp_remote_get and wp_remote_post.
public __construct ( $response_validator )
$response_validator

admin_styles() публичный Метод

public admin_styles ( )

avatar() публичный статический Метод

public static avatar ( $template, $size )

comments_number() публичный Метод

public comments_number ( $count )

comments_template() публичный Метод

public comments_template ( $old )

convert_relative_img_src_to_absolute() статический публичный Метод

static public convert_relative_img_src_to_absolute ( $url, $content )

discourse_comments_js() публичный Метод

get_allowed_post_types() публичный Метод

get_plugin_options() статический публичный Метод

static public get_plugin_options ( )

homepage() публичный статический Метод

public static homepage ( $url, $post )

init() публичный Метод

public init ( )

install() статический публичный Метод

static public install ( )

is_valid_sync_post_type() публичный Метод

public is_valid_sync_post_type ( $postid = null )

publish_active() публичный Метод

public publish_active ( )

publish_post_to_discourse() публичный Метод

public publish_post_to_discourse ( $new_status, $old_status, $post )

save_postdata() публичный Метод

public save_postdata ( $postid )

set_login_url() публичный Метод

the default WordPress login path.
public set_login_url ( $login_url, $redirect )

sso_add_query_vars() публичный Метод

public sso_add_query_vars ( $vars )

sso_parse_request() публичный Метод

SSO Request Processing from Adam Capirola : https://gist.github.com/adamcapriola/11300529
public sso_parse_request ( $wp )

sync_comments() публичный Метод

public sync_comments ( $postid )

sync_to_discourse() публичный Метод

public sync_to_discourse ( $postid, $title, $raw )

sync_to_discourse_work() публичный Метод

public sync_to_discourse_work ( $postid, $title, $raw )

use_discourse_comments() публичный Метод

public use_discourse_comments ( $postid )

xmlrpc_publish_post_to_discourse() публичный Метод

When publishing by xmlrpc, ignore the publish_to_discourse option

Описание свойств

$options статическое публичное свойство

Options and defaults
static public $options

$response_validator защищенное свойство

protected $response_validator

$version статическое публичное свойство

Version
static public $version