Showing 1,420 of 1,425 total issues
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var self = this;
setTimeout( function () {
self.$el.llmsSelect2( {
ajax: {
Function open_media_lib
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open_media_lib: function( event ) {
event.stopPropagation();
var self = this,
Function get_sibling
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
get_sibling: function( direction, status ) {
direction = 'next' === direction ? direction : 'prev';
// Functions and vars to use when direction is 'prev' (default).
Function bind_gateways
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.bind_gateways = function() {
this.load_gateways();
if ( ! $( 'input[name="llms_payment_gateway"]' ).length ) {
Function setup_fields
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setup_fields() {
$els = $( '.llms-quiz-attempt-question:not(.type--content):not(.type--removed)' );
if ( $els.length < 1 ) {
Function add_row
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add_row: function( $repeater, data, expand ) {
var self = this,
$rows = $repeater.find( '.llms-repeater-rows' ),
$model = $repeater.find( '.llms-repeater-model' ),
Method set_columns
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function set_columns() {
return array(
'id' => array(
'exportable' => true,
'title' => __( 'ID', 'lifterlms' ),
Method get_data
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function get_data( $key, $data ) {
$membership = llms_get_post( $data );
switch ( $key ) {
Method get_settings_gateway
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function get_settings_gateway( $curr_section ) {
$settings = array();
$settings[] = array(
Method get_results
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_results( $args = array() ) {
$this->title = __( 'Quiz Attempts', 'lifterlms' );
$args = $this->clean_args( $args );
Method get_widget_data
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_widget_data() {
return apply_filters(
'llms_reporting_tab_enrollments_widgets',
array(
array(
Method get_settings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function get_settings() {
$settings = array();
$settings[] = array(
'type' => 'sectionstart',
Method randomize_attempt_questions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function randomize_attempt_questions( $questions ) {
if ( empty( $questions ) ) {
return $questions;
}
Method update_custom_schemas
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function update_custom_schemas( $type, $post, $post_data ) {
$schemas = self::get_custom_schemas();
if ( empty( $schemas[ $type ] ) ) {
return;
Method remove_coupon_code
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function remove_coupon_code( $request ) {
llms()->session->set( 'llms_coupon', false );
$plan = new LLMS_Access_Plan( $request['plan_id'] );
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create( $data = array() ) {
$time = current_time( 'mysql' );
$data = wp_parse_args(
Method includes_libraries
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function includes_libraries() {
$libs = array(
'blocks' => array(
'const' => 'LLMS_BLOCKS_LIB',
Method get_post_type_caps
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get_post_type_caps( $post_type ) {
if ( ! is_array( $post_type ) ) {
$singular = $post_type;
$plural = $post_type . 's';
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function create( $content ) {
global $wpdb;
$new_user_certificate = apply_filters(
'lifterlms_new_page',
Method register_certificate_post_type
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function register_certificate_post_type( $post_type, $labels, $args, $rewrite_slug, $admin_cap ) {
$user_can = current_user_can( $admin_cap );
$supports = array( 'title', 'editor', 'thumbnail' );