/** instance */
 public static function get_instance()
 {
     if (NULL === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Example #2
0
            ?>
<link url="<?php 
            echo esc_url($link['url']);
            ?>
"><?php 
            echo apply_filters('layf_related_link_text', $link['text']);
            ?>
</link>
<?php 
        }
        ?>
</yandex:related>	
<?php 
    }
    $gmt_offset = get_option('gmt_offset');
    $gmt_offset = $gmt_offset > 9 ? $gmt_offset . '00' : '0' . $gmt_offset . '00';
    ?>
<pubDate><?php 
    echo mysql2date('D, d M Y H:i:s +' . $gmt_offset, get_date_from_gmt(get_post_time('Y-m-d H:i:s', true)), false);
    ?>
</pubDate>
<yandex:full-text><?php 
    echo La_Yandex_Feed_Core::get_the_content_feed();
    ?>
</yandex:full-text>
</item>
<?php 
}
?>
</channel>
</rss>
	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'));
Example #4
0
 function get_supported_post_types()
 {
     $layf = La_Yandex_Feed_Core::get_instance();
     return $layf->get_supported_post_types();
 }