Skip to content

Commit

Permalink
subindo tema publicado, não temos historico de desenvolvimento
Browse files Browse the repository at this point in the history
  • Loading branch information
diegorojas committed Jan 10, 2014
0 parents commit 50121f5
Show file tree
Hide file tree
Showing 241 changed files with 22,194 additions and 0 deletions.
31 changes: 31 additions & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php get_header( 'projetos' ); ?>

<div id="center-pages">

<div id="post-single-cpt">

<!-- Inicio Loop -->
<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->

<script type="text/javascript">
// focus on search field after it has loaded
document.getElementById('s') && document.getElementById('s').focus();
</script>
<!-- Fim Loop -->

</div><!-- #post-single-cpt -->

</div><!-- #center-pages -->


<?php get_footer( ); ?>






231 changes: 231 additions & 0 deletions admin/admin_options.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
<?php

$themename = "Minhas Op&ccedil;&otilde;es";
$shortname = "mo";

$categories = get_categories('hide_empty=0&orderby=name');
$wp_cats = array();
foreach ($categories as $category_list ) {
$wp_cats[$category_list->cat_ID] = $category_list->cat_name;
}

array_unshift($wp_cats, "Choose a category");

$options = array (

array( "name" => $themename." Options",
"type" => "title"),


array( "name" => "Redes Sociais",
"type" => "section"),
array( "type" => "open"),

array( "name" => "Facebook",
"desc" => "Adicione a URL do Facebook",
"id" => $shortname."_url_face",
"type" => "text",
"std" => ""),

array( "name" => "Twitter",
"desc" => "Adicione a URL do Twitter",
"id" => $shortname."_url_twitter",
"type" => "text",
"std" => ""),

array( "type" => "close"),
array( "name" => "Rodap&eacute;", //* Título Rodapé */
"type" => "section"),
array( "type" => "open"),

array( "name" => "Endere&ccedil;o no Rodap&eacute;", //* Endereço no Rodapé */
"desc" => "Adicione o endere&ccedil;o com Rua, N&uacute;mero, Bairro e Cidade.",
"id" => $shortname."_footer_end",
"type" => "text",
"std" => ""),

array( "name" => "E-mail no Rodap&eacute;", //* E-mail no Rodapé */
"desc" => "Adicione o e-mail de contato.",
"id" => $shortname."_footer_mail",
"type" => "text",
"std" => ""),

array( "name" => "C&oacute;digo Google Analytics",
"desc" => "Adicione aqui o c&oacute;digo do Google Analytics que ele ser&aacute; adicionado ao Rodap&eacute; automaticamente.",
"id" => $shortname."_ga_code",
"type" => "textarea",
"std" => ""),

array( "type" => "close")

);


function mytheme_add_admin() {

global $themename, $shortname, $options;

if ( $_GET['page'] == basename(__FILE__) ) {

if ( 'save' == $_REQUEST['action'] ) {

foreach ($options as $value) {
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }

foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }

header("Location: admin.php?page=admin_options.php&saved=true");
die;

}
else if( 'reset' == $_REQUEST['action'] ) {

foreach ($options as $value) {
delete_option( $value['id'] ); }

header("Location: admin.php?page=admin_options.php&reset=true");
die;

}
}

add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin');
}

function mytheme_add_init() {

$file_dir=get_bloginfo('stylesheet_directory');
wp_enqueue_style("functions", $file_dir."/admin/functions.css", false, "1.0", "all");
wp_enqueue_script("rm_script", $file_dir."/admin/rm_script.js", false, "1.0");

}
function mytheme_admin() {

global $themename, $shortname, $options;
$i=0;

if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' salvas.</strong></p></div>';
if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' resetadas.</strong></p></div>';

?>
<div class="wrap rm_wrap">
<h2><?php echo $themename; ?> <?php bloginfo( 'blog_name' ); ?></h2>

<div class="rm_opts">
<form method="post">
<?php foreach ($options as $value) {
switch ( $value['type'] ) {

case "open":
?>

<?php break;

case "close":
?>

</div>
</div>
<br />


<?php break;

case "title":
?>
<p>Use <?php echo $themename;?> para configurar algumas partes do seu tema.</p>


<?php break;

case 'text':
?>

<div class="rm_input rm_text">
<label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
<input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?>" />
<small><?php echo $value['desc']; ?></small><div class="clearfix"></div>

</div>
<?php
break;

case 'textarea':
?>

<div class="rm_input rm_textarea">
<label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
<textarea name="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" cols="" rows=""><?php if ( get_settings( $value['id'] ) != "") { echo stripslashes(get_settings( $value['id']) ); } else { echo $value['std']; } ?></textarea>
<small><?php echo $value['desc']; ?></small><div class="clearfix"></div>

</div>

<?php
break;

case 'select':
?>

<div class="rm_input rm_select">
<label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>

<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<?php foreach ($value['options'] as $option) { ?>
<option <?php if (get_settings( $value['id'] ) == $option) { echo 'selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?>
</select>

<small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
</div>
<?php
break;

case "checkbox":
?>

<div class="rm_input rm_checkbox">
<label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>

<?php if(get_option($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = "";} ?>
<input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />


<small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
</div>
<?php break;
case "section":

$i++;

?>

<div class="rm_section">
<div class="rm_title"><h3><img src="<?php bloginfo('template_directory')?>/functions/images/trans.gif" class="inactive" alt="""><?php echo $value['name']; ?></h3><span class="submit"><input name="save<?php echo $i; ?>" class="button-primary" type="submit" value="Salvar Altera&ccedil;&otilde;es" />
</span><div class="clearfix"></div></div>
<div class="rm_options">


<?php break;

}
}
?>

<input type="hidden" name="action" value="save" />
</form>
<form method="post">
<p class="submit">
<input name="reset" type="submit" value="Resetar" />
<input type="hidden" name="action" value="reset" />
</p>
</form>
</div>


<?php
}
?>
<?php
add_action('admin_init', 'mytheme_add_init');
add_action('admin_menu', 'mytheme_add_admin');
?>
114 changes: 114 additions & 0 deletions admin/functions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.rm_wrap{
width:740px;
}

.rm_section{
border:1px solid #ddd;
border-bottom:0;
background:#f9f9f9;
}

.rm_opts label{
font-size:12px;
font-weight:700;
width:200px;
display:block;
float:left;
}
.rm_input {
padding:30px 10px;
border-bottom:1px solid #ddd;
border-top:1px solid #fff;
}
.rm_opts small{
display:block;
float:right;
width:200px;
color:#999;
}
.rm_opts input[type="text"], .rm_opts select{
width:280px;
font-size:12px;
padding:4px;
color:#333;
line-height:1em;
background:#f3f3f3;
}
.rm_input input:focus, .rm_input textarea:focus{
background:#fff;
}
.rm_input textarea{
width:280px;
height:175px;
font-size:12px;
padding:4px;
color:#333;
line-height:1.5em;
background:#f3f3f3;
}
.rm_title h3 {
cursor:pointer;
font-size:1em;
text-transform: uppercase;
margin:0;
font-weight:bold;
color:#232323;
float:left;
width:75%;
padding:14px 4px;
}

.rm_title{
cursor:pointer;
border-bottom:1px solid #ddd;
background:#eee;
padding:0;
}

.rm_title h3 img.inactive{
margin:-8px 10px 0 2px;
width:32px;
height:32px;
background:url('images/pointer.png') no-repeat 0 0;
float:left;
-moz-border-radius:6px;
border:1px solid #ccc;
}

.rm_title h3 img.active{
margin:-8px 10px 0 2px;
width:32px;
height:32px;
background:url('images/pointer.png') no-repeat 0 -32px;
float:left;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border:1px solid #ccc;
}

.rm_title h3:hover img{
border:1px solid #999;
}

.rm_title span.submit{
display:block;
float:right;
margin:0;
padding:0;
width:18%;
padding:14px 0;
}

.clearfix{
clear:both;
}

.rm_table th, .rm_table td{
border:1px solid #bbb;
padding:10px;
text-align:center;
}

.rm_table th, .rm_table td.feature{
border-color:#888;
}
Binary file added admin/images/Thumbs.db
Binary file not shown.
Binary file added admin/images/pointer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/images/trans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 50121f5

Please sign in to comment.