function _pagenavi_init() {
	load_plugin_textdomain( 'wp-pagenavi', '', dirname( plugin_basename( __FILE__ ) ) . '/lang' );

	require_once dirname( __FILE__ ) . '/core.php';

	$options = new scbOptions( 'pagenavi_options', __FILE__, array(
		'pages_text'    => __( 'Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'wp-pagenavi' ),
		'current_text'  => '%PAGE_NUMBER%',
		'page_text'     => '%PAGE_NUMBER%',
		'first_text'    => __( '« First', 'wp-pagenavi' ),
		'last_text'     => __( 'Last »', 'wp-pagenavi' ),
		'prev_text'     => __( '«', 'wp-pagenavi' ),
		'next_text'     => __( '»', 'wp-pagenavi' ),
		'dotleft_text'  => __( '...', 'wp-pagenavi' ),
		'dotright_text' => __( '...', 'wp-pagenavi' ),
		'num_pages' => 5,
		'num_larger_page_numbers' => 3,
		'larger_page_numbers_multiple' => 10,
		'always_show' => false,
		'use_pagenavi_css' => true,
		'style' => 1,
	) );

	PageNavi_Core::init( $options );

	if ( is_admin() ) {
		require_once dirname( __FILE__ ) . '/admin.php';
		new PageNavi_Options_Page( __FILE__, $options );
	}
}
Пример #2
0
 static function init($options)
 {
     self::$options = $options;
     add_action('wp_enqueue_scripts', array(__CLASS__, 'stylesheets'));
 }
Пример #3
0
 static function init($options)
 {
     self::$options = $options;
     add_action('wp_print_styles', array(__CLASS__, 'stylesheets'));
 }
Пример #4
0
 function init($options)
 {
     self::$options = $options;
     add_action('wp_print_styles', array(__CLASS__, 'stylesheets'));
     add_filter('previous_posts_link_attributes', array(__CLASS__, 'previous_posts_link_attributes'));
     add_filter('next_posts_link_attributes', array(__CLASS__, 'next_posts_link_attributes'));
 }