Click here to Skip to main content
15,885,839 members
Articles / Programming Languages / Razor

Extending WordPress with C# Plugins

Rate me:
Please Sign up or sign in to vote.
4.98/5 (21 votes)
30 May 2012Apache16 min read 169.4K   1.5K   57  
This article describes how to extend WordPress with plugins written in C# and shows very first C# plugin for this system.
<?php
/*
Plugin Name: Content Watchdog
Description: Allows you to check the content of your site and to be notified when any of defined words occurs in posts or pages.
Version: 1.0.0
Author: Miloslav Beno (Devsense)
Author URI: http://devsense.com
Network: true
*/

if (!defined("PHALANGER"))
    die('Content Watchdog is only compatible with Wordpress running on <a target="_blank" href="http://php-compiler.net">Phalanger</a>.');

if (!class_exists("Devsense\WordPress\Plugins\ContentWatchdog\ContentWatchdog"))
    die('It is necessary to add ContentWatchdog assembly in phpNet/ClassLibrary section of the web.config file.');

$contentMonitor = new Devsense\WordPress\Plugins\ContentWatchdog\ContentWatchdog();

?>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Software Developer DEVSENSE s.r.o
Czech Republic Czech Republic
Miloslav is software developer of open-source PHP compiler & runtime for .NET/Mono called Phalanger and PHP Tools for Visual Studio. He's graduated at Faculty of Mathematics and Physics at Charles University in Prague. Beside of compilers and dynamic languages he is also interested in semantic web technologies. Available on twitter @miloslavbeno

Comments and Discussions