|
|

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