Lines Matching defs:flags
59 'params' => array('flags' => 'array'),
69 $flags = $this->defaults;
77 $flags['footer'] = 1;
80 $flags['footer'] = 0;
84 $flags['firstsec'] = 1;
87 $flags['firstsec'] = 0;
91 $flags['noheader'] = 0;
94 $flags['noheader'] = 1;
98 $flags['editbtn'] = 1;
102 $flags['editbtn'] = 0;
105 $flags['permalink'] = 1;
108 $flags['permalink'] = 0;
111 $flags['redirect'] = 1;
114 $flags['redirect'] = 0;
117 $flags['link'] = 1;
120 $flags['link'] = 0;
123 $flags['user'] = 1;
126 $flags['user'] = 0;
129 $flags['comments'] = 1;
132 $flags['comments'] = 0;
135 $flags['linkbacks'] = 1;
138 $flags['linkbacks'] = 0;
141 $flags['tags'] = 1;
144 $flags['tags'] = 0;
147 $flags['date'] = 1;
150 $flags['date'] = 0;
153 $flags['mdate'] = 1;
156 $flags['mdate'] = 0;
159 $flags['indent'] = 1;
162 $flags['indent'] = 0;
165 $flags['linkonly'] = 1;
169 $flags['linkonly'] = 0;
172 $flags['inline'] = 1;
175 $flags['title'] = 1;
178 $flags['title'] = 0;
181 $flags['pageexists'] = 1;
184 $flags['pageexists'] = 0;
187 $flags['pageexists'] = 1;
188 $flags['linkonly'] = 1;
191 $flags['parlink'] = 1;
194 $flags['parlink'] = 0;
197 $flags['order'] = $value;
200 $flags['rsort'] = 0;
203 $flags['rsort'] = 1;
206 $flags['depth'] = max(intval($value), 0);
209 $flags['beforeeach'] = $value;
212 $flags['aftereach'] = $value;
215 $flags['readmore'] = 1;
218 $flags['readmore'] = 0;
221 $flags['exclude'] = $value;
225 // the include_content URL parameter overrides flags
227 $flags['linkonly'] = 0;
228 return $flags;
237 function _get_instructions($page, $sect, $mode, $lvl, $flags, $root_id = null, $included_pages = array()) {
247 if ($flags['linkonly']) {
248 if (page_exists($page) || $flags['pageexists'] == 0) {
250 if ($flags['title'])
252 if($flags['parlink']) {
275 $this->_convert_instructions($ins, $lvl, $page, $sect, $flags, $root_id, $included_pages);
293 function _convert_instructions(&$ins, $lvl, $page, $sect, $flags, $root_id, $included_pages = array()) {
301 if($flags['firstsec']) {
302 $this->_get_firstsec($ins, $page, $flags); // only first section
330 if((!$no_header) && $flags['noheader']) {
343 if ($flags['inline'])
349 if ($flags['inline'])
369 if (!$flags['inline'] && $flags['indent'])
415 if($flags['indent']) {
424 if($flags['link'] && !$has_permalink && ($idx == $first_header)) {
425 $this->_permalink($ins[$idx], $page, $sect, $flags);
431 if($flags['indent'] && isset($lvl_new)) {
439 if($flags['indent']) {
446 if($flags['indent'] && isset($lvl_new)) {
460 $include_secid = (isset($flags['include_secid']) ? $flags['include_secid'] : NULL);
463 if($flags['editbtn']) {
464 $this->_editbtn($ins, $page, $sect, $sect_title, ($flags['redirect'] ? $root_id : false), $include_secid);
468 if($flags['footer']) {
469 $ins[] = $this->_footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id);
473 if ($lvl > 0 && $section_close_at !== 0 && $flags['indent'] && !$flags['inline']) {
489 array_unshift($ins, array('plugin', array('include_wrap', array('open', $page, $flags['redirect'], $include_secid))));
490 if (isset($flags['beforeeach']))
491 array_unshift($ins, array('entity', array($flags['beforeeach'])));
493 if (isset($flags['aftereach']))
494 array_push($ins, array('entity', array($flags['aftereach'])));
497 if($lvl != 0 && $this->sec_close && !$flags['inline']) {
508 function _footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id) {
511 $footer[1] = array('include_footer', array($page, $sect, $sect_title, $flags, $root_id, $footer_lvl));
533 function _permalink(&$ins, $page, $sect, $flags) {
535 $ins[1] = array('include_header', array($ins[1][0], $ins[1][1], $ins[1][2], $page, $sect, $flags));
658 function _get_firstsec(&$ins, $page, $flags) {
679 if ($flags['readmore']) {
695 function _get_included_pages($mode, $page, $sect, $parent_id, $flags) {
703 $depth = $flags['depth'] ? $flags['depth'] + substr_count($page, ':') + ($page ? 1 : 0) : 0;
733 if (isset($flags['exclude']))
734 $pages = array_filter($pages, function ($page) use ($flags) {
735 if (@preg_match($flags['exclude'], $page))
741 if ($flags['order'] === 'id') {
742 if ($flags['rsort']) {
751 switch ($flags['order']) {
775 if ($flags['rsort']) {
818 $flags = $instruction['flags'];
819 $pages = array_merge($pages, $this->_get_included_pages($mode, $page, $sect, $parent_id, $flags));