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