PHP Class 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
Datei anzeigen Open project: discourse/wp-discourse Class Usage Examples

Public Properties

Property Type Description
$options Options and defaults
$version Version

Protected Properties

Property Type Description
$response_validator

Public Methods

Method Description
__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

Method Details

__construct() public method

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 method

public admin_styles ( )

avatar() public static method

public static avatar ( $template, $size )

comments_number() public method

public comments_number ( $count )

comments_template() public method

public comments_template ( $old )

convert_relative_img_src_to_absolute() static public method

static public convert_relative_img_src_to_absolute ( $url, $content )

discourse_comments_js() public method

get_allowed_post_types() public method

get_plugin_options() static public method

static public get_plugin_options ( )

homepage() public static method

public static homepage ( $url, $post )

init() public method

public init ( )

install() static public method

static public install ( )

is_valid_sync_post_type() public method

public is_valid_sync_post_type ( $postid = null )

publish_active() public method

public publish_active ( )

publish_post_to_discourse() public method

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

save_postdata() public method

public save_postdata ( $postid )

set_login_url() public method

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

sso_add_query_vars() public method

public sso_add_query_vars ( $vars )

sso_parse_request() public method

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

sync_comments() public method

public sync_comments ( $postid )

sync_to_discourse() public method

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

sync_to_discourse_work() public method

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

use_discourse_comments() public method

public use_discourse_comments ( $postid )

xmlrpc_publish_post_to_discourse() public method

When publishing by xmlrpc, ignore the publish_to_discourse option

Property Details

$options static_oe public_oe property

Options and defaults
static public $options

$response_validator protected_oe property

protected $response_validator

$version static_oe public_oe property

Version
static public $version