| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function enqueue_scripts() { |
||
| 44 | $show_context_cards = true; |
||
| 45 | $show_context_cards = apply_filters( 'wl_show_context_cards', $show_context_cards ); |
||
| 46 | if ( $show_context_cards ) { |
||
| 47 | wp_enqueue_script( 'wordlift-cloud' ); |
||
| 48 | wp_add_inline_script( 'wordlift-cloud', "wordliftCloud.contextCards('a.wl-entity-page-link', '" . get_rest_url() . WL_REST_ROUTE_DEFAULT_NAMESPACE . $this->endpoint . "')" ); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 53 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.