• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WordPress Connector

#1
Hi all- I have a pretty interesting but niche module to share with you, compliments of an employer who likes to support open-source software.
If you're like me you would love to spend all our time in CodeIgniter, but those constant requests for "help with my website" keep landing you back in WordPress (bless its little heart).
Well what if I told you that you could work on a WordPress site in CodeIgniter? Look no further!

Tatter\WordPress
WordPress content management for CodeIgniter 4
https://github.com/tattersoftware/codeig...-wordpress

Tatter\WordPress is a module you may add to any CodeIgniter 4 app to allow it to connect to and work with an existing WordPress installation. The library comes with the Reader class, a parser designed to read configuration values from WordPress' wp-config.php file. By extracting database information and installation path, Tatter\WordPress can connect to the same database and work with its content. An example addition to your Database config:
PHP Code:
class Database extends BaseConfig
{
    public 
$wordpress = [
        
'DBDriver' => 'Tatter\WordPress\Database',
        
'WPConfig' => '/path/to/wp-config.php',
    ]; 

Once you have a successful connection, you may use the modules's Models and Entities corresponding to WordPress's database tables to make changes. This initial release includes full support for "wp_posts" (that was the scope needed for my current project) but support for more tables will be added over time and on request.

View and install the package from Packagist or provide feedback, bug reports, and requests at GitHub.
Reply

#2
Wow. The stuff that you put together never ceases to amaze me. Thanks for sharing this!
Reply

#3
<3 thanks friend. I’m always pleased when something I’m working on can be shared with the larger community
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.