Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/herald/core
File: modules.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Get module defaults
[3] Fix | Delete
*
[4] Fix | Delete
* @param string $type Module type
[5] Fix | Delete
* @return array Default arguments of a module
[6] Fix | Delete
* @since 1.0
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
if ( !function_exists( 'herald_get_module_defaults' ) ):
[10] Fix | Delete
function herald_get_module_defaults( $type = false ) {
[11] Fix | Delete
[12] Fix | Delete
$defaults = array(
[13] Fix | Delete
'posts' => array(
[14] Fix | Delete
'type' => 'posts',
[15] Fix | Delete
'type_name' => esc_html__( 'Posts', 'herald' ),
[16] Fix | Delete
'title' => '',
[17] Fix | Delete
'hide_title' => 0,
[18] Fix | Delete
'title_link' => '',
[19] Fix | Delete
'columns' => 12,
[20] Fix | Delete
'layout' => 'b',
[21] Fix | Delete
'limit' => 10,
[22] Fix | Delete
'starter_layout' => 'none',
[23] Fix | Delete
'starter_limit' => 1,
[24] Fix | Delete
'cat' => array(),
[25] Fix | Delete
'cat_child' => 0,
[26] Fix | Delete
'cat_inc_exc' => 'in',
[27] Fix | Delete
'tag' => array(),
[28] Fix | Delete
'tag_inc_exc' => 'in',
[29] Fix | Delete
'tax' => array(),
[30] Fix | Delete
'manual' => array(),
[31] Fix | Delete
'time' => 0,
[32] Fix | Delete
'order' => 'date',
[33] Fix | Delete
'sort' => 'DESC',
[34] Fix | Delete
'format' => 0,
[35] Fix | Delete
'unique' => 0,
[36] Fix | Delete
'slider' => 0,
[37] Fix | Delete
'autoplay' => '',
[38] Fix | Delete
'cat_nav' => 0,
[39] Fix | Delete
'more_text' => '',
[40] Fix | Delete
'more_url' => '',
[41] Fix | Delete
'css_class' => '',
[42] Fix | Delete
'author' => array(),
[43] Fix | Delete
'author_inc_exc' => 'in',
[44] Fix | Delete
'exclude_by_id' => array(),
[45] Fix | Delete
'active' => 1
[46] Fix | Delete
),
[47] Fix | Delete
'featured' => array(
[48] Fix | Delete
'post_type' => 'post',
[49] Fix | Delete
'type' => 'featured',
[50] Fix | Delete
'type_name' => esc_html__( 'Featured', 'herald' ),
[51] Fix | Delete
'title' => '',
[52] Fix | Delete
'hide_title' => 0,
[53] Fix | Delete
'title_link' => '',
[54] Fix | Delete
'layout' => '1',
[55] Fix | Delete
'cat' => array(),
[56] Fix | Delete
'cat_child' => 0,
[57] Fix | Delete
'cat_inc_exc' => 'in',
[58] Fix | Delete
'tag' => array(),
[59] Fix | Delete
'tag_inc_exc' => 'in',
[60] Fix | Delete
'manual' => array(),
[61] Fix | Delete
'time' => 0,
[62] Fix | Delete
'order' => 'date',
[63] Fix | Delete
'sort' => 'DESC',
[64] Fix | Delete
'format' => 0,
[65] Fix | Delete
'unique' => 0,
[66] Fix | Delete
'cat_nav' => 0,
[67] Fix | Delete
'more_text' => '',
[68] Fix | Delete
'more_url' => '',
[69] Fix | Delete
'css_class' => '',
[70] Fix | Delete
'author' => array(),
[71] Fix | Delete
'author_inc_exc' => 'in',
[72] Fix | Delete
'exclude_by_id' => array(),
[73] Fix | Delete
'active' => 1
[74] Fix | Delete
),
[75] Fix | Delete
[76] Fix | Delete
'cats' => array(
[77] Fix | Delete
'type' => 'cats',
[78] Fix | Delete
'type_name' => esc_html__( 'Categories', 'herald'),
[79] Fix | Delete
'title' => '',
[80] Fix | Delete
'hide_title' => 0,
[81] Fix | Delete
'title_link' => '',
[82] Fix | Delete
'columns' => 12,
[83] Fix | Delete
'layout' => 'f',
[84] Fix | Delete
'cat' => array(),
[85] Fix | Delete
'display_count' => 1,
[86] Fix | Delete
'display_icon' => 0,
[87] Fix | Delete
'count_label' => esc_html__( 'articles', 'herald'),
[88] Fix | Delete
'css_class' => '',
[89] Fix | Delete
'slider' => 0,
[90] Fix | Delete
'autoplay' => '',
[91] Fix | Delete
'more_text' => '',
[92] Fix | Delete
'more_url' => '',
[93] Fix | Delete
'active' => 1
[94] Fix | Delete
),
[95] Fix | Delete
[96] Fix | Delete
'text' => array(
[97] Fix | Delete
'type' => 'text',
[98] Fix | Delete
'type_name' => esc_html__( 'Text', 'herald' ),
[99] Fix | Delete
'title' => '',
[100] Fix | Delete
'hide_title' => 0,
[101] Fix | Delete
'title_link' => '',
[102] Fix | Delete
'columns' => 12,
[103] Fix | Delete
'content' => '',
[104] Fix | Delete
'autop' => 0,
[105] Fix | Delete
'css_class' => '',
[106] Fix | Delete
'active' => 1
[107] Fix | Delete
),
[108] Fix | Delete
'authors' => array(
[109] Fix | Delete
'type' => 'authors',
[110] Fix | Delete
'type_name' => esc_html__( 'Authors', 'herald' ),
[111] Fix | Delete
'title' => '',
[112] Fix | Delete
'hide_title' => 0,
[113] Fix | Delete
'title_link' => '',
[114] Fix | Delete
'columns' => 12,
[115] Fix | Delete
'layout' => 'col2',
[116] Fix | Delete
'limit' => '',
[117] Fix | Delete
'authors_number' => '',
[118] Fix | Delete
'slider' => 0,
[119] Fix | Delete
'autoplay' => '',
[120] Fix | Delete
'more_text' => '',
[121] Fix | Delete
'more_url' => '',
[122] Fix | Delete
'css_class' => '',
[123] Fix | Delete
'orderby' => 'post_count',
[124] Fix | Delete
'sort' => 'DESC',
[125] Fix | Delete
'exclude' => '',
[126] Fix | Delete
'roles' => array(),
[127] Fix | Delete
'active' => 1
[128] Fix | Delete
)
[129] Fix | Delete
[130] Fix | Delete
);
[131] Fix | Delete
$taxonomies = herald_get_taxonomies( 'post', false );
[132] Fix | Delete
if(!empty($taxonomies)){
[133] Fix | Delete
foreach ($taxonomies as $taxonomy) {
[134] Fix | Delete
$defaults['posts'][$taxonomy['id'] . '_inc_exc'] = 'in';
[135] Fix | Delete
}
[136] Fix | Delete
}
[137] Fix | Delete
[138] Fix | Delete
if ( herald_is_woocommerce_active() ) {
[139] Fix | Delete
[140] Fix | Delete
$defaults['woocommerce'] = array(
[141] Fix | Delete
'type' => 'woocommerce',
[142] Fix | Delete
'type_name' => esc_html__( 'Products', 'herald' ),
[143] Fix | Delete
'title' => '',
[144] Fix | Delete
'hide_title' => 0,
[145] Fix | Delete
'title_link' => '',
[146] Fix | Delete
'columns' => 12,
[147] Fix | Delete
'layout' => 'i',
[148] Fix | Delete
'limit' => 8,
[149] Fix | Delete
'display_price' => 1,
[150] Fix | Delete
'display_cat' => 1,
[151] Fix | Delete
'cat' => array(),
[152] Fix | Delete
'cat_inc_exc' => 'in',
[153] Fix | Delete
'tag' => array(),
[154] Fix | Delete
'tag_inc_exc' => 'in',
[155] Fix | Delete
'manual' => array(),
[156] Fix | Delete
'time' => 0,
[157] Fix | Delete
'order' => 'date',
[158] Fix | Delete
'slider' => 0,
[159] Fix | Delete
'autoplay' => '',
[160] Fix | Delete
'more_text' => '',
[161] Fix | Delete
'more_url' => '',
[162] Fix | Delete
'css_class' => '',
[163] Fix | Delete
'active' => 1
[164] Fix | Delete
);
[165] Fix | Delete
}
[166] Fix | Delete
[167] Fix | Delete
$custom_post_types = herald_get_custom_post_types();
[168] Fix | Delete
[169] Fix | Delete
if ( !empty( $custom_post_types ) ) {
[170] Fix | Delete
foreach ( $custom_post_types as $custom_post_type ) {
[171] Fix | Delete
$defaults[$custom_post_type] = array(
[172] Fix | Delete
'type' => $custom_post_type,
[173] Fix | Delete
'cpt' => true,
[174] Fix | Delete
'type_name' => esc_html__( 'CPT', 'herald' ) . ' '.ucfirst( $custom_post_type ),
[175] Fix | Delete
'title' => '',
[176] Fix | Delete
'hide_title' => 0,
[177] Fix | Delete
'title_link' => '',
[178] Fix | Delete
'columns' => 12,
[179] Fix | Delete
'layout' => 'b',
[180] Fix | Delete
'limit' => 10,
[181] Fix | Delete
'tax' => array(),
[182] Fix | Delete
'starter_layout' => 'none',
[183] Fix | Delete
'starter_limit' => 1,
[184] Fix | Delete
'manual' => array(),
[185] Fix | Delete
'time' => 0,
[186] Fix | Delete
'order' => 'date',
[187] Fix | Delete
'sort' => 'DESC',
[188] Fix | Delete
'unique' => 0,
[189] Fix | Delete
'slider' => 0,
[190] Fix | Delete
'autoplay' => '',
[191] Fix | Delete
'more_text' => '',
[192] Fix | Delete
'more_url' => '',
[193] Fix | Delete
'css_class' => '',
[194] Fix | Delete
'exclude_by_id' => array(),
[195] Fix | Delete
'active' => 1
[196] Fix | Delete
);
[197] Fix | Delete
$custom_post_type_taxonomies = herald_get_taxonomies( $custom_post_type );
[198] Fix | Delete
if(!empty($custom_post_type_taxonomies)){
[199] Fix | Delete
foreach ($custom_post_type_taxonomies as $custom_post_type_taxonomy) {
[200] Fix | Delete
$defaults[$custom_post_type][$custom_post_type_taxonomy['id'] . '_inc_exc'] = 'in';
[201] Fix | Delete
}
[202] Fix | Delete
}
[203] Fix | Delete
}
[204] Fix | Delete
}
[205] Fix | Delete
[206] Fix | Delete
[207] Fix | Delete
if ( !empty( $type ) && array_key_exists( $type, $defaults ) ) {
[208] Fix | Delete
return $defaults[$type];
[209] Fix | Delete
}
[210] Fix | Delete
[211] Fix | Delete
return $defaults;
[212] Fix | Delete
[213] Fix | Delete
}
[214] Fix | Delete
endif;
[215] Fix | Delete
[216] Fix | Delete
/**
[217] Fix | Delete
* Get module options
[218] Fix | Delete
*
[219] Fix | Delete
* @param string $type Module type
[220] Fix | Delete
* @return array Options for sepcific module
[221] Fix | Delete
* @since 1.0
[222] Fix | Delete
*/
[223] Fix | Delete
[224] Fix | Delete
if ( !function_exists( 'herald_get_module_options' ) ):
[225] Fix | Delete
function herald_get_module_options( $type = false ) {
[226] Fix | Delete
[227] Fix | Delete
$options = array(
[228] Fix | Delete
'posts' => array(
[229] Fix | Delete
'layouts' => herald_get_main_layouts(),
[230] Fix | Delete
'starter_layouts' => herald_get_main_layouts( false, true ),
[231] Fix | Delete
'columns' => herald_get_module_columns(),
[232] Fix | Delete
'cats' => get_categories( array( 'hide_empty' => false, 'number' => 0 ) ),
[233] Fix | Delete
'tax' => herald_get_taxonomies('post', false),
[234] Fix | Delete
'time' => herald_get_time_diff_opts(),
[235] Fix | Delete
'order' => herald_get_post_order_opts(),
[236] Fix | Delete
'formats' => herald_get_post_format_opts(),
[237] Fix | Delete
),
[238] Fix | Delete
[239] Fix | Delete
'featured' => array(
[240] Fix | Delete
'layouts' => herald_get_featured_layouts(),
[241] Fix | Delete
'cats' => get_categories( array( 'hide_empty' => false, 'number' => 0 ) ),
[242] Fix | Delete
'time' => herald_get_time_diff_opts(),
[243] Fix | Delete
'order' => herald_get_post_order_opts(),
[244] Fix | Delete
'formats' => herald_get_post_format_opts(),
[245] Fix | Delete
'post_types' => herald_get_posts_types_with_taxonomies(array('page'))
[246] Fix | Delete
),
[247] Fix | Delete
[248] Fix | Delete
'cats' => array(
[249] Fix | Delete
'layouts' => herald_get_main_layouts(false, false, array('a', 'a1', 'a2', 'a3', 'b', 'b1', 'd', 'd1', 'e', 'g', 'g1', 'h', 'j')),
[250] Fix | Delete
'cats' => get_categories( array( 'hide_empty' => false, 'number' => 0 ) )
[251] Fix | Delete
),
[252] Fix | Delete
[253] Fix | Delete
'text' => array(
[254] Fix | Delete
'columns' => herald_get_module_columns(),
[255] Fix | Delete
),
[256] Fix | Delete
[257] Fix | Delete
'authors' => array(
[258] Fix | Delete
'layouts' => herald_get_author_layouts(),
[259] Fix | Delete
'time' => herald_get_time_diff_opts(),
[260] Fix | Delete
),
[261] Fix | Delete
[262] Fix | Delete
);
[263] Fix | Delete
[264] Fix | Delete
if ( herald_is_woocommerce_active() ) {
[265] Fix | Delete
[266] Fix | Delete
$options['woocommerce'] = array(
[267] Fix | Delete
'cats' => get_terms( 'product_cat', array( 'hide_empty' => false, 'number' => 0 ) ),
[268] Fix | Delete
'order' => herald_get_product_order_opts(),
[269] Fix | Delete
'time' => herald_get_time_diff_opts()
[270] Fix | Delete
);
[271] Fix | Delete
[272] Fix | Delete
}
[273] Fix | Delete
[274] Fix | Delete
$custom_post_types = herald_get_custom_post_types();
[275] Fix | Delete
[276] Fix | Delete
if ( !empty( $custom_post_types ) ) {
[277] Fix | Delete
foreach ( $custom_post_types as $custom_post_type ) {
[278] Fix | Delete
$options[$custom_post_type] = array(
[279] Fix | Delete
'layouts' => herald_get_main_layouts(),
[280] Fix | Delete
'starter_layouts' => herald_get_main_layouts( false, true ),
[281] Fix | Delete
'columns' => herald_get_module_columns(),
[282] Fix | Delete
'time' => herald_get_time_diff_opts(),
[283] Fix | Delete
'order' => herald_get_post_order_opts(),
[284] Fix | Delete
'taxonomies' => herald_get_taxonomies( $custom_post_type )
[285] Fix | Delete
);
[286] Fix | Delete
}
[287] Fix | Delete
}
[288] Fix | Delete
[289] Fix | Delete
[290] Fix | Delete
if ( !empty( $type ) && array_key_exists( $type, $options ) ) {
[291] Fix | Delete
return $options[$type];
[292] Fix | Delete
}
[293] Fix | Delete
[294] Fix | Delete
return $options;
[295] Fix | Delete
[296] Fix | Delete
}
[297] Fix | Delete
endif;
[298] Fix | Delete
[299] Fix | Delete
[300] Fix | Delete
[301] Fix | Delete
/**
[302] Fix | Delete
* Get module layout
[303] Fix | Delete
*
[304] Fix | Delete
* Functions gets current post layout for specific module
[305] Fix | Delete
*
[306] Fix | Delete
* @param array $module Module data
[307] Fix | Delete
* @param int $i index of current post
[308] Fix | Delete
* @return string id of current layout
[309] Fix | Delete
* @since 1.0
[310] Fix | Delete
*/
[311] Fix | Delete
[312] Fix | Delete
if ( !function_exists( 'herald_get_module_layout' ) ):
[313] Fix | Delete
function herald_get_module_layout( $module, $i ) {
[314] Fix | Delete
[315] Fix | Delete
if ( herald_module_is_slider( $module ) ) {
[316] Fix | Delete
[317] Fix | Delete
return $module['layout'];
[318] Fix | Delete
[319] Fix | Delete
} else if ( isset( $module['starter_layout'] ) && $module['starter_layout'] != 'none' && $i < absint( $module['starter_limit'] ) ) {
[320] Fix | Delete
[321] Fix | Delete
return $module['starter_layout'];
[322] Fix | Delete
}
[323] Fix | Delete
[324] Fix | Delete
return $module['layout'];
[325] Fix | Delete
}
[326] Fix | Delete
endif;
[327] Fix | Delete
[328] Fix | Delete
/**
[329] Fix | Delete
* Is module slider
[330] Fix | Delete
*
[331] Fix | Delete
* Check if slider is applied to module
[332] Fix | Delete
*
[333] Fix | Delete
* @param array $module Module data
[334] Fix | Delete
* @return bool
[335] Fix | Delete
* @since 1.0
[336] Fix | Delete
*/
[337] Fix | Delete
[338] Fix | Delete
if ( !function_exists( 'herald_module_is_slider' ) ):
[339] Fix | Delete
function herald_module_is_slider( $module ) {
[340] Fix | Delete
[341] Fix | Delete
if ( isset( $module['slider'] ) && !empty( $module['slider'] ) ) {
[342] Fix | Delete
return true;
[343] Fix | Delete
}
[344] Fix | Delete
[345] Fix | Delete
return false;
[346] Fix | Delete
}
[347] Fix | Delete
endif;
[348] Fix | Delete
[349] Fix | Delete
/**
[350] Fix | Delete
* Is module combined
[351] Fix | Delete
*
[352] Fix | Delete
* Check if module has starter posts
[353] Fix | Delete
*
[354] Fix | Delete
* @param array $module Module data
[355] Fix | Delete
* @return bool
[356] Fix | Delete
* @since 1.0
[357] Fix | Delete
*/
[358] Fix | Delete
[359] Fix | Delete
if ( !function_exists( 'herald_module_is_combined' ) ):
[360] Fix | Delete
function herald_module_is_combined( $module ) {
[361] Fix | Delete
[362] Fix | Delete
if ( isset( $module['starter_layout'] ) && $module['starter_layout'] != 'none' && !empty( $module['starter_limit'] ) ) {
[363] Fix | Delete
return true;
[364] Fix | Delete
}
[365] Fix | Delete
[366] Fix | Delete
return false;
[367] Fix | Delete
}
[368] Fix | Delete
endif;
[369] Fix | Delete
[370] Fix | Delete
/**
[371] Fix | Delete
* Is module paginated
[372] Fix | Delete
*
[373] Fix | Delete
* Check if current module has a pagination
[374] Fix | Delete
*
[375] Fix | Delete
* @param unknown $i current section index
[376] Fix | Delete
* @param unknown $j current module index
[377] Fix | Delete
* @return bool
[378] Fix | Delete
* @since 1.0
[379] Fix | Delete
*/
[380] Fix | Delete
[381] Fix | Delete
if ( !function_exists( 'herald_module_is_paginated' ) ):
[382] Fix | Delete
function herald_module_is_paginated( $i, $j ) {
[383] Fix | Delete
global $herald_module_pag_index;
[384] Fix | Delete
[385] Fix | Delete
if ( !empty( $herald_module_pag_index ) && $herald_module_pag_index['s_ind'] == $i && $herald_module_pag_index['m_ind'] == $j ) {
[386] Fix | Delete
return true;
[387] Fix | Delete
}
[388] Fix | Delete
[389] Fix | Delete
return false;
[390] Fix | Delete
}
[391] Fix | Delete
endif;
[392] Fix | Delete
[393] Fix | Delete
/**
[394] Fix | Delete
* Set paginated module index
[395] Fix | Delete
*
[396] Fix | Delete
* Get last posts module index so we know to which module we should apply pagination
[397] Fix | Delete
* and set indexes to $herald_module_pag_index global var
[398] Fix | Delete
*
[399] Fix | Delete
* @param array $sections Sections data array
[400] Fix | Delete
* @return void
[401] Fix | Delete
* @since 1.0
[402] Fix | Delete
*/
[403] Fix | Delete
[404] Fix | Delete
if ( !function_exists( 'herald_set_paginated_module_index' ) ):
[405] Fix | Delete
function herald_set_paginated_module_index( $sections, $paged = false ) {
[406] Fix | Delete
[407] Fix | Delete
global $herald_module_pag_index;
[408] Fix | Delete
[409] Fix | Delete
//If we are on paginated modules page it shows only one section and module so index is set to "0"
[410] Fix | Delete
if ( $paged ) {
[411] Fix | Delete
[412] Fix | Delete
$herald_module_pag_index = array( 's_ind' => 0, 'm_ind' => 0 );
[413] Fix | Delete
[414] Fix | Delete
} else {
[415] Fix | Delete
[416] Fix | Delete
$last_section_index = false;
[417] Fix | Delete
$last_module_index = false;
[418] Fix | Delete
foreach ( $sections as $m => $section ) {
[419] Fix | Delete
if ( !empty( $section['modules'] ) ) {
[420] Fix | Delete
foreach ( $section['modules'] as $n => $module ) {
[421] Fix | Delete
if ( $module['type'] == 'posts' ) {
[422] Fix | Delete
$last_section_index = $m;
[423] Fix | Delete
$last_module_index = $n;
[424] Fix | Delete
}
[425] Fix | Delete
}
[426] Fix | Delete
}
[427] Fix | Delete
}
[428] Fix | Delete
[429] Fix | Delete
if ( $last_section_index !== false && $last_module_index !== false ) {
[430] Fix | Delete
$herald_module_pag_index = array( 's_ind' => $last_section_index, 'm_ind' => $last_module_index );
[431] Fix | Delete
}
[432] Fix | Delete
}
[433] Fix | Delete
}
[434] Fix | Delete
endif;
[435] Fix | Delete
[436] Fix | Delete
/**
[437] Fix | Delete
* Module template is paged
[438] Fix | Delete
*
[439] Fix | Delete
* Check if we are on paginated modules page
[440] Fix | Delete
*
[441] Fix | Delete
* @return int|false
[442] Fix | Delete
* @since 1.0
[443] Fix | Delete
*/
[444] Fix | Delete
[445] Fix | Delete
if ( !function_exists( 'herald_module_template_is_paged' ) ):
[446] Fix | Delete
function herald_module_template_is_paged() {
[447] Fix | Delete
$curr_page = is_front_page() ? absint( get_query_var( 'page' ) ) : absint( get_query_var( 'paged' ) );
[448] Fix | Delete
return $curr_page > 1 ? $curr_page : false;
[449] Fix | Delete
}
[450] Fix | Delete
endif;
[451] Fix | Delete
[452] Fix | Delete
[453] Fix | Delete
/**
[454] Fix | Delete
* Parse paged module template
[455] Fix | Delete
*
[456] Fix | Delete
* When we are on paginated module page
[457] Fix | Delete
* pull only the last posts module and its section
[458] Fix | Delete
* but check queries for other modules in other sections
[459] Fix | Delete
*
[460] Fix | Delete
* @param array $sections existing sections data
[461] Fix | Delete
* @return array parsed new section data
[462] Fix | Delete
* @since 1.0
[463] Fix | Delete
*/
[464] Fix | Delete
[465] Fix | Delete
if ( !function_exists( 'herald_parse_paged_module_template' ) ):
[466] Fix | Delete
function herald_parse_paged_module_template( $sections ) {
[467] Fix | Delete
[468] Fix | Delete
foreach ( $sections as $s_ind => $section ) {
[469] Fix | Delete
if ( !empty( $section['modules'] ) ) {
[470] Fix | Delete
foreach ( $section['modules'] as $m_ind => $module ) {
[471] Fix | Delete
[472] Fix | Delete
$module = herald_parse_args( $module, herald_get_module_defaults( $module['type'] ) );
[473] Fix | Delete
[474] Fix | Delete
if ( $module['type'] == 'posts' ) {
[475] Fix | Delete
[476] Fix | Delete
if ( herald_module_is_paginated( $s_ind, $m_ind ) ) {
[477] Fix | Delete
[478] Fix | Delete
$new_sections = array( 0 => $section );
[479] Fix | Delete
$module['starter_layout'] = 'none';
[480] Fix | Delete
$new_sections[0]['modules'] = array( 0 => $module );
[481] Fix | Delete
return $new_sections;
[482] Fix | Delete
[483] Fix | Delete
} else {
[484] Fix | Delete
[485] Fix | Delete
if ( $module['unique'] && $module['active']) {
[486] Fix | Delete
herald_get_module_query( $module );
[487] Fix | Delete
}
[488] Fix | Delete
}
[489] Fix | Delete
[490] Fix | Delete
} else if ( $module['type'] == 'featured' ) {
[491] Fix | Delete
[492] Fix | Delete
if ( $module['unique'] && $module['active'] ) {
[493] Fix | Delete
herald_get_featured_module_query( $module );
[494] Fix | Delete
}
[495] Fix | Delete
}
[496] Fix | Delete
}
[497] Fix | Delete
}
[498] Fix | Delete
}
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function