??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/am1atec.co.uk/wp-content/plugins/surerank/src/store/selectors.js
⬅ Kembali
import { cleanContent } from '@Functions/utils';
/**
* Returns true if the viewport matches the given query, or false otherwise.
*
* @param {Object} state Viewport state object.
*
*
* @return {boolean} Whether viewport matches query.
*/
export function getPostSeoMeta( state ) {
return state.postSeoMeta;
}
export function getVariables( state ) {
return state.variables;
}
export function getMetaboxState( state ) {
return state.metaboxInitialized;
}
export function getState( state ) {
return state;
}
export function getModalState( state ) {
return state.modalEnabled;
}
export function getPostDynamicData( state ) {
const dynamicData = state.postDynamicData;
// Verify if title is empty. then set the title from the variables object.
if ( state?.variables?.post?.title?.value && ! dynamicData?.title ) {
dynamicData.title = state.variables.post.title.value;
}
// Verify if content is empty. then set the content from the variables object.
if ( state?.variables?.post?.content?.value && ! dynamicData?.content ) {
dynamicData.content = cleanContent(
state.variables.post.content.value
);
}
// Verify if excerpt is empty. then set the excerpt from the variables object.
if ( state?.variables?.post?.excerpt?.value && ! dynamicData?.excerpt ) {
dynamicData.excerpt = state.variables.post.excerpt.value;
}
return dynamicData;
}
export const getGlobalDefaults = ( state ) => state.globalDefaults;
export const getAppSettings = ( state ) => state.appSettings;
export const getUnsavedMetaSettings = ( state ) => state.unsavedPostSeoMeta;
export const getRefreshCalled = ( state ) => state.pageSeoChecks.refreshCalled;
export const getCurrentPostIgnoredList = ( state ) => {
return state.pageSeoChecks?.ignoredList || [];
};
export const getPageSeoChecks = ( state ) => {
return state.pageSeoChecks;
};
export const getActivePostId = ( state ) => state.activePostId;
export const getSeoBarChecks = ( state, postId, checkType ) => {
if ( ! postId || ! checkType ) {
return {};
}
const checks = state.pageSeoChecks[ postId ]?.checks || {};
const sequence = state.pageSeoChecks[ postId ]?.sequence || [];
const error = state.pageSeoChecks[ postId ]?.error || null;
return {
checks,
sequence,
error,
};
};
Nama
Tipe
Ukuran
Diubah
Aksi
📜 action-types.js
js
829 B
2026-04-30 14:55
📜 actions.js
js
15.8 KB
2026-06-17 16:29
📜 constants.js
js
38 B
2025-04-16 21:01
📜 controls.js
js
163 B
2025-07-08 15:26
📜 reducer.js
js
6.4 KB
2026-04-30 14:55
📜 resolvers.js
js
3.5 KB
2026-06-17 16:29
📜 selectors.js
js
2.2 KB
2026-04-30 14:55
📜 setInitialState.js
js
1.4 KB
2026-06-17 16:29
📜 store.js
js
1 KB
2025-07-21 08:58