|
|

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