GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Protected Attributes | Private Member Functions
GravityView_Theme_Hooks_WPML Class Reference

Requires WPML 3.6.2 or newer. More...

Inheritance diagram for GravityView_Theme_Hooks_WPML:
GravityView_Plugin_and_Theme_Hooks

Public Member Functions

 add_hooks ()
 Add filters for WPML links. More...
 
 filter_gravityview_back_link ( $link)
 Add WPML filters to GravityView directory link. More...
 
 wpml_ls_filter ( $languages)
 Modify the language links to fix /entry/ var from being stripped. More...
 
- Public Member Functions inherited from GravityView_Plugin_and_Theme_Hooks
 __construct ()
 GravityView_Theme_Support constructor. More...
 
 _wp_loaded ()
 Fired when all themes and plugins have been loaded. More...
 
 merge_content_meta_keys ( $meta_keys=array(), $post=null, & $views=null)
 Merge plugin or theme meta keys that store shortcode data with existing keys to check. More...
 
 merge_meta_keys ( $meta_keys=array(), $post_id=0)
 Merge plugin or theme meta keys that store shortcode data with existing keys to check. More...
 
 merge_noconflict_scripts ( $handles)
 Merge plugin or theme scripts with existing no-conflict scripts. More...
 
 merge_noconflict_styles ( $handles)
 Merge plugin or theme styles with existing no-conflict styles. More...
 
 merge_post_type_support ( $supports=array(), $is_hierarchical=false)
 Merge plugin or theme post type support definitions with existing support values. More...
 

Protected Attributes

 $constant_name = 'ICL_SITEPRESS_VERSION'
 
 $script_handles
 
 $style_handles
 
- Protected Attributes inherited from GravityView_Plugin_and_Theme_Hooks
 $class_name = false
 string Optional. More...
 
 $constant_name = false
 string Optional. More...
 
 $content_meta_keys = array()
 Define the keys to be parsed by the gravityview/view_collection/from_post/meta_keys hook. More...
 
 $function_name = false
 string Optional. More...
 
 $meta_keys = array()
 Define the keys to be parsed by the gravityview/data/parse/meta_keys hook. More...
 
 $post_type_support = array()
 Define features in the admin editor used by the theme or plugin to be used when registering the GravityView post type. More...
 
 $script_handles = array()
 Define script handles used by the theme or plugin to be added to allowed no-conflict scripts. More...
 
 $style_handles = array()
 Define style handles used by the theme or plugin to be added to allowed no-conflict styles. More...
 

Private Member Functions

 add_url_hooks ()
 Add the WPML permalink filters back in. More...
 
 remove_url_hooks ()
 Remove WPML permalink filters. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GravityView_Plugin_and_Theme_Hooks
 add_hooks ()
 Add filters for meta key and script/style handles, if defined. More...
 

Detailed Description

Requires WPML 3.6.2 or newer.

Definition at line 20 of file class-gravityview-theme-hooks-wpml.php.

Member Function Documentation

◆ add_hooks()

add_hooks ( )

Add filters for WPML links.

Since
1.19.4

Definition at line 61 of file class-gravityview-theme-hooks-wpml.php.

◆ add_url_hooks()

add_url_hooks ( )
private

Add the WPML permalink filters back in.

Since
1.19.4
Returns
void

Definition at line 129 of file class-gravityview-theme-hooks-wpml.php.

References gravityview().

Referenced by wpml_ls_filter().

◆ filter_gravityview_back_link()

filter_gravityview_back_link (   $link)

Add WPML filters to GravityView directory link.

This also modifies all the Edit Entry, Cancel Edit, Go Back links

Since
1.19.4
See also
GravityView_API::directory_link WPML_URL_Filters::permalink_filter
Parameters
string$linkPermalink to the GravityView directory, without language params
Returns
string $link, with language params added by WPML

Definition at line 84 of file class-gravityview-theme-hooks-wpml.php.

References $link, and GravityView_frontend\getInstance().

◆ remove_url_hooks()

remove_url_hooks ( )
private

Remove WPML permalink filters.

Since
1.19.4
Returns
void

Definition at line 101 of file class-gravityview-theme-hooks-wpml.php.

References gravityview().

Referenced by wpml_ls_filter().

◆ wpml_ls_filter()

wpml_ls_filter (   $languages)

Modify the language links to fix /entry/ var from being stripped.

Since
1.19.4
Parameters
array$languagesArray of active languages with their details
Returns
array If currently a single entry screen, re-generate URL after removing WPML filters

SitePress $sitepress WP_Post $post WPML_URL_Converter $wpml_url_converter

Definition at line 159 of file class-gravityview-theme-hooks-wpml.php.

References $entry, $entry_slug, $post, add_url_hooks(), GravityView_API\entry_link(), gravityview(), and remove_url_hooks().

Field Documentation

◆ $constant_name

$constant_name = 'ICL_SITEPRESS_VERSION'
protected

Since
1.19.2

Definition at line 54 of file class-gravityview-theme-hooks-wpml.php.

◆ $script_handles

$script_handles
protected
Initial value:
= array(
'wpml-cpi-scripts',
'sitepress-scripts',
'sitepress-post-edit',
'sitepress-post-list-quickedit',
'sitepress-languages',
'sitepress-troubleshooting',
)

Since
1.19.2

Definition at line 26 of file class-gravityview-theme-hooks-wpml.php.

◆ $style_handles

$style_handles
protected
Initial value:
= array(
'sitepress-style',
'wpml-select-2',
'wpml-tm-styles',
'wpml-tm-queue',
'wpml-dialog',
'wpml-tm-editor-css',
'otgs-dialogs',
'otgs-ico',
)

Since
1.19.2

Definition at line 39 of file class-gravityview-theme-hooks-wpml.php.


The documentation for this class was generated from the following file: