Properties

$_instance

$_instance : \WP_Fullpage

Type

\WP_Fullpage — The single instance of the class

Methods

instance()

instance() : \WP_Fullpage

Main WP_Fullpage Instance

Ensures only one instance of WP_Fullpage is loaded or can be loaded.

Returns

\WP_Fullpage

Main instance

init()

init(string  $dir = __DIR__, string  $file = __FILE__) : void

Init WP Fullpage

Parameters

string $dir
string $file

fullpage_template_include()

fullpage_template_include(string  $template) : string

The template include Filter to fullpage post type

Parameters

string $template

the template filename to locate

Returns

string —

The template filename if one is located.

scripts_styles()

scripts_styles() : void

Add Fullpage.js Scripts and Styles on Front

dynamic_css()

dynamic_css() : void

Add Dynamic CSS on front to the footer

init_fullpage_params()

init_fullpage_params() : array

Init Fullpage.js params

Returns

array —

an array of fullpage params

convert_path_to_uri()

convert_path_to_uri(string  $path) : string

Convert Path to URI

Parameters

string $path

the path to the file

Returns

string

get_template_part()

get_template_part(string  $slug, string  $name = '') : void

Get template part.

This is the load order:

 yourtheme       /   $this->template_path()  /   $slug-$name.php
 yourtheme       /   $slug-$name.php
 WPFP_REL_PATH   /   templates                  /   $slug-$name.php
 yourtheme       /   $this->template_path()  /   $slug.php
 yourtheme       /   $slug.php
 WPFP_REL_PATH   /   templates                  /   $slug.php

Parameters

string $slug
string $name

default is ''

get_template()

get_template(mixed  $template_name, array  $args = array(), string  $template_path = '', string  $default_path = '') : void

Get templates passing attributes and including the file.

Parameters

mixed $template_name
array $args

default is array()

string $template_path

default is ''

string $default_path

default is ''

locate_template()

locate_template(string|array  $template_names, string  $template_path = '', string  $default_path = '') : string

Locate a template and return the path for inclusion.

This is the load order:

 yourtheme       /   $template_path  /   $template_name
 yourtheme       /   $template_name
 $default_path   /   $template_name

Parameters

string|array $template_names
string $template_path

default is ''

string $default_path

default is ''

Returns

string

get_header()

get_header(string  $name = '', string  $post_type = 'fullpage') : void

Load Fullpage header template.

Includes the fullpage header template for a theme or if a name is specified then a specialised header will be included.

For the parameter, if the file is called "header-special.php" then specify "special".

WPFP()->get_header( 'special' );

Parameters

string $name

The name of the specialised fullpage header.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_footer()

get_footer(string  $name = '', string  $post_type = 'fullpage') : void

Load Fullpage footer template.

Includes the fullpage footer template for a theme or if a name is specified then a specialised footer will be included.

For the parameter, if the file is called "footer-special.php" then specify "special".

WPFP()->get_footer( 'special' );

Parameters

string $name

The name of the specialised fullpage footer.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_navigation()

get_navigation(string  $name = '', string  $post_type = 'fullpage') : void

Load Fullpage navigation template.

Includes the fullpage navigation template for a theme or if a name is specified then a specialised navigation will be included.

For the parameter, if the file is called "navigation-special.php" then specify "special".

WPFP()->get_navigation( 'special' );

Parameters

string $name

The name of the specialised fullpage navigation.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_slides_navigation()

get_slides_navigation(string  $name = '', string  $post_type = 'section') : void

Load Fullpage slides navigation template.

Includes the fullpage slides navigation template for a theme or if a name is specified then a specialised slides navigation will be included.

For the parameter, if the file is called "slides-navigation-special.php" then specify "special".

WPFP()->get_slides_navigation( 'special' );

Parameters

string $name

The name of the specialised fullpage slides navigation.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_sidebar()

get_sidebar(string  $name = '', string  $post_type = 'fullpage') : void

Load Fullpage sidebar template.

Includes the fullpage sidebar template for a theme or if a name is specified then a specialised sidebar will be included.

For the parameter, if the file is called "sidebar-special.php" then specify "special".

WPFP()->get_sidebar( 'special' );

Parameters

string $name

The name of the specialised fullpage sidebar.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_layout()

get_layout(string  $type, string  $name = '', string  $post_type = 'fullpage') : void

Load a Fullpage layout template.

Includes the fullpage sidebar template for a theme or if a name is specified then a specialised sidebar will be included.

For the parameter, if the file is called "sidebar-special.php" then specify "sidebar" and "special".

WPFP()->get_layout( 'my_type', 'special' );

Parameters

string $type

can be 'header', 'footer', 'sidebar', 'navigation', 'slides-navigation' or whatever you want

string $name

The name of the specialised fullpage layout.

string $post_type

the type of the current post in the loop. Can be 'fullpage', 'section' or 'slide'

get_sections()

get_sections(string  $name = '') : void

Load Fullpage Sections loop.

Includes the fullpage Sections loop template for a theme or if a name is specified then a specialised Sections loop will be included.

For the parameter, if the file is called "sections-special.php" then specify "special".

WPFP()->get_sections( 'special' );

Parameters

string $name

The name of the specialised fullpage sections loop.

get_slides()

get_slides(string  $name = '') : void

Load Fullpage Slides loop.

Includes the fullpage Slides loop template for a theme or if a name is specified then a specialised Slides loop will be included.

For the parameter, if the file is called "slides-special.php" then specify "special".

WPFP()->get_slides( 'special' );

Parameters

string $name

The name of the specialised fullpage slides loop.

get_loop()

get_loop(string  $type, string  $name = '') : void

Load Fullpage loop.

Includes the fullpage loop template for a theme or if a name is specified then a specialised loop will be included.

For the parameters, if the file is called "section-special.php" then specify "section" and "special".

The method is looking for "$type-$name-the_post_name.php" and "$type-the_post_name.php" first. So you can add a specific template for a section or a slide depending on its post_name.

WPFP()->get_loop( 'section', 'special' );

Parameters

string $type

can be 'section' or 'slide'

string $name

The name of the specialised fullpage loop.

includes()

includes() : void

Includes

actions_filters()

actions_filters() : void

Register Actions and Filters

is_fullpage()

is_fullpage() : boolean

Is it a fullpage

Returns

boolean

template_path()

template_path() : string

Get the template path.

Returns

string

layout_path()

layout_path() : string

Get the layout path.

Returns

string

script_path()

script_path() : string

Get the script path.

Returns

string

style_path()

style_path() : string

Get the style path.

Returns

string

loop_path()

loop_path() : string

Get the loop path.

Returns

string