How would WP plugins need to be recoded in order t

2019-09-06 16:48发布

Lets say, I want an affiliate plugin that I bought for WP to work on Modx. What are the procedures to follow? Yes, you can assume that all the plugins I bought use php, javascript, and jquery.

2条回答
霸刀☆藐视天下
2楼-- · 2019-09-06 16:51

You can use internal Wordpress functions by including this file include_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php' );

You can try including the file in one of your modx templates and then see if it gives you access to your affiliate plugin functions.

Vice-Versa you could include modx into your wordpress theme files by adding this code.

define('MODX_CORE_PATH', 'full/path/to/your/modx/core/'); define('MODX_CONFIG_KEY', 'config'); require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; $modx= new modX(); $modx->initialize('mgr');

This will give you access to the $modx object and all it's wonders.

Source: http://www.quora.com/MODX-CMS/How-would-WordPress-plugins-need-to-be-recoded-in-order-to-work-in-MODX

查看更多
我只想做你的唯一
3楼-- · 2019-09-06 17:11
登录 后发表回答