Showing 1,420 of 1,425 total issues
Method output
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function output() {
$post_id = $this->post->ID;
$lesson = false;
Method media_protection
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function media_protection() {
$id = 'using-nginx';
if (
apply_filters(
'llms_admin_notice_using_nginx',
Method menu_item_classes
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function menu_item_classes( $menu_items ) {
if ( ! function_exists( 'is_lifterlms' ) || ! is_lifterlms() ) {
return $menu_items;
}
Method llms_sort_orders
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function llms_sort_orders( $vars ) {
if ( isset( $vars['post_type'] ) && 'llms_order' == $vars['post_type'] ) {
if ( isset( $vars['orderby'] ) && 'order' == $vars['orderby'] ) {
Method output
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function output() {
global $post;
parent::output();
Method get_revenue
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_revenue( $period ) {
$query = $this->orders_query( -1 );
$order_ids = wp_list_pluck( $query->posts, 'ID' );
Method handle_manage_addons
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handle_manage_addons() {
// phpcs:disable WordPress.Security.NonceVerification.Missing -- nonce is verified in $this->handle_actions() method.
$actions = apply_filters(
Method set_field_descriptions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function set_field_descriptions( $field = array() ) {
$description = '';
$tooltip = '';
Method update_section
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function update_section( $section_data, $course_id ) {
$res = array_merge(
$section_data,
array(
Method parse_hook_find_trigger_type
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function parse_hook_find_trigger_type( $action, $related_post_id ) {
$trigger_type = '';
switch ( $action ) {
Method build_template_result_from_post
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function build_template_result_from_post( $post ) {
$terms = get_the_terms( $post, 'wp_theme' );
if ( is_wp_error( $terms ) ) {
Method get_questions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_questions( $return = 'questions' ) {
$query = new WP_Query(
array(
'meta_query' => array(
Method get_sync_action_texts
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function get_sync_action_texts() {
if ( $this->is_current_post_a_template ) {
$awarded_number = $this->count_awarded_engagements( $this->post->ID );
Method get_overall_progress
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_overall_progress( $use_cache = true ) {
$progress = null;
// Attempt to pull from the cache first.
Method modify_editor_settings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function modify_editor_settings( $settings, $context ) {
// Only load fonts when in post editor context for a certificate post type.
if ( ! empty( $context->post ) && in_array( $context->post->post_type, array( 'llms_certificate', 'llms_my_certificate' ), true ) ) {
Method merge_content
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function merge_content( $content = null, $load_reusable_blocks = false ) {
$content = parent::merge_content( $content, $load_reusable_blocks );
// Merge.
Method get_sections
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_sections( $return = 'sections' ) {
$q = new WP_Query(
array(
'meta_key' => '_llms_order',
Method toArrayAfter
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toArrayAfter( $arr ) {
$product = $this->get_product();
$arr['access_plans'] = array();
foreach ( $product->get_access_plans( false, false ) as $p ) {
Method get_custom_fonts
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_custom_fonts( $blocks = null ) {
$fonts = array();
$blocks = is_null( $blocks ) ? parse_blocks( $this->get( 'content', true ) ) : $blocks;
Method output_table_html
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function output_table_html() {
$post_type = null;
if ( 'certificates' === $this->id ) {
$post_type = 'llms_my_certificate';