跳到内容

WordPressIgniter

v1.4

dynamodan · 2013年9月25日 上架

License GPLv2

正在使用
10+
评分
4.2 / 5
累计下载
5,393
最近更新
2015年5月1日
5 条评价需要 WordPress 3.3+已测试到 3.9.40

贡献者

A WordPress plugin that integrates CodeIgniter

Why a CodeIgniter/Wordpress integration plugin?

  1. I (along with many others) like CodeIgniter for it’s features such as ActiveRecord and MVC disciplines, plus I have a ton of cool libs and stuff in CodeIgniter that I would like to use in the WordPress environment

  2. I’m getting tired of building custom user, login, and session management systems for CodeIgniter. WordPress has them already.

  3. I’m getting tired of building custom look and feel and templates for CodeIgniter, WordPress already is that, and has thousands of themes available.

  4. I’m getting tired of building custom feature X for CodeIgniter, when it may already exist in WordPress either natively or as a plugin.

Why did I create this plugin, even though some others already exist? Because I wanted to:

  1. easily integrate CodeIgniter without invading its core very much, or optionally, not at all.

  2. show CodeIgniter output in a page, preserving all WordPress menu structure, template structure etc.

  3. not require template editing, so that templates can be easily swapped out and the CodeIgniter itegration still work.

  4. allow customizing of the CodeIgniter APPPATH and BASEPATH variables, so that the system and application folders can be put somewhere outside the plugins folder (or docroot altogether for that matter)

  5. handle segmented urls in CodeIgniter fashion, including paths that aren’t valid in WordPress (i.e. via WordPress 404 hooks), and dispatch to appropriate CodeIgniter controller functions.

Tips

  • If your CodeIgniter controller sets the $this->content[‘page_title’], such as $this->content['page_title'] = 'Blast off!';
    then this plugin will set the template-rendered title to “Blast off!” via a WordPress API registered ‘the_title’ filter hook.
  • If you choose to tick the “CodeIgniter grabs all SEO urls” checkbox, beware that CodeIgniter will return its own 404 page (along
    with http header!) on any non-root urls, i.e. permalinks. This behaviour can be set within CodeIgniter by adjusting the routes.php
    file to point to a valid controller, like this: $route['404_override'] = 'welcome';

TODO

(I don’t know if these are even possible, or I might have already done them)

  • provide a way to make CodeIgniter automatically use WordPress’ database settings, from within the plugin (yes I know I could intrude CodeIgniter core to do this, but it’s what I wanted to avoid)
  • provide a mechanism to instantiate CodeIgniter only on the overridden page, rather than all frontend urls.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums