|
|

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