Codeventure Infotech Store

Developer hooks and filters

LoopSort exposes actions and filters, all prefixed loopsort/, for adding field sources, value types and controls or adjusting the query. Values returned through filters are validated before use, so a filter can’t inject unvalidated meta keys, meta types or query arguments.

HookTypeUse
loopsort/loadedactionLoopSort is ready (Elementor and Elementor Pro meet the minimum versions).
loopsort/field_sourcesfilterRegister a field source: an object implementing Codeventure\LoopSort\Fields\Field_Source.
loopsort/sort_typesfilterAdd a value type: a label plus one of the allowed meta types (CHAR, NUMERIC, DECIMAL(10,2), SIGNED, UNSIGNED, DATE, DATETIME).
loopsort/register_controlsactionAdd your own controls to the LoopSort section.
loopsort/query_argsfilterAdjust the query after LoopSort, with the sanitized LoopSort settings. Post status, permissions and the post type guard are re-checked afterwards.
loopsort/raw_settingsfilterChange the settings LoopSort reads before they’re sanitized (used by Pro’s visitor sort).
loopsort/supported_widgetsfilterWhich loop widgets LoopSort modifies (only Elementor loop widgets are accepted).
loopsort/is_pro_activefilterOnly hides the free plugin’s Pro placeholders. It never unlocks anything.

Example: a custom field source

add_filter( 'loopsort/field_sources', function ( $sources ) {
    $sources['my_fields'] = new My_Field_Source(); // implements Field_Source
    return $sources;
} );

The Field_Source interface methods are id(), label(), is_available(), get_fields( $post_types ), storage_type( $key ) (text, numeric, date_ymd, datetime or timestamp) and meta_key( $key ).

Yogesh Popat, developer of LoopSort and founder of Codeventure Infotech Available for new projects

Like what you see? Work with the developer

Hire Yogesh Popat for your website

I’m Yogesh, the developer behind LoopSort and the founder of Codeventure Infotech. When you hire me, you talk to me directly and I work on your project myself: no account managers, no hand-offs, no surprises.

  • Talk directly to me from the first call to launch
  • WordPress, WooCommerce & Elementor websites, built to load fast
  • Custom plugins & features, like the ones in this store

Privacy preferences

Choose which cookies we may use. You can change your choice at any time using “Cookie settings” in the footer. See our Privacy Policy for details.

Strictly necessary

Remember your privacy choice (cv_consent, 6 months) and keep unsent form drafts in your browser. These are required for the site to work and can’t be switched off.

Always on

Google Analytics (_ga, _ga_*, up to 2 years) helps us count visits and see which pages are useful. Data is aggregated and is not used for advertising.

Sale or sharing of personal information

We do not sell your personal information or share it for cross-context behavioural advertising (CCPA/CPRA). We also honour Global Privacy Control signals.

Never