|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
//////////////////////////////////////////////////////////////////////////////// I. n% n" W5 E
// Theme Option
* B& X' C7 D( M! w1 L A- {+ l( v" g////////////////////////////////////////////////////////////////////////////////
% A) R4 r' U' N. @& v, ~: t% O0 W
$themename = "Zenx";
% h P/ g0 h! R1 ?1 r$shortname = str_replace(' ', '_', strtolower($themename)); j6 s/ L) F8 h5 _6 l
' u" B6 e! \, _% vfunction get_theme_option($option)
* H1 a" @2 C- \7 B2 ]9 E{
) v; I: F) H1 ^" o) o global $shortname;
! F5 R1 g+ A: s! j( ] return stripslashes(get_option($shortname . '_' . $option));
7 V7 v# W9 y0 L}
3 ]# _5 K/ A, x, l4 x
. Y1 ^; R- v0 E9 o9 `& Efunction get_theme_settings($option); F4 k1 r& B/ T; r$ k4 w
{
4 |1 `7 s* r/ G( \ _+ C O return stripslashes(get_option($option));0 S) Z. X# `3 ^9 E0 `' @
}
+ R* g; B, s. |$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");0 d% g6 e; z' @) |. Y% ~$ I/ `
$wp_getcat = array();
/ L# }$ e' @) Nforeach ($wp_dropdown_rd_admin as $category_list) {7 k2 F$ S3 H# m/ W
$wp_getcat[$category_list->term_id] = $category_list->name;
. p- j# m7 I+ k- y. u' X: m}
% _2 m$ o# c0 c9 y7 V6 O$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
" A; u$ l* z9 @$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");5 b) s% w1 [# C( Q5 \# B7 i" B) b
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");: r6 M* j, |/ W9 D% N/ P
4 C" L0 h5 R7 k/ j
$options = array (
' a3 W& l' t% j$ M' a
* y- R) ~" ~: l+ M9 o. b0 ]) h( `( ~; X6 \5 ?2 [
array( "name" => "Blog Header Settings",% e! o( t' S$ A
"type" => "heading",
! d9 ]0 G/ J4 A; k ),
6 @7 M* r- L" L7 F
% r- \4 ]' h# ^$ }% H6 F7 p W array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
9 `& a6 N/ T/ B! K8 ` "id" => $shortname."_header_logo_activate",
9 H/ v8 Y# z6 q. X f+ I. Y5 Q0 v "type" => "select",* ]. G! V. P* t4 \ g
"std" => "No",
0 h2 \0 V0 e, _ i; ]* m "options" => array("No", "Yes")),; M2 T2 L, n* D7 X
' `$ j' z2 j- M4 K, K$ Q D array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
# \0 G1 ?% I% D: S# S$ n) r9 ?, W _ "id" => $shortname."_logo_url",
) _7 y3 B; y) t "type" => "text",4 [: P) \0 s# B+ q! k" ?6 t5 M
"box" => "social",6 u- p# U/ D" L! y) N) }+ R
"std" => "",, W5 ?1 c+ M# m( t2 v$ h0 s
),
# i( q3 ^' F* _ R0 S6 @/ e# k- y
# B1 Y, O# H3 e$ T5 S6 Y array( "name" => "Insert Header Banner HTML Code (Header)& t3 w B p; b9 u! e
<br /><em>*Recommended Size 468 x 60</em>
9 \! q! p: o V7 w: o7 y <br /><em>*leave blank if not use</em>",
. R/ ?6 R. C0 H4 E7 D "id" => $shortname."_header_banner",
I% h# u3 e7 m( h, _, q "type" => "textarea",5 n* D9 \3 X8 m2 o* d3 F }$ O. M
"std" => "",$ C1 D$ Z2 M# b, i$ z# {' y
),
8 {. L6 Z! y5 ?9 w) r
5 a' z, J2 D; Y4 T6 h4 n; k array( "name" => "</div></div>",
* p2 B# |+ Q0 |1 D$ b& d5 I* Q "type" => "close",
, ]+ I& S$ l' b: r+ f ),
; d) J3 Q o5 Y$ k& @! c! I* p7 Z# U/ o/ |* t+ d
" v1 k H5 u4 Q, `/ y! W, E" N% ]0 |! e
array( "name" => "Header Navigation Settings",5 R N/ Q0 ?2 \5 [ p3 p
"type" => "heading",
, O4 X w- r" A8 O9 S) B2 g1 A: ~ ),
% w. y8 x( E {0 Z& C
9 L2 R3 J4 O' o3 n4 r) @6 ^ array( "name" => "Insert Page ID To Exclude On Header Navigation<br />* w$ n' {9 `& }
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />1 l3 O* H# N! _' v2 f
<em>*Enter the page post ID number only</em><br />
0 k5 c" G7 V! s' R: f <em>*separate by comma</em><br />
& B$ V0 V& l4 ?& T <em>*Exclude pages which you don't want to show on the header navigation</em>",8 D/ v2 C9 j9 A% p
"id" => $shortname."_header_page_navigation",. J, Q& w0 _- B, l
"type" => "text",6 k+ F+ [: ]* p! K! g0 O4 z0 G
"std" => "",
" x: S6 v3 Z; ?& |" y2 ~ ),
- `- _, t/ \% [2 a# J( y" d9 s8 }5 ~
array( "name" => "</div></div>",2 D2 E& e, _0 F
"type" => "close",
0 N$ ?$ y6 w. n0 _& x+ B ),
4 @1 K8 V% a+ k. }) a/ ~ 1 [/ s& d8 O8 s" F" u" D
, h7 Y2 m9 c: G6 Q$ l D. S+ B2 u array( "name" => "Post Auto Thumbnails Settings",
+ d; b2 i2 a: ?! Y ] "type" => "heading",
$ w9 q: @4 L2 I3 d, ?$ v ),
' {( x+ G' z' V5 H- k, t
$ X4 w3 }' o" Z* R array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",. [. t I8 g& v4 X
"id" => $shortname."_timthumb_activate",
/ @7 X3 i2 n4 n" g9 z4 q8 v "type" => "select",. R: S) R0 f2 a8 F" ~2 q
"std" => "No",
- f) T; d/ Z, t! M) @ "options" => array("No", "Yes")),* ]! j ?! f+ X0 }$ {# M; u
# m7 Z3 L4 j8 Y/ _5 P+ d# x# z array( "name" => "If Timthumb is enabled, Please choose its cropping method",6 B$ z9 L4 M/ g0 _" k) z* e
"id" => $shortname."_timthumb_cropping",- r: `2 E0 a# @8 q5 \4 j7 X
"type" => "select",
5 e& t- i. ]- I+ |, ^, ? I "std" => "",8 _2 L7 J% E: m2 w: ^( Z
"options" => $crop_position),7 \' v$ _/ a7 m Y' X
, P8 @1 Q% h3 a% |/ F7 h* O array( "name" => "Insert Width Of Thumbnail Image<br />
- F- N% c, L# e <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />. `- q6 d( z0 E$ D! P/ E" Q
<em>*Leave Blank To Use Default: 250</em><br />",
. @$ b: k6 J/ ~6 o3 d1 n8 f5 Q "id" => $shortname."_thumb_width",7 Z4 }2 h r2 X& J' V
"type" => "text"," x3 {5 U4 R+ x4 {
"std" => "",) W5 N3 T: ^* b( B, C6 Z
),. B! q( O: `- _2 b# R. n
0 f f$ ~6 s" j8 G+ C- I
array( "name" => "Insert Height Of Thumbnail Image<br />: ~9 y. C% I' g- H: r
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
- o, M) l' ^/ {! z8 G <em>*Leave Blank To Use Default: 200</em><br />",- z; s! [, m: x( b+ U
"id" => $shortname."_thumb_height",
# S$ v4 q% ^& p! M! E# Y' T* x "type" => "text",
C; ^7 B6 O8 t$ j9 H1 \ "std" => "",( q1 K2 a4 P* e* M" o( D3 n2 T
),
" r5 B! U' z: C5 {: S2 y1 N
{+ D( Y% K/ g- J0 t$ c array( "name" => "</div></div>",: ^) i' v. H }% P3 l% ^) Q7 |, a6 C
"type" => "close",
/ r& l0 U5 y3 B# B ),
4 [5 W$ B' u9 T; b2 E
! S3 d ^/ S# t8 e# `* }! F! |9 o array( "name" => "Featured Content Slider Settings",
, y2 G% h/ \* I7 T& T& ? "type" => "heading",
# c6 C7 Z/ h, M- P) `# Z ),
5 C1 h, `% R0 v1 u6 p9 ]+ T8 u! l3 ~- A" Y0 z
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
) w# E) f0 Y W8 f" a "id" => $shortname."_featured_activate",# B! e$ p! T) u5 h. K$ A" ]
"type" => "select",0 x/ c; f' Z4 u. Y) t& A1 C$ @9 G
"std" => "No",
' D4 P1 @7 U- F "options" => array("No", "Yes")),
3 T5 v0 {! [7 V; d& h# x. Y) I/ h/ Z( t i+ _6 o
1 H& ~1 c5 K0 A' F3 [
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
2 ~* `. l. E/ q, Y "id" => $shortname."_featured_category",
# u& v8 w9 w5 [6 ~ "type" => "select",, I3 i3 |7 Z. u- L4 L
"std" => "Choose a category:",
$ w+ @3 F: ^7 N! c7 [- G( @2 `: E" @ "options" => $wp_getcat),3 h- q* u: d9 [$ Z8 g: q+ H
, {' P; }* q3 n+ e3 i! j9 H
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",* r$ Y0 P. K) n6 l6 i* F0 \
"id" => $shortname."_featured_number",
/ d- A# {0 @ ^) { "type" => "select",
: Z. W# M! a+ U* K: \) c" l; u "std" => "Number of post:",4 m5 r* J H7 U# g
"options" => $number_entries),
* I( [4 M: w5 ~0 b# x7 s/ e. @5 s- H, u
array( "name" => "</div></div>",
* A: ?) i7 K7 E- m2 h "type" => "close",4 g: R$ o. v" S* ^/ p
),
* A, N: P3 T. h/ _3 \
3 R# F7 U+ C# L$ e# ^ array( "name" => "Featured Category Settings",( u+ c$ H$ Y& w2 d; }
"type" => "heading",
8 q3 [9 D5 |2 y4 \4 f: s7 J: o ),8 x( F) o1 N' P; P* ~& o3 Q5 T
! q9 ]& f$ \& i L+ \* u# Y array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
- Z7 a ^: i5 U) t "id" => $shortname."_featured_category_activate",3 W8 ~( t: o# O
"type" => "select",$ o& @5 o4 N9 _- c, t, S
"std" => "No",
8 E. W1 D# |8 {: N "options" => array("No", "Yes")),
`7 K: F9 }5 m; L- ^* x6 a7 h
2 K, T, G) E4 v: i3 Q @2 ^ array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
% B4 L( l/ ]* I/ o "id" => $shortname."_featured_category_id1",
( j8 c9 b8 v/ S6 { "type" => "select",
, ~. M# u/ @! F1 a9 N% ]3 u/ X "std" => "Choose a category:",
& w: Q- q! {9 I( x "options" => $wp_getcat),
) |2 F, K% e5 j! e; r/ j8 `3 p, N+ [
4 K. u, I7 ~( M array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",$ ~/ S2 v' ~5 |3 K
"id" => $shortname."_featured_number1",3 D- [: e7 f% p2 i# V8 H1 i
"type" => "select",- B6 i: y6 R8 U G
"std" => "Number of post:",9 P) Z1 I( T3 q8 f8 v, c4 X/ |. R' _
"options" => $number_entries),
' {7 c5 [: |$ d+ ]% ~
9 u0 {* I' L1 e* ]/ i4 b- g array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",1 n% c- l! A& p; i0 ], ?0 K1 J4 ^8 O
"id" => $shortname."_featured_category_id2",5 |' w ?. U6 i7 w, i
"type" => "select",, b: A6 w/ w5 D/ q+ d' i
"std" => "Choose a category:",
8 J/ J S, F' u5 p- M "options" => $wp_getcat),
/ O/ q0 k. X Y2 x+ g) P6 o
' p6 C4 ^8 m X array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",0 D$ G) l2 E1 ^- L2 Y5 j( n) G
"id" => $shortname."_featured_number2",
. g7 Q- V' |$ e$ u- T! h) @ "type" => "select",9 R" J! ?3 p% F( G
"std" => "Number of post:",) D$ E- X0 K0 c3 y8 a! j R8 P
"options" => $number_entries),( \8 I( H5 h8 k+ ?* ^
8 N: R7 k8 e3 p
1 v/ f3 a6 v" n: s; I' y7 G array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",) @6 _. B3 T3 _0 D
"id" => $shortname."_featured_category_id3",% V( q! W7 N# A, u( G. m5 r# n
"type" => "select",
$ K8 n4 s$ ~- ^( u "std" => "Choose a category:", ]+ |0 N* ^7 c! P: r& Y, \- a( l
"options" => $wp_getcat),+ ~. j W8 j+ |! W0 l* `8 W8 M
2 c9 F' l% V2 ~' n" C array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",8 c& S- U! o4 b4 I7 L* p4 e
"id" => $shortname."_featured_number3",
, g" k2 W2 I2 d# @8 v' S, n "type" => "select",5 B, j" ?0 D0 R" `$ n q
"std" => "Number of post:",
A) _; O% V2 I) \2 m "options" => $number_entries)," s1 K: i- j" S
1 d c8 r* T( I3 O+ W) @) o: l( \
# Z* l: Z& ~5 E! i" d4 y- H! K
array( "name" => "</div></div>",1 A+ a6 k' l/ Y$ y6 S
"type" => "close",$ w4 V. s' G+ O3 ?
),
b7 u1 y. X2 G9 u7 s+ b5 x) [6 h& G8 g6 H- o7 i" O
6 r n* }. s! N7 m# f( z, s array( "name" => "Google Adsense & Analytics Settings",, f' B. F+ a" i# U
"type" => "heading",
! {* O3 g( Y* s- S ),$ ~$ _( U' C, y! R2 J; q
) B! S' r0 j) B4 W1 [
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",$ C. V( Y$ p# H" G' z6 f' Y
"id" => $shortname."_adsense_loop_activate",
, v$ x+ u; E: A. H- @2 a7 e( I "type" => "select",/ n5 \9 |% P A7 W$ t: j/ q4 J
"std" => "Disable",
6 x( g) J9 T8 Z2 s "options" => array("Disable", "Enable")),
1 d* z% x- z. s0 K' _( M
; i4 b+ A: Z% D. C4 d7 ] array( "name" => "Insert Google Adsense Code For Loops Here<br />
, t% l6 \- u4 V+ Z$ y <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",! R8 c$ r: j1 {/ {. _! e+ a! \/ k
"id" => $shortname."_adsense_loop",
! D6 u+ E; k0 j2 ^ "type" => "textarea",- o/ Z! r& k# l0 l3 n8 i
"std" => "",
7 ]( k. c3 J3 f( m& N& z ),- H2 T" X v! s- e( r% u: F
5 G$ l& A/ o3 G9 m" ~# b array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",! s4 T7 W! v, x, v, j, O
"id" => $shortname."_adsense_single_activate",
/ I/ R* ^( H7 Q2 G( X- L "type" => "select",8 x( f" L! [7 F/ Y0 A
"std" => "Disable",
" O. U2 M, l. [% S! l "options" => array("Disable", "Enable")),
6 ?* y/ z ^9 A8 X8 x. {
Q0 {5 M# k+ ~/ {# ]2 Q1 N6 I5 O array( "name" => "Insert Google Adsense Code For Single Page Here<br />
; h6 M+ n: H* @* a! \- U L <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
9 H7 U9 s" g9 W6 X9 m "id" => $shortname."_adsense_single",5 E+ I0 w: K4 q8 T$ N# w
"type" => "textarea",
$ M" j& v6 q+ r3 B5 c2 ~4 C5 P" ]- j- Q "std" => "",0 Y% B( ^0 d2 W* z
),2 N% U5 n5 r& d5 X* p# J
3 }* l& m: M8 u) u: I. B. l1 v
. f6 e1 R0 Y" t& j O# x5 f; e array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
0 N6 Y W. I* w b: ]; D2 l+ {# s$ h' d8 | "id" => $shortname."_google_analytics",$ X: B8 P2 X" j# e2 Q6 s. x
"type" => "textarea",: S! r. C: p6 ^3 K4 k
"std" => "",) d0 k; `1 W$ Y/ P
),; o" [4 V- e$ K4 L( t$ N
" u. D5 T+ B6 z array( "name" => "</div></div>",4 I7 S: o8 ^3 J1 k$ c
"type" => "close",- [2 J) }. [+ e+ W) W9 ^" l
),
3 ~7 f7 v9 v7 V
% [1 W0 t" V+ r$ l& a ! \( ]7 K! K- l, i% x% G; N4 \( p
array( "name" => "AddThis Social Bookmarking Settings",
( s, {6 y7 \2 Q: @ "type" => "heading",
1 W) h- w& z) ~5 h* g2 Y* b v# G ),4 A6 T0 j2 G# O8 s4 X
; @7 X, D1 g& v3 U
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>( C8 n9 b6 K$ t4 K3 k5 F% m
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
5 U' f; L* \0 _4 i9 q8 D$ ^7 _+ o0 \$ L "id" => $shortname."_addthis",
. b/ J+ @/ R/ [ "type" => "text",# r0 b7 s; V. J
"box" => "social",
5 e' I8 E! M2 Z, k, _ "std" => "",/ I; H x2 y* H
),+ g' q9 {) [! Q5 D$ q5 \
' r1 _) @9 j0 e& D4 D$ }0 A
array( "name" => "</div></div>",
( Y/ O5 }% Y7 o' o* U "type" => "close"," k4 @3 b( n5 s" H* {$ I; U! J
),
" d @' T. C A( d. N
+ i; e5 R8 G5 A3 Z0 Q
& E) q3 Z9 U, Y! T; V8 w" k. z: q
) Z, o6 Z/ q+ G array( "name" => "YouTube Video Settings",
, S) k5 ^1 I, J& [2 w: p "type" => "heading",
" b* x# w. q% o" I* b* i7 q9 w ),
, ?+ P' r% S, G2 o
& g$ y" u5 W8 d) P: H/ o' r: y array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
4 g$ q' I) h$ L+ L; _ "id" => $shortname."_emvideo_activate",
0 g5 s8 w5 D2 S |0 Z "type" => "select",
. ]! E; Y$ z7 w" c7 b- g "std" => "No",
3 G0 i7 g9 j0 l* \8 U- I% M "options" => array("No", "Yes")),9 [) X5 M( i G+ {- r5 l1 W! L
* V8 D) |. P( ~$ W) {# c
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",1 ?1 C! M; B1 W8 q1 R+ j7 C
"id" => $shortname."_emvideo",/ N' v2 o- u& ^
"std" => "",; ?' U: i0 o6 E( m2 ?2 P
"type" => "text"),
) g( e, ~+ E& Z' d' I. ?) g6 y m
array( "name" => "</div></div>",
: Z+ _9 P/ B: q4 t1 l% S6 k: g "type" => "close",
8 ?# E1 u/ e$ R/ G0 N! ^" G6 ? ),: w" Q6 a2 N' z8 v+ T' g. Z$ R
6 Z3 [2 _# g! k- X: }& y
array( "name" => "Twitter Settings",
, B/ \2 J1 d" `4 u. o, _* m "type" => "heading",7 l, |; w! x2 j
),% h2 q# D: A' M) o0 s
3 f0 O8 K/ b" e; {- R
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",- j$ H' `2 ]+ B) L6 L z- L( a. A
"id" => $shortname."_twitter_activate",
4 P" G& q5 \( X/ |7 u' h "type" => "select",
1 a6 w# F+ Y# ~ b& Q; l @ "std" => "No",
; w, {% V4 i) z+ d$ ?+ @ "options" => array("No", "Yes")),
& `/ M' G# p8 v" a5 U" k4 Y" B R: ?. f4 l" W9 r6 k) e7 a
array( "name" => "Insert Your Twitter ID here
. Z6 |7 M9 w+ | g7 x <br /><em>*leave blank if not necessary</em>
9 F2 I0 ?8 S3 I! k; l( _ <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",/ x; s3 G# P5 z. y& Q/ B
"id" => $shortname."_twitter",
( v$ S6 t) |6 z3 i/ i2 \" _' U "type" => "text",! c: O+ p# c. U
"box" => "social",
, ~# w9 _1 j) e4 M# P* ~) _ "std" => "",
! x/ Q+ K" m) T9 r! M& Q ),
$ O) \( z4 W* ?+ r
- P2 j4 E1 |; r! |& D' G array( "name" => "Enter Twitter Feed Count here
* @8 f+ ^! F' v) {' A. w, r+ X+ s% d, a <br /><em>*leave blank if not necessary</em>
! H9 `# E& w% E2 U) n <br /><em>*Enter How Many Twitter Feed To Display</em>",
- w. f" h/ R7 S "id" => $shortname."_twitter_count",
7 L- ?7 g O$ I: z( M- }* u4 E "type" => "text",1 Y8 G* N+ z I' `9 L* V. B2 G u3 e0 b
"box" => "social",
( K$ ?, V7 b8 n* w! c0 B "std" => "",
) l7 c7 L8 h+ T& g# s7 H- _: _/ A4 w, w ),
$ O: o( X: y- t
0 H# b( |4 D$ I P# v' V8 a array( "name" => "</div></div>",
7 V: j; S' c' F# R2 l "type" => "close",
2 p- Y" q; v+ S8 I' A) A; O ),
* D: S* j/ J# V2 O5 b# p5 |$ O
+ G+ a- g8 G; {8 i1 k* v; A' V) w1 ~
array( "name" => "125 x 125 Banners Advertisement Settings",8 C% d) {8 w- i, h# C
"type" => "heading",
- z! g% K5 |0 o6 K ),
0 ~' o5 C' r8 \6 g6 V3 y0 I' u7 Y# m# A / [: s& j% J9 }& J* L2 U
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",9 M6 u, q4 a4 ~* E3 M$ ^
"id" => $shortname."_sponsor_activate",
$ T. C; M0 D: L# B; _9 ^( N$ H8 y# m "type" => "select",' a7 R6 A1 z" M# Y
"std" => "No",# [% n+ _" p# U% p u4 H
"options" => array("No", "Yes")),% | y! F2 D( S' n! j# G8 \
; n! @2 r4 Q2 e7 K; r
" H5 J. l3 Y( }: p5 h array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
2 F. N6 T C _& y! n "id" => $shortname."_sponsor_banner_one",
$ a0 M, \ Q6 h3 L- @ "type" => "textarea",$ f& g& E* C( U2 w& C1 T9 Y* j
"std" => "",
! a; N8 \% y. r$ `8 R& f) k ),
. j& K) @2 v: r
) F+ o# w/ z7 J: `) R! x, U array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",; m5 N% [7 H5 p8 D8 v# d, I
"id" => $shortname."_sponsor_banner_two",
1 d$ y* f9 ^% U. x. G "type" => "textarea",# \; `5 t2 A: R/ ?
"std" => "",
0 V2 l% o$ |# C1 ^ Q5 N ),
, g3 f+ q* z& N4 t" W
, d8 X. h7 i/ \7 x( r0 n0 X array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
3 G9 Q& [' Y) s; {/ \6 ? "id" => $shortname."_sponsor_banner_three",* V. ^& Z" m5 W# A) x) ~
"type" => "textarea",
3 q ?& J8 P2 C& B7 k. ~$ l$ I "std" => "",4 S9 P! g m0 @% t
),9 `8 H; E: v' X0 l9 ]6 i6 ~2 |% u
7 P- T( s$ E8 ?# M
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
4 ~7 }$ v$ y% f& D9 ^ ?, F4 R& L# m "id" => $shortname."_sponsor_banner_four",
; h( q5 b/ h9 {( _/ O6 r7 z1 z% i2 I "type" => "textarea",! r& X6 ^# a( x B" ^3 z( Y/ `
"std" => "",
! |+ E! E% ^4 b, X/ |/ R- S ),
- n& }3 q* ]4 _7 u5 Q$ A% o& h- h
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
) \5 E! e" e" K% Y& _- | "id" => $shortname."_sponsor_banner_five",6 X m: Y# G1 }, m4 L8 B
"type" => "textarea",
3 S$ d- G; ~7 k) h5 w' C "std" => "",
5 z: C+ n' z: ]3 `" }0 I ),& j1 O1 j6 M; p; y2 T$ ~/ u- ~
1 w& @8 P% Q- _/ y' g6 ?, S
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",, t( L+ A# J( d" q. T2 A4 d
"id" => $shortname."_sponsor_banner_six",0 C6 b8 B4 y3 k$ J' H8 @! b
"type" => "textarea",
& D- G4 C' b2 Z x0 E "std" => "",
, y7 D4 Q4 |" d1 I ),
" o9 N( H- B& `0 A4 D" Y2 j+ T+ A) Q. @* N6 J3 i4 w9 X n
array( "name" => "</div></div>",; H4 y! Z9 c9 k+ I8 @# c- r
"type" => "close",
$ g, b6 t, E5 o! d ),
. M9 m8 \( e0 i7 f
# p$ D1 ?/ D! d3 Y
1 q, x6 ]' r9 x s7 R' i9 p0 j9 k
" U: ]. N4 u- b4 v N$ S);
3 Z. d; p5 L5 i. y1 B
) l3 X- j: V+ B; d6 V5 [0 yfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
8 z' t' v" W$ _. I! Q) b, A. W: G a. N/ i$ \
echo "<div id=\"admin-options\"> ";
. V. e+ n6 _! K" m3 S- ~1 D# f6 X" n. Z" L0 ~3 |
global $themename, $shortname, $options;
0 U5 n0 o: u% q; `* V0 E4 [: G: c6 Iif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
2 K, K: o; T; \if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>'; p! w) _) f2 `- ^
?>
% f6 ~6 A$ g6 a& c3 W' k
1 U1 N% F9 C8 u0 H3 z<h4><?php echo "$themename"; ?> Theme Options</h4>* U" ?0 S" F9 F; N
' s' F. K4 l5 {$ K# A<div class="annouce"># N/ V4 A3 N$ a+ I5 d* d+ w, o) b
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>" u' E# a1 ~# A: z
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
' w/ [& n$ X8 x( P# E: o% p/ i</div>4 ^$ D$ s, m# e) u. \
/ C0 a! S2 C4 A7 P<form action="" method="post"># z' Q- y- }) z
! D0 E+ y# ]( D<?php foreach ($options as $value) { ?>5 F6 G4 d8 J0 t- k; E
! E! N4 a5 @5 f5 n, [7 I+ y<?php switch ( $value['type'] ) { case 'heading': ?># R+ c2 n- p4 D, D) x$ X
" `# `, O3 \% u6 p3 n
<div class="get-option">
3 @# z5 W4 b8 h$ {+ ^" N& S8 M# t1 g3 a' j. \
<h2><?php echo $value['name']; ?></h2>+ Z+ x2 u+ @/ l
: v @$ J; e) S& u* V+ w
<div class="option-save">, i8 H2 V$ p* G1 x: M' V
$ X& z, A! r! F<?php
3 X, m* R; b) O' _break;
8 }) K- k+ s! f8 Y7 t+ x9 p! i% ecase 'text':% r: K; Z3 q6 H: F- y2 ~
?>; [3 G6 l) d6 q6 f
# N' j, _ i) B! z0 O- z1 M
<div class="description"><?php echo $value['name']; ?></div>$ J: j" v! F v1 _; H
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ($ k) a: Y8 {, ?- @2 e2 _8 Y( H5 |
% l) j3 F& A1 A/ d0 oget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
5 }% u" }" m# D7 x' D5 S3 d" m2 m0 ~# Z; r7 i4 c
<?php
; f7 O. i% x( Ybreak;
; {" o( t& u/ dcase 'select':
F* [# y0 l/ j. J7 R* w?># X" P. O. V9 {2 t
4 [ Z C9 l! v& T2 _3 n' e<div class="description"><?php echo $value['name']; ?></div>& G1 x8 ]. A. d& {$ u, ~5 b
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">' g; Y) ~( k+ P' S5 J, S4 l$ z
<?php foreach ($value['options'] as $option) { ?>7 A; d( A; K2 {! c# i+ N; E* W
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
1 v! t$ u9 d* D: k<?php } ?> Z* X7 ^/ n. l, R' N( o
</select>/ t0 ~* \4 H/ D" L) W" X
</p>
% ^$ K, I, t4 z8 y1 V8 r- t6 }' i9 y; }* ]& c* v$ V! z" H
<?php
* E6 u8 p5 Q6 s. i0 l$ \) sbreak;
. N9 A) Q, o9 a i n) f3 Gcase 'textarea':8 Y: R9 R3 w: \* ~! u3 E5 i( R
$valuex = $value['id'];
4 @* v5 s+ u" x* P; n$valuey = stripslashes($valuex);% h- @# X2 ]4 z: R0 q$ b( M
$video_code = get_settings($valuey);$ X3 D. p$ H& D4 |1 J7 i2 Y/ l
?>
/ Z' G, j; {6 e3 H: J
: J& p1 F0 X! @2 G2 k$ u<div class="description"><?php echo $value['name']; ?></div>. A; x6 A! K: t9 g. \
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }5 `" X5 I( s! Q4 B, u7 X/ H
* y; `& J1 X1 Q8 [2 e3 a5 g6 J
else { echo $value['std']; } ?></textarea></p>
* H+ s) `6 R* _6 S1 G Q* ?& c h% F
<?php
) f; H. w& v/ E; t) o- Obreak;
8 M, w4 P6 U D$ [case 'close':0 ^% c4 Q/ c) K5 K
?>
, C( G, ~# L# k/ O: [. s8 u! S5 B9 m
<div class="clearfix"></div>' \) s) m2 m+ I. }! O
</div><!-- OPTION SAVE END -->
4 \$ ^/ u( _( f7 O5 j+ N7 W5 q" H3 ^) a% J' B* R( Y4 D6 N
<div class="clearfix"></div>
" [+ X5 d" w' f" p! c+ |</div><!-- GET OPTION END -->6 |, x. @- @/ Q
3 _( p! ~% q! Y3 H<?php
# _2 `+ f# t/ f$ L) U1 [break;% u9 w/ i8 {+ A/ F3 I. x
default;
( K; e7 G X: p6 M?>
& V5 N$ N1 E! u' F8 s$ k4 l; l. p9 _; @& |
* F8 i( m! m; w2 T' h* q
<?php
: P- K: ?, M: Z# W! _6 J0 [4 r7 {& ~7 Z0 abreak; } ?>) m+ h$ S$ P7 u* `) o q
/ Q/ ]0 ^6 L7 ~+ t( _# V. C
<?php } ?>
/ `$ G7 n3 s6 c6 y. V
H) o8 `/ o3 |<p class="save-p">
! n) d0 }% W1 C/ X2 m<input name="save" type="submit" class="sbutton" value="Save Options" />+ S' d! R/ u8 T' s% K: Z; W
<input type="hidden" name="action" value="save" />
$ W0 ~# ~' k2 O. i# I+ M</p>
2 O6 b$ p6 z/ x: v</form>$ d6 a( i: S n& g0 T7 w: s8 {
; H1 | Y7 R3 L<form method="post">
8 [ f# b( T2 ?, e1 y; I* }- s3 q+ r* u* _<p class="save-p">2 G7 T ]2 K% X5 r
<input name="reset" type="submit" class="sbutton" value="Reset Options" />
) b. m0 Z! a, l+ f5 O, A* Z<input type="hidden" name="action" value="reset" />& X5 L5 f6 F1 I% d/ v
</p>
4 _- L# [% F8 U* O$ M. s</form>
+ U% @( q' I- F% C5 a" }6 l
l* {6 I- W3 }5 @9 d {</div><!-- ADMIN OPTIONS END -->
1 s! r. l0 |2 A5 g8 D$ K& p# j& y3 G) b% J. P
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
N4 e3 t. @9 r- k
X6 \+ ?; I3 l4 {% Vfunction mytheme_admin_register() {
. o. h; U1 {8 \1 ~& Z0 Pglobal $themename, $shortname, $options;
* f: q% j$ C- }5 y6 l+ pif ( $_GET['page'] == basename(__FILE__) ) {* ?: F8 L" D3 z5 I! E* t
if ( 'save' == $_REQUEST['action'] ) {
# N; X; T' B9 r& V3 Z" D9 u' Jforeach ($options as $value) {
! h% T/ q' x6 C( u) ^* Q% lupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }3 L+ Q/ Y8 y# w0 T/ Q. w$ P( Y
foreach ($options as $value) {; I1 z9 G1 L; n2 i0 F
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
6 V* @* v B* t; ~9 lheader("Location: themes.php?page=functions.php&saved=true");
( R! G8 h' K3 q: x! tdie;
d1 N; \% a) a$ A+ n} else if( 'reset' == $_REQUEST['action'] ) {
$ K4 K3 D4 g' kforeach ($options as $value) {
9 Q8 j: ]0 ]6 {$ ~6 ~2 Bdelete_option( $value['id'] ); }0 k1 K6 S2 f6 B& t+ T" }
header("Location: themes.php?page=functions.php&reset=true"); b& L# Q4 d3 ^8 c
die;1 ~1 F, l7 v9 V- G2 I
}
' B. K7 U6 @7 |8 _& j: C}
* X' [+ u; ~) M; Padd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
' @- k* i7 o! @0 Y) w}
2 m- Z, H" k x7 a2 i& w5 O# s$ `. F
function mytheme_admin_head() { ?>+ z0 U/ O* q) C+ ]( L' u
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />( y# s9 P" b* `/ b4 x: V6 g4 T
<?php }
4 U7 L& p- _8 R8 \% ^ |
|