Showing 398 of 4,293 total issues
Function reverse
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reverse: function(location, scale, cb, context) {
getJSON(
this.options.serviceUrl +
encodeURIComponent(location.lng) +
',' +
Method upscale
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function upscale($default, $orig_w, $orig_h, $dest_w, $dest_h, $crop)
{
if (!$crop) {
return null;
} // Let the wordpress default function handle this.
Function calculateImageSelectOptions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateImageSelectOptions: function (attachment, controller) {
var xInit = parseInt(controller.frame.options.cropOptions.maxWidth, 10),
yInit = parseInt(controller.frame.options.cropOptions.maxHeight, 10),
ratio, xImg, yImg, realHeight, realWidth,
imgSelectOptions;
Function setupSortables
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupSortables: function () {
var that = this;
this.$el.sortable(
{
handle: ".kb-module-control--move",
Method saveModules
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveModules($modules)
{
/** @var \Kontentblocks\Modules\Module $module */
foreach ($modules as $module) {
Method auth
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function auth()
{
$all = $this->postdata->request->all();
// verify if this is an auto save routine.
// If it is our form has not been submitted, so we dont want to do anything
Method action
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function action(Request $request)
{
global $post;
$moduleArgs = Utilities::validateBoolRecursive($request->get('module'));
Method action
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function action(Request $request)
{
$data = wp_unslash($request->request->get('data')); // remove slashes from ajax
$postEnvironment = Utilities::getPostEnvironment($data['post_ID']);
Method registerPostType
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerPostType()
{
$labels = array(
Method getFrontendValue
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFrontendValue($salt = null)
{
if (!is_null($this->userValue)) {
return $this->userValue;
Function reposition
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reposition: function () {
var elpostop, elposleft, mSettings, submodule, pos, height;
elpostop = 0;
elposleft = 0;
mSettings = this.model.get('settings');
Function _createAlt
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createAlt: function(result, index) {
var li = L.DomUtil.create('li', ''),
a = L.DomUtil.create('a', '', li),
icon = this.options.showResultIcons && result.icon ? L.DomUtil.create('img', '', a) : null,
text = result.html ? undefined : document.createTextNode(result.name),
Function _createAlt
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createAlt: function(result, index) {
var li = L.DomUtil.create('li', ''),
a = L.DomUtil.create('a', '', li),
icon = this.options.showResultIcons && result.icon ? L.DomUtil.create('img', '', a) : null,
text = result.html ? undefined : document.createTextNode(result.name),
Method getTemplatesforContext
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTemplatesforContext(ModuleContext $context)
{
$collection = array();
$collection += $this->getSingles($this->views);
$areaContext = $context->areaContext;
Function geocode
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
geocode: function(query, cb, context) {
var params = {
SingleLine: query,
outFields: 'Addr_Type',
forStorage: false,
Function initDraggable
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initDraggable: function () {
var $source, $target, $sourcecontainer, $targetcontainer;
var that = this;
this.$('.kbml-slot-ref').draggable({
revert: 'invalid',
Method action
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function action(Request $request, $send = true)
{
global $post;
$postdata = self::setupPostData($request);
Method action
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function action(Request $request)
{
$module = wp_unslash($request->request->get('module'));
$view = wp_unslash($request->request->get('view', ''));
$environment = Utilities::getPostEnvironment($module['postId']);
Method setupViews
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setupViews(Module $module)
{
if ($this->isChildTheme) {
$childPath = trailingslashit(
Method auth
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function auth()
{
// if a revision gets restored, a new revision is created but everything from the normal edit screen is missing
if ($this->isRevisionScreen === true) {