For Users

Installation

First way to install plugin:

  1. Download plugin from your BeRocket account
  2. Open your site admin panel and go to Plugins -> Add New -> Upload Plugin
  3. Click Browse and select downloaded zip file and click Install Now
  4. Click Activate Plugin

 

Second way to install plugin:  

  1. Download plugin from your BeRocket account
  2. Open your site via FTP
  3. Go to WordPress folder/wp-content/plugins
  4. Extract files from downloaded zip file and copy extracted folders to plugins folder
  5. Open your site admin panel and go to Plugins
  6. Find WooCommerce Pagination Styler and click Activate under it

Setup

Account/Product Key

BeRocket Account and Product key uses for auto update plugins from BeRocket site.

Where can you find Account Key?

  1. Open BeRocket site and Login (The Login button you can find in header menu)
  2. Go to My Account (The My Account button you can find in header menu)
  3. From right side on page you can find all information about your BeRocket account including Account Key

  4. You can click on account key and copy it
  5. What can you do with Account Key?

Where can you find Product Key?

  1. Open BeRocket site and Login (The Login button you can find in header menu)
  2. Go to My Account (The My Account button you can find in header menu)
  3. Click on key icon on right side from plugin name WooCommerce Pagination Styler

  4. You can click on Product key and copy it
  5. In left field you can type any notice for this key and click DONE to save
  6. What can you do with Product Key?

Settings

WooCommerce Products Compare have settings in Admin Panel -> WooCommerce -> Pagination Styler

General

  • Enable previous and next buttons on pagination - enable buttons for previous and next page
  • Enable previous and next buttons on pagination - position for previous and next buttons
  • First and last button count in pagination - count of page from first page and from last page
  • Button count around current page - count of page from each side from current page
  • Enable pagination dots - enable dots between first pages, last pages and pages around current page

Style

  • Pagination style - position style for pagination
    • Default - as default WooCommerce pagination
      • Position - horizontal position of pagination
      • Position for pagination - enable pagination above products and under products
    • Fixed - fixed on screen
      • Position - padding from top, bottom, left and right side of the window
    • Bottom - fixed bottom of the page, but inside products container
      • Position - horizontal position of pagination
      • Show pagination position from top - scroll from top to pagination
      • Padding from bottom - padding from window bottom and bottom from products container
  • Buttons orientation - display pagination vertical or horizontal
  • Pagination style - CSS styles for pagination and buttons
    • Background color - background color for pagination block
    • Border color - border color for pagination block
    • Button text color - color of text in pagination buttons
    • Button text color on mouse over - color of text in pagination buttons when cursor is over button
    • Button background color - background color for pagination button
    • Button background color on mouse over - background color for pagination button when cursor is over button
    • Button border color - border color for pagination button
    • Button border color on mouse over - border color for pagination button when cursor is over button
    • Border width - width for border around pagination block
    • Button border width - width for border around pagination buttons
    • Paddings - paddings around all pagination buttons
    • Button paddings - paddings around text inside pagination buttons
    • Border round - round corner for pagination block
    • Button border round - round corner for pagination buttons
    • Padding between buttons - paddings around pagination buttons
  • Special styles for Previous button - styles for previous page button on WooCommerce pagination
  • Special styles for Next button - styles for next page button on WooCommerce pagination
  • Special styles for Dots button - styles for buttons with dots on WooCommerce pagination
  • Special styles for Current button - styles for current page button on WooCommerce pagination
  • Special styles for Other buttons - styles for other buttons on WooCommerce pagination

Text

  • Text for dots - text for dots between first pages, last pages and pages around current page
    • Previous - text for dots before current page
    • Next - text for dots after current page
  • Text for previous and next buttons - text on buttons for previous and next page
    • Previous - text on button for previous page
    • Next - text on button for next page
  • Text for current page - text on button for current page
  • Text for page - text on buttons for other pages
  • Text for first page - text on button for first page
  • Text for last page - text on button for last page

JavaScript / CSS

  • On page load - execute on page load
  • Custom CSS - custom CSS code

License

Plugin key - uses for updates plugin from BeRocket site. You can get this on BeRocket site -> My Account page on click key icon

 

BeRocket Account

BeRocket account settings are in Admin Panel -> Settings -> BeRocket Account.

Contains field for place BeRocket Account Key

Where can you find Account Key?

  1. Copy Account Key from BeRocket site
  2. Paste this key to Account key field
  3. Press Test button
  4. If you use right Account Key you will see

  5. Then press Save button

For Developers

Action hooks

berocket_ps_before_pagination

Used for display information before pagination

Usage

<?php
function my_block_berocket_ps_before_pagination () {
//your code here
}

add_action( 'berocket_ps_before_pagination', 'my_block_berocket_ps_before_pagination' );
?>

berocket_ps_after_pagination

Used for display information after pagination

Usage

<?php
function my_block_berocket_ps_after_pagination () {
//your code here
}

add_action( 'berocket_ps_after_pagination', 'my_block_berocket_ps_after_pagination' );
?>

Filter hooks

berocket_pagination_styler_page_data

You can change any text on pagination.

Parameters

  1. args - array with settings for pagination, have standart woocommerce pagination settings
    • prev_next - use or not previous and next buttons
    • end_size - count of page from first page and from last page
    • mid_size - count of page from each side from current page
    • prev_text - text on previous button
    • next_text - text on next button
    • dots_prev_text - text on dots button before current button
    • dots_next_text - text on dots button after current button
    • first_page - text on first page button
    • last_page - text on last page button
    • current_page -text on current page button
    • page - text on other buttons

Usage

<?php
function change_berocket_pagination_styler_page_data ( $args ) {
//your code here
    return $args;
}

add_filter( 'berocket_pagination_styler_page_data', 'change_berocket_pagination_styler_page_data' );
?>

pagination_get_template_part

Template that uses in plugin.

Parameters

  1. template - link to template that will be loaded.
  2. name - template name.

Usage

<?php
function change_pagination_get_template_part ( $template, $name ) {
//your code here
    return $template;
}

add_filter( 'pagination_get_template_part', 'change_pagination_get_template_part', 10, 2 );
?>

berocket_pagination_previous

You can change html code for previous button.

Parameters

  1. html - ready to use html code for previous button

Usage

<?php
function change_berocket_pagination_previous ( $html ) {
//your code here
    return $html;
}

add_filter( 'berocket_pagination_previous', 'change_berocket_pagination_previous' );
?>

berocket_pagination_next

You can change html code for next button.

Parameters

  1. html - ready to use html code for next button

Usage

<?php
function change_berocket_pagination_next ( $html ) {
//your code here
    return $html;
}

add_filter( 'berocket_pagination_next', 'change_berocket_pagination_next' );
?>

berocket_pagination_dots_previous

You can change html code for dots button before current button.

Parameters

  1. html - ready to use html code for dots button before current button

Usage

<?php
function change_berocket_pagination_dots_previous ( $html ) {
//your code here
    return $html;
}

add_filter( 'berocket_pagination_dots_previous', 'change_berocket_pagination_dots_previous' );
?>

berocket_pagination_dots_previous

You can change html code for dots button after current button.

Parameters

  1. html - ready to use html code for dots button after current button

Usage

<?php
function change_berocket_pagination_dots_next ( $html ) {
//your code here
    return $html;
}

add_filter( 'berocket_pagination_dots_next', 'change_berocket_pagination_dots_next' );
?>

Functions

includes/functions.php

br_get_woocommerce_version()

Public function to get WooCommerce version

return string. woocommerce version

berocket_pagination()

Public function to display pagination

pagination-styler.php

All of these functions is in class BeRocket_Pagination as static functions.

init ()

Function for initialize scripts.

br_get_template_part( $name = '' )

Get template part (for templates like the slider).

Default templates places in plugins folder woocommerce-pagination-styler/templates.

To rewrite the template in your theme folder create folder with name woocommerce-pagination-styler and places new template with identical name in this folder.

set_pagination_settings ( $args )

Set users settings to BeRocket pagination.

Uses like filters

  • $args - array with pagination arguments

return array. modified $args

Options

All settings you can find in BeRocket_Pagination class in static variables $defaults.

    public static $defaults = array(
        'br_pagination_general_settings'    => array(
            'use_next_prev'                     => '1',
            'pos_next_prev'                     => 'around_pagination',
            'page_end_size'                     => '3',
            'page_mid_size'                     => '3',
            'use_dots'                          => '1',
        ),
        'br_pagination_style_settings'      => array(
            'style'                             => 'default',
            'pagination_pos'                    => 'center',
            'default_show'                      => array(
                'after_products'                    => '1',
                'before_products'                   => '',
            ),
            'fixed_position'                    => array(
                'top'                               => '',
                'bottom'                            => '0',
                'left'                              => '',
                'right'                             => '',
            ),
            'buffer_top'                        => '700',
            'bottom_position'                   => '10',
            'ul_style'                          => array(
                'background-color'                  => '',
                'border-color'                      => 'd3ced2',
                'border-top-width'                  => '1',
                'border-bottom-width'               => '1',
                'border-left-width'                 => '1',
                'border-right-width'                => '0',
                'padding-top'                       => '0',
                'padding-bottom'                    => '0',
                'padding-left'                      => '0',
                'padding-right'                     => '0',
                'border-top-left-radius'            => '0',
                'border-top-right-radius'           => '0',
                'border-bottom-right-radius'        => '0',
                'border-bottom-left-radius'         => '0',
            ),
            'ul_li_style'                       => array(
                'border-color'                      => 'd3ced2',
                'border-top-width'                  => '0',
                'border-bottom-width'               => '0',
                'border-left-width'                 => '0',
                'border-right-width'                => '1',
                'border-top-left-radius'            => '0',
                'border-top-right-radius'           => '0',
                'border-bottom-right-radius'        => '0',
                'border-bottom-left-radius'         => '0',
                'margin-top'                        => '0',
                'margin-bottom'                     => '0',
                'margin-left'                       => '0',
                'margin-right'                      => '0',
                'float'                             => 'left',
            ),
            'ul_li_hover_style'                 => array(
                'border-color'                      => 'd3ced2',
            ),
            'ul_li_a-span_style'                => array(
                'color'                             => '333',
                'background-color'                  => '',
                'padding-top'                       => '10',
                'padding-bottom'                    => '10',
                'padding-left'                      => '10',
                'padding-right'                     => '10',
            ),
            'ul_li_a-span_hover_style'          => array(
                'color'                             => '8a7e88',
                'background-color'                  => 'ebe9eb',
            ),
        ),
        'br_pagination_text_settings'       => array(
            'dots_prev_icon'                    => 'fa-ellipsis-h',
            'dots_prev_text'                    => '…',
            'dots_next_icon'                    => 'fa-ellipsis-h',
            'dots_next_text'                    => '…',
            'prev_icon'                         => 'fa-angle-double-left',
            'next_icon'                         => 'fa-angle-double-right',
            'prev_text'                         => '«',
            'next_text'                         => '»',
            'current_page'                      => '%PAGE%',
            'page'                              => '%PAGE%',
            'first_page_icon'                   => '',
            'first_page'                        => '1',
            'last_page_icon'                    => '',
            'last_page'                         => '%LAST%',
        ),
        'br_pagination_javascript_settings' => array(
            'page_load'                         => '',
            'custom_css'                        => '',
        ),
        'br_pagination_license_settings'    => array(
            'plugin_key'                        => '',
        ),
    );

Files

  • pagination-styler.php - main plugin file
  • css - folder with CSS files
    • admin.css - styles for admin panel
    • colpick.css - styles for color picker block
    • font-awesome.css - standard Font Awesome styles
    • pagination.css - front end styles
    • select_fa.css - styles for Font Awesome selector
  • fonts - Font Awesome fonts
  • includes - folder with additional PHP files
    • functions.php - public functions
    • updater.php - BeRocket Updater for plugins update from BeRocket site
  • js - folder with JavaScript files
    • admin.js - JavaScript for admin panel settings
    • admin_select_fa.js - JavaScript for Font Awesome selector
    • colpick.js - JavaScript for color picker in admin panel settings
    • pagination_styler.js - JavaScript for front end
  • templates - templates for settings, list style and buttons
    • general_settings.php - template for Buttons tab in settings
    • javascript_settings.php - template for JavaScript tab in settings
    • license_settings.php - template for License tab in settings
    • settings.php - main plugin settings page
    • style_settings.php - template for Style tab in settings
    • text_settings.php - template for Text tab in settings