Пример #1
0
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if (!defined('ABSPATH')) {
    die;
}
// Die if accessed directly
// Plugin version:
if (!defined('LAYF_VERSION')) {
    define('LAYF_VERSION', '1.8.2');
}
// Plugin DIR, with trailing slash:
if (!defined('LAYF_PLUGIN_DIR')) {
    define('LAYF_PLUGIN_DIR', plugin_dir_path(__FILE__));
}
// Plugin URL:
if (!defined('LAYF_PLUGIN_BASE_URL')) {
    define('LAYF_PLUGIN_BASE_URL', plugin_dir_url(__FILE__));
}
// Plugin ID:
if (!defined('LAYF_PLUGIN_BASE_NAME')) {
    define('LAYF_PLUGIN_BASE_NAME', plugin_basename(__FILE__));
}
load_plugin_textdomain('layf', false, '/' . basename(LAYF_PLUGIN_DIR) . '/languages');
/** Init **/
require_once plugin_dir_path(__FILE__) . 'inc/tst-yandex-feed-core.php';
$layf = La_Yandex_Feed_Core::get_instance();
register_activation_hook(__FILE__, array('La_Yandex_Feed_Core', 'on_activation'));
register_deactivation_hook(__FILE__, array('La_Yandex_Feed_Core', 'on_deactivation'));
/** strings to be translated **/
$strings = array(__('The plugin creates feed for Yandex.News service', 'layf'), __('Teplitsa', 'layf'));
Пример #2
0
 function get_supported_post_types()
 {
     $layf = La_Yandex_Feed_Core::get_instance();
     return $layf->get_supported_post_types();
 }